BOSS 7.0.9
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
 

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
 
- Public Member Functions inherited from dchain::ReferenceCount
 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
 

Detailed Description

Definition at line 123 of file CDCandidate.h.

Member Typedef Documentation

◆ DecayEvidence

Definition at line 129 of file CDCandidate.h.

◆ TracksAndShowers

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

Definition at line 131 of file CDCandidate.h.

Constructor & Destructor Documentation

◆ ~CDCandidate()

CDCandidate::~CDCandidate ( )
virtual

Definition at line 58 of file CDCandidate.cxx.

59{
60 delete m_kinematicDataPtr ;
61}

◆ CDCandidate() [1/2]

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/2]

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}

Member Function Documentation

◆ builtFromCDDecay()

bool CDCandidate::builtFromCDDecay ( void  ) const
virtual

Reimplemented in CDDecay.

Definition at line 347 of file CDCandidate.cxx.

348{
349 return ( false ) ;
350}

◆ builtFromCDEta()

bool CDCandidate::builtFromCDEta ( ) const
virtual

Reimplemented in CDEta.

Definition at line 287 of file CDCandidate.cxx.

288{
289 return ( false ) ;
290}

◆ builtFromCDKs()

bool CDCandidate::builtFromCDKs ( ) const
virtual

Reimplemented in CDKs.

Definition at line 307 of file CDCandidate.cxx.

308{
309 return ( false ) ;
310}

◆ builtFromCDLambda()

bool CDCandidate::builtFromCDLambda ( ) const
virtual

Reimplemented in CDLambda.

Definition at line 327 of file CDCandidate.cxx.

328{
329 return ( false ) ;
330}

◆ builtFromCDPhoton()

bool CDCandidate::builtFromCDPhoton ( ) const
virtual

Reimplemented in CDPhoton.

Definition at line 247 of file CDCandidate.cxx.

248{
249 return ( false ) ;
250}

Referenced by recurseNode().

◆ builtFromCDPi0()

bool CDCandidate::builtFromCDPi0 ( ) const
virtual

Reimplemented in CDPi0.

Definition at line 267 of file CDCandidate.cxx.

268{
269 return ( false ) ;
270}

◆ builtFromTrack()

bool CDCandidate::builtFromTrack ( ) const
virtual

Reimplemented in CDChargedVisible< H >.

Definition at line 227 of file CDCandidate.cxx.

228{
229 return ( false ) ;
230}

Referenced by recurseNode().

◆ charge()

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().

◆ decay()

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

Reimplemented in 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(), LambdaCReconstruction::execute(), NeutralDReconstruction::execute(), and recurseNode().

◆ defaultKinematicData()

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

◆ energy()

double CDCandidate::energy ( ) const

◆ finalChildren()

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
Definition: CDCandidate.h:131

◆ footPrint()

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().

◆ hypo()

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

Reimplemented in CDChargedVisible< H >, and CDPhoton.

Definition at line 212 of file CDCandidate.h.

213{
215}

◆ kinematicData()

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().

◆ mass()

◆ momentum()

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()(), LambdaCSelector::operator()(), and NeutralDSelector::operator()().

◆ navEta()

const EvtRecEtaToGG * CDCandidate::navEta ( ) const
virtual

Reimplemented in 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(), LambdaCReconstruction::execute(), and NeutralDReconstruction::execute().

◆ navKshort()

const EvtRecVeeVertex * CDCandidate::navKshort ( ) const
virtual

Reimplemented in 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(), LambdaCReconstruction::execute(), and NeutralDReconstruction::execute().

◆ navLambda()

const EvtRecVeeVertex * CDCandidate::navLambda ( ) const
virtual

Reimplemented in 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}

Referenced by LambdaCReconstruction::execute().

◆ navPi0()

const EvtRecPi0 * CDCandidate::navPi0 ( ) const
virtual

Reimplemented in 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(), LambdaCReconstruction::execute(), and NeutralDReconstruction::execute().

◆ operator=()

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}

◆ overlap()

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

◆ p4()

const HepLorentzVector & CDCandidate::p4 ( ) const

Definition at line 177 of file CDCandidate.cxx.

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

Referenced by CDDecay::defaultKinematicData().

◆ photon()

const EvtRecTrack * CDCandidate::photon ( ) const
virtual

Reimplemented in 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(), LambdaCReconstruction::execute(), NeutralDReconstruction::execute(), and recurseNode().

◆ recurseNode()

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
CDDecay DecayEvidence
Definition: CDCandidate.h:129
const std::vector< dchain::ReferenceHolder< CDCandidate > > & children() const
Definition: CDDecay.cxx:256

Referenced by finalChildren(), and recurseNode().

◆ setCDFootPrint()

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().

◆ setKinematicData()

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().

◆ setP4()

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)

◆ setUserTag()

◆ track()

const EvtRecTrack * CDCandidate::track ( ) const
virtual

Reimplemented in 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(), LambdaCReconstruction::execute(), NeutralDReconstruction::execute(), and recurseNode().

◆ userTag()


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