ATLAS Offline Software
T0CalibrationMT.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <algorithm>
8 #include <iostream>
9 #include <string>
10 #include <vector>
11 
13 #include "GaudiKernel/MsgStream.h"
15 #include "MdtCalibT0/ADCMTHistos.h"
16 #include "MdtCalibT0/HistogramId.h"
19 #include "MdtCalibT0/T0MTHistos.h"
23 
24 #include "TF1.h"
25 #include "TFile.h"
26 #include "TH1.h"
27 #include "TH1F.h"
28 #include "TH2F.h"
29 
30 namespace MuonCalib {
31 
33  std::shared_ptr<const T0MTSettings> settings,
34  const std::vector<int> &sort_by,
35  const std::vector<int> &adc_sort_by) :
37  m_settings(settings),
38  m_converged(false),
39  m_name(name),
40  m_currentItnum(0),
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  }
54 
56  m_file->Write();
57  m_file->Close();
58  }
59 
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  }
100 
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  for (unsigned int i = 0; i < m_adc_sort_by.size(); i++) { analyse_adc(i, full, st); }
109 
110  for (auto & it : full) {
111  if (it.first == 0) continue;
112  MuonFixedId fId(it.first);
113  NtupleStationId sid(fId);
114  sid.SetMultilayer(0);
117  fi.group_by = fit_by[it.first];
118  int nML = fId.mdtMultilayer();
119  int nL = fId.mdtTubeLayer();
120  int nT = fId.mdtTube();
121  const MdtIdHelper& idHelper{m_result[sid]->idHelperSvc()->mdtIdHelper()};
122  const Identifier tubeId = idHelper.channelID(fId.stationNameString(),
123  fId.eta(), fId.phi(), nML, nL, nT);
124 
125  bool setInfo = m_result[sid]->setCalib(std::move(stc), tubeId, log);
126  if (!setInfo) {
127  log << MSG::WARNING << "T0CalibrationMT::PROBLEM! could not set SingleTubeCalib info" << endmsg;
128  }
129  fi.n_hits = m_nhits_per_tube[fId.getIdInt()];
130  fi.n_hits_above_adc_cut = m_nhits_per_tube[fId.getIdInt()];
131  setInfo = m_result[sid]->setFit(std::move(fi), tubeId, log);
132  if (!setInfo) {
133  MsgStream log(Athena::getMessageSvc(), "T0CalibrationMT");
134  log << MSG::WARNING << "T0CalibrationMT::PROBLEM! could not set SingleTubeFit info" << endmsg;
135  }
136  }
137 
138  m_currentItnum++;
139  m_file->Write();
140  return true;
141  }
142 
143  bool T0CalibrationMT::analyse_tdc(const int &nr, std::map<int, MdtTubeFitContainer::SingleTubeFit> &full,
144  std::map<int, MdtTubeFitContainer::SingleTubeCalib> &st, std::map<int, std::string> &fit_by_map) {
145  if (m_settings->VerboseLevel() > 1) {
146  MsgStream log(Athena::getMessageSvc(), "T0CalibrationMT");
147  log << MSG::VERBOSE << "T0CalibrationMT::analyse iteration " << m_currentItnum << endmsg;
148  }
149  std::string fit_by("UNKNOWN");
150  switch (m_sort_by[nr]) {
151  case HistogramId::TUBE: fit_by = "TUBE"; break;
152  case HistogramId::LAYER: fit_by = "LAYER"; break;
153  case HistogramId::MULTILAYER: fit_by = "MULTILAYER"; break;
154  case HistogramId::CHAMBER: fit_by = "CHAMBER"; break;
155  case HistogramId::MEZZ_CARD: fit_by = "MEZZ_CARD"; break;
156  }
157 
158  for (std::map<HistogramId, std::unique_ptr<T0MTHistos>>::iterator it = m_histos[nr].begin(); it != m_histos[nr].end(); ++it)
159  // loop over m_histos histograms
160  {
161  doTimeFit(it->second.get(), m_tube_ids[nr][it->first], full, st, fit_by_map, fit_by);
162  }
163  return true;
164  }
165 
166  bool T0CalibrationMT::analyse_adc(const int &nr, std::map<int, MdtTubeFitContainer::SingleTubeFit> &full,
167  std::map<int, MdtTubeFitContainer::SingleTubeCalib> &st) {
168  for (std::map<HistogramId, std::unique_ptr<ADCMTHistos>>::iterator it = m_adc_histos[nr].begin(); it != m_adc_histos[nr].end();
169  ++it)
170  if (m_settings->FitADC()) { doAdcFit(it->second.get(), m_adc_tube_ids[nr][it->first], full, st); }
171  return true;
172  }
173 
175  for (const auto & seg : segs) handleSegment(*seg);
176  analyse();
177  return getResults();
178  }
179 
180  void T0CalibrationMT::doTimeFit(T0MTHistos *T0h, const std::set<MuonFixedId> &tube_ids,
181  std::map<int, MdtTubeFitContainer::SingleTubeFit> &fim,
182  std::map<int, MdtTubeFitContainer::SingleTubeCalib> &stcm, std::map<int, std::string> &fit_by_map,
183  const std::string &fit_by) {
184  TDirectory *cwd = gDirectory;
185  m_regiondir->cd();
186  // do t0 fit
188  if (fit_by == "CHAMBER")
189  theGroup = MdtRelativeTubeT0::CHAMBER;
190  else if (fit_by == "MULTILAYER")
192  else if (fit_by == "LAYER")
193  theGroup = MdtRelativeTubeT0::LAYER;
194  else if (fit_by == "MEZZ_CARD")
195  theGroup = MdtRelativeTubeT0::MEZZ_CARD;
196  if (T0h->FitT0() && m_settings->MinEntriesTime() <= T0h->GetTSpec()->GetEntries()) {
197  const TF1 *fun(T0h->GetT0Function());
198  for (auto tube_id : tube_ids) {
199  if (tube_id.getIdInt() == 0) continue;
200  NtupleStationId stId(tube_id);
201  stId.SetMultilayer(0);
202  double rel_t0(0.0);
203  if (m_settings->T0Settings()->CorrectRelT0s()) rel_t0 = m_rel_tube_t0s[stId].GetRelativeOffset(tube_id, theGroup);
205  MdtTubeFitContainer::SingleTubeCalib &stc(stcm[tube_id.getIdInt()]);
206  // store parameters
207  fi.statistics = static_cast<int>(T0h->GetTSpec()->GetEntries());
208  fi.chi2Tdc = T0h->T0Chi2();
209  fi.par[0] = fun->GetParameter(T0MTHistos ::T0_PAR_NR_BACK);
210  fi.cov[0] = fun->GetParError(T0MTHistos ::T0_PAR_NR_BACK);
211  fi.par[4] = fun->GetParameter(T0MTHistos ::T0_PAR_NR_T0) + rel_t0;
212  fi.cov[4] = fun->GetParError(T0MTHistos ::T0_PAR_NR_T0);
213  fi.par[6] = fun->GetParameter(T0MTHistos ::T0_PAR_NR_T);
214  fi.cov[6] = fun->GetParError(T0MTHistos ::T0_PAR_NR_T);
215  stc.t0 = fun->GetParameter(T0MTHistos ::T0_PAR_NR_T0) + rel_t0;
216  stc.statusCode = T0h->StatusCode();
217  m_converged = true;
218  fit_by_map[tube_id.getIdInt()] = fit_by;
219  }
220  }
221  if (T0h->FitTmax() && m_settings->MinEntriesTime() <= T0h->GetTSpec()->GetEntries()) {
222  const TF1 *fun(T0h->GetTMaxFunction());
223  // store parameters
224  for (auto tube_id : tube_ids) {
225  if (tube_id.getIdInt() == 0) continue;
227  // MdtTubeFitContainer::SingleTubeCalib &stc(stcm[*it]);
228  fi.par[5] = fun->GetParameter(T0MTHistos ::TMAX_PAR_NR_TMAX);
229  fi.cov[5] = fun->GetParError(T0MTHistos ::TMAX_PAR_NR_TMAX);
230  fi.chi2TdcEnd = fun->GetChisquare() / fun->GetNDF();
231  }
232  }
233  cwd->cd();
234  }
235 
236  void T0CalibrationMT::doAdcFit(ADCMTHistos *T0h, const std::set<MuonFixedId> &tube_ids,
237  std::map<int, MdtTubeFitContainer::SingleTubeFit> &fim,
238  std::map<int, MdtTubeFitContainer::SingleTubeCalib> &stcm) {
239  if (T0h->FitAdc() && m_settings->MinEntriesADC() <= T0h->GetADCSpec()->GetEntries()) {
240  const TF1 *fun(T0h->GetAdcFunction());
241  if (fun == nullptr) return;
242  for (auto tube_id : tube_ids) {
243  if (tube_id.getIdInt() == 0) continue;
245  MdtTubeFitContainer::SingleTubeCalib &stc(stcm[tube_id.getIdInt()]);
246 
247  stc.adcCal = fun->GetParameter(1);
248  for (int i = 0; (i < fun->GetNpar() && i < 4); i++) {
249  fi.adc_par[i] = fun->GetParameter(i);
250  fi.adc_err[i] = fun->GetParError(i);
251  }
252  fi.adc_chi2 = fun->GetChisquare() / fun->GetNDF();
253  }
254  }
255  }
256 
257  IMdtCalibration::MdtCalibOutputPtr T0CalibrationMT::getResults() const { return std::make_shared<T0CalibrationOutput>(m_result); }
258 
259  ADCMTHistos *T0CalibrationMT::getADCHistos(const MuonFixedId &idtube, unsigned int nr) {
260  HistogramId id;
261  id.Initialize(idtube, m_adc_sort_by[nr]);
262  if (!m_adc_histos[nr][id]) {
263  TDirectory *cwd = gDirectory;
264  m_regiondir->cd();
265  m_adc_histos[nr][id] = std::make_unique<ADCMTHistos>(id.getIdInt(), m_settings.get(), id.HistogramName().c_str());
266  cwd->cd();
267  }
268  m_adc_tube_ids[nr][id].insert(idtube);
269  return m_adc_histos[nr][id].get();
270  }
271 
272  T0MTHistos *T0CalibrationMT::getHistos(const MuonFixedId &idtube, unsigned int nr) {
273  HistogramId id;
274  id.Initialize(idtube, m_sort_by[nr]);
275  if (!m_histos[nr][id]) {
276  TDirectory *cwd = gDirectory;
277  m_regiondir->cd();
278  m_histos[nr][id] = std::make_unique<T0MTHistos>(id.getIdInt(), m_settings.get(), id.HistogramName().c_str());
279  cwd->cd();
280  }
281  m_tube_ids[nr][id].insert(idtube);
282  return m_histos[nr][id].get();
283  }
284 
286  // This method is called both by the event loop and by the tool.
287  // Only the call from the tool is relevant for this implementation
288  // and should be performed only once.
289 
290  if (m_result.size()) return;
291 
292  const T0CalibrationOutput *t0Input = dynamic_cast<const T0CalibrationOutput *>(calib_in);
293  if (!calib_in || !t0Input) return;
294  m_result = t0Input->GetMap();
295  for (auto & it : m_result)
296  it.second->setImplementation("T0CalibrationMT");
297  }
298 
299  bool T0CalibrationMT::converged() const { return m_converged; }
300 
301 } // namespace MuonCalib
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::t0
float t0
< relative t0 in chamber (ns)
Definition: MdtTubeCalibContainer.h:20
MuonCalib::IMdtCalibration::MdtCalibOutputPtr
std::shared_ptr< IMdtCalibrationOutput > MdtCalibOutputPtr
Definition: IMdtCalibration.h:30
generateReferenceFile.fun
fun
Definition: generateReferenceFile.py:18
MuonCalib::T0CalibrationMT::m_result
std::map< NtupleStationId, MdtTubeFitContainer * > m_result
tube constants
Definition: T0CalibrationMT.h:97
MuonCalib::T0CalibrationMT::m_file
std::unique_ptr< TFile > m_file
pointer to the histogram file
Definition: T0CalibrationMT.h:89
MuonCalib::NtupleStationId::SetMultilayer
void SetMultilayer(const int &ml)
Definition: NtupleStationId.h:110
MuonCalib::T0CalibrationMT::m_adc_tube_ids
std::vector< std::map< HistogramId, std::set< MuonFixedId > > > m_adc_tube_ids
Definition: T0CalibrationMT.h:95
MuonCalibSegment.h
T0MTSettings.h
T0MTHistos.h
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
MuonCalib::T0CalibrationMT::m_currentItnum
int m_currentItnum
current iteration (always 1?)
Definition: T0CalibrationMT.h:88
MuonCalib::T0CalibrationMT::m_settings
std::shared_ptr< const T0MTSettings > m_settings
pointer to the settings
Definition: T0CalibrationMT.h:85
MuonCalib::MdtTubeFitContainer::SingleTubeFit
Definition: MdtTubeFitContainer.h:18
MuonCalib::NtupleStationId
Definition: NtupleStationId.h:36
MuonCalib::MdtRelativeTubeT0::CHAMBER
@ CHAMBER
Definition: MdtRelativeTubeT0.h:17
MuonCalib::MdtRelativeTubeT0::MULTILAYER
@ MULTILAYER
Definition: MdtRelativeTubeT0.h:17
MuonCalib::T0CalibrationMT::~T0CalibrationMT
~T0CalibrationMT()
destructor
Definition: T0CalibrationMT.cxx:55
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:396
MuonCalib::IMdtCalibration
Definition: IMdtCalibration.h:25
MuonCalib::MuonFixedId::mdtMultilayer
int mdtMultilayer() const
Mdt specific:
Definition: MuonFixedId.h:835
MuonCalib::MuonCalibSegment
Definition: MuonCalibSegment.h:39
MuonCalib::T0CalibrationMT::getResults
virtual IMdtCalibration::MdtCalibOutputPtr getResults() const override
Definition: T0CalibrationMT.cxx:257
MdtTubeFitContainer.h
MuonCalib::T0MTHistos::GetT0Function
const TF1 * GetT0Function() const
returns function fitted to the riding edge of the spectrum
Definition: T0MTHistos.h:104
MuonCalib::T0CalibrationMT::m_nhits_per_tube
std::map< int, int > m_nhits_per_tube
number of hits per tube
Definition: T0CalibrationMT.h:96
MuonCalib::T0CalibrationMT::analyse_adc
bool analyse_adc(const int &nr, std::map< int, MdtTubeFitContainer::SingleTubeFit > &full, std::map< int, MdtTubeFitContainer::SingleTubeCalib > &st)
Definition: T0CalibrationMT.cxx:166
MuonCalib::T0MTHistos::StatusCode
int StatusCode() const
returns status code - the status code applies only to the t0 fit
Definition: T0MTHistos.h:102
MuonCalib::MdtRelativeTubeT0::UNKNOWN
@ UNKNOWN
Definition: MdtRelativeTubeT0.h:17
MuonCalib::T0MTHistos::GetTSpec
TH1F * GetTSpec() const
get drift time spectrum
Definition: T0MTHistos.h:72
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonCalib::T0CalibrationOutput
Definition: T0CalibrationOutput.h:19
MuonCalib::T0CalibrationMT::doAdcFit
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
Definition: T0CalibrationMT.cxx:236
MuonCalib::MuonFixedId::stationNameString
std::string stationNameString() const
Definition: MuonFixedId.h:655
MuonCalib::T0CalibrationMT::m_sort_by
const std::vector< int > & m_sort_by
Definition: T0CalibrationMT.h:99
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::statusCode
unsigned int statusCode
Definition: MdtTubeCalibContainer.h:26
MuonCalib::T0MTHistos::T0_PAR_NR_T
static constexpr int T0_PAR_NR_T
Definition: T0MTHistos.h:57
MuonCalib::T0MTHistos::FitTmax
bool FitTmax()
Performs tmax-fit Returns true if fit is successfull.
Definition: T0MTHistos.cxx:142
MuonCalib::T0CalibrationMT::handleSegment
bool handleSegment(MuonCalibSegment &seg)
fill tube spectra
Definition: T0CalibrationMT.cxx:60
MdtRelativeTubeT0.h
T0CalibrationOutput.h
MuonCalib::T0MTHistos
Definition: T0MTHistos.h:40
calibdata.tube_id
tube_id
Definition: calibdata.py:30
MuonCalib::T0CalibrationMT::doTimeFit
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
Definition: T0CalibrationMT.cxx:180
MuonCalib::T0MTHistos::T0_PAR_NR_BACK
static constexpr int T0_PAR_NR_BACK
Definition: T0MTHistos.h:57
MuonCalib::T0CalibrationMT::m_adc_histos
std::vector< std::map< HistogramId, std::unique_ptr< ADCMTHistos > > > m_adc_histos
vector of pointers tube histograms
Definition: T0CalibrationMT.h:93
MuonCalib::ADCMTHistos::FitAdc
bool FitAdc()
fit adc
Definition: ADCMTHistos.cxx:60
ParseInputs.gDirectory
gDirectory
Definition: Final2012/ParseInputs.py:133
MuonCalib::HistogramId::MEZZ_CARD
static const int MEZZ_CARD
Definition: HistogramId.h:45
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonCalib::MuonFixedId::getIdInt
unsigned int getIdInt() const
Definition: MuonFixedId.h:543
MuonCalib::T0CalibrationMT::converged
bool converged() const
return m_converged
Definition: T0CalibrationMT.cxx:299
MuonCalib::T0CalibrationMT::m_tube_ids
std::vector< std::map< HistogramId, std::set< MuonFixedId > > > m_tube_ids
Definition: T0CalibrationMT.h:94
MuonCalib::T0CalibrationMT::getADCHistos
ADCMTHistos * getADCHistos(const MuonFixedId &idtube, unsigned int nr)
retrieve pointer for tube idtube histograms
Definition: T0CalibrationMT.cxx:259
MdtIdHelper
Definition: MdtIdHelper.h:61
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::T0CalibrationMT::m_adc_sort_by
const std::vector< int > & m_adc_sort_by
Definition: T0CalibrationMT.h:100
MuonCalib::T0CalibrationMT::analyseSegments
virtual IMdtCalibration::MdtCalibOutputPtr analyseSegments(const MuonSegVec &segs) override
new interface function
Definition: T0CalibrationMT.cxx:174
MuonCalib::T0CalibrationOutput::GetMap
std::map< NtupleStationId, MdtTubeFitContainer * > & GetMap()
Definition: T0CalibrationOutput.h:28
MuonCalib::T0MTHistos::T0Chi2
double T0Chi2() const
returns t0 chi2
Definition: T0MTHistos.h:114
MuonCalib::T0CalibrationMT::m_histos
std::vector< std::map< HistogramId, std::unique_ptr< T0MTHistos > > > m_histos
vector of pointers tube histograms
Definition: T0CalibrationMT.h:92
MuonCalib::T0MTHistos::T0_PAR_NR_T0
static constexpr int T0_PAR_NR_T0
parameter numbers in t0 fit
Definition: T0MTHistos.h:57
MuonCalib::ADCMTHistos
Definition: ADCMTHistos.h:44
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::adcCal
float adcCal
quality flag for the SingleTubeCalib constants: 0 all ok, 1 no hits found, 2 too few hits,...
Definition: MdtTubeCalibContainer.h:24
MuonCalib::T0CalibrationMT::m_name
std::string m_name
calibration region name
Definition: T0CalibrationMT.h:87
MuonCalib::HistogramId::TUBE
static const int TUBE
valid values of the sort_by argument of the Initialize function
Definition: HistogramId.h:45
MuonCalib::ADCMTHistos::GetADCSpec
TH1F * GetADCSpec()
get adc spectrum
Definition: ADCMTHistos.h:67
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonCalib::T0CalibrationMT::getHistos
T0MTHistos * getHistos(const MuonFixedId &idtube, unsigned int nr)
retrieve pointer for tube idtube histograms
Definition: T0CalibrationMT.cxx:272
MuonCalib::T0MTHistos::GetTMaxFunction
const TF1 * GetTMaxFunction() const
returns function fitted to the riding edge of the spectrum
Definition: T0MTHistos.h:110
MuonCalib::T0CalibrationMT::setInput
void setInput(const IMdtCalibrationOutput *input) override
unused
Definition: T0CalibrationMT.cxx:285
MuonCalib::MuonFixedId
Definition: MuonFixedId.h:50
MuonCalib::T0CalibrationMT::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
Definition: T0CalibrationMT.cxx:32
MuonCalib::IMdtCalibrationOutput
Definition: IMdtCalibrationOutput.h:28
find_data.full
full
Definition: find_data.py:27
MuonCalib::MdtRelativeTubeT0::TubeGroup
TubeGroup
Definition: MdtRelativeTubeT0.h:17
MuonCalib::T0MTHistos::FitT0
bool FitT0()
Perform t0-fit Returns true if fit is successfull.
Definition: T0MTHistos.cxx:114
MuonCalib::MuonFixedId::phi
int phi() const
Definition: MuonFixedId.h:704
MuonCalib::MdtRelativeTubeT0::MEZZ_CARD
@ MEZZ_CARD
Definition: MdtRelativeTubeT0.h:17
cwd
std::string cwd
Definition: listroot.cxx:38
MuonCalib::T0CalibrationMT::analyse
bool analyse()
extract parameters from spectra
Definition: T0CalibrationMT.cxx:101
MuonCalib::HistogramId::LAYER
static const int LAYER
Definition: HistogramId.h:45
ADCMTHistos.h
MuonCalib::T0CalibrationMT::m_regiondir
TDirectory * m_regiondir
pointer to the ROOT directory
Definition: T0CalibrationMT.h:90
MuonCalib::MdtRelativeTubeT0::LAYER
@ LAYER
Definition: MdtRelativeTubeT0.h:17
MuonCalib::T0CalibrationMT::m_rel_tube_t0s
std::map< NtupleStationId, MdtRelativeTubeT0 > m_rel_tube_t0s
Definition: T0CalibrationMT.h:98
MuonCalib::ADCMTHistos::GetAdcFunction
TF1 * GetAdcFunction() const
returnd function fitted to adc-spectrum
Definition: ADCMTHistos.h:84
T0CalibrationMT.h
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuonCalib::HistogramId::MULTILAYER
static const int MULTILAYER
Definition: HistogramId.h:45
MuonCalib::T0CalibrationMT::analyse_tdc
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)
Definition: T0CalibrationMT.cxx:143
checkFileSG.fi
fi
Definition: checkFileSG.py:65
MuonCalib::T0MTHistos::TMAX_PAR_NR_TMAX
static constexpr int TMAX_PAR_NR_TMAX
parameters numbers for tmax fit
Definition: T0MTHistos.h:61
MuonCalib::MuonFixedId::mdtTube
int mdtTube() const
Mdt specific:
Definition: MuonFixedId.h:775
MuonCalib::MuonFixedId::eta
int eta() const
Definition: MuonFixedId.h:681
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib
Definition: MdtTubeCalibContainer.h:18
MuonCalib::IMdtCalibration::MuonSegVec
std::vector< std::shared_ptr< MuonCalibSegment > > MuonSegVec
Definition: IMdtCalibration.h:27
checkCorrelInHIST.histos
dictionary histos
Definition: checkCorrelInHIST.py:413
MuonCalib::MuonCalibSegment::mdtHOT
const MdtHitVec & mdtHOT() const
retrieve the full set of MdtCalibHitBase s assigned to this segment
Definition: MuonCalibSegment.cxx:147
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
HistogramId.h
MuonCalib::T0CalibrationMT::m_converged
bool m_converged
convergence status
Definition: T0CalibrationMT.h:86
MuonCalib::HistogramId::CHAMBER
static const int CHAMBER
Definition: HistogramId.h:45
MuonCalib::HistogramId
Definition: HistogramId.h:24
MuonFixedId.h
MuonCalib::MuonFixedId::mdtTubeLayer
int mdtTubeLayer() const
Mdt specific:
Definition: MuonFixedId.h:813
MuonCalib::MuonCalibSegment::MdtHitPtr
std::shared_ptr< MdtCalibHitBase > MdtHitPtr
typedef for a collection of MdtCalibHitBase s
Definition: MuonCalibSegment.h:44
Identifier
Definition: IdentifierFieldParser.cxx:14