CMS 3D CMS Logo

TotemSD.h
Go to the documentation of this file.
1 #ifndef Forward_TotemSD_h
2 #define Forward_TotemSD_h
3 // -*- C++ -*-
4 //
5 // Package: Forward
6 // Class : TotemSD
7 //
16 //
17 // Original Author:
18 // Created: Tue May 16 10:14:34 CEST 2006
19 //
20 
21 // system include files
22 
23 // user include files
24 
29 
33 
34 #include "G4Step.hh"
35 #include "G4StepPoint.hh"
36 #include "G4Track.hh"
37 
38 #include <string>
39 
40 class TrackingSlaveSD;
41 class SimTrackManager;
42 
44  public Observer<const BeginOfEvent*>,
45  public Observer<const EndOfEvent*> {
46 
47 public:
48 
50  edm::ParameterSet const &, const SimTrackManager*);
51  ~TotemSD() override;
52 
53  bool ProcessHits(G4Step *,G4TouchableHistory *) override;
54  uint32_t setDetUnitId(G4Step*) override;
55 
56  void Initialize(G4HCofThisEvent * HCE) override;
57  void EndOfEvent(G4HCofThisEvent * eventHC) override;
58  void clear() override;
59  void DrawAll() override;
60  void PrintAll() override;
61 
62  void fillHits(edm::PSimHitContainer&, std::string use) override;
63 
64 private:
65 
66  void update(const BeginOfEvent *) override;
67  void update(const ::EndOfEvent *) override;
68  void clearHits() override;
69 
70 private:
71 
72  G4ThreeVector SetToLocal(const G4ThreeVector& globalPoint);
73  void GetStepInfo(G4Step* aStep);
74  bool HitExists();
75  void CreateNewHit();
76  void CreateNewHitEvo();
77  G4ThreeVector PosizioEvo(const G4ThreeVector&,double ,double ,double, double,int&);
78  void UpdateHit();
79  void StoreHit(TotemG4Hit*);
80  void ResetForNewPrimary();
81  void Summarize();
82 
83 private:
84 
87 
88  // Data relative to primary particle (the one which triggers a shower)
89  // These data are common to all Hits of a given shower.
90  // One shower is made of several hits which differ by the
91  // unit ID (cristal/fiber/scintillator) and the Time slice ID.
92 
93  G4ThreeVector entrancePoint;
95  G4int primID ; //@@ ID of the primary particle.
96 
98  G4int hcID;
101 
102  int tsID;
104  G4Track* theTrack;
105  G4VPhysicalVolume* currentPV;
108  double tSlice;
109 
110  G4StepPoint* preStepPoint;
111  G4StepPoint* postStepPoint;
112  float edeposit;
113  G4ThreeVector hitPoint;
114 
115  G4ThreeVector Posizio;
116  float Pabs;
117  float Tof;
118  float Eloss;
119  short ParticleType;
120 
122  float PhiAtEntry;
123 
124  int ParentId;
125  float Vx,Vy,Vz;
126 
127  int eventno;
128 };
129 
130 #endif
int ParentId
Definition: TotemSD.h:124
void Initialize(G4HCofThisEvent *HCE) override
Definition: TotemSD.cc:128
uint32_t unitID
Definition: TotemSD.h:106
float Pabs
Definition: TotemSD.h:116
G4ThreeVector Posizio
Definition: TotemSD.h:115
TotemG4HitCollection * theHC
Definition: TotemSD.h:99
float Tof
Definition: TotemSD.h:117
G4ThreeVector entrancePoint
Definition: TotemSD.h:93
void DrawAll() override
Definition: TotemSD.cc:171
uint32_t setDetUnitId(G4Step *) override
Definition: TotemSD.cc:123
double tSlice
Definition: TotemSD.h:108
int primaryID
Definition: TotemSD.h:107
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: TotemSD.cc:104
uint32_t previousUnitID
Definition: TotemSD.h:106
float incidentEnergy
Definition: TotemSD.h:94
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: TotemSD.cc:183
TotemVDetectorOrganization * numberingScheme
Definition: TotemSD.h:86
G4int hcID
Definition: TotemSD.h:98
int tSliceID
Definition: TotemSD.h:107
TotemSD(std::string, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TotemSD.cc:48
type of data representation of DDCompactView
Definition: DDCompactView.h:90
void ResetForNewPrimary()
Definition: TotemSD.cc:519
G4StepPoint * preStepPoint
Definition: TotemSD.h:110
G4ThreeVector SetToLocal(const G4ThreeVector &globalPoint)
Definition: TotemSD.cc:197
G4ThreeVector PosizioEvo(const G4ThreeVector &, double, double, double, double, int &)
Definition: TotemSD.cc:380
bool HitExists()
Definition: TotemSD.cc:246
float Eloss
Definition: TotemSD.h:118
float edeposit
Definition: TotemSD.h:112
float Vx
Definition: TotemSD.h:125
G4ThreeVector hitPoint
Definition: TotemSD.h:113
void fillHits(edm::PSimHitContainer &, std::string use) override
Definition: TotemSD.cc:179
G4StepPoint * postStepPoint
Definition: TotemSD.h:111
~TotemSD() override
Definition: TotemSD.cc:99
TotemG4Hit * currentHit
Definition: TotemSD.h:103
G4VPhysicalVolume * currentPV
Definition: TotemSD.h:105
void PrintAll() override
Definition: TotemSD.cc:174
short ParticleType
Definition: TotemSD.h:119
void Summarize()
Definition: TotemSD.cc:525
float PhiAtEntry
Definition: TotemSD.h:122
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: TotemSD.cc:141
float Vz
Definition: TotemSD.h:125
G4int primID
Definition: TotemSD.h:95
void StoreHit(TotemG4Hit *)
Definition: TotemSD.cc:508
TrackingSlaveSD * slave
Definition: TotemSD.h:85
void CreateNewHitEvo()
Definition: TotemSD.cc:341
G4Track * theTrack
Definition: TotemSD.h:104
void UpdateHit()
Definition: TotemSD.cc:476
std::vector< PSimHit > PSimHitContainer
void clear() override
Definition: TotemSD.cc:168
void GetStepInfo(G4Step *aStep)
Definition: TotemSD.cc:205
int tsID
Definition: TotemSD.h:102
float Vy
Definition: TotemSD.h:125
void clearHits() override
Definition: TotemSD.cc:193
int eventno
Definition: TotemSD.h:127
float ThetaAtEntry
Definition: TotemSD.h:121
const SimTrackManager * theManager
Definition: TotemSD.h:100
std::string name
Definition: TotemSD.h:97
void CreateNewHit()
Definition: TotemSD.cc:288