Belle II Software  release-05-02-19
eclee5x5Algorithm.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Analze 25-crystal energy sums from Bhabha events to obtain single *
6  * crystal calibrations. Can also be used to find the expected values *
7  * for the 25-crystal sums. *
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/eclee5x5Algorithm.h>
17 #include <calibration/CalibrationAlgorithm.h>
18 #include <ecl/geometry/ECLNeighbours.h>
19 
20 namespace Belle2 {
25  namespace ECL {
26 
28  class eclee5x5Algorithm : public CalibrationAlgorithm {
29  public:
30 
33 
35  virtual ~eclee5x5Algorithm() {}
36 
38  void setOutputName(const std::string& outputName) {m_outputName = outputName;}
39 
41  std::string getOutputName() {return m_outputName;}
42 
44  void setMinEntries(int minEntries) {m_minEntries = minEntries;}
45 
47  int getMinEntries() {return m_minEntries;}
48 
50  void setPayloadName(const std::string& payloadname) {m_payloadName = payloadname;}
51 
53  std::string getPayloadName() {return m_payloadName;}
54 
56  void setStoreConst(bool storeConst) {m_storeConst = storeConst;}
57 
59  bool getStoreConst() {return m_storeConst;}
60 
62  void setfracLo(double fracLo) {m_fracLo = fracLo;}
63 
65  double getfracLo() {return m_fracLo;}
66 
68  void setfracHiSym(double fracHiSym) {m_fracHiSym = fracHiSym;}
69 
71  double getfracHiSym() {return m_fracHiSym;}
72 
74  void setfracHiASym(double fracHiASym) {m_fracHiASym = fracHiASym;}
75 
77  double getfracHiASym() {return m_fracHiASym;}
78 
80  void setnsigLo(double nsigLo) {m_nsigLo = nsigLo;}
81 
83  double getnsigLo() {return m_nsigLo;}
84 
86  void setnsigHiSym(double nsigHiSym) {m_nsigHiSym = nsigHiSym;}
87 
89  double getnsigHiSym() {return m_nsigHiSym;}
90 
92  void setnsigHiASym(double nsigHiASym) {m_nsigHiASym = nsigHiASym;}
93 
95  double getnsigHiASym() {return m_nsigHiASym;}
96 
98  void setlastLoThetaID(int lastLoThetaID) {m_lastLoThetaID = lastLoThetaID;}
99 
102 
103  protected:
104 
106  virtual EResult calibrate() override;
107 
108  private:
109 
111  std::string m_outputName = "eclee5x5Algorithm.root";
112  int m_minEntries = 150;
114  std::string m_payloadName = "ECLCrystalEnergy5x5";
115  bool m_storeConst = true;
117  double m_fracLo = 0.2;
118  double m_fracHiSym = 0.2;
119  double m_fracHiASym = 0.4;
120  double m_nsigLo = 2.5;
121  double m_nsigHiSym = 2.5;
122  double m_nsigHiASym = 2.0;
123  int m_lastLoThetaID = 4;
124  };
125  }
127 } // namespace Belle2
128 
129 
Belle2::ECL::eclee5x5Algorithm::setlastLoThetaID
void setlastLoThetaID(int lastLoThetaID)
Setter for m_lastLoThetaID.
Definition: eclee5x5Algorithm.h:110
Belle2::ECL::eclee5x5Algorithm::getPayloadName
std::string getPayloadName()
Getter for m_payloadname.
Definition: eclee5x5Algorithm.h:65
Belle2::ECL::eclee5x5Algorithm::m_fracHiASym
double m_fracHiASym
or fracHiASym*peak, at low values of thetaID
Definition: eclee5x5Algorithm.h:131
Belle2::ECL::eclee5x5Algorithm::setStoreConst
void setStoreConst(bool storeConst)
Setter for m_storeConst.
Definition: eclee5x5Algorithm.h:68
Belle2::ECL::eclee5x5Algorithm::m_fracLo
double m_fracLo
start dPhi fit where data is > fraclo*peak
Definition: eclee5x5Algorithm.h:129
Belle2::ECL::eclee5x5Algorithm::setnsigHiSym
void setnsigHiSym(double nsigHiSym)
Setter for m_nsigHiSym.
Definition: eclee5x5Algorithm.h:98
Belle2::ECL::eclee5x5Algorithm::setnsigHiASym
void setnsigHiASym(double nsigHiASym)
Setter for m_nsigHiASym.
Definition: eclee5x5Algorithm.h:104
Belle2::ECL::eclee5x5Algorithm::m_storeConst
bool m_storeConst
write payload to localdb if true
Definition: eclee5x5Algorithm.h:127
Belle2::ECL::eclee5x5Algorithm::getnsigHiASym
double getnsigHiASym()
Getter for m_nsigHiASym.
Definition: eclee5x5Algorithm.h:107
Belle2::ECL::eclee5x5Algorithm::m_fracHiSym
double m_fracHiSym
end dPhi fit where data is > fracHiSym*peak
Definition: eclee5x5Algorithm.h:130
Belle2::ECL::eclee5x5Algorithm::setfracHiASym
void setfracHiASym(double fracHiASym)
Setter for m_fracHiASym.
Definition: eclee5x5Algorithm.h:86
Belle2::ECL::eclee5x5Algorithm::~eclee5x5Algorithm
virtual ~eclee5x5Algorithm()
..Destructor
Definition: eclee5x5Algorithm.h:47
Belle2::ECL::eclee5x5Algorithm::getMinEntries
int getMinEntries()
Getter for m_minEntries.
Definition: eclee5x5Algorithm.h:59
Belle2::ECL::eclee5x5Algorithm::setMinEntries
void setMinEntries(int minEntries)
Setter for m_minEntries.
Definition: eclee5x5Algorithm.h:56
Belle2::ECL::eclee5x5Algorithm::m_outputName
std::string m_outputName
..Parameters to control job to find energy calibration using Bhabhas
Definition: eclee5x5Algorithm.h:123
Belle2::ECL::eclee5x5Algorithm::setPayloadName
void setPayloadName(const std::string &payloadname)
Setter for m_payloadName.
Definition: eclee5x5Algorithm.h:62
Belle2::ECL::eclee5x5Algorithm::m_lastLoThetaID
int m_lastLoThetaID
use asymmetric dPhi range for thetaID<= this value
Definition: eclee5x5Algorithm.h:135
Belle2::ECL::eclee5x5Algorithm::getfracHiASym
double getfracHiASym()
Getter for m_fracHiASym.
Definition: eclee5x5Algorithm.h:89
Belle2::ECL::eclee5x5Algorithm::m_nsigHiASym
double m_nsigHiASym
or mean+nsigHiASym*sigma at low thetaID
Definition: eclee5x5Algorithm.h:134
Belle2::ECL::eclee5x5Algorithm::m_eclNeighbours5x5
ECL::ECLNeighbours * m_eclNeighbours5x5
Neighbours, used to get nCrys per ring.
Definition: eclee5x5Algorithm.h:128
Belle2::ECL::eclee5x5Algorithm::getfracHiSym
double getfracHiSym()
Getter for m_fracHiSym.
Definition: eclee5x5Algorithm.h:83
Belle2::ECL::eclee5x5Algorithm::m_minEntries
int m_minEntries
all crystals to be calibrated must have this many entries
Definition: eclee5x5Algorithm.h:124
Belle2::ECL::eclee5x5Algorithm::setOutputName
void setOutputName(const std::string &outputName)
Setter for m_outputName.
Definition: eclee5x5Algorithm.h:50
Belle2::ECL::ECLNeighbours
Class to get the neighbours for a given cell id.
Definition: ECLNeighbours.h:38
Belle2::ECL::eclee5x5Algorithm::getOutputName
std::string getOutputName()
Getter for m_outputName.
Definition: eclee5x5Algorithm.h:53
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ECL::eclee5x5Algorithm::getnsigHiSym
double getnsigHiSym()
Getter for m_nsigHiSym.
Definition: eclee5x5Algorithm.h:101
Belle2::ECL::eclee5x5Algorithm::setfracLo
void setfracLo(double fracLo)
Setter for m_fracLo.
Definition: eclee5x5Algorithm.h:74
Belle2::ECL::eclee5x5Algorithm::m_nsigHiSym
double m_nsigHiSym
to mean + nsigHiSym*sigma
Definition: eclee5x5Algorithm.h:133
Belle2::ECL::eclee5x5Algorithm::calibrate
virtual EResult calibrate() override
..Run algorithm on events
Definition: eclee5x5Algorithm.cc:25
Belle2::ECL::eclee5x5Algorithm::getnsigLo
double getnsigLo()
Getter for m_nsigLo.
Definition: eclee5x5Algorithm.h:95
Belle2::ECL::eclee5x5Algorithm::m_nsigLo
double m_nsigLo
dPhi region is mean - nsigLo*sigma
Definition: eclee5x5Algorithm.h:132
Belle2::CalibrationAlgorithm::EResult
EResult
The result of calibration.
Definition: CalibrationAlgorithm.h:50
Belle2::ECL::eclee5x5Algorithm::getlastLoThetaID
int getlastLoThetaID()
Getter for m_lastLoThetaID.
Definition: eclee5x5Algorithm.h:113
Belle2::ECL::eclee5x5Algorithm::getStoreConst
bool getStoreConst()
Getter for m_storeConst.
Definition: eclee5x5Algorithm.h:71
Belle2::ECL::eclee5x5Algorithm::eclee5x5Algorithm
eclee5x5Algorithm()
..Constructor
Definition: eclee5x5Algorithm.cc:18
Belle2::ECL::eclee5x5Algorithm::setfracHiSym
void setfracHiSym(double fracHiSym)
Setter for m_fracHiSym.
Definition: eclee5x5Algorithm.h:80
Belle2::ECL::eclee5x5Algorithm::m_payloadName
std::string m_payloadName
Name of the payload to be stored.
Definition: eclee5x5Algorithm.h:126
Belle2::ECL::eclee5x5Algorithm::getfracLo
double getfracLo()
Getter for m_fracLo.
Definition: eclee5x5Algorithm.h:77
Belle2::ECL::eclee5x5Algorithm::setnsigLo
void setnsigLo(double nsigLo)
Setter for m_nsigLo.
Definition: eclee5x5Algorithm.h:92