24 if (!MuonDetMgr) {
return false; }
25 unsigned int n_hits{0};
28 if (!rpcContainer->size())
ATH_MSG_DEBUG(
"RPC sdo container is empty");
29 for (
const RPCSimHit& hit : *rpcContainer) {
30 HitID hitid = hit.RPCid();
50 << stname <<
", eta=" << steta <<
", phi=" << stphi <<
", doubletR=" << dbr <<
", doubletZ=" << dbz
51 <<
", doubletPhi=" << dbp <<
", gasGap=" << gg <<
", measuresPhi=" << mfi <<
"; skipping...");
57 ATH_MSG_ERROR(
"RPCSimHitVariables::fillVariables() - Failed to retrieve RpcReadoutElement for "
82 pdgId = genP->pdg_id();
86 << stname <<
" (eta=" << steta <<
", phi=" << stphi <<
", doubletR=" << dbr <<
", doubletZ=" << dbz
87 <<
", doubletPhi=" << dbp <<
", gasgaplayer=" << gg <<
", measuresPhi=" << mfi <<
")");
91 if (
msgLvl(barcode == 0 ? MSG::DEBUG : MSG::WARNING)) {
92 msg(barcode == 0 ? MSG::DEBUG : MSG::WARNING)
93 <<
"HepMcParticleLink with barcode=" << barcode <<
" is not valid for hit in " << stname <<
" (eta=" << steta
94 <<
", phi=" << stphi <<
", doubletR=" << dbr <<
", doubletZ=" << dbz <<
", doubletPhi=" << dbp
95 <<
", gasgaplayer=" << gg <<
", measuresPhi=" << mfi <<
")" <<
endmsg;
#define ATH_MSG_WARNING(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
MsgStream & msg() const
The standard message stream.
bool msgLvl(const MSG::Level lvl) const
Test the output level.
a link optimized in size for a GenParticle in a McEventCollection
bool isValid() const
Validity check.
HepMC::ConstGenParticlePtr cptr() const
Dereference.
int barcode() const
Return the barcode of the target particle.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const Amg::Vector3D globalPosition() const
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Amg::Vector3D localToGlobalCoords(const Amg::Vector3D &x, const Identifier &id) const
Attention: these transformations do not represent the tracking transformations as obtained by the tra...
const MuonGM::MuonDetectorManager * getDetMgr(const EventContext &ctx) const
const Muon::IMuonIdHelperSvc * idHelperSvc() const
PrdTesterModule(MuonTesterTree &tree, const std::string &grp_name, MSG::Level msglvl)
VectorBranch< int > & m_RPC_particleEncoding
RPCSimHitVariables(MuonTesterTree &tree, const std::string &container_name, MSG::Level msglvl)
bool fill(const EventContext &ctx) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
VectorBranch< int > & m_RPC_trackId
VectorBranch< int > & m_RPC_truthEl
VectorBranch< float > & m_RPC_kineticEnergy
RpcIdentifierBranch m_rpc_Id
VectorBranch< float > & m_RPC_depositEnergy
ThreeVectorBranch m_RPC_detector_globalPosition
VectorBranch< float > & m_RPC_hitLocalPositionY
bool declare_keys() override final
VectorBranch< float > & m_RPC_hitLocalPositionX
ThreeVectorBranch m_RPC_hitGlobalPosition
SG::ReadHandleKey< RPCSimHitCollection > m_key
VectorBranch< float > & m_RPC_globalTime
VectorBranch< float > & m_RPC_StepLength
ScalarBranch< unsigned int > & m_RPC_nSimHits
bool declare_dependency(Key &key)
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
TTree * tree() override final
Returns the underlying TTree object.
virtual const RpcIdHelper & rpcIdHelper() const =0
access to RpcIdHelper
int GetDoubletPhi(const int &hid) const
static const RpcHitIdHelper * GetHelper(unsigned int nGasGaps=2)
int GetPhiSector(const int &hid) const
int GetDoubletR(const int &hid) const
int GetGasGapLayer(const int &hid) const
int GetMeasuresPhi(const int &hid) const
std::string GetStationName(const int &hid) const
int GetDoubletZ(const int &hid) const
int GetZSector(const int &hid) const
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Eigen::Matrix< double, 3, 1 > Vector3D
const GenParticle * ConstGenParticlePtr