BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
BesTofHit.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------//
4//Description:
5//Author: Dengzy
6//Created: Mar, 2004
7//Modified:
8//Comment:
9//---------------------------------------------------------------------------//
10// $Id: BesTofHit.hh
11
12#ifndef BesTofHit_h
13#define BesTofHit_h 1
14
15#include "G4VHit.hh"
16#include "G4THitsCollection.hh"
17#include "G4Allocator.hh"
18#include "G4ThreeVector.hh"
19#include "G4Material.hh"
20
21
22class BesTofHit : public G4VHit
23{
24 public:
25 BesTofHit();
26 virtual ~BesTofHit();
27
28 BesTofHit(const BesTofHit&);
29 const BesTofHit& operator=(const BesTofHit&);
30
31 void AddHit(const BesTofHit&);
32
33 virtual G4int operator==(const BesTofHit&) const;
34 inline void* operator new(size_t);
35 inline void operator delete(void*);
36
37 virtual void Draw();
38 virtual void Print();
39
40 public:
41 void SetEvent(G4double event) {m_event = event; };
42 G4double GetEvent() {return m_event; }
43 void SetTrackIndex(G4int trackIndex) { m_trackIndex = trackIndex; };
44 void SetG4Index(G4int index) {m_g4Index = index;}
45 void SetPartId(G4int partId) {m_partId = partId;}
46 void SetScinNb(G4int scinNb) { m_scinNb = scinNb; }
47 void SetEdep(G4double edep) { m_edep = edep; }
48 void SetStepL(G4double stepL) { m_stepL = stepL;}
49 void SetTrackL(G4double length) { m_trackL = length; }
50 void SetPos(G4ThreeVector pos) { m_pos = pos; }
51 void SetTime(G4double time) { m_time=time;}
52 void SetDeltaT(G4double deltaT) { m_deltaT = deltaT;}
53 void SetPDirection(G4ThreeVector pDirection) { m_pDirection = pDirection; }
54 void SetMomentum(G4ThreeVector momentum) { m_momentum = momentum; }
55 //void SetPName(G4String pName) { m_pName = pName; }
56 //void SetMaterial(G4Material* myMaterial){m_scinMaterial = myMaterial;}
57 void SetCharge(G4double charge) {m_charge = charge;}
58 void SetPDGcode(G4int pdgcode){m_pdgcode=pdgcode;}
59 // ETF(MRPC)
60 void SetModule( G4int module ) { m_scinNb = module; }
61 void SetStrip( G4int strip ) { m_strip = strip; }
62 void SetIons( G4int ions ) { m_number_of_ions=ions; }
63 void SetLocPos( G4ThreeVector locPos ) { m_locPos = locPos; }
64 void SetGapNb(G4int gapNb) { m_gapNb = gapNb; }
65
66 G4int GetTrackIndex() { return m_trackIndex; }
67 G4int GetG4Index() {return m_g4Index;}
68 G4int GetPartId() { return m_partId; }
69 G4int GetScinNb() { return m_scinNb; }
70 G4double GetEdep() { return m_edep; }
71 G4double GetStepL() { return m_stepL; }
72 G4double GetTrackL() {return m_trackL; }
73 G4ThreeVector GetPos() { return m_pos; }
74 G4double GetTime() { return m_time;}
75 G4double GetDeltaT() {return m_deltaT;}
76 G4ThreeVector GetPDirection() {return m_pDirection;}
77 G4ThreeVector GetMomentum() {return m_momentum;}
78 //G4String GetPName() {return m_pName; }
79 //G4Material* GetMaterial() {return m_scinMaterial; }
80 G4double GetCharge() {return m_charge; }
81 G4int GetPDGcode(){return m_pdgcode;}
82 // ETF(MRPC)
83 G4int GetModule() {return m_scinNb; }
84 G4int GetStrip() { return m_strip; }
85 G4int GetIons() { return m_number_of_ions; }
86 G4ThreeVector GetLocPos() { return m_locPos; }
87 G4int GetGapNb() { return m_gapNb; }
88
89 inline void AddEdep( G4double de ) { m_edep += de; }
90
91 private:
92 G4double m_event;
93 G4int m_trackIndex;
94 G4int m_g4Index;
95 G4int m_partId;
96 G4int m_scinNb;
97 G4int m_gapNb;
98 G4double m_edep;
99 G4double m_stepL;
100 G4double m_trackL;
101 G4ThreeVector m_pos;
102 G4double m_time;
103 G4double m_deltaT;
104 G4ThreeVector m_pDirection;
105 G4ThreeVector m_momentum;
106 //G4String m_pName;
107 //G4Material* m_scinMaterial;
108 G4double m_charge;
109 G4int m_number_of_ions;
110 G4int m_pdgcode;
111 G4int m_strip;
112 G4ThreeVector m_locPos;
113};
114
115
116typedef G4THitsCollection<BesTofHit> BesTofHitsCollection;
117
118extern G4Allocator<BesTofHit> BesTofHitAllocator;
119
120
121inline void* BesTofHit::operator new(size_t) {
122 void *aHit;
123 aHit = (void *) BesTofHitAllocator.MallocSingle();
124 return aHit;
125}
126
127
128inline void BesTofHit::operator delete(void *aHit) {
129 BesTofHitAllocator.FreeSingle((BesTofHit*) aHit);
130}
131
132#endif
133
134
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER jdahep COMMON hepevt $ !serial number $ !number of particles $ !status code $ !particle ident KF $ !parent particles $ !childreen particles $ !four momentum
G4THitsCollection< BesTofHit > BesTofHitsCollection
Definition BesTofHit.hh:116
G4Allocator< BesTofHit > BesTofHitAllocator
Definition BesTofHit.cc:20
Double_t time
void SetEvent(G4double event)
Definition BesTofHit.hh:41
G4double GetEvent()
Definition BesTofHit.hh:42
G4double GetDeltaT()
Definition BesTofHit.hh:75
void AddEdep(G4double de)
Definition BesTofHit.hh:89
void SetModule(G4int module)
Definition BesTofHit.hh:60
void SetPos(G4ThreeVector pos)
Definition BesTofHit.hh:50
G4ThreeVector GetPDirection()
Definition BesTofHit.hh:76
void SetDeltaT(G4double deltaT)
Definition BesTofHit.hh:52
void SetCharge(G4double charge)
Definition BesTofHit.hh:57
void SetPDGcode(G4int pdgcode)
Definition BesTofHit.hh:58
G4ThreeVector GetLocPos()
Definition BesTofHit.hh:86
G4int GetIons()
Definition BesTofHit.hh:85
virtual G4int operator==(const BesTofHit &) const
Definition BesTofHit.cc:76
void SetTrackIndex(G4int trackIndex)
Definition BesTofHit.hh:43
G4int GetPDGcode()
Definition BesTofHit.hh:81
void SetPDirection(G4ThreeVector pDirection)
Definition BesTofHit.hh:53
G4double GetStepL()
Definition BesTofHit.hh:71
G4double GetCharge()
Definition BesTofHit.hh:80
G4int GetStrip()
Definition BesTofHit.hh:84
virtual void Print()
Definition BesTofHit.cc:107
G4double GetTime()
Definition BesTofHit.hh:74
void SetIons(G4int ions)
Definition BesTofHit.hh:62
G4double GetEdep()
Definition BesTofHit.hh:70
void SetPartId(G4int partId)
Definition BesTofHit.hh:45
void SetLocPos(G4ThreeVector locPos)
Definition BesTofHit.hh:63
virtual ~BesTofHit()
Definition BesTofHit.cc:24
G4ThreeVector GetPos()
Definition BesTofHit.hh:73
const BesTofHit & operator=(const BesTofHit &)
Definition BesTofHit.cc:50
void SetScinNb(G4int scinNb)
Definition BesTofHit.hh:46
G4int GetScinNb()
Definition BesTofHit.hh:69
void SetGapNb(G4int gapNb)
Definition BesTofHit.hh:64
G4int GetPartId()
Definition BesTofHit.hh:68
void SetStrip(G4int strip)
Definition BesTofHit.hh:61
void SetStepL(G4double stepL)
Definition BesTofHit.hh:48
G4double GetTrackL()
Definition BesTofHit.hh:72
G4int GetGapNb()
Definition BesTofHit.hh:87
void SetTrackL(G4double length)
Definition BesTofHit.hh:49
G4int GetG4Index()
Definition BesTofHit.hh:67
virtual void Draw()
Definition BesTofHit.cc:91
void SetTime(G4double time)
Definition BesTofHit.hh:51
void SetEdep(G4double edep)
Definition BesTofHit.hh:47
G4ThreeVector GetMomentum()
Definition BesTofHit.hh:77
void SetMomentum(G4ThreeVector momentum)
Definition BesTofHit.hh:54
G4int GetModule()
Definition BesTofHit.hh:83
void SetG4Index(G4int index)
Definition BesTofHit.hh:44
G4int GetTrackIndex()
Definition BesTofHit.hh:66
void AddHit(const BesTofHit &)
Definition BesTofHit.cc:81
float charge