Belle II Software  release-05-02-19
PerformanceEvaluationBaseClass.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Giulia Casarosa *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #ifndef PERFORMANCEEVALUATIONBASECLASS_H_
11 #define PERFORMANCEEVALUATIONBASECLASS_H_
12 
13 #include <TFile.h>
14 #include <TList.h>
15 #include <TH1F.h>
16 #include <TH2F.h>
17 #include <TH3F.h>
18 
19 // forward declarations
20 class TFile;
21 
22 namespace Belle2 {
33 
34  public:
35 
37 
39 
40  TList* m_histoList = nullptr;
42  TList* m_histoList_multiplicity = nullptr;
44  TList* m_histoList_trkQuality = nullptr;
45  TList* m_histoList_firstHit = nullptr;
46  TList* m_histoList_pr = nullptr;
47  TList* m_histoList_fit = nullptr;
48  TList* m_histoList_efficiency = nullptr;
49  TList* m_histoList_purity = nullptr;
50  TList* m_histoList_others = nullptr;
52  //list of functions to create histograms:
54  TH1F* createHistogram1D(const char* name, const char* title,
55  Int_t nbins, Double_t min, Double_t max,
56  const char* xtitle, TList* histoList = NULL);
57 
59  TH1F* createHistogram1D(const char* name, const char* title,
60  Int_t nbins, Double_t* bins,
61  const char* xtitle, TList* histoList = NULL);
62 
64  TH2F* createHistogram2D(const char* name, const char* title,
65  Int_t nbinsX, Double_t minX, Double_t maxX, const char* titleX,
66  Int_t nbinsY, Double_t minY, Double_t maxY, const char* titleY,
67  TList* histoList = NULL);
69  TH2F* createHistogram2D(const char* name, const char* title,
71  Int_t nbinsX, Double_t* binsX, const char* titleX,
72  Int_t nbinsY, Double_t* binsY, const char* titleY,
73  TList* histoList = NULL);
74 
76  TH3F* createHistogram3D(const char* name, const char* title,
77  Int_t nbinsX, Double_t minX, Double_t maxX, const char* titleX,
78  Int_t nbinsY, Double_t minY, Double_t maxY, const char* titleY,
79  Int_t nbinsZ, Double_t minZ, Double_t maxZ, const char* titleZ,
80  TList* histoList = NULL);
81 
83  TH3F* createHistogram3D(const char* name, const char* title,
84  Int_t nbinsX, Double_t* binsX, const char* titleX,
85  Int_t nbinsY, Double_t* binsY, const char* titleY,
86  Int_t nbinsZ, Double_t* binsZ, const char* titleZ,
87  TList* histoList = NULL);
88 
90  TH1* duplicateHistogram(const char* newname, const char* newtitle,
91  TH1* h, TList* histoList = NULL);
92 
93 
95  TH1F* createHistogramsRatio(const char* name, const char* title,
96  TH1* hNum, TH1* hDen, bool isEffPlot,
97  int axisRef);
98 
99 
100 
102  void addEfficiencyPlots(TList* graphList = NULL, TH3F* h3_xPerMCParticle = NULL, TH3F* h3_MCParticle = NULL);
104  void addInefficiencyPlots(TList* graphList = NULL, TH3F* h3_xPerMCParticle = NULL,
105  TH3F* h3_MCParticle = NULL);
107  void addPurityPlots(TList* graphList = NULL, TH3F* h3_xPerMCParticle = NULL, TH3F* h3_MCParticle = NULL);
108 
110  TH1F* effPlot1D(TH1F* h1_den, TH1F* h1_num,
111  const char* name, const char* title, bool geo_accettance, TList* histoList = NULL);
112 
114  TH1F* effPlot1D(TH1F* h1_MC, TH1F* h1_RecoTrack, TH1F* h1_Track,
115  const char* name, const char* title, TList* histoList = NULL);
116 
118  TH2F* effPlot2D(TH2F* h2_den, TH2F* h2_num,
119  const char* name, const char* title, bool geo_accettance, TList* histoList = NULL);
120 
122  TH2F* effPlot2D(TH2F* h2_MC, TH2F* h2_RecoTrack, TH2F* h2_Track,
123  const char* name, const char* title, TList* histoList);
124 
126  TH1F* geoAcc1D(TH1F* h1_den, TH1F* h1_num,
127  const char* name, const char* title, TList* histoList = NULL);
128 
130  TH2F* geoAcc2D(TH2F* h2_den, TH2F* h2_num,
131  const char* name, const char* title, TList* histoList = NULL);
132 
134  TH1F* V0FinderEff(TH1F* h1_dau0, TH1F* h1_dau1, TH1F* h1_Mother,
135  const char* name, const char* title, TList* histoList = NULL);
136 
137 
138  /* user-defined parameters */
139  std::string m_rootFileName;
141  /* ROOT file related parameters */
142  TFile* m_rootFilePtr = nullptr;
144  };
146 } // end of namespace
147 
148 
149 #endif /* PERFORMANCEEVALUATIONBASECLASS_H_ */
Belle2::PerformanceEvaluationBaseClass::effPlot1D
TH1F * effPlot1D(TH1F *h1_den, TH1F *h1_num, const char *name, const char *title, bool geo_accettance, TList *histoList=NULL)
Create a 1D efficiency histogram and add it to the TList of 1D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:331
Belle2::PerformanceEvaluationBaseClass
This module takes the MCParticles, the genfit Tracks, the genfit TrackCand, and the MCTrackCands inpu...
Definition: PerformanceEvaluationBaseClass.h:32
Belle2::PerformanceEvaluationBaseClass::geoAcc1D
TH1F * geoAcc1D(TH1F *h1_den, TH1F *h1_num, const char *name, const char *title, TList *histoList=NULL)
Create a 1D efficiency histogram for geometric acceptance and add it to the TList of 1D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:560
Belle2::PerformanceEvaluationBaseClass::m_histoList_others
TList * m_histoList_others
List of other performance-evaluation histograms.
Definition: PerformanceEvaluationBaseClass.h:50
Belle2::PerformanceEvaluationBaseClass::createHistogram2D
TH2F * createHistogram2D(const char *name, const char *title, Int_t nbinsX, Double_t minX, Double_t maxX, const char *titleX, Int_t nbinsY, Double_t minY, Double_t maxY, const char *titleY, TList *histoList=NULL)
Create a 2D histogram and add it to the TList of 2D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:58
Belle2::PerformanceEvaluationBaseClass::m_histoList_efficiency
TList * m_histoList_efficiency
List of efficiency histograms.
Definition: PerformanceEvaluationBaseClass.h:48
Belle2::PerformanceEvaluationBaseClass::m_histoList_multiplicity
TList * m_histoList_multiplicity
List of multiplicity histograms.
Definition: PerformanceEvaluationBaseClass.h:42
Belle2::PerformanceEvaluationBaseClass::addInefficiencyPlots
void addInefficiencyPlots(TList *graphList=NULL, TH3F *h3_xPerMCParticle=NULL, TH3F *h3_MCParticle=NULL)
Create pt-, theta- and phi-inefficiency 1D histograms and add them to the TList of 1D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:271
Belle2::PerformanceEvaluationBaseClass::createHistogramsRatio
TH1F * createHistogramsRatio(const char *name, const char *title, TH1 *hNum, TH1 *hDen, bool isEffPlot, int axisRef)
Make a new 1D histogram from the ratio of two others and add it to the TList of 1D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:166
Belle2::PerformanceEvaluationBaseClass::effPlot2D
TH2F * effPlot2D(TH2F *h2_den, TH2F *h2_num, const char *name, const char *title, bool geo_accettance, TList *histoList=NULL)
Create a 2D efficiency histogram and add it to the TList of 2D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:430
Belle2::PerformanceEvaluationBaseClass::V0FinderEff
TH1F * V0FinderEff(TH1F *h1_dau0, TH1F *h1_dau1, TH1F *h1_Mother, const char *name, const char *title, TList *histoList=NULL)
Create a 1D efficiency histogram for V0 finding and add it to the TList of 1D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:624
Belle2::PerformanceEvaluationBaseClass::m_histoList_fit
TList * m_histoList_fit
List of track-fit histograms.
Definition: PerformanceEvaluationBaseClass.h:47
Belle2::PerformanceEvaluationBaseClass::addEfficiencyPlots
void addEfficiencyPlots(TList *graphList=NULL, TH3F *h3_xPerMCParticle=NULL, TH3F *h3_MCParticle=NULL)
Create pt-, theta- and phi-efficiency 1D histograms and add them to the TList of 1D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:292
Belle2::PerformanceEvaluationBaseClass::m_rootFileName
std::string m_rootFileName
root file name
Definition: PerformanceEvaluationBaseClass.h:139
Belle2::PerformanceEvaluationBaseClass::m_histoList_trkQuality
TList * m_histoList_trkQuality
List of track-quality histograms.
Definition: PerformanceEvaluationBaseClass.h:44
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PerformanceEvaluationBaseClass::addPurityPlots
void addPurityPlots(TList *graphList=NULL, TH3F *h3_xPerMCParticle=NULL, TH3F *h3_MCParticle=NULL)
Create pt-, theta- and phi-purity 1D histograms and add them to the TList of 1D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:314
Belle2::PerformanceEvaluationBaseClass::createHistogram3D
TH3F * createHistogram3D(const char *name, const char *title, Int_t nbinsX, Double_t minX, Double_t maxX, const char *titleX, Int_t nbinsY, Double_t minY, Double_t maxY, const char *titleY, Int_t nbinsZ, Double_t minZ, Double_t maxZ, const char *titleZ, TList *histoList=NULL)
Create a 3D histogram and add it to the TList of 3D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:95
Belle2::PerformanceEvaluationBaseClass::m_rootFilePtr
TFile * m_rootFilePtr
pointer at root file used for storing histograms
Definition: PerformanceEvaluationBaseClass.h:142
Belle2::PerformanceEvaluationBaseClass::m_histoList
TList * m_histoList
List of performance-evaluation histograms.
Definition: PerformanceEvaluationBaseClass.h:40
Belle2::PerformanceEvaluationBaseClass::m_histoList_pr
TList * m_histoList_pr
List of pattern-recognition histograms.
Definition: PerformanceEvaluationBaseClass.h:46
Belle2::PerformanceEvaluationBaseClass::createHistogram1D
TH1F * createHistogram1D(const char *name, const char *title, Int_t nbins, Double_t min, Double_t max, const char *xtitle, TList *histoList=NULL)
Create a 1D histogram and add it to the TList of 1D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:28
Belle2::PerformanceEvaluationBaseClass::m_histoList_evtCharacterization
TList * m_histoList_evtCharacterization
List of event-characterization histograms.
Definition: PerformanceEvaluationBaseClass.h:43
Belle2::PerformanceEvaluationBaseClass::duplicateHistogram
TH1 * duplicateHistogram(const char *newname, const char *newtitle, TH1 *h, TList *histoList=NULL)
Make a copy of a 1D histogram and add it to the TList of 1D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:139
Belle2::PerformanceEvaluationBaseClass::m_histoList_firstHit
TList * m_histoList_firstHit
List of first-hit-position histograms.
Definition: PerformanceEvaluationBaseClass.h:45
Belle2::PerformanceEvaluationBaseClass::geoAcc2D
TH2F * geoAcc2D(TH2F *h2_den, TH2F *h2_num, const char *name, const char *title, TList *histoList=NULL)
Create a 2D efficiency histogram for geometric acceptance and add it to the TList of 2D-histograms.
Definition: PerformanceEvaluationBaseClass.cc:585
Belle2::PerformanceEvaluationBaseClass::m_histoList_purity
TList * m_histoList_purity
List of purity histograms.
Definition: PerformanceEvaluationBaseClass.h:49