CMS 3D CMS Logo

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