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 
43 class TotemSD : public SensitiveTkDetector, public Observer<const BeginOfEvent*> {
44 public:
45  TotemSD(const std::string&,
46  const edm::EventSetup&,
48  edm::ParameterSet const&,
49  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  void update(const BeginOfEvent*) override;
64 
65 private:
66  G4ThreeVector setToLocal(const G4ThreeVector& globalPoint);
67  void getStepInfo(const G4Step* aStep);
68  bool hitExists();
69  void createNewHit();
70  void createNewHitEvo();
71  G4ThreeVector posizioEvo(const G4ThreeVector&, double, double, double, double, int&);
72  void updateHit();
73  void storeHit(TotemG4Hit*);
74  void resetForNewPrimary();
75 
76 private:
79 
80  // Data relative to primary particle (the one which triggers a shower)
81  // These data are common to all Hits of a given shower.
82  // One shower is made of several hits which differ by the
83  // unit ID (cristal/fiber/scintillator) and the Time slice ID.
84 
85  G4ThreeVector entrancePoint;
87  G4int primID; //@@ ID of the primary particle.
88 
89  G4int hcID;
92 
93  int tsID;
95  G4Track* theTrack;
96  G4VPhysicalVolume* currentPV;
99  double tSlice;
100 
101  const G4StepPoint* preStepPoint;
102  const G4StepPoint* postStepPoint;
103  float edeposit;
104  G4ThreeVector hitPoint;
105 
106  G4ThreeVector Posizio;
107  float Pabs;
108  float Tof;
109  float Eloss;
111 
113  float PhiAtEntry;
114 
115  int ParentId;
116  float Vx, Vy, Vz;
117 };
118 
119 #endif
TotemG4HitCollection
TotemVDetectorOrganization
Definition: TotemVDetectorOrganization.h:11
SimTrackManager
Definition: SimTrackManager.h:35
TotemSD::posizioEvo
G4ThreeVector posizioEvo(const G4ThreeVector &, double, double, double, double, int &)
Definition: TotemSD.cc:328
TotemSD::previousUnitID
uint32_t previousUnitID
Definition: TotemSD.h:97
TotemSD::incidentEnergy
float incidentEnergy
Definition: TotemSD.h:86
TotemSD::hcID
G4int hcID
Definition: TotemSD.h:89
Observer
Definition: Observer.h:23
TotemSD::slave
TrackingSlaveSD * slave
Definition: TotemSD.h:77
TotemSD::Eloss
float Eloss
Definition: TotemSD.h:109
TotemSD::fillHits
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: TotemSD.cc:150
SensitiveTkDetector
Definition: SensitiveTkDetector.h:8
TotemSD::theManager
const SimTrackManager * theManager
Definition: TotemSD.h:91
TotemSD::Tof
float Tof
Definition: TotemSD.h:108
TotemSD::ProcessHits
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: TotemSD.cc:90
EndOfEvent.h
TotemSD::resetForNewPrimary
void resetForNewPrimary()
Definition: TotemSD.cc:450
TotemSD::Pabs
float Pabs
Definition: TotemSD.h:107
TotemSD::ThetaAtEntry
float ThetaAtEntry
Definition: TotemSD.h:112
TotemSD::hitPoint
G4ThreeVector hitPoint
Definition: TotemSD.h:104
TotemSD::preStepPoint
const G4StepPoint * preStepPoint
Definition: TotemSD.h:101
Observer.h
SensitiveTkDetector.h
TotemSD::tsID
int tsID
Definition: TotemSD.h:93
TotemSD::createNewHitEvo
void createNewHitEvo()
Definition: TotemSD.cc:291
TotemSD::tSlice
double tSlice
Definition: TotemSD.h:99
TotemSD::currentHit
TotemG4Hit * currentHit
Definition: TotemSD.h:94
TotemSD::getStepInfo
void getStepInfo(const G4Step *aStep)
Definition: TotemSD.cc:170
TotemSD::~TotemSD
~TotemSD() override
Definition: TotemSD.cc:85
TotemSD
Definition: TotemSD.h:43
TotemSD::update
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: TotemSD.cc:156
TotemSD::PhiAtEntry
float PhiAtEntry
Definition: TotemSD.h:113
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
TotemSD::Posizio
G4ThreeVector Posizio
Definition: TotemSD.h:106
TotemSD::updateHit
void updateHit()
Definition: TotemSD.cc:422
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TotemSD::storeHit
void storeHit(TotemG4Hit *)
Definition: TotemSD.cc:439
TotemSD::TotemSD
TotemSD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TotemSD.cc:47
TotemSD::currentPV
G4VPhysicalVolume * currentPV
Definition: TotemSD.h:96
edm::ParameterSet
Definition: ParameterSet.h:36
TotemSD::theHC
TotemG4HitCollection * theHC
Definition: TotemSD.h:90
TotemSD::createNewHit
void createNewHit()
Definition: TotemSD.cc:246
TotemSD::setToLocal
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
Definition: TotemSD.cc:163
BeginOfEvent.h
TotemSD::Vx
float Vx
Definition: TotemSD.h:116
TrackingSlaveSD
Definition: TrackingSlaveSD.h:11
TotemSD::ParticleType
short ParticleType
Definition: TotemSD.h:110
BeginOfEvent
Definition: BeginOfEvent.h:6
TotemSD::tSliceID
int tSliceID
Definition: TotemSD.h:98
TotemSD::numberingScheme
TotemVDetectorOrganization * numberingScheme
Definition: TotemSD.h:78
edm::EventSetup
Definition: EventSetup.h:57
TotemSD::Vy
float Vy
Definition: TotemSD.h:116
TotemSD::EndOfEvent
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: TotemSD.cc:118
TotemG4HitCollection.h
TotemSD::hitExists
bool hitExists()
Definition: TotemSD.cc:207
TotemSD::postStepPoint
const G4StepPoint * postStepPoint
Definition: TotemSD.h:102
TotemSD::clearHits
void clearHits() override
Definition: TotemSD.cc:161
TotemSD::primID
G4int primID
Definition: TotemSD.h:87
TotemSD::primaryID
int primaryID
Definition: TotemSD.h:98
TotemSD::entrancePoint
G4ThreeVector entrancePoint
Definition: TotemSD.h:85
TotemVDetectorOrganization.h
TotemSD::PrintAll
void PrintAll() override
Definition: TotemSD.cc:145
TotemSD::Initialize
void Initialize(G4HCofThisEvent *HCE) override
Definition: TotemSD.cc:106
TotemG4Hit.h
TotemSD::Vz
float Vz
Definition: TotemSD.h:116
TotemSD::edeposit
float edeposit
Definition: TotemSD.h:103
TotemG4Hit
Definition: TotemG4Hit.h:39
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
TotemSD::theTrack
G4Track * theTrack
Definition: TotemSD.h:95
TotemSD::ParentId
int ParentId
Definition: TotemSD.h:115
TotemSD::unitID
uint32_t unitID
Definition: TotemSD.h:97
TotemSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: TotemSD.cc:102