BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
CDCandidate Class Referenceabstract

#include <CDCandidate.h>

+ Inheritance diagram for CDCandidate:

Public Types

typedef CDDecay DecayEvidence
 
typedef std::pair< vector< const EvtRecTrack * >, vector< const EvtRecTrack * > > TracksAndShowers
 
typedef CDDecay DecayEvidence
 
typedef std::pair< vector< const EvtRecTrack * >, vector< const EvtRecTrack * > > TracksAndShowers
 

Public Member Functions

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
 
virtual bool builtFromCDDecay () const
 
virtual const DecayEvidencedecay () const
 
bool overlap (const CDCandidate &aOtherCDCandidate) const
 
const CDFootPrintfootPrint () const
 
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
 
virtual bool builtFromCDDecay () const
 
virtual const DecayEvidencedecay () 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
 
 ReferenceCount ()
 
virtual ~ReferenceCount ()
 
void addLink () const
 
void dropLink () const
 

Protected Member Functions

 CDCandidate (const CDCandidate &aOtherCDCandidate)
 
 CDCandidate (const CDFootPrint &aCDFootPrint)
 
void setKinematicData (const DecayChain::KinematicData &aKinematicData)
 
void setCDFootPrint (const CDFootPrint &aCDFootPrint)
 
virtual DecayChain::KinematicDatadefaultKinematicData () const =0
 
void recurseNode (TracksAndShowers &final, const CDCandidate &cand) const
 
 CDCandidate (const CDCandidate &aOtherCDCandidate)
 
 CDCandidate (const CDFootPrint &aCDFootPrint)
 
void setKinematicData (const DecayChain::KinematicData &aKinematicData)
 
void setCDFootPrint (const CDFootPrint &aCDFootPrint)
 
virtual DecayChain::KinematicDatadefaultKinematicData () const =0
 
void recurseNode (TracksAndShowers &final, const CDCandidate &cand) const
 

Detailed Description

Member Typedef Documentation

◆ DecayEvidence [1/2]

◆ DecayEvidence [2/2]

◆ TracksAndShowers [1/2]

typedef std::pair< vector<const EvtRecTrack*>, vector<const EvtRecTrack*> > CDCandidate::TracksAndShowers

◆ TracksAndShowers [2/2]

typedef std::pair< vector<const EvtRecTrack*>, vector<const EvtRecTrack*> > CDCandidate::TracksAndShowers

Constructor & Destructor Documentation

◆ ~CDCandidate() [1/2]

CDCandidate::~CDCandidate ( )
virtual

Definition at line 58 of file CDCandidate.cxx.

59{
60 delete m_kinematicDataPtr ;
61}

◆ CDCandidate() [1/4]

CDCandidate::CDCandidate ( const CDCandidate aOtherCDCandidate)
protected

Definition at line 36 of file CDCandidate.cxx.

36 :
38 m_kinematicDataPtr(0),
39 m_footPrint( aOtherCDCandidate.footPrint() )
40{
41 if ( 0 != aOtherCDCandidate.m_kinematicDataPtr ) {
42 setKinematicData( * (aOtherCDCandidate.kinematicData()) ) ;
43 }
44}
const CDFootPrint & footPrint() const
void setKinematicData(const DecayChain::KinematicData &aKinematicData)
Definition: CDCandidate.cxx:99
const DecayChain::KinematicData * kinematicData() const

Referenced by CDCandidate().

◆ CDCandidate() [2/4]

CDCandidate::CDCandidate ( const CDFootPrint aCDFootPrint)
protected

Definition at line 50 of file CDCandidate.cxx.

50 :
51 m_kinematicDataPtr( 0 ) ,
52 m_footPrint( aCDFootPrint )
53{
54}

◆ ~CDCandidate() [2/2]

virtual CDCandidate::~CDCandidate ( )
virtual

◆ CDCandidate() [3/4]

CDCandidate::CDCandidate ( const CDCandidate aOtherCDCandidate)
protected

◆ CDCandidate() [4/4]

CDCandidate::CDCandidate ( const CDFootPrint aCDFootPrint)
protected

