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 
23 
24 #include <string>
25 
26 class MuonSlaveSD;
28 class MuonFrameRotation;
29 class UpdatablePSimHit;
30 class MuonSubDetector;
31 class MuonG4Numbering;
32 class SimHitPrinter;
33 class G4Step;
35 class SimTrackManager;
36 
37 class MuonSensitiveDetector : public SensitiveTkDetector, public Observer<const BeginOfEvent*> {
38 public:
39  explicit MuonSensitiveDetector(const std::string&,
40  const edm::EventSetup&,
42  edm::ParameterSet const&,
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 { return slaveMuon; }
53 
54 protected:
55  void update(const BeginOfEvent*) override;
56 
57 private:
58  inline Local3DPoint cmsUnits(const Local3DPoint& v) { return Local3DPoint(v.x() * 0.1, v.y() * 0.1, v.z() * 0.1); }
59 
65 
66  bool newHit(const G4Step*);
67  void createHit(const G4Step*);
68  void updateHit(const G4Step*);
69  void saveHit();
70 
76  Local3DPoint InitialStepPositionVsParent(const G4Step* currentStep, G4int levelsUp);
77  Local3DPoint FinalStepPositionVsParent(const G4Step* currentStep, G4int levelsUp);
78 
79  const G4VPhysicalVolume* thePV;
81  uint32_t theDetUnitId;
82  uint32_t newDetUnitId;
84 
85  bool printHits;
87 
88  //--- SimTracks cuts
91 
93 
95 };
96 
97 #endif // MuonSensitiveDetector_h
MuonSensitiveDetector::MuonSensitiveDetector
MuonSensitiveDetector(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: MuonSensitiveDetector.cc:39
MuonSensitiveDetector::theDetUnitId
uint32_t theDetUnitId
Definition: MuonSensitiveDetector.h:81
MuonSubDetector
Definition: MuonSubDetector.h:19
SimTrackManager
Definition: SimTrackManager.h:35
MuonOffsetMap.h
MuonSensitiveDetector::slaveMuon
MuonSlaveSD * slaveMuon
Definition: MuonSensitiveDetector.h:60
MuonSensitiveDetector::newHit
bool newHit(const G4Step *)
Definition: MuonSensitiveDetector.cc:168
MuonSensitiveDetector::theHit
UpdatablePSimHit * theHit
Definition: MuonSensitiveDetector.h:80
Observer
Definition: Observer.h:23
MuonSensitiveDetector::theTrackID
int theTrackID
Definition: MuonSensitiveDetector.h:83
MuonSlaveSD
Definition: MuonSlaveSD.h:26
MuonSensitiveDetector::InitialStepPositionVsParent
Local3DPoint InitialStepPositionVsParent(const G4Step *currentStep, G4int levelsUp)
Definition: MuonSensitiveDetector.cc:323
MuonSensitiveDetector::newDetUnitId
uint32_t newDetUnitId
Definition: MuonSensitiveDetector.h:82
MuonSensitiveDetector::ePersistentCutGeV
float ePersistentCutGeV
Definition: MuonSensitiveDetector.h:89
SensitiveTkDetector
Definition: SensitiveTkDetector.h:8
MuonSensitiveDetector::clearHits
void clearHits() override
Definition: MuonSensitiveDetector.cc:121
findQualityFiles.v
v
Definition: findQualityFiles.py:179
G4ProcessTypeEnumerator
Definition: G4ProcessTypeEnumerator.h:6
MuonSensitiveDetector::thePV
const G4VPhysicalVolume * thePV
Definition: MuonSensitiveDetector.h:79
MuonG4Numbering
Definition: MuonG4Numbering.h:26
MuonSensitiveDetector::thePrinter
SimHitPrinter * thePrinter
Definition: MuonSensitiveDetector.h:86
Observer.h
SensitiveTkDetector.h
MuonSensitiveDetector
Definition: MuonSensitiveDetector.h:37
MuonSensitiveDetector::FinalStepPositionVsParent
Local3DPoint FinalStepPositionVsParent(const G4Step *currentStep, G4int levelsUp)
Definition: MuonSensitiveDetector.cc:336
MuonSensitiveDetector::theRotation
const MuonFrameRotation * theRotation
Definition: MuonSensitiveDetector.h:63
MuonSensitiveDetector::numbering
MuonSimHitNumberingScheme * numbering
Definition: MuonSensitiveDetector.h:61
MuonSensitiveDetector::detector
MuonSubDetector * detector
Definition: MuonSensitiveDetector.h:62
MuonSensitiveDetector::EndOfEvent
void EndOfEvent(G4HCofThisEvent *) override
Definition: MuonSensitiveDetector.cc:315
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
MuonSensitiveDetector::fillHits
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: MuonSensitiveDetector.cc:317
Point3DBase< float, LocalTag >
MuonSensitiveDetector::~MuonSensitiveDetector
~MuonSensitiveDetector() override
Definition: MuonSensitiveDetector.cc:104
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonSensitiveDetector::update
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: MuonSensitiveDetector.cc:113
edm::ParameterSet
Definition: ParameterSet.h:47
UpdatablePSimHit
Definition: UpdatablePSimHit.h:12
MuonSensitiveDetector::updateHit
void updateHit(const G4Step *)
Definition: MuonSensitiveDetector.cc:263
BeginOfEvent.h
MuonSensitiveDetector::allMuonsPersistent
bool allMuonsPersistent
Definition: MuonSensitiveDetector.h:90
BeginOfEvent
Definition: BeginOfEvent.h:6
edm::EventSetup
Definition: EventSetup.h:57
MuonSensitiveDetector::saveHit
void saveHit()
Definition: MuonSensitiveDetector.cc:301
LocalPoint.h
MuonSensitiveDetector::printHits
bool printHits
Definition: MuonSensitiveDetector.h:85
MuonSensitiveDetector::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: MuonSensitiveDetector.cc:128
MuonSimHitNumberingScheme
Definition: MuonSimHitNumberingScheme.h:19
MuonFrameRotation
Definition: MuonFrameRotation.h:17
MuonSensitiveDetector::GetSlaveMuon
const MuonSlaveSD * GetSlaveMuon() const
Definition: MuonSensitiveDetector.h:52
MuonSensitiveDetector::cmsUnits
Local3DPoint cmsUnits(const Local3DPoint &v)
Definition: MuonSensitiveDetector.h:58
SimHitPrinter
Definition: SimHitPrinter.h:23
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
MuonSensitiveDetector::theManager
const SimTrackManager * theManager
Definition: MuonSensitiveDetector.h:94
MuonSensitiveDetector::g4numbering
MuonG4Numbering * g4numbering
Definition: MuonSensitiveDetector.h:64
MuonSensitiveDetector::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: MuonSensitiveDetector.cc:149
MuonSensitiveDetector::createHit
void createHit(const G4Step *)
Definition: MuonSensitiveDetector.cc:173
Local3DPoint
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
MuonSensitiveDetector::theG4ProcessTypeEnumerator
G4ProcessTypeEnumerator * theG4ProcessTypeEnumerator
Definition: MuonSensitiveDetector.h:92