|
ATLAS Offline Software
|
Go to the documentation of this file.
19 if (!MuonDetMgr) {
return false; }
22 if (!tgcContainer.isValid()) {
29 unsigned int numHits{0};
30 for (
const TGCSimHit& hit : *tgcContainer) {
31 HitID hitid = hit.TGCid();
36 int gasgap = tgchhelper->
GetGasGap(hitid);
41 ATH_MSG_WARNING(
"Cannot build a valid Identifier for TGC stationName=" << stname <<
", eta=" << steta <<
", phi=" << stphi
42 <<
", gasgap=" <<gasgap <<
"; skipping...");
48 ATH_MSG_ERROR(
"TGCSimHitVariables::fillVariables() - Failed to retrieve TgcReadoutElement for "
72 pdgId = genP->pdg_id();
75 ATH_MSG_WARNING(
"GenParticle is nullptr for hit in " << stname <<
" (eta=" << steta <<
", phi=" << stphi <<
", gasgap=" << gasgap <<
")");
81 <<
"HepMcParticleLink with barcode=" <<
barcode <<
" is not valid for hit in " << stname <<
" (eta=" << steta
82 <<
", phi=" << stphi <<
", gasgap=" << gasgap <<
")" <<
endmsg;
int GetGasGap(const int &hid) const
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< float > & m_TGC_kineticEnergy
const MuonGM::MuonDetectorManager * getDetMgr(const EventContext &ctx) const
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
int barcode() const
Return the barcode of the target particle.
VectorBranch< int > & m_TGC_truthEl
bool declare_dependency(Key &key)
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
HepMC::ConstGenParticlePtr cptr() const
Dereference.
a link optimized in size for a GenParticle in a McEventCollection
void push_back(const Identifier &id) override final
VectorBranch< float > & m_TGC_globalTime
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
bool msgLvl(const MSG::Level lvl) const
Test the output level.
std::string GetStationName(const int &hid) const
VectorBranch< float > & m_TGC_depositEnergy
ThreeVectorBranch m_TGC_hitLocalPosition
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
static const TgcHitIdHelper * GetHelper()
bool isValid() const
Validity check.
const Amg::Vector3D globalPosition() const
SG::ReadHandleKey< TGCSimHitCollection > m_key
TGCSimHitVariables(MuonTesterTree &tree, const std::string &container_name, MSG::Level msglvl)
MsgStream & msg() const
The standard message stream.
const Amg::Transform3D & localToGlobalTransf(const Identifier &id) const
Returns the local -> global transformation x-axis: Parallel to the wires (strips) if the Identifier b...
void push_back(const T &value)
Adds a new element at the end of the vector.
int GetStationPhi(const int &hid) const
VectorBranch< int > & m_TGC_trackId
const GenParticle * ConstGenParticlePtr
Helpers for checking error return status codes and reporting errors.
ThreeVectorBranch m_TGC_detector_globalPosition
Eigen::Matrix< double, 3, 1 > Vector3D
ThreeVectorBranch m_TGC_hitGlobalPosition
VectorBranch< int > & m_TGC_particleEncoding
virtual const TgcIdHelper & tgcIdHelper() const =0
access to TgcIdHelper
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
VectorBranch< float > & m_TGC_StepLength
TgcIdentifierBranch m_TGC_id
const Muon::IMuonIdHelperSvc * idHelperSvc() const
int GetStationEta(const int &hid) const
Identifier channelID(int stationName, int stationEta, int stationPhi, int gasGap, int isStrip, int channel) const
ScalarBranch< unsigned int > & m_TGC_nSimHits
bool declare_keys() override final