Member Function Documentation

◆ builtFromCDDecay() [1/2]

bool CDCandidate::builtFromCDDecay ( void  ) const
virtual

Reimplemented in CDDecay, and CDDecay.

Definition at line 347 of file CDCandidate.cxx.

348{
349 return ( false ) ;
350}

◆ builtFromCDDecay() [2/2]

virtual bool CDCandidate::builtFromCDDecay ( ) const
virtual

Reimplemented in CDDecay, and CDDecay.

◆ builtFromCDEta() [1/2]

bool CDCandidate::builtFromCDEta ( ) const
virtual

Reimplemented in CDEta, and CDEta.

Definition at line 287 of file CDCandidate.cxx.

288{
289 return ( false ) ;
290}

◆ builtFromCDEta() [2/2]

virtual bool CDCandidate::builtFromCDEta ( ) const
virtual

Reimplemented in CDEta, and CDEta.

◆ builtFromCDKs() [1/2]

bool CDCandidate::builtFromCDKs ( ) const
virtual

Reimplemented in CDKs, and CDKs.

Definition at line 307 of file CDCandidate.cxx.

308{
309 return ( false ) ;
310}

◆ builtFromCDKs() [2/2]

virtual bool CDCandidate::builtFromCDKs ( ) const
virtual

Reimplemented in CDKs, and CDKs.

◆ builtFromCDLambda() [1/2]

bool CDCandidate::builtFromCDLambda ( ) const
virtual

Reimplemented in CDLambda, and CDLambda.

Definition at line 327 of file CDCandidate.cxx.

328{
329 return ( false ) ;
330}

◆ builtFromCDLambda() [2/2]

virtual bool CDCandidate::builtFromCDLambda ( ) const
virtual

Reimplemented in CDLambda, and CDLambda.

◆ builtFromCDPhoton() [1/2]

bool CDCandidate::builtFromCDPhoton ( ) const
virtual

Reimplemented in CDPhoton, and CDPhoton.

Definition at line 247 of file CDCandidate.cxx.

248{
249 return ( false ) ;
250}

Referenced by recurseNode().

◆ builtFromCDPhoton() [2/2]

virtual bool CDCandidate::builtFromCDPhoton ( ) const
virtual

Reimplemented in CDPhoton, and CDPhoton.

◆ builtFromCDPi0() [1/2]

bool CDCandidate::builtFromCDPi0 ( ) const
virtual

Reimplemented in CDPi0, and CDPi0.

Definition at line 267 of file CDCandidate.cxx.

268{
269 return ( false ) ;
270}

◆ builtFromCDPi0() [2/2]

virtual bool CDCandidate::builtFromCDPi0 ( ) const
virtual

Reimplemented in CDPi0, and CDPi0.

◆ builtFromTrack() [1/2]

bool CDCandidate::builtFromTrack ( ) const
virtual

Reimplemented in CDChargedVisible< H >, and CDChargedVisible< H >.

Definition at line 227 of file CDCandidate.cxx.

228{
229 return ( false ) ;
230}

Referenced by recurseNode().

◆ builtFromTrack() [2/2]

virtual bool CDCandidate::builtFromTrack ( ) const
virtual

◆ charge() [1/2]

int CDCandidate::charge ( ) const

Definition at line 154 of file CDCandidate.cxx.

155{
156 return kinematicData()->charge();
157}

Referenced by CDDecay::defaultKinematicData(), and NeutralDReconstruction::execute().

◆ charge() [2/2]

int CDCandidate::charge ( ) const

◆ decay() [1/2]

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

Reimplemented in CDDecay, and CDDecay.

Definition at line 356 of file CDCandidate.cxx.

357{
358 std::cerr << "No CDDecay for this CDCandidate" << std::endl ;
359 exit( 1 ) ;
360 return ( *(CDDecay*)0 ) ;
361}

Referenced by DsReconstruction::execute(), NeutralDReconstruction::execute(), and recurseNode().

◆ decay() [2/2]

virtual const DecayEvidence & CDCandidate::decay ( ) const
virtual

