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