Belle II Software development
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
14/* Basf2 headers. */
15#include <calibration/CalibrationAlgorithm.h>
16
17namespace Belle2 {
22 namespace ECL {
23
26 public:
27
30
33
35 void setOutputName(const std::string& outputName) {m_outputName = outputName;}
36
38 std::string getOutputName() {return m_outputName;}
39
41 void setCellIDLo(int cellIDLo) {m_cellIDLo = cellIDLo;}
42
44 int getCellIDLo() {return m_cellIDLo;}
45
47 void setCellIDHi(int cellIDHi) {m_cellIDHi = cellIDHi;}
48
50 int getCellIDHi() {return m_cellIDHi;}
51
53 void setMinEntries(int minEntries) {m_minEntries = minEntries;}
54
57
59 void setMaxIterations(int maxIterations) {m_maxIterations = maxIterations;}
60
63
65 void setTRatioMin(double tRatioMin) {m_tRatioMinNom = tRatioMin;}
66
68 double getTRatioMin() {return m_tRatioMinNom;}
69
71 void setTRatioMax(double tRatioMax) {m_tRatioMaxNom = tRatioMax;}
72
74 double getTRatioMax() {return m_tRatioMaxNom;}
75
77 void setTRatioMinHiStat(double tRatioMin) {m_tRatioMinHiStat = tRatioMin;}
78
81
83 void setTRatioMaxHiStat(double tRatioMax) {m_tRatioMaxHiStat = tRatioMax;}
84
87
89 void setUpperEdgeThresh(double upperEdgeThresh) {m_upperEdgeThresh = upperEdgeThresh;}
90
93
95 void setPerformFits(bool performFits) {m_performFits = performFits;}
96
99
101 void setFindExpValues(bool findExpValues) {m_findExpValues = findExpValues;}
102
105
107 void setStoreConst(int storeConst) {m_storeConst = storeConst;}
108
111
112
113 protected:
114
116 virtual EResult calibrate() override;
117
118 private:
119
121 std::string m_outputName = "eclGammaGammaEAlgorithm.root";
122 int m_cellIDLo = 1;
124 int m_minEntries = 150;
125 int m_highStatEntries = 25000;
128 0.45;
129 double m_tRatioMaxNom = 0.70;
131 0.70;
133 0.95;
134 double m_upperEdgeThresh = 0.02;
135 bool m_performFits = true;
137 false;
138 int m_storeConst = 0;
144 int fitOK = 16;
145 int iterations = 8;
146 int atLimit = 4;
147 int poorFit = 3;
148 int noPeak = 2;
149 int notFit = -1;
151 };
152 }
154} // namespace Belle2
155
156
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.