CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
CDDecay Class Reference

#include <CDDecay.h>

+ Inheritance diagram for CDDecay:

Public Types

typedef CDCandidate CandidateClass
 
- Public Types inherited from CDCandidate
typedef CDDecay DecayEvidence
 
typedef std::pair< vector< const EvtRecTrack * >, vector< const EvtRecTrack * > > TracksAndShowers
 

Public Member Functions

 CDDecay (const CDDecay &aOtherCDDecay)
 
 CDDecay (const CDCandidate &aProduct)
 
 CDDecay (const CDDecay &aProducts, const CDCandidate &aAdditionalProduct)
 
virtual ~CDDecay ()
 
void addChild (const CDCandidate &aAdditionalProduct)
 
void setKinematicData (const DecayChain::KinematicData &aKinematicData)
 
virtual bool builtFromCDDecay (void) const
 
virtual const CDDecaydecay (void) const
 
uint32_t numberChildren () const
 
void iterateChildren (void(*analyze)(const CDCandidate &)) const
 
void iterateChildren (DCAnalysisFunction< CDCandidate > &analyze) const
 
const CDCandidatechild (unsigned int aPosition) const
 
const std::vector< dchain::ReferenceHolder< CDCandidate > > & children () const
 
- Public Member Functions inherited from CDCandidate
virtual ~CDCandidate ()
 
const CDCandidateoperator= (const CDCandidate &aOtherCDCandidate)
 
void setUserTag (int tag)
 
CDCandidatesetP4 (const HepLorentzVector &aMomentum)
 
int userTag () const
 
double mass () const
 
int charge () const
 
double energy () const
 
const Hep3Vector & momentum () const
 
const HepLorentzVector & p4 () const
 
const DecayChain::KinematicDatakinematicData () const
 
TracksAndShowers finalChildren () const
 
virtual DBCandidate::Hypo hypo () const
 
virtual bool builtFromTrack () const
 
virtual const EvtRecTracktrack () const
 
virtual bool builtFromCDPhoton () const
 
virtual const EvtRecTrackphoton () const
 
virtual bool builtFromCDPi0 () const
 
virtual const EvtRecPi0navPi0 () const
 
virtual bool builtFromCDEta () const
 
virtual const EvtRecEtaToGGnavEta () const
 
virtual bool builtFromCDKs () const
 
virtual const EvtRecVeeVertexnavKshort () const
 
virtual bool builtFromCDLambda () const
 
virtual const EvtRecVeeVertexnavLambda () const
 
bool overlap (const CDCandidate &aOtherCDCandidate) const
 
const CDFootPrintfootPrint () const
 
- Public Member Functions inherited from dchain::ReferenceCount
 ReferenceCount ()
 
virtual ~ReferenceCount ()
 
void addLink () const
 
void dropLink () const
 

Protected Member Functions

 CDDecay ()
 
virtual DecayChain::KinematicDatadefaultKinematicData () const
 
- Protected Member Functions inherited from CDCandidate
 CDCandidate (const CDCandidate &aOtherCDCandidate)
 
 CDCandidate (const CDFootPrint &aCDFootPrint)
 
void setKinematicData (const DecayChain::KinematicData &aKinematicData)
 
void setCDFootPrint (const CDFootPrint &aCDFootPrint)
 
void recurseNode (TracksAndShowers &final, const CDCandidate &cand) const
 

Detailed Description

Definition at line 110 of file CDDecay.h.

Member Typedef Documentation

◆ CandidateClass

Definition at line 116 of file CDDecay.h.

Constructor & Destructor Documentation

◆ CDDecay() [1/4]

CDDecay::CDDecay ( const CDDecay & aOtherCDDecay)

Definition at line 126 of file CDDecay.cxx.

126 :
127#ifdef EXTEND
128 m_kmfit_chisq(aOtherCDDecay.chisq()),
129 m_vxfit_chisq(aOtherCDDecay.vchisq()),
130#endif
131 CDCandidate( aOtherCDDecay ) ,
132 m_children( *new vector< ReferenceHolder< CDCandidate > >( aOtherCDDecay.children() ) )
133{
134}
const std::vector< dchain::ReferenceHolder< CDCandidate > > & children() const
Definition CDDecay.cxx:256

◆ CDDecay() [2/4]

CDDecay::CDDecay ( const CDCandidate & aProduct)
explicit

Definition at line 136 of file CDDecay.cxx.

136 :
137#ifdef EXTEND
138 m_kmfit_chisq(500000.),
139 m_vxfit_chisq(500000.),
140#endif
141 CDCandidate( aProduct.footPrint() ) ,
142 m_children( *new vector< ReferenceHolder<CDCandidate> >
143 ( 1, ReferenceHolder<CDCandidate>(&aProduct ) ) )
144{
145}
const CDFootPrint & footPrint() const

◆ CDDecay() [3/4]

CDDecay::CDDecay ( const CDDecay & aProducts,
const CDCandidate & aAdditionalProduct )

Definition at line 147 of file CDDecay.cxx.

147 :
148#ifdef EXTEND
149 m_kmfit_chisq(500000.),
150 m_vxfit_chisq(500000.),
151#endif
152 CDCandidate( aProducts.footPrint() + aAdditionalProduct.footPrint() ) ,
153 m_children( *new vector< ReferenceHolder<CDCandidate> >( aProducts.children() ) )
154{
155 m_children.push_back( ReferenceHolder<CDCandidate>(&aAdditionalProduct) ) ;
156}

