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(const 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&, const std::string&) override;
63  void clearHits() override;
64 
65 private:
66 
67  void update(const BeginOfEvent *) override;
68  void update(const ::EndOfEvent *) override;
69 
70  G4ThreeVector SetToLocal(const G4ThreeVector& globalPoint);
71  void GetStepInfo(G4Step* aStep);
72  bool HitExists();
73  void CreateNewHit();
74  void CreateNewHitEvo();
75  G4ThreeVector PosizioEvo(const G4ThreeVector&,double ,double ,double, double,int&);
76  void UpdateHit();
77  void StoreHit(TotemG4Hit*);
78  void ResetForNewPrimary();
79  void Summarize();
80 
81 private:
82 
85 
86  // Data relative to primary particle (the one which triggers a shower)
87  // These data are common to all Hits of a given shower.
88  // One shower is made of several hits which differ by the
89  // unit ID (cristal/fiber/scintillator) and the Time slice ID.
90 
91  G4ThreeVector entrancePoint;
93  G4int primID ; //@@ ID of the primary particle.
94 
95  G4int hcID;
98 
99  int tsID;
101  G4Track* theTrack;
102  G4VPhysicalVolume* currentPV;
105  double tSlice;
106 
107  G4StepPoint* preStepPoint;
108  G4StepPoint* postStepPoint;
109  float edeposit;
110  G4ThreeVector hitPoint;
111 
112  G4ThreeVector Posizio;
113  float Pabs;
114  float Tof;
115  float Eloss;
116  short ParticleType;
117 
119  float PhiAtEntry;
120 
121  int ParentId;
122  float Vx,Vy,Vz;
123 
124  int eventno;
125 };
126 
127 #endif
int ParentId
Definition: TotemSD.h:121
void Initialize(G4HCofThisEvent *HCE) override
Definition: TotemSD.cc:106
uint32_t unitID
Definition: TotemSD.h:103
float Pabs
Definition: TotemSD.h:113
G4ThreeVector Posizio
Definition: TotemSD.h:112
TotemG4HitCollection * theHC
Definition: TotemSD.h:96
float Tof
Definition: TotemSD.h:114
G4ThreeVector entrancePoint
Definition: TotemSD.h:91
void DrawAll() override
Definition: TotemSD.cc:149
double tSlice
Definition: TotemSD.h:105
int primaryID
Definition: TotemSD.h:104
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: TotemSD.cc:82
uint32_t previousUnitID
Definition: TotemSD.h:103
float incidentEnergy
Definition: TotemSD.h:92
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: TotemSD.cc:161
TotemVDetectorOrganization * numberingScheme
Definition: TotemSD.h:84
G4int hcID
Definition: TotemSD.h:95
int tSliceID
Definition: TotemSD.h:104
type of data representation of DDCompactView
Definition: DDCompactView.h:90
void ResetForNewPrimary()
Definition: TotemSD.cc:497
G4StepPoint * preStepPoint
Definition: TotemSD.h:107
G4ThreeVector SetToLocal(const G4ThreeVector &globalPoint)
Definition: TotemSD.cc:175
G4ThreeVector PosizioEvo(const G4ThreeVector &, double, double, double, double, int &)
Definition: TotemSD.cc:358
bool HitExists()
Definition: TotemSD.cc:224
float Eloss
Definition: TotemSD.h:115
float edeposit
Definition: TotemSD.h:109
float Vx
Definition: TotemSD.h:122
G4ThreeVector hitPoint
Definition: TotemSD.h:110
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: TotemSD.cc:157
G4StepPoint * postStepPoint
Definition: TotemSD.h:108
~TotemSD() override
Definition: TotemSD.cc:77
TotemG4Hit * currentHit
Definition: TotemSD.h:100
G4VPhysicalVolume * currentPV
Definition: TotemSD.h:102
uint32_t setDetUnitId(const G4Step *) override
Definition: TotemSD.cc:101
void PrintAll() override
Definition: TotemSD.cc:152
short ParticleType
Definition: TotemSD.h:116
void Summarize()
Definition: TotemSD.cc:503
float PhiAtEntry
Definition: TotemSD.h:119
TotemSD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TotemSD.cc:48
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: TotemSD.cc:119
float Vz
Definition: TotemSD.h:122
G4int primID
Definition: TotemSD.h:93
void StoreHit(TotemG4Hit *)
Definition: TotemSD.cc:486
TrackingSlaveSD * slave
Definition: TotemSD.h:83
void CreateNewHitEvo()
Definition: TotemSD.cc:319
G4Track * theTrack
Definition: TotemSD.h:101
void UpdateHit()
Definition: TotemSD.cc:454
std::vector< PSimHit > PSimHitContainer
void clear() override
Definition: TotemSD.cc:146
void GetStepInfo(G4Step *aStep)
Definition: TotemSD.cc:183
int tsID
Definition: TotemSD.h:99
float Vy
Definition: TotemSD.h:122
void clearHits() override
Definition: TotemSD.cc:171
int eventno
Definition: TotemSD.h:124
float ThetaAtEntry
Definition: TotemSD.h:118
const SimTrackManager * theManager
Definition: TotemSD.h:97
void CreateNewHit()
Definition: TotemSD.cc:266