CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BHMSD.h
Go to the documentation of this file.
1 #ifndef SimG4CMSForward_BHMSD_h
2 #define SimG4CMSForward_BHMSD_h
3 
6 
10 
14 
15 
16 #include "G4Step.hh"
17 #include "G4StepPoint.hh"
18 #include "G4Track.hh"
19 #include "G4VPhysicalVolume.hh"
20 
21 #include <string>
22 
23 class TrackingSlaveSD;
24 
25 class TrackInformation;
26 class SimTrackManager;
27 class TrackingSlaveSD;
28 class UpdatablePSimHit;
31 
32 
33 //-------------------------------------------------------------------
34 
35 class BHMSD : public SensitiveTkDetector,
36  public Observer<const BeginOfRun *>,
37  public Observer<const BeginOfEvent*>,
38  public Observer<const EndOfEvent*> {
39 
40 public:
41 
43  edm::ParameterSet const &, const SimTrackManager* );
44 
45 
46  virtual ~BHMSD();
47 
48  virtual bool ProcessHits(G4Step *,G4TouchableHistory *);
49  virtual uint32_t setDetUnitId(G4Step*);
50 
51  virtual void Initialize(G4HCofThisEvent * HCE);
52  virtual void EndOfEvent(G4HCofThisEvent * eventHC);
53  virtual void clear();
54  virtual void DrawAll();
55  virtual void PrintAll();
56 
57  virtual double getEnergyDeposit(G4Step* step);
59 
60  std::vector<std::string> getNames();
61 
62 private:
63  void update(const BeginOfRun *);
64  void update(const BeginOfEvent *);
65  void update(const ::EndOfEvent *);
66  virtual void clearHits();
67 
68 private:
69 
70  G4ThreeVector SetToLocal(const G4ThreeVector& global);
71  G4ThreeVector SetToLocalExit(const G4ThreeVector& globalPoint);
72  void GetStepInfo(G4Step* aStep);
73  G4bool HitExists();
74  void CreateNewHit();
75  void UpdateHit();
76  void StoreHit(BscG4Hit*);
77  void ResetForNewPrimary();
78  void Summarize();
79 
80 
81 private:
82 
85 
86  G4ThreeVector entrancePoint, exitPoint;
87  G4ThreeVector theEntryPoint, theExitPoint;
88 
90  G4int primID ;
91 
93  G4int hcID;
96 
97  G4int tsID;
99  G4Track* theTrack;
100  G4VPhysicalVolume* currentPV;
103  G4double tSlice;
104 
105  G4StepPoint* preStepPoint;
106  G4StepPoint* postStepPoint;
107  float edeposit;
108 
109  G4ThreeVector hitPoint;
110  G4ThreeVector hitPointExit;
111  G4ThreeVector hitPointLocal;
112  G4ThreeVector hitPointLocalExit;
113 
114  float Pabs, Tof, Eloss;
115  short ParticleType;
117 
118  int ParentId;
119  float Vx,Vy,Vz;
120  float X,Y,Z;
121 
122  int eventno;
123 
124 protected:
125 
127  G4int emPDG;
128  G4int epPDG;
129  G4int gammaPDG;
130 };
131 
132 #endif
133 
134 
135 
136 
float Z
Definition: BHMSD.h:120
float incidentEnergy
Definition: BHMSD.h:89
std::string name
Definition: BHMSD.h:92
G4double tSlice
Definition: BHMSD.h:103
G4ThreeVector hitPointExit
Definition: BHMSD.h:110
void ResetForNewPrimary()
Definition: BHMSD.cc:214
virtual void Initialize(G4HCofThisEvent *HCE)
Definition: BHMSD.cc:90
float PhiAtEntry
Definition: BHMSD.h:116
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
Definition: BHMSD.cc:105
float Eloss
Definition: BHMSD.h:114
G4ThreeVector theEntryPoint
Definition: BHMSD.h:87
BHMNumberingScheme * numberingScheme
Definition: BHMSD.h:84
G4StepPoint * preStepPoint
Definition: BHMSD.h:105
G4ThreeVector hitPoint
Definition: BHMSD.h:109
G4int tSliceID
Definition: BHMSD.h:102
BHMSD(std::string, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: BHMSD.cc:30
std::vector< std::string > getNames()
Definition: BHMSD.cc:402
int eventno
Definition: BHMSD.h:122
void CreateNewHit()
Definition: BHMSD.cc:234
G4ThreeVector hitPointLocal
Definition: BHMSD.h:111
type of data representation of DDCompactView
Definition: DDCompactView.h:77
virtual double getEnergyDeposit(G4Step *step)
Definition: BHMSD.cc:86
float X
Definition: BHMSD.h:120
float edepositEM
Definition: BHMSD.h:126
TrackingSlaveSD * slave
Definition: BHMSD.h:83
float edepositHAD
Definition: BHMSD.h:126
float Vx
Definition: BHMSD.h:119
float Vz
Definition: BHMSD.h:119
G4ThreeVector SetToLocalExit(const G4ThreeVector &globalPoint)
Definition: BHMSD.cc:321
void Summarize()
Definition: BHMSD.cc:356
float Y
Definition: BHMSD.h:120
uint32_t previousUnitID
Definition: BHMSD.h:101
G4int tsID
Definition: BHMSD.h:97
virtual void EndOfEvent(G4HCofThisEvent *eventHC)
Definition: BHMSD.cc:329
uint32_t unitID
Definition: BHMSD.h:101
float Vy
Definition: BHMSD.h:119
float Tof
Definition: BHMSD.h:114
G4ThreeVector theExitPoint
Definition: BHMSD.h:87
virtual void clearHits()
Definition: BHMSD.cc:398
G4Track * theTrack
Definition: BHMSD.h:99
virtual void PrintAll()
Definition: BHMSD.cc:368
G4ThreeVector entrancePoint
Definition: BHMSD.h:86
const SimTrackManager * theManager
Definition: BHMSD.h:95
float edeposit
Definition: BHMSD.h:107
void update(const BeginOfRun *)
This routine will be called when the appropriate signal arrives.
Definition: BHMSD.cc:385
G4StepPoint * postStepPoint
Definition: BHMSD.h:106
virtual void DrawAll()
Definition: BHMSD.cc:364
short ParticleType
Definition: BHMSD.h:115
G4int primaryID
Definition: BHMSD.h:102
G4int primID
Definition: BHMSD.h:90
BscG4Hit * currentHit
Definition: BHMSD.h:98
void fillHits(edm::PSimHitContainer &, std::string use)
Definition: BHMSD.cc:374
BscG4HitCollection * theHC
Definition: BHMSD.h:94
G4int gammaPDG
Definition: BHMSD.h:129
int ParentId
Definition: BHMSD.h:118
void UpdateHit()
Definition: BHMSD.cc:293
G4ThreeVector SetToLocal(const G4ThreeVector &global)
Definition: BHMSD.cc:313
float ThetaAtEntry
Definition: BHMSD.h:116
void GetStepInfo(G4Step *aStep)
Definition: BHMSD.cc:122
virtual ~BHMSD()
Definition: BHMSD.cc:80
G4ThreeVector hitPointLocalExit
Definition: BHMSD.h:112
std::vector< PSimHit > PSimHitContainer
G4VPhysicalVolume * currentPV
Definition: BHMSD.h:100
G4int hcID
Definition: BHMSD.h:93
G4THitsCollection< BscG4Hit > BscG4HitCollection
float Pabs
Definition: BHMSD.h:114
G4int epPDG
Definition: BHMSD.h:128
G4bool HitExists()
Definition: BHMSD.cc:174
virtual uint32_t setDetUnitId(G4Step *)
Definition: BHMSD.cc:169
void StoreHit(BscG4Hit *)
Definition: BHMSD.cc:222
Definition: BHMSD.h:35
G4int emPDG
Definition: BHMSD.h:127
G4ThreeVector exitPoint
Definition: BHMSD.h:86
virtual void clear()
Definition: BHMSD.cc:360