Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
MuonG4R4::MdtSensitiveDetector Class Reference

#include <MdtSensitiveDetector.h>

Inheritance diagram for MuonG4R4::MdtSensitiveDetector:
Collaboration diagram for MuonG4R4::MdtSensitiveDetector:

Public Member Functions

 ~MdtSensitiveDetector ()=default
 
virtual G4bool ProcessHits (G4Step *aStep, G4TouchableHistory *ROhist) override final
 
 MuonSensitiveDetector (const std::string &name, const std::string &output_key, const std::string &trf_storeKey, const MuonGMR4::MuonDetectorManager *detMgr)
 Constructor. More...
 
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...
 
ActsGeometryContext getGeoContext () const
 Returns the current geometry context in the event. More...
 
xAOD::MuonSimHitlastSnapShot (const Identifier &gasGapId, const G4Step *hitStep)
 Returns the last snap shot of the traversing particle. More...
 
xAOD::MuonSimHitpropagateAndSaveStrip (const Identifier &hitId, const Amg::Transform3D &toGasGap, const G4Step *hitStep)
 
More...
 
xAOD::MuonSimHitsaveHit (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::MuonDetectorManagerm_detMgr {nullptr}
 Pointer to the underlying detector manager. More...
 

Private Member Functions

const MuonGMR4::MdtReadoutElementgetReadoutElement (const G4TouchableHistory *touchHist) const
 Retrieves the matching readout element to a G4 hit. More...
 
Identifier getIdentifier (const ActsGeometryContext &gctx, const MuonGMR4::MdtReadoutElement *reElement, const G4TouchableHistory *touchHist) const
 Retrieves from the Readoutelement & the touchable history the Identifier. More...
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

SG::WriteHandle< xAOD::MuonSimHitContainerm_writeHandle
 
SG::ReadHandleKey< ActsTrk::DetectorAlignStorem_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...
 

Detailed Description

Definition at line 87 of file MdtSensitiveDetector.h.

Constructor & Destructor Documentation

◆ ~MdtSensitiveDetector()

MuonG4R4::MdtSensitiveDetector::~MdtSensitiveDetector ( )
default

Member Function Documentation

◆ getGeoContext()

ActsGeometryContext MuonG4R4::MuonSensitiveDetector::getGeoContext ( ) const
protectedinherited

Returns the current geometry context in the event.

Definition at line 48 of file MuonSensitiveDetector.cxx.

48  {
49  ActsGeometryContext gctx{};
50  SG::ReadHandle trfStoreHandle{m_trfCacheKey};
51  if (!trfStoreHandle.isValid()) {
52  THROW_EXCEPTION("Failed to retrieve "<<m_trfCacheKey.fullKey()<<".");
53  }
54  gctx.setStore(std::make_unique<DetectorAlignStore>(*trfStoreHandle));
55  return gctx;
56  }

◆ getIdentifier()

Identifier MuonG4R4::MdtSensitiveDetector::getIdentifier ( const ActsGeometryContext gctx,
const MuonGMR4::MdtReadoutElement reElement,
const G4TouchableHistory *  touchHist 
) const
private

Retrieves from the Readoutelement & the touchable history the Identifier.

The Geant transform takes a hit global -> local --> inverse goes back to the global system Compose this one with the global to local transformation of the first tube in the layer -->

equilateral triangle

Update the reference tube position to be in the proper layer

It can happen that the tube is assigned to zero by numerical precision Catch these cases if the layer is fine

Definition at line 111 of file MdtSensitiveDetector.cxx.

113  {
114  const Amg::Transform3D localToGlobal{getTransform(touchHist, 0)};
117  Amg::Vector3D refTubePos = (readOutEle->globalToLocalTrans(gctx, readOutEle->measurementHash(1,1)) * localToGlobal).translation();
118  ATH_MSG_VERBOSE("Position of the tube wire w.r.t. the first tube in the multi layer "<<Amg::toString(refTubePos, 2));
120  static const double layerPitch = 1./ std::sin(60*Gaudi::Units::deg);
121  const int layer = std::round(refTubePos.x() * layerPitch / readOutEle->tubePitch()) +1;
122  if (layer <= 0) {
123  THROW_EXCEPTION("Tube hit in nirvana -- It seems that the tube position "
124  <<Amg::toString(refTubePos, 2)<<", perp: "<<refTubePos.perp()
125  <<" is outside of the volume envelope "
126  <<m_detMgr->idHelperSvc()->toStringDetEl(readOutEle->identify())<<". ");
127  }
129  refTubePos = (readOutEle->globalToLocalTrans(gctx, readOutEle->measurementHash(layer,1)) * localToGlobal).translation();
130  const double tubePitches = refTubePos.y() / readOutEle->tubePitch();
131  unsigned int tube = std::round(tubePitches) + 1;
132  tube = std::max(1u, std::min(readOutEle->numTubesInLay(), tube));
135  const Amg::Transform3D closureCheck{readOutEle->globalToLocalTrans(gctx,
136  readOutEle->measurementHash(layer, tube))*localToGlobal};
137  if (!Amg::isIdentity(closureCheck)) {
138  ATH_MSG_WARNING("Correction needed "<<layer<<","<<tube<<" "<<Amg::toString(closureCheck));
139  if (closureCheck.translation().y() > 0) ++tube;
140  else --tube;
141  }
142 
143  const IdentifierHash tubeHash = readOutEle->measurementHash(layer, tube);
144  const Identifier tubeId = readOutEle->measurementId(tubeHash);
145  {
146  const Amg::Transform3D closureCheck{readOutEle->globalToLocalTrans(gctx, tubeHash)*localToGlobal};
147  if (!Amg::isIdentity(closureCheck)) {
148  THROW_EXCEPTION("Tube hit in Nirvana -- It seems that the tube position "
149  <<Amg::toString(refTubePos, 2)<<", perp: "<<refTubePos.perp()
150  <<" is outside of the volume envelope "
151  <<m_detMgr->idHelperSvc()->toStringDetEl(readOutEle->identify())<<". "
152  <<"Layer: "<<layer<<", tube: "<<tube<<" "
153  <<Amg::toString(closureCheck)
154  <<"tube volume : "<<touchHist->GetVolume(0)->GetName()
155  <<" mdt chamber: "<<touchHist->GetVolume(2)->GetName());
156  }
157  }
158  ATH_MSG_VERBOSE("Tube & layer number candidate "<<tube<<", "<<layer<<" back and forth transformation "
159  <<Amg::toString(closureCheck));
160  return tubeId;
161 }

◆ getReadoutElement()

const MuonGMR4::MdtReadoutElement * MuonG4R4::MdtSensitiveDetector::getReadoutElement ( const G4TouchableHistory *  touchHist) const
private

Retrieves the matching readout element to a G4 hit.

The third volume in the history is the volume corresponding to the Muon multilayer

Find the Detector element from the Identifier

Build first the Identifier to find the detector element

Then retrieve the Detector element

Definition at line 24 of file MdtSensitiveDetector.cxx.

24  {
26  const std::string stationVolume = touchHist->GetVolume(2)->GetName();
27  using namespace MuonGMR4;
28  const std::vector<std::string> volumeTokens = tokenize(stationVolume, "_");
29  ATH_MSG_VERBOSE("Name of the station volume is "<<stationVolume);
30  if (volumeTokens.size() != 5) {
31  THROW_EXCEPTION(" Cannot deduce the station name from "<<stationVolume);
32  }
34  const std::string stName = volumeTokens[0].substr(0,3);
35  const int stationEta = atoi(volumeTokens[2]);
36  const int stationPhi = atoi(volumeTokens[3]);
37  const int multiLayer = atoi(volumeTokens[4]);
38  const MdtIdHelper& idHelper{m_detMgr->idHelperSvc()->mdtIdHelper()};
40  const Identifier detElId = idHelper.multilayerID(idHelper.elementID(stName,stationEta, stationPhi), multiLayer);
42  const MdtReadoutElement* readOutEle = m_detMgr->getMdtReadoutElement(detElId);
43  if (!readOutEle) {
44  THROW_EXCEPTION(" Failed to retrieve a valid detector element from "
45  <<m_detMgr->idHelperSvc()->toStringDetEl(detElId)<<" "<<stationVolume);
46  }
47  return readOutEle;
48 }

◆ Initialize()

void MuonG4R4::MuonSensitiveDetector::Initialize ( G4HCofThisEvent *  HCE)
finaloverridevirtualinherited

Create the output container at the beginning of the event.

Definition at line 37 of file MuonSensitiveDetector.cxx.

37  {
38  if (m_writeHandle.isValid()) {
39  ATH_MSG_VERBOSE("Simulation hit container "<<m_writeHandle.fullKey()<<" is already written");
40  return;
41  }
42  if (!m_writeHandle.recordNonConst(std::make_unique<xAOD::MuonSimHitContainer>(),
43  std::make_unique<xAOD::MuonSimHitAuxContainer>()).isSuccess()) {
44  THROW_EXCEPTION(" Failed to record "<<m_writeHandle.fullKey());
45  }
46  ATH_MSG_DEBUG("Output container "<<m_writeHandle.fullKey()<<" has been successfully created");
47  }

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ lastSnapShot()

xAOD::MuonSimHit * MuonG4R4::MuonSensitiveDetector::lastSnapShot ( const Identifier gasGapId,
const G4Step *  hitStep 
)
protectedinherited

Returns the last snap shot of the traversing particle.

The G4 track must have stepped through the same volume. Otherwise, a nullptr is returned

Parameters
gasGapIdIdentifier of the gasGap to consider
hitStepPointer 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.

147  {
148  TrackHelper trkHelper{hitStep->GetTrack()};
151  if (m_writeHandle->empty() ||
152  m_writeHandle->back()->identify() != hitId ||
153  trkHelper.GenerateParticleLink() != m_writeHandle->back()->genParticleLink() ||
154  dec_G4TrkId(*m_writeHandle->back()) != hitStep->GetTrack()->GetTrackID()) {
155  return nullptr;
156  }
157  return m_writeHandle->back();
158  }

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
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.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level  lvl) const
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.

