![]() |
Belle II Software development
|
Class to prepare sample for fitting in beta gamma bins. More...
#include <HadronBgPrep.h>
Public Member Functions | |
HadronBgPrep () | |
Constructor: Sets the description, the properties and the parameters of the algorithm. | |
virtual | ~HadronBgPrep () |
Destructor. | |
HadronBgPrep (int bgbins, double upperbg, double lowerbg, int cosbins, double uppercos, double lowercos, int injbins, double lowerinj, double upperinj, int nhitbins, double lowernhit, double uppernhit, double cut) | |
Constructor: set the input variables. | |
void | prepareSample (std::shared_ptr< TTree > hadron, TFile *&outfile, const std::string &suffix, const std::string &bgcurvefile, const std::string &bgsigmafile, const std::string &pdg, bool ismakePlots) |
function to prepare sample for monitoring plots, bg curve fitting and sigma vs ionz fitting | |
void | defineHisto (std::vector< TH1F * > &htemp, const std::string &svar, const std::string &stype, const std::string &pdg) |
function to define histograms | |
void | plotDist (std::map< int, std::vector< TH1F * > > &hist, const std::string &suffix, int bins) |
function to plot the map of histograms | |
void | plotDist (std::vector< TH1F * > &hist, const std::string &suffix, int nbins) |
function to plot the histograms | |
void | setPars (TFile *&outfile, std::string pdg, std::vector< TH1F * > &hdedx_bg, std::vector< TH1F * > &hchi_bg, std::vector< TH1F * > &hionzsigma_bg, std::map< int, std::vector< TH1F * > > &hchi_inj) |
function to fill the parameters like mean and reso in the tree | |
void | fitGaussianWRange (TH1F *&temphist, gstatus &status, double sigmaR) |
function to perform gauss fit for input histogram | |
void | fit (TH1F *&hist, const std::string &pdg) |
function to fit the histograms | |
void | printCanvasCos (std::map< int, std::vector< TH1F * > > &hchicos_allbg, std::map< int, std::vector< TH1F * > > &hchicos_1by3bg, std::map< int, std::vector< TH1F * > > &hchicos_2by3bg, std::map< int, std::vector< TH1F * > > &hchicos_3by3bg, const std::string &particle, const std::string &suffix) |
function to draw the dedx vs costh histograms | |
void | FormatGraph (TGraphErrors &gr, int flag, const std::string &name="") |
function to set graph cosmetics | |
void | clearVars () |
function to clear the variables | |
void | deleteHistos (std::vector< TH1F * > &htemp) |
function to delete the histograms | |
double | getParticleMass (const std::string &particle) |
function to get the particle mass | |
Private Attributes | |
std::vector< double > | m_sumcos |
variables to add cos values | |
std::vector< double > | m_sumbg |
variables to add bg values | |
std::vector< double > | m_sumres_square |
variables to add square of resolution | |
std::vector< double > | m_suminj |
variables to add injection time | |
std::vector< double > | m_means |
mean variable | |
std::vector< double > | m_errors |
error variable | |
std::vector< int > | m_sumsize |
size of the bg bins | |
std::vector< int > | m_injsize |
size of the injection bins | |
int | m_bgBins |
bins for bg | |
double | m_bgMin |
min range of bg | |
double | m_bgMax |
max range of bg | |
int | m_injBins |
bins for injection time | |
double | m_injMin |
min range of injection time | |
double | m_injMax |
max range of injection time | |
int | m_cosBins |
bins for cosine | |
double | m_cosMin |
min range of cosine | |
double | m_cosMax |
max range of cosine | |
int | m_nhitBins |
bins for nhits | |
double | m_nhitMin |
min range of nhits | |
double | m_nhitMax |
max range of nhits | |
double | m_cut |
cut to clean protons | |
Class to prepare sample for fitting in beta gamma bins.
Definition at line 43 of file HadronBgPrep.h.
HadronBgPrep | ( | ) |
Constructor: Sets the description, the properties and the parameters of the algorithm.
Definition at line 12 of file HadronBgPrep.cc.
|
inlinevirtual |
HadronBgPrep | ( | int | bgbins, |
double | upperbg, | ||
double | lowerbg, | ||
int | cosbins, | ||
double | uppercos, | ||
double | lowercos, | ||
int | injbins, | ||
double | lowerinj, | ||
double | upperinj, | ||
int | nhitbins, | ||
double | lowernhit, | ||
double | uppernhit, | ||
double | cut | ||
) |
Constructor: set the input variables.
Definition at line 28 of file HadronBgPrep.cc.
|
inline |
function to clear the variables
Definition at line 138 of file HadronBgPrep.h.
void defineHisto | ( | std::vector< TH1F * > & | htemp, |
const std::string & | svar, | ||
const std::string & | stype, | ||
const std::string & | pdg | ||
) |
function to define histograms
Definition at line 232 of file HadronBgPrep.cc.
|
inline |
function to delete the histograms
Definition at line 152 of file HadronBgPrep.h.
void fit | ( | TH1F *& | hist, |
const std::string & | pdg | ||
) |
function to fit the histograms
Definition at line 464 of file HadronBgPrep.cc.
void fitGaussianWRange | ( | TH1F *& | temphist, |
gstatus & | status, | ||
double | sigmaR | ||
) |
function to perform gauss fit for input histogram
Definition at line 484 of file HadronBgPrep.cc.
|
inline |
function to set graph cosmetics
Definition at line 110 of file HadronBgPrep.h.
|
inline |
function to get the particle mass
Definition at line 160 of file HadronBgPrep.h.
void plotDist | ( | std::map< int, std::vector< TH1F * > > & | hist, |
const std::string & | suffix, | ||
int | bins | ||
) |
function to plot the map of histograms
Definition at line 284 of file HadronBgPrep.cc.
void plotDist | ( | std::vector< TH1F * > & | hist, |
const std::string & | suffix, | ||
int | nbins | ||
) |
function to plot the histograms
Definition at line 311 of file HadronBgPrep.cc.
void prepareSample | ( | std::shared_ptr< TTree > | hadron, |
TFile *& | outfile, | ||
const std::string & | suffix, | ||
const std::string & | bgcurvefile, | ||
const std::string & | bgsigmafile, | ||
const std::string & | pdg, | ||
bool | ismakePlots | ||
) |
function to prepare sample for monitoring plots, bg curve fitting and sigma vs ionz fitting
Definition at line 46 of file HadronBgPrep.cc.
void printCanvasCos | ( | std::map< int, std::vector< TH1F * > > & | hchicos_allbg, |
std::map< int, std::vector< TH1F * > > & | hchicos_1by3bg, | ||
std::map< int, std::vector< TH1F * > > & | hchicos_2by3bg, | ||
std::map< int, std::vector< TH1F * > > & | hchicos_3by3bg, | ||
const std::string & | particle, | ||
const std::string & | suffix | ||
) |
function to draw the dedx vs costh histograms
Definition at line 516 of file HadronBgPrep.cc.
void setPars | ( | TFile *& | outfile, |
std::string | pdg, | ||
std::vector< TH1F * > & | hdedx_bg, | ||
std::vector< TH1F * > & | hchi_bg, | ||
std::vector< TH1F * > & | hionzsigma_bg, | ||
std::map< int, std::vector< TH1F * > > & | hchi_inj | ||
) |
function to fill the parameters like mean and reso in the tree
Definition at line 340 of file HadronBgPrep.cc.
|
private |
bins for bg
Definition at line 184 of file HadronBgPrep.h.
|
private |
max range of bg
Definition at line 186 of file HadronBgPrep.h.
|
private |
min range of bg
Definition at line 185 of file HadronBgPrep.h.
|
private |
bins for cosine
Definition at line 192 of file HadronBgPrep.h.
|
private |
max range of cosine
Definition at line 194 of file HadronBgPrep.h.
|
private |
min range of cosine
Definition at line 193 of file HadronBgPrep.h.
|
private |
cut to clean protons
Definition at line 200 of file HadronBgPrep.h.
|
private |
error variable
Definition at line 179 of file HadronBgPrep.h.
|
private |
bins for injection time
Definition at line 188 of file HadronBgPrep.h.
|
private |
max range of injection time
Definition at line 190 of file HadronBgPrep.h.
|
private |
min range of injection time
Definition at line 189 of file HadronBgPrep.h.
|
private |
size of the injection bins
Definition at line 182 of file HadronBgPrep.h.
|
private |
mean variable
Definition at line 178 of file HadronBgPrep.h.
|
private |
bins for nhits
Definition at line 196 of file HadronBgPrep.h.
|
private |
max range of nhits
Definition at line 198 of file HadronBgPrep.h.
|
private |
min range of nhits
Definition at line 197 of file HadronBgPrep.h.
|
private |
variables to add bg values
Definition at line 175 of file HadronBgPrep.h.
|
private |
variables to add cos values
Definition at line 174 of file HadronBgPrep.h.
|
private |
variables to add injection time
Definition at line 177 of file HadronBgPrep.h.
|
private |
variables to add square of resolution
Definition at line 176 of file HadronBgPrep.h.
|
private |
size of the bg bins
Definition at line 181 of file HadronBgPrep.h.