/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Simulation/BOOST/TofSim/TofSim-00-02-33/TofSim/BesTofDigi.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: BesTofDigi.hh
00011 
00012 #ifndef BesTofDigi_h
00013 #define BesTofDigi_h 1
00014 
00015 #include "G4VDigi.hh"
00016 #include "G4TDigiCollection.hh"
00017 #include "G4Allocator.hh"
00018 
00019 class BesTofDigi : public G4VDigi
00020 {
00021   public:
00022     BesTofDigi();
00023     virtual ~BesTofDigi();
00024 
00025     BesTofDigi(const BesTofDigi&);
00026     const BesTofDigi& operator=(const BesTofDigi&);
00027 
00028     virtual G4int operator==(const BesTofDigi&) const;
00029     inline void* operator new(size_t);
00030     inline void  operator delete(void*);
00031 
00032     virtual void Draw();
00033     virtual void Print();
00034 
00035   public:
00036     void SetTrackIndex(G4int index) { m_trackIndex = index; }
00037     void SetPartId(G4int partId)    { m_partId  = partId;   }
00038   // Scintillator
00039     void SetScinNb(G4int scinNb)    { m_scinNb  = scinNb;   }
00040     void SetForwADC(G4double ADC)   { m_forwADC = ADC;      }
00041     void SetBackADC(G4double ADC)   { m_backADC = ADC;      }
00042     void SetForwTDC(G4double TDC)   { m_forwTDC = TDC;      }
00043     void SetBackTDC(G4double TDC)   { m_backTDC = TDC;      }
00044   // MRPC
00045     void SetModule(G4int module)    { m_scinNb  = module;   }
00046     void SetStrip(G4int strip)      { m_strip   = strip;    }
00047     void SetForwT1(G4double t1)     { m_forwTDC = t1;       }
00048     void SetBackT1(G4double t1)     { m_backTDC = t1;       }
00049     void SetForwT2(G4double t2)     { m_forwADC = t2;       }
00050     void SetBackT2(G4double t2)     { m_backADC = t2;       }
00051 
00052     G4int GetTrackIndex()           { return m_trackIndex;  }
00053     G4int GetPartId()               { return m_partId;      }
00054   // Scintillator
00055     G4int GetScinNb()               { return m_scinNb;      }
00056     G4double GetForwADC()           { return m_forwADC;     }
00057     G4double GetBackADC()           { return m_backADC;     }
00058     G4double GetForwTDC()           { return m_forwTDC;     }
00059     G4double GetBackTDC()           { return m_backTDC;     }
00060   // MRPC
00061     G4int GetModule()               { return m_scinNb;      }
00062     G4int GetStrip()                { return m_strip;       }
00063     G4double GetForwT1()            { return m_forwTDC;     }
00064     G4double GetBackT1()            { return m_backTDC;     }
00065     G4double GetForwT2()            { return m_forwADC;     }
00066     G4double GetBackT2()            { return m_backADC;     }
00067 
00068   private:
00069     G4int  m_trackIndex;
00070     G4int  m_partId;
00071     G4int  m_scinNb;
00072     G4int  m_strip;
00073     G4double  m_forwADC;
00074     G4double  m_backADC;
00075     G4double  m_forwTDC;
00076     G4double  m_backTDC;
00077 };
00078 
00079 typedef G4TDigiCollection<BesTofDigi> BesTofDigitsCollection;
00080 
00081 extern G4Allocator<BesTofDigi> BesTofDigiAllocator;
00082 
00083 inline void* BesTofDigi::operator new(size_t)
00084 {
00085   void *aDigi;
00086   aDigi = (void *) BesTofDigiAllocator.MallocSingle();
00087   return aDigi;
00088 }
00089 
00090 inline void BesTofDigi::operator delete(void *aDigi)
00091 {
00092   BesTofDigiAllocator.FreeSingle((BesTofDigi*) aDigi);
00093 }
00094 
00095 #endif
00096 

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