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 
46  virtual ~FastTimerSD();
47 
48  virtual bool ProcessHits(G4Step *,G4TouchableHistory *);
49  virtual uint32_t setDetUnitId(G4Step*);
50 
51  virtual void Initialize(G4HCofThisEvent * HCE);
52  virtual void EndOfEvent(G4HCofThisEvent * eventHC);
53  virtual void clear();
54  virtual void DrawAll();
55  virtual void PrintAll();
56 
57  virtual double getEnergyDeposit(G4Step* step);
59 
60  std::vector<std::string> getNames();
61 
62 private:
63  virtual void update(const BeginOfJob *);
64  virtual void update(const BeginOfRun *);
65  virtual void update(const BeginOfEvent *);
66  virtual void update(const ::EndOfEvent *);
67  virtual void clearHits();
68 
69 private:
70 
71  G4ThreeVector SetToLocal(const G4ThreeVector& global);
72  G4ThreeVector SetToLocalExit(const G4ThreeVector& globalPoint);
73  void GetStepInfo(G4Step* aStep);
74  G4bool HitExists();
75  void CreateNewHit();
76  void UpdateHit();
77  void StoreHit(BscG4Hit*);
78  void ResetForNewPrimary();
79  void Summarize();
80  std::vector<double> getDDDArray(const std::string &, const DDsvalues_type &);
81 
82 private:
83 
86  int type_;
87 
88  G4ThreeVector entrancePoint, exitPoint;
89  G4ThreeVector theEntryPoint, theExitPoint;
90 
92  G4int primID ;
93 
95  G4int hcID;
98 
99  G4int tsID;
101  G4Track* theTrack;
102  G4VPhysicalVolume* currentPV;
105  G4double tSlice;
106 
107  G4StepPoint* preStepPoint;
108  G4StepPoint* postStepPoint;
109  float edeposit;
110 
111  G4ThreeVector hitPoint;
112  G4ThreeVector hitPointExit;
113  G4ThreeVector hitPointLocal;
114  G4ThreeVector hitPointLocalExit;
115 
116  float Pabs, Tof, Eloss;
117  short ParticleType;
119 
120  int ParentId;
121  float Vx,Vy,Vz;
122  float X,Y,Z;
123 
124  int eventno;
125 
126 protected:
127 
129  G4int emPDG;
130  G4int epPDG;
131  G4int gammaPDG;
132 };
133 
134 #endif
135 
136 
137 
138 
std::string name
Definition: FastTimerSD.h:94
G4ThreeVector hitPoint
Definition: FastTimerSD.h:111
G4ThreeVector hitPointExit
Definition: FastTimerSD.h:112
virtual void clear()
Definition: FastTimerSD.cc:386
G4ThreeVector SetToLocalExit(const G4ThreeVector &globalPoint)
Definition: FastTimerSD.cc:348
float edepositHAD
Definition: FastTimerSD.h:128
G4ThreeVector theEntryPoint
Definition: FastTimerSD.h:89
G4int tSliceID
Definition: FastTimerSD.h:104
virtual void Initialize(G4HCofThisEvent *HCE)
Definition: FastTimerSD.cc:102
virtual double getEnergyDeposit(G4Step *step)
Definition: FastTimerSD.cc:98
void UpdateHit()
Definition: FastTimerSD.cc:320
BscG4Hit * currentHit
Definition: FastTimerSD.h:100
uint32_t unitID
Definition: FastTimerSD.h:103
float edeposit
Definition: FastTimerSD.h:109
short ParticleType
Definition: FastTimerSD.h:117
virtual void update(const BeginOfJob *)
This routine will be called when the appropriate signal arrives.
Definition: FastTimerSD.cc:401
type of data representation of DDCompactView
Definition: DDCompactView.h:90
G4int tsID
Definition: FastTimerSD.h:99
const FastTimeDDDConstants * ftcons
Definition: FastTimerSD.h:85
G4ThreeVector SetToLocal(const G4ThreeVector &global)
Definition: FastTimerSD.cc:340
virtual void PrintAll()
Definition: FastTimerSD.cc:390
G4bool HitExists()
Definition: FastTimerSD.cc:205
TrackingSlaveSD * slave
Definition: FastTimerSD.h:84
G4int gammaPDG
Definition: FastTimerSD.h:131
G4int primID
Definition: FastTimerSD.h:92
virtual ~FastTimerSD()
Definition: FastTimerSD.cc:94
FastTimerSD(std::string, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: FastTimerSD.cc:40
G4StepPoint * postStepPoint
Definition: FastTimerSD.h:108
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:97
G4ThreeVector hitPointLocalExit
Definition: FastTimerSD.h:114
G4VPhysicalVolume * currentPV
Definition: FastTimerSD.h:102
void ResetForNewPrimary()
Definition: FastTimerSD.cc:245
void StoreHit(BscG4Hit *)
Definition: FastTimerSD.cc:252
virtual void DrawAll()
Definition: FastTimerSD.cc:388
G4ThreeVector hitPointLocal
Definition: FastTimerSD.h:113
G4Track * theTrack
Definition: FastTimerSD.h:101
float incidentEnergy
Definition: FastTimerSD.h:91
BscG4HitCollection * theHC
Definition: FastTimerSD.h:96
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
Definition: FastTimerSD.cc:117
std::vector< std::string > getNames()
Definition: FastTimerSD.cc:441
G4StepPoint * preStepPoint
Definition: FastTimerSD.h:107
void fillHits(edm::PSimHitContainer &, std::string use)
Definition: FastTimerSD.cc:397
G4ThreeVector entrancePoint
Definition: FastTimerSD.h:88
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: FastTimerSD.cc:447
G4ThreeVector theExitPoint
Definition: FastTimerSD.h:89
uint32_t previousUnitID
Definition: FastTimerSD.h:103
float PhiAtEntry
Definition: FastTimerSD.h:118
float edepositEM
Definition: FastTimerSD.h:128
G4double tSlice
Definition: FastTimerSD.h:105
virtual uint32_t setDetUnitId(G4Step *)
Definition: FastTimerSD.cc:184
std::vector< PSimHit > PSimHitContainer
step
G4THitsCollection< BscG4Hit > BscG4HitCollection
float ThetaAtEntry
Definition: FastTimerSD.h:118
void Summarize()
Definition: FastTimerSD.cc:384
virtual void EndOfEvent(G4HCofThisEvent *eventHC)
Definition: FastTimerSD.cc:356
G4int hcID
Definition: FastTimerSD.h:95
G4ThreeVector exitPoint
Definition: FastTimerSD.h:88
virtual void clearHits()
Definition: FastTimerSD.cc:437
void CreateNewHit()
Definition: FastTimerSD.cc:263
G4int primaryID
Definition: FastTimerSD.h:104
void GetStepInfo(G4Step *aStep)
Definition: FastTimerSD.cc:134