180 { return msg() << lvl; }

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ MuonSensitiveDetector()

MuonG4R4::MuonSensitiveDetector::MuonSensitiveDetector

Constructor.

Parameters
nameName of the Sensitive detctor / AthMessaging module
output_keyKey under which the sim hits are written into store gate
trf_storeKeyLocation of the DetctorAlignmentStore holding the transformations per event
detMgrPointer to the run-4 detector manager

Definition at line 29 of file MuonSensitiveDetector.cxx.

29  :
30  G4VSensitiveDetector{name},
32  m_writeHandle{output_key},
33  m_trfCacheKey{trfStore_key},
34  m_detMgr{detMgr} {
35  m_trfCacheKey.initialize().ignore();
36  }

◆ ProcessHits()

G4bool MuonG4R4::MdtSensitiveDetector::ProcessHits ( G4Step *  aStep,
G4TouchableHistory *  ROhist 
)
finaloverridevirtual

Check whether the detector is sensitive to the traversing particle

Calculate the closest approach of the track w.r.t. the wire. We're starting with the post step position and if, there's a closer approach to the wire from that, the propagation distance will be always less than zero. Otherwise one would need to go forward along the trajectory

Closest approach of the step

Definition at line 50 of file MdtSensitiveDetector.cxx.

50  {
51 
53  if (!processStep(aStep)) {
54  return true;
55  }
56  G4Track* currentTrack = aStep->GetTrack();
57  const G4StepPoint* preStep = aStep->GetPreStepPoint();
58  const G4TouchableHistory* touchHist = static_cast<const G4TouchableHistory*>(preStep->GetTouchable());
59  const MdtReadoutElement* reEle{getReadoutElement(touchHist)};
60 
61  const ActsGeometryContext gctx{getGeoContext()};
62 
63 
64  const Identifier HitID = getIdentifier(gctx, reEle, touchHist);
65  if (!HitID.is_valid()) {
66  ATH_MSG_VERBOSE("No valid hit found");
67  return true;
68  }
69 
70  const Amg::Transform3D globalToLocal{reEle->globalToLocalTrans(gctx, reEle->measurementHash(HitID))};
71 
72  // transform pre and post step positions to local positions
73  const Amg::Vector3D prePosition{Amg::Hep3VectorToEigen(preStep->GetPosition())};
74  const Amg::Vector3D postPosition{Amg::Hep3VectorToEigen(aStep->GetPostStepPoint()->GetPosition())};
75 
76  const Amg::Vector3D trackDirection{(postPosition - prePosition).unit()};
77 
78  const Amg::Vector3D trackLocPos{globalToLocal * prePosition};
79  const Amg::Vector3D trackLocDir{globalToLocal.linear()* trackDirection};
80 
84  double lambda = Amg::intersect<3>(Amg::Vector3D::Zero(), Amg::Vector3D::UnitZ(),
85  trackLocPos, trackLocDir).value_or(0);
86  if (std::abs(currentTrack->GetDefinition()->GetPDGEncoding()) == 11) {
87  lambda = std::clamp(lambda, 0., aStep->GetStepLength());
88  }
90  const Amg::Vector3D driftHit{trackLocPos + lambda * trackLocDir};
91 
92 
93  const double globalTime{preStep->GetGlobalTime() + lambda / currentTrack->GetVelocity()};
94 
95  if (std::abs(currentTrack->GetDefinition()->GetPDGEncoding()) == 11) {
96  const xAOD::MuonSimHit* lastRecord = lastSnapShot(HitID, aStep);
97  if (lastRecord && lastRecord->localPosition().perp() < driftHit.perp()) {
98  return true;
99  }
100  }
101 
102  TrackHelper trkHelp{currentTrack};
103 
104  ATH_MSG_VERBOSE(" Dumping of hit "<<m_detMgr->idHelperSvc()->toString(HitID)
105  <<", barcode: "<<trkHelp.GenerateParticleLink().barcode()
106  <<", "<<(*currentTrack) <<", driftCircle: "<<Amg::toString(driftHit, 4)
107  <<", direction "<<Amg::toString(trackLocDir, 4) <<" to SimHit container ahead. ");
108  saveHit(HitID, driftHit, trackLocDir, globalTime, aStep);
109  return true;
110 }

