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 
15 
20 
21 #include <string>
22 
23 class G4Step;
24 class G4HCofThisEvent;
25 class TrackingSlaveSD;
26 class SimTrackManager;
27 
29  public Observer<const BeginOfEvent*>,
30  public Observer<const EndOfEvent*> {
31 public:
33  const edm::EventSetup&,
35  edm::ParameterSet const&,
36  const SimTrackManager*);
37  ~PPSDiamondSD() override;
38  void printHitInfo();
39 
40  void Initialize(G4HCofThisEvent* HCE) override;
41  void EndOfEvent(G4HCofThisEvent* eventHC) override;
42  void clear() override;
43  void clearTrack(G4Track* Track);
44  void DrawAll() override;
45  void PrintAll() override;
46  void fillHits(edm::PSimHitContainer&, const std::string&) override;
47 
48 private:
49  static constexpr unsigned int maxDiamondHits_ = 15000;
50 
51  void clearHits() override;
52  bool ProcessHits(G4Step* step, G4TouchableHistory* tHistory) override;
53  uint32_t setDetUnitId(const G4Step* step) override;
54  void update(const BeginOfEvent*) override;
55  void update(const ::EndOfEvent*) override;
57 
58  std::unique_ptr<TrackingSlaveSD> slave_;
59  std::unique_ptr<PPSVDetectorOrganization> numberingScheme_;
60 
63 
64  G4ThreeVector setToLocal(const G4ThreeVector& globalPoint);
65  void stepInfo(const G4Step* aStep);
66  G4bool hitExists();
67  void importInfoToHit(); //added pps
68  void updateHit();
70  void resetForNewPrimary();
71  void summarize();
72  bool isPrimary(const G4Track* track);
73 
74  G4ThreeVector entrancePoint_;
76  G4String name_;
77  G4int hcID_;
80  G4Track* theTrack_;
81  G4VPhysicalVolume* currentPV_;
82  unsigned int unitID_;
84  G4double tSlice_;
85 
86  G4StepPoint* preStepPoint_;
87  G4StepPoint* postStepPoint_;
88  G4ThreeVector hitPoint_;
89  G4ThreeVector exitPoint_;
90  G4ThreeVector theLocalEntryPoint_;
91  G4ThreeVector theLocalExitPoint_;
92  double Pabs_;
93  double thePx_, thePy_, thePz_;
94  double Tof_;
95  double Eloss_;
97  double ThetaAtEntry_;
98  double PhiAtEntry_;
99  int ParentId_;
100  double Vx_, Vy_, Vz_;
103  int eventno_;
104 };
105 
106 #endif // PPS_PPSDiamondSD_h
bool isPrimary(const G4Track *track)
G4VPhysicalVolume * currentPV_
Definition: PPSDiamondSD.h:81
unsigned int unitID_
Definition: PPSDiamondSD.h:82
G4ThreeVector setToLocal(const G4ThreeVector &globalPoint)
PPSDiamondG4Hit * currentHit_
Definition: PPSDiamondSD.h:79
void stepInfo(const G4Step *aStep)
G4ThreeVector hitPoint_
Definition: PPSDiamondSD.h:88
G4int primaryID_
Definition: PPSDiamondSD.h:83
std::unique_ptr< TrackingSlaveSD > slave_
Definition: PPSDiamondSD.h:58
std::unique_ptr< PPSVDetectorOrganization > numberingScheme_
Definition: PPSDiamondSD.h:59
double ThetaAtEntry_
Definition: PPSDiamondSD.h:97
G4ThreeVector theLocalEntryPoint_
Definition: PPSDiamondSD.h:90
void fillHits(edm::PSimHitContainer &, const std::string &) override
static unsigned int maxDiamondHits_
Definition: PPSDiamondSD.h:49
void updateHit()
PPSDiamondSD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: PPSDiamondSD.cc:28
G4String name_
Definition: PPSDiamondSD.h:76
G4ThreeVector theLocalExitPoint_
Definition: PPSDiamondSD.h:91
void clearHits() override
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
void EndOfEvent(G4HCofThisEvent *eventHC) override
uint32_t setDetUnitId(const G4Step *step) override
double Eloss_
Definition: PPSDiamondSD.h:95
double theglobaltimehit_
Definition: PPSDiamondSD.h:102
void Initialize(G4HCofThisEvent *HCE) override
Definition: PPSDiamondSD.cc:69
void clear() override
short ParticleType_
Definition: PPSDiamondSD.h:96
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
G4ThreeVector exitPoint_
Definition: PPSDiamondSD.h:89
void summarize()
void PrintAll() override
double thePy_
Definition: PPSDiamondSD.h:93
double PhiAtEntry_
Definition: PPSDiamondSD.h:98
G4double tSlice_
Definition: PPSDiamondSD.h:84
void storeHit(PPSDiamondG4Hit *)
G4Track * theTrack_
Definition: PPSDiamondSD.h:80
void DrawAll() override
PPSDiamondG4HitCollection * theHC_
Definition: PPSDiamondSD.h:78
void setNumberingScheme(PPSVDetectorOrganization *scheme)
double Globaltimehit_
Definition: PPSDiamondSD.h:101
double thePz_
Definition: PPSDiamondSD.h:93
G4THitsCollection< PPSDiamondG4Hit > PPSDiamondG4HitCollection
G4StepPoint * postStepPoint_
Definition: PPSDiamondSD.h:87
double incidentEnergy_
Definition: PPSDiamondSD.h:75
void resetForNewPrimary()
G4StepPoint * preStepPoint_
Definition: PPSDiamondSD.h:86
double thePx_
Definition: PPSDiamondSD.h:93
double Pabs_
Definition: PPSDiamondSD.h:92
std::vector< PSimHit > PSimHitContainer
G4int tSliceID_
Definition: PPSDiamondSD.h:83
step
Definition: StallMonitor.cc:94
G4bool hitExists()
G4ThreeVector entrancePoint_
Definition: PPSDiamondSD.h:74
void importInfoToHit()
void printHitInfo()
Definition: PPSDiamondSD.cc:79
#define constexpr
~PPSDiamondSD() override
Definition: PPSDiamondSD.cc:67
void clearTrack(G4Track *Track)