8 #include <cdc/calibration/FudgeFactorCalibrationAlgorithm.h>
9 #include <calibration/CalibrationAlgorithm.h>
16 #include <TStopwatch.h>
18 #include <framework/database/DBObjPtr.h>
19 #include <framework/database/IntervalOfValidity.h>
20 #include <framework/logging/Logger.h>
28 FudgeFactorCalibrationAlgorithm::FudgeFactorCalibrationAlgorithm():
CalibrationAlgorithm(
"CDCFudgeFactorCalibrationCollector")
32 " -------------------------- T0 Calibration Algorithm -------------------------\n"
38 B2INFO(
"Start calibration");
41 gErrorIgnoreLevel = 3001;
48 B2INFO(
"ExpRun used for DB Geometry : " << exprun.first <<
" " << exprun.second);
57 auto tree = getObjectPtr<TTree>(
"tree");
58 auto hEvtT0 = getObjectPtr<TH1F>(
"hEventT0");
59 auto hNDF_pos = getObjectPtr<TH1F>(
"hNDF_pos");
60 auto hNDF_neg = getObjectPtr<TH1F>(
"hNDF_neg");
61 auto hPval_pos = getObjectPtr<TH1F>(
"hPval_pos");
62 auto hPval_neg = getObjectPtr<TH1F>(
"hPval_neg");
64 auto hnCDC_pos = getObjectPtr<TH1F>(
"hnCDC_pos");
65 auto hnCDC_neg = getObjectPtr<TH1F>(
"hnCDC_neg");
68 auto hdPt = getObjectPtr<TH1F>(
"hdPt");
69 auto hdD0 = getObjectPtr<TH1F>(
"hdD0");
70 auto hdZ0 = getObjectPtr<TH1F>(
"hdZ0");
72 auto hdPt_cm = getObjectPtr<TH1F>(
"hdPt_cm");
73 auto hdPtPt_cm = getObjectPtr<TH2F>(
"hdPtPt_cm");
74 auto hdTheta_cm = getObjectPtr<TH1F>(
"hdTheta_cm");
75 auto hdPhi0_cm = getObjectPtr<TH1F>(
"hdPhi0_cm");
78 B2INFO(
"Storing histograms");
79 TFile* fout =
new TFile(
m_histName.c_str(),
"RECREATE");
83 if (hEvtT0) hEvtT0->Write();
85 if (hPval_pos) hPval_pos->Write();
86 if (hPval_neg) hPval_neg->Write();
88 if (hNDF_pos) hNDF_pos->Write();
89 if (hNDF_neg) hNDF_neg->Write();
91 if (hnCDC_pos) hnCDC_pos->Write();
92 if (hnCDC_neg) hnCDC_neg->Write();
94 if (hdPt) hdPt->Write();
95 if (hdD0) hdD0->Write();
96 if (hdZ0) hdZ0->Write();
98 if (hdPt_cm) hdPt_cm->Write();
99 if (hdPtPt_cm) hdPtPt_cm->Write();
100 if (hdPhi0_cm) hdPhi0_cm->Write();
101 if (hdTheta_cm) hdTheta_cm->Write();
102 TTree* newtree = tree->CloneTree();
103 newtree->SetName(
"tree_dimuon");
std::string m_histName
root file name
EResult calibrate() override
Run algo on data.
Base class for calibration algorithms.
void updateDBObjPtrs(const unsigned int event, const int run, const int experiment)
Updates any DBObjPtrs by calling update(event) for DBStore.
void setDescription(const std::string &description)
Set algorithm description (in constructor)
EResult
The result of calibration.
@ c_OK
Finished successfuly =0 in Python.
const std::vector< Calibration::ExpRun > & getRunList() const
Get the list of runs for which calibration is called.
Abstract base class for different kinds of events.