ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCalib::T0CalibrationMT Class Reference

Implementation of a T0 calibration using the MT approach. More...

#include <T0CalibrationMT.h>

Inheritance diagram for MuonCalib::T0CalibrationMT:

Public Types

using MuonSegVec = std::vector<std::shared_ptr<MuonCalibSegment>>
using MuonSegIt = MuonSegVec::iterator
using MuonSegCit = MuonSegVec::const_iterator
using MdtCalibOutputPtr = std::shared_ptr<IMdtCalibrationOutput>

Public Member Functions

 T0CalibrationMT (const std::string &name, std::shared_ptr< const T0MTSettings > settings, const std::vector< int > &sort_by, const std::vector< int > &adc_sort_by)
 constructor
 ~T0CalibrationMT ()
 destructor
bool handleSegment (MuonCalibSegment &seg)
 fill tube spectra
void setInput (const IMdtCalibrationOutput *input) override
 unused
bool analyse ()
 extract parameters from spectra
bool converged () const
 return m_converged
virtual IMdtCalibration::MdtCalibOutputPtr getResults () const override
virtual IMdtCalibration::MdtCalibOutputPtr analyseSegments (const MuonSegVec &segs) override
 new interface function
virtual std::string name () const
 returns name (region) of instance

Private Member Functions

T0MTHistosgetHistos (const MuonFixedId &idtube, unsigned int nr)
 retrieve pointer for tube idtube histograms
ADCMTHistosgetADCHistos (const MuonFixedId &idtube, unsigned int nr)
 retrieve pointer for tube idtube histograms
bool analyse_tdc (const int &nr, std::map< int, MdtTubeFitContainer::SingleTubeFit > &full, std::map< int, MdtTubeFitContainer::SingleTubeCalib > &st, std::map< int, std::string > &fit_by_map)
bool analyse_adc (const int &nr, std::map< int, MdtTubeFitContainer::SingleTubeFit > &full, std::map< int, MdtTubeFitContainer::SingleTubeCalib > &st)
void doTimeFit (T0MTHistos *T0h, const std::set< MuonFixedId > &tube_ids, std::map< int, MdtTubeFitContainer::SingleTubeFit > &fim, std::map< int, MdtTubeFitContainer::SingleTubeCalib > &stcm, std::map< int, std::string > &fit_by_map, const std::string &fit_by)
 fit time spectrum
void doAdcFit (ADCMTHistos *T0h, const std::set< MuonFixedId > &tube_ids, std::map< int, MdtTubeFitContainer::SingleTubeFit > &fim, std::map< int, MdtTubeFitContainer::SingleTubeCalib > &stcm)
 fit adc spectrum
T0CalibrationMToperator= (const T0CalibrationMT &right)=delete
 T0CalibrationMT (const T0CalibrationMT &)=delete

Private Attributes

std::shared_ptr< const T0MTSettingsm_settings
 pointer to the settings
bool m_converged
 convergence status
std::string m_name
 calibration region name
int m_currentItnum
 current iteration (always 1?)
std::unique_ptr< TFile > m_file
 pointer to the histogram file
TDirectory * m_regiondir
 pointer to the ROOT directory
std::vector< std::map< HistogramId, std::unique_ptr< T0MTHistos > > > m_histos
 vector of pointers tube histograms
std::vector< std::map< HistogramId, std::unique_ptr< ADCMTHistos > > > m_adc_histos
 vector of pointers tube histograms
std::vector< std::map< HistogramId, std::set< MuonFixedId > > > m_tube_ids
std::vector< std::map< HistogramId, std::set< MuonFixedId > > > m_adc_tube_ids
std::map< int, int > m_nhits_per_tube
 number of hits per tube
std::map< NtupleStationId, MdtTubeFitContainer * > m_result
 tube constants
std::map< NtupleStationId, MdtRelativeTubeT0m_rel_tube_t0s
const std::vector< int > & m_sort_by
const std::vector< int > & m_adc_sort_by

Detailed Description

Implementation of a T0 calibration using the MT approach.

Copied from T0CalibrationClassic

