Belle II Software  release-05-01-25
eclGammaGammaEAlgorithm.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Analyze histograms of amplitudes for each ECL crystal from gamma pair *
6  * events. Code can either find most-likely energy deposit for each *
7  * crystal (MC) or calibration constant for each crystal (data) *
8  * *
9  * Author: The Belle II Collaboration *
10  * Contributors: Christopher Hearty *
11  * *
12  * This software is provided "as is" without any warranty. *
13  **************************************************************************/
14 
15 #pragma once
16 #include <ecl/calibration/eclGammaGammaEAlgorithm.h>
17 #include <calibration/CalibrationAlgorithm.h>
18 
19 namespace Belle2 {
24  namespace ECL {
25 
27  class eclGammaGammaEAlgorithm : public CalibrationAlgorithm {
28  public:
29 
32 
34  virtual ~eclGammaGammaEAlgorithm() {}
35 
37  void setOutputName(const std::string& outputName) {m_outputName = outputName;}
38 
40  std::string getOutputName() {return m_outputName;}
41 
43  void setCellIDLo(int cellIDLo) {m_cellIDLo = cellIDLo;}
44 
46  int getCellIDLo() {return m_cellIDLo;}
47 
49  void setCellIDHi(int cellIDHi) {m_cellIDHi = cellIDHi;}
50 
52  int getCellIDHi() {return m_cellIDHi;}
53 
55  void setMinEntries(int minEntries) {m_minEntries = minEntries;}
56 
58  int getMinEntries() {return m_minEntries;}
59 
61  void setMaxIterations(int maxIterations) {m_maxIterations = maxIterations;}
62 
65 
67  void setTRatioMin(double tRatioMin) {m_tRatioMin = tRatioMin;}
68 
70  double getTRatioMin() {return m_tRatioMin;}
71 
73  void setTRatioMax(double tRatioMax) {m_tRatioMax = tRatioMax;}
74 
76  double getTRatioMax() {return m_tRatioMax;}
77 
79  void setUpperEdgeThresh(double upperEdgeThresh) {m_upperEdgeThresh = upperEdgeThresh;}
80 
83 
85  void setPerformFits(bool performFits) {m_performFits = performFits;}
86 
88  bool getPerformFits() {return m_performFits;}
89 
91  void setFindExpValues(bool findExpValues) {m_findExpValues = findExpValues;}
92 
95 
97  void setStoreConst(int storeConst) {m_storeConst = storeConst;}
98 
100  int getStoreConst() {return m_storeConst;}
101 
102 
103  protected:
104 
106  virtual EResult calibrate() override;
107 
108  private:
109 
111  std::string m_outputName = "eclGammaGammaEAlgorithm.root";
112  int m_cellIDLo = 1;
113  int m_cellIDHi = 8736;
114  int m_minEntries = 150;
115  int m_maxIterations = 10;
116  double m_tRatioMin = 0.45;
117  double m_tRatioMax = 0.60;
118  double m_upperEdgeThresh = 0.02;
119  bool m_performFits = true;
120  bool m_findExpValues =
121  false;
122  int m_storeConst = 0;
128  int fitOK = 16;
129  int iterations = 8;
130  int atLimit = 4;
131  int poorFit = 3;
132  int noPeak = 2;
133  int notFit = -1;
135  };
136  }
138 } // namespace Belle2
139 
140 
Belle2::ECL::eclGammaGammaEAlgorithm::getCellIDHi
int getCellIDHi()
Getter for m_cellIDHi.
Definition: eclGammaGammaEAlgorithm.h:64
Belle2::ECL::eclGammaGammaEAlgorithm::notFit
int notFit
no fit performed; no constants found for this crystal
Definition: eclGammaGammaEAlgorithm.h:145
Belle2::ECL::eclGammaGammaEAlgorithm::m_maxIterations
int m_maxIterations
no more than maxIteration iterations
Definition: eclGammaGammaEAlgorithm.h:127
Belle2::ECL::eclGammaGammaEAlgorithm::m_upperEdgeThresh
double m_upperEdgeThresh
Upper edge is where the fit = upperEdgeThresh * peak value.
Definition: eclGammaGammaEAlgorithm.h:130
Belle2::ECL::eclGammaGammaEAlgorithm::setMaxIterations
void setMaxIterations(int maxIterations)
Setter for m_maxIterations.
Definition: eclGammaGammaEAlgorithm.h:73
Belle2::ECL::eclGammaGammaEAlgorithm::m_cellIDHi
int m_cellIDHi
Last cellID to be fit.
Definition: eclGammaGammaEAlgorithm.h:125
Belle2::ECL::eclGammaGammaEAlgorithm::setStoreConst
void setStoreConst(int storeConst)
Setter for m_storeConst.
Definition: eclGammaGammaEAlgorithm.h:109
Belle2::ECL::eclGammaGammaEAlgorithm::noPeak
int noPeak
Novosibirsk component of fit is negligible; upper edge is found from histogram, not fit.
Definition: eclGammaGammaEAlgorithm.h:144
Belle2::ECL::eclGammaGammaEAlgorithm::atLimit
int atLimit
a parameter is at the limit; upper edge is found from histogram, not fit
Definition: eclGammaGammaEAlgorithm.h:142
Belle2::ECL::eclGammaGammaEAlgorithm::getTRatioMax
double getTRatioMax()
Getter for m_tRatioMax.
Definition: eclGammaGammaEAlgorithm.h:88
Belle2::ECL::eclGammaGammaEAlgorithm::getCellIDLo
int getCellIDLo()
Getter for m_cellIDLo.
Definition: eclGammaGammaEAlgorithm.h:58
Belle2::ECL::eclGammaGammaEAlgorithm::~eclGammaGammaEAlgorithm
virtual ~eclGammaGammaEAlgorithm()
..Destructor
Definition: eclGammaGammaEAlgorithm.h:46
Belle2::ECL::eclGammaGammaEAlgorithm::getStoreConst
int getStoreConst()
Getter for m_storeConst.
Definition: eclGammaGammaEAlgorithm.h:112
Belle2::ECL::eclGammaGammaEAlgorithm::setMinEntries
void setMinEntries(int minEntries)
Setter for m_minEntries.
Definition: eclGammaGammaEAlgorithm.h:67
Belle2::ECL::eclGammaGammaEAlgorithm::fitOK
int fitOK
Characterize fit status.
Definition: eclGammaGammaEAlgorithm.h:140
Belle2::ECL::eclGammaGammaEAlgorithm::iterations
int iterations
fit reached max number of iterations, but is useable
Definition: eclGammaGammaEAlgorithm.h:141
Belle2::ECL::eclGammaGammaEAlgorithm::setCellIDHi
void setCellIDHi(int cellIDHi)
Setter for m_cellIDHi.
Definition: eclGammaGammaEAlgorithm.h:61
Belle2::ECL::eclGammaGammaEAlgorithm::getPerformFits
bool getPerformFits()
Getter for m_performFits.
Definition: eclGammaGammaEAlgorithm.h:100
Belle2::ECL::eclGammaGammaEAlgorithm::m_performFits
bool m_performFits
if false, input histograms are copied to output, but no fits are done
Definition: eclGammaGammaEAlgorithm.h:131
Belle2::ECL::eclGammaGammaEAlgorithm::getMaxIterations
int getMaxIterations()
Getter for m_maxIterations.
Definition: eclGammaGammaEAlgorithm.h:76
Belle2::ECL::eclGammaGammaEAlgorithm::setFindExpValues
void setFindExpValues(bool findExpValues)
Setter for m_findExpValues.
Definition: eclGammaGammaEAlgorithm.h:103
Belle2::ECL::eclGammaGammaEAlgorithm::calibrate
virtual EResult calibrate() override
..Run algorithm on events
Definition: eclGammaGammaEAlgorithm.cc:52
Belle2::ECL::eclGammaGammaEAlgorithm::setTRatioMax
void setTRatioMax(double tRatioMax)
Setter for m_tRatioMax.
Definition: eclGammaGammaEAlgorithm.h:85
Belle2::ECL::eclGammaGammaEAlgorithm::m_tRatioMax
double m_tRatioMax
Fit range is adjusted so that fit at upper endpoint is between tRatioMin and tRatioMax of peak.
Definition: eclGammaGammaEAlgorithm.h:129
Belle2::ECL::eclGammaGammaEAlgorithm::setPerformFits
void setPerformFits(bool performFits)
Setter for m_performFits.
Definition: eclGammaGammaEAlgorithm.h:97
Belle2::ECL::eclGammaGammaEAlgorithm::eclGammaGammaEAlgorithm
eclGammaGammaEAlgorithm()
..Constructor
Definition: eclGammaGammaEAlgorithm.cc:45
Belle2::ECL::eclGammaGammaEAlgorithm::getMinEntries
int getMinEntries()
Getter for m_minEntries.
Definition: eclGammaGammaEAlgorithm.h:70
Belle2::ECL::eclGammaGammaEAlgorithm::m_minEntries
int m_minEntries
Minimum entries to fit a crystal.
Definition: eclGammaGammaEAlgorithm.h:126
Belle2::ECL::eclGammaGammaEAlgorithm::setOutputName
void setOutputName(const std::string &outputName)
Setter for m_outputName.
Definition: eclGammaGammaEAlgorithm.h:49
Belle2::ECL::eclGammaGammaEAlgorithm::getUpperEdgeThresh
double getUpperEdgeThresh()
Getter for m_upperEdgeThresh.
Definition: eclGammaGammaEAlgorithm.h:94
Belle2::ECL::eclGammaGammaEAlgorithm::getOutputName
std::string getOutputName()
Getter for m_outputName.
Definition: eclGammaGammaEAlgorithm.h:52
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ECL::eclGammaGammaEAlgorithm::m_findExpValues
bool m_findExpValues
if true, fits are used to find expected energy deposit for each crystal instead of the calibration co...
Definition: eclGammaGammaEAlgorithm.h:132
Belle2::ECL::eclGammaGammaEAlgorithm::setUpperEdgeThresh
void setUpperEdgeThresh(double upperEdgeThresh)
Setter for m_upperEdgeThresh.
Definition: eclGammaGammaEAlgorithm.h:91
Belle2::ECL::eclGammaGammaEAlgorithm::getTRatioMin
double getTRatioMin()
Getter for m_tRatioMin.
Definition: eclGammaGammaEAlgorithm.h:82
Belle2::ECL::eclGammaGammaEAlgorithm::setTRatioMin
void setTRatioMin(double tRatioMin)
Setter for m_tRatioMin.
Definition: eclGammaGammaEAlgorithm.h:79
Belle2::CalibrationAlgorithm::EResult
EResult
The result of calibration.
Definition: CalibrationAlgorithm.h:50
Belle2::ECL::eclGammaGammaEAlgorithm::m_outputName
std::string m_outputName
..Parameters to control Novosibirsk fit to energy deposited in each crystal by mu+mu- events
Definition: eclGammaGammaEAlgorithm.h:123
Belle2::ECL::eclGammaGammaEAlgorithm::m_tRatioMin
double m_tRatioMin
Fit range is adjusted so that fit at upper endpoint is between tRatioMin and tRatioMax of peak.
Definition: eclGammaGammaEAlgorithm.h:128
Belle2::ECL::eclGammaGammaEAlgorithm::m_cellIDLo
int m_cellIDLo
First cellID to be fit.
Definition: eclGammaGammaEAlgorithm.h:124
Belle2::ECL::eclGammaGammaEAlgorithm::setCellIDLo
void setCellIDLo(int cellIDLo)
Setter for m_cellIDLo.
Definition: eclGammaGammaEAlgorithm.h:55
Belle2::ECL::eclGammaGammaEAlgorithm::poorFit
int poorFit
low chi square; upper edge is found from histogram, not fit
Definition: eclGammaGammaEAlgorithm.h:143
Belle2::ECL::eclGammaGammaEAlgorithm::m_storeConst
int m_storeConst
controls which values are written to the database.
Definition: eclGammaGammaEAlgorithm.h:134
Belle2::ECL::eclGammaGammaEAlgorithm::getFindExpValues
bool getFindExpValues()
Getter for m_findExpValues.
Definition: eclGammaGammaEAlgorithm.h:106