/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Simulation/BOOST/TofSim/TofSim-00-02-33/TofSim/BesTofHit.hh

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------//
00002 //      BOOST --- BESIII Object_Oriented Simulation Tool                     //
00003 //---------------------------------------------------------------------------//
00004 //Description:
00005 //Author: Dengzy
00006 //Created: Mar, 2004
00007 //Modified:
00008 //Comment:
00009 //---------------------------------------------------------------------------//
00010 // $Id: BesTofHit.hh
00011 
00012 #ifndef BesTofHit_h
00013 #define BesTofHit_h 1
00014 
00015 #include "G4VHit.hh"
00016 #include "G4THitsCollection.hh"
00017 #include "G4Allocator.hh"
00018 #include "G4ThreeVector.hh"
00019 #include "G4Material.hh"
00020 
00021 
00022 class BesTofHit : public G4VHit
00023 {
00024   public:
00025     BesTofHit();
00026     virtual ~BesTofHit();
00027     
00028     BesTofHit(const BesTofHit&);
00029     const BesTofHit& operator=(const BesTofHit&);
00030    
00031     void AddHit(const BesTofHit&);
00032 
00033     virtual G4int operator==(const BesTofHit&) const;
00034     inline void* operator new(size_t);
00035     inline void  operator delete(void*);
00036 
00037     virtual void Draw();        
00038     virtual void Print();
00039 
00040   public:
00041     void SetEvent(G4double event) {m_event = event; };
00042     G4double GetEvent() {return m_event; }
00043     void SetTrackIndex(G4int trackIndex) { m_trackIndex = trackIndex; };
00044     void SetG4Index(G4int index) {m_g4Index = index;}
00045     void SetPartId(G4int partId) {m_partId = partId;}
00046     void SetScinNb(G4int scinNb) { m_scinNb = scinNb; }
00047     void SetEdep(G4double edep) { m_edep = edep; }
00048     void SetStepL(G4double stepL) { m_stepL = stepL;}
00049     void SetTrackL(G4double length) { m_trackL = length; }
00050     void SetPos(G4ThreeVector pos) { m_pos = pos; }
00051     void SetTime(G4double time) { m_time=time;}
00052     void SetDeltaT(G4double deltaT) { m_deltaT = deltaT;}
00053     void SetPDirection(G4ThreeVector pDirection) { m_pDirection = pDirection; }
00054     void SetMomentum(G4ThreeVector momentum) { m_momentum = momentum; }
00055     //void SetPName(G4String pName) { m_pName = pName; }
00056     //void SetMaterial(G4Material* myMaterial){m_scinMaterial = myMaterial;}
00057     void SetCharge(G4double charge) {m_charge = charge;}
00058     void SetPDGcode(G4int pdgcode){m_pdgcode=pdgcode;}
00059     // ETF(MRPC)
00060     void SetModule( G4int module ) { m_scinNb = module; }
00061     void SetStrip( G4int strip ) { m_strip = strip; }
00062     void SetIons( G4int ions ) { m_number_of_ions=ions; }
00063     void SetLocPos( G4ThreeVector locPos ) { m_locPos = locPos; }
00064     void SetGapNb(G4int gapNb) { m_gapNb = gapNb; }
00065 
00066     G4int GetTrackIndex() { return m_trackIndex; }
00067     G4int GetG4Index() {return m_g4Index;}
00068     G4int GetPartId()  { return m_partId; }
00069     G4int GetScinNb() { return m_scinNb; }
00070     G4double GetEdep() { return m_edep; }      
00071     G4double GetStepL() { return m_stepL; }
00072     G4double GetTrackL() {return m_trackL; }
00073     G4ThreeVector GetPos() { return m_pos; }    
00074     G4double GetTime() { return m_time;}
00075     G4double GetDeltaT() {return m_deltaT;}
00076     G4ThreeVector GetPDirection() {return m_pDirection;}
00077     G4ThreeVector GetMomentum() {return m_momentum;}
00078     //G4String GetPName() {return m_pName; }
00079     //G4Material* GetMaterial() {return m_scinMaterial; }
00080     G4double GetCharge() {return m_charge; }
00081     G4int GetPDGcode(){return m_pdgcode;}    
00082     // ETF(MRPC)
00083     G4int GetModule() {return m_scinNb; }
00084     G4int GetStrip() { return m_strip; }
00085     G4int GetIons() { return m_number_of_ions; }
00086     G4ThreeVector GetLocPos() { return m_locPos; }
00087     G4int GetGapNb() { return m_gapNb; }
00088 
00089     inline void AddEdep( G4double de ) { m_edep += de; } 
00090 
00091   private:
00092     G4double m_event;
00093     G4int  m_trackIndex;
00094     G4int m_g4Index;
00095     G4int  m_partId;
00096     G4int  m_scinNb;
00097     G4int  m_gapNb;
00098     G4double  m_edep;
00099     G4double m_stepL;
00100     G4double m_trackL;
00101     G4ThreeVector  m_pos;
00102     G4double  m_time;
00103     G4double m_deltaT;
00104     G4ThreeVector m_pDirection;
00105     G4ThreeVector m_momentum;
00106     //G4String m_pName;
00107     //G4Material* m_scinMaterial;
00108     G4double m_charge;
00109     G4int m_number_of_ions;
00110     G4int m_pdgcode;
00111     G4int m_strip;
00112     G4ThreeVector m_locPos;
00113 };
00114 
00115 
00116 typedef G4THitsCollection<BesTofHit> BesTofHitsCollection;
00117 
00118 extern G4Allocator<BesTofHit> BesTofHitAllocator;
00119 
00120 
00121 inline void* BesTofHit::operator new(size_t) {
00122   void *aHit;
00123   aHit = (void *) BesTofHitAllocator.MallocSingle();
00124   return aHit;
00125 }
00126 
00127 
00128 inline void BesTofHit::operator delete(void *aHit) {
00129   BesTofHitAllocator.FreeSingle((BesTofHit*) aHit);
00130 }
00131 
00132 #endif
00133 
00134 

Generated on Tue Nov 29 23:14:32 2016 for BOSS_7.0.2 by  doxygen 1.4.7