16 using namespace Muon::MuonStationIndex;
19 const std::string& basePath,
23 auto createHisto = [stIndex, &
histSvc, &basePath](
const std::string& hName,
24 const std::string& hTitle,
28 TH1*
h =
new TH1F(hName.c_str(), hTitle.c_str(), nBins, xLow, xHigh);
29 histSvc->regHist(std::format(
"/{}/RDO/Station_{}/{}",
31 stIndex != StIdx_t::StUnknown ?
stName(stIndex) :
"Inclusive",
36 h_subID = createHisto(
"subDetId",
"Subdetector ID", 100, 0 , 150);
37 h_mrodID = createHisto(
"mrodID",
"MROD ID", 100, 0, 150);
38 h_csmID = createHisto(
"csmID",
"CSM ID", 100, 0, 10);
39 h_tdcID = createHisto(
"tdcID",
"TDC ID", 100, 0, 50);
40 h_chanID = createHisto(
"channelID",
"Channel ID", 100, 0, 50);
41 h_coarse = createHisto(
"coarseTime",
"Drift time (coarse)", 100, 0, 100);
42 h_fine = createHisto(
"fineTime",
"Drift time (fine)", 100, 0, 50);
43 h_width = createHisto(
"width",
"Width", 100, 0, 500);
54 for (
int s =
static_cast<int>(StIdx_t::StUnknown); s < static_cast<int>(StIdx_t::StIndexMax); ++s) {
55 auto stIdx =
static_cast<StIdx_t>(s);
59 return StatusCode::SUCCESS;
63 const EventContext& ctx{Gaudi::Hive::currentContext()};
67 for (
const MdtCsm* csm : *csmCont) {
68 std::vector<unsigned> fillMe{};
71 if (
m_histos[
h].stIdx == StIdx_t::StUnknown ||
75 const uint16_t subID = csm->SubDetId();
76 const uint16_t mrodID = csm->MrodId();
77 const uint16_t csmID = csm->CsmId();
78 for (
unsigned h : fillMe) {
84 const uint16_t tdcID = hit->tdcId();
85 const uint16_t chanID = hit->channelId();
86 const uint16_t coarseTime = hit->coarse();
87 const uint16_t fineTime = hit->fine();
88 const uint16_t widthComb = hit->width();
89 for (
auto h : fillMe) {
99 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
Header file for AthHistogramAlgorithm.
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
MDT RDO's : data from a single channel of an AMT Atlas Muon TDC.
This container provides acces to the MDT RDOs.
MDT RDOs : Chamber Service Module, container of AmtHits of a single Mdt chamber.
std::vector< HistoSet > m_histos
Gaudi::Property< std::string > m_path
virtual StatusCode execute() override final
SG::ReadHandleKey< MdtCsmContainer > m_inputKey
Input read handle key.
virtual StatusCode initialize() override final
Muon::MuonStationIndex::StIndex StIdx_t
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Service handle of the IdHelperSvc.
Class to store array like branches into the n-tuples.
const std::string & stName(StIndex index)
convert StIndex into a string
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
HistoSet()=default
Default constructor.