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&,
23  const SensitiveDetectorCatalog& clg,
24  const SimTrackManager*);
25  ~HFWedgeSD() override;
26 
27  void Initialize(G4HCofThisEvent* HCE) override;
28  bool ProcessHits(G4Step* step, G4TouchableHistory* tHistory) override;
29  void EndOfEvent(G4HCofThisEvent* eventHC) override;
30  void clear() override;
31  void DrawAll() override;
32  void PrintAll() override;
33 
34  void clearHits() override;
35  uint32_t setDetUnitId(const G4Step*) override;
36  void fillHits(edm::PCaloHitContainer&, const std::string&) override;
37 
38 protected:
39  G4bool hitExists();
41  void updateHit(HFShowerG4Hit*);
42 
43 private:
44  int hcID;
46  std::map<int, HFShowerG4Hit*> hitMap;
47 
49  double edep, time;
50  G4ThreeVector globalPos, localPos, momDir;
52 };
53 
54 #endif
HFWedgeSD(const std::string &, const SensitiveDetectorCatalog &clg, const SimTrackManager *)
Definition: HFWedgeSD.cc:21
std::vector< PCaloHit > PCaloHitContainer
int previousID
Definition: HFWedgeSD.h:48
void updateHit(HFShowerG4Hit *)
Definition: HFWedgeSD.cc:108
void Initialize(G4HCofThisEvent *HCE) override
Definition: HFWedgeSD.cc:30
int hcID
Definition: HFWedgeSD.h:44
G4ThreeVector momDir
Definition: HFWedgeSD.h:50
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
Definition: HFWedgeSD.cc:41
void DrawAll() override
Definition: HFWedgeSD.cc:67
void fillHits(edm::PCaloHitContainer &, const std::string &) override
Definition: HFWedgeSD.cc:128
std::map< int, HFShowerG4Hit * > hitMap
Definition: HFWedgeSD.h:46
double edep
Definition: HFWedgeSD.h:49
int trackID
Definition: HFWedgeSD.h:48
void clearHits() override
Definition: HFWedgeSD.cc:118
G4bool hitExists()
Definition: HFWedgeSD.cc:71
G4ThreeVector localPos
Definition: HFWedgeSD.h:50
HFShowerG4HitsCollection * theHC
Definition: HFWedgeSD.h:45
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: HFWedgeSD.cc:60
uint32_t setDetUnitId(const G4Step *) override
Definition: HFWedgeSD.cc:123
HFShowerG4Hit * currentHit
Definition: HFWedgeSD.h:51
double time
Definition: HFWedgeSD.h:49
void PrintAll() override
Definition: HFWedgeSD.cc:69
~HFWedgeSD() override
Definition: HFWedgeSD.cc:28
HFShowerG4Hit * createNewHit()
Definition: HFWedgeSD.cc:87
step
Definition: StallMonitor.cc:98
void clear() override
Definition: HFWedgeSD.cc:65
int currentID
Definition: HFWedgeSD.h:48
G4THitsCollection< HFShowerG4Hit > HFShowerG4HitsCollection
Definition: HFShowerG4Hit.h:55
G4ThreeVector globalPos
Definition: HFWedgeSD.h:50