BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
BesMdcHit.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------//
4//Description: Track type hit class for BESIII MDC
5//Author: Yuan Ye([email protected])
6//Created: 4 Dec, 2003
7//Modified:
8//Comment:
9//---------------------------------------------------------------------------//
10
11#ifndef BesMdcHit_h
12#define BesMdcHit_h 1
13
14#include "G4VHit.hh"
15#include "G4THitsCollection.hh"
16#include "G4Allocator.hh"
17#include "G4ThreeVector.hh"
18
19//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
20
21class BesMdcHit : public G4VHit
22{
23public:
24
25 BesMdcHit();
26 ~BesMdcHit();
27 BesMdcHit(const BesMdcHit&);
28 const BesMdcHit& operator=(const BesMdcHit&);
29 int operator==(const BesMdcHit&) const;
30
31 inline void* operator new(size_t);
32 inline void operator delete(void*);
33
34 void Draw();
35 void Print();
36
37public:
38 void SetTrackID (G4int track) { trackID = track; };
39 void SetLayerNo (G4int layer) { layerNo = layer; };
40 void SetCellNo (G4int cell) { cellNo =cell;};
41 void SetEdep (G4double de) { edep = de; };
42 void SetPos (G4ThreeVector xyz){ pos = xyz; };
43 void SetDriftD (G4double distance){ driftD = distance;};
44 void SetDriftT (G4double time) { driftT = time;};
45 void SetGlobalT (G4double time) { globalT = time;};
46 void SetTheta (G4double angle) { theta = angle;};
47 void SetEnterAngle (G4double angle) { enterAngle = angle;};
48 void SetPosFlag (G4int flag) { posFlag = flag;};
49
50 G4int GetTrackID() { return trackID; };
51 G4int GetLayerNo() { return layerNo; };
52 G4int GetCellNo() { return cellNo;};
53 G4double GetEdep() { return edep; };
54 G4ThreeVector GetPos() { return pos; };
55 G4double GetDriftD() { return driftD;};
56 G4double GetDriftT() { return driftT;};
57 G4double GetGlobalT() { return globalT;};
58 G4double GetTheta() { return theta;};
59 G4double GetEnterAngle() { return enterAngle;};
60 G4int GetPosFlag() { return posFlag;};
61
62private:
63 G4int trackID;
64 G4int layerNo;
65 G4int cellNo;
66 G4double edep;
67 G4ThreeVector pos;
68 G4double driftD;
69 G4double driftT;
70 G4double globalT;
71 G4double theta;
72 G4double enterAngle;
73 G4int posFlag;
74};
75
76//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
77
78typedef G4THitsCollection<BesMdcHit> BesMdcHitsCollection;
79
80extern G4Allocator<BesMdcHit> BesMdcHitAllocator;
81
82//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83
84inline void* BesMdcHit::operator new(size_t)
85{
86 void *aHit;
87 aHit = (void *) BesMdcHitAllocator.MallocSingle();
88 return aHit;
89}
90
91//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92
93inline void BesMdcHit::operator delete(void *aHit)
94{
95 BesMdcHitAllocator.FreeSingle((BesMdcHit*) aHit);
96}
97
98//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99
100#endif
101
102
G4Allocator< BesMdcHit > BesMdcHitAllocator
Definition: BesMdcHit.cc:18
G4THitsCollection< BesMdcHit > BesMdcHitsCollection
Definition: BesMdcHit.hh:78
G4double GetEdep()
Definition: BesMdcHit.hh:53
G4double GetTheta()
Definition: BesMdcHit.hh:58
void SetEdep(G4double de)
Definition: BesMdcHit.hh:41
G4int GetTrackID()
Definition: BesMdcHit.hh:50
void SetDriftT(G4double time)
Definition: BesMdcHit.hh:44
void Print()
Definition: BesMdcHit.cc:90
G4int GetPosFlag()
Definition: BesMdcHit.hh:60
G4double GetGlobalT()
Definition: BesMdcHit.hh:57
void Draw()
Definition: BesMdcHit.cc:73
void SetEnterAngle(G4double angle)
Definition: BesMdcHit.hh:47
void SetCellNo(G4int cell)
Definition: BesMdcHit.hh:40
~BesMdcHit()
Definition: BesMdcHit.cc:26
G4double GetEnterAngle()
Definition: BesMdcHit.hh:59
void SetPos(G4ThreeVector xyz)
Definition: BesMdcHit.hh:42
void SetTrackID(G4int track)
Definition: BesMdcHit.hh:38
int operator==(const BesMdcHit &) const
Definition: BesMdcHit.cc:66
void SetLayerNo(G4int layer)
Definition: BesMdcHit.hh:39
void SetTheta(G4double angle)
Definition: BesMdcHit.hh:46
G4int GetLayerNo()
Definition: BesMdcHit.hh:51
void SetDriftD(G4double distance)
Definition: BesMdcHit.hh:43
void SetGlobalT(G4double time)
Definition: BesMdcHit.hh:45
void SetPosFlag(G4int flag)
Definition: BesMdcHit.hh:48
G4double GetDriftD()
Definition: BesMdcHit.hh:55
G4double GetDriftT()
Definition: BesMdcHit.hh:56
G4ThreeVector GetPos()
Definition: BesMdcHit.hh:54
const BesMdcHit & operator=(const BesMdcHit &)
Definition: BesMdcHit.cc:48
G4int GetCellNo()
Definition: BesMdcHit.hh:52