BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EventPreSelect.h
Go to the documentation of this file.
1#ifndef EventPreSelect_H
2#define EventPreSelect_H
3#include <cstring>
4
5#include "GaudiKernel/AlgFactory.h"
6#include "GaudiKernel/Algorithm.h"
7#include "GaudiKernel/NTuple.h"
10
11class EventPreSelect : public Algorithm {
12
13public:
14 EventPreSelect(const std::string& name, ISvcLocator* pSvcLocator);
15 StatusCode initialize();
16 StatusCode execute();
17 StatusCode finalize();
18
19 bool WhetherSector(double ph,double ph1,double ph2);
20
21private:
22
23 int m_BarrelOrEndcap;
24 bool m_output;
25 double m_ecm;
26 static int idmax[43];
27
28 // Tag this event
29 bool m_isBarrelBhabha;
30 bool m_isEndcapBhabha;
31 bool m_isBarrelDimu;
32 bool m_isEndcapDimu;
33 bool m_isHadron;
34 bool m_isBarrelDiphoton;
35 bool m_isEndcapDiphoton;
36
37 // Whether select event
38 bool m_selectBhabha;
39 bool m_selectDimu;
40 bool m_selectHadron;
41 bool m_selectDiphoton;
42 bool m_writeDst;
43 bool m_writeRec;
44
45 // Sub-Algorithm for each event
46 DimuPreSelect *m_dimuAlg;
47
48 // Declare r0, z0 cut for charged tracks
49 double m_vr0cut;
50 double m_vz0cut;
51 double m_pt0HighCut;
52 double m_pt0LowCut;
53
54 // Declare energy, dphi, dthe cuts for fake gamma's
55 double m_energyThreshold;
56 double m_gammaPhiCut;
57 double m_gammaThetaCut;
58
59 // Select creteria for each event
60 double m_bhabhaEmcECut;
61 double m_bhabhaMaxECut;
62 double m_bhabhaSecECut;
63 double m_bhabhaDTheCut;
64 double m_bhabhaDPhiCut1;
65 double m_bhabhaDPhiCut2;
66 double m_bhabhaDPhiCut3;
67 double m_bhabhaDPhiCut4;
68 int m_bhabhaMdcHitCutB;
69 int m_bhabhaMdcHitCutE;
70
71 double m_dimuEHighCut;
72 double m_dimuELowCut;
73 double m_dimuDTheCut;
74 double m_dimuDPhiCut;
75
76 double m_hadronChaECut;
77 double m_hadronNeuECut;
78
79 double m_diphotonEmcECut;
80 double m_diphotonSecECut;
81 double m_diphotonDTheCut;
82 double m_diphotonDPhiCut1;
83 double m_diphotonDPhiCut2;
84
85 /**number of total events */
86 long int m_events;
87
88 /**number of events selected */
89 long int m_barrelBhabhaNumber;
90 long int m_endcapBhabhaNumber;
91 long int m_barrelDimuNumber;
92 long int m_endcapDimuNumber;
93 long int m_hadronNumber;
94 long int m_barrelDiphotonNumber;
95 long int m_endcapDiphotonNumber;
96
97
98 Algorithm* m_subalg1; //select barrel bhabha
99 Algorithm* m_subalg2; //select endcap bhabha
100 Algorithm* m_subalg3; //select barrel dimu
101 Algorithm* m_subalg4; //select endcap dimu
102 Algorithm* m_subalg5; //select hadron
103 Algorithm* m_subalg6; //select barrel diphoton
104 Algorithm* m_subalg7; //select endcap diphoton
105 Algorithm* m_subalg8; //write dst
106 Algorithm* m_subalg9; //write rec
107
108 // define Ntuples here
109
110 NTuple::Tuple* m_tuple0; //Trk2Sh2
111 NTuple::Item<double> m_esum;
112 NTuple::Item<double> m_eemc;
113 NTuple::Item<double> m_etot;
114 NTuple::Item<double> m_nGood;
115 NTuple::Item<double> m_nCharge;
116 NTuple::Item<double> m_nGam;
117 NTuple::Item<double> m_ptot;
118 NTuple::Item<double> m_pp;
119 NTuple::Item<double> m_pm;
120 NTuple::Item<long> m_runnb;
121 NTuple::Item<long> m_evtnb;
122 NTuple::Item<double> m_maxE;
123 NTuple::Item<double> m_secE;
124 NTuple::Item<double> m_dThe;
125 NTuple::Item<double> m_dPhi;
126 NTuple::Item<long> m_mdcHit1;
127 NTuple::Item<long> m_mdcHit2;
128
129 NTuple::Tuple* m_tuple1; // charged track vertex
130 NTuple::Item<double> m_vx0;
131 NTuple::Item<double> m_vy0;
132 NTuple::Item<double> m_vz0;
133 NTuple::Item<double> m_vr0;
134 NTuple::Item<double> m_theta0;
135 NTuple::Item<double> m_p0;
136 NTuple::Item<double> m_pt0;
137
138 NTuple::Tuple* m_tuple2; // photon
139 NTuple::Item<double> m_dthe;
140 NTuple::Item<double> m_dphi;
141 NTuple::Item<double> m_dang;
142 NTuple::Item<double> m_eraw;
143
144 NTuple::Tuple* m_tuple3; // for dimu selection
145};
146
147#endif
StatusCode execute()
EventPreSelect(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize()
bool WhetherSector(double ph, double ph1, double ph2)
StatusCode finalize()