Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCDG4LumHit.hh

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // $Id: LCDG4LumHit.hh,v 1.9 2004/02/02 22:12:48 uid561 Exp $
00003 // ----------------------------------------------------------------------------
00004 
00005 #ifndef LCDG4LumHit_h
00006 #define LCDG4LumHit_h 1
00007 
00008 #include "G4VHit.hh"
00009 #include "G4THitsCollection.hh"
00010 #include "G4Allocator.hh"
00011 #include "G4ThreeVector.hh"
00012 #include "G4LogicalVolume.hh"
00013 #include <vector>
00014 
00015 class LCDG4LumHit : public G4VHit {
00016 
00017 public:
00018   LCDG4LumHit();
00019   ~LCDG4LumHit();
00020   LCDG4LumHit(const LCDG4LumHit &right);
00021   const LCDG4LumHit& operator=(const LCDG4LumHit &right);
00022   bool operator==(const LCDG4LumHit &right) const;
00023 
00024   inline void *operator new(size_t);
00025   inline void operator delete(void *aHit);
00026 
00027   void Draw();
00028   void Print();
00029 
00030 public:
00031   inline void SetLayer(const G4int layer) { m_layer = layer; }
00032   inline G4int GetLayer() { return m_layer; }
00033   inline void SetSystem(const G4int sysNo) { m_sysNo = sysNo; }
00034   inline G4int GetSystem() { return m_sysNo; }
00035   inline void SetBarEnd(const G4int barend) { m_barend = barend; }
00036   inline G4int GetBarEnd() { return m_barend; }
00037   inline void SetPhi(const G4int phi) { m_phi = phi; }
00038   inline G4int GetPhi() { return m_phi; }
00039   inline void SetTheta(const G4int theta) { m_theta = theta; }
00040   inline G4int GetTheta() { return m_theta; }
00041   inline void SetEdep(const G4double de) { m_edep = de; }
00042   inline G4double GetEdep() { return m_edep; }
00043   inline void SetEdepAbs(const G4double de) { m_edepabs = de; }
00044   inline G4double GetEdepAbs() { return m_edepabs; }
00045 
00046   inline void SetPos(const G4ThreeVector& xyz) { m_pos = xyz; }
00047   inline G4ThreeVector GetPos() { return m_pos; }
00048 
00049   inline G4int GetNMC() {return m_nmc;}
00050   inline G4int GetTrkID(G4int idx) {return (*m_trkid)[idx];}
00051   inline G4double GetEMC(G4int idx) {return (*m_emc)[idx];}
00052 
00053 public:
00054   G4int AddLayerLog(G4LogicalVolume* g4vxdlog, G4int startlayerNo);
00055   G4int AddMcPart(G4int mcidx, G4double emc);
00056   void  AddMcPartAbs(G4double emc) { m_edepabs += emc; } // Absorber
00057 
00058 private:
00059   G4int    m_layer;
00060   G4int    m_sysNo;
00061   G4int    m_barend;
00062   G4int    m_phi;
00063   G4int    m_theta;
00064 
00065   G4float  m_edep;
00066   G4float  m_edepabs;
00067   G4ThreeVector m_pos;
00068 
00069   G4int    m_nmc;
00070   std::vector<G4int>    *m_trkid;
00071   std::vector<G4double> *m_emc;
00072 };
00073 
00074 typedef G4THitsCollection<LCDG4LumHit> LCDG4LumHitsCollection;
00075 
00076 extern G4Allocator<LCDG4LumHit> LCDG4LumHitAllocator;
00077 
00078 inline void* LCDG4LumHit::operator new(size_t) {
00079   void *aHit;
00080   aHit = (void *) LCDG4LumHitAllocator.MallocSingle();
00081   return aHit;
00082 }
00083 
00084 inline void LCDG4LumHit::operator delete(void *aHit) {
00085   LCDG4LumHitAllocator.FreeSingle((LCDG4LumHit*) aHit);
00086 }
00087 
00088 #endif

Generated on Thu Oct 7 18:44:46 2004 for LCDG4 by doxygen 1.3.4