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 <iostream>
15 #include <fstream>
16 #include <vector>
17 #include <map>
18 
19 class G4Step;
20 class G4HCofThisEvent;
21 
23 
24 public:
25 
27  const SensitiveDetectorCatalog & clg,
28  edm::ParameterSet const & p, const SimTrackManager*);
29  ~HFWedgeSD() override;
30 
31  void Initialize(G4HCofThisEvent * HCE) override;
32  bool ProcessHits(G4Step * step,G4TouchableHistory * tHistory) override;
33  void EndOfEvent(G4HCofThisEvent * eventHC) override;
34  void clear() override;
35  void DrawAll() override;
36  void PrintAll() override;
37 
38 protected:
39 
40  G4bool hitExists();
42  void updateHit(HFShowerG4Hit*);
43 
44  void clearHits() override;
45  uint32_t setDetUnitId(G4Step*) override;
47 
48 
49 private:
50 
53 
54  int hcID;
56  std::map<int,HFShowerG4Hit*> hitMap;
57 
59  double edep, time;
60  G4ThreeVector globalPos, localPos, momDir;
62 };
63 
64 #endif
std::vector< PCaloHit > PCaloHitContainer
int previousID
Definition: HFWedgeSD.h:58
void updateHit(HFShowerG4Hit *)
Definition: HFWedgeSD.cc:133
void Initialize(G4HCofThisEvent *HCE) override
Definition: HFWedgeSD.cc:51
int hcID
Definition: HFWedgeSD.h:54
G4ThreeVector momDir
Definition: HFWedgeSD.h:60
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
Definition: HFWedgeSD.cc:62
void DrawAll() override
Definition: HFWedgeSD.cc:90
type of data representation of DDCompactView
Definition: DDCompactView.h:90
void fillHits(edm::PCaloHitContainer &, std::string) override
Definition: HFWedgeSD.cc:153
HFWedgeSD(std::string name, const DDCompactView &cpv, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *)
Definition: HFWedgeSD.cc:19
double edep
Definition: HFWedgeSD.h:59
int trackID
Definition: HFWedgeSD.h:58
const SimTrackManager * m_trackManager
Definition: HFWedgeSD.h:52
void clearHits() override
Definition: HFWedgeSD.cc:143
G4bool hitExists()
Definition: HFWedgeSD.cc:94
G4ThreeVector localPos
Definition: HFWedgeSD.h:60
HFShowerG4HitsCollection * theHC
Definition: HFWedgeSD.h:55
void EndOfEvent(G4HCofThisEvent *eventHC) override
Definition: HFWedgeSD.cc:82
HFShowerG4Hit * currentHit
Definition: HFWedgeSD.h:61
uint32_t setDetUnitId(G4Step *) override
Definition: HFWedgeSD.cc:148
double time
Definition: HFWedgeSD.h:59
std::string theName
Definition: HFWedgeSD.h:51
void PrintAll() override
Definition: HFWedgeSD.cc:92
~HFWedgeSD() override
Definition: HFWedgeSD.cc:47
HFShowerG4Hit * createNewHit()
Definition: HFWedgeSD.cc:111
step
void clear() override
Definition: HFWedgeSD.cc:88
int currentID
Definition: HFWedgeSD.h:58
std::map< int, HFShowerG4Hit * > hitMap
Definition: HFWedgeSD.h:56
G4THitsCollection< HFShowerG4Hit > HFShowerG4HitsCollection
Definition: HFShowerG4Hit.h:59
G4ThreeVector globalPos
Definition: HFWedgeSD.h:60