Belle II Software  release-08-01-10
TrgEclBhabha.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 #include <vector>
12 
13 #include "trg/ecl/TrgEclMapping.h"
14 #include "trg/ecl/TrgEclDataBase.h"
15 
16 #include "TVector3.h"
17 //
18 //
19 //
20 namespace Belle2 {
25 //
26 //
27 //
28  //
30  //
31  class TrgEclBhabha {
32 
33  public:
35  TrgEclBhabha();
36 
38  virtual ~TrgEclBhabha();
39 
42 
45 
46  public:
48  bool GetBhabha00(std::vector<double>);
50  bool GetBhabha01();
52  bool GetBhabha02();
54  bool Getmumu();
56  bool GetTaub2b(double);
58  bool GetTaub2b2(double);
60  bool GetTaub2b3(double);
62  int GetBhabhaAddition(void);
64  std::vector<double> GetBhabhaComb() {return BhabhaComb ;}
66  void save(int);
68  void set2DBhabhaThreshold(const std::vector<double>& i2DBhabhaThresholdFWD,
69  const std::vector<double>& i2DBhabhaThresholdBWD)
70  {
71  _2DBhabhaThresholdFWD = i2DBhabhaThresholdFWD;
72  _2DBhabhaThresholdBWD = i2DBhabhaThresholdBWD;
73  }
75  void set3DBhabhaSelectionThreshold(const std::vector<double>& i3DBhabhaSelectionThreshold)
76  {
77  _3DBhabhaSelectionThreshold = i3DBhabhaSelectionThreshold;
78  };
80  void set3DBhabhaVetoThreshold(const std::vector<double>& i3DBhabhaVetoThreshold)
81  {
82  _3DBhabhaVetoThreshold = i3DBhabhaVetoThreshold;
83  };
85  void set3DBhabhaSelectionAngle(const std::vector<double>& i3DBhabhaSelectionAngle)
86  {
87  _3DBhabhaSelectionAngle = i3DBhabhaSelectionAngle;
88  };
90  void set3DBhabhaVetoAngle(const std::vector<double>& i3DBhabhaVetoAngle)
91  {
92  _3DBhabhaVetoAngle = i3DBhabhaVetoAngle;
93  };
95  void setmumuThreshold(int mumuThreshold) {_mumuThreshold = mumuThreshold; }
97  void setmumuAngle(const std::vector<double>& imumuAngle) {_mumuAngle = imumuAngle; }
99  void set3DBhabhaAddAngleCut(const std::vector<double>& i3DBhabhaAddAngleCut)
100  {
101  m_3DBhabhaAddAngleCut = i3DBhabhaAddAngleCut;
102  }
104  void set3DBhabhaVetoInTrackThetaRegion(const std::vector<int>& i3DBhabhaVetoInTrackThetaRegion)
105  {
106  m_3DBhabhaVetoInTrackThetaRegion = i3DBhabhaVetoInTrackThetaRegion;
107  }
110  void setTaub2bAngleCut(const std::vector<int>& iTaub2bAngleCut)
111  {
112  m_taub2bAngleCut = iTaub2bAngleCut;
113  }
115  void setTaub2bEtotCut(const double iTaub2bEtotCut)
116  {
117  m_taub2bEtotCut = iTaub2bEtotCut;
118  }
120  void setTaub2bClusterECut(const double iTaub2bClusterECut1,
121  const double iTaub2bClusterECut2)
122  {
123  m_taub2bClusterECut1 = iTaub2bClusterECut1;
124  m_taub2bClusterECut2 = iTaub2bClusterECut2;
125  }
127  void setTaub2b2Cut(const std::vector<int>& iTaub2b2AngleCut,
128  const double iTaub2b2EtotCut,
129  const double iTaub2b2CLEEndcapCut,
130  const double iTaub2b2CLECut)
131  {
132  m_taub2b2AngleCut = iTaub2b2AngleCut;
133  m_taub2b2EtotCut = iTaub2b2EtotCut;
134  m_taub2b2CLEEndcapCut = iTaub2b2CLEEndcapCut;
135  m_taub2b2CLECut = iTaub2b2CLECut;
136  }
138  void setTaub2b3Cut(const std::vector<int>& iTaub2b3AngleCut,
139  const double iTaub2b3EtotCut,
140  const double iTaub2b3CLEb2bCut,
141  const double iTaub2b3CLELowCut,
142  const double iTaub2b3CLEHighCut)
143  {
144  m_taub2b3AngleCut = iTaub2b3AngleCut;
145  m_taub2b3EtotCut = iTaub2b3EtotCut;
146  m_taub2b3CLEb2bCut = iTaub2b3CLEb2bCut;
147  m_taub2b3CLELowCut = iTaub2b3CLELowCut;
148  m_taub2b3CLEHighCut = iTaub2b3CLEHighCut;
149  }
153  {
155  }
158  {
159  if (cl_idx < 0 || cl_idx > 1 || m_3DBhabhaVetoClusterTCIds.size() != 2) {
160  return -10;
161  }
162  return m_3DBhabhaVetoClusterTCIds[cl_idx];
163  }
167  {
168  if (cl_idx < 0 || cl_idx > 1 || m_3DBhabhaVetoClusterThetaIds.size() != 2) {
169  return -10;
170  }
171  return m_3DBhabhaVetoClusterThetaIds[cl_idx];
172  }
174  double get3DBhabhaVetoClusterEnergy(int cl_idx)
175  {
176  if (cl_idx < 0 || cl_idx > 1 || m_3DBhabhaVetoClusterEnergies.size() != 2) {
177  return -10;
178  }
179  return m_3DBhabhaVetoClusterEnergies[cl_idx];
180  }
182  double get3DBhabhaVetoClusterTiming(int cl_idx)
183  {
184  if (cl_idx < 0 || cl_idx > 1 || m_3DBhabhaVetoClusterTimings.size() != 2) {
185  return -1000;
186  }
187  return m_3DBhabhaVetoClusterTimings[cl_idx];
188  }
198  {
200  }
203  {
204  if (cl_idx < 0 || cl_idx > 1 || m_3DBhabhaSelectionClusterTCIds.size() != 2) {
205  return -10;
206  }
207  return m_3DBhabhaSelectionClusterTCIds[cl_idx];
208  }
212  {
213  if (cl_idx < 0 || cl_idx > 1 || m_3DBhabhaSelectionClusterThetaIds.size() != 2) {
214  return -10;
215  }
216  return m_3DBhabhaSelectionClusterThetaIds[cl_idx];
217  }
220  {
221  if (cl_idx < 0 || cl_idx > 1 || m_3DBhabhaSelectionClusterEnergies.size() != 2) {
222  return -10;
223  }
224  return m_3DBhabhaSelectionClusterEnergies[cl_idx];
225  }
228  {
229  if (cl_idx < 0 || cl_idx > 1 || m_3DBhabhaSelectionClusterTimings.size() != 2) {
230  return -1000;
231  }
232  return m_3DBhabhaSelectionClusterTimings[cl_idx];
233  }
235  int getTaub2bAngleFlag(void) { return m_taub2bAngleFlag; }
237  int getTaub2bEtotFlag(void) { return m_taub2bEtotFlag; }
240 
241  private:
243  TrgEclMapping* _TCMap = nullptr;
247 
249  void get2CLETP(int, int, int&, int&, int&, int&);
250 
252  std::vector<double> BhabhaComb;
254  std::vector<double> MaxTCId;
256  std::vector<double> MaxTCThetaId;
258  std::vector<double> ClusterEnergy;
260  std::vector<double> ClusterTiming;
262  std::vector<TVector3> ClusterPosition;
264  std::vector<double> _2DBhabhaThresholdFWD;
266  std::vector<double> _2DBhabhaThresholdBWD;
268  std::vector<double> _3DBhabhaSelectionThreshold;
270  std::vector<double> _3DBhabhaVetoThreshold;
272  std::vector<double> _3DBhabhaSelectionAngle;
274  std::vector<double> _3DBhabhaVetoAngle;
278  std::vector<double> _mumuAngle;
280  std::vector<double> m_3DBhabhaAddAngleCut;
282  std::vector<int> m_taub2bAngleCut;
298  std::vector<int> m_taub2b2AngleCut;
303 
306  std::vector<int> m_taub2b3AngleCut;
315 
320  std::vector<int> m_3DBhabhaVetoClusterTCIds;
324  std::vector<double> m_3DBhabhaVetoClusterEnergies;
326  std::vector<double> m_3DBhabhaVetoClusterTimings;
330  int m_3DBhabhaSelectionThetaFlag = std::numeric_limits<int>::quiet_NaN();
339  };
340 //
341 //
342 //
344 } // namespace Belle2
A Class of ECL Trigger clustering
Definition: TrgEclBhabha.h:31
double m_taub2b3CLELowCut
taub2b3 cluster energy cut2 (GeV)
Definition: TrgEclBhabha.h:312
int m_3DBhabhaSelectionThetaFlag
flag which shows theta position of clusters of 3DBhabha Selection.
Definition: TrgEclBhabha.h:330
int m_taub2bAngleFlag
taub2b 2 cluster angle cut flag
Definition: TrgEclBhabha.h:290
int getTaub2bAngleFlag(void)
get taub2b 2 cluster angle cut flag
Definition: TrgEclBhabha.h:235
double m_taub2bEtotCut
taub2b total energy(TC theta id=1-17) cut (GeV)
Definition: TrgEclBhabha.h:284
bool GetBhabha00(std::vector< double >)
Belle 2D Bhabha veto method.
double m_taub2b3CLEHighCut
taub2b3 cluster energy cut3 (GeV)
Definition: TrgEclBhabha.h:314
void save(int)
Save.
bool Getmumu()
MuMu selection for calibration.
int getTaub2bEtotFlag(void)
get total energy(TC theta id=1-17) flag for taub2b
Definition: TrgEclBhabha.h:237
std::vector< double > m_3DBhabhaSelectionClusterEnergies
Energies of two clusters used for 3D Bhabha selection (GeV)
Definition: TrgEclBhabha.h:336
std::vector< int > m_3DBhabhaSelectionClusterThetaIds
ThetaIDs of two clusters used for 3D Bhabha selection.
Definition: TrgEclBhabha.h:334
std::vector< double > GetBhabhaComb()
Output 2D Bhabha combination.
Definition: TrgEclBhabha.h:64
double get3DBhabhaVetoClusterTiming(int cl_idx)
get each cluster timing of two clusters of 3D Bhabha veto (ns)
Definition: TrgEclBhabha.h:182
int GetBhabhaAddition(void)
Additional Bhabha veto.
std::vector< double > MaxTCId
Max TC Id.
Definition: TrgEclBhabha.h:254
TrgEclBhabha()
Constructor.
Definition: TrgEclBhabha.cc:67
std::vector< int > m_taub2bAngleCut
taub2b 2 Cluster angle cut (degree)
Definition: TrgEclBhabha.h:282
void get2CLETP(int, int, int &, int &, int &, int &)
2 cluster energies, phi difference and theta sum
void set3DBhabhaAddAngleCut(const std::vector< double > &i3DBhabhaAddAngleCut)
set 3D Bhabha addtion Angle selection
Definition: TrgEclBhabha.h:99
std::vector< TVector3 > ClusterPosition
Cluster Timing.
Definition: TrgEclBhabha.h:262
double get3DBhabhaSelectionClusterEnergy(int cl_idx)
get each cluster energy of two clusters of 3D Bhabha selection (GeV)
Definition: TrgEclBhabha.h:219
std::vector< double > m_3DBhabhaSelectionClusterTimings
Timings of two clusters used for 3D Bhabha selection (ns)
Definition: TrgEclBhabha.h:338
double _mumuThreshold
mumu bit Energy Threshold
Definition: TrgEclBhabha.h:276
std::vector< int > m_3DBhabhaVetoInTrackThetaRegion
theta region(low and high) of 3D Bhbabha veto InTrack
Definition: TrgEclBhabha.h:328
int get3DBhabhaSelectionThetaFlag(void)
get trigger bit(2bits) of flag which shows theta position of clusters of 3DBhabha Selection.
Definition: TrgEclBhabha.h:197
void setTaub2bAngleCut(const std::vector< int > &iTaub2bAngleCut)
set 2 Cluster angle selection for tau 1x1 decay [0], [1] for low and high of dphi,...
Definition: TrgEclBhabha.h:110
int m_3DBhabhaVetoInTrackFlag
trigger bit of flag(1bit) whether two clusters statisfy 3D Bhabha veto are in CDCTRG region in theta ...
Definition: TrgEclBhabha.h:318
TrgEclDataBase * _database
Object of Trigger ECL DataBase.
Definition: TrgEclBhabha.h:246
double get3DBhabhaSelectionClusterTiming(int cl_idx)
get each cluster timing of two clusters of 3D Bhabha selection (ns)
Definition: TrgEclBhabha.h:227
void setTaub2bClusterECut(const double iTaub2bClusterECut1, const double iTaub2bClusterECut2)
set cluster energy cut for taub2b
Definition: TrgEclBhabha.h:120
std::vector< double > m_3DBhabhaVetoClusterEnergies
Energies of two clusters of 3D Bhabha veto (GeV)
Definition: TrgEclBhabha.h:324
std::vector< int > m_3DBhabhaSelectionClusterTCIds
TCIDs of two clusters of 3D Bhabha selection.
Definition: TrgEclBhabha.h:332
int m_taub2bEtotFlag
taub2b total energy(TC theta id=1-17) flag
Definition: TrgEclBhabha.h:292
std::vector< double > _mumuAngle
mumu bit Angle
Definition: TrgEclBhabha.h:278
std::vector< double > m_3DBhabhaAddAngleCut
Angle selection of additional Bhabha veto in CM frame.
Definition: TrgEclBhabha.h:280
std::vector< double > _3DBhabhaVetoThreshold
3D Veto Bhabha Energy Threshold
Definition: TrgEclBhabha.h:270
double m_taub2b2EtotCut
taub2b2 total energy cut (GeV)
Definition: TrgEclBhabha.h:296
TrgEclBhabha(TrgEclBhabha &)=delete
Destructor.
std::vector< double > ClusterTiming
Cluster Timing.
Definition: TrgEclBhabha.h:260
int get3DBhabhaSelectionClusterThetaId(int cl_idx)
get each TC theta ID(most energetic TC in a cluster) of two clusters of 3D Bhabha selection
Definition: TrgEclBhabha.h:211
void setmumuThreshold(int mumuThreshold)
set mumu bit Threshold
Definition: TrgEclBhabha.h:95
void set2DBhabhaThreshold(const std::vector< double > &i2DBhabhaThresholdFWD, const std::vector< double > &i2DBhabhaThresholdBWD)
set 2D Bhabha Energy Threshold
Definition: TrgEclBhabha.h:68
int get3DBhabhaVetoClusterThetaId(int cl_idx)
get each TC theta ID(most energetic TC in a cluster) of two clusters of 3D Bhabha veto
Definition: TrgEclBhabha.h:166
int getTaub2bClusterEFlag(void)
taub2b Cluster energy flag
Definition: TrgEclBhabha.h:239
void set3DBhabhaVetoAngle(const std::vector< double > &i3DBhabhaVetoAngle)
set 3D veto Bhabha Energy Angle
Definition: TrgEclBhabha.h:90
void setTaub2b2Cut(const std::vector< int > &iTaub2b2AngleCut, const double iTaub2b2EtotCut, const double iTaub2b2CLEEndcapCut, const double iTaub2b2CLECut)
set taub2b2 cut
Definition: TrgEclBhabha.h:127
std::vector< int > m_3DBhabhaVetoClusterThetaIds
ThetaIds of two clusters of 3D Bhabha veto.
Definition: TrgEclBhabha.h:322
bool GetBhabha02()
Belle II 3D Bhabha method for selection.
TrgEclBhabha & operator=(TrgEclBhabha &)=delete
Assignement operator, deleted.
void set3DBhabhaSelectionAngle(const std::vector< double > &i3DBhabhaSelectionAngle)
set 3D selection Bhabha Energy Angle
Definition: TrgEclBhabha.h:85
void set3DBhabhaSelectionThreshold(const std::vector< double > &i3DBhabhaSelectionThreshold)
set 3D selection Bhabha Energy Threshold
Definition: TrgEclBhabha.h:75
double get3DBhabhaVetoClusterEnergy(int cl_idx)
get each cluster energy of two clusters of 3D Bhabha veto (GeV)
Definition: TrgEclBhabha.h:174
void setTaub2bEtotCut(const double iTaub2bEtotCut)
set total energy cut for taub2b
Definition: TrgEclBhabha.h:115
std::vector< double > _3DBhabhaSelectionAngle
3D Selection Bhabha Energy Angle
Definition: TrgEclBhabha.h:272
std::vector< double > _2DBhabhaThresholdBWD
2D Bhabha Energy Threshold
Definition: TrgEclBhabha.h:266
std::vector< int > m_3DBhabhaVetoClusterTCIds
TCIDs of two clusters of 3D Bhabha veto.
Definition: TrgEclBhabha.h:320
double m_taub2bClusterECut2
taub2b Cluster one of energy cut in b2b in lab (GeV)
Definition: TrgEclBhabha.h:288
std::vector< double > BhabhaComb
Bhabha Combination.
Definition: TrgEclBhabha.h:252
int get3DBhabhaVetoInTrackFlag(void)
get trigger bit of flag(1bit) whether two clusters statisfy 3D Bhabha veto are in CDCTRG region in th...
Definition: TrgEclBhabha.h:152
std::vector< int > m_taub2b2AngleCut
taub2b2 two Cluster angle cut (degree)
Definition: TrgEclBhabha.h:298
double m_taub2b3EtotCut
taub2b3 total energy (TC theta ID =1-17) (GeV)
Definition: TrgEclBhabha.h:308
std::vector< double > _3DBhabhaSelectionThreshold
3D Selection Bhabha Energy Threshold
Definition: TrgEclBhabha.h:268
std::vector< double > m_3DBhabhaVetoClusterTimings
Timings of two clusters of 3D Bhabha veto (ns)
Definition: TrgEclBhabha.h:326
bool GetTaub2b3(double)
Taub2b3.
int m_taub2bClusterEFlag
taub2b Cluster energy flag
Definition: TrgEclBhabha.h:294
std::vector< double > MaxTCThetaId
Cluster ThetaId.
Definition: TrgEclBhabha.h:256
bool GetTaub2b(double)
Taub2b selection.
bool GetBhabha01()
Belle II 3D Bhabha method for veto.
double m_taub2b3CLEb2bCut
taub2b3 cluster energy cut (GeV)
Definition: TrgEclBhabha.h:310
int get3DBhabhaVetoClusterTCId(int cl_idx)
get each TCID(most energetic TC in a cluster) of two clusters of 3D Bhabha veto
Definition: TrgEclBhabha.h:157
void set3DBhabhaVetoInTrackThetaRegion(const std::vector< int > &i3DBhabhaVetoInTrackThetaRegion)
set ThetaID (low and high) for 3DBhabhaVetoInTrack
Definition: TrgEclBhabha.h:104
double m_taub2bClusterECut1
taub2b Cluster one of energy cut in b2b in lab (GeV)
Definition: TrgEclBhabha.h:286
void set3DBhabhaVetoThreshold(const std::vector< double > &i3DBhabhaVetoThreshold)
set 3D veto Bhabha Energy Threshold
Definition: TrgEclBhabha.h:80
void setmumuAngle(const std::vector< double > &imumuAngle)
set mumu bit Angle selection
Definition: TrgEclBhabha.h:97
virtual ~TrgEclBhabha()
Constructor.
std::vector< double > ClusterEnergy
Cluster Energy.
Definition: TrgEclBhabha.h:258
TrgEclMapping * _TCMap
Object of TC Mapping.
Definition: TrgEclBhabha.h:243
void setTaub2b3Cut(const std::vector< int > &iTaub2b3AngleCut, const double iTaub2b3EtotCut, const double iTaub2b3CLEb2bCut, const double iTaub2b3CLELowCut, const double iTaub2b3CLEHighCut)
set taub2b3 cut
Definition: TrgEclBhabha.h:138
double m_taub2b2CLECut
taub2b2 cluster energy cut (GeV)
Definition: TrgEclBhabha.h:302
std::vector< double > _2DBhabhaThresholdFWD
2D Bhabha Energy Threshold
Definition: TrgEclBhabha.h:264
std::vector< double > _3DBhabhaVetoAngle
3D Veto Bhabha Energy Angle
Definition: TrgEclBhabha.h:274
int get3DBhabhaSelectionClusterTCId(int cl_idx)
get each TCID(most energetic TC in a cluster) of two clusters of 3D Bhabha selection
Definition: TrgEclBhabha.h:202
double m_taub2b2CLEEndcapCut
taub2b2 cluster energy cut for endcap cluster (GeV)
Definition: TrgEclBhabha.h:300
bool GetTaub2b2(double)
Taub2b selection (tighter selection than Taub2b)
std::vector< int > m_taub2b3AngleCut
taub2b3 selection cuts (3,2,1,0) = (dphi low, dphi high, theta_sum low, theta_sum high)
Definition: TrgEclBhabha.h:306
class TrgEclDataBase;
A class of TC Mapping.
Definition: TrgEclMapping.h:26
Abstract base class for different kinds of events.