|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include <CLHEP/Random/RandGaussZiggurat.h>
21 ISvcLocator* pSvcLocator):
30 return StatusCode::SUCCESS;
34 if (!simHitContainer.isPresent()){
36 return StatusCode::FAILURE;
40 if (!mdtCalibData.isValid()) {
42 return StatusCode::FAILURE;
46 ATH_CHECK(prdContainer.record(std::make_unique<xAOD::MdtDriftCircleContainer>(),
47 std::make_unique<xAOD::MdtDriftCircleAuxContainer>()));
54 if (std::abs(simHit->pdgId()) != 13)
continue;
58 prdContainer->push_back(prd);
61 prd->
setLayer(id_helper.tubeLayer(hitId));
62 prd->
setTube(id_helper.tube(hitId));
71 const Amg::Vector3D lHitPos{xAOD::toEigen(simHit->localPosition())};
76 const double targetRadius = std::clamp(1.*CLHEP::RandGaussZiggurat::shoot(rndEngine, lHitPos.perp(), resol),
83 const double tdcTime = targetRadius * targetRadius + sigPropTime;
89 const uint16_t tdcCounts = (tdcTime + simHit->globalTime()) * timeToTdcCnv* (
m_idHelperSvc->hasHPTDC(hitId) ? 4. : 1.);
93 return StatusCode::SUCCESS;
99 rngWrapper->
setSeed(rngName, ctx);
def retrieve(aClass, aKey=None)
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
void setTdc(int16_t tdc)
Setter methods.
xAODSimHitToMdtMeasCnvAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< xAOD::MdtDriftCircleContainer > m_writeKey
IdentifierHash measurementHash() const
Returns the hash of the measurement channel (tube (x) layer)
double activeTubeLength(const IdentifierHash &hash) const
ServiceHandle< IAthRNGSvc > m_rndmSvc
class which holds the full set of calibration constants for a given tube
CLHEP::HepRandomEngine * getRandomEngine(const EventContext &ctx) const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
An algorithm that can be simultaneously executed in multiple threads.
double readoutSide
Is the readout chip at positive or negative Z?
SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainer > m_calibDbKey
Handle class for recording to StoreGate.
void setIdentifier(const DetectorIdentType measId)
Sets the full Identifier of the measurement.
const MuonGMR4::MuonDetectorManager * m_DetMgr
Access to the new readout geometry.
MdtDriftCircle_v1 MdtDriftCircle
Defined the version of the MdtDriftCircle.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
TubeContainerPtr tubeCalib
void setIdentifierHash(const DetectorIDHashType idHash)
Sets the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash)
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode initialize() override
double innerTubeRadius() const
Returns the inner tube radius.
A wrapper class for event-slot-local random engines.
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
void setReadoutElement(const MuonGMR4::MdtReadoutElement *readoutEle)
set the pointer to the MdtReadoutElement
value_type get_compact(void) const
Get the compact id.
void setLayer(uint8_t layer_n)
Sets the layer number.
StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< xAOD::MuonSimHitContainer > m_readKey
const parameterBook & getParameters() const
Gaudi::Property< std::string > m_streamName
Handle class for reading from StoreGate.
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
void setDriftRadCov(float cov)
Sets the covariance on the drift circle.
void setDriftRadius(float r)
Sets the drift radius of the drift circle.
void setTube(uint16_t tube_n)
Sets the tube number.