Belle II Software  release-06-01-15
eclGammaGammaEAlgorithm.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 #include <ecl/calibration/eclGammaGammaEAlgorithm.h>
11 #include <calibration/CalibrationAlgorithm.h>
12 
13 namespace Belle2 {
18  namespace ECL {
19 
22  public:
23 
26 
29 
31  void setOutputName(const std::string& outputName) {m_outputName = outputName;}
32 
34  std::string getOutputName() {return m_outputName;}
35 
37  void setCellIDLo(int cellIDLo) {m_cellIDLo = cellIDLo;}
38 
40  int getCellIDLo() {return m_cellIDLo;}
41 
43  void setCellIDHi(int cellIDHi) {m_cellIDHi = cellIDHi;}
44 
46  int getCellIDHi() {return m_cellIDHi;}
47 
49  void setMinEntries(int minEntries) {m_minEntries = minEntries;}
50 
52  int getMinEntries() {return m_minEntries;}
53 
55  void setMaxIterations(int maxIterations) {m_maxIterations = maxIterations;}
56 
59 
61  void setTRatioMin(double tRatioMin) {m_tRatioMinNom = tRatioMin;}
62 
64  double getTRatioMin() {return m_tRatioMinNom;}
65 
67  void setTRatioMax(double tRatioMax) {m_tRatioMaxNom = tRatioMax;}
68 
70  double getTRatioMax() {return m_tRatioMaxNom;}
71 
73  void setTRatioMinHiStat(double tRatioMin) {m_tRatioMinHiStat = tRatioMin;}
74 
77 
79  void setTRatioMaxHiStat(double tRatioMax) {m_tRatioMaxHiStat = tRatioMax;}
80 
83 
85  void setUpperEdgeThresh(double upperEdgeThresh) {m_upperEdgeThresh = upperEdgeThresh;}
86 
89 
91  void setPerformFits(bool performFits) {m_performFits = performFits;}
92 
94  bool getPerformFits() {return m_performFits;}
95 
97  void setFindExpValues(bool findExpValues) {m_findExpValues = findExpValues;}
98 
101 
103  void setStoreConst(int storeConst) {m_storeConst = storeConst;}
104 
106  int getStoreConst() {return m_storeConst;}
107 
108 
109  protected:
110 
112  virtual EResult calibrate() override;
113 
114  private:
115 
117  std::string m_outputName = "eclGammaGammaEAlgorithm.root";
118  int m_cellIDLo = 1;
119  int m_cellIDHi = 8736;
120  int m_minEntries = 150;
121  int m_highStatEntries = 25000;
122  int m_maxIterations = 10;
123  double m_tRatioMinNom =
124  0.45;
125  double m_tRatioMaxNom = 0.70;
127  0.70;
129  0.95;
130  double m_upperEdgeThresh = 0.02;
131  bool m_performFits = true;
133  false;
134  int m_storeConst = 0;
140  int fitOK = 16;
141  int iterations = 8;
142  int atLimit = 4;
143  int poorFit = 3;
144  int noPeak = 2;
145  int notFit = -1;
147  };
148  }
150 } // namespace Belle2
151 
152 
Base class for calibration algorithms.
EResult
The result of calibration.
Calibrate ecl crystals using gamma pair events.
double getTRatioMaxHiStat()
Getter for m_tRatioMaxHiStat.
int m_minEntries
Minimum entries to fit a crystal.
int poorFit
low chi square; upper edge is found from histogram, not fit
void setCellIDHi(int cellIDHi)
Setter for m_cellIDHi.
int m_maxIterations
no more than maxIteration iterations
double m_tRatioMaxHiStat
Fit range is adjusted so that fit at lower endpoint is between tRatioMin and tRatioMax of peak.
int iterations
fit reached max number of iterations, but is useable
void setMinEntries(int minEntries)
Setter for m_minEntries.
double m_tRatioMaxNom
Fit range is adjusted so that fit at lower endpoint is between tRatioMin and tRatioMax of peak.
void setOutputName(const std::string &outputName)
Setter for m_outputName.
double m_tRatioMinNom
Fit range is adjusted so that fit at lower endpoint is between tRatioMin and tRatioMax of peak.
void setCellIDLo(int cellIDLo)
Setter for m_cellIDLo.
int m_highStatEntries
Adjust fit range above this many entries.
int getStoreConst()
Getter for m_storeConst.
double getTRatioMinHiStat()
Getter for m_tRatioMinHiStat.
void setTRatioMin(double tRatioMin)
Setter for m_tRatioMinNom.
void setStoreConst(int storeConst)
Setter for m_storeConst.
void setPerformFits(bool performFits)
Setter for m_performFits.
void setTRatioMinHiStat(double tRatioMin)
Setter for m_tRatioMinHiStat.
std::string getOutputName()
Getter for m_outputName.
void setFindExpValues(bool findExpValues)
Setter for m_findExpValues.
void setTRatioMaxHiStat(double tRatioMax)
Setter for m_tRatioMaxHiStat.
bool getFindExpValues()
Getter for m_findExpValues.
double getUpperEdgeThresh()
Getter for m_upperEdgeThresh.
bool getPerformFits()
Getter for m_performFits.
int getMaxIterations()
Getter for m_maxIterations.
std::string m_outputName
..Parameters to control Novosibirsk fit to energy deposited in each crystal by mu+mu- events
void setMaxIterations(int maxIterations)
Setter for m_maxIterations.
int m_storeConst
controls which values are written to the database.
int notFit
no fit performed; no constants found for this crystal
bool m_findExpValues
if true, fits are used to find expected energy deposit for each crystal instead of the calibration co...
double getTRatioMax()
Getter for m_tRatioMaxNom.
virtual EResult calibrate() override
..Run algorithm on events
bool m_performFits
if false, input histograms are copied to output, but no fits are done
double m_upperEdgeThresh
Upper edge is where the fit = upperEdgeThresh * peak value.
int noPeak
Novosibirsk component of fit is negligible; upper edge is found from histogram, not fit.
double m_tRatioMinHiStat
Fit range is adjusted so that fit at lower endpoint is between tRatioMin and tRatioMax of peak.
int atLimit
a parameter is at the limit; upper edge is found from histogram, not fit
void setUpperEdgeThresh(double upperEdgeThresh)
Setter for m_upperEdgeThresh.
void setTRatioMax(double tRatioMax)
Setter for m_tRatioMaxNom.
int getMinEntries()
Getter for m_minEntries.
double getTRatioMin()
Getter for m_tRatioMinNom.
Abstract base class for different kinds of events.