17#include <reconstruction/dbobjects/CDCDedxCosineEdge.h>
18#include <calibration/CalibrationAlgorithm.h>
19#include <framework/database/DBObjPtr.h>
21enum fitstatus {FitOK, FitFailed, LowStats};
99 void createPayload(std::vector<std::vector<double>>& vfinalconst);
104 void plotHist(std::vector<TH1D*>& hdedx, std::map<
int, std::vector<double>>& fPars, std::string type);
109 void plotFitPars(std::map<
int, std::vector<double>>& fPars_Neg, std::map<
int, std::vector<double>>& fPars_Pos);
114 void plotConstants(std::vector<std::vector<double>>& vfinalconst);
126 pt->SetTextAlign(11);
127 pt->SetFillStyle(3001);
130 pt->SetTextSize(size);
138 hist.SetMarkerStyle(20);
139 hist.SetMarkerSize(0.60);
140 hist.SetMarkerColor(color);
141 hist.SetLineColor(color);
143 hist.GetYaxis()->SetRangeUser(min, max);
144 hist.GetXaxis()->SetLabelSize(size);
145 hist.GetYaxis()->SetLabelSize(size);
A calibration algorithm for CDC dE/dx electron cos(theta) dependence.
void plotFitPars(std::map< int, std::vector< double > > &fPars_Neg, std::map< int, std::vector< double > > &fPars_Pos)
function to draw the fit parameters (relative gains and resolutions)
virtual ~CDCDedxCosEdgeAlgorithm()
Destructor.
void setNegCosRange(double min, double max)
function to set negative cosine range
CDCDedxCosEdgeAlgorithm()
Constructor: Sets the description, the properties and the parameters of the algorithm.
bool m_isMerge
merge payload if calculated relative
void plotStats()
function to draw the stats plots
void setHistCosmetics(TH1D &hist, Color_t color, double min, double max, double size)
function to change histogram styles
void plotHist(std::vector< TH1D * > &hdedx, std::map< int, std::vector< double > > &fPars, std::string type)
function to draw dedx histograms for each bin
double m_negMin
min neg cosine angle
void setFitWidth(double value=2.5)
set sigma to restrict fit in (mean+/sigma) range
void getExpRunInfo()
function to get info about current exp and run
void setCosineBins(unsigned int value)
function to set number of cosine bins on (equal posi and negi side)
DBObjPtr< CDCDedxCosineEdge > m_DBCosineCor
CoseEdge correction DB object.
unsigned int m_npBins
number of bins across cosine range
bool m_isMakePlots
enable saving plots
void createPayload(std::vector< std::vector< double > > &vfinalconst)
function to store new payload after full calibration
std::string m_suffix
suffix for better plot naming
void setTextCosmetics(TPaveText *pt, double size)
function to change text styles
double m_posMax
max pos cosine angle
int m_dedxBins
number of bins for dedx histogram
void plotConstants(std::vector< std::vector< double > > &vfinalconst)
function to draw the final calibration constants and comparison with old constants
void setMergePayload(bool value=true)
function to merge paylaods (if relative)
void setPosCosRange(double min, double max)
function to set positive cosine range
double m_posMin
min pos cosine angle
virtual EResult calibrate() override
Cosine edge algorithm.
double m_sigLim
gaussian fit sigma limit
double m_dedxMax
max dedx range
void fitGaussianWRange(TH1D *&temphist, fitstatus &status)
function to perform gauss fit for given histogram
void setMonitoringPlots(bool value=false)
function enable monitoring plots
double m_dedxMin
min dedx range
void setDedxHistPars(int value, double min, double max)
function to set dedx histogram parameters
double m_negMax
max neg cosine angle
Base class for calibration algorithms.
EResult
The result of calibration.
Class for accessing objects in the database.
Abstract base class for different kinds of events.