CMS 3D CMS Logo

BscSD.h
Go to the documentation of this file.
1 //
2 #ifndef Bsc_BscSD_h
3 #define Bsc_BscSD_h
4 //
5 
8 
12 
16 
17 #include "G4Step.hh"
18 #include "G4StepPoint.hh"
19 #include "G4Track.hh"
20 #include "G4VPhysicalVolume.hh"
21 
22 #include <string>
23 
24 class TrackingSlaveSD;
25 class TrackInformation;
26 class SimTrackManager;
27 class TrackingSlaveSD;
28 class UpdatablePSimHit;
31 
32 
33 //-------------------------------------------------------------------
34 
35 class BscSD : 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  ~BscSD() override;
46 
47  bool ProcessHits(G4Step *,G4TouchableHistory *) override;
48  uint32_t setDetUnitId(const G4Step*) override;
49 
50  void Initialize(G4HCofThisEvent * HCE) override;
51  void EndOfEvent(G4HCofThisEvent * eventHC) override;
52  void clear() override;
53  void DrawAll() override;
54  void PrintAll() override;
55 
56  double getEnergyDeposit(const G4Step* step);
57  void fillHits(edm::PSimHitContainer&, const std::string&) override;
58  void clearHits() override;
59 
60  private:
61  void update(const BeginOfRun *) override;
62  void update(const BeginOfEvent *) override;
63  void update(const ::EndOfEvent *) override;
64 
65  G4ThreeVector SetToLocal(const G4ThreeVector& global);
66  G4ThreeVector SetToLocalExit(const G4ThreeVector& globalPoint);
67  void GetStepInfo(G4Step* aStep);
68  G4bool HitExists();
69  void CreateNewHit();
70  void UpdateHit();
71  void StoreHit(BscG4Hit*);
72  void ResetForNewPrimary();
73  void Summarize();
74 
75  private:
76 
77  //AZ:
80 
81  G4ThreeVector entrancePoint, exitPoint;
82  G4ThreeVector theEntryPoint ;
83  G4ThreeVector theExitPoint ;
84 
86  G4int primID ;
87 
88  G4int hcID;
91 
92  G4int tsID;
94  G4Track* theTrack;
95  G4VPhysicalVolume* currentPV;
98  G4double tSlice;
99 
100  G4StepPoint* preStepPoint;
101  G4StepPoint* postStepPoint;
102  float edeposit;
103 
104  G4ThreeVector hitPoint;
105  G4ThreeVector hitPointExit;
106  G4ThreeVector hitPointLocal;
107  G4ThreeVector hitPointLocalExit;
108  float Pabs;
109  float Tof;
110  float Eloss;
111  short ParticleType;
112 
114  float PhiAtEntry;
115 
116  int ParentId;
117  float Vx,Vy,Vz;
118  float X,Y,Z;
119  //
120  // Hist
121  //
122  int eventno;
123 
124  protected:
125 
127  G4int emPDG;
128  G4int epPDG;
129  G4int gammaPDG;
130 };
131 
132 #endif // BscSD_h
133 
134 
135 
136 
G4int gammaPDG
Definition: BscSD.h:129
G4int emPDG
Definition: BscSD.h:127
G4int epPDG
Definition: BscSD.h:128
void Summarize()
Definition: BscSD.cc:357
uint32_t previousUnitID
Definition: BscSD.h:96
float Y
Definition: BscSD.h:118
TrackingSlaveSD * slave
Definition: BscSD.h:78
G4ThreeVector SetToLocal(const G4ThreeVector &global)
Definition: BscSD.cc:315
float PhiAtEntry
Definition: BscSD.h:114
G4bool HitExists()
Definition: BscSD.cc:173
float Vx
Definition: BscSD.h:117
float edeposit
Definition: BscSD.h:102
G4int tSliceID
Definition: BscSD.h:97
float Tof
Definition: BscSD.h:109
int ParentId
Definition: BscSD.h:116
void GetStepInfo(G4Step *aStep)
Definition: BscSD.cc:122
float X
Definition: BscSD.h:118
void CreateNewHit()
Definition: BscSD.cc:237
float edepositEM
Definition: BscSD.h:126
float Eloss
Definition: BscSD.h:110
G4int primID
Definition: BscSD.h:86
BscG4HitCollection * theHC
Definition: BscSD.h:89
G4ThreeVector hitPointLocalExit
Definition: BscSD.h:107
type of data representation of DDCompactView
Definition: DDCompactView.h:90
G4int tsID
Definition: BscSD.h:92
void UpdateHit()
Definition: BscSD.cc:295
G4VPhysicalVolume * currentPV
Definition: BscSD.h:95
void update(const BeginOfRun *) override
This routine will be called when the appropriate signal arrives.
Definition: BscSD.cc:382
double getEnergyDeposit(const G4Step *step)
Definition: BscSD.cc:81
uint32_t unitID
Definition: BscSD.h:96
G4int primaryID
Definition: BscSD.h:97
G4StepPoint * preStepPoint
Definition: BscSD.h:100
float ThetaAtEntry
Definition: BscSD.h:113
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: BscSD.cc:101
G4int hcID
Definition: BscSD.h:88
float Z
Definition: BscSD.h:118
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: BscSD.cc:371
float edepositHAD
Definition: BscSD.h:126
G4ThreeVector hitPoint
Definition: BscSD.h:104
void PrintAll() override
Definition: BscSD.cc:366
void StoreHit(BscG4Hit *)
Definition: BscSD.cc:226
G4ThreeVector theEntryPoint
Definition: BscSD.h:82
void clearHits() override
Definition: BscSD.cc:395
G4StepPoint * postStepPoint
Definition: BscSD.h:101
short ParticleType
Definition: BscSD.h:111
G4ThreeVector hitPointExit
Definition: BscSD.h:105
BscNumberingScheme * numberingScheme
Definition: BscSD.h:79
float incidentEnergy
Definition: BscSD.h:85
G4ThreeVector exitPoint
Definition: BscSD.h:81
G4ThreeVector theExitPoint
Definition: BscSD.h:83
Definition: BscSD.h:35
G4ThreeVector SetToLocalExit(const G4ThreeVector &globalPoint)
Definition: BscSD.cc:322
G4Track * theTrack
Definition: BscSD.h:94
int eventno
Definition: BscSD.h:122
G4double tSlice
Definition: BscSD.h:98
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: BscSD.cc:330
G4ThreeVector entrancePoint
Definition: BscSD.h:81
void DrawAll() override
Definition: BscSD.cc:363
void clear() override
Definition: BscSD.cc:360
void Initialize(G4HCofThisEvent *HCE) override
Definition: BscSD.cc:85
std::vector< PSimHit > PSimHitContainer
step
~BscSD() override
Definition: BscSD.cc:72
float Vz
Definition: BscSD.h:117
BscSD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: BscSD.cc:45
G4THitsCollection< BscG4Hit > BscG4HitCollection
float Pabs
Definition: BscSD.h:108
float Vy
Definition: BscSD.h:117
uint32_t setDetUnitId(const G4Step *) override
Definition: BscSD.cc:169
G4ThreeVector hitPointLocal
Definition: BscSD.h:106
BscG4Hit * currentHit
Definition: BscSD.h:93
void ResetForNewPrimary()
Definition: BscSD.cc:218
const SimTrackManager * theManager
Definition: BscSD.h:90