Belle II Software  release-08-00-10
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 
11 /* ECL headers. */
12 #include <ecl/dataobjects/ECLElementNumbers.h>
13 #include <ecl/calibration/eclGammaGammaEAlgorithm.h>
14 
15 /* Basf2 headers. */
16 #include <calibration/CalibrationAlgorithm.h>
17 
18 namespace Belle2 {
23  namespace ECL {
24 
27  public:
28 
31 
34 
36  void setOutputName(const std::string& outputName) {m_outputName = outputName;}
37 
39  std::string getOutputName() {return m_outputName;}
40 
42  void setCellIDLo(int cellIDLo) {m_cellIDLo = cellIDLo;}
43 
45  int getCellIDLo() {return m_cellIDLo;}
46 
48  void setCellIDHi(int cellIDHi) {m_cellIDHi = cellIDHi;}
49 
51  int getCellIDHi() {return m_cellIDHi;}
52 
54  void setMinEntries(int minEntries) {m_minEntries = minEntries;}
55 
57  int getMinEntries() {return m_minEntries;}
58 
60  void setMaxIterations(int maxIterations) {m_maxIterations = maxIterations;}
61 
64 
66  void setTRatioMin(double tRatioMin) {m_tRatioMinNom = tRatioMin;}
67 
69  double getTRatioMin() {return m_tRatioMinNom;}
70 
72  void setTRatioMax(double tRatioMax) {m_tRatioMaxNom = tRatioMax;}
73 
75  double getTRatioMax() {return m_tRatioMaxNom;}
76 
78  void setTRatioMinHiStat(double tRatioMin) {m_tRatioMinHiStat = tRatioMin;}
79 
82 
84  void setTRatioMaxHiStat(double tRatioMax) {m_tRatioMaxHiStat = tRatioMax;}
85 
88 
90  void setUpperEdgeThresh(double upperEdgeThresh) {m_upperEdgeThresh = upperEdgeThresh;}
91 
94 
96  void setPerformFits(bool performFits) {m_performFits = performFits;}
97 
99  bool getPerformFits() {return m_performFits;}
100 
102  void setFindExpValues(bool findExpValues) {m_findExpValues = findExpValues;}
103 
106 
108  void setStoreConst(int storeConst) {m_storeConst = storeConst;}
109 
111  int getStoreConst() {return m_storeConst;}
112 
113 
114  protected:
115 
117  virtual EResult calibrate() override;
118 
119  private:
120 
122  std::string m_outputName = "eclGammaGammaEAlgorithm.root";
123  int m_cellIDLo = 1;
125  int m_minEntries = 150;
126  int m_highStatEntries = 25000;
127  int m_maxIterations = 10;
128  double m_tRatioMinNom =
129  0.45;
130  double m_tRatioMaxNom = 0.70;
132  0.70;
134  0.95;
135  double m_upperEdgeThresh = 0.02;
136  bool m_performFits = true;
138  false;
139  int m_storeConst = 0;
145  int fitOK = 16;
146  int iterations = 8;
147  int atLimit = 4;
148  int poorFit = 3;
149  int noPeak = 2;
150  int notFit = -1;
152  };
153  }
155 } // namespace Belle2
156 
157 
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.
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.