CMS 3D CMS Logo

FastTimerSD.h
Go to the documentation of this file.
1 #ifndef SimG4CMSForward_FastTimerSD_h
2 #define SimG4CMSForward_FastTimerSD_h
3 
7 
12 
16 
17 #include "G4Step.hh"
18 #include "G4StepPoint.hh"
19 #include "G4Track.hh"
20 #include "G4VPhysicalVolume.hh"
21 
22 #include <string>
23 
24 class TrackingSlaveSD;
25 class TrackInformation;
26 class SimTrackManager;
27 class TrackingSlaveSD;
28 class UpdatablePSimHit;
31 
32 //-------------------------------------------------------------------
33 
35  public Observer<const BeginOfJob *>,
36  public Observer<const BeginOfRun *>,
37  public Observer<const BeginOfEvent*>,
38  public Observer<const EndOfEvent*> {
39 
40 public:
41 
43  edm::ParameterSet const &, const SimTrackManager* );
44 
45  ~FastTimerSD() override;
46 
47  bool ProcessHits(G4Step *,G4TouchableHistory *) override;
48  uint32_t setDetUnitId(const G4Step*) override;
49 
50  void Initialize(G4HCofThisEvent * HCE) override;
51  void EndOfEvent(G4HCofThisEvent * eventHC) override;
52  void clear() override;
53  void DrawAll() override;
54  void PrintAll() override;
55 
56  double getEnergyDeposit(const G4Step* step);
57  void fillHits(edm::PSimHitContainer&, const std::string&) override;
58  void clearHits() override;
59 
60 private:
61  void update(const BeginOfJob *) override;
62  void update(const BeginOfRun *) override;
63  void update(const BeginOfEvent *) override;
64  void update(const ::EndOfEvent *) override;
65 
66  G4ThreeVector SetToLocal(const G4ThreeVector& global);
67  G4ThreeVector SetToLocalExit(const G4ThreeVector& globalPoint);
68  void GetStepInfo(G4Step* aStep);
69  G4bool HitExists();
70  void CreateNewHit();
71  void UpdateHit();
72  void StoreHit(BscG4Hit*);
73  void ResetForNewPrimary();
74  void Summarize();
75  std::vector<double> getDDDArray(const std::string &, const DDsvalues_type &);
76 
77 private:
78 
81  int type_;
82 
83  G4ThreeVector entrancePoint, exitPoint;
84  G4ThreeVector theEntryPoint, theExitPoint;
85 
87  G4int primID ;
88 
90  G4int hcID;
93 
94  G4int tsID;
96  G4Track* theTrack;
97  G4VPhysicalVolume* currentPV;
100  G4double tSlice;
101 
102  G4StepPoint* preStepPoint;
103  G4StepPoint* postStepPoint;
104  float edeposit;
105 
106  G4ThreeVector hitPoint;
107  G4ThreeVector hitPointExit;
108  G4ThreeVector hitPointLocal;
109  G4ThreeVector hitPointLocalExit;
110 
111  float Pabs, Tof, Eloss;
112  short ParticleType;
114 
115  int ParentId;
116  float Vx,Vy,Vz;
117  float X,Y,Z;
118 
119  int eventno;
120 
121 protected:
122 
124  G4int emPDG;
125  G4int epPDG;
126  G4int gammaPDG;
127 };
128 
129 #endif
130 
131 
132 
133 
std::string name
Definition: FastTimerSD.h:89
G4ThreeVector hitPoint
Definition: FastTimerSD.h:106
void clear() override
Definition: FastTimerSD.cc:360
G4ThreeVector hitPointExit
Definition: FastTimerSD.h:107
FastTimerSD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: FastTimerSD.cc:40
G4ThreeVector SetToLocalExit(const G4ThreeVector &globalPoint)
Definition: FastTimerSD.cc:322
double getEnergyDeposit(const G4Step *step)
Definition: FastTimerSD.cc:73
float edepositHAD
Definition: FastTimerSD.h:123
G4ThreeVector theEntryPoint
Definition: FastTimerSD.h:84
G4int tSliceID
Definition: FastTimerSD.h:99
void UpdateHit()
Definition: FastTimerSD.cc:294
BscG4Hit * currentHit
Definition: FastTimerSD.h:95
uint32_t unitID
Definition: FastTimerSD.h:98
float edeposit
Definition: FastTimerSD.h:104
short ParticleType
Definition: FastTimerSD.h:112
type of data representation of DDCompactView
Definition: DDCompactView.h:90
void update(const BeginOfJob *) override
This routine will be called when the appropriate signal arrives.
Definition: FastTimerSD.cc:375
G4int tsID
Definition: FastTimerSD.h:94
const FastTimeDDDConstants * ftcons
Definition: FastTimerSD.h:80
G4ThreeVector SetToLocal(const G4ThreeVector &global)
Definition: FastTimerSD.cc:314
G4bool HitExists()
Definition: FastTimerSD.cc:179
TrackingSlaveSD * slave
Definition: FastTimerSD.h:79
G4int gammaPDG
Definition: FastTimerSD.h:126
G4int primID
Definition: FastTimerSD.h:87
void clearHits() override
Definition: FastTimerSD.cc:411
G4StepPoint * postStepPoint
Definition: FastTimerSD.h:103
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:20
const SimTrackManager * theManager
Definition: FastTimerSD.h:92
G4ThreeVector hitPointLocalExit
Definition: FastTimerSD.h:109
G4VPhysicalVolume * currentPV
Definition: FastTimerSD.h:97
void ResetForNewPrimary()
Definition: FastTimerSD.cc:219
void StoreHit(BscG4Hit *)
Definition: FastTimerSD.cc:226
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: FastTimerSD.cc:371
uint32_t setDetUnitId(const G4Step *) override
Definition: FastTimerSD.cc:158
G4ThreeVector hitPointLocal
Definition: FastTimerSD.h:108
G4Track * theTrack
Definition: FastTimerSD.h:96
void DrawAll() override
Definition: FastTimerSD.cc:362
float incidentEnergy
Definition: FastTimerSD.h:86
BscG4HitCollection * theHC
Definition: FastTimerSD.h:91
~FastTimerSD() override
Definition: FastTimerSD.cc:69
G4StepPoint * preStepPoint
Definition: FastTimerSD.h:102
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: FastTimerSD.cc:330
G4ThreeVector entrancePoint
Definition: FastTimerSD.h:83
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: FastTimerSD.cc:415
G4ThreeVector theExitPoint
Definition: FastTimerSD.h:84
uint32_t previousUnitID
Definition: FastTimerSD.h:98
float PhiAtEntry
Definition: FastTimerSD.h:113
float edepositEM
Definition: FastTimerSD.h:123
G4double tSlice
Definition: FastTimerSD.h:100
std::vector< PSimHit > PSimHitContainer
step
G4THitsCollection< BscG4Hit > BscG4HitCollection
float ThetaAtEntry
Definition: FastTimerSD.h:113
void Summarize()
Definition: FastTimerSD.cc:358
G4int hcID
Definition: FastTimerSD.h:90
G4ThreeVector exitPoint
Definition: FastTimerSD.h:83
void Initialize(G4HCofThisEvent *HCE) override
Definition: FastTimerSD.cc:77
void CreateNewHit()
Definition: FastTimerSD.cc:237
G4int primaryID
Definition: FastTimerSD.h:99
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: FastTimerSD.cc:91
void GetStepInfo(G4Step *aStep)
Definition: FastTimerSD.cc:108
void PrintAll() override
Definition: FastTimerSD.cc:364