![]() |
ATLAS Offline Software
|
#include <MuonSensitiveDetector.h>
Public Member Functions | |
| MuonSensitiveDetector (const std::string &name, const std::string &output_key, const std::string &trf_storeKey, const MuonGMR4::MuonDetectorManager *detMgr) | |
| Constructor. More... | |
| ~MuonSensitiveDetector ()=default | |
| virtual void | Initialize (G4HCofThisEvent *HCE) override final |
| Create the output container at the beginning of the event. More... | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. More... | |
| MsgStream & | msg () const |
| The standard message stream. More... | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. More... | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. More... | |
Protected Member Functions | |
| bool | processStep (const G4Step *step) const |
| Checks whether the current step shall be processed at all. More... | |
| ActsTrk::GeometryContext | getGeoContext () const |
| Returns the current geometry context in the event. More... | |
| xAOD::MuonSimHit * | lastSnapShot (const Identifier &gasGapId, const G4Step *hitStep) |
| Returns the last snap shot of the traversing particle. More... | |
| xAOD::MuonSimHit * | propagateAndSaveStrip (const Identifier &hitId, const Amg::Transform3D &toGasGap, const G4Step *hitStep) |
More... | |
| xAOD::MuonSimHit * | saveHit (const Identifier &hitId, const Amg::Vector3D &hitPos, const Amg::Vector3D &hitDir, const double globTime, const G4Step *hitStep) |
| Saves the current Step as a xAOD::MuonSimHit snapshot. More... | |
Protected Attributes | |
| const MuonGMR4::MuonDetectorManager * | m_detMgr {nullptr} |
| Pointer to the underlying detector manager. More... | |
Private Member Functions | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. More... | |
Private Attributes | |
| SG::WriteHandle< xAOD::MuonSimHitContainer > | m_writeHandle |
| SG::ReadHandleKey< ActsTrk::DetectorAlignStore > | m_trfCacheKey |
| ReadHandleKey to the DetectorAlignmentStore caching the relevant transformations needed in this event. More... | |
| std::string | m_nm |
| Message source name. More... | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) More... | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. More... | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. More... | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) More... | |
Definition at line 22 of file MuonSensitiveDetector.h.
| MuonG4R4::MuonSensitiveDetector::MuonSensitiveDetector | ( | const std::string & | name, |
| const std::string & | output_key, | ||
| const std::string & | trf_storeKey, | ||
| const MuonGMR4::MuonDetectorManager * | detMgr | ||
| ) |
Constructor.
| name | Name of the Sensitive detctor / AthMessaging module |
| output_key | Key under which the sim hits are written into store gate |
| trf_storeKey | Location of the DetctorAlignmentStore holding the transformations per event |
| detMgr | Pointer to the run-4 detector manager |
Definition at line 26 of file MuonSensitiveDetector.cxx.
|
default |
|
protected |
Returns the current geometry context in the event.
Definition at line 48 of file MuonSensitiveDetector.cxx.
|
finaloverridevirtual |
Create the output container at the beginning of the event.
Definition at line 37 of file MuonSensitiveDetector.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
protected |
Returns the last snap shot of the traversing particle.
The G4 track must have stepped through the same volume. Otherwise, a nullptr is returned
| gasGapId | Identifier of the gasGap to consider |
| hitStep | Pointer to the current step |
There's only a snapshot if the last saved hit has the same Identifier & the same particle Link + G4Track Id
Definition at line 146 of file MuonSensitiveDetector.cxx.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
protected |
Checks whether the current step shall be processed at all.
I.e. the particle needs to be charged, there's a minimum velocity needed and the step length must not vanish
| step | G4 step to consider |
Reject secondary particles
Sensitive detector is only sensitive to charged particles or Geantinos
Definition at line 57 of file MuonSensitiveDetector.cxx.
|
protected |
Fetch the step end-points
Hit direction as the momentum direction
Electrons randomly work through the gas instead of drifting through the gas -> take the prestep of the first snap shop inside the gas as pre step point
Definition at line 74 of file MuonSensitiveDetector.cxx.
|
protected |
Saves the current Step as a xAOD::MuonSimHit snapshot.
| hitId | Identifier of the gasGap/ tube where the hit was deposited |
| hitPos | Local position of the hit expressed w.r.t gas gap coordinate system |
| hitDir | Local direction of the hit expressed w.r.t gas gap coordinate system |
| globTime | Global time of the hit |
| hitStep | Pointer to the step from which the hit information was derived. |
Definition at line 110 of file MuonSensitiveDetector.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
protected |
Pointer to the underlying detector manager.
Definition at line 81 of file MuonSensitiveDetector.h.
|
mutableprivateinherited |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
|
mutableprivateinherited |
Current logging level.
Definition at line 138 of file AthMessaging.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
ReadHandleKey to the DetectorAlignmentStore caching the relevant transformations needed in this event.
Definition at line 45 of file MuonSensitiveDetector.h.
|
private |
Definition at line 42 of file MuonSensitiveDetector.h.
1.8.18