◆ processStep()

bool MuonG4R4::MuonSensitiveDetector::processStep ( const G4Step *  step) const
protectedinherited

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

Parameters
stepG4 step to consider

Reject secondary particles

Sensitive detector is only sensitive to charged particles or Geantinos

Definition at line 57 of file MuonSensitiveDetector.cxx.

57  {
58  const G4Track* currentTrack = aStep->GetTrack();
59  ATH_MSG_VERBOSE("Check whether step pdgId: "<<(*currentTrack)<<" will be processed.");
61  constexpr double velCutOff = 10.*Gaudi::Units::micrometer / Gaudi::Units::second;
62  if (aStep->GetStepLength() < std::numeric_limits<float>::epsilon() || currentTrack->GetVelocity() < velCutOff) {
63  ATH_MSG_VERBOSE("Step length is too short ");
64  return false;
65  }
67  if (currentTrack->GetDefinition()->GetPDGCharge() == 0.0) {
68  ATH_MSG_VERBOSE("Particle is neutral");
69  return currentTrack->GetDefinition() == G4Geantino::GeantinoDefinition() ||
70  currentTrack->GetDefinition() == G4ChargedGeantino::ChargedGeantinoDefinition();
71  }
72  return true;
73  }

◆ propagateAndSaveStrip()

