CMS 3D CMS Logo

MuonSensitiveDetector.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_Muon_MuonSensitiveDetector_h
2 #define SimG4CMS_Muon_MuonSensitiveDetector_h
3 
22 
23 #include <string>
24 
25 class MuonSlaveSD;
27 class MuonFrameRotation;
28 class UpdatablePSimHit;
29 class MuonSubDetector;
30 class MuonG4Numbering;
31 class SimHitPrinter;
32 class G4Step;
34 class SimTrackManager;
35 
37 public SensitiveTkDetector,
38 public Observer<const BeginOfEvent*>
39 {
40 public:
41  explicit MuonSensitiveDetector(const std::string&, const DDCompactView &,
43  const SimTrackManager*);
44  ~MuonSensitiveDetector() override;
45  G4bool ProcessHits(G4Step *,G4TouchableHistory *) override;
46  uint32_t setDetUnitId(const G4Step *) override;
47  void EndOfEvent(G4HCofThisEvent*) override;
48 
49  void fillHits(edm::PSimHitContainer&, const std::string&) override;
50  void clearHits() override;
51 
52  const MuonSlaveSD* GetSlaveMuon() const {
53  return slaveMuon; }
54 
55 protected:
56 
57  void update(const BeginOfEvent *) override;
58 
59 private:
60 
62  { return Local3DPoint(v.x()*0.1, v.y()*0.1, v.z()*0.1); }
63 
69 
70  bool newHit(const G4Step *);
71  void createHit(const G4Step *);
72  void updateHit(const G4Step *);
73  void saveHit();
74 
80  Local3DPoint InitialStepPositionVsParent(const G4Step * currentStep, G4int levelsUp);
81  Local3DPoint FinalStepPositionVsParent(const G4Step * currentStep, G4int levelsUp);
82 
83  const G4VPhysicalVolume* thePV;
85  uint32_t theDetUnitId;
86  uint32_t newDetUnitId;
88 
89  bool printHits;
91 
92  //--- SimTracks cuts
95 
97 
99 };
100 
101 #endif // MuonSensitiveDetector_h
const G4VPhysicalVolume * thePV
Local3DPoint FinalStepPositionVsParent(const G4Step *currentStep, G4int levelsUp)
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override
void updateHit(const G4Step *)
T y() const
Definition: PV3DBase.h:63
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:83
MuonSubDetector * detector
void fillHits(edm::PSimHitContainer &, const std::string &) override
Local3DPoint cmsUnits(const Local3DPoint &v)
void createHit(const G4Step *)
G4ProcessTypeEnumerator * theG4ProcessTypeEnumerator
T z() const
Definition: PV3DBase.h:64
bool newHit(const G4Step *)
const SimTrackManager * theManager
MuonFrameRotation * theRotation
MuonSensitiveDetector(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
const MuonSlaveSD * GetSlaveMuon() const
uint32_t setDetUnitId(const G4Step *) override
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
void EndOfEvent(G4HCofThisEvent *) override
MuonSimHitNumberingScheme * numbering
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
std::vector< PSimHit > PSimHitContainer
T x() const
Definition: PV3DBase.h:62
Local3DPoint InitialStepPositionVsParent(const G4Step *currentStep, G4int levelsUp)
UpdatablePSimHit * theHit
MuonG4Numbering * g4numbering