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 
9 
10 
11 #include "G4VPhysicalVolume.hh"
12 #include "G4Track.hh"
13 
14 #include <map>
15 
16 class G4Step;
17 class G4HCofThisEvent;
18 
20 
21 public:
22 
23  explicit HFWedgeSD(const std::string&, const DDCompactView & cpv,
24  const SensitiveDetectorCatalog & clg,
25  edm::ParameterSet const &p, const SimTrackManager*);
26  ~HFWedgeSD() override;
27 
28  void Initialize(G4HCofThisEvent * HCE) override;
29  bool ProcessHits(G4Step * step,G4TouchableHistory * tHistory) override;
30  void EndOfEvent(G4HCofThisEvent * eventHC) override;
31  void clear() override;
32  void DrawAll() override;
33  void PrintAll() override;
34 
35  void clearHits() override;
36  uint32_t setDetUnitId(const G4Step*) override;
37  void fillHits(edm::PCaloHitContainer&, const std::string&) override;
38 
39 protected:
40 
41  G4bool hitExists();
43  void updateHit(HFShowerG4Hit*);
44 
45 private:
46 
48 
49  int hcID;
51  std::map<int,HFShowerG4Hit*> hitMap;
52 
54  double edep, time;
55  G4ThreeVector globalPos, localPos, momDir;
57 };
58 
59 #endif
HFWedgeSD(const std::string &, const DDCompactView &cpv, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *)
Definition: HFWedgeSD.cc:19
std::vector< PCaloHit > PCaloHitContainer
int previousID
Definition: HFWedgeSD.h:53
void updateHit(HFShowerG4Hit *)
Definition: HFWedgeSD.cc:113
void Initialize(G4HCofThisEvent *HCE) override
Definition: HFWedgeSD.cc:31
int hcID
Definition: HFWedgeSD.h:49
G4ThreeVector momDir
Definition: HFWedgeSD.h:55
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
Definition: HFWedgeSD.cc:42
void DrawAll() override
Definition: HFWedgeSD.cc:70
type of data representation of DDCompactView
Definition: DDCompactView.h:90
void fillHits(edm::PCaloHitContainer &, const std::string &) override
Definition: HFWedgeSD.cc:133
double edep
Definition: HFWedgeSD.h:54
int trackID
Definition: HFWedgeSD.h:53
const SimTrackManager * m_trackManager
Definition: HFWedgeSD.h:47
void clearHits() override
Definition: HFWedgeSD.cc:123
G4bool hitExists()
Definition: HFWedgeSD.cc:74
G4ThreeVector localPos
Definition: HFWedgeSD.h:55
HFShowerG4HitsCollection * theHC
Definition: HFWedgeSD.h:50
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: HFWedgeSD.cc:62
uint32_t setDetUnitId(const G4Step *) override
Definition: HFWedgeSD.cc:128
HFShowerG4Hit * currentHit
Definition: HFWedgeSD.h:56
double time
Definition: HFWedgeSD.h:54
void PrintAll() override
Definition: HFWedgeSD.cc:72
~HFWedgeSD() override
Definition: HFWedgeSD.cc:27
HFShowerG4Hit * createNewHit()
Definition: HFWedgeSD.cc:91
step
void clear() override
Definition: HFWedgeSD.cc:68
int currentID
Definition: HFWedgeSD.h:53
std::map< int, HFShowerG4Hit * > hitMap
Definition: HFWedgeSD.h:51
G4THitsCollection< HFShowerG4Hit > HFShowerG4HitsCollection
Definition: HFShowerG4Hit.h:59
G4ThreeVector globalPos
Definition: HFWedgeSD.h:55