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>
31 " -------------------------- CDC fudge factor Calibration Algorithm -------------------------\n"
37 B2INFO(
"Start calibration");
40 gErrorIgnoreLevel = 3001;
47 B2INFO(
"ExpRun used for DB Geometry : " << exprun.first <<
" " << exprun.second);
56 auto tree = getObjectPtr<TTree>(
"tree");
57 auto hEvtT0 = getObjectPtr<TH1F>(
"hEventT0");
58 auto hExtraCDCHit = getObjectPtr<TH1F>(
"hExtraCDCHit");
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();
84 if (hExtraCDCHit) hExtraCDCHit->Write();
86 if (hPval_pos) hPval_pos->Write();
87 if (hPval_neg) hPval_neg->Write();
89 if (hNDF_pos) hNDF_pos->Write();
90 if (hNDF_neg) hNDF_neg->Write();
92 if (hnCDC_pos) hnCDC_pos->Write();
93 if (hnCDC_neg) hnCDC_neg->Write();
95 if (hdPt) hdPt->Write();
96 if (hdD0) hdD0->Write();
97 if (hdZ0) hdZ0->Write();
99 if (hdPt_cm) hdPt_cm->Write();
100 if (hdPtPt_cm) hdPtPt_cm->Write();
101 if (hdPhi0_cm) hdPhi0_cm->Write();
102 if (hdTheta_cm) hdTheta_cm->Write();
103 TTree* newtree = (TTree*)tree->CloneTree();
104 newtree->SetName(
"dimuon");
std::string m_histName
root file name
FudgeFactorCalibrationAlgorithm()
Constructor.
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)
const std::vector< Calibration::ExpRun > & getRunList() const
Get the list of runs for which calibration is called.
EResult
The result of calibration.
@ c_OK
Finished successfully =0 in Python.
Abstract base class for different kinds of events.