22#include<TGraphErrors.h>
24#include <calibration/CalibrationAlgorithm.h>
25#include <framework/database/DBObjPtr.h>
26#include <cdc/utilities/CDCDedxHadSat.h>
27#include <framework/gearbox/Const.h>
29#include <cdc/calibration/CDCdEdx/HadronBgPrep.h>
57 HadronPrep(
int bgbins,
double upperbg,
double lowerbg,
int cosbins,
double uppercos,
double lowercos,
double cut);
62 void prepareSample(std::shared_ptr<TTree> hadron, TFile*& outfile,
const std::string& suffix,
63 const std::string& pdg,
bool ismakePlots,
bool correct);
68 void defineHisto(std::vector<TH1F*>& htemp,
const std::string& title,
const std::string& pdg);
73 void plotDist(std::map<
int, std::vector<TH1F*>>& hist,
const std::string& sname,
const std::string& pdg);
78 void plotDist(std::vector<TH2F*>& hist,
const std::string& sname,
const std::string& pdg);
83 void setPars(TFile*& outfile, std::map<
int, std::vector<TH1F*>>& hdedx_bgcosth,
const std::string& pdg);
88 void plotGraph(
const std::string& sname,
const std::string& pdg);
98 std::map<int, std::vector<double>>
m_sumbg;
99 std::map<int, std::vector<double>>
m_means;
Class to prepare sample for hadron saturation calibration.
void prepareSample(std::shared_ptr< TTree > hadron, TFile *&outfile, const std::string &suffix, const std::string &pdg, bool ismakePlots, bool correct)
function to prepare sample for monitoring plots, bg curve fitting and sigma vs ionz fitting
double m_dedxmax
variables to set maximum dedx mean
int m_cosBins
bins for dedx histogram
std::map< int, std::vector< double > > m_errors
error variable
double m_cosMax
max range of dedx
std::map< int, std::vector< int > > m_sumsize
variables for size
HadronPrep()
Constructor: Sets the description, the properties and the parameters of the algorithm.
double m_dedxmin
variables to set minimum dedx mean
void plotDist(std::map< int, std::vector< TH1F * > > &hist, const std::string &sname, const std::string &pdg)
function to plot the map of histograms
int m_bgBins
bins for dedx histogram
virtual ~HadronPrep()
Destructor.
void setPars(TFile *&outfile, std::map< int, std::vector< TH1F * > > &hdedx_bgcosth, const std::string &pdg)
function to fill the parameters like mean and reso in the tree
double m_bgMax
max range of dedx
void plotGraph(const std::string &sname, const std::string &pdg)
function to make graph dedx vs cos in different bg bins
void defineHisto(std::vector< TH1F * > &htemp, const std::string &title, const std::string &pdg)
function to define histograms
double m_bgMin
min range of dedx
double m_cosMin
min range of dedx
double m_cut
cut to clean protons
void clear()
function to clear the variables
std::map< int, std::vector< double > > m_means
mean variable
std::map< int, std::vector< double > > m_sumbg
variables to add bg values
std::map< int, std::vector< double > > m_sumcos
variables to add cos values
Abstract base class for different kinds of events.