/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/McTruth/McTruth-00-02-19/McTruth/McPrimaryParticle.h

Go to the documentation of this file.
00001 
00007 #ifndef McPrimaryParticle_h
00008 #define McPrimaryParticle_h
00009 
00010 #include "GaudiKernel/ContainedObject.h"
00011 #include "GaudiKernel/SmartRefVector.h"
00012 #include "McTruth/McParticle.h"
00013 #include "EventModel/EventModel.h"
00014 
00015 using namespace EventModel;
00016 extern const CLID& CLID_McPrimaryParticle;
00017 
00018 
00019 namespace Event {
00020 
00021 typedef SmartRefVector<Event::McParticle> McParticleRefVec; 
00022 typedef SmartRef<Event::McParticle>       McParticleRef;
00023 
00024 class McPrimaryParticle : public ContainedObject
00025 {
00026 public:
00028     enum ClassificationBits{  
00029         NOPRIMARY  = 1 ,    
00030         CHARGED    = 1<<1,  
00031         NEUTRAL    = 1<<2,  
00032         GAMMA      = 1<<3,  
00033         CONVERT    = 1<<4,  
00034         BREM       = 1<<5,  
00035         COMPT      = 1<<6,  
00036         PHOT       = 1<<7,  
00037         OTHER      = 1<<8,  
00038         TRKCONVERT = 1<<12, 
00039         TRKBREM    = 1<<13, 
00040         TRKCOMPT   = 1<<14, 
00041         TRKPHOT    = 1<<15, 
00042         TRKOTHER   = 1<<16, 
00043         RUNBIT     = 1<<24  
00044     };
00045 
00047     McPrimaryParticle() : ContainedObject()
00048     {
00049         m_classification = 0;
00050         m_primary = 0;
00051         m_secondaries.clear();
00052         m_associated.clear();
00053     }
00054 
00055     //McPrimaryParticle(Event::McParticle* mcPart, unsigned long classBits);
00056    ~McPrimaryParticle() {}
00057 
00058     virtual const CLID& clID() const   { return McPrimaryParticle::classID(); }
00059     static const CLID& classID()       { return CLID_McPrimaryParticle; }
00060 
00062     const unsigned long                     getClassificationBits() const {return m_classification;}
00063     
00065     const Event::McParticleRef              getPrimaryParticle()    const {return m_primary;}
00066 
00068     const int                               getNumSecondaries()     const {return m_secondaries.size();}
00069     Event::McParticleRefVec::const_iterator beginSecondaries()      const {return m_secondaries.begin();}
00070     Event::McParticleRefVec::const_iterator endSecondaries()        const {return m_secondaries.end();}
00071 
00073     const int                               getNumAssociated()      const {return m_associated.size();}
00074     Event::McParticleRefVec::const_iterator beginAssociated()       const {return m_associated.begin();}
00075     Event::McParticleRefVec::const_iterator endAssociated()         const {return m_associated.end();}
00076 
00078     inline Event::McParticleRefVec          getTrackVector();
00079 
00081     void setPrimaryParticle(const Event::McParticleRef mcPart) {m_primary = mcPart;}
00082     void addSecondary(const Event::McParticleRef mcPart)       {m_secondaries.push_back(mcPart);}
00083     void addAssociated(const Event::McParticleRef mcPart)      {m_associated.push_back(mcPart);}
00084     void setClassificationBits(const unsigned long bits)       {m_classification |= bits;}
00085 
00086 private:
00088     unsigned long             m_classification;
00089 
00090     Event::McParticleRef      m_primary;
00091     Event::McParticleRefVec   m_secondaries;
00092     Event::McParticleRefVec   m_associated;
00093 
00094 };
00095 
00096 typedef ObjectVector<McPrimaryParticle> McPrimaryParticleCol;
00097 
00098 } // NameSpace Event
00099 
00100 #endif

Generated on Tue Nov 29 22:58:31 2016 for BOSS_7.0.2 by  doxygen 1.4.7