Belle II Software development
PerformanceEvaluationBaseClass.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <TFile.h>
12#include <TList.h>
13#include <TH1F.h>
14#include <TH2F.h>
15#include <TH3F.h>
16
17// forward declarations
18class TFile;
19
20namespace Belle2 {
31
32 public:
33
35
37
38 TList* m_histoList = nullptr;
40 TList* m_histoList_multiplicity = nullptr;
42 TList* m_histoList_trkQuality = nullptr;
43 TList* m_histoList_firstHit = nullptr;
44 TList* m_histoList_pr = nullptr;
45 TList* m_histoList_fit = nullptr;
46 TList* m_histoList_efficiency = nullptr;
47 TList* m_histoList_purity = nullptr;
48 TList* m_histoList_others = nullptr;
50 //list of functions to create histograms:
52 TH1F* createHistogram1D(const char* name, const char* title,
53 Int_t nbins, Double_t min, Double_t max,
54 const char* xtitle, TList* histoList = nullptr);
55
57 TH1F* createHistogram1D(const char* name, const char* title,
58 Int_t nbins, Double_t* bins,
59 const char* xtitle, TList* histoList = nullptr);
60
62 TH2F* createHistogram2D(const char* name, const char* title,
63 Int_t nbinsX, Double_t minX, Double_t maxX, const char* titleX,
64 Int_t nbinsY, Double_t minY, Double_t maxY, const char* titleY,
65 TList* histoList = nullptr);
68 TH2F* createHistogram2D(const char* name, const char* title,
69 Int_t nbinsX, Double_t* binsX, const char* titleX,
70 Int_t nbinsY, Double_t* binsY, const char* titleY,
71 TList* histoList = nullptr);
72
74 TH3F* createHistogram3D(const char* name, const char* title,
75 Int_t nbinsX, Double_t minX, Double_t maxX, const char* titleX,
76 Int_t nbinsY, Double_t minY, Double_t maxY, const char* titleY,
77 Int_t nbinsZ, Double_t minZ, Double_t maxZ, const char* titleZ,
78 TList* histoList = nullptr);
79
81 TH3F* createHistogram3D(const char* name, const char* title,
82 Int_t nbinsX, Double_t* binsX, const char* titleX,
83 Int_t nbinsY, Double_t* binsY, const char* titleY,
84 Int_t nbinsZ, Double_t* binsZ, const char* titleZ,
85 TList* histoList = nullptr);
86
88 TH1* duplicateHistogram(const char* newname, const char* newtitle,
89 TH1* h, TList* histoList = nullptr);
90
91
93 TH1F* createHistogramsRatio(const char* name, const char* title,
94 TH1* hNum, TH1* hDen, bool isEffPlot,
95 int axisRef);
96
97
98
100 void addEfficiencyPlots(TList* graphList = nullptr, TH3F* h3_xPerMCParticle = nullptr, TH3F* h3_MCParticle = nullptr);
102 void addInefficiencyPlots(TList* graphList = nullptr, TH3F* h3_xPerMCParticle = nullptr,
103 TH3F* h3_MCParticle = nullptr);
105 void addPurityPlots(TList* graphList = nullptr, TH3F* h3_xPerMCParticle = nullptr, TH3F* h3_MCParticle = nullptr);
106
108 TH1F* effPlot1D(TH1F* h1_den, TH1F* h1_num,
109 const char* name, const char* title, bool geo_accettance, TList* histoList = nullptr);
110
112 TH1F* effPlot1D(TH1F* h1_MC, TH1F* h1_RecoTrack, TH1F* h1_Track,
113 const char* name, const char* title, TList* histoList = nullptr);
114
116 TH2F* effPlot2D(TH2F* h2_den, TH2F* h2_num,
117 const char* name, const char* title, bool geo_accettance, TList* histoList = nullptr);
118
120 TH2F* effPlot2D(TH2F* h2_MC, TH2F* h2_RecoTrack, TH2F* h2_Track,
121 const char* name, const char* title, TList* histoList);
122
124 TH1F* geoAcc1D(TH1F* h1_den, TH1F* h1_num,
125 const char* name, const char* title, TList* histoList = nullptr);
126
128 TH2F* geoAcc2D(TH2F* h2_den, TH2F* h2_num,
129 const char* name, const char* title, TList* histoList = nullptr);
130
132 TH1F* V0FinderEff(TH1F* h1_dau0, TH1F* h1_dau1, TH1F* h1_Mother,
133 const char* name, const char* title, TList* histoList = nullptr);
134
135
136 /* user-defined parameters */
137 std::string m_rootFileName;
139 /* ROOT file related parameters */
140 TFile* m_rootFilePtr = nullptr;
142 };
144} // end of namespace
This module takes the MCParticles, the genfit Tracks, the genfit TrackCand, and the MCTrackCands inpu...
TH1F * createHistogram1D(const char *name, const char *title, Int_t nbins, Double_t min, Double_t max, const char *xtitle, TList *histoList=nullptr)
Create a 1D histogram and add it to the TList of 1D-histograms.
TH2F * effPlot2D(TH2F *h2_den, TH2F *h2_num, const char *name, const char *title, bool geo_accettance, TList *histoList=nullptr)
Create a 2D efficiency histogram and add it to the TList of 2D-histograms.
TList * m_histoList_evtCharacterization
List of event-characterization histograms.
TH1F * effPlot1D(TH1F *h1_den, TH1F *h1_num, const char *name, const char *title, bool geo_accettance, TList *histoList=nullptr)
Create a 1D efficiency histogram and add it to the TList of 1D-histograms.
TList * m_histoList_fit
List of track-fit histograms.
TH1 * duplicateHistogram(const char *newname, const char *newtitle, TH1 *h, TList *histoList=nullptr)
Make a copy of a 1D histogram and add it to the TList of 1D-histograms.
TH1F * V0FinderEff(TH1F *h1_dau0, TH1F *h1_dau1, TH1F *h1_Mother, const char *name, const char *title, TList *histoList=nullptr)
Create a 1D efficiency histogram for V0 finding and add it to the TList of 1D-histograms.
TList * m_histoList_others
List of other performance-evaluation histograms.
void addInefficiencyPlots(TList *graphList=nullptr, TH3F *h3_xPerMCParticle=nullptr, TH3F *h3_MCParticle=nullptr)
Create pt-, theta- and phi-inefficiency 1D histograms and add them to the TList of 1D-histograms.
TList * m_histoList_pr
List of pattern-recognition histograms.
TList * m_histoList_trkQuality
List of track-quality histograms.
TList * m_histoList_purity
List of purity histograms.
TList * m_histoList
List of performance-evaluation histograms.
TList * m_histoList_multiplicity
List of multiplicity histograms.
void addPurityPlots(TList *graphList=nullptr, TH3F *h3_xPerMCParticle=nullptr, TH3F *h3_MCParticle=nullptr)
Create pt-, theta- and phi-purity 1D histograms and add them to the TList of 1D-histograms.
TList * m_histoList_firstHit
List of first-hit-position histograms.
void addEfficiencyPlots(TList *graphList=nullptr, TH3F *h3_xPerMCParticle=nullptr, TH3F *h3_MCParticle=nullptr)
Create pt-, theta- and phi-efficiency 1D histograms and add them to the TList of 1D-histograms.
TH1F * geoAcc1D(TH1F *h1_den, TH1F *h1_num, const char *name, const char *title, TList *histoList=nullptr)
Create a 1D efficiency histogram for geometric acceptance and add it to the TList of 1D-histograms.
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=nullptr)
Create a 3D histogram and add it to the TList of 3D-histograms.
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=nullptr)
Create a 2D histogram and add it to the TList of 2D-histograms.
TH2F * geoAcc2D(TH2F *h2_den, TH2F *h2_num, const char *name, const char *title, TList *histoList=nullptr)
Create a 2D efficiency histogram for geometric acceptance and add it to the TList of 2D-histograms.
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.
TFile * m_rootFilePtr
pointer at root file used for storing histograms
TList * m_histoList_efficiency
List of efficiency histograms.
Abstract base class for different kinds of events.