xAOD::MuonSimHit * MuonG4R4::MuonSensitiveDetector::propagateAndSaveStrip ( const Identifier hitId,
const Amg::Transform3D toGasGap,
const G4Step *  hitStep 
)
protectedinherited


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.

76  {
77 
78  const G4Track* currentTrack = aStep->GetTrack();
80  const Amg::Vector3D locPostStep{toGasGap*Amg::Hep3VectorToEigen(aStep->GetPostStepPoint()->GetPosition())};
81  Amg::Vector3D locPreStep{toGasGap*Amg::Hep3VectorToEigen(aStep->GetPreStepPoint()->GetPosition())};
82 
84  Amg::Vector3D locHitDir = toGasGap.linear() * Amg::Hep3VectorToEigen(currentTrack->GetMomentumDirection());
85 
88  xAOD::MuonSimHit* prevHit = lastSnapShot(hitID, aStep);
89  if (std::abs(currentTrack->GetParticleDefinition()->GetPDGEncoding()) == 11 && prevHit) {
90  locPreStep = xAOD::toEigen(prevHit->localPosition()) - 0.5* prevHit->stepLength() *
91  xAOD::toEigen(prevHit->localDirection());
92 
93  locHitDir = (locPostStep - locPreStep).unit();
94  }
95  const Amg::Vector3D locHitPos = 0.5* (locPreStep + locPostStep);
96  ATH_MSG_VERBOSE( m_detMgr->idHelperSvc()->toStringGasGap(hitID)<<" - track: "<<(*currentTrack)
97  <<", deposit: "<<aStep->GetTotalEnergyDeposit()<<", -- local coords: "
98  <<"prestep: "<<Amg::toString(locPreStep)<<", post step: "<<Amg::toString(locPostStep)
99  <<" mid point: "<< Amg::toString(locHitPos)<<", direction: "<<Amg::toString(locHitDir)
100  <<", deposit: "<<aStep->GetTotalEnergyDeposit());
101 
102  const double globalTime = currentTrack->GetGlobalTime() + locHitDir.dot(locPostStep - locHitPos) / currentTrack->GetVelocity();
103 
104  xAOD::MuonSimHit* newHit = saveHit(hitID, locHitPos, locHitDir, globalTime, aStep);
105  if (prevHit) {
106  newHit->setStepLength((locPostStep - locPreStep).mag());
107  }
108  return newHit;
109  }

