18 if (!MuonDetMgr) {
return false; }
20 if (!stgcprdContainer.
isValid()) {
25 ATH_MSG_DEBUG(
"retrieved sTGC PRD Container with size " << stgcprdContainer->size());
27 if (stgcprdContainer->size() == 0)
ATH_MSG_DEBUG(
" sTGC PRD Container empty ");
28 unsigned int n_PRD{0};
30 for (
unsigned int item=0; item<coll->size(); item++) {
39 ATH_MSG_ERROR(
"The sTGC hit "<<
idHelperSvc()->toString(Id)<<
" does not have a detector element attached. That should actually never happen");
45 det->surface(Id).globalToLocal(pos,
Amg::Vector3D(0., 0., 0.), loc_pos);
50 ATH_MSG_DEBUG(
"sTgc PRD local pos.: x=" << std::setw(6) << std::setprecision(2) << loc_pos[0]
51 <<
", ex=" << std::setw(6) << std::setprecision(2) << err_x
52 <<
", y=" << std::setw(6) << std::setprecision(2) << loc_pos[1]
53 <<
", ey=" << std::setw(6) << std::setprecision(2) << err_y );
109 det->surface(Id).globalToLocal(pos, Amg::Vector3D::Zero(), loc_pos);
114 ATH_MSG_DEBUG(
"sTgc PRD local pos.: x=" << std::setw(6) << std::setprecision(2) << loc_pos[0]
115 <<
", ex=" << std::setw(6) << std::setprecision(2) << err_x
116 <<
", y=" << std::setw(6) << std::setprecision(2) << loc_pos[1]
117 <<
", ey=" << std::setw(6) << std::setprecision(2) << err_y );
128 short int prdTime = prd.
time();
130 int maxCharge{-SHRT_MAX};
132 for (
int i = 0; i < static_cast<int>(stripCharges.size()); ++i) {
133 if (stripCharges.at(i) > maxCharge) {
134 maxCharge = stripCharges.at(i);
#define ATH_MSG_VERBOSE(x)
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
const MuonGM::MuonDetectorManager * getDetMgr(const EventContext &ctx) const
const Muon::IMuonIdHelperSvc * idHelperSvc() const
PrdTesterModule(MuonTesterTree &tree, const std::string &grp_name, MSG::Level msglvl)
std::unordered_map< Identifier, unsigned int > m_filteredPRDs
Set of particular chambers to be dumped.
VectorBranch< double > & m_NSWsTGC_PRD_covMatrix_1_1
VectorBranch< uint8_t > & m_stgcAuthor
VectorBranch< double > & m_NSWsTGC_PRD_localPosY
VectorBranch< short > & m_NSWsTGC_PRD_time
bool declare_keys() override final
bool m_applyFilter
Apply a filter to dump the prds.
MatrixBranch< int > & m_NSWsTGC_PRD_stripCharge
bool m_externalPush
Flag telling whether an external prd has been pushed.
sTGCPRDVariables(MuonTesterTree &tree, const std::string &container_name, MSG::Level msglvl)
Standard constructor taking the MuonTesterTree as parent The container name under which the MicroMega...
void dumpAllHitsInChamber(const MuonGM::sTgcReadoutElement &detEle)
Adds all hits in this particular chamber to the output n-tuple.
VectorBranch< double > & m_NSWsTGC_PRD_covMatrix_2_2
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_key
ScalarBranch< unsigned int > & m_NSWsTGC_nPRD
sTgcIdentifierBranch m_NSWsTGC_PRD_id
VectorBranch< double > & m_NSWsTGC_PRD_localPosX
MatrixBranch< uint16_t > & m_NSWsTGC_PRD_stripChannel
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_NSWsTGC_PRD_charge
unsigned int push_back(const Muon::sTgcPrepData &prd)
Adds a prd to the output tree.
void enableSeededDump()
Dumps only hits which are marked by the dumpAllHitsInChamber method.
unsigned int dump(const Muon::sTgcPrepData &prd)
VectorBranch< int > & m_NSWsTGC_PRD_nStrips
VectorBranch< uint8_t > & m_stgcQuality
std::unordered_set< Identifier > m_filteredChamb
Set of chambers to be dumped.
ThreeVectorBranch m_NSWsTGC_PRD_globalPos
MatrixBranch< short > & m_NSWsTGC_PRD_stripTime
bool declare_dependency(Key &key)
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
TTree * tree() override final
Returns the underlying TTree object.
Class to represent sTgc measurements.
int charge() const
Returns the bcBitMap of this PRD bit2 for Previous BC, bit1 for Current BC, bit0 for Next BC.
const std::vector< uint16_t > & stripNumbers() const
returns the list of strip numbers
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global position.
const std::vector< int > & stripCharges() const
returns the list of charges
virtual const MuonGM::sTgcReadoutElement * detectorElement() const override final
Returns the detector element corresponding to this PRD.
const std::vector< short int > & stripTimes() const
returns the list of times
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Identifier identify() const
return the identifier
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
MuonPrepDataCollection< sTgcPrepData > sTgcPrepDataCollection