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 
46 public:
47 
49  edm::ParameterSet const &, const SimTrackManager*);
50  ~TotemSD() override;
51 
52  bool ProcessHits(G4Step *,G4TouchableHistory *) override;
53  uint32_t setDetUnitId(const G4Step*) override;
54 
55  void Initialize(G4HCofThisEvent * HCE) override;
56  void EndOfEvent(G4HCofThisEvent * eventHC) override;
57  void PrintAll() override;
58 
59  void fillHits(edm::PSimHitContainer&, const std::string&) override;
60  void clearHits() override;
61 
62 protected:
63 
64  void update(const BeginOfEvent *) override;
65 
66 private:
67 
68  G4ThreeVector setToLocal(const G4ThreeVector& globalPoint);
69  void getStepInfo(const G4Step* aStep);
70  bool hitExists();
71  void createNewHit();
72  void createNewHitEvo();
73  G4ThreeVector posizioEvo(const G4ThreeVector&,double ,double ,double, double,int&);
74  void updateHit();
75  void storeHit(TotemG4Hit*);
76  void resetForNewPrimary();
77 
78 private:
79 
82 
83  // Data relative to primary particle (the one which triggers a shower)
84  // These data are common to all Hits of a given shower.
85  // One shower is made of several hits which differ by the
86  // unit ID (cristal/fiber/scintillator) and the Time slice ID.
87 
88  G4ThreeVector entrancePoint;
90  G4int primID ; //@@ ID of the primary particle.
91 
92  G4int hcID;
95 
96  int tsID;
98  G4Track* theTrack;
99  G4VPhysicalVolume* currentPV;
102  double tSlice;
103 
104  const G4StepPoint* preStepPoint;
105  const G4StepPoint* postStepPoint;
106  float edeposit;
107  G4ThreeVector hitPoint;
108 
109  G4ThreeVector Posizio;
110  float Pabs;
111  float Tof;
112  float Eloss;
113  short ParticleType;
114 
116  float PhiAtEntry;
117 
118  int ParentId;
119  float Vx,Vy,Vz;
120 };
121 
122 #endif
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
Definition: TotemSD.cc:159
void resetForNewPrimary()
Definition: TotemSD.cc:464
int ParentId
Definition: TotemSD.h:118
void Initialize(G4HCofThisEvent *HCE) override
Definition: TotemSD.cc:101
uint32_t unitID
Definition: TotemSD.h:100
float Pabs
Definition: TotemSD.h:110
G4ThreeVector posizioEvo(const G4ThreeVector &, double, double, double, double, int &)
Definition: TotemSD.cc:338
G4ThreeVector Posizio
Definition: TotemSD.h:109
TotemG4HitCollection * theHC
Definition: TotemSD.h:93
float Tof
Definition: TotemSD.h:111
G4ThreeVector entrancePoint
Definition: TotemSD.h:88
double tSlice
Definition: TotemSD.h:102
int primaryID
Definition: TotemSD.h:101
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: TotemSD.cc:82
void createNewHit()
Definition: TotemSD.cc:248
uint32_t previousUnitID
Definition: TotemSD.h:100
float incidentEnergy
Definition: TotemSD.h:89
void storeHit(TotemG4Hit *)
Definition: TotemSD.cc:453
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: TotemSD.cc:149
TotemVDetectorOrganization * numberingScheme
Definition: TotemSD.h:81
G4int hcID
Definition: TotemSD.h:92
int tSliceID
Definition: TotemSD.h:101
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
const G4StepPoint * preStepPoint
Definition: TotemSD.h:104
float Eloss
Definition: TotemSD.h:112
float edeposit
Definition: TotemSD.h:106
float Vx
Definition: TotemSD.h:119
G4ThreeVector hitPoint
Definition: TotemSD.h:107
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: TotemSD.cc:145
~TotemSD() override
Definition: TotemSD.cc:77
TotemG4Hit * currentHit
Definition: TotemSD.h:97
G4VPhysicalVolume * currentPV
Definition: TotemSD.h:99
uint32_t setDetUnitId(const G4Step *) override
Definition: TotemSD.cc:96
void PrintAll() override
Definition: TotemSD.cc:140
short ParticleType
Definition: TotemSD.h:113
float PhiAtEntry
Definition: TotemSD.h:116
TotemSD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TotemSD.cc:48
const G4StepPoint * postStepPoint
Definition: TotemSD.h:105
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: TotemSD.cc:114
void updateHit()
Definition: TotemSD.cc:433
float Vz
Definition: TotemSD.h:119
G4int primID
Definition: TotemSD.h:90
TrackingSlaveSD * slave
Definition: TotemSD.h:80
void createNewHitEvo()
Definition: TotemSD.cc:300
G4Track * theTrack
Definition: TotemSD.h:98
std::vector< PSimHit > PSimHitContainer
int tsID
Definition: TotemSD.h:96
float Vy
Definition: TotemSD.h:119
void clearHits() override
Definition: TotemSD.cc:155
float ThetaAtEntry
Definition: TotemSD.h:115
const SimTrackManager * theManager
Definition: TotemSD.h:94
bool hitExists()
Definition: TotemSD.cc:205
void getStepInfo(const G4Step *aStep)
Definition: TotemSD.cc:167