25#include <cdc/dbobjects/CDCDedx1DCell.h>
26#include <calibration/CalibrationAlgorithm.h>
27#include <framework/database/DBObjPtr.h>
119 B2FATAL(
"Choose charge value either +/-1 or 0");
127 if (nbin % 4 != 0)
return ibin;
129 if (ibin < nbin / 4) jbin = ibin + nbin / 2 ;
130 else if (ibin >= 3 * nbin / 4) jbin = ibin - nbin / 2 ;
147 void defineHisto(std::vector<TH1D*> hdedxhit[2], TH1D* hdedxlay[2], TH1D* hentalay[2]);
167 void plotMergeFactor(std::map<
int, std::vector<double>> bounds,
const std::array<int, 2> nDev,
168 std::map<
int, std::vector<int>> steps);
183 void plotQaPars(TH1D* hentalay[2], TH2D* hptcosth);
188 void plotRelConst(std::vector<double>tempconst, std::vector<double>layerconst,
int il);
A calibration algorithm for CDC dE/dx electron: 1D enta cleanup correction.
void setSplitFactor(int value)
set bin split factor for all range
CDCDedx1DCellAlgorithm()
Constructor: Sets the description, the properties and the parameters of the algorithm.
std::string m_label[2]
add inner/outer layer label
double m_eaMax
upper edge of entrance angle
void plotMergeFactor(std::map< int, std::vector< double > > bounds, const std::array< int, 2 > nDev, std::map< int, std::vector< int > > steps)
function to plot merging factor
double m_truncMax
upper threshold on truncation
int m_binSplit
multiply nbins by this factor in full range
std::array< std::vector< int >, 2 > m_binIndex
symm/Var bin numbers
double m_truncMin
lower threshold on truncation
double m_adjustFac
factor with that one what to adjust baseline
void setBaselineFactor(double charge, double factor)
adjust baseline based on charge or global overall works for only single charge or both
void setSuffix(const std::string &value)
adding suffix to control plots
void enableExtraPlots(bool value=false)
function to set flag active for plotting
void getTruncatedBins(TH1D *hist, int &binlow, int &binhigh)
function to get bins of truncation from histogram
void CreateBinMapping()
class function to create vectors for bin mapping (Var->symm)
double m_chargeType
charge type for baseline adj
void getExpRunInfo()
function to get extract calibration run/exp
DBObjPtr< CDCDedx1DCell > m_DBOneDCell
One cell correction DB object.
double m_cosMax
a limit on cos theta
bool isPrintLog
print more debug information
std::array< std::vector< double >, 2 > m_binValue
enta Var bin values
virtual ~CDCDedx1DCellAlgorithm()
Destructor.
std::string m_suffix
add suffix to all plot name
int m_eaB
reset # of bins for entrance angle for each experiment
double getTruncationMean(TH1D *hist, int binlow, int binhigh)
function to get truncated mean
double m_ptMax
a limit on transverse momentum
void setLayerTrunc(bool value=false)
function to set truncation method (local vs global)
void plotConstants()
function to draw the old/new final constants
std::vector< int > m_eaBinLocal
void setMergePayload(bool value)
set false if generating absolute (not relative) payload
bool isFixTrunc
true = fix window for all out/inner layers
bool isVarBins
true: if variable bin size is requested
void plotdedxHist(std::vector< TH1D * > hdedxhit[2])
function to draw the dE/dx histogram in enta bins
void setPtLimit(double value)
function to set pt limit
void defineHisto(std::vector< TH1D * > hdedxhit[2], TH1D *hdedxlay[2], TH1D *hentalay[2])
function to define histograms
double m_eaBW
binwdith of entrance angle bin
bool isRotSymm
if rotation symmetry requested
std::string m_runExp
add suffix to all plot name
void setVariableBins(bool value)
Set Var bins flag to on or off.
void plotEventStats()
function to draw the stats plots
int rotationalBin(int nbin, int ibin)
class function to set rotation symmetry
virtual EResult calibrate() override
1D cell algorithm
void setRotSymmetry(bool value)
set rotation sys to copy constants from one region to other
void plotQaPars(TH1D *hentalay[2], TH2D *hptcosth)
function to draw pt vs costh and entrance angle distribution for Inner/Outer layer
double m_dedxMax
upper edge of dedxhit
void createPayload()
function to generate final constants
void setTrucationBins(double lowedge, double upedge)
function to set bins of truncation from histogram
bool isMakePlots
produce plots for status
void plotRelConst(std::vector< double >tempconst, std::vector< double >layerconst, int il)
function to draw symm/Var layer constant
std::vector< std::vector< double > > m_onedcors
final vectors of calibration
bool isMerge
print more debug information
void setCosLimit(double value)
function to set cos limit
double m_dedxMin
lower edge of dedxhit
void plotLayerDist(TH1D *hdedxL[2])
function to draw dedx dist.
double m_eaMin
lower edge of entrance 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.