11 #include <reconstruction/dbobjects/CDCDedx1DCell.h>
12 #include <calibration/CalibrationAlgorithm.h>
13 #include <framework/database/DBObjPtr.h>
78 if (nbin % 4 != 0)
return -1;
80 if (ibin <= nbin / 4) jbin = ibin + nbin / 2 ;
81 else if (ibin > 3 * nbin / 4) jbin = ibin - nbin / 2 ;
94 std::cout <<
"Please select global in multiple of 8 " << std::endl;
99 std::vector<int> nBinEnta0to25Per;
100 for (
int ibin = 0; ibin < nbin / 4; ibin++) {
101 if (ibin < nbin / 8) jbin++;
102 else if (TMath::Abs(ibin - nbin / 8) % 2 == 0)jbin++;
103 nBinEnta0to25Per.push_back(jbin);
106 std::vector<int> temp = nBinEnta0to25Per;
107 std::reverse(temp.begin(), temp.end());
109 std::vector<int> nBinEnta25to50Per;
110 for (
unsigned int it = 0; it < temp.size(); ++it)nBinEnta25to50Per.push_back(2 * jbin - temp.at(it) + 1);
112 std::vector<int> nBinEnta0to50Per = nBinEnta0to25Per;
113 nBinEnta0to50Per.insert(nBinEnta0to50Per.end(), nBinEnta25to50Per.begin(), nBinEnta25to50Per.end());
115 std::vector<int> nBinEnta50to100Per;
116 for (
unsigned int it = 0; it < nBinEnta0to50Per.size(); ++it) {
117 nBinEnta50to100Per.push_back(nBinEnta0to50Per.at(nBinEnta0to50Per.size() - 1) + nBinEnta0to50Per.at(it) + 1);
120 nBinEnta0to100Per = nBinEnta0to50Per;
121 nBinEnta0to100Per.insert(nBinEnta0to100Per.end(), nBinEnta50to100Per.begin(), nBinEnta50to100Per.end());
125 for (
unsigned int i = 0; i < nBinEnta0to100Per.size() - 1; ++i) {
126 if (nBinEnta0to100Per.at(i) < nBinEnta0to100Per.at(i + 1)) {
127 double binval = tempEnta->GetBinLowEdge(i + 1) + tempEnta->GetBinWidth(i + 1);
128 if (TMath::Abs(binval) < 10e-5)binval = 0;
A calibration algorithm for CDC dE/dx electron: 1D enta cleanup correction.
CDCDedx1DCellAlgorithm()
Constructor: Sets the description, the properties and the parameters of the algorithm.
bool IsRS
if rotation symmtery requested
bool IsLocalBin
if local variable bins requested
std::vector< double > fEntaBinValues
Vector for doca asym bin values.
void setMonitoringPlots(bool value)
funtion to set flag active for plotting
Double_t feaBS
Binwidth edge of enta angle.
void setOutFilePrefix(const std::string &value)
adding suffix to filenae for uniqueness in each iter
void setAsymmetricBins(bool value)
Set asym bins flag to on or off.
std::vector< int > fEntaBinNums
Vector for enta asym bin values.
int fnEntaBinL
etna angle bins, Local
std::string fSetPrefix
suffix to filename
virtual ~CDCDedx1DCellAlgorithm()
Destructor.
void setRotationSymBins(bool value)
Set rotation sys flag to on or off.
int GetRotationSymmericBin(int nbin, int ibin)
funtion to set rotation symmetry
bool IsMakePlots
produce plots for status
void setGlobalEntaBins(int value)
Set etna angle bins, Global.
virtual EResult calibrate() override
1D cell algorithm
int fnEntaBinG
Save arithmetic and truncated mean for the 'dedx' values.
Double_t feaLE
Lower edge of enta angle.
void GetVariableBin(int nbin, std::vector< int > &nBinEnta0to100Per)
funtion to set variable bins
Double_t feaUE
Upper edge of enta angle.
Base class for calibration algorithms.
EResult
The result of calibration.
Abstract base class for different kinds of events.