CMS 3D CMS Logo

PPSDiamondSD.h
Go to the documentation of this file.
1 //Author: Seyed Mohsen Etesami
3 // setesami@cern.ch
4 // 2016 Nov
6 
7 #ifndef PPS_PPSDiamondSD_h
8 #define PPS_PPSDiamondSD_h
9 
13 
18 
21 
22 #include <string>
23 
24 class G4Step;
25 class G4HCofThisEvent;
26 class TrackingSlaveSD;
27 class SimTrackManager;
28 
30  public Observer<const BeginOfEvent*>,
31  public Observer<const EndOfEvent*> {
32 public:
34  ~PPSDiamondSD() override;
35 
36  // Geant4 methods
37  bool ProcessHits(G4Step* step, G4TouchableHistory* tHistory) override;
38 
39  void Initialize(G4HCofThisEvent* HCE) override;
40  void EndOfEvent(G4HCofThisEvent* eventHC) override;
41  void PrintAll() override;
42 
43  // CMSSW methods
44  uint32_t setDetUnitId(const G4Step*) override;
45  void fillHits(edm::PSimHitContainer&, const std::string&) override;
46  void clearHits() override;
47 
48 protected:
49  void update(const BeginOfEvent*) override;
50  void update(const ::EndOfEvent*) override;
51 
52 private:
53  G4ThreeVector setToLocal(const G4ThreeVector& globalPoint);
54  void stepInfo(const G4Step* aStep);
55  void importInfoToHit(); //added pps
57  void printHitInfo();
58 
59  std::unique_ptr<TrackingSlaveSD> slave_;
60  std::unique_ptr<PPSVDetectorOrganization> numberingScheme_;
61 
64  G4Track* theTrack_ = nullptr;
65  G4VPhysicalVolume* currentPV_ = nullptr;
66  G4int hcID_ = -1;
67  G4int primaryID_ = 0;
68  G4int parentID_ = 0;
69  G4int tSliceID_ = 0;
70  G4double tSlice_ = 0.0;
71 
72  G4StepPoint* preStepPoint_ = nullptr;
73  G4StepPoint* postStepPoint_ = nullptr;
74  G4ThreeVector hitPoint_;
75  G4ThreeVector exitPoint_;
76  G4ThreeVector theLocalEntryPoint_;
77  G4ThreeVector theLocalExitPoint_;
78 
79  double incidentEnergy_ = 0.0;
80  double pabs_ = 0.0;
81  double thePx_ = 0.0;
82  double thePy_ = 0.0;
83  double thePz_ = 0.0;
84  double tof_ = 0.0;
85  double eloss_ = 0.0;
86 
87  double thetaAtEntry_ = 0.0;
88  double phiAtEntry_ = 0.0;
89 
90  double vx_ = 0.0;
91  double vy_ = 0.0;
92  double vz_ = 0.0;
93 
96 
97  unsigned int unitID_ = 0;
99  int eventno_ = 0;
100  short particleType_ = 0;
101 };
102 
103 #endif // PPS_PPSDiamondSD_h
G4VPhysicalVolume * currentPV_
Definition: PPSDiamondSD.h:65
unsigned int unitID_
Definition: PPSDiamondSD.h:97
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
PPSDiamondG4Hit * currentHit_
Definition: PPSDiamondSD.h:63
void stepInfo(const G4Step *aStep)
G4ThreeVector hitPoint_
Definition: PPSDiamondSD.h:74
G4int primaryID_
Definition: PPSDiamondSD.h:67
std::unique_ptr< TrackingSlaveSD > slave_
Definition: PPSDiamondSD.h:59
std::unique_ptr< PPSVDetectorOrganization > numberingScheme_
Definition: PPSDiamondSD.h:60
G4ThreeVector theLocalEntryPoint_
Definition: PPSDiamondSD.h:76
void fillHits(edm::PSimHitContainer &, const std::string &) override
PPSDiamondSD(const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: PPSDiamondSD.cc:29
G4ThreeVector theLocalExitPoint_
Definition: PPSDiamondSD.h:77
void clearHits() override
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
Definition: PPSDiamondSD.cc:97
void EndOfEvent(G4HCofThisEvent *eventHC) override
double eloss_
Definition: PPSDiamondSD.h:85
double theglobaltimehit_
Definition: PPSDiamondSD.h:95
void Initialize(G4HCofThisEvent *HCE) override
Definition: PPSDiamondSD.cc:59
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
G4ThreeVector exitPoint_
Definition: PPSDiamondSD.h:75
void PrintAll() override
double thePy_
Definition: PPSDiamondSD.h:82
G4double tSlice_
Definition: PPSDiamondSD.h:70
short particleType_
Definition: PPSDiamondSD.h:100
void storeHit(PPSDiamondG4Hit *)
uint32_t setDetUnitId(const G4Step *) override
G4Track * theTrack_
Definition: PPSDiamondSD.h:64
double pabs_
Definition: PPSDiamondSD.h:80
PPSDiamondG4HitCollection * theHC_
Definition: PPSDiamondSD.h:62
double thetaAtEntry_
Definition: PPSDiamondSD.h:87
double Globaltimehit_
Definition: PPSDiamondSD.h:94
double thePz_
Definition: PPSDiamondSD.h:83
G4THitsCollection< PPSDiamondG4Hit > PPSDiamondG4HitCollection
G4StepPoint * postStepPoint_
Definition: PPSDiamondSD.h:73
double phiAtEntry_
Definition: PPSDiamondSD.h:88
G4int parentID_
Definition: PPSDiamondSD.h:68
double incidentEnergy_
Definition: PPSDiamondSD.h:79
G4StepPoint * preStepPoint_
Definition: PPSDiamondSD.h:72
double thePx_
Definition: PPSDiamondSD.h:81
std::vector< PSimHit > PSimHitContainer
G4int tSliceID_
Definition: PPSDiamondSD.h:69
step
Definition: StallMonitor.cc:83
void importInfoToHit()
void printHitInfo()
Definition: PPSDiamondSD.cc:69
~PPSDiamondSD() override
Definition: PPSDiamondSD.cc:57