Author
Felix.nosp@m..Rau.nosp@m.scher.nosp@m.@Phy.nosp@m.sik.U.nosp@m.ni-M.nosp@m.uench.nosp@m.en.D.nosp@m.e
Date
June 2005

Definition at line 40 of file T0CalibrationMT.h.

Member Typedef Documentation

◆ MdtCalibOutputPtr

Definition at line 30 of file IMdtCalibration.h.

◆ MuonSegCit

using MuonCalib::IMdtCalibration::MuonSegCit = MuonSegVec::const_iterator
inherited

Definition at line 29 of file IMdtCalibration.h.

◆ MuonSegIt

using MuonCalib::IMdtCalibration::MuonSegIt = MuonSegVec::iterator
inherited

Definition at line 28 of file IMdtCalibration.h.

◆ MuonSegVec

using MuonCalib::IMdtCalibration::MuonSegVec = std::vector<std::shared_ptr<MuonCalibSegment>>
inherited

Definition at line 27 of file IMdtCalibration.h.

Constructor & Destructor Documentation

◆ T0CalibrationMT() [1/2]

MuonCalib::T0CalibrationMT::T0CalibrationMT ( const std::string & name,
std::shared_ptr< const T0MTSettings > settings,
const std::vector< int > & sort_by,
const std::vector< int > & adc_sort_by )

constructor

Parameters
[in]nameof the region/chamber to be calibrated
[in]pointerto settings vector
[in]sortingcriteria (TUBE, CHAMBER, MULTILAYER...) default is by TUBE

Definition at line 32 of file T0CalibrationMT.cxx.

35 :
37 m_settings(settings),
38 m_converged(false),
39 m_name(name),
41 m_sort_by(sort_by),
42 m_adc_sort_by(adc_sort_by) {
43
44 std::string HistoFileName = "T0MT_" + m_name + ".root";
45 m_file = std::make_unique<TFile>(HistoFileName.c_str(), "recreate");
46 m_regiondir = m_file->mkdir(m_name.c_str());
47
48 m_histos.resize(sort_by.size());
49 m_adc_histos.resize(adc_sort_by.size());
50
51 m_tube_ids.resize(sort_by.size());
52 m_adc_tube_ids.resize(adc_sort_by.size());
53 }
IMdtCalibration(const std::string &name)
constructor, string used to identify the instance
virtual std::string name() const
returns name (region) of instance
std::unique_ptr< TFile > m_file
pointer to the histogram file
std::vector< std::map< HistogramId, std::unique_ptr< ADCMTHistos > > > m_adc_histos
vector of pointers tube histograms
std::shared_ptr< const T0MTSettings > m_settings
pointer to the settings
std::vector< std::map< HistogramId, std::set< MuonFixedId > > > m_adc_tube_ids
int m_currentItnum
current iteration (always 1?)
bool m_converged
convergence status
std::vector< std::map< HistogramId, std::set< MuonFixedId > > > m_tube_ids
TDirectory * m_regiondir
pointer to the ROOT directory
const std::vector< int > & m_sort_by
std::vector< std::map< HistogramId, std::unique_ptr< T0MTHistos > > > m_histos
vector of pointers tube histograms
const std::vector< int > & m_adc_sort_by
std::string m_name
calibration region name

◆ ~T0CalibrationMT()

MuonCalib::T0CalibrationMT::~T0CalibrationMT ( )

destructor

Definition at line 55 of file T0CalibrationMT.cxx.

55 {
56 m_file->Write();
57 m_file->Close();
58 }

◆ T0CalibrationMT() [2/2]

MuonCalib::T0CalibrationMT::T0CalibrationMT ( const T0CalibrationMT & )
privatedelete

Member Function Documentation

◆ analyse()

bool MuonCalib::T0CalibrationMT::analyse ( )

extract parameters from spectra

Definition at line 101 of file T0CalibrationMT.cxx.

