CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
43  public Observer<const BeginOfEvent*>,
44  public Observer<const EndOfEvent*> {
45 
46 public:
47 
49  edm::ParameterSet const &, const SimTrackManager*);
50  virtual ~TotemSD();
51 
52  virtual bool ProcessHits(G4Step *,G4TouchableHistory *);
53  virtual uint32_t setDetUnitId(G4Step*);
54 
55  virtual void Initialize(G4HCofThisEvent * HCE);
56  virtual void EndOfEvent(G4HCofThisEvent * eventHC);
57  virtual void clear();
58  virtual void DrawAll();
59  virtual void PrintAll();
60 
62 
63 private:
64 
65  void update(const BeginOfEvent *);
66  void update(const ::EndOfEvent *);
67  virtual void clearHits();
68 
69 private:
70 
71  G4ThreeVector SetToLocal(const G4ThreeVector& globalPoint);
72  void GetStepInfo(G4Step* aStep);
73  bool HitExists();
74  void CreateNewHit();
75  void CreateNewHitEvo();
76  G4ThreeVector PosizioEvo(const G4ThreeVector&,double ,double ,double, double,int&);
77  void UpdateHit();
78  void StoreHit(TotemG4Hit*);
79  void ResetForNewPrimary();
80  void Summarize();
81 
82 private:
83 
86 
87  // Data relative to primary particle (the one which triggers a shower)
88  // These data are common to all Hits of a given shower.
89  // One shower is made of several hits which differ by the
90  // unit ID (cristal/fiber/scintillator) and the Time slice ID.
91 
92  G4ThreeVector entrancePoint;
94  G4int primID ; //@@ ID of the primary particle.
95 
97  G4int hcID;
100 
101  int tsID;
103  G4Track* theTrack;
104  G4VPhysicalVolume* currentPV;
107  double tSlice;
108 
109  G4StepPoint* preStepPoint;
110  G4StepPoint* postStepPoint;
111  float edeposit;
112  G4ThreeVector hitPoint;
113 
114  G4ThreeVector Posizio;
115  float Pabs;
116  float Tof;
117  float Eloss;
118  short ParticleType;
119 
121  float PhiAtEntry;
122 
123  int ParentId;
124  float Vx,Vy,Vz;
125 
126  int eventno;
127 };
128 
129 #endif
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
Definition: TotemSD.cc:104
int ParentId
Definition: TotemSD.h:123
virtual void EndOfEvent(G4HCofThisEvent *eventHC)
Definition: TotemSD.cc:141
uint32_t unitID
Definition: TotemSD.h:105
float Pabs
Definition: TotemSD.h:115
G4ThreeVector Posizio
Definition: TotemSD.h:114
TotemG4HitCollection * theHC
Definition: TotemSD.h:98
float Tof
Definition: TotemSD.h:116
void fillHits(edm::PSimHitContainer &, std::string use)
Definition: TotemSD.cc:179
G4ThreeVector entrancePoint
Definition: TotemSD.h:92
double tSlice
Definition: TotemSD.h:107
int primaryID
Definition: TotemSD.h:106
uint32_t previousUnitID
Definition: TotemSD.h:105
float incidentEnergy
Definition: TotemSD.h:93
virtual uint32_t setDetUnitId(G4Step *)
Definition: TotemSD.cc:123
TotemVDetectorOrganization * numberingScheme
Definition: TotemSD.h:85
G4int hcID
Definition: TotemSD.h:97
int tSliceID
Definition: TotemSD.h:106
type of data representation of DDCompactView
Definition: DDCompactView.h:77
void ResetForNewPrimary()
Definition: TotemSD.cc:519
virtual ~TotemSD()
Definition: TotemSD.cc:99
G4StepPoint * preStepPoint
Definition: TotemSD.h:109
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:117
float edeposit
Definition: TotemSD.h:111
float Vx
Definition: TotemSD.h:124
G4ThreeVector hitPoint
Definition: TotemSD.h:112
virtual void clearHits()
Definition: TotemSD.cc:193
G4StepPoint * postStepPoint
Definition: TotemSD.h:110
TotemG4Hit * currentHit
Definition: TotemSD.h:102
G4VPhysicalVolume * currentPV
Definition: TotemSD.h:104
virtual void clear()
Definition: TotemSD.cc:168
short ParticleType
Definition: TotemSD.h:118
void Summarize()
Definition: TotemSD.cc:525
float PhiAtEntry
Definition: TotemSD.h:121
virtual void DrawAll()
Definition: TotemSD.cc:171
TotemSD(std::string, const DDCompactView &, SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TotemSD.cc:48
float Vz
Definition: TotemSD.h:124
G4int primID
Definition: TotemSD.h:94
void StoreHit(TotemG4Hit *)
Definition: TotemSD.cc:508
TrackingSlaveSD * slave
Definition: TotemSD.h:84
void CreateNewHitEvo()
Definition: TotemSD.cc:341
G4Track * theTrack
Definition: TotemSD.h:103
void UpdateHit()
Definition: TotemSD.cc:476
std::vector< PSimHit > PSimHitContainer
void GetStepInfo(G4Step *aStep)
Definition: TotemSD.cc:205
int tsID
Definition: TotemSD.h:101
float Vy
Definition: TotemSD.h:124
int eventno
Definition: TotemSD.h:126
float ThetaAtEntry
Definition: TotemSD.h:120
const SimTrackManager * theManager
Definition: TotemSD.h:99
virtual void Initialize(G4HCofThisEvent *HCE)
Definition: TotemSD.cc:128
std::string name
Definition: TotemSD.h:96
void CreateNewHit()
Definition: TotemSD.cc:288