11 const std::string& containerKey,
12 const std::string& outName,
18 for (
const auto summary : {
"nPrecisionOutliers",
"nTriggerPhiOutliers",
"nTriggerEtaOutliers",
19 "nPrecisionHoles",
"nTriggerPhiHoles",
"nTriggerEtaHoles"}) {
20 auto br = std::make_unique<AuxElementBranch<std::uint8_t>>(
tree, std::format(
"{:}_{:}", outName, summary), summary);
53 if (!insert_itr.second) {
54 return insert_itr.first->second;
69 br->push_back(segment);
72 return insert_itr.first->second;
Handle class for reading from StoreGate.
PrdTesterModule(MuonTesterTree &tree, const std::string &grp_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< char > & m_etaIdx
Station-eta index of the segment's precision hits.
VectorBranch< uint8_t > & m_nPrecHits
Number of precision hits i.e.
VectorBranch< uint8_t > & m_sector
MS-sector of the segment's precision hits.
unsigned int push_back(const xAOD::MuonSegment &segment)
push back a particuar segment
VectorBranch< uint8_t > & m_nTrigEtaLayers
Number of trigger hits, i.e.
SegmentVariables(MuonTesterTree &tree, const std::string &containerKey, const std::string &outName, MSG::Level msglvl)
bool declare_keys() override final
VectorBranch< float > & m_chi2
chi 2 of the segment fit
VectorBranch< uint8_t > & m_chamberIdx
MS station of the segment.
VectorBranch< unsigned int > & m_nDoF
number of degrees of freedom
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_key
Store gate key of the segment container.
bool addVariable(std::shared_ptr< IAuxElementDecorationBranch > br)
UnitThreeVectorBranch m_dir
Global direction of the segment.
std::unordered_map< const xAOD::MuonSegment *, unsigned int > m_idxLookUp
ThreeVectorBranch m_pos
Global position of the segment.
VectorBranch< uint8_t > & m_nTrigPhiLayers
Number of trigger hits, i.e.
std::vector< std::shared_ptr< IAuxElementDecorationBranch > > m_addBranches
std::string m_name
Name of the segment collection in the output collection.
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
bool declare_dependency(Key &key)
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
TTree * tree() override final
Returns the underlying TTree object.
bool addBranch(std::shared_ptr< IMuonTesterBranch > branch)
Branch is added to the tree without transferring the ownership.
bool isPresent() const
Is the referenced object present in SG?
std::uint8_t nTrigEtaLayers() const
Returns the number of trigger eta hits.
float numberDoF() const
Returns the numberDoF.
Amg::Vector3D direction() const
Returns the direction as Amg::Vector.
std::uint8_t nPrecisionHits() const
Returns the number of precision hits.
::Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
Amg::Vector3D position() const
Returns the position as Amg::Vector.
int etaIndex() const
Returns the eta index, which corresponds to stationEta in the offline identifiers (and the ).
std::uint8_t nPhiLayers() const
Returns the number of trigger phi hits.
constexpr int toInt(const EnumType enumVal)
MuonSegment_v1 MuonSegment
Reference the current persistent version: