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 
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
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:330
TotemSD::previousUnitID
uint32_t previousUnitID
Definition: TotemSD.h:96
TotemSD::incidentEnergy
float incidentEnergy
Definition: TotemSD.h:85
TotemSD::hcID
G4int hcID
Definition: TotemSD.h:88
Observer
Definition: Observer.h:23
TotemSD::slave
TrackingSlaveSD * slave
Definition: TotemSD.h:76
TotemSD::Eloss
float Eloss
Definition: TotemSD.h:108
TotemSD::fillHits
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: TotemSD.cc:151
SensitiveTkDetector
Definition: SensitiveTkDetector.h:8
TotemSD::theManager
const SimTrackManager * theManager
Definition: TotemSD.h:90
TotemSD::Tof
float Tof
Definition: TotemSD.h:107
TotemSD::ProcessHits
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: TotemSD.cc:89
EndOfEvent.h
TotemSD::resetForNewPrimary
void resetForNewPrimary()
Definition: TotemSD.cc:452
TotemSD::Pabs
float Pabs
Definition: TotemSD.h:106
TotemSD::ThetaAtEntry
float ThetaAtEntry
Definition: TotemSD.h:111
TotemSD::hitPoint
G4ThreeVector hitPoint
Definition: TotemSD.h:103
TotemSD::TotemSD
TotemSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TotemSD.cc:47
TotemSD::preStepPoint
const G4StepPoint * preStepPoint
Definition: TotemSD.h:100
Observer.h
SensitiveTkDetector.h
TotemSD::tsID
int tsID
Definition: TotemSD.h:92
TotemSD::createNewHitEvo
void createNewHitEvo()
Definition: TotemSD.cc:293
TotemSD::tSlice
double tSlice
Definition: TotemSD.h:98
TotemSD::currentHit
TotemG4Hit * currentHit
Definition: TotemSD.h:93
TotemSD::getStepInfo
void getStepInfo(const G4Step *aStep)
Definition: TotemSD.cc:173
TotemSD::~TotemSD
~TotemSD() override
Definition: TotemSD.cc:84
TotemSD
Definition: TotemSD.h:46
TotemSD::update
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: TotemSD.cc:157
TotemSD::PhiAtEntry
float PhiAtEntry
Definition: TotemSD.h:112
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
TotemSD::Posizio
G4ThreeVector Posizio
Definition: TotemSD.h:105
TotemSD::updateHit
void updateHit()
Definition: TotemSD.cc:424
TotemSD::storeHit
void storeHit(TotemG4Hit *)
Definition: TotemSD.cc:441
TotemSD::currentPV
G4VPhysicalVolume * currentPV
Definition: TotemSD.h:95
edm::ParameterSet
Definition: ParameterSet.h:47
TotemSD::theHC
TotemG4HitCollection * theHC
Definition: TotemSD.h:89
TotemSD::createNewHit
void createNewHit()
Definition: TotemSD.cc:249
TotemSD::setToLocal
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
Definition: TotemSD.cc:166
BeginOfEvent.h
TotemSD::Vx
float Vx
Definition: TotemSD.h:115
TrackingSlaveSD
Definition: TrackingSlaveSD.h:11
TotemSD::ParticleType
short ParticleType
Definition: TotemSD.h:109
BeginOfEvent
Definition: BeginOfEvent.h:6
TotemSD::tSliceID
int tSliceID
Definition: TotemSD.h:97
TotemSD::numberingScheme
TotemVDetectorOrganization * numberingScheme
Definition: TotemSD.h:77
TotemSD::Vy
float Vy
Definition: TotemSD.h:115
TotemSD::EndOfEvent
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: TotemSD.cc:119
TotemG4HitCollection.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TotemSD::hitExists
bool hitExists()
Definition: TotemSD.cc:210
TotemSD::postStepPoint
const G4StepPoint * postStepPoint
Definition: TotemSD.h:101
TotemSD::clearHits
void clearHits() override
Definition: TotemSD.cc:164
TotemSD::primID
G4int primID
Definition: TotemSD.h:86
TotemSD::primaryID
int primaryID
Definition: TotemSD.h:97
TotemSD::entrancePoint
G4ThreeVector entrancePoint
Definition: TotemSD.h:84
Frameworkfwd.h
TotemVDetectorOrganization.h
TotemSD::PrintAll
void PrintAll() override
Definition: TotemSD.cc:144
ParameterSetfwd.h
TotemSD::Initialize
void Initialize(G4HCofThisEvent *HCE) override
Definition: TotemSD.cc:105
TotemG4Hit.h
TotemSD::Vz
float Vz
Definition: TotemSD.h:115
TotemSD::edeposit
float edeposit
Definition: TotemSD.h:102
TotemG4Hit
Definition: TotemG4Hit.h:39
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
TotemSD::theTrack
G4Track * theTrack
Definition: TotemSD.h:94
TotemSD::ParentId
int ParentId
Definition: TotemSD.h:114
TotemSD::unitID
uint32_t unitID
Definition: TotemSD.h:96
TotemSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: TotemSD.cc:101