CMS 3D CMS Logo

TotemSD.h
Go to the documentation of this file.
1 #ifndef Forward_TotemSD_h
2 #define Forward_TotemSD_h
3 // -*- C++ -*-
4 //
5 // Package: Forward
6 // Class : TotemSD
7 //
16 //
17 // Original Author:
18 // Created: Tue May 16 10:14:34 CEST 2006
19 //
20 
21 // system include files
22 
23 // user include files
24 
29 
33 
34 #include "G4Step.hh"
35 #include "G4StepPoint.hh"
36 #include "G4Track.hh"
37 
38 #include <string>
39 
40 class TrackingSlaveSD;
41 class SimTrackManager;
42 
44  public Observer<const BeginOfEvent*>,
45  public Observer<const EndOfEvent*> {
46 
47 public:
48 
50  edm::ParameterSet const &, const SimTrackManager*);
51  virtual ~TotemSD();
52 
53  virtual bool ProcessHits(G4Step *,G4TouchableHistory *);
54  virtual uint32_t setDetUnitId(G4Step*);
55 
56  virtual void Initialize(G4HCofThisEvent * HCE);
57  virtual void EndOfEvent(G4HCofThisEvent * eventHC);
58  virtual void clear();
59  virtual void DrawAll();
60  virtual void PrintAll();
61 
63 
64 private:
65 
66  void update(const BeginOfEvent *);
67  void update(const ::EndOfEvent *);
68  virtual void clearHits();
69 
70 private:
71 
72  G4ThreeVector SetToLocal(const G4ThreeVector& globalPoint);
73  void GetStepInfo(G4Step* aStep);
74  bool HitExists();
75  void CreateNewHit();
76  void CreateNewHitEvo();
77  G4ThreeVector PosizioEvo(const G4ThreeVector&,double ,double ,double, double,int&);
78  void UpdateHit();
79  void StoreHit(TotemG4Hit*);
80  void ResetForNewPrimary();
81  void Summarize();
82 
83 private:
84 
87 
88  // Data relative to primary particle (the one which triggers a shower)
89  // These data are common to all Hits of a given shower.
90  // One shower is made of several hits which differ by the
91  // unit ID (cristal/fiber/scintillator) and the Time slice ID.
92 
93  G4ThreeVector entrancePoint;
95  G4int primID ; //@@ ID of the primary particle.
96 
98  G4int hcID;
101 
102  int tsID;
104  G4Track* theTrack;
105  G4VPhysicalVolume* currentPV;
108  double tSlice;
109 
110  G4StepPoint* preStepPoint;
111  G4StepPoint* postStepPoint;
112  float edeposit;
113  G4ThreeVector hitPoint;
114 
115  G4ThreeVector Posizio;
116  float Pabs;
117  float Tof;
118  float Eloss;
119  short ParticleType;
120 
122  float PhiAtEntry;
123 
124  int ParentId;
125  float Vx,Vy,Vz;
126 
127  int eventno;
128 };
129 
130 #endif
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
Definition: TotemSD.cc:104
int ParentId
Definition: TotemSD.h:124
virtual void EndOfEvent(G4HCofThisEvent *eventHC)
Definition: TotemSD.cc:141
uint32_t unitID
Definition: TotemSD.h:106
float Pabs
Definition: TotemSD.h:116
G4ThreeVector Posizio
Definition: TotemSD.h:115
TotemG4HitCollection * theHC
Definition: TotemSD.h:99
float Tof
Definition: TotemSD.h:117
void fillHits(edm::PSimHitContainer &, std::string use)
Definition: TotemSD.cc:179
G4ThreeVector entrancePoint
Definition: TotemSD.h:93
double tSlice
Definition: TotemSD.h:108
int primaryID
Definition: TotemSD.h:107
uint32_t previousUnitID
Definition: TotemSD.h:106
float incidentEnergy
Definition: TotemSD.h:94
virtual uint32_t setDetUnitId(G4Step *)
Definition: TotemSD.cc:123
TotemVDetectorOrganization * numberingScheme
Definition: TotemSD.h:86
G4int hcID
Definition: TotemSD.h:98
int tSliceID
Definition: TotemSD.h:107
TotemSD(std::string, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TotemSD.cc:48
type of data representation of DDCompactView
Definition: DDCompactView.h:90
void ResetForNewPrimary()
Definition: TotemSD.cc:519
virtual ~TotemSD()
Definition: TotemSD.cc:99
G4StepPoint * preStepPoint
Definition: TotemSD.h:110
G4ThreeVector SetToLocal(const G4ThreeVector &globalPoint)
Definition: TotemSD.cc:197
void update(const BeginOfEvent *)
This routine will be called when the appropriate signal arrives.
Definition: TotemSD.cc:183
G4ThreeVector PosizioEvo(const G4ThreeVector &, double, double, double, double, int &)
Definition: TotemSD.cc:380
bool HitExists()
Definition: TotemSD.cc:246
virtual void PrintAll()
Definition: TotemSD.cc:174
float Eloss
Definition: TotemSD.h:118
float edeposit
Definition: TotemSD.h:112
float Vx
Definition: TotemSD.h:125
G4ThreeVector hitPoint
Definition: TotemSD.h:113
virtual void clearHits()
Definition: TotemSD.cc:193
G4StepPoint * postStepPoint
Definition: TotemSD.h:111
TotemG4Hit * currentHit
Definition: TotemSD.h:103
G4VPhysicalVolume * currentPV
Definition: TotemSD.h:105
virtual void clear()
Definition: TotemSD.cc:168
short ParticleType
Definition: TotemSD.h:119
void Summarize()
Definition: TotemSD.cc:525
float PhiAtEntry
Definition: TotemSD.h:122
virtual void DrawAll()
Definition: TotemSD.cc:171
float Vz
Definition: TotemSD.h:125
G4int primID
Definition: TotemSD.h:95
void StoreHit(TotemG4Hit *)
Definition: TotemSD.cc:508
TrackingSlaveSD * slave
Definition: TotemSD.h:85
void CreateNewHitEvo()
Definition: TotemSD.cc:341
G4Track * theTrack
Definition: TotemSD.h:104
void UpdateHit()
Definition: TotemSD.cc:476
std::vector< PSimHit > PSimHitContainer
void GetStepInfo(G4Step *aStep)
Definition: TotemSD.cc:205
int tsID
Definition: TotemSD.h:102
float Vy
Definition: TotemSD.h:125
int eventno
Definition: TotemSD.h:127
float ThetaAtEntry
Definition: TotemSD.h:121
const SimTrackManager * theManager
Definition: TotemSD.h:100
virtual void Initialize(G4HCofThisEvent *HCE)
Definition: TotemSD.cc:128
std::string name
Definition: TotemSD.h:97
void CreateNewHit()
Definition: TotemSD.cc:288