1 #ifndef MUSCLEFITBASE_C
2 #define MUSCLEFITBASE_C
30 LogDebug(
"MuScleFitBase") <<
"Creating new histograms" << std::endl;
87 new HTH2D(
outputFile,
"hPtRecoVsPtGen",
"Pt reco vs Pt gen",
"hPtRecoVsPtGen", 120, 0., 120., 120, 0, 120.);
88 (*recoGenHisto)->SetXTitle(
"Pt gen (GeV)");
89 (*recoGenHisto)->SetYTitle(
"Pt reco (GeV)");
90 mapHisto_[
"hPtRecoVsPtGen"] = recoGenHisto;
92 new HTH2D(
outputFile,
"hPtRecoVsPtSim",
"Pt reco vs Pt sim",
"hPtRecoVsPtSim", 120, 0., 120., 120, 0, 120.);
93 (*recoSimHisto)->SetXTitle(
"Pt sim (GeV)");
94 (*recoSimHisto)->SetYTitle(
"Pt reco (GeV)");
95 mapHisto_[
"hPtRecoVsPtSim"] = recoSimHisto;
109 new HTH1D(
outputFile,
"Mass_fine_Probability",
"Mass probability", 4000, 0., 20.);
117 "DeltaMassOverGenMassVsPt",
118 "DeltaMassOverGenMassVsPt",
119 "DeltaMassOverGenMass",
127 "DeltaMassOverGenMassVsEta",
128 "DeltaMassOverGenMassVsEta",
129 "DeltaMassOverGenMass",
146 delete (*histo).second;
155 (*histo).second->Write();
160 std::array<TH2D*, 6> GLZ = {{
nullptr}};
161 std::array<TH2D*, 6>
GL = {{
nullptr}};
162 std::unique_ptr<TFile> ProbsFile;
171 ProbsFile = std::make_unique<TFile>(
file.fullPath().c_str());
176 bool resfindEmpty =
true;
178 resfindEmpty =
false;
179 for (
unsigned char i = 0;
i < GLZ.size();
i++) {
181 snprintf(nameh, 6,
"GLZ%hhu",
i);
182 GLZ[
i] = dynamic_cast<TH2D*>(ProbsFile->Get(nameh));
185 GL[0] = dynamic_cast<TH2D*>(ProbsFile->Get(
"GL0"));
186 resfindEmpty =
false;
188 for (
unsigned char i = 1;
i <
GL.size(); ++
i) {
191 snprintf(nameh, 6,
"GL%hhu",
i);
192 GL[
i] = dynamic_cast<TH2D*>(ProbsFile->Get(nameh));
193 resfindEmpty =
false;
197 std::cout <<
"[MuScleFit-Constructor]: No resonance selected, please fill the resfind array" << std::endl;
214 for (
unsigned int i = 1;
i <
GL.size(); ++
i) {
229 for (
unsigned int iY = 0; iY < GLZ.size(); iY++) {
230 int nBinsX = GLZ[iY]->GetNbinsX();
231 int nBinsY = GLZ[iY]->GetNbinsY();
235 std::cout <<
"nBinsX = " << nBinsX <<
", nBinsY = " << nBinsY << std::endl;
250 int nBinsX =
GL[0]->GetNbinsX();
251 int nBinsY =
GL[0]->GetNbinsY();
255 std::cout <<
"nBinsX = " << nBinsX <<
", nBinsY = " << nBinsY << std::endl;
276 int nBinsX =
GL[
ires]->GetNbinsX();
277 int nBinsY =
GL[
ires]->GetNbinsY();
281 std::cout <<
"nBinsX = " << nBinsX <<
", nBinsY = " << nBinsY << std::endl;
301 for (
unsigned int i = 0;
i < GLZ.size();
i++) {