1 #ifndef MUSCLEFITBASE_C 2 #define MUSCLEFITBASE_C 28 LogDebug(
"MuScleFitBase") <<
"Creating new histograms" << std::endl;
37 mapHisto_[
"hRecBestResAllEvents"] =
new HParticle (
"hRecBestResAllEvents", minMass, maxMass, maxPt);
53 mapHisto_[
"hFunctionResolMassVSMu"] =
new HResolutionVSPart( outputFile,
"hFunctionResolMassVSMu", maxPt, 0, 0.1, 0, 0.1,
true );
60 mapHisto_[
"hResolCotgThetaGenVSMu"] =
new HResolutionVSPart( outputFile,
"hResolCotgThetaGenVSMu", maxPt, -0.02, 0.02, -0.02, 0.02 );
61 mapHisto_[
"hResolCotgThetaSimVSMu"] =
new HResolutionVSPart( outputFile,
"hResolCotgThetaSimVSMu", maxPt, -0.02, 0.02, -0.02, 0.02 );
74 HTH2D * recoGenHisto =
new HTH2D(outputFile,
"hPtRecoVsPtGen",
"Pt reco vs Pt gen",
"hPtRecoVsPtGen", 120, 0., 120., 120, 0, 120.);
75 (*recoGenHisto)->SetXTitle(
"Pt gen (GeV)");
76 (*recoGenHisto)->SetYTitle(
"Pt reco (GeV)");
77 mapHisto_[
"hPtRecoVsPtGen"] = recoGenHisto;
78 HTH2D * recoSimHisto =
new HTH2D(outputFile,
"hPtRecoVsPtSim",
"Pt reco vs Pt sim",
"hPtRecoVsPtSim", 120, 0., 120., 120, 0, 120.);
79 (*recoSimHisto)->SetXTitle(
"Pt sim (GeV)");
80 (*recoSimHisto)->SetYTitle(
"Pt reco (GeV)");
81 mapHisto_[
"hPtRecoVsPtSim"] = recoSimHisto;
91 mapHisto_[
"hMass_P"] =
new HTProfile( outputFile,
"Mass_P",
"Mass probability", 4000, 0., 200., 0., 50. );
92 mapHisto_[
"hMass_fine_P"] =
new HTProfile( outputFile,
"Mass_fine_P",
"Mass probability", 4000, 0., 20., 0., 50. );
93 mapHisto_[
"hMass_Probability"] =
new HTH1D( outputFile,
"Mass_Probability",
"Mass probability", 4000, 0., 200.);
94 mapHisto_[
"hMass_fine_Probability"] =
new HTH1D( outputFile,
"Mass_fine_Probability",
"Mass probability", 4000, 0., 20.);
101 mapHisto_[
"hDeltaMassOverGenMassVsPt"] =
new HTH2D( outputFile,
"DeltaMassOverGenMassVsPt",
"DeltaMassOverGenMassVsPt",
"DeltaMassOverGenMass", 200, 0, maxPt, 200, -0.2, 0.2 );
102 mapHisto_[
"hDeltaMassOverGenMassVsEta"] =
new HTH2D( outputFile,
"DeltaMassOverGenMassVsEta",
"DeltaMassOverGenMassVsEta",
"DeltaMassOverGenMass", 200, -3., 3., 200, -0.2, 0.2 );
111 for (std::map<std::string, Histograms*>::const_iterator
histo=
mapHisto_.begin();
113 delete (*histo).second;
118 for (std::map<std::string, Histograms*>::const_iterator
histo=
mapHisto_.begin();
122 (*histo).second->Write();
140 ProbsFile =
new TFile (
file.fullPath().c_str());
146 for (
unsigned char i=0;
i<6;
i++ ) {
148 sprintf (nameh,
"GLZ%hhu",
i);
149 GLZ[
i] =
dynamic_cast<TH2D*
>(ProbsFile->Get(nameh));
153 GL[0] =
dynamic_cast<TH2D*
> (ProbsFile->Get(
"GL0"));
156 GL[1] =
dynamic_cast<TH2D*
> (ProbsFile->Get(
"GL1"));
158 GL[2] =
dynamic_cast<TH2D*
> (ProbsFile->Get(
"GL2"));
160 GL[3] =
dynamic_cast<TH2D*
> (ProbsFile->Get(
"GL3"));
162 GL[4] =
dynamic_cast<TH2D*
> (ProbsFile->Get(
"GL4"));
164 GL[5] =
dynamic_cast<TH2D*
> (ProbsFile->Get(
"GL5"));
166 std::cout<<
"[MuScleFit-Constructor]: No resonance selected, please fill the resfind array"<<std::endl;
183 for(
int i=1;
i<6; ++
i ) {
198 for (
int iY=0; iY<6; iY++) {
199 int nBinsX = GLZ[iY]->GetNbinsX();
200 int nBinsY = GLZ[iY]->GetNbinsY();
203 std::cout<<
"nBinsX = " << nBinsX <<
", nBinsY = " << nBinsY << std::endl;
217 int nBinsX = GL[0]->GetNbinsX();
218 int nBinsY = GL[0]->GetNbinsY();
221 std::cout<<
"nBinsX = " << nBinsX <<
", nBinsY = " << nBinsY << std::endl;
241 int nBinsX = GL[
ires]->GetNbinsX();
242 int nBinsY = GL[
ires]->GetNbinsY();
245 std::cout<<
"nBinsX = " << nBinsX <<
", nBinsY = " << nBinsY << std::endl;
264 for (
int i=0;
i<6;
i++ ) {
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]
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...
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_