Belle II Software  release-05-01-25
TrgEclBeamBKG.cc
1 //---------------------------------------------------------------
2 // $Id$
3 //---------------------------------------------------------------
4 // Filename : TrgEclBeamBKG.cc
5 // Section : TRG ECL
6 // Owner : InSu Lee/Yuuji Unno
7 // Email : islee@hep.hanyang.ac.kr / yunno@post.kek.jp
8 //---------------------------------------------------------------
9 // Description : A class to represent TRG ECL
10 //---------------------------------------------------------------
11 // $Log$
12 //---------------------------------------------------------------
13 
14 #define TRG_SHORT_NAMES
15 #define TRGECLCLUSTER_SHORT_NAMES
16 #include <framework/gearbox/Unit.h>
17 
18 
19 #include <trg/ecl/TrgEclBeamBKG.h>
20 
21 using namespace std;
22 using namespace Belle2;
23 //
24 //
25 //
26 TrgEclBeamBKG::TrgEclBeamBKG()
27 {
28  for (int iii = 0; iii < 3; iii++) {
29  for (int jjj = 0; jjj < 3; jjj++) {
30  Quadrant[iii][jjj] = 0;
31  }
32  }
33  _TCMap = new TrgEclMapping();
34 
35 
36 
37 }
38 
39 TrgEclBeamBKG::~TrgEclBeamBKG()
40 {
41 
42  delete _TCMap;
43 }
44 bool TrgEclBeamBKG::GetBeamBkg(std::vector<std::vector<double>> ThetaRingSum)
45 {
46 
47  for (int iFwd = 0 ; iFwd < 32 ; iFwd++) {
48  if (ThetaRingSum[0][iFwd] > 0) {
49  Quadrant[0][(int)(iFwd / 8)]++;
50  }
51  }
52  for (int iBwd = 0 ; iBwd < 36 ; iBwd++) {
53  if (ThetaRingSum[2][iBwd] > 0) {
54  Quadrant[2][(int)(iBwd / 8)]++;
55  }
56  }
57  for (int iBr = 0 ; iBr < 36 ; iBr++) {
58  if (ThetaRingSum[1][iBr] > 0) {
59  Quadrant[1][(int)(iBr / 9)]++;
60  }
61  }
62 
63 
64  bool boolForward =
65  ((Quadrant[0][0] && Quadrant[0][2]) ||
66  (Quadrant[0][1] && Quadrant[0][3]));
67  bool boolBarrel =
68  ((Quadrant[1][0] && Quadrant[1][2]) ||
69  (Quadrant[1][1] && Quadrant[1][3]));
70  bool boolBeamBkgVeto = (boolForward || boolBarrel);
71 
72 
73  return boolBeamBkgVeto;
74 
75 }
76 
77 
78 //
79 //===<END>
80 //
Belle2::TrgEclMapping
A class of TC Mapping.
Definition: TrgEclMapping.h:31
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19