101 {
102 MsgStream log(Athena::getMessageSvc(), "T0CalibrationMT");
103 std::map<int, MdtTubeFitContainer::SingleTubeFit> full;
104 std::map<int, MdtTubeFitContainer::SingleTubeCalib> st;
105 std::map<int, std::string> fit_by;
106 if (m_settings->FitTime()) {
107 for (unsigned int i = 0; i < m_sort_by.size(); i++) { analyse_tdc(i, full, st, fit_by); }
108 }
109 for (unsigned int i = 0; i < m_adc_sort_by.size(); i++) { analyse_adc(i, full, st); }
110
111 for (auto & it : full) {
112 if (it.first == 0) continue;
113 MuonFixedId fId(it.first);
114 NtupleStationId sid(fId);
115 sid.SetMultilayer(0);
116 MdtTubeFitContainer::SingleTubeFit &fi(it.second);
117 MdtTubeFitContainer::SingleTubeCalib &stc(st[it.first]);
118 fi.group_by = fit_by[it.first];
119 int nML = fId.mdtMultilayer();
120 int nL = fId.mdtTubeLayer();
121 int nT = fId.mdtTube();
122 const MdtIdHelper& idHelper{m_result[sid]->idHelperSvc()->mdtIdHelper()};
123 const Identifier tubeId = idHelper.channelID(fId.stationNameString(),
124 fId.eta(), fId.phi(), nML, nL, nT);
125
126 bool setInfo = m_result[sid]->setCalib(stc, tubeId, log);
127 if (!setInfo) {
128 log << MSG::WARNING << "T0CalibrationMT::PROBLEM! could not set SingleTubeCalib info" << endmsg;
129 }
130 fi.n_hits = m_nhits_per_tube[fId.getIdInt()];
131 fi.n_hits_above_adc_cut = m_nhits_per_tube[fId.getIdInt()];
132 setInfo = m_result[sid]->setFit(std::move(fi), tubeId, log);
133 if (!setInfo) {
134 MsgStream log(Athena::getMessageSvc(), "T0CalibrationMT");
135 log << MSG::WARNING << "T0CalibrationMT::PROBLEM! could not set SingleTubeFit info" << endmsg;
136 }
137 }
138
140 m_file->Write();
141 return true;
142 }
#define endmsg
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
bool analyse_adc(const int &nr, std::map< int, MdtTubeFitContainer::SingleTubeFit > &full, std::map< int, MdtTubeFitContainer::SingleTubeCalib > &st)
std::map< int, int > m_nhits_per_tube
number of hits per tube
std::map< NtupleStationId, MdtTubeFitContainer * > m_result
tube constants
bool analyse_tdc(const int &nr, std::map< int, MdtTubeFitContainer::SingleTubeFit > &full, std::map< int, MdtTubeFitContainer::SingleTubeCalib > &st, std::map< int, std::string > &fit_by_map)
IMessageSvc * getMessageSvc(bool quiet=false)

◆ analyse_adc()

bool MuonCalib::T0CalibrationMT::analyse_adc ( const int & nr,
std::map< int, MdtTubeFitContainer::SingleTubeFit > & full,
std::map< int, MdtTubeFitContainer::SingleTubeCalib > & st )
private

Definition at line 167 of file T0CalibrationMT.cxx.

168 {
169 for (std::map<HistogramId, std::unique_ptr<ADCMTHistos>>::iterator it = m_adc_histos[nr].begin(); it != m_adc_histos[nr].end();
170 ++it)
171 if (m_settings->FitADC()) { doAdcFit(it->second.get(), m_adc_tube_ids[nr][it->first], full, st); }
172 return true;
173 }
void doAdcFit(ADCMTHistos *T0h, const std::set< MuonFixedId > &tube_ids, std::map< int, MdtTubeFitContainer::SingleTubeFit > &fim, std::map< int, MdtTubeFitContainer::SingleTubeCalib > &stcm)
fit adc spectrum

◆ analyse_tdc()

bool MuonCalib::T0CalibrationMT::analyse_tdc ( const int & nr,
std::map< int, MdtTubeFitContainer::SingleTubeFit > & full,
std::map< int, MdtTubeFitContainer::SingleTubeCalib > & st,
std::map< int, std::string > & fit_by_map )
private

Definition at line 144 of file T0CalibrationMT.cxx.

