CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
36 
37 #include "G4Step.hh"
38 #include "G4StepPoint.hh"
39 #include "G4Track.hh"
40 
41 #include <string>
42 
43 class TrackingSlaveSD;
44 class SimTrackManager;
45 
46 class TotemSD : public SensitiveTkDetector, public Observer<const BeginOfEvent*> {
47 public:
49  ~TotemSD() override;
50 
51  bool ProcessHits(G4Step*, G4TouchableHistory*) override;
52  uint32_t setDetUnitId(const G4Step*) override;
53 
54  void Initialize(G4HCofThisEvent* HCE) override;
55  void EndOfEvent(G4HCofThisEvent* eventHC) override;
56  void PrintAll() override;
57 
58  void fillHits(edm::PSimHitContainer&, const std::string&) override;
59  void clearHits() override;
60 
61 protected:
62  void update(const BeginOfEvent*) override;
63 
64 private:
65  G4ThreeVector setToLocal(const G4ThreeVector& globalPoint);
66  void getStepInfo(const G4Step* aStep);
67  bool hitExists();
68  void createNewHit();
69  void createNewHitEvo();
70  G4ThreeVector posizioEvo(const G4ThreeVector&, double, double, double, double, int&);
71  void updateHit();
72  void storeHit(TotemG4Hit*);
73  void resetForNewPrimary();
74 
75 private:
78 
79  // Data relative to primary particle (the one which triggers a shower)
80  // These data are common to all Hits of a given shower.
81  // One shower is made of several hits which differ by the
82  // unit ID (cristal/fiber/scintillator) and the Time slice ID.
83 
84  G4ThreeVector entrancePoint;
86  G4int primID; //@@ ID of the primary particle.
87 
88  G4int hcID;
91 
92  int tsID;
94  G4Track* theTrack;
95  G4VPhysicalVolume* currentPV;
98  double tSlice;
99 
100  const G4StepPoint* preStepPoint;
101  const G4StepPoint* postStepPoint;
102  float edeposit;
103  G4ThreeVector hitPoint;
104 
105  G4ThreeVector Posizio;
106  float Pabs;
107  float Tof;
108  float Eloss;
110 
112  float PhiAtEntry;
113 
114  int ParentId;
115  float Vx, Vy, Vz;
116 };
117 
118 #endif
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
Definition: TotemSD.cc:166
void resetForNewPrimary()
Definition: TotemSD.cc:452
int ParentId
Definition: TotemSD.h:114
void Initialize(G4HCofThisEvent *HCE) override
Definition: TotemSD.cc:105
uint32_t unitID
Definition: TotemSD.h:96
float Pabs
Definition: TotemSD.h:106
G4ThreeVector posizioEvo(const G4ThreeVector &, double, double, double, double, int &)
Definition: TotemSD.cc:330
G4ThreeVector Posizio
Definition: TotemSD.h:105
TotemG4HitCollection * theHC
Definition: TotemSD.h:89
float Tof
Definition: TotemSD.h:107
G4ThreeVector entrancePoint
Definition: TotemSD.h:84
double tSlice
Definition: TotemSD.h:98
int primaryID
Definition: TotemSD.h:97
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: TotemSD.cc:89
void createNewHit()
Definition: TotemSD.cc:249
uint32_t previousUnitID
Definition: TotemSD.h:96
float incidentEnergy
Definition: TotemSD.h:85
void storeHit(TotemG4Hit *)
Definition: TotemSD.cc:441
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: TotemSD.cc:157
TotemVDetectorOrganization * numberingScheme
Definition: TotemSD.h:77
G4int hcID
Definition: TotemSD.h:88
int tSliceID
Definition: TotemSD.h:97
const G4StepPoint * preStepPoint
Definition: TotemSD.h:100
float Eloss
Definition: TotemSD.h:108
float edeposit
Definition: TotemSD.h:102
float Vx
Definition: TotemSD.h:115
G4ThreeVector hitPoint
Definition: TotemSD.h:103
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: TotemSD.cc:151
~TotemSD() override
Definition: TotemSD.cc:84
TotemG4Hit * currentHit
Definition: TotemSD.h:93
G4VPhysicalVolume * currentPV
Definition: TotemSD.h:95
uint32_t setDetUnitId(const G4Step *) override
Definition: TotemSD.cc:101
void PrintAll() override
Definition: TotemSD.cc:144
short ParticleType
Definition: TotemSD.h:109
float PhiAtEntry
Definition: TotemSD.h:112
const G4StepPoint * postStepPoint
Definition: TotemSD.h:101
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: TotemSD.cc:119
void updateHit()
Definition: TotemSD.cc:424
float Vz
Definition: TotemSD.h:115
G4int primID
Definition: TotemSD.h:86
TotemSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TotemSD.cc:47
TrackingSlaveSD * slave
Definition: TotemSD.h:76
void createNewHitEvo()
Definition: TotemSD.cc:293
G4Track * theTrack
Definition: TotemSD.h:94
std::vector< PSimHit > PSimHitContainer
int tsID
Definition: TotemSD.h:92
float Vy
Definition: TotemSD.h:115
void clearHits() override
Definition: TotemSD.cc:164
float ThetaAtEntry
Definition: TotemSD.h:111
const SimTrackManager * theManager
Definition: TotemSD.h:90
bool hitExists()
Definition: TotemSD.cc:210
void getStepInfo(const G4Step *aStep)
Definition: TotemSD.cc:173