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 // last
16 //#include "SimG4Core/Application/interface/SimTrackManager.h"
17 //#include "SimG4CMS/Calo/interface/CaloSD.h"
18 
20 //#include "SimG4Core/Notification/interface/TrackWithHistory.h"
21 //#include "SimG4Core/Notification/interface/TrackContainer.h"
22 
26 
27 
28 #include "G4Step.hh"
29 #include "G4StepPoint.hh"
30 #include "G4Track.hh"
31 #include "G4VPhysicalVolume.hh"
32 
33 //#include <iostream>
34 //#include <fstream>
35 //#include <vector>
36 //#include <map>
37 #include <string>
38 
39 
40 
41 class TrackingSlaveSD;
42 //AZ:
43 class FP420SD;
44 class FrameRotation;
45 class TrackInformation;
46 class SimTrackManager;
47 class TrackingSlaveSD;
48 class UpdatablePSimHit;
51 
52 
53 //-------------------------------------------------------------------
54 
56  public Observer<const BeginOfRun *>,
57  public Observer<const BeginOfEvent*>,
58  public Observer<const EndOfEvent*> {
59 
60 public:
61 
63  edm::ParameterSet const &, const SimTrackManager* );
64 
65 //-------------------------------------------------------------------
66 /*
67 class FP420SD : public CaloSD {
68 
69 public:
70  FP420SD(G4String, const DDCompactView &, edm::ParameterSet const &,const SimTrackManager*);
71 */
72 //-------------------------------------------------------------------
73 
74 
75 
76 
77  ~FP420SD() override;
78 
79  bool ProcessHits(G4Step *,G4TouchableHistory *) override;
80  uint32_t setDetUnitId(G4Step*) override;
81 
82  void Initialize(G4HCofThisEvent * HCE) override;
83  void EndOfEvent(G4HCofThisEvent * eventHC) override;
84  void clear() override;
85  void DrawAll() override;
86  void PrintAll() override;
87 
88  virtual double getEnergyDeposit(G4Step* step);
89  //protected:
90  // Collection hits_;
91  void fillHits(edm::PSimHitContainer&, std::string use) override;
92 
93  std::vector<std::string> getNames() override;
94 
95  private:
96  void update(const BeginOfRun *) override;
97  void update(const BeginOfEvent *) override;
98  void update(const ::EndOfEvent *) override;
99  void clearHits() override;
100 
101  //void SetNumberingScheme(FP420NumberingScheme* scheme);
102 
103 
104 
105  // int eventno;
106  private:
107 
108  G4ThreeVector SetToLocal(const G4ThreeVector& global);
109  G4ThreeVector SetToLocalExit(const G4ThreeVector& globalPoint);
110  void GetStepInfo(G4Step* aStep);
111  G4bool HitExists();
112  void CreateNewHit();
113  void UpdateHit();
114  void StoreHit(FP420G4Hit*);
115  void ResetForNewPrimary();
116  void Summarize();
117 
118 
119  private:
120 
121  //AZ:
124 
125  G4ThreeVector entrancePoint, exitPoint;
126  G4ThreeVector theEntryPoint ;
127  G4ThreeVector theExitPoint ;
128 
129  // Local3DPoint entrancePoint, exitPoint, theEntryPoint, theExitPoint;
130 
131 
132 
133 
135 
136  // G4String name;
138  G4int hcID;
141 
142  G4int tsID;
144  G4Track* theTrack;
145  G4VPhysicalVolume* currentPV;
146  // unsigned int unitID, previousUnitID;
148  G4int tSliceID;
149  unsigned int primaryID, primID ;
150 
151  G4double tSlice;
152 
153  G4StepPoint* preStepPoint;
154  G4StepPoint* postStepPoint;
155  float edeposit;
156 
157  G4ThreeVector hitPoint;
158  // G4ThreeVector Position;
159  G4ThreeVector hitPointExit;
160  G4ThreeVector hitPointLocal;
161  G4ThreeVector hitPointLocalExit;
162  float Pabs;
163  float Tof;
164  float Eloss;
165  short ParticleType;
166 
168  float PhiAtEntry;
169 
170  int ParentId;
171  float Vx,Vy,Vz;
172  float X,Y,Z;
173 
174 
175  //
176  // Hist
177  //
178  int eventno;
179 
180  protected:
181 
183  G4int emPDG;
184  G4int epPDG;
185  G4int gammaPDG;
186 };
187 
188 #endif // FP420SD_h
189 
190 
191 
192 
int eventno
Definition: FP420SD.h:178
G4ThreeVector theExitPoint
Definition: FP420SD.h:127
G4int emPDG
Definition: FP420SD.h:183
G4ThreeVector SetToLocalExit(const G4ThreeVector &globalPoint)
Definition: FP420SD.cc:397
void DrawAll() override
Definition: FP420SD.cc:491
void fillHits(edm::PSimHitContainer &, std::string use) override
Definition: FP420SD.cc:509
float ThetaAtEntry
Definition: FP420SD.h:167
virtual double getEnergyDeposit(G4Step *step)
Definition: FP420SD.cc:136
G4ThreeVector hitPointExit
Definition: FP420SD.h:159
float Pabs
Definition: FP420SD.h:162
TrackingSlaveSD * slave
Definition: FP420SD.h:122
G4StepPoint * preStepPoint
Definition: FP420SD.h:153
void ResetForNewPrimary()
Definition: FP420SD.cc:278
type of data representation of DDCompactView
Definition: DDCompactView.h:90
G4int hcID
Definition: FP420SD.h:138
G4int tsID
Definition: FP420SD.h:142
unsigned int primaryID
Definition: FP420SD.h:149
float Eloss
Definition: FP420SD.h:164
unsigned int primID
Definition: FP420SD.h:149
G4ThreeVector exitPoint
Definition: FP420SD.h:125
float edeposit
Definition: FP420SD.h:155
void clearHits() override
Definition: FP420SD.cc:536
std::string name
Definition: FP420SD.h:137
G4ThreeVector theEntryPoint
Definition: FP420SD.h:126
float edepositHAD
Definition: FP420SD.h:182
FP420SD(std::string, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: FP420SD.cc:57
float Vz
Definition: FP420SD.h:171
void GetStepInfo(G4Step *aStep)
Definition: FP420SD.cc:179
G4int gammaPDG
Definition: FP420SD.h:185
FP420G4HitCollection * theHC
Definition: FP420SD.h:139
std::vector< std::string > getNames() override
Definition: FP420SD.cc:541
void CreateNewHit()
Definition: FP420SD.cc:299
G4Track * theTrack
Definition: FP420SD.h:144
void Summarize()
Definition: FP420SD.cc:483
G4int tSliceID
Definition: FP420SD.h:148
G4bool HitExists()
Definition: FP420SD.cc:232
void update(const BeginOfRun *) override
This routine will be called when the appropriate signal arrives.
Definition: FP420SD.cc:523
G4THitsCollection< FP420G4Hit > FP420G4HitCollection
uint32_t previousUnitID
Definition: FP420SD.h:147
G4VPhysicalVolume * currentPV
Definition: FP420SD.h:145
void Initialize(G4HCofThisEvent *HCE) override
Definition: FP420SD.cc:140
float Tof
Definition: FP420SD.h:163
void clear() override
Definition: FP420SD.cc:487
uint32_t unitID
Definition: FP420SD.h:147
float PhiAtEntry
Definition: FP420SD.h:168
float edepositEM
Definition: FP420SD.h:182
short ParticleType
Definition: FP420SD.h:165
G4ThreeVector hitPointLocalExit
Definition: FP420SD.h:161
FP420NumberingScheme * numberingScheme
Definition: FP420SD.h:123
G4double tSlice
Definition: FP420SD.h:151
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: FP420SD.cc:158
void PrintAll() override
Definition: FP420SD.cc:495
G4ThreeVector SetToLocal(const G4ThreeVector &global)
Definition: FP420SD.cc:389
float incidentEnergy
Definition: FP420SD.h:134
int ParentId
Definition: FP420SD.h:170
G4ThreeVector entrancePoint
Definition: FP420SD.h:125
float Z
Definition: FP420SD.h:172
float Vy
Definition: FP420SD.h:171
void UpdateHit()
Definition: FP420SD.cc:365
std::vector< PSimHit > PSimHitContainer
step
uint32_t setDetUnitId(G4Step *) override
Definition: FP420SD.cc:226
const SimTrackManager * theManager
Definition: FP420SD.h:140
~FP420SD() override
Definition: FP420SD.cc:127
G4int epPDG
Definition: FP420SD.h:184
G4StepPoint * postStepPoint
Definition: FP420SD.h:154
float X
Definition: FP420SD.h:172
FP420G4Hit * currentHit
Definition: FP420SD.h:143
G4ThreeVector hitPointLocal
Definition: FP420SD.h:160
G4ThreeVector hitPoint
Definition: FP420SD.h:157
float Y
Definition: FP420SD.h:172
void StoreHit(FP420G4Hit *)
Definition: FP420SD.cc:287
float Vx
Definition: FP420SD.h:171
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: FP420SD.cc:405