CMS 3D CMS Logo

PPSPixelSD.h
Go to the documentation of this file.
1 #ifndef _PPSPixelSD_h
2 #define _PPSPixelSD_h
3 // -*- C++ -*-
4 //
5 // Package: PPS
6 // Class : PPSPixelSD
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 
34 
37 
38 #include <string>
39 
40 class TrackingSlaveSD;
41 class SimTrackManager;
42 class G4Step;
43 class G4StepPoint;
44 class G4Track;
45 
47  public Observer<const BeginOfEvent*>,
48  public Observer<const EndOfEvent*> {
49 public:
51  ~PPSPixelSD() 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 
64 private:
65  void update(const BeginOfEvent*) override;
66  void update(const ::EndOfEvent*) override;
67  void clearHits() override;
68 
69 private:
70  static constexpr unsigned int maxPixelHits_ = 15000;
71  G4ThreeVector setToLocal(const G4ThreeVector& globalPoint);
72  void stepInfo(const G4Step* aStep);
73  bool hitExists();
74  void createNewHit();
75  void updateHit();
76  void storeHit(PPSPixelG4Hit*);
77  void resetForNewPrimary();
78  void summarize();
79 
80 private:
81  std::unique_ptr<TrackingSlaveSD> slave_;
82  std::unique_ptr<PPSVDetectorOrganization> numberingScheme_;
83 
84  // Data relative to primary particle (the one which triggers a shower)
85  // These data are common to all Hits of a given shower.
86  // One shower is made of several hits which differ by the
87  // unit ID (cristal/fiber/scintillator) and the Time slice ID.
88 
89  G4ThreeVector entrancePoint_;
91  G4int primID_; //@@ ID of the primary particle.
92 
94  G4int hcID_;
97 
98  int tsID_;
100  G4Track* theTrack_;
101  G4VPhysicalVolume* currentPV_;
104  double tSlice_;
105 
106  G4StepPoint* preStepPoint_;
107  G4StepPoint* postStepPoint_;
108  float edeposit_;
109  G4ThreeVector hitPoint_;
110 
111  G4ThreeVector position_;
112  G4ThreeVector theEntryPoint_;
113  G4ThreeVector theExitPoint_;
114  float Pabs_;
115  float Tof_;
116  float Eloss_;
118 
120  float PhiAtEntry_;
121 
123  float Vx_, Vy_, Vz_;
124 
125  int eventno_;
126 };
127 
128 #endif
PPSPixelSD
Definition: PPSPixelSD.h:46
SimTrackManager
Definition: SimTrackManager.h:35
PPSPixelSD::ParticleType_
short ParticleType_
Definition: PPSPixelSD.h:117
Observer
Definition: Observer.h:23
PPSPixelSD::storeHit
void storeHit(PPSPixelG4Hit *)
Definition: PPSPixelSD.cc:307
PPSPixelSD::ProcessHits
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: PPSPixelSD.cc:73
PPSPixelSD::currentHit_
PPSPixelG4Hit * currentHit_
Definition: PPSPixelSD.h:99
PPSPixelSD::Initialize
void Initialize(G4HCofThisEvent *HCE) override
Definition: PPSPixelSD.cc:87
PPSPixelSD::update
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: PPSPixelSD.cc:144
PPSPixelSD::EndOfEvent
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: PPSPixelSD.cc:101
SensitiveTkDetector
Definition: SensitiveTkDetector.h:8
PPSPixelG4Hit
Definition: PPSPixelG4Hit.h:38
PPSPixelSD::primaryID_
int primaryID_
Definition: PPSPixelSD.h:103
PPSPixelSD::eventno_
int eventno_
Definition: PPSPixelSD.h:125
PPSPixelSD::primID_
G4int primID_
Definition: PPSPixelSD.h:91
PPSPixelSD::hitPoint_
G4ThreeVector hitPoint_
Definition: PPSPixelSD.h:109
PPSPixelSD::hitExists
bool hitExists()
Definition: PPSPixelSD.cc:211
PPSPixelSD::postStepPoint_
G4StepPoint * postStepPoint_
Definition: PPSPixelSD.h:107
PPSPixelSD::summarize
void summarize()
Definition: PPSPixelSD.cc:324
EndOfEvent.h
PPSPixelSD::tSlice_
double tSlice_
Definition: PPSPixelSD.h:104
PPSPixelSD::edeposit_
float edeposit_
Definition: PPSPixelSD.h:108
PPSPixelSD::updateHit
void updateHit()
Definition: PPSPixelSD.cc:293
PPSPixelSD::ThetaAtEntry_
float ThetaAtEntry_
Definition: PPSPixelSD.h:119
PPSPixelSD::Vz_
float Vz_
Definition: PPSPixelSD.h:123
Observer.h
SensitiveTkDetector.h
PPSPixelSD::numberingScheme_
std::unique_ptr< PPSVDetectorOrganization > numberingScheme_
Definition: PPSPixelSD.h:82
PPSPixelSD::previousUnitID_
uint32_t previousUnitID_
Definition: PPSPixelSD.h:102
PPSPixelSD::stepInfo
void stepInfo(const G4Step *aStep)
Definition: PPSPixelSD.cc:161
PPSPixelSD::PhiAtEntry_
float PhiAtEntry_
Definition: PPSPixelSD.h:120
PPSPixelSD::PPSPixelSD
PPSPixelSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, SimTrackManager const *)
Definition: PPSPixelSD.cc:37
PPSPixelSD::~PPSPixelSD
~PPSPixelSD() override
Definition: PPSPixelSD.cc:71
PPSPixelSD::hcID_
G4int hcID_
Definition: PPSPixelSD.h:94
PPSVDetectorOrganization.h
PPSPixelSD::theEntryPoint_
G4ThreeVector theEntryPoint_
Definition: PPSPixelSD.h:112
PPSPixelSD::Pabs_
float Pabs_
Definition: PPSPixelSD.h:114
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
PPSPixelSD::theExitPoint_
G4ThreeVector theExitPoint_
Definition: PPSPixelSD.h:113
PPSPixelSD::fillHits
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: PPSPixelSD.cc:138
PPSPixelSD::position_
G4ThreeVector position_
Definition: PPSPixelSD.h:111
PPSPixelSD::tSliceID_
int tSliceID_
Definition: PPSPixelSD.h:103
edm::ParameterSet
Definition: ParameterSet.h:47
PPSPixelSD::maxPixelHits_
static constexpr unsigned int maxPixelHits_
Definition: PPSPixelSD.h:70
PPSPixelSD::Vy_
float Vy_
Definition: PPSPixelSD.h:123
PPSPixelSD::entrancePoint_
G4ThreeVector entrancePoint_
Definition: PPSPixelSD.h:89
PPSPixelSD::createNewHit
void createNewHit()
Definition: PPSPixelSD.cc:246
BeginOfEvent.h
PPSPixelSD::unitID_
uint32_t unitID_
Definition: PPSPixelSD.h:102
TrackingSlaveSD
Definition: TrackingSlaveSD.h:11
BeginOfEvent
Definition: BeginOfEvent.h:6
PPSPixelSD::DrawAll
void DrawAll() override
Definition: PPSPixelSD.cc:131
PPSPixelSD::ParentId_
int ParentId_
Definition: PPSPixelSD.h:122
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PPSPixelSD::theTrack_
G4Track * theTrack_
Definition: PPSPixelSD.h:100
PPSPixelSD::Vx_
float Vx_
Definition: PPSPixelSD.h:123
PPSPixelSD::tsID_
int tsID_
Definition: PPSPixelSD.h:98
PPSPixelG4HitCollection.h
PPSPixelSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: PPSPixelSD.cc:83
PPSPixelG4Hit.h
Frameworkfwd.h
PPSPixelSD::resetForNewPrimary
void resetForNewPrimary()
Definition: PPSPixelSD.cc:318
SimTrackManager.h
PPSPixelSD::Tof_
float Tof_
Definition: PPSPixelSD.h:115
PPSPixelSD::clearHits
void clearHits() override
Definition: PPSPixelSD.cc:152
PPSPixelSD::setToLocal
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
Definition: PPSPixelSD.cc:154
ParameterSetfwd.h
PPSPixelSD::incidentEnergy_
float incidentEnergy_
Definition: PPSPixelSD.h:90
PPSPixelSD::clear
void clear() override
Definition: PPSPixelSD.cc:129
PPSPixelSD::theManager_
const SimTrackManager * theManager_
Definition: PPSPixelSD.h:96
PPSPixelSD::Eloss_
float Eloss_
Definition: PPSPixelSD.h:116
PPSPixelSD::slave_
std::unique_ptr< TrackingSlaveSD > slave_
Definition: PPSPixelSD.h:81
PPSPixelSD::preStepPoint_
G4StepPoint * preStepPoint_
Definition: PPSPixelSD.h:106
PPSPixelSD::name_
std::string name_
Definition: PPSPixelSD.h:93
PPSPixelG4HitCollection
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
PPSPixelSD::PrintAll
void PrintAll() override
Definition: PPSPixelSD.cc:133
PPSPixelSD::theHC_
PPSPixelG4HitCollection * theHC_
Definition: PPSPixelSD.h:95
PPSPixelSD::currentPV_
G4VPhysicalVolume * currentPV_
Definition: PPSPixelSD.h:101