◆ saveHit()

xAOD::MuonSimHit * MuonG4R4::MuonSensitiveDetector::saveHit ( const Identifier hitId,
const Amg::Vector3D hitPos,
const Amg::Vector3D hitDir,
const double  globTime,
const G4Step *  hitStep 
)
protectedinherited

Saves the current Step as a xAOD::MuonSimHit snapshot.

Parameters
hitIdIdentifier of the gasGap/ tube where the hit was deposited
hitPosLocal position of the hit expressed w.r.t gas gap coordinate system
hitDirLocal direction of the hit expressed w.r.t gas gap coordinate system
globTimeGlobal time of the hit
hitStepPointer to the step from which the hit information was derived.

Definition at line 110 of file MuonSensitiveDetector.cxx.

114  {
115  const G4Track* currentTrack = aStep->GetTrack();
116  TrackHelper trHelper{currentTrack};
117  // If Geant4 propagates the same track through the same volume just update the last hit and don't write a new one
118  xAOD::MuonSimHit* hit = lastSnapShot(hitId, aStep);
119  bool newHit{false};
120  if (!hit) {
121  hit = m_writeHandle->push_back(std::make_unique<xAOD::MuonSimHit>());
122  newHit = true;
123  }
124  dec_G4TrkId(*hit) = currentTrack->GetTrackID();
125  hit->setIdentifier(hitId);
126  hit->setLocalPosition(xAOD::toStorage(hitPos));
127  hit->setLocalDirection(xAOD::toStorage(hitDir));
128  hit->setMass(currentTrack->GetDefinition()->GetPDGMass());
129  hit->setGlobalTime(globTime);
130  hit->setPdgId(currentTrack->GetDefinition()->GetPDGEncoding());
131  hit->setEnergyDeposit(aStep->GetTotalEnergyDeposit() + (newHit ? 0. : hit->energyDeposit()));
132  hit->setKineticEnergy(currentTrack->GetKineticEnergy());
133  hit->setGenParticleLink(trHelper.GenerateParticleLink());
134  hit->setStepLength(aStep->GetStepLength());
135 
136  ATH_MSG_VERBOSE("Save new hit "<<m_detMgr->idHelperSvc()->toString(hitId)
137  <<", pdgId: "<<hit->pdgId()
138  <<", "<<hit->genParticleLink()
139  <<", trackId: "<<currentTrack->GetTrackID()<<", "
140  <<", "<<hit->genParticleLink().cptr()<<std::endl
141  <<"pos: "<<Amg::toString(hitPos)<<", dir: "<<Amg::toString(hitDir)<<", time: "<<globTime
142  <<", energy: "<<hit->kineticEnergy()<<", stepLength: "<<hit->stepLength()<<", "
143  <<", deposit energy: "<<hit->energyDeposit());
144  return hit;
145  }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
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.

