CMS 3D CMS Logo

HFWedgeSD.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_ShowerLibraryProducer_HFWedgeSD_h
2 #define SimG4CMS_ShowerLibraryProducer_HFWedgeSD_h
3 
6 
11 
12 #include "G4VPhysicalVolume.hh"
13 #include "G4Track.hh"
14 
15 #include <map>
16 
17 class G4Step;
18 class G4HCofThisEvent;
19 
21 public:
22  explicit HFWedgeSD(const std::string&, const SensitiveDetectorCatalog& clg, const SimTrackManager*);
23  ~HFWedgeSD() override;
24 
25  void Initialize(G4HCofThisEvent* HCE) override;
26  bool ProcessHits(G4Step* step, G4TouchableHistory* tHistory) override;
27  void EndOfEvent(G4HCofThisEvent* eventHC) override;
28  void clear() override;
29  void DrawAll() override;
30  void PrintAll() override;
31 
32  void clearHits() override;
33  uint32_t setDetUnitId(const G4Step*) override;
34  void fillHits(edm::PCaloHitContainer&, const std::string&) override;
35 
36 protected:
37  G4bool hitExists();
39  void updateHit(HFShowerG4Hit*);
40 
41 private:
42  int hcID;
44  std::map<int, HFShowerG4Hit*> hitMap;
45 
47  double edep, time;
48  G4ThreeVector globalPos, localPos, momDir;
50 };
51 
52 #endif
HFWedgeSD(const std::string &, const SensitiveDetectorCatalog &clg, const SimTrackManager *)
Definition: HFWedgeSD.cc:21
std::vector< PCaloHit > PCaloHitContainer
int previousID
Definition: HFWedgeSD.h:46
void updateHit(HFShowerG4Hit *)
Definition: HFWedgeSD.cc:107
void Initialize(G4HCofThisEvent *HCE) override
Definition: HFWedgeSD.cc:28
int hcID
Definition: HFWedgeSD.h:42
G4ThreeVector momDir
Definition: HFWedgeSD.h:48
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
Definition: HFWedgeSD.cc:40
void DrawAll() override
Definition: HFWedgeSD.cc:66
void fillHits(edm::PCaloHitContainer &, const std::string &) override
Definition: HFWedgeSD.cc:128
std::map< int, HFShowerG4Hit * > hitMap
Definition: HFWedgeSD.h:44
double edep
Definition: HFWedgeSD.h:47
int trackID
Definition: HFWedgeSD.h:46
void clearHits() override
Definition: HFWedgeSD.cc:118
G4bool hitExists()
Definition: HFWedgeSD.cc:70
G4ThreeVector localPos
Definition: HFWedgeSD.h:48
HFShowerG4HitsCollection * theHC
Definition: HFWedgeSD.h:43
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: HFWedgeSD.cc:59
uint32_t setDetUnitId(const G4Step *) override
Definition: HFWedgeSD.cc:123
HFShowerG4Hit * currentHit
Definition: HFWedgeSD.h:49
double time
Definition: HFWedgeSD.h:47
void PrintAll() override
Definition: HFWedgeSD.cc:68
~HFWedgeSD() override
Definition: HFWedgeSD.cc:26
HFShowerG4Hit * createNewHit()
Definition: HFWedgeSD.cc:86
step
Definition: StallMonitor.cc:83
void clear() override
Definition: HFWedgeSD.cc:64
int currentID
Definition: HFWedgeSD.h:46
G4THitsCollection< HFShowerG4Hit > HFShowerG4HitsCollection
Definition: HFShowerG4Hit.h:55
G4ThreeVector globalPos
Definition: HFWedgeSD.h:48