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;
274 for (
unsigned int ires = 1; ires <
GL.size(); ires++) {
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++) {
307 for (
unsigned int ires = 1; ires <
GL.size(); ires++) {
static double GLValue[6][1001][1001]
static bool debugMassResol_
static double ResMinMass[6]
A wrapper for the TH1D histogram to allow it to be put inside the same map as all the other classes i...
std::map< std::string, Histograms * > mapHisto_
The map of histograms.
A wrapper for the TProfile histogram to allow it to be put inside the same map as all the other class...
static double GLZNorm[40][1001]
void clearHistoMap()
Clean the histograms map.
static double ResMaxSigma[6]
static double GLZValue[40][1001][1001]
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
void writeHistoMap(const unsigned int iLoop)
Save the histograms map to file.
static bool rapidityBinsForZ_
void fillHistoMap(TFile *outputFile, unsigned int iLoop)
Create the histograms map.
std::vector< TFile * > theFiles_
The files were the histograms are saved.
static double GLNorm[6][1001]
A wrapper for the TH2D histogram to allow it to be put inside the same map as all the other classes i...
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
static std::vector< int > resfind
static double ResHalfWidth[6]
void readProbabilityDistributionsFromFile()
Read probability distributions from a local root file.
std::string probabilitiesFileInPath_
A set of histograms for resolution.
std::string probabilitiesFile_