19 if (!MuonDetMgr) {
return false; }
29 unsigned int numHits{0};
30 for (
const CSCSimHit& hit : *cscContainer) {
31 HitID hitid = hit.CSCid();
43 ATH_MSG_WARNING(
"Cannot build a valid Identifier for CSC stationName=" << stname <<
", eta=" << steta <<
", phi=" << stphi
44 <<
", chamberLayer=" << clayer <<
", wireLayer=" << wlayer
51 ATH_MSG_ERROR(
"CSCSimHitVariables::fillVariables() - Failed to retrieve CscReadoutElement for "
69 int pdgId{-999}, barcode{-999};
75 pdgId = genP->pdg_id();
78 ATH_MSG_WARNING(
"GenParticle is nullptr for hit in " << stname <<
" (eta=" << steta <<
", phi=" << stphi <<
", chamberlayer=" << clayer
79 <<
", wirelayer=" << wlayer <<
")");
83 if (
msgLvl(barcode == 0 ? MSG::DEBUG : MSG::WARNING)) {
84 msg(barcode == 0 ? MSG::DEBUG : MSG::WARNING)
85 <<
"HepMcParticleLink with barcode=" << barcode <<
" is not valid for hit in " << stname <<
" (eta=" << steta
86 <<
", phi=" << stphi <<
", chamberlayer=" << clayer <<
", wirelayer=" << wlayer <<
")" <<
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.
Helpers for checking error return status codes and reporting errors.
MsgStream & msg() const
The standard message stream.
bool msgLvl(const MSG::Level lvl) const
Test the output level.
int GetWireLayer(const int &hid) const
int GetZSector(const int &hid) const
int GetPhiSector(const int &hid) const
std::string GetStationName(const int &hid) const
int GetChamberLayer(const int &hid) const
static const CscHitIdHelper * GetHelper()
Identifier channelID(int stationName, int stationEta, int stationPhi, int chamberLayer, int wireLayer, int measuresPhi, int strip) const
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.
Amg::Vector3D localToGlobalCoords(const Amg::Vector3D &x, const Identifier &id) const
localToGlobalCoords and Transf connect the Gas Gap Frame (defined as a Sensitive Detector) to the Glo...
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const Amg::Vector3D globalPosition() const
CSCSimHitVariables(MuonTesterTree &tree, const std::string &container_name, MSG::Level msglvl)
VectorBranch< int > & m_CSC_trackId
bool declare_keys() override final
VectorBranch< float > & m_CSC_depositEnergy
ThreeVectorBranch m_CSC_hitGlobalPosition
ScalarBranch< unsigned int > & m_CSC_nSimHits
VectorBranch< float > & m_CSC_globalTime
VectorBranch< float > & m_CSC_kineticEnergy
ThreeVectorBranch m_CSC_detector_globalPosition
CscIdentifierBranch m_CSC_id
SG::ReadHandleKey< CSCSimHitCollection > m_key
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_CSC_truthEl
const MuonGM::MuonDetectorManager * getDetMgr(const EventContext &ctx) const
const Muon::IMuonIdHelperSvc * idHelperSvc() const
PrdTesterModule(MuonTesterTree &tree, const std::string &grp_name, MSG::Level msglvl)
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 CscIdHelper & cscIdHelper() const =0
access to CscIdHelper
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Eigen::Matrix< double, 3, 1 > Vector3D
const GenParticle * ConstGenParticlePtr