CMS 3D CMS Logo

FP420SD.h
Go to the documentation of this file.
1 //
2 #ifndef FP420_FP420SD_h
3 #define FP420_FP420SD_h
4 //
5 
8 
12 
15 
17 
21 
22 #include "G4Step.hh"
23 #include "G4StepPoint.hh"
24 #include "G4Track.hh"
25 #include "G4VPhysicalVolume.hh"
26 
27 #include <string>
28 
29 class TrackingSlaveSD;
30 //AZ:
31 class FrameRotation;
32 class TrackInformation;
33 class SimTrackManager;
34 class TrackingSlaveSD;
35 class UpdatablePSimHit;
38 
39 //-------------------------------------------------------------------
40 
42  public Observer<const BeginOfRun*>,
43  public Observer<const BeginOfEvent*>,
44  public Observer<const EndOfEvent*> {
45 public:
46  FP420SD(const std::string&,
47  const DDCompactView&,
49  edm::ParameterSet const&,
50  const SimTrackManager*);
51 
52  ~FP420SD() 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  virtual double getEnergyDeposit(G4Step* step);
64  void fillHits(edm::PSimHitContainer&, const std::string&) override;
65  void clearHits() override;
66 
67 private:
68  void update(const BeginOfRun*) override;
69  void update(const BeginOfEvent*) override;
70  void update(const ::EndOfEvent*) override;
71 
72  G4ThreeVector SetToLocal(const G4ThreeVector& global);
73  G4ThreeVector SetToLocalExit(const G4ThreeVector& globalPoint);
74  void GetStepInfo(G4Step* aStep);
75  G4bool HitExists();
76  void CreateNewHit();
77  void UpdateHit();
78  void StoreHit(FP420G4Hit*);
79  void ResetForNewPrimary();
80  void Summarize();
81 
82 private:
83  //AZ:
86 
87  G4ThreeVector entrancePoint, exitPoint;
88  G4ThreeVector theEntryPoint;
89  G4ThreeVector theExitPoint;
90 
92 
93  G4int hcID;
96 
97  G4int tsID;
99  G4Track* theTrack;
100  G4VPhysicalVolume* currentPV;
101  // unsigned int unitID, previousUnitID;
103  G4int tSliceID;
104  unsigned int primaryID, primID;
105 
106  G4double tSlice;
107 
108  G4StepPoint* preStepPoint;
109  G4StepPoint* postStepPoint;
110  float edeposit;
111 
112  G4ThreeVector hitPoint;
113  G4ThreeVector hitPointExit;
114  G4ThreeVector hitPointLocal;
115  G4ThreeVector hitPointLocalExit;
116  float Pabs;
117  float Tof;
118  float Eloss;
120 
122  float PhiAtEntry;
123 
124  int ParentId;
125  float Vx, Vy, Vz;
126  float X, Y, Z;
127 
128  //
129  // Hist
130  //
131  int eventno;
132 
133 protected:
135  G4int emPDG;
136  G4int epPDG;
137  G4int gammaPDG;
138 };
139 
140 #endif // FP420SD_h
int eventno
Definition: FP420SD.h:131
G4ThreeVector theExitPoint
Definition: FP420SD.h:89
G4int emPDG
Definition: FP420SD.h:135
G4ThreeVector SetToLocalExit(const G4ThreeVector &globalPoint)
Definition: FP420SD.cc:321
void DrawAll() override
Definition: FP420SD.cc:404
float ThetaAtEntry
Definition: FP420SD.h:121
virtual double getEnergyDeposit(G4Step *step)
Definition: FP420SD.cc:88
G4ThreeVector hitPointExit
Definition: FP420SD.h:113
float Pabs
Definition: FP420SD.h:116
TrackingSlaveSD * slave
Definition: FP420SD.h:84
G4StepPoint * preStepPoint
Definition: FP420SD.h:108
void ResetForNewPrimary()
Definition: FP420SD.cc:218
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
G4int hcID
Definition: FP420SD.h:93
G4int tsID
Definition: FP420SD.h:97
unsigned int primaryID
Definition: FP420SD.h:104
float Eloss
Definition: FP420SD.h:118
unsigned int primID
Definition: FP420SD.h:104
G4ThreeVector exitPoint
Definition: FP420SD.h:87
float edeposit
Definition: FP420SD.h:110
void clearHits() override
Definition: FP420SD.cc:441
G4ThreeVector theEntryPoint
Definition: FP420SD.h:88
float edepositHAD
Definition: FP420SD.h:134
float Vz
Definition: FP420SD.h:125
void GetStepInfo(G4Step *aStep)
Definition: FP420SD.cc:127
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: FP420SD.cc:419
G4int gammaPDG
Definition: FP420SD.h:137
FP420G4HitCollection * theHC
Definition: FP420SD.h:94
void CreateNewHit()
Definition: FP420SD.cc:234
G4Track * theTrack
Definition: FP420SD.h:99
void Summarize()
Definition: FP420SD.cc:400
G4int tSliceID
Definition: FP420SD.h:103
G4bool HitExists()
Definition: FP420SD.cc:176
void update(const BeginOfRun *) override
This routine will be called when the appropriate signal arrives.
Definition: FP420SD.cc:431
uint32_t setDetUnitId(const G4Step *) override
Definition: FP420SD.cc:172
G4THitsCollection< FP420G4Hit > FP420G4HitCollection
uint32_t previousUnitID
Definition: FP420SD.h:102
G4VPhysicalVolume * currentPV
Definition: FP420SD.h:100
void Initialize(G4HCofThisEvent *HCE) override
Definition: FP420SD.cc:90
FP420SD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: FP420SD.cc:46
float Tof
Definition: FP420SD.h:117
void clear() override
Definition: FP420SD.cc:402
uint32_t unitID
Definition: FP420SD.h:102
float PhiAtEntry
Definition: FP420SD.h:122
float edepositEM
Definition: FP420SD.h:134
short ParticleType
Definition: FP420SD.h:119
G4ThreeVector hitPointLocalExit
Definition: FP420SD.h:115
FP420NumberingScheme * numberingScheme
Definition: FP420SD.h:85
G4double tSlice
Definition: FP420SD.h:106
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: FP420SD.cc:107
void PrintAll() override
Definition: FP420SD.cc:406
G4ThreeVector SetToLocal(const G4ThreeVector &global)
Definition: FP420SD.cc:315
float incidentEnergy
Definition: FP420SD.h:91
int ParentId
Definition: FP420SD.h:124
G4ThreeVector entrancePoint
Definition: FP420SD.h:87
float Z
Definition: FP420SD.h:126
float Vy
Definition: FP420SD.h:125
void UpdateHit()
Definition: FP420SD.cc:294
std::vector< PSimHit > PSimHitContainer
step
Definition: StallMonitor.cc:94
const SimTrackManager * theManager
Definition: FP420SD.h:95
~FP420SD() override
Definition: FP420SD.cc:83
G4int epPDG
Definition: FP420SD.h:136
G4StepPoint * postStepPoint
Definition: FP420SD.h:109
float X
Definition: FP420SD.h:126
FP420G4Hit * currentHit
Definition: FP420SD.h:98
G4ThreeVector hitPointLocal
Definition: FP420SD.h:114
G4ThreeVector hitPoint
Definition: FP420SD.h:112
float Y
Definition: FP420SD.h:126
void StoreHit(FP420G4Hit *)
Definition: FP420SD.cc:224
float Vx
Definition: FP420SD.h:125
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: FP420SD.cc:327