19 lName[0] = std::tolower(lName[0]);
20 return std::format(
"{:}{:}{:}{:}",
21 lName, (
isSmall ?
"Small" :
"Large"),
23 (status == Status::OnTrack ? std::string{
"Hits"}
28 const std::string& collName,
32 std::format(
"{:}_{:}",
41 const std::string& collName,
47 for (
const auto cat : {Category::Precision, Category::TriggerEta, Category::TriggerPhi}){
50 (cat != Category::Precision)){
53 for (
const auto status : {Status::OnTrack, Status::Outlier, Status::Hole}) {
54 for (
const bool small : {
false,
true}) {
58 m_values.emplace_back(std::make_shared<TrackSummaryValueBranch>(
parent.tree(), collName,
84 br->push_back(summary);
bool fill(const EventContext &ctx) override
Clears vector in cases that it has not been updated in this event Returns false if the vector has not...
std::vector< ValuePtr_t > m_values
void push_back(const EventContext &ctx, const ConstTrack_t track)
TrackSummaryModule(MuonVal::MuonTesterTree &parent, const std::string &collName, const MuonR4::ITrackSummaryTool *summaryTool)
Constructor.
MuonR4::ITrackSummaryTool::ConstTrack_t ConstTrack_t
bool init() override
Initialized the Branch.
const MuonR4::ITrackSummaryTool * m_summaryTool
MuonR4::HitSummary::HitCategory Category
TrackSummaryValueBranch(TTree *tree, const std::string &collName, Category cat, Status status, LayerIndex layer, bool isSmall)
Constructor taking the reference to the tree & the summary values together with an overall collection...
MuonR4::HitSummary::LayerIndex LayerIndex
MuonR4::HitSummary::Status Status
void push_back(const MuonR4::HitSummary &summary)
push back the assigned hit summary value
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
TTree * tree() override final
VectorBranch(TTree *tree, const std::string &name)
This header ties the generic definitions in this package.
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
std::string nameBr(Category cat, Status status, LayerIndex layer, bool isSmall)
MuonR4::HitSummary::HitCategory Category
MuonR4::HitSummary::Status Status
const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
bool isSmall(const ChIndex index)
Returns true if the chamber index is in a small sector.
LayerIndex
enum to classify the different layers in the muon spectrometer
Summary struct to hold the hit counts on the track per MS layer.
static std::string toString(const HitCategory c)
Converts the hit category to a string.
HitCategory
Category of the hit.
Status
Contribution to the track fit.