CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
Event::McPrimaryParticle Class Reference

#include <McPrimaryParticle.h>

+ Inheritance diagram for Event::McPrimaryParticle:

Public Types

enum  ClassificationBits {
  NOPRIMARY = 1 , CHARGED = 1<<1 , NEUTRAL = 1<<2 , GAMMA = 1<<3 ,
  CONVERT = 1<<4 , BREM = 1<<5 , COMPT = 1<<6 , PHOT = 1<<7 ,
  OTHER = 1<<8 , TRKCONVERT = 1<<12 , TRKBREM = 1<<13 , TRKCOMPT = 1<<14 ,
  TRKPHOT = 1<<15 , TRKOTHER = 1<<16 , RUNBIT = 1<<24
}
 Define bits to help classify the event. More...
 

Public Member Functions

 McPrimaryParticle ()
 Dataobject compliant constructor.
 
 ~McPrimaryParticle ()
 
virtual const CLID & clID () const
 
const unsigned long getClassificationBits () const
 Retrieve classification bits (see above definitions)
 
const Event::McParticleRef getPrimaryParticle () const
 Retrieve reference to the primary particle.
 
const int getNumSecondaries () const
 Retrieve number and iterators to the daughters of the primary with hits in tracker.
 
Event::McParticleRefVec::const_iterator beginSecondaries () const
 
Event::McParticleRefVec::const_iterator endSecondaries () const
 
const int getNumAssociated () const
 Retrieve number and iterators to the particles associated with primary.
 
Event::McParticleRefVec::const_iterator beginAssociated () const
 
Event::McParticleRefVec::const_iterator endAssociated () const
 
Event::McParticleRefVec getTrackVector ()
 Return an McParticle reference vector of all McParticles which leave hits in tracker.
 
void setPrimaryParticle (const Event::McParticleRef mcPart)
 For building.
 
void addSecondary (const Event::McParticleRef mcPart)
 
void addAssociated (const Event::McParticleRef mcPart)
 
void setClassificationBits (const unsigned long bits)
 

Static Public Member Functions

static const CLID & classID ()
 

Detailed Description

Definition at line 24 of file McPrimaryParticle.h.

Member Enumeration Documentation

◆ ClassificationBits

Define bits to help classify the event.

Enumerator
NOPRIMARY 
CHARGED 

No primary particle found (can't happen?)

NEUTRAL 

Primary particle is charged.

GAMMA 

Primary particle is neutral.

CONVERT 

Primary is a gamma.

BREM 

Secondaries from gamma conversion.

COMPT 

Secondaries from Bremstrahlung.

PHOT 

Secondaries from Compton scatter.

OTHER 

Secondaries from Photoelectric effect (?)

TRKCONVERT 

Secondaries from some other process.

TRKBREM 

Secondaries from gamma conversion in tracker.

TRKCOMPT 

Secondaries from Bremstrahlung in tracker.

TRKPHOT 

Secondaries from Compton scatter in tracker.

TRKOTHER 

Secondaries from Photoelectric effect in tracker.

RUNBIT 

Secondaries from some other process in tracker.

Definition at line 28 of file McPrimaryParticle.h.

28 {
29 NOPRIMARY = 1 , //! No primary particle found (can't happen?)
30 CHARGED = 1<<1, //! Primary particle is charged
31 NEUTRAL = 1<<2, //! Primary particle is neutral
32 GAMMA = 1<<3, //! Primary is a gamma
33 CONVERT = 1<<4, //! Secondaries from gamma conversion
34 BREM = 1<<5, //! Secondaries from Bremstrahlung
35 COMPT = 1<<6, //! Secondaries from Compton scatter
36 PHOT = 1<<7, //! Secondaries from Photoelectric effect (?)
37 OTHER = 1<<8, //! Secondaries from some other process
38 TRKCONVERT = 1<<12, //! Secondaries from gamma conversion in tracker
39 TRKBREM = 1<<13, //! Secondaries from Bremstrahlung in tracker
40 TRKCOMPT = 1<<14, //! Secondaries from Compton scatter in tracker
41 TRKPHOT = 1<<15, //! Secondaries from Photoelectric effect in tracker
42 TRKOTHER = 1<<16, //! Secondaries from some other process in tracker
43 RUNBIT = 1<<24 //! Indicates code was called (does nothing)
44 };
@ COMPT
Secondaries from Bremstrahlung.
@ TRKCOMPT
Secondaries from Bremstrahlung in tracker.
@ TRKPHOT
Secondaries from Compton scatter in tracker.
@ RUNBIT
Secondaries from some other process in tracker.
@ OTHER
Secondaries from Photoelectric effect (?)
@ NEUTRAL
Primary particle is charged.
@ TRKCONVERT
Secondaries from some other process.
@ CONVERT
Primary is a gamma.
@ CHARGED
No primary particle found (can't happen?)
@ TRKBREM
Secondaries from gamma conversion in tracker.
@ BREM
Secondaries from gamma conversion.
@ TRKOTHER
Secondaries from Photoelectric effect in tracker.
@ GAMMA
Primary particle is neutral.
@ PHOT
Secondaries from Compton scatter.

Constructor & Destructor Documentation

◆ McPrimaryParticle()

Event::McPrimaryParticle::McPrimaryParticle ( )
inline

Dataobject compliant constructor.

Definition at line 47 of file McPrimaryParticle.h.

47 : ContainedObject()
48 {
49 m_classification = 0;
50 m_primary = 0;
51 m_secondaries.clear();
52 m_associated.clear();
53 }

◆ ~McPrimaryParticle()

Event::McPrimaryParticle::~McPrimaryParticle ( )
inline

Definition at line 56 of file McPrimaryParticle.h.

56{}

Member Function Documentation

◆ addAssociated()

void Event::McPrimaryParticle::addAssociated ( const Event::McParticleRef  mcPart)
inline

Definition at line 83 of file McPrimaryParticle.h.

83{m_associated.push_back(mcPart);}

◆ addSecondary()

void Event::McPrimaryParticle::addSecondary ( const Event::McParticleRef  mcPart)
inline

Definition at line 82 of file McPrimaryParticle.h.

82{m_secondaries.push_back(mcPart);}

◆ beginAssociated()

Event::McParticleRefVec::const_iterator Event::McPrimaryParticle::beginAssociated ( ) const
inline

Definition at line 74 of file McPrimaryParticle.h.

74{return m_associated.begin();}

◆ beginSecondaries()

Event::McParticleRefVec::const_iterator Event::McPrimaryParticle::beginSecondaries ( ) const
inline

Definition at line 69 of file McPrimaryParticle.h.

69{return m_secondaries.begin();}

◆ classID()

static const CLID & Event::McPrimaryParticle::classID ( )
inlinestatic

Definition at line 59 of file McPrimaryParticle.h.

59{ return CLID_McPrimaryParticle; }
const CLID & CLID_McPrimaryParticle
Definition: EventModel.cxx:232

Referenced by clID().

◆ clID()

virtual const CLID & Event::McPrimaryParticle::clID ( ) const
inlinevirtual

Definition at line 58 of file McPrimaryParticle.h.

static const CLID & classID()

◆ endAssociated()

Event::McParticleRefVec::const_iterator Event::McPrimaryParticle::endAssociated ( ) const
inline

Definition at line 75 of file McPrimaryParticle.h.

75{return m_associated.end();}

◆ endSecondaries()

Event::McParticleRefVec::const_iterator Event::McPrimaryParticle::endSecondaries ( ) const
inline

Definition at line 70 of file McPrimaryParticle.h.

70{return m_secondaries.end();}

◆ getClassificationBits()

const unsigned long Event::McPrimaryParticle::getClassificationBits ( ) const
inline

Retrieve classification bits (see above definitions)

Definition at line 62 of file McPrimaryParticle.h.

62{return m_classification;}

◆ getNumAssociated()

const int Event::McPrimaryParticle::getNumAssociated ( ) const
inline

Retrieve number and iterators to the particles associated with primary.

Definition at line 73 of file McPrimaryParticle.h.

73{return m_associated.size();}

◆ getNumSecondaries()

const int Event::McPrimaryParticle::getNumSecondaries ( ) const
inline

Retrieve number and iterators to the daughters of the primary with hits in tracker.

Definition at line 68 of file McPrimaryParticle.h.

68{return m_secondaries.size();}

◆ getPrimaryParticle()

const Event::McParticleRef Event::McPrimaryParticle::getPrimaryParticle ( ) const
inline

Retrieve reference to the primary particle.

Definition at line 65 of file McPrimaryParticle.h.

65{return m_primary;}

◆ getTrackVector()

Event::McParticleRefVec McPrimaryParticle::getTrackVector ( )
inline

Return an McParticle reference vector of all McParticles which leave hits in tracker.

Definition at line 9 of file McPrimaryParticle.cxx.

10{
11/* Event::McParticleRefVec trackVec;
12
13 trackVec.clear();
14
15 if (m_primary->statusFlags() & Event::McParticle::POSHIT) trackVec.push_back(m_primary);
16
17 Event::McParticleRefVec::const_iterator refIter;
18
19 for(refIter = m_secondaries.begin(); refIter != m_secondaries.end(); refIter++) trackVec.push_back(*refIter);
20 for(refIter = m_associated.begin(); refIter != m_associated.end(); refIter++) trackVec.push_back(*refIter);
21
22 return trackVec;
23*/
24}

◆ setClassificationBits()

void Event::McPrimaryParticle::setClassificationBits ( const unsigned long  bits)
inline

Definition at line 84 of file McPrimaryParticle.h.

84{m_classification |= bits;}

◆ setPrimaryParticle()

void Event::McPrimaryParticle::setPrimaryParticle ( const Event::McParticleRef  mcPart)
inline

For building.

Definition at line 81 of file McPrimaryParticle.h.

81{m_primary = mcPart;}

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