145 {
146 if (m_settings->VerboseLevel() > 1) {
147 MsgStream log(Athena::getMessageSvc(), "T0CalibrationMT");
148 log << MSG::VERBOSE << "T0CalibrationMT::analyse iteration " << m_currentItnum << endmsg;
149 }
150 std::string fit_by("UNKNOWN");
151 switch (m_sort_by[nr]) {
152 case HistogramId::TUBE: fit_by = "TUBE"; break;
153 case HistogramId::LAYER: fit_by = "LAYER"; break;
154 case HistogramId::MULTILAYER: fit_by = "MULTILAYER"; break;
155 case HistogramId::CHAMBER: fit_by = "CHAMBER"; break;
156 case HistogramId::MEZZ_CARD: fit_by = "MEZZ_CARD"; break;
157 }
158
159 for (std::map<HistogramId, std::unique_ptr<T0MTHistos>>::iterator it = m_histos[nr].begin(); it != m_histos[nr].end(); ++it)
160 // loop over m_histos histograms
161 {
162 doTimeFit(it->second.get(), m_tube_ids[nr][it->first], full, st, fit_by_map, fit_by);
163 }
164 return true;
165 }
static const int LAYER
Definition HistogramId.h:45
static const int TUBE
valid values of the sort_by argument of the Initialize function
Definition HistogramId.h:45
static const int MEZZ_CARD
Definition HistogramId.h:45
static const int MULTILAYER
Definition HistogramId.h:45
static const int CHAMBER
Definition HistogramId.h:45
void doTimeFit(T0MTHistos *T0h, const std::set< MuonFixedId > &tube_ids, std::map< int, MdtTubeFitContainer::SingleTubeFit > &fim, std::map< int, MdtTubeFitContainer::SingleTubeCalib > &stcm, std::map< int, std::string > &fit_by_map, const std::string &fit_by)
fit time spectrum

◆ analyseSegments()

IMdtCalibration::MdtCalibOutputPtr MuonCalib::T0CalibrationMT::analyseSegments ( const MuonSegVec & segs)
overridevirtual

new interface function

Implements MuonCalib::IMdtCalibration.

Definition at line 175 of file T0CalibrationMT.cxx.

175 {
176 for (const auto & seg : segs) handleSegment(*seg);
177 analyse();
178 return getResults();
179 }
virtual IMdtCalibration::MdtCalibOutputPtr getResults() const override
bool handleSegment(MuonCalibSegment &seg)
fill tube spectra
bool analyse()
extract parameters from spectra

◆ converged()

bool MuonCalib::T0CalibrationMT::converged ( ) const

return m_converged

Definition at line 300 of file T0CalibrationMT.cxx.

300{ return m_converged; }

◆ doAdcFit()

void MuonCalib::T0CalibrationMT::doAdcFit ( ADCMTHistos * T0h,
const std::set< MuonFixedId > & tube_ids,
std::map< int, MdtTubeFitContainer::SingleTubeFit > & fim,
std::map< int, MdtTubeFitContainer::SingleTubeCalib > & stcm )
private

fit adc spectrum

Definition at line 237 of file T0CalibrationMT.cxx.

239 {
240 if (T0h->FitAdc() && m_settings->MinEntriesADC() <= T0h->GetADCSpec()->GetEntries()) {
241 const TF1 *fun(T0h->GetAdcFunction());
242 if (fun == nullptr) return;
243 for (auto tube_id : tube_ids) {
244 if (tube_id.getIdInt() == 0) continue;
245 MdtTubeFitContainer::SingleTubeFit &fi(fim[tube_id.getIdInt()]);
246 MdtTubeFitContainer::SingleTubeCalib &stc(stcm[tube_id.getIdInt()]);
247
248 stc.adcCal = fun->GetParameter(1);
249 for (int i = 0; (i < fun->GetNpar() && i < 4); i++) {
250 fi.adc_par[i] = fun->GetParameter(i);
251 fi.adc_err[i] = fun->GetParError(i);
252 }
253 fi.adc_chi2 = fun->GetChisquare() / fun->GetNDF();
254 }
255 }
256 }

◆ doTimeFit()

void MuonCalib::T0CalibrationMT::doTimeFit ( T0MTHistos * T0h,
const std::set< MuonFixedId > & tube_ids,
std::map< int, MdtTubeFitContainer::SingleTubeFit > & fim,
std::map< int, MdtTubeFitContainer::SingleTubeCalib > & stcm,
std::map< int, std::string > & fit_by_map,
const std::string & fit_by )
private