Reimplemented in CDDecay, and CDDecay.

◆ defaultKinematicData() [1/2]

virtual DecayChain::KinematicData * CDCandidate::defaultKinematicData ( ) const
protectedpure virtual

◆ defaultKinematicData() [2/2]

virtual DecayChain::KinematicData * CDCandidate::defaultKinematicData ( ) const
protectedpure virtual

◆ energy() [1/2]

double CDCandidate::energy ( ) const

Definition at line 163 of file CDCandidate.cxx.

164{
165 return kinematicData()->energy();
166}

Referenced by ChargedDSelector::operator()(), DsSelector::operator()(), and NeutralDSelector::operator()().

◆ energy() [2/2]

double CDCandidate::energy ( ) const

◆ finalChildren() [1/2]

CDCandidate::TracksAndShowers CDCandidate::finalChildren ( ) const

Definition at line 193 of file CDCandidate.cxx.

194{
195 TracksAndShowers blocks;
196 recurseNode(blocks, *this);
197 return blocks;
198}
void recurseNode(TracksAndShowers &final, const CDCandidate &cand) const
std::pair< vector< const EvtRecTrack * >, vector< const EvtRecTrack * > > TracksAndShowers

◆ finalChildren() [2/2]

TracksAndShowers CDCandidate::finalChildren ( ) const

◆ footPrint() [1/2]

const CDFootPrint & CDCandidate::footPrint ( ) const

Definition at line 375 of file CDCandidate.cxx.

376{
377 return ( m_footPrint ) ;
378}

Referenced by CDDecay::addChild(), operator=(), and overlap().

◆ footPrint() [2/2]

const CDFootPrint & CDCandidate::footPrint ( ) const

◆ hypo() [1/2]

◆ hypo() [2/2]

virtual DBCandidate::Hypo CDCandidate::hypo ( ) const
inlinevirtual

◆ kinematicData() [1/2]

const KinematicData * CDCandidate::kinematicData ( ) const

Definition at line 185 of file CDCandidate.cxx.

186{
187 // Cast away `const' to pick up the function.
188 // This is safe as the result is being returned as a `const'
189 return ( (*(CDCandidate*)this).modifiableKinematicData() );
190}

Referenced by CDCandidate(), charge(), energy(), mass(), momentum(), operator=(), p4(), and userTag().

◆ kinematicData() [2/2]

const DecayChain::KinematicData * CDCandidate::kinematicData ( ) const

◆ mass() [1/2]

◆ mass() [2/2]

double CDCandidate::mass ( ) const

◆ momentum() [1/2]

const Hep3Vector & CDCandidate::momentum ( ) const

Definition at line 172 of file CDCandidate.cxx.

173{
174 return kinematicData()->p4();
175}
const HepLorentzVector & p4() const

Referenced by ChargedDSelector::operator()(), DsSelector::operator()(), and NeutralDSelector::operator()().

◆ momentum() [2/2]

const Hep3Vector & CDCandidate::momentum ( ) const

◆ navEta() [1/2]

const EvtRecEtaToGG * CDCandidate::navEta ( ) const
virtual

Reimplemented in CDEta, and CDEta.

Definition at line 296 of file CDCandidate.cxx.

297{
298 std::cerr << "No NavCDEta for this CDCandidate" << std::endl ;
299 exit( 1 ) ;
300 return ( (EvtRecEtaToGG*)0 ) ;
301}

Referenced by ChargedDReconstruction::execute(), DsReconstruction::execute(), and NeutralDReconstruction::execute().

◆ navEta() [2/2]

virtual const EvtRecEtaToGG * CDCandidate::navEta ( ) const
virtual

Reimplemented in CDEta, and CDEta.

◆ navKshort() [1/2]

const EvtRecVeeVertex * CDCandidate::navKshort ( ) const
virtual

Reimplemented in CDKs, and CDKs.

Definition at line 316 of file CDCandidate.cxx.

317{
318 std::cerr << "No NavKs for this CDCandidate" << std::endl ;
319 exit( 1 ) ;
320 return ( (EvtRecVeeVertex*)0 ) ;
321}

