Belle II Software  release-05-02-19
CDCDedxCosineAlgorithm.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: jvbennett *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <reconstruction/dbobjects/CDCDedxCosineCor.h>
14 #include <calibration/CalibrationAlgorithm.h>
15 #include <framework/database/DBObjPtr.h>
16 #include <TH1D.h>
17 
18 namespace Belle2 {
27  class CDCDedxCosineAlgorithm : public CalibrationAlgorithm {
28 
29  public:
30 
35 
39  virtual ~CDCDedxCosineAlgorithm() {}
40 
44  void setMethodSep(bool value = true) {isMethodSep = value;}
45 
49  void setMergePayload(bool value = true) {isMergePayload = value;}
50 
54  void generateNewPayloads(std::vector<double> cosine);
55 
59  void setMonitoringPlots(bool value = false) {isMakePlots = value;}
60 
64  void setFitWidth(double value = 2.5) {fSigLim = value;}
65 
69  void FitGaussianWRange(TH1D*& temphist, TString& status);
70 
74  void setCosineBins(unsigned int value = 100) {fCosbins = value;}
75 
79  void setCosineRange(double min = -1.0, double max = 1.0) {fCosMin = min; fCosMax = max;}
80 
84  void setHistBins(int value = 600) {fHistbins = value;}
85 
89  void setHistRange(double min = 0.0, double max = 3.0) {fdEdxMin = min; fdEdxMax = max;}
90 
91  protected:
92 
96  virtual EResult calibrate() override;
97 
98  private:
99  bool isMethodSep;
100  bool isMakePlots;
101  bool isMergePayload;
102  double fSigLim;
103  unsigned int fCosbins;
104  double fCosMin;
105  double fCosMax;
106  int fHistbins;
107  double fdEdxMin;
108  double fdEdxMax;
109  int fStartRun;
111  };
113 } // namespace Belle2
Belle2::CDCDedxCosineAlgorithm::fdEdxMin
double fdEdxMin
min dedx range for gain cal
Definition: CDCDedxCosineAlgorithm.h:115
Belle2::CDCDedxCosineAlgorithm::calibrate
virtual EResult calibrate() override
Cosine algorithm.
Definition: CDCDedxCosineAlgorithm.cc:45
Belle2::CDCDedxCosineAlgorithm::setHistBins
void setHistBins(int value=600)
function to set nbins of dedx dist calibration
Definition: CDCDedxCosineAlgorithm.h:92
Belle2::CDCDedxCosineAlgorithm::setMonitoringPlots
void setMonitoringPlots(bool value=false)
function to make flag active for plotting
Definition: CDCDedxCosineAlgorithm.h:67
Belle2::CDCDedxCosineAlgorithm::setMethodSep
void setMethodSep(bool value=true)
function to make flag active for method of sep
Definition: CDCDedxCosineAlgorithm.h:52
Belle2::CDCDedxCosineAlgorithm::fHistbins
int fHistbins
number of bins for dedx histogram
Definition: CDCDedxCosineAlgorithm.h:114
Belle2::CDCDedxCosineAlgorithm::setMergePayload
void setMergePayload(bool value=true)
function to decide merge vs relative gains
Definition: CDCDedxCosineAlgorithm.h:57
Belle2::CDCDedxCosineAlgorithm::generateNewPayloads
void generateNewPayloads(std::vector< double > cosine)
function to store new payload after full calibration
Definition: CDCDedxCosineAlgorithm.cc:411
Belle2::CDCDedxCosineAlgorithm::setCosineBins
void setCosineBins(unsigned int value=100)
function to set number of cosine bins for calibration
Definition: CDCDedxCosineAlgorithm.h:82
Belle2::CDCDedxCosineAlgorithm::setCosineRange
void setCosineRange(double min=-1.0, double max=1.0)
function to set number of cosine bins for calibration
Definition: CDCDedxCosineAlgorithm.h:87
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::CDCDedxCosineAlgorithm::fStartRun
int fStartRun
boundary start at this run
Definition: CDCDedxCosineAlgorithm.h:117
Belle2::CDCDedxCosineAlgorithm::m_DBCosineCor
DBObjPtr< CDCDedxCosineCor > m_DBCosineCor
Electron saturation correction DB object.
Definition: CDCDedxCosineAlgorithm.h:118
Belle2::CDCDedxCosineAlgorithm::isMergePayload
bool isMergePayload
merge payload at the of calibration
Definition: CDCDedxCosineAlgorithm.h:109
Belle2::CDCDedxCosineAlgorithm::fSigLim
double fSigLim
gaussian fit sigma limit
Definition: CDCDedxCosineAlgorithm.h:110
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CDCDedxCosineAlgorithm::isMakePlots
bool isMakePlots
produce plots for status
Definition: CDCDedxCosineAlgorithm.h:108
Belle2::CDCDedxCosineAlgorithm::FitGaussianWRange
void FitGaussianWRange(TH1D *&temphist, TString &status)
function to fit histogram in each cosine bin
Definition: CDCDedxCosineAlgorithm.cc:469
Belle2::CDCDedxCosineAlgorithm::fCosbins
unsigned int fCosbins
number of bins across cosine range
Definition: CDCDedxCosineAlgorithm.h:111
Belle2::CDCDedxCosineAlgorithm::~CDCDedxCosineAlgorithm
virtual ~CDCDedxCosineAlgorithm()
Destructor.
Definition: CDCDedxCosineAlgorithm.h:47
Belle2::CDCDedxCosineAlgorithm::fCosMax
double fCosMax
max cosine angle for cal
Definition: CDCDedxCosineAlgorithm.h:113
Belle2::CDCDedxCosineAlgorithm::fdEdxMax
double fdEdxMax
max dedx range for gain cal
Definition: CDCDedxCosineAlgorithm.h:116
Belle2::CalibrationAlgorithm::EResult
EResult
The result of calibration.
Definition: CalibrationAlgorithm.h:50
Belle2::CDCDedxCosineAlgorithm::setHistRange
void setHistRange(double min=0.0, double max=3.0)
function to set min/max range of dedx dist calibration
Definition: CDCDedxCosineAlgorithm.h:97
Belle2::CDCDedxCosineAlgorithm::isMethodSep
bool isMethodSep
if e+e- need to be consider sep
Definition: CDCDedxCosineAlgorithm.h:107
Belle2::CDCDedxCosineAlgorithm::setFitWidth
void setFitWidth(double value=2.5)
set sigma to restrict fir range around mean
Definition: CDCDedxCosineAlgorithm.h:72
Belle2::CDCDedxCosineAlgorithm::CDCDedxCosineAlgorithm
CDCDedxCosineAlgorithm()
Constructor: Sets the description, the properties and the parameters of the algorithm.
Definition: CDCDedxCosineAlgorithm.cc:22
Belle2::CDCDedxCosineAlgorithm::fCosMin
double fCosMin
min cosine angle for cal
Definition: CDCDedxCosineAlgorithm.h:112