29 {
30  m_lvl = lvl;
31 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_detMgr

const MuonGMR4::MuonDetectorManager* MuonG4R4::MuonSensitiveDetector::m_detMgr {nullptr}
protectedinherited

Pointer to the underlying detector manager.

Definition at line 81 of file MuonSensitiveDetector.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_trfCacheKey

SG::ReadHandleKey<ActsTrk::DetectorAlignStore> MuonG4R4::MuonSensitiveDetector::m_trfCacheKey
privateinherited

ReadHandleKey to the DetectorAlignmentStore caching the relevant transformations needed in this event.

Definition at line 45 of file MuonSensitiveDetector.h.

◆ m_writeHandle

SG::WriteHandle<xAOD::MuonSimHitContainer> MuonG4R4::MuonSensitiveDetector::m_writeHandle
privateinherited

Definition at line 42 of file MuonSensitiveDetector.h.


The documentation for this class was generated from the following files:
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:161
xAOD::MuonSimHit_v1::setIdentifier
void setIdentifier(const Identifier &id)
Sets the global ATLAS identifier.
Definition: xAODMuonSimHit_V1.cxx:43
MuonG4R4::MuonSensitiveDetector::m_writeHandle
SG::WriteHandle< xAOD::MuonSimHitContainer > m_writeHandle
Definition: MuonSensitiveDetector.h:42
xAOD::MuonSimHit_v1::stepLength
float stepLength() const
Returns the path length of the G4 step.
MuonG4R4::MuonSensitiveDetector::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the underlying detector manager.
Definition: MuonSensitiveDetector.h:81
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
MuonG4R4::MuonSensitiveDetector::processStep
bool processStep(const G4Step *step) const
Checks whether the current step shall be processed at all.
Definition: MuonSensitiveDetector.cxx:57
CxxUtils::tokenize
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Definition: Control/CxxUtils/Root/StringUtils.cxx:15
xAOD::MuonSimHit_v1::setPdgId
void setPdgId(int id)
Sets the pdgID of the traversing particle.
MuonG4R4::getTransform
Amg::Transform3D getTransform(const G4VTouchable *history, unsigned int level)
Extracts the local -> global transformation from a TouchableHistory at a given level.
Definition: MuonSpectrometer/MuonPhaseII/MuonG4/MuonSensitiveDetectorsR4/MuonSensitiveDetectorsR4/Utils.h:24
MuonG4R4::MuonSensitiveDetector::saveHit
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.
Definition: MuonSensitiveDetector.cxx:110
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
MuonG4R4::MuonSensitiveDetector::m_trfCacheKey
SG::ReadHandleKey< ActsTrk::DetectorAlignStore > m_trfCacheKey
ReadHandleKey to the DetectorAlignmentStore caching the relevant transformations needed in this event...
Definition: MuonSensitiveDetector.h:45
deg
#define deg
Definition: SbPolyhedron.cxx:17
xAOD::toStorage
MeasVector< N > toStorage(const AmgVector(N)&amgVec)
Converts the double precision of the AmgVector into the floating point storage precision of the MeasV...
Definition: MeasurementDefs.h:69
Muon::IMuonIdHelperSvc::toStringDetEl
virtual std::string toStringDetEl(const Identifier &id) const =0
print all fields up to detector element to string
xAOD::MuonSimHit_v1::setLocalPosition
void setLocalPosition(MeasVector< 3 > vec)
Sets the local position of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:56
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::MuonSimHit_v1::setGenParticleLink
void setGenParticleLink(const HepMcParticleLink &link)
Sets the link to the HepMC particle producing this hit.
Definition: xAODMuonSimHit_V1.cxx:78
xAOD::MuonSimHit_v1::pdgId
int pdgId() const
Returns the pdgID of the traversing particle.
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
xAOD::MuonSimHit_v1::setMass
void setMass(const float m)
set the rest-mass of the traversing particle
Amg::Hep3VectorToEigen
Amg::Vector3D Hep3VectorToEigen(const CLHEP::Hep3Vector &CLHEPvector)
Converts a CLHEP-based CLHEP::Hep3Vector into an Eigen-based Amg::Vector3D.
Definition: CLHEPtoEigenConverter.h:137
MuonG4R4::MdtSensitiveDetector::getReadoutElement
const MuonGMR4::MdtReadoutElement * getReadoutElement(const G4TouchableHistory *touchHist) const
Retrieves the matching readout element to a G4 hit.
Definition: MdtSensitiveDetector.cxx:24
TrackHelper
Definition: TrackHelper.h:14
xAOD::MuonSimHit_v1::kineticEnergy
float kineticEnergy() const
Returns the kinetic energy of the traversing particle.
xAOD::MuonSimHit_v1::setKineticEnergy
void setKineticEnergy(const float energy)
Sets the kinetic energy of the traversing particle.
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
MuonGMR4
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Definition: MdtCalibInput.h:19
xAOD::MuonSimHit_v1::genParticleLink
const HepMcParticleLink & genParticleLink() const
Returns the link to the HepMC particle producing this hit.
Definition: xAODMuonSimHit_V1.cxx:68
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonG4R4::MdtSensitiveDetector::getIdentifier
Identifier getIdentifier(const ActsGeometryContext &gctx, const MuonGMR4::MdtReadoutElement *reElement, const G4TouchableHistory *touchHist) const
Retrieves from the Readoutelement & the touchable history the Identifier.
Definition: MdtSensitiveDetector.cxx:111
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Muon::IMuonIdHelperSvc::toStringGasGap
virtual std::string toStringGasGap(const Identifier &id) const =0
print all fields up to gas gap to string
MdtIdHelper
Definition: MdtIdHelper.h:61
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
xAOD::MuonSimHit_v1::localDirection
ConstVectorMap< 3 > localDirection() const
Returns the local direction of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:66
Amg::isIdentity
bool isIdentity(const Amg::Transform3D &trans)
Checks whether the transformation is the Identity transformation.
Definition: GeoPrimitivesHelpers.h:393
python.SystemOfUnits.micrometer
int micrometer
Definition: SystemOfUnits.py:71
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::MuonSimHit_v1::setStepLength
void setStepLength(const float length)
Set the path length of the G4 step.
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
xAOD::MuonSimHit_v1::setEnergyDeposit
void setEnergyDeposit(const float deposit)
Sets the energy deposited by the traversing particle inside the gas volume.
MuonGMR4::MdtReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:22
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Muon::IMuonIdHelperSvc::mdtIdHelper
virtual const MdtIdHelper & mdtIdHelper() const =0
access to MdtIdHelper
xAOD::MuonSimHit_v1::setLocalDirection
void setLocalDirection(MeasVector< 3 > vec)
Sets the local direction of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:62
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
THROW_EXCEPTION
#define THROW_EXCEPTION(MESSAGE)
Definition: throwExcept.h:10
MuonG4R4::MuonSensitiveDetector::lastSnapShot
xAOD::MuonSimHit * lastSnapShot(const Identifier &gasGapId, const G4Step *hitStep)
Returns the last snap shot of the traversing particle.
Definition: MuonSensitiveDetector.cxx:146
Muon::IMuonIdHelperSvc::toString
virtual std::string toString(const Identifier &id) const =0
print all fields to string
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:21
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
MuonGMR4::MuonDetectorManager::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns a pointer to the central MuonIdHelperSvc.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx:140
xAOD::MuonSimHit_v1::localPosition
ConstVectorMap< 3 > localPosition() const
Returns the local postion of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:60
xAOD::MuonSimHit_v1::energyDeposit
float energyDeposit() const
Returns the energy deposited by the traversing particle inside the gas volume.
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:159
HitID
int HitID
Definition: GenericMuonSimHit.h:13
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
sTgcDigitEffiDump.multiLayer
int multiLayer
Definition: sTgcDigitEffiDump.py:36
NSWL1::globalToLocal
Polygon globalToLocal(const Polygon &pol, float z, const Trk::PlaneSurface &surf)
Definition: GeoUtils.cxx:103
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:26
xAOD::MuonSimHit_v1::setGlobalTime
void setGlobalTime(const float time)
Sets the time of the traversing particle.
calibdata.tube
tube
Definition: calibdata.py:31
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonG4R4::MuonSensitiveDetector::getGeoContext
ActsGeometryContext getGeoContext() const
Returns the current geometry context in the event.
Definition: MuonSensitiveDetector.cxx:48
Identifier
Definition: IdentifierFieldParser.cxx:14