ATLAS Offline Software
RpcFastDigiTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #include "RpcFastDigiTool.h"
6 #include "CLHEP/Random/RandGaussZiggurat.h"
7 #include "CLHEP/Random/RandFlat.h"
8 namespace {
9  constexpr double percentage(unsigned int numerator, unsigned int denom) {
10  return 100. * numerator / std::max(denom, 1u);
11  }
13  const Eigen::Rotation2D etaToPhi{-90.*Gaudi::Units::deg};
14 }
15 namespace MuonR4 {
16 
17  RpcFastDigiTool::RpcFastDigiTool(const std::string& type, const std::string& name, const IInterface* pIID):
19 
24  m_stIdxBIL = m_idHelperSvc->rpcIdHelper().stationNameIndex("BIL");
25  m_stIdxBIS = m_idHelperSvc->rpcIdHelper().stationNameIndex("BIS");
26  return StatusCode::SUCCESS;
27  }
29  ATH_MSG_INFO("Tried to convert "<<m_allHits[0]<<"/"<<m_allHits[1]<<" hits. In, "
30  <<percentage(m_acceptedHits[0], m_allHits[0]) <<"/"
31  <<percentage(m_acceptedHits[1], m_allHits[1]) <<"% of the cases, the conversion was successful");
32  return StatusCode::SUCCESS;
33  }
34  StatusCode RpcFastDigiTool::digitize(const EventContext& ctx,
35  const TimedHits& hitsToDigit,
36  xAOD::MuonSimHitContainer* sdoContainer) const {
37  const RpcIdHelper& idHelper{m_idHelperSvc->rpcIdHelper()};
38  // Prepare the temporary cache
39  DigiCache digitCache{};
41  const Muon::DigitEffiData* efficiencyMap{nullptr};
42  ATH_CHECK(retrieveConditions(ctx, m_effiDataKey, efficiencyMap));
43 
44  CLHEP::HepRandomEngine* rndEngine = getRandomEngine(ctx);
45  xAOD::ChamberViewer viewer{hitsToDigit, m_idHelperSvc.get()};
46  do {
47  DeadTimeMap deadTimes{};
48  for (const TimedHit& simHit : viewer) {
49  if (m_digitizeMuonOnly && std::abs(simHit->pdgId()) != 13){
50  continue;
51  }
52  const Identifier hitId{simHit->identify()};
53 
54  const MuonGMR4::RpcReadoutElement* readOutEle = m_detMgr->getRpcReadoutElement(hitId);
55  const Amg::Vector3D locPos{xAOD::toEigen(simHit->localPosition())};
56  RpcDigitCollection* digiColl = fetchCollection(hitId, digitCache);
57  bool run4_BIS = ((m_idHelperSvc->stationName(hitId) == m_stIdxBIS) && (abs(m_idHelperSvc->stationEta(hitId)) < 7));
58  if ((m_idHelperSvc->stationName(hitId) != m_stIdxBIL) && !(run4_BIS)) {
60  const bool digitizedEta = digitizeHit(hitId, false, *readOutEle,
61  hitTime(simHit), locPos.block<2,1>(0,0),
62  efficiencyMap, *digiColl, rndEngine, deadTimes);
63 
64  const bool digitizedPhi = digitizeHit(hitId, true, *readOutEle, hitTime(simHit),
65  etaToPhi*locPos.block<2,1>(0,0),
66  efficiencyMap, *digiColl, rndEngine, deadTimes);
67  if (digitizedEta) {
68  xAOD::MuonSimHit* sdo = addSDO(simHit, sdoContainer);
69  const Identifier digitId{(*digiColl)[digiColl->size() -1 - digitizedPhi]->identify()};
70  sdo->setIdentifier(digitId);
71  } else if (digitizedPhi) {
72  xAOD::MuonSimHit* sdo = addSDO(simHit, sdoContainer);
74  Amg::Vector3D phiPos{locPos};
75  phiPos.block<2,1>(0,0) = etaToPhi * phiPos.block<2,1>(0,0);
76  Amg::Vector3D locDir{xAOD::toEigen(simHit->localDirection())};
77  locDir.block<2,1>(0,0) = etaToPhi * locDir.block<2,1>(0,0);
78  const Identifier digitId{(*digiColl)[digiColl->size() -1]->identify()};
79  sdo->setIdentifier(digitId);
81  sdo->setLocalPosition(xAOD::toStorage(phiPos));
82  }
83  } else if (digitizeHitBI(hitId, *readOutEle, hitTime(simHit), locPos.block<2,1>(0,0),
84  efficiencyMap, *digiColl, rndEngine, deadTimes)) {
85  xAOD::MuonSimHit* sdo = addSDO(simHit, sdoContainer);
86  const Identifier digitId{(*digiColl)[digiColl->size() -1]->identify()};
87  sdo->setIdentifier(digitId);
88  }
89  }
90  } while (viewer.next());
92  ATH_CHECK(writeDigitContainer(ctx, m_writeKey, std::move(digitCache), idHelper.module_hash_max()));
93  return StatusCode::SUCCESS;
94  }
96  const bool measuresPhi,
97  const MuonGMR4::RpcReadoutElement& reEle,
98  const double hitTime,
99  const Amg::Vector2D& locPos,
100  const Muon::DigitEffiData* effiMap,
101  RpcDigitCollection& outContainer,
102  CLHEP::HepRandomEngine* rndEngine,
103  DeadTimeMap& deadTimes) const {
104 
105  ++(m_allHits[measuresPhi]);
106  const MuonGMR4::StripDesign& design{measuresPhi ? *reEle.getParameters().phiDesign
107  : *reEle.getParameters().etaDesign};
108 
109  const double uncert = design.stripPitch() / std::sqrt(12.);
110  const double smearedX = CLHEP::RandGaussZiggurat::shoot(rndEngine, locPos.x(), uncert);
111  const Amg::Vector2D locHitPos{smearedX, locPos.y()};
112 
113  if (!design.insideTrapezoid(locHitPos)) {
114  ATH_MSG_VERBOSE("The hit "<<Amg::toString(locHitPos)<<" is outside of the trapezoid bounds for "
115  <<m_idHelperSvc->toStringGasGap(gasGapId)<<", measuresPhi: "<<(measuresPhi ? "yay" : "nay"));
116  return false;
117  }
118  const int strip = design.stripNumber(locHitPos);
119  if (strip < 0) {
120  ATH_MSG_VERBOSE("Hit " << Amg::toString(locHitPos) << " cannot trigger any signal in a strip for "
121  << m_idHelperSvc->toStringGasGap(gasGapId) <<std::endl<<design<<
122  std::endl<<", measuresPhi: "<<(measuresPhi ? "yay" : "nay"));
123  return false;
124  }
125 
126  const RpcIdHelper& id_helper{m_idHelperSvc->rpcIdHelper()};
127 
128  bool isValid{false};
129  const Identifier digitId{id_helper.channelID(gasGapId,
130  id_helper.doubletZ(gasGapId),
131  id_helper.doubletPhi(gasGapId),
132  id_helper.gasGap(gasGapId),
133  measuresPhi, strip, isValid)};
134 
135  if (!isValid) {
136  ATH_MSG_WARNING("Invalid hit identifier obtained for "<<m_idHelperSvc->toStringGasGap(gasGapId)
137  <<", eta strip "<<strip<<" & hit "<<Amg::toString(locHitPos,2 )
138  <<" /// "<<design);
139  return false;
140  }
142  if (effiMap && effiMap->getEfficiency(digitId) < CLHEP::RandFlat::shoot(rndEngine,0.,1.)) {
143  ATH_MSG_VERBOSE("Hit is marked as inefficient");
144  return false;
145  }
146 
147  if (!passDeadTime(digitId, hitTime, m_deadTime, deadTimes)) {
148  ATH_MSG_VERBOSE("Reject hit due to dead map constraint");
149  return false;
150  }
152  const double signalTime = hitTime + reEle.distanceToEdge(reEle.measurementHash(digitId),
154  const double digitTime = CLHEP::RandGaussZiggurat::shoot(rndEngine, signalTime, m_stripTimeResolution);
155  outContainer.push_back(std::make_unique<RpcDigit>(digitId, digitTime, timeOverThreshold(rndEngine)));
156  ++(m_acceptedHits[measuresPhi]);
157  return true;
158  }
160  const MuonGMR4::RpcReadoutElement& reEle,
161  const double hitTime,
162  const Amg::Vector2D& locPos,
163  const Muon::DigitEffiData* effiMap,
164  RpcDigitCollection& outContainer,
165  CLHEP::HepRandomEngine* rndEngine,
166  DeadTimeMap& deadTimes) const {
167 
168  ++(m_allHits[false]);
169  const MuonGMR4::StripDesign& design{*reEle.getParameters().etaDesign};
170  const RpcIdHelper& id_helper{m_idHelperSvc->rpcIdHelper()};
171 
172 
174  const double uncert = design.stripPitch() / std::sqrt(12.);
175  const double smearedX = CLHEP::RandGaussZiggurat::shoot(rndEngine, locPos.x(), uncert);
176 
178  // True propagation time in nanoseconds along strip to y=-stripLength/2 (L) and y=stripLength/2 (R)
179  const IdentifierHash layHash = reEle.layerHash(gasGapId);
180  const double propagationTimeL = reEle.distanceToEdge(layHash, locPos, EdgeSide::readOut) / m_propagationVelocity;
181  const double propagationTimeR = reEle.distanceToEdge(layHash, locPos, EdgeSide::highVoltage)/ m_propagationVelocity;
182 
184  const double smearedTimeL = CLHEP::RandGaussZiggurat::shoot(rndEngine, propagationTimeL, m_stripTimeResolution);
185  const double smearedTimeR = CLHEP::RandGaussZiggurat::shoot(rndEngine, propagationTimeR, m_stripTimeResolution);
186 
187  const double smearedDeltaT = smearedTimeR - smearedTimeL;
188 
189  /*
190  |--- d1, t1 ---||--- d1, t1 ---||-- d --| For t2 > t1:
191  ||||||||||||||||X|||||||||||||||||||||||| <- RPC strip, deltaT = t2 - t1, d1 = v_prop * t1 (likewise for d2),
192  |-------- d2, t2 -------| X is a hit l = d1 + d2, d = d2 - d1 -> d = l - 2d1 = v_prop * deltaT
193  |----------------- l -------------------|
194  Hence, d1 = 0.5 * (l - d) = 0.5 * (l - v_prop * deltaT)
195 
196  Then converting to coordinate system where 0 -> -0.5*l to match strip local coordinates
197  d1 -> d1 = -0.5*l + 0.5* (l-d) = -0.5*d = -0.5 * v_pro*deltaT
198  */
199  const double smearedY = -0.5 * m_propagationVelocity * smearedDeltaT; //in mm
200  //If smearedDeltaT == 0 position is in the centre of the strip (0).
201 
202  const Amg::Vector2D locHitPos{smearedX, smearedY};
203 
204  if (!design.insideTrapezoid(locHitPos)) {
205  ATH_MSG_VERBOSE("The hit "<<Amg::toString(locHitPos)<<" is outside of the trapezoid bounds for "
206  <<m_idHelperSvc->toStringGasGap(gasGapId));
207  return false;
208  }
209 
210  const int strip = design.stripNumber(locHitPos);
211  if (strip < 0) {
212  ATH_MSG_VERBOSE("Hit " << Amg::toString(locHitPos) << " cannot trigger any signal in a strip for "
213  << m_idHelperSvc->toStringGasGap(gasGapId) <<std::endl<<design);
214  return false;
215  }
216 
217 
218  bool isValid{false};
219  const Identifier digitId{id_helper.channelID(gasGapId,
220  id_helper.doubletZ(gasGapId),
221  id_helper.doubletPhi(gasGapId),
222  id_helper.gasGap(gasGapId),
223  false, strip, isValid)};
224  if (!isValid) {
225  ATH_MSG_WARNING("Failed to create a valid strip "<<m_idHelperSvc->toStringGasGap(gasGapId)
226  <<", strip: "<<strip);
227  return false;
228  }
229  if (!passDeadTime(digitId, hitTime, m_deadTime, deadTimes)) {
230  ATH_MSG_VERBOSE("Reject hit due to dead map constraint");
231  return false;
232  }
233  ATH_MSG_VERBOSE("Digitize hit "<<m_idHelperSvc->toString(digitId)<<" located at: "<<Amg::toString(locHitPos));
235  const bool effiSignal1 = !effiMap || effiMap->getEfficiency(gasGapId) >= CLHEP::RandFlat::shoot(rndEngine,0., 1.);
236  const bool effiSignal2 = !effiMap || effiMap->getEfficiency(gasGapId) >= CLHEP::RandFlat::shoot(rndEngine,0., 1.);
237  if (effiSignal1) {
238  outContainer.push_back(std::make_unique<RpcDigit>(digitId, hitTime + smearedTimeR, timeOverThreshold(rndEngine)));
239  }
240  if (effiSignal2) {
241  outContainer.push_back(std::make_unique<RpcDigit>(digitId, hitTime + smearedTimeL, timeOverThreshold(rndEngine), true));
242  }
243  if (effiSignal1 || effiSignal2) {
244  ++(m_acceptedHits[false]);
245  return true;
246  }
247  return false;
248  }
249  double RpcFastDigiTool::timeOverThreshold(CLHEP::HepRandomEngine* rndmEngine) {
250  //mn Time-over-threshold modeled as a narrow and a wide gaussian
251  //mn based on the fit documented in https://its.cern.ch/jira/browse/ATLASRECTS-7820
252  constexpr double tot_mean_narrow = 16.;
253  constexpr double tot_sigma_narrow = 2.;
254  constexpr double tot_mean_wide = 15.;
255  constexpr double tot_sigma_wide = 4.5;
256 
257  double thetot = 0.;
258 
259  if (CLHEP::RandFlat::shoot(rndmEngine)<0.75) {
260  thetot = CLHEP::RandGaussZiggurat::shoot(rndmEngine, tot_mean_narrow, tot_sigma_narrow);
261  } else {
262  thetot = CLHEP::RandGaussZiggurat::shoot(rndmEngine, tot_mean_wide, tot_sigma_wide);
263  }
264 
265  return std::max(thetot, 0.);
266  }
267 
268 }
MuonR4::MuonDigitizationTool::passDeadTime
static bool passDeadTime(const Identifier &channelId, const double hitTime, const double deadTimeWindow, DeadTimeMap &deadTimeMap)
Returns whether the new digit is within the dead time window.
Definition: MuonDigitizationTool.cxx:169
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
MuonGMR4::StripDesign
Definition: StripDesign.h:30
MuonR4::RpcFastDigiTool::m_effiDataKey
SG::ReadCondHandleKey< Muon::DigitEffiData > m_effiDataKey
Definition: RpcFastDigiTool.h:77
xAOD::MuonSimHit_v1::setIdentifier
void setIdentifier(const Identifier &id)
Sets the global ATLAS identifier.
Definition: xAODMuonSimHit_V1.cxx:43
MuonR4::RpcFastDigiTool::m_stripTimeResolution
Gaudi::Property< double > m_stripTimeResolution
Definition: RpcFastDigiTool.h:86
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
RpcDigitCollection
Definition: RpcDigitCollection.h:17
MuonR4::RpcFastDigiTool::m_stIdxBIL
int m_stIdxBIL
Definition: RpcFastDigiTool.h:30
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:68
MuonGMR4::RpcReadoutElement::parameterBook::etaDesign
StripDesignPtr etaDesign
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/RpcReadoutElement.h:39
xAOD::MuonSimHit_v1::setLocalPosition
void setLocalPosition(MeasVector< 3 > vec)
Sets the local position of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:55
MuonR4::RpcFastDigiTool::initialize
StatusCode initialize() override final
Definition: RpcFastDigiTool.cxx:20
TimedHitPtr< xAOD::MuonSimHit >
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:620
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
MuonR4::RpcFastDigiTool::DigiCache
OutDigitCache_t< RpcDigitCollection > DigiCache
Definition: RpcFastDigiTool.h:74
MuonGMR4::RpcReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/RpcReadoutElement.h:17
RpcIdHelper
Definition: RpcIdHelper.h:51
MuonR4::MuonDigitizationTool::retrieveConditions
StatusCode retrieveConditions(const EventContext &ctx, const SG::ReadCondHandleKey< Container > &key, const Container *&contPtr) const
Helper function to access the conditions data.
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
MuonGMR4::RpcReadoutElement::getParameters
const parameterBook & getParameters() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/RpcReadoutElement.cxx:34
RpcFastDigiTool.h
MuonR4::RpcFastDigiTool::RpcFastDigiTool
RpcFastDigiTool(const std::string &type, const std::string &name, const IInterface *pIID)
Definition: RpcFastDigiTool.cxx:17
MuonR4::RpcFastDigiTool::m_deadTime
Gaudi::Property< double > m_deadTime
Definition: RpcFastDigiTool.h:89
xAOD::ChamberViewer
Definition: ChamberViewer.h:65
MuonR4::RpcFastDigiTool::m_digitizeMuonOnly
Gaudi::Property< bool > m_digitizeMuonOnly
Definition: RpcFastDigiTool.h:91
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonGMR4::RpcReadoutElement::parameterBook::phiDesign
StripDesignPtr phiDesign
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/RpcReadoutElement.h:38
MuonR4::RpcFastDigiTool::digitizeHitBI
bool digitizeHitBI(const Identifier &gasGapId, const MuonGMR4::RpcReadoutElement &reEle, const double hitTime, const Amg::Vector2D &locPos, const Muon::DigitEffiData *effiMap, RpcDigitCollection &outContainer, CLHEP::HepRandomEngine *rndEngine, DeadTimeMap &deadTimes) const
Digitize the sim hit as Rpc strip 2D hit.
Definition: RpcFastDigiTool.cxx:159
MuonR4::MuonDigitizationTool::getRandomEngine
CLHEP::HepRandomEngine * getRandomEngine(const EventContext &ctx) const
Definition: MuonDigitizationTool.cxx:135
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonR4::RpcFastDigiTool::m_writeKey
SG::WriteHandleKey< RpcDigitContainer > m_writeKey
Definition: RpcFastDigiTool.h:75
MuonR4::RpcFastDigiTool::m_stIdxBIS
int m_stIdxBIS
Definition: RpcFastDigiTool.h:31
Muon::DigitEffiData::getEfficiency
double getEfficiency(const Identifier &channelId, bool isInnerQ1=false) const
Returns the signal generation efficiency of the sTgc channel.
Definition: DigitEffiData.cxx:36
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonGMR4::RpcReadoutElement::measurementHash
IdentifierHash measurementHash(const Identifier &measId) const override final
Constructs the identifier hash from the full measurement Identifier.
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
MuonR4::RpcFastDigiTool::digitize
StatusCode digitize(const EventContext &ctx, const TimedHits &hitsToDigit, xAOD::MuonSimHitContainer *sdoContainer) const override final
Digitize the time ordered hits and write them to the digit format specific for the detector technolog...
Definition: RpcFastDigiTool.cxx:34
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
compute_lumi.denom
denom
Definition: compute_lumi.py:76
MuonR4::RpcFastDigiTool::m_propagationVelocity
Gaudi::Property< double > m_propagationVelocity
Definition: RpcFastDigiTool.h:83
Muon::DigitEffiData
Definition: DigitEffiData.h:23
MuonR4::MuonDigitizationTool::addSDO
xAOD::MuonSimHit * addSDO(const TimedHit &hit, xAOD::MuonSimHitContainer *sdoContainer) const
Adds the timed simHit to the output SDO container.
Definition: MuonDigitizationTool.cxx:148
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonR4::MuonDigitizationTool::writeDigitContainer
StatusCode writeDigitContainer(const EventContext &ctx, const SG::WriteHandleKey< DigitCont > &key, OutDigitCache_t< DigitColl > &&digitCache, unsigned int hashMax) const
Helper function to move the collected digits into the final DigitContainer.
xAOD::MuonSimHit_v1::setLocalDirection
void setLocalDirection(MeasVector< 3 > vec)
Sets the local direction of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:61
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
MuonGMR4::RpcReadoutElement::layerHash
IdentifierHash layerHash(const Identifier &measId) const override final
ChamberViewer.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.copyTCTOutput.locDir
locDir
Definition: copyTCTOutput.py:113
MuonGMR4::RpcReadoutElement::distanceToEdge
double distanceToEdge(const IdentifierHash &layerHash, const Amg::Vector2D &posInStripPlane, const EdgeSide side) const
Returns the disance to the readout.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/RpcReadoutElement.cxx:91
MuonR4::MuonDigitizationTool::hitTime
static double hitTime(const TimedHit &hit)
Returns the global time of the hit which is the sum of eventTime & individual hit time.
Definition: MuonDigitizationTool.cxx:69
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::MuonDigitizationTool::initialize
StatusCode initialize() override
Definition: MuonDigitizationTool.cxx:17
MuonR4::MuonDigitizationTool
Barebone implementation of the I/O infrastructure for all MuonDigitizationTools.
Definition: MuonDigitizationTool.h:41
MuonR4::MuonDigitizationTool::TimedHits
std::vector< TimedHitPtr< xAOD::MuonSimHit > > TimedHits
Definition: MuonDigitizationTool.h:71
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonR4::RpcFastDigiTool::finalize
StatusCode finalize() override final
Definition: RpcFastDigiTool.cxx:28
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonR4::MuonDigitizationTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonDigitizationTool.h:142
MuonR4::MuonDigitizationTool::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: MuonDigitizationTool.h:140
MuonGMR4::RpcReadoutElement::EdgeSide::highVoltage
@ highVoltage
MuonR4::MuonDigitizationTool::DeadTimeMap
std::unordered_map< Identifier, double > DeadTimeMap
Definition: MuonDigitizationTool.h:129
MuonR4::RpcFastDigiTool::digitizeHit
bool digitizeHit(const Identifier &gasGapId, const bool measuresPhi, const MuonGMR4::RpcReadoutElement &reEle, const double hitTime, const Amg::Vector2D &locPos, const Muon::DigitEffiData *effiMap, RpcDigitCollection &outContainer, CLHEP::HepRandomEngine *rndEngine, DeadTimeMap &deadTimes) const
Digitize the sim hit as Rpc strip 1D hit.
Definition: RpcFastDigiTool.cxx:95
MuonGMR4::RpcReadoutElement::EdgeSide::readOut
@ readOut
hitTime
float hitTime(const AFP_SIDSimHit &hit)
Definition: AFP_SIDSimHit.h:39
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
MuonR4::MuonDigitizationTool::fetchCollection
DigitColl * fetchCollection(const Identifier &hitId, OutDigitCache_t< DigitColl > &digitCache) const
Helper function that provides fetches the proper DigitCollection from the DigitCache for a given hit ...
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
MuonR4::RpcFastDigiTool::timeOverThreshold
static double timeOverThreshold(CLHEP::HepRandomEngine *rndmEngine)
Roll the time over threshold for each signal digit.
Definition: RpcFastDigiTool.cxx:249
Identifier
Definition: IdentifierFieldParser.cxx:14