11#include <calibration/CalibrationAlgorithm.h>
75 if (nbin % 4 != 0)
return -1;
77 if (ibin <= nbin / 4) jbin = ibin + nbin / 2 ;
78 else if (ibin > 3 * nbin / 4) jbin = ibin - nbin / 2 ;
91 std::cout <<
"Please select global in multiple of 8 " << std::endl;
96 std::vector<int> nBinEnta0to25Per;
97 for (
int ibin = 0; ibin < nbin / 4; ibin++) {
98 if (ibin < nbin / 8) jbin++;
99 else if (TMath::Abs(ibin - nbin / 8) % 2 == 0)jbin++;
100 nBinEnta0to25Per.push_back(jbin);
103 std::vector<int> temp = nBinEnta0to25Per;
104 std::reverse(temp.begin(), temp.end());
106 std::vector<int> nBinEnta25to50Per;
107 for (
unsigned int it = 0; it < temp.size(); ++it)nBinEnta25to50Per.push_back(2 * jbin - temp.at(it) + 1);
109 std::vector<int> nBinEnta0to50Per = nBinEnta0to25Per;
110 nBinEnta0to50Per.insert(nBinEnta0to50Per.end(), nBinEnta25to50Per.begin(), nBinEnta25to50Per.end());
112 std::vector<int> nBinEnta50to100Per;
113 for (
unsigned int it = 0; it < nBinEnta0to50Per.size(); ++it) {
114 nBinEnta50to100Per.push_back(nBinEnta0to50Per.at(nBinEnta0to50Per.size() - 1) + nBinEnta0to50Per.at(it) + 1);
117 nBinEnta0to100Per = nBinEnta0to50Per;
118 nBinEnta0to100Per.insert(nBinEnta0to100Per.end(), nBinEnta50to100Per.begin(), nBinEnta50to100Per.end());
122 for (
unsigned int i = 0; i < nBinEnta0to100Per.size() - 1; ++i) {
123 if (nBinEnta0to100Per.at(i) < nBinEnta0to100Per.at(i + 1)) {
124 double binval = tempEnta->GetBinLowEdge(i + 1) + tempEnta->GetBinWidth(i + 1);
125 if (TMath::Abs(binval) < 10e-5)binval = 0;
A calibration algorithm for CDC dE/dx electron 2D enta vs doca correction.
bool IsRS
if rotation symmtery requested
bool IsLocalBin
if local variable bin requested
std::vector< double > fEntaBinValues
Vector for doca asym bin values.
Double_t fdocaUE
Upper edge of doca.
Double_t fdocaLE
Lower edge of doca.
int fnDocaBinG
doca angle bins, Global
Double_t feaBS
Binwidth edge of enta angle.
void setOutFilePrefix(const std::string &value)
adding prefix to filename for uniqueness in each iter
std::vector< double > fDocaBinValues
Vector for doca asym bin #.
void setAsymmetricBins(bool value)
Set asym bins flag to on or off.
std::vector< int > fEntaBinNums
Vector for enta asym bin values.
int fnDocaBinL
doca angle bins, Local
CDCDedx2DCellAlgorithm()
Constructor: Sets the description the properties and the parameters of the algorithm.
int fnEntaBinL
etna angle bins, Local
std::string fSetPrefix
prefix to filename
Double_t fdocaBS
Binwidth edge of doca.
void setGlobalDocaBins(int value)
Set doca angle bins, Global anything is fine for the moment.
int GetRotationSymmericBin(int nbin, int ibin)
function to set rotation symmetry
bool IsMakePlots
produce plots for status
void setGlobalEntaBins(int value)
Set etna angle bins, Global in multiple of 8.
virtual EResult calibrate() override
2D Cell algorithm algorithm
int fnEntaBinG
Save arithmetic and truncated mean for the 'dedx' values.
void setRotationSymmetry(bool value)
Set asym bins flag to on or off.
void setMonitoringPlots(bool value=false)
function to set flag active for plotting
virtual ~CDCDedx2DCellAlgorithm()
Destructor.
std::vector< int > fDocaBinNums
Vector for enta asym bin #.
Double_t feaLE
Lower edge of enta angle.
void GetVariableBin(int nbin, std::vector< int > &nBinEnta0to100Per)
function 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.