CGEM BOSS 6.6.5.h
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 void SetMomentum (G4ThreeVector xyz) { m_p3 = xyz;}
50 void SetFlightLength (G4double len) { m_flightLength = len;}
51 void SetPDGCode (G4int code) { m_pdg_code = code;}
52 void SetIsSecondary (G4int isSec) { m_isSecondary = isSec;}
53 void SetCreatorProcess(G4String proName) {m_creatorProcess=proName;};
54 void SetDigiId (G4int id) { m_digiId = id; }
55
56 G4int GetTrackID() { return trackID; };
57 G4int GetLayerNo() { return layerNo; };
58 G4int GetCellNo() { return cellNo;};
59 G4double GetEdep() { return edep; };
60 G4ThreeVector GetPos() { return pos; };
61 G4double GetDriftD() { return driftD;};
62 G4double GetDriftT() { return driftT;};
63 G4double GetGlobalT() { return globalT;};
64 G4double GetTheta() { return theta;};
65 G4double GetEnterAngle() { return enterAngle;};
66 G4int GetPosFlag() { return posFlag;};
67 G4ThreeVector GetMomentum() { return m_p3;}
68 G4double GetFlightLength() { return m_flightLength;}
69 G4int GetPDGCode() { return m_pdg_code;}
70 G4int GetIsSecondary() { return m_isSecondary;}
71 G4String GetCreatorProcess() { return m_creatorProcess;}
72 G4int GetDigiId() { return m_digiId;}
73
74private:
75 G4int trackID;
76 G4int layerNo;
77 G4int cellNo;
78 G4double edep;
79 G4ThreeVector pos;
80 G4double driftD;
81 G4double driftT;
82 G4double globalT;
83 G4double theta;
84 G4double enterAngle;
85 G4int posFlag;// left or right
86
87 G4ThreeVector m_p3;
88 G4double m_flightLength;
89 G4int m_pdg_code; /* PDG code of the track particle */
90 G4int m_isSecondary; /* if the hit from the track index directly */
91 G4String m_creatorProcess; /* Name of the generation process */
92 G4int m_digiId; // positive: T & Q, negative: only Q
93};
94
95//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
96
97typedef G4THitsCollection<BesMdcHit> BesMdcHitsCollection;
98
99extern G4Allocator<BesMdcHit> BesMdcHitAllocator;
100
101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102
103inline void* BesMdcHit::operator new(size_t)
104{
105 void *aHit;
106 aHit = (void *) BesMdcHitAllocator.MallocSingle();
107 return aHit;
108}
109
110//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111
112inline void BesMdcHit::operator delete(void *aHit)
113{
114 BesMdcHitAllocator.FreeSingle((BesMdcHit*) aHit);
115}
116
117//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118
119#endif
120
121
G4Allocator< BesMdcHit > BesMdcHitAllocator
Definition BesMdcHit.cc:18
G4THitsCollection< BesMdcHit > BesMdcHitsCollection
Definition BesMdcHit.hh:97
Double_t time
G4double GetEdep()
Definition BesMdcHit.hh:59
G4double GetTheta()
Definition BesMdcHit.hh:64
void SetEdep(G4double de)
Definition BesMdcHit.hh:41
void SetDigiId(G4int id)
Definition BesMdcHit.hh:54
G4int GetTrackID()
Definition BesMdcHit.hh:56
void SetPDGCode(G4int code)
Definition BesMdcHit.hh:51
G4String GetCreatorProcess()
Definition BesMdcHit.hh:71
void SetDriftT(G4double time)
Definition BesMdcHit.hh:44
void Print()
Definition BesMdcHit.cc:102
G4int GetPosFlag()
Definition BesMdcHit.hh:66
G4double GetGlobalT()
Definition BesMdcHit.hh:63
void Draw()
Definition BesMdcHit.cc:85
void SetEnterAngle(G4double angle)
Definition BesMdcHit.hh:47
void SetIsSecondary(G4int isSec)
Definition BesMdcHit.hh:52
void SetCellNo(G4int cell)
Definition BesMdcHit.hh:40
void SetCreatorProcess(G4String proName)
Definition BesMdcHit.hh:53
G4double GetEnterAngle()
Definition BesMdcHit.hh:65
G4int GetPDGCode()
Definition BesMdcHit.hh:69
void SetPos(G4ThreeVector xyz)
Definition BesMdcHit.hh:42
void SetTrackID(G4int track)
Definition BesMdcHit.hh:38
int operator==(const BesMdcHit &) const
Definition BesMdcHit.cc:78
void SetLayerNo(G4int layer)
Definition BesMdcHit.hh:39
void SetTheta(G4double angle)
Definition BesMdcHit.hh:46
G4int GetLayerNo()
Definition BesMdcHit.hh:57
void SetDriftD(G4double distance)
Definition BesMdcHit.hh:43
G4ThreeVector GetMomentum()
Definition BesMdcHit.hh:67
void SetMomentum(G4ThreeVector xyz)
Definition BesMdcHit.hh:49
G4int GetIsSecondary()
Definition BesMdcHit.hh:70
void SetGlobalT(G4double time)
Definition BesMdcHit.hh:45
void SetPosFlag(G4int flag)
Definition BesMdcHit.hh:48
G4double GetFlightLength()
Definition BesMdcHit.hh:68
G4double GetDriftD()
Definition BesMdcHit.hh:61
void SetFlightLength(G4double len)
Definition BesMdcHit.hh:50
G4double GetDriftT()
Definition BesMdcHit.hh:62
G4ThreeVector GetPos()
Definition BesMdcHit.hh:60
const BesMdcHit & operator=(const BesMdcHit &)
Definition BesMdcHit.cc:54
G4int GetCellNo()
Definition BesMdcHit.hh:58
G4int GetDigiId()
Definition BesMdcHit.hh:72