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

Go to the documentation of this file.
00001 #ifndef EmcMcHit_H
00002 #define EmcMcHit_H 
00003 #include <algorithm>
00004 #include "GaudiKernel/ContainedObject.h"
00005 #include "Identifier/Identifier.h"
00006 #include "GaudiKernel/ObjectVector.h"
00007 #include "EventModel/EventModel.h"
00008 #include <map>
00009 
00010 using namespace EventModel;
00011 extern const CLID& CLID_EmcMcHit;
00012 
00013 namespace Event {  // NameSpace
00014 
00015 class EmcMcHit : virtual public ContainedObject { 
00016 public:
00017    virtual const CLID& clID() const 
00018    {
00019         return EmcMcHit::classID();
00020    }
00021                    
00022    static const CLID& classID()
00023     {
00024         return CLID_EmcMcHit;
00025     }  
00026   // Constructor
00027   EmcMcHit(){};
00028   EmcMcHit(const Identifier& id, unsigned int trackIndex, double xPosition,
00029       double yPosition, double zPosition,   double px, double py,
00030       double pz, double depositEnergy);
00031 
00032 //Get
00033   // Get associated id
00034   Identifier identify() const;
00035 
00036   // Get the associated track id 
00037   unsigned int getTrackIndex() const;
00038 
00039   // Whether hit Emc
00040   int getHitEmc() const;
00041 
00042   // Get PDG code
00043   int getPDGCode() const;
00044 
00045   // Get PDG charge
00046   double getPDGCharge() const;
00047   
00048   // Get time
00049   double getTime() const;
00050   
00051   // Get the position x 
00052   double getPositionX() const;
00053 
00054   // Get the position y 
00055   double getPositionY() const;
00056 
00057   // Get the position z 
00058   double getPositionZ() const;
00059 
00060   // Get momentum Px 
00061   double getPx() const;
00062 
00063   // Get momentum Py  
00064   double getPy() const;
00065 
00066   // Get momentum Pz  
00067   double getPz() const;
00068   
00069   // Get the total deposited energy 
00070   double getDepositEnergy() const;
00071 
00072 //Set
00073   void setIdentifier(Identifier& id) {m_id = id ;}
00074   void setHitEmc(int is) { m_hitEmc=is; }
00075   void setPDGCode(int code) { m_PDGCode=code; }
00076   void setPDGCharge(double charge) { m_PDGCharge = charge; }
00077   void setTime(double time) { m_time=time; }
00078   void setTrackIndex(unsigned int trackIndex){ m_trackIndex = trackIndex;}
00079   void setPositionX(double positionX) {m_xPosition = positionX;}
00080   void setPositionY(double positionY) {m_yPosition = positionY;}
00081   void setPositionZ(double positionZ) {m_zPosition = positionZ;}
00082   void setPx(double px) {m_px = px;}
00083   void setPy(double py) {m_py = py;}
00084   void setPz(double pz) {m_pz = pz;}
00085   void setDepositEnergy(double depositEnergy) {m_depositEnergy = depositEnergy;}
00086   
00087 //About hit map
00088   std::map<Identifier,double>::const_iterator begin() const;
00089   std::map<Identifier,double>::const_iterator end() const;
00090   std::map<Identifier,double>::const_iterator find(Identifier&) const;
00091 
00092   unsigned int size() const;
00093   std::map<Identifier,double> getHitMap() const;
00094   void setHitMap(std::map<Identifier,double>& hitMap) { m_hitMap=hitMap; }
00095 
00096 private:
00097   EmcMcHit(const EmcMcHit &);
00098 
00099   EmcMcHit &operator=(const EmcMcHit &);
00100 
00101   // const Identifier m_id;  //2005/12/29 wensp modified
00102 
00103   Identifier m_id; 
00104 
00105   unsigned int m_trackIndex;
00106   //whether hit Emc
00107   int m_hitEmc;
00108   //particle ID
00109   int m_PDGCode;
00110   //particle charge;
00111   double m_PDGCharge;
00112   //hit crystal time or dead time
00113   double m_time;
00114   
00115   double m_xPosition;
00116 
00117   double m_yPosition;
00118 
00119   double m_zPosition;
00120 
00121   double m_px;
00122   
00123   double m_py;
00124 
00125   double m_pz;
00126 
00127   double m_depositEnergy;
00128 
00129   std::map<Identifier,double> m_hitMap;
00130 };
00131 
00132 typedef ObjectVector<EmcMcHit> EmcMcHitCol;
00133 
00134 } // NameSpace Event
00135 
00136 #endif 

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