Referenced by ChargedDReconstruction::execute(), DsReconstruction::execute(), and NeutralDReconstruction::execute().

◆ navKshort() [2/2]

virtual const EvtRecVeeVertex * CDCandidate::navKshort ( ) const
virtual

Reimplemented in CDKs, and CDKs.

◆ navLambda() [1/2]

const EvtRecVeeVertex * CDCandidate::navLambda ( ) const
virtual

Reimplemented in CDLambda, and CDLambda.

Definition at line 336 of file CDCandidate.cxx.

337{
338 std::cerr << "No NavLambda for this CDCandidate" << std::endl ;
339 exit( 1 ) ;
340 return ( (EvtRecVeeVertex*)0 ) ;
341}

◆ navLambda() [2/2]

virtual const EvtRecVeeVertex * CDCandidate::navLambda ( ) const
virtual

Reimplemented in CDLambda, and CDLambda.

◆ navPi0() [1/2]

const EvtRecPi0 * CDCandidate::navPi0 ( ) const
virtual

Reimplemented in CDPi0, and CDPi0.

Definition at line 276 of file CDCandidate.cxx.

277{
278 std::cerr << "No NavCDPi0 for this CDCandidate" << std::endl ;
279 exit( 1 ) ;
280 return ( (EvtRecPi0*)0 ) ;
281}

Referenced by ChargedDReconstruction::execute(), DsReconstruction::execute(), and NeutralDReconstruction::execute().

◆ navPi0() [2/2]

virtual const EvtRecPi0 * CDCandidate::navPi0 ( ) const
virtual

Reimplemented in CDPi0, and CDPi0.

◆ operator=() [1/2]

const CDCandidate & CDCandidate::operator= ( const CDCandidate aOtherCDCandidate)

Definition at line 67 of file CDCandidate.cxx.

68{
69 if ( 0 == aOtherCDCandidate.m_kinematicDataPtr ) {
70 delete m_kinematicDataPtr ;
71 m_kinematicDataPtr = 0 ;
72 }
73 else {
74 setKinematicData( * (aOtherCDCandidate.kinematicData()) ) ;
75 }
76 m_footPrint = aOtherCDCandidate.footPrint() ;
77 return ( *this ) ;
78}

◆ operator=() [2/2]

const CDCandidate & CDCandidate::operator= ( const CDCandidate aOtherCDCandidate)

◆ overlap() [1/2]

bool CDCandidate::overlap ( const CDCandidate aOtherCDCandidate) const

Definition at line 367 of file CDCandidate.cxx.

368{
369 return ( m_footPrint.overlap( aOtherCDCandidate.footPrint() ) ) ;
370}
bool overlap(const CDFootPrint &aOtherPrint) const

◆ overlap() [2/2]

bool CDCandidate::overlap ( const CDCandidate aOtherCDCandidate) const

◆ p4() [1/2]

const HepLorentzVector & CDCandidate::p4 ( ) const

Definition at line 177 of file CDCandidate.cxx.

178{
179 return kinematicData()->p4();
180}

Referenced by CDDecay::defaultKinematicData().

◆ p4() [2/2]

const HepLorentzVector & CDCandidate::p4 ( ) const

◆ photon() [1/2]

const EvtRecTrack * CDCandidate::photon ( ) const
virtual

Reimplemented in CDPhoton, and CDPhoton.

Definition at line 256 of file CDCandidate.cxx.

257{
258 std::cerr << "No NavShower for this CDCandidate" << std::endl ;
259 exit( 1 ) ;
260 return ( (EvtRecTrack*)0 ) ;
261}

Referenced by DsReconstruction::execute(), NeutralDReconstruction::execute(), and recurseNode().

◆ photon() [2/2]

virtual const EvtRecTrack * CDCandidate::photon ( ) const
virtual

Reimplemented in CDPhoton, and CDPhoton.

◆ recurseNode() [1/2]

void CDCandidate::recurseNode ( CDCandidate::TracksAndShowers final,
const CDCandidate cand 
) const
protected