fit time spectrum

Definition at line 181 of file T0CalibrationMT.cxx.

184 {
185 TDirectory *cwd = gDirectory;
186 m_regiondir->cd();
187 // do t0 fit
189 if (fit_by == "CHAMBER")
191 else if (fit_by == "MULTILAYER")
193 else if (fit_by == "LAYER")
194 theGroup = MdtRelativeTubeT0::LAYER;
195 else if (fit_by == "MEZZ_CARD")
197 if (T0h->FitT0() && m_settings->MinEntriesTime() <= T0h->GetTSpec()->GetEntries()) {
198 const TF1 *fun(T0h->GetT0Function());
199 for (auto tube_id : tube_ids) {
200 if (tube_id.getIdInt() == 0) continue;
201 NtupleStationId stId(tube_id);
202 stId.SetMultilayer(0);
203 double rel_t0(0.0);
204 if (m_settings->T0Settings()->CorrectRelT0s()) rel_t0 = m_rel_tube_t0s[stId].GetRelativeOffset(tube_id, theGroup);
205 MdtTubeFitContainer::SingleTubeFit &fi(fim[tube_id.getIdInt()]);
206 MdtTubeFitContainer::SingleTubeCalib &stc(stcm[tube_id.getIdInt()]);
207 // store parameters
208 fi.statistics = static_cast<int>(T0h->GetTSpec()->GetEntries());
209 fi.chi2Tdc = T0h->T0Chi2();
210 fi.par[0] = fun->GetParameter(T0MTHistos ::T0_PAR_NR_BACK);
211 fi.cov[0] = fun->GetParError(T0MTHistos ::T0_PAR_NR_BACK);
212 fi.par[4] = fun->GetParameter(T0MTHistos ::T0_PAR_NR_T0) + rel_t0;
213 fi.cov[4] = fun->GetParError(T0MTHistos ::T0_PAR_NR_T0);
214 fi.par[6] = fun->GetParameter(T0MTHistos ::T0_PAR_NR_T);
215 fi.cov[6] = fun->GetParError(T0MTHistos ::T0_PAR_NR_T);
216 stc.t0 = fun->GetParameter(T0MTHistos ::T0_PAR_NR_T0) + rel_t0;
217 stc.statusCode = T0h->StatusCode();
218 m_converged = true;
219 fit_by_map[tube_id.getIdInt()] = fit_by;
220 }
221 }
222 if (T0h->FitTmax() && m_settings->MinEntriesTime() <= T0h->GetTSpec()->GetEntries()) {
223 const TF1 *fun(T0h->GetTMaxFunction());
224 // store parameters
225 for (auto tube_id : tube_ids) {
226 if (tube_id.getIdInt() == 0) continue;
227 MdtTubeFitContainer::SingleTubeFit &fi(fim[tube_id.getIdInt()]);
228 // MdtTubeFitContainer::SingleTubeCalib &stc(stcm[*it]);
229 fi.par[5] = fun->GetParameter(T0MTHistos ::TMAX_PAR_NR_TMAX);
230 fi.cov[5] = fun->GetParError(T0MTHistos ::TMAX_PAR_NR_TMAX);
231 fi.chi2TdcEnd = fun->GetChisquare() / fun->GetNDF();
232 }
233 }
234 cwd->cd();
235 }
TGraphErrors * GetEntries(TH2F *histo)
std::map< NtupleStationId, MdtRelativeTubeT0 > m_rel_tube_t0s
std::string cwd
Definition listroot.cxx:38

◆ getADCHistos()

ADCMTHistos * MuonCalib::T0CalibrationMT::getADCHistos ( const MuonFixedId & idtube,
unsigned int nr )
private

retrieve pointer for tube idtube histograms

Definition at line 260 of file T0CalibrationMT.cxx.

260 {
261 HistogramId id;
262 id.Initialize(idtube, m_adc_sort_by[nr]);
263 if (!m_adc_histos[nr][id]) {
264 TDirectory *cwd = gDirectory;
265 m_regiondir->cd();
266 m_adc_histos[nr][id] = std::make_unique<ADCMTHistos>(id.getIdInt(), m_settings.get(), id.HistogramName().c_str());
267 cwd->cd();
268 }
269 m_adc_tube_ids[nr][id].insert(idtube);
270 return m_adc_histos[nr][id].get();
271 }

