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 
24 
25 #include <string>
26 
27 class MuonSlaveSD;
29 class MuonFrameRotation;
30 class UpdatablePSimHit;
31 class MuonSubDetector;
32 class MuonG4Numbering;
33 class SimHitPrinter;
34 class G4Step;
36 class SimTrackManager;
37 
38 class MuonSensitiveDetector : public SensitiveTkDetector, public Observer<const BeginOfEvent*> {
39 public:
40  explicit MuonSensitiveDetector(const std::string&,
41  const MuonOffsetMap*,
42  const MuonGeometryConstants&,
44  double ePersistentCutGeV,
45  bool allMuonsPersistent,
46  bool aPrintHits,
47  bool dd4hep,
48  const SimTrackManager*);
49  ~MuonSensitiveDetector() override;
50  G4bool ProcessHits(G4Step*, G4TouchableHistory*) override;
51  uint32_t setDetUnitId(const G4Step*) override;
52  void EndOfEvent(G4HCofThisEvent*) override;
53 
54  void fillHits(edm::PSimHitContainer&, const std::string&) override;
55  void clearHits() override;
56 
57  const MuonSlaveSD* GetSlaveMuon() const { return slaveMuon; }
58 
59 protected:
60  void update(const BeginOfEvent*) override;
61 
62 private:
63  inline Local3DPoint cmsUnits(const Local3DPoint& v) { return Local3DPoint(v.x() * 0.1, v.y() * 0.1, v.z() * 0.1); }
64 
70 
71  bool newHit(const G4Step*);
72  void createHit(const G4Step*);
73  void updateHit(const G4Step*);
74  void saveHit();
75 
81  Local3DPoint InitialStepPositionVsParent(const G4Step* currentStep, G4int levelsUp);
82  Local3DPoint FinalStepPositionVsParent(const G4Step* currentStep, G4int levelsUp);
83 
84  const G4VPhysicalVolume* thePV;
86  uint32_t theDetUnitId;
87  uint32_t newDetUnitId;
89 
90  bool printHits;
92 
93  //--- SimTracks cuts
96 
98 
100 };
101 
102 #endif // MuonSensitiveDetector_h
MuonSensitiveDetector::theDetUnitId
uint32_t theDetUnitId
Definition: MuonSensitiveDetector.h:86
MuonGeometryConstants
Definition: MuonGeometryConstants.h:20
MuonSubDetector
Definition: MuonSubDetector.h:19
SimTrackManager
Definition: SimTrackManager.h:35
MuonOffsetMap.h
MuonSensitiveDetector::slaveMuon
MuonSlaveSD * slaveMuon
Definition: MuonSensitiveDetector.h:65
MuonSensitiveDetector::newHit
bool newHit(const G4Step *)
Definition: MuonSensitiveDetector.cc:158
MuonSensitiveDetector::theHit
UpdatablePSimHit * theHit
Definition: MuonSensitiveDetector.h:85
Observer
Definition: Observer.h:23
MuonSensitiveDetector::theTrackID
int theTrackID
Definition: MuonSensitiveDetector.h:88
MuonSlaveSD
Definition: MuonSlaveSD.h:26
MuonSensitiveDetector::InitialStepPositionVsParent
Local3DPoint InitialStepPositionVsParent(const G4Step *currentStep, G4int levelsUp)
Definition: MuonSensitiveDetector.cc:313
MuonSensitiveDetector::newDetUnitId
uint32_t newDetUnitId
Definition: MuonSensitiveDetector.h:87
MuonSensitiveDetector::ePersistentCutGeV
float ePersistentCutGeV
Definition: MuonSensitiveDetector.h:94
SensitiveTkDetector
Definition: SensitiveTkDetector.h:8
MuonGeometryConstants.h
MuonSensitiveDetector::clearHits
void clearHits() override
Definition: MuonSensitiveDetector.cc:111
findQualityFiles.v
v
Definition: findQualityFiles.py:179
G4ProcessTypeEnumerator
Definition: G4ProcessTypeEnumerator.h:6
MuonSensitiveDetector::thePV
const G4VPhysicalVolume * thePV
Definition: MuonSensitiveDetector.h:84
MuonG4Numbering
Definition: MuonG4Numbering.h:26
MuonOffsetMap
Definition: MuonOffsetMap.h:9
MuonSensitiveDetector::thePrinter
SimHitPrinter * thePrinter
Definition: MuonSensitiveDetector.h:91
Observer.h
SensitiveTkDetector.h
MuonSensitiveDetector
Definition: MuonSensitiveDetector.h:38
MuonSensitiveDetector::FinalStepPositionVsParent
Local3DPoint FinalStepPositionVsParent(const G4Step *currentStep, G4int levelsUp)
Definition: MuonSensitiveDetector.cc:326
MuonSensitiveDetector::theRotation
const MuonFrameRotation * theRotation
Definition: MuonSensitiveDetector.h:68
MuonSensitiveDetector::numbering
MuonSimHitNumberingScheme * numbering
Definition: MuonSensitiveDetector.h:66
MuonSensitiveDetector::detector
MuonSubDetector * detector
Definition: MuonSensitiveDetector.h:67
MuonSensitiveDetector::EndOfEvent
void EndOfEvent(G4HCofThisEvent *) override
Definition: MuonSensitiveDetector.cc:305
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
MuonSensitiveDetector::fillHits
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: MuonSensitiveDetector.cc:307
Point3DBase< float, LocalTag >
MuonSensitiveDetector::~MuonSensitiveDetector
~MuonSensitiveDetector() override
Definition: MuonSensitiveDetector.cc:94
MuonSensitiveDetector::update
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: MuonSensitiveDetector.cc:103
UpdatablePSimHit
Definition: UpdatablePSimHit.h:12
MuonSensitiveDetector::updateHit
void updateHit(const G4Step *)
Definition: MuonSensitiveDetector.cc:253
BeginOfEvent.h
MuonSensitiveDetector::allMuonsPersistent
bool allMuonsPersistent
Definition: MuonSensitiveDetector.h:95
BeginOfEvent
Definition: BeginOfEvent.h:6
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonSensitiveDetector::saveHit
void saveHit()
Definition: MuonSensitiveDetector.cc:291
LocalPoint.h
MuonSensitiveDetector::printHits
bool printHits
Definition: MuonSensitiveDetector.h:90
dd4hep
Definition: DDPlugins.h:8
MuonSensitiveDetector::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: MuonSensitiveDetector.cc:118
MuonSimHitNumberingScheme
Definition: MuonSimHitNumberingScheme.h:19
MuonFrameRotation
Definition: MuonFrameRotation.h:17
MuonSensitiveDetector::GetSlaveMuon
const MuonSlaveSD * GetSlaveMuon() const
Definition: MuonSensitiveDetector.h:57
MuonSensitiveDetector::cmsUnits
Local3DPoint cmsUnits(const Local3DPoint &v)
Definition: MuonSensitiveDetector.h:63
SimHitPrinter
Definition: SimHitPrinter.h:23
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
MuonSensitiveDetector::theManager
const SimTrackManager * theManager
Definition: MuonSensitiveDetector.h:99
MuonSensitiveDetector::g4numbering
MuonG4Numbering * g4numbering
Definition: MuonSensitiveDetector.h:69
MuonSensitiveDetector::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: MuonSensitiveDetector.cc:139
MuonSensitiveDetector::createHit
void createHit(const G4Step *)
Definition: MuonSensitiveDetector.cc:163
MuonSensitiveDetector::MuonSensitiveDetector
MuonSensitiveDetector(const std::string &, const MuonOffsetMap *, const MuonGeometryConstants &, const SensitiveDetectorCatalog &, double ePersistentCutGeV, bool allMuonsPersistent, bool aPrintHits, bool dd4hep, const SimTrackManager *)
Definition: MuonSensitiveDetector.cc:35
Local3DPoint
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
MuonSensitiveDetector::theG4ProcessTypeEnumerator
G4ProcessTypeEnumerator * theG4ProcessTypeEnumerator
Definition: MuonSensitiveDetector.h:97