◆ ~CDDecay()

CDDecay::~CDDecay ( )
virtual

Definition at line 158 of file CDDecay.cxx.

159{
160 delete &m_children ;
161}

◆ CDDecay() [4/4]

CDDecay::CDDecay ( )
protected

Definition at line 163 of file CDDecay.cxx.

163 :
164#ifdef EXTEND
165 m_kmfit_chisq(500000.),
166 m_vxfit_chisq(500000.),
167#endif
169 m_children( *new vector< ReferenceHolder<CDCandidate> > )
170{
171}

Member Function Documentation

◆ addChild()

void CDDecay::addChild ( const CDCandidate & aAdditionalProduct)

Definition at line 187 of file CDDecay.cxx.

188{
189 setCDFootPrint( footPrint() + aAdditionalProduct.footPrint() );
190 m_children.push_back( ReferenceHolder<CDCandidate>(&aAdditionalProduct) ) ;
191}
void setCDFootPrint(const CDFootPrint &aCDFootPrint)

Referenced by CDEta::CDEta(), CDKs::CDKs(), CDLambda::CDLambda(), and CDPi0::CDPi0().

◆ builtFromCDDecay()

bool CDDecay::builtFromCDDecay ( void ) const
virtual

Reimplemented from CDCandidate.

Definition at line 203 of file CDDecay.cxx.

204{
205 return ( !false ) ;
206}

◆ child()

const CDCandidate & CDDecay::child ( unsigned int aPosition) const

Definition at line 247 of file CDDecay.cxx.

248{
249 if ( aPosition >= m_children.size() ) {
250 std::cerr << "Trying to access an invalid Child" << std::endl ;
251 return ( *(m_children[ 0 ]) ) ;
252 }
253 return ( *(m_children[ aPosition ]) ) ;
254}

Referenced by defaultKinematicData(), DsReconstruction::execute(), NeutralDReconstruction::execute(), iterateChildren(), and iterateChildren().

◆ children()

const vector< ReferenceHolder< CDCandidate > > & CDDecay::children ( ) const

Definition at line 256 of file CDDecay.cxx.

257{
258 return ( m_children ) ;
259}

Referenced by CDCandidate::recurseNode().

◆ decay()

const CDDecay & CDDecay::decay ( void ) const
virtual

Reimplemented from CDCandidate.

Definition at line 208 of file CDDecay.cxx.

209{
210 return ( *this ) ;
211}

◆ defaultKinematicData()

KinematicData * CDDecay::defaultKinematicData ( ) const
protectedvirtual

Implements CDCandidate.

Reimplemented in CDEta, CDKs, CDLambda, and CDPi0.

Definition at line 262 of file CDDecay.cxx.

263{
264 int userTag = 1 ;
265 double energySum = 0 ;
266 int chargeSum = 0 ;
267 HepLorentzVector p4( 0.0 , 0.0 , 0.0, 0.0 ) ;
268 vector< ReferenceHolder<CDCandidate> >::const_iterator finished( m_children.end() ) ;
269 for ( vector< ReferenceHolder<CDCandidate> >::const_iterator child( m_children.begin() ) ;
270 child != finished ;
271 ++child ) {
272 userTag &= (*(*child)).userTag();
273 chargeSum += (*(*child)).charge() ;
274 p4 += (*(*child)).p4() ;
275 }
276
277 KinematicData* tmp = new KinematicData();
278
279 tmp->setUserTag( userTag );
280 tmp->setCharge( chargeSum );
281 tmp->setP4( p4 );
282
283 return tmp;
284}
int userTag() const
int charge() const
const HepLorentzVector & p4() const
const CDCandidate & child(unsigned int aPosition) const
Definition CDDecay.cxx:247
void setCharge(const int aCharge)
void setP4(const HepLorentzVector &aMomentum)
void setUserTag(const int tag)

◆ iterateChildren() [1/2]

void CDDecay::iterateChildren ( DCAnalysisFunction< CDCandidate > & analyze) const

Definition at line 237 of file CDDecay.cxx.

238{
239 vector< ReferenceHolder<CDCandidate> >::const_iterator finished ( m_children.end() ) ;
240 for ( vector< ReferenceHolder<CDCandidate> >::const_iterator child ( m_children.begin() ) ;
241 child != finished ;
242 ++child ) {
243 analyze( (*(*child)) ) ;
244 }
245}

◆ iterateChildren() [2/2]

void CDDecay::iterateChildren ( void(* analyze )(const CDCandidate &)) const

Definition at line 224 of file CDDecay.cxx.

225{
226 vector< ReferenceHolder<CDCandidate> >::const_iterator finished( m_children.end() ) ;
227 for ( vector< ReferenceHolder<CDCandidate> >::const_iterator child( m_children.begin() ) ;
228 child != finished ;
229 ++child ) {
230 analyze( (*(*child)) ) ;
231 }
232}

◆ numberChildren()

uint32_t CDDecay::numberChildren ( ) const

Definition at line 216 of file CDDecay.cxx.

217{
218 return ( m_children.size() ) ;
219}

◆ setKinematicData()

void CDDecay::setKinematicData ( const DecayChain::KinematicData & aKinematicData)

Definition at line 193 of file CDDecay.cxx.

194{
195 // Call setKinematicData of my super-class
196 CDCandidate::setKinematicData( aKinematicData );
197}
void setKinematicData(const DecayChain::KinematicData &aKinematicData)

The documentation for this class was generated from the following files: