CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~FP420SD();
78 
79  virtual bool ProcessHits(G4Step *,G4TouchableHistory *);
80  virtual uint32_t setDetUnitId(G4Step*);
81 
82  virtual void Initialize(G4HCofThisEvent * HCE);
83  virtual void EndOfEvent(G4HCofThisEvent * eventHC);
84  virtual void clear();
85  virtual void DrawAll();
86  virtual void PrintAll();
87 
88  virtual double getEnergyDeposit(G4Step* step);
89  //protected:
90  // Collection hits_;
92 
93  std::vector<std::string> getNames();
94 
95  private:
96  void update(const BeginOfRun *);
97  void update(const BeginOfEvent *);
98  void update(const ::EndOfEvent *);
99  virtual void clearHits();
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 
FP420SD(std::string, const DDCompactView &, SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: FP420SD.cc:57
int eventno
Definition: FP420SD.h:178
G4ThreeVector theExitPoint
Definition: FP420SD.h:127
G4int emPDG
Definition: FP420SD.h:183
std::vector< std::string > getNames()
Definition: FP420SD.cc:541
G4ThreeVector SetToLocalExit(const G4ThreeVector &globalPoint)
Definition: FP420SD.cc:397
float ThetaAtEntry
Definition: FP420SD.h:167
virtual void Initialize(G4HCofThisEvent *HCE)
Definition: FP420SD.cc:140
virtual double getEnergyDeposit(G4Step *step)
Definition: FP420SD.cc:136
G4ThreeVector hitPointExit
Definition: FP420SD.h:159
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
Definition: FP420SD.cc:158
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:77
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
virtual uint32_t setDetUnitId(G4Step *)
Definition: FP420SD.cc:226
virtual void EndOfEvent(G4HCofThisEvent *eventHC)
Definition: FP420SD.cc:405
G4ThreeVector exitPoint
Definition: FP420SD.h:125
float edeposit
Definition: FP420SD.h:155
void update(const BeginOfRun *)
This routine will be called when the appropriate signal arrives.
Definition: FP420SD.cc:523
std::string name
Definition: FP420SD.h:137
G4ThreeVector theEntryPoint
Definition: FP420SD.h:126
float edepositHAD
Definition: FP420SD.h:182
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
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 fillHits(edm::PSimHitContainer &, std::string use)
Definition: FP420SD.cc:509
virtual void clear()
Definition: FP420SD.cc:487
G4THitsCollection< FP420G4Hit > FP420G4HitCollection
uint32_t previousUnitID
Definition: FP420SD.h:147
G4VPhysicalVolume * currentPV
Definition: FP420SD.h:145
float Tof
Definition: FP420SD.h:163
virtual void DrawAll()
Definition: FP420SD.cc:491
uint32_t unitID
Definition: FP420SD.h:147
float PhiAtEntry
Definition: FP420SD.h:168
float edepositEM
Definition: FP420SD.h:182
virtual ~FP420SD()
Definition: FP420SD.cc:127
short ParticleType
Definition: FP420SD.h:165
G4ThreeVector hitPointLocalExit
Definition: FP420SD.h:161
FP420NumberingScheme * numberingScheme
Definition: FP420SD.h:123
G4double tSlice
Definition: FP420SD.h:151
G4ThreeVector SetToLocal(const G4ThreeVector &global)
Definition: FP420SD.cc:389
float incidentEnergy
Definition: FP420SD.h:134
virtual void clearHits()
Definition: FP420SD.cc:536
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
const SimTrackManager * theManager
Definition: FP420SD.h:140
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
virtual void PrintAll()
Definition: FP420SD.cc:495
float Y
Definition: FP420SD.h:172
void StoreHit(FP420G4Hit *)
Definition: FP420SD.cc:287
float Vx
Definition: FP420SD.h:171