◆ getHistos()

T0MTHistos * MuonCalib::T0CalibrationMT::getHistos ( const MuonFixedId & idtube,
unsigned int nr )
private

retrieve pointer for tube idtube histograms

Definition at line 273 of file T0CalibrationMT.cxx.

273 {
274 HistogramId id;
275 id.Initialize(idtube, m_sort_by[nr]);
276 if (!m_histos[nr][id]) {
277 TDirectory *cwd = gDirectory;
278 m_regiondir->cd();
279 m_histos[nr][id] = std::make_unique<T0MTHistos>(id.getIdInt(), m_settings.get(), id.HistogramName().c_str());
280 cwd->cd();
281 }
282 m_tube_ids[nr][id].insert(idtube);
283 return m_histos[nr][id].get();
284 }

◆ getResults()

IMdtCalibration::MdtCalibOutputPtr MuonCalib::T0CalibrationMT::getResults ( ) const
overridevirtual
Returns
the calibration results

Implements MuonCalib::IMdtCalibration.

Definition at line 258 of file T0CalibrationMT.cxx.

258{ return std::make_shared<T0CalibrationOutput>(m_result); }

◆ handleSegment()

bool MuonCalib::T0CalibrationMT::handleSegment ( MuonCalibSegment & seg)

fill tube spectra

Definition at line 60 of file T0CalibrationMT.cxx.