Definition at line 201 of file CDCandidate.cxx.

203{
204 if(cand.builtFromTrack())
205 {
206 final.first.push_back( cand.track() );
207 return;
208 }
209 if(cand.builtFromCDPhoton())
210 {
211 final.second.push_back( cand.photon() );
212 return;
213 }
214 const DecayEvidence& decay = cand.decay();
215 const vector< ReferenceHolder<CDCandidate> >& children = decay.children();
216 vector< ReferenceHolder<CDCandidate> >::const_iterator lastChild = children.end();
217 for(vector<ReferenceHolder<CDCandidate> >::const_iterator child = children.begin();
218 child != lastChild; ++child)
219 {
220 recurseNode(final, **child);
221 }
222}
virtual const DecayEvidence & decay() const
virtual const EvtRecTrack * photon() const
virtual const EvtRecTrack * track() const
virtual bool builtFromCDPhoton() const
virtual bool builtFromTrack() const
const std::vector< dchain::ReferenceHolder< CDCandidate > > & children() const
Definition: CDDecay.cxx:256

Referenced by finalChildren(), and recurseNode().

◆ recurseNode() [2/2]

void CDCandidate::recurseNode ( TracksAndShowers final,
const CDCandidate cand 
) const
protected

◆ setCDFootPrint() [1/2]

void CDCandidate::setCDFootPrint ( const CDFootPrint aCDFootPrint)
protected

Definition at line 117 of file CDCandidate.cxx.

118{
119 m_footPrint = aCDFootPrint ;
120}

Referenced by CDDecay::addChild().

◆ setCDFootPrint() [2/2]

void CDCandidate::setCDFootPrint ( const CDFootPrint aCDFootPrint)
protected

◆ setKinematicData() [1/2]

void CDCandidate::setKinematicData ( const DecayChain::KinematicData aKinematicData)
protected

Definition at line 99 of file CDCandidate.cxx.

100{
101 if ( 0 == m_kinematicDataPtr ) {
102 m_kinematicDataPtr = new KinematicData( aKinematicData ) ;
103 if ( 0 == m_kinematicDataPtr ) {
104 std::cerr << "No memory to allocate another kinematicData" << std::endl ;
105 exit( 1 ) ;
106 }
107 return ;
108 }
109 (*(this->modifiableKinematicData())) = aKinematicData ;
110 return ;
111}

Referenced by CDCandidate(), operator=(), and CDDecay::setKinematicData().

◆ setKinematicData() [2/2]

void CDCandidate::setKinematicData ( const DecayChain::KinematicData aKinematicData)
protected

◆ setP4() [1/2]

CDCandidate & CDCandidate::setP4 ( const HepLorentzVector &  aMomentum)

Definition at line 88 of file CDCandidate.cxx.

89{
90 this->modifiableKinematicData()->setP4( aMomentum ) ;
91 return( *this ) ;
92}
void setP4(const HepLorentzVector &aMomentum)

◆ setP4() [2/2]

CDCandidate & CDCandidate::setP4 ( const HepLorentzVector &  aMomentum)

◆ setUserTag() [1/2]

◆ setUserTag() [2/2]

void CDCandidate::setUserTag ( int  tag)

◆ track() [1/2]

const EvtRecTrack * CDCandidate::track ( ) const
virtual

Reimplemented in CDChargedVisible< H >, and CDChargedVisible< H >.

Definition at line 236 of file CDCandidate.cxx.

237{
238 std::cerr << "No navtrack for this CDCandidate" << std::endl ;
239 exit( 1 ) ;
240 return ( (EvtRecTrack*)0 ) ;
241}

Referenced by ChargedDReconstruction::execute(), DsReconstruction::execute(), NeutralDReconstruction::execute(), and recurseNode().

◆ track() [2/2]

virtual const EvtRecTrack * CDCandidate::track ( ) const
virtual

◆ userTag() [1/2]

int CDCandidate::userTag ( ) const

◆ userTag() [2/2]

int CDCandidate::userTag ( ) const

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