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 // $Id: TotemSD.h,v 1.2 2007/05/08 21:27:29 sunanda Exp $
20 //
21 
22 // system include files
23 
24 // user include files
25 
30 
34 
35 #include "G4Step.hh"
36 #include "G4StepPoint.hh"
37 #include "G4Track.hh"
38 
39 #include <string>
40 
41 class TrackingSlaveSD;
42 
44  public Observer<const BeginOfEvent*>,
45  public Observer<const EndOfEvent*> {
46 
47 public:
48 
49  TotemSD(std::string, const DDCompactView &, SensitiveDetectorCatalog &,
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 
62  void fillHits(edm::PSimHitContainer&, std::string use);
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(G4ThreeVector globalPoint);
73  void GetStepInfo(G4Step* aStep);
74  bool HitExists();
75  void CreateNewHit();
76  void CreateNewHitEvo();
77  G4ThreeVector PosizioEvo(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 
97  std::string name;
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:101
int ParentId
Definition: TotemSD.h:124
virtual void EndOfEvent(G4HCofThisEvent *eventHC)
Definition: TotemSD.cc:138
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:176
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:120
TotemVDetectorOrganization * numberingScheme
Definition: TotemSD.h:86
G4int hcID
Definition: TotemSD.h:98
int tSliceID
Definition: TotemSD.h:107
type of data representation of DDCompactView
Definition: DDCompactView.h:77
void ResetForNewPrimary()
Definition: TotemSD.cc:516
virtual ~TotemSD()
Definition: TotemSD.cc:96
G4StepPoint * preStepPoint
Definition: TotemSD.h:110
void update(const BeginOfEvent *)
This routine will be called when the appropriate signal arrives.
Definition: TotemSD.cc:180
bool HitExists()
Definition: TotemSD.cc:243
G4ThreeVector SetToLocal(G4ThreeVector globalPoint)
Definition: TotemSD.cc:194
virtual void PrintAll()
Definition: TotemSD.cc:171
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:190
G4StepPoint * postStepPoint
Definition: TotemSD.h:111
TotemG4Hit * currentHit
Definition: TotemSD.h:103
G4VPhysicalVolume * currentPV
Definition: TotemSD.h:105
virtual void clear()
Definition: TotemSD.cc:165
short ParticleType
Definition: TotemSD.h:119
void Summarize()
Definition: TotemSD.cc:522
float PhiAtEntry
Definition: TotemSD.h:122
virtual void DrawAll()
Definition: TotemSD.cc:168
TotemSD(std::string, const DDCompactView &, SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TotemSD.cc:45
float Vz
Definition: TotemSD.h:125
G4int primID
Definition: TotemSD.h:95
void StoreHit(TotemG4Hit *)
Definition: TotemSD.cc:505
TrackingSlaveSD * slave
Definition: TotemSD.h:85
void CreateNewHitEvo()
Definition: TotemSD.cc:338
G4Track * theTrack
Definition: TotemSD.h:104
G4ThreeVector PosizioEvo(G4ThreeVector, double, double, double, double, int &)
Definition: TotemSD.cc:377
void UpdateHit()
Definition: TotemSD.cc:473
std::vector< PSimHit > PSimHitContainer
void GetStepInfo(G4Step *aStep)
Definition: TotemSD.cc:202
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:125
std::string name
Definition: TotemSD.h:97
void CreateNewHit()
Definition: TotemSD.cc:285