60 {
61 for (const MuonCalibSegment::MdtHitPtr& hit : seg.mdtHOT()) {
62 MuonFixedId id = hit->identify();
63 m_nhits_per_tube[id.getIdInt()]++;
64 // get the T0 originally subtracted for this hit
65 int nML = id.mdtMultilayer();
66 int nL = id.mdtTubeLayer();
67 int nT = id.mdtTube();
68 const MdtTubeFitContainer::SingleTubeCalib *stc(nullptr);
69 NtupleStationId sid(id);
70 sid.SetMultilayer(0);
71 std::map<NtupleStationId, MdtTubeFitContainer *>::const_iterator res_it(m_result.find(sid));
72 if (res_it != m_result.end()) {
73 const MdtIdHelper& idHelper{res_it->second->idHelperSvc()->mdtIdHelper()};
74 const Identifier tubeId = idHelper.channelID(id.stationNameString(),
75 id.eta(), id.phi(), nML, nL, nT);
76 stc = res_it->second->getCalib(tubeId);
77 }
78 double oldT0 = 0;
79 if (stc)
80 oldT0 = stc->t0;
81 else {
82 MsgStream log(Athena::getMessageSvc(), "T0CalibrationMT");
83 log << MSG::WARNING << "no Single Tube Calib info found for ML=" << nML << " L=" << nL << " T=" << nT << endmsg;
84 }
85
86 // get histos
87 for (unsigned int i = 0; i < m_sort_by.size(); i++) {
88 T0MTHistos *histos = getHistos(id, i);
89 histos->GetTSpec()->Fill(hit->driftTime() + oldT0 + hit->tubeT0());
90 }
91 for (unsigned int i = 0; i < m_adc_sort_by.size(); i++) {
92 ADCMTHistos *adc_histos = getADCHistos(id, i);
93 adc_histos->GetADCSpec()->Fill(hit->adcCount());
94 }
95 // relative t0 offsets
96 m_rel_tube_t0s[sid].AddHit(*hit);
97 }
98 return true;
99 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
std::shared_ptr< MdtCalibHitBase > MdtHitPtr
typedef for a collection of MdtCalibHitBase s
T0MTHistos * getHistos(const MuonFixedId &idtube, unsigned int nr)
retrieve pointer for tube idtube histograms
ADCMTHistos * getADCHistos(const MuonFixedId &idtube, unsigned int nr)
retrieve pointer for tube idtube histograms

◆ name()

virtual std::string MuonCalib::IMdtCalibration::name ( ) const
inlinevirtualinherited

returns name (region) of instance

Definition at line 49 of file IMdtCalibration.h.

49{ return m_name; }

◆ operator=()

T0CalibrationMT & MuonCalib::T0CalibrationMT::operator= ( const T0CalibrationMT & right)
privatedelete

◆ setInput()

void MuonCalib::T0CalibrationMT::setInput ( const IMdtCalibrationOutput * input)
overridevirtual

unused

Implements MuonCalib::IMdtCalibration.

Definition at line 286 of file T0CalibrationMT.cxx.

286 {
287 // This method is called both by the event loop and by the tool.
288 // Only the call from the tool is relevant for this implementation
289 // and should be performed only once.
290
291 if (m_result.size()) return;
292
293 const T0CalibrationOutput *t0Input = dynamic_cast<const T0CalibrationOutput *>(calib_in);
294 if (!calib_in || !t0Input) return;
295 m_result = t0Input->GetMap();
296 for (auto & it : m_result)
297 it.second->setImplementation("T0CalibrationMT");
298 }

Member Data Documentation

◆ m_adc_histos

std::vector<std::map<HistogramId, std::unique_ptr<ADCMTHistos> > > MuonCalib::T0CalibrationMT::m_adc_histos
private

vector of pointers tube histograms

Definition at line 93 of file T0CalibrationMT.h.

◆ m_adc_sort_by

const std::vector<int>& MuonCalib::T0CalibrationMT::m_adc_sort_by
private

Definition at line 100 of file T0CalibrationMT.h.

◆ m_adc_tube_ids

std::vector<std::map<HistogramId, std::set<MuonFixedId> > > MuonCalib::T0CalibrationMT::m_adc_tube_ids
private

Definition at line 95 of file T0CalibrationMT.h.

◆ m_converged

bool MuonCalib::T0CalibrationMT::m_converged
private

convergence status

Definition at line 86 of file T0CalibrationMT.h.

◆ m_currentItnum

int MuonCalib::T0CalibrationMT::m_currentItnum
private

current iteration (always 1?)

Definition at line 88 of file T0CalibrationMT.h.

◆ m_file

std::unique_ptr<TFile> MuonCalib::T0CalibrationMT::m_file
private

pointer to the histogram file

Definition at line 89 of file T0CalibrationMT.h.

◆ m_histos

std::vector<std::map<HistogramId, std::unique_ptr<T0MTHistos> > > MuonCalib::T0CalibrationMT::m_histos
private

vector of pointers tube histograms

Definition at line 92 of file T0CalibrationMT.h.

◆ m_name

std::string MuonCalib::T0CalibrationMT::m_name
private

calibration region name

Definition at line 87 of file T0CalibrationMT.h.

◆ m_nhits_per_tube

std::map<int, int> MuonCalib::T0CalibrationMT::m_nhits_per_tube
private

number of hits per tube

Definition at line 96 of file T0CalibrationMT.h.

◆ m_regiondir

TDirectory* MuonCalib::T0CalibrationMT::m_regiondir
private

pointer to the ROOT directory

Definition at line 90 of file T0CalibrationMT.h.

◆ m_rel_tube_t0s

std::map<NtupleStationId, MdtRelativeTubeT0> MuonCalib::T0CalibrationMT::m_rel_tube_t0s
private

Definition at line 98 of file T0CalibrationMT.h.

◆ m_result

std::map<NtupleStationId, MdtTubeFitContainer *> MuonCalib::T0CalibrationMT::m_result
private

tube constants

Definition at line 97 of file T0CalibrationMT.h.

◆ m_settings

std::shared_ptr<const T0MTSettings> MuonCalib::T0CalibrationMT::m_settings
private

pointer to the settings

Definition at line 85 of file T0CalibrationMT.h.

◆ m_sort_by

const std::vector<int>& MuonCalib::T0CalibrationMT::m_sort_by
private

Definition at line 99 of file T0CalibrationMT.h.

◆ m_tube_ids

std::vector<std::map<HistogramId, std::set<MuonFixedId> > > MuonCalib::T0CalibrationMT::m_tube_ids
private

Definition at line 94 of file T0CalibrationMT.h.


The documentation for this class was generated from the following files: