BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPreSelect/CalibEventSelect/CalibEventSelect-00-00-15/CalibEventSelect/CalibEventSelect.h
Go to the documentation of this file.
1#ifndef CalibEventSelect_H
2#define CalibEventSelect_H
3#include <cstring>
4
5#include "GaudiKernel/AlgFactory.h"
6#include "GaudiKernel/Algorithm.h"
7#include "GaudiKernel/NTuple.h"
8#include "EvtRecEvent/EvtRecTrack.h"
9
10
11#include "AIDA/IAxis.h"
12#include "AIDA/IHistogram1D.h"
13#include "AIDA/IHistogramFactory.h"
14using AIDA::IHistogram1D;
15
16
17class CalibEventSelect : public Algorithm {
18
19public:
20 CalibEventSelect(const std::string& name, ISvcLocator* pSvcLocator);
21 StatusCode initialize();
22 StatusCode execute();
23 StatusCode finalize();
24
25 bool WhetherSector(double ph,double ph1,double ph2);
26 void readbeamEfromDb(int runNo, double & beamE);
27
28private:
29
30 int m_BarrelOrEndcap;
31 bool m_output;
32 bool m_display;
33
34 int m_run;
35 double m_ecm;
36 static int idmax[43];
37
38 //histograms
39
40 IHistogram1D* h_nGood;
41 IHistogram1D* h_nCharge;
42 IHistogram1D* h_pmaxobeam;
43 IHistogram1D* h_eopmax;
44 IHistogram1D* h_eopsec;
45 IHistogram1D* h_deltap;
46 IHistogram1D* h_esumoecm;
47 IHistogram1D* h_egmax;
48 IHistogram1D* h_deltaphi;
49 IHistogram1D* h_Pt;
50
51 // Tag this event
52
53 bool m_isRadBhabha;
54 bool m_isGGEE;
55 bool m_isGG4Pi;
56 bool m_isRadBhabhaT;
57 bool m_isRhoPi;
58 bool m_isKstarK;
59 bool m_isPPPiPi;
60 bool m_isRecoJpsi;
61 bool m_isBhabha;
62 bool m_isDimu;
63 bool m_isCosmic;
64 bool m_isGenProton;
65 bool m_isPsipRhoPi;
66 bool m_isPsipKstarK;
67 bool m_isPsipPPPiPi;
68 bool m_isPsippCand;
69
70
71
72 // Whether select event
73 bool m_printmonitor;
74 bool m_selectRadBhabha;
75 bool m_selectGGEE;
76 bool m_selectGG4Pi;
77 bool m_selectRadBhabhaT;
78 bool m_selectRhoPi;
79 bool m_selectKstarK;
80 bool m_selectPPPiPi;
81 bool m_selectRecoJpsi;
82 bool m_selectBhabha;
83 bool m_selectDimu;
84 bool m_selectCosmic;
85 bool m_selectGenProton;
86 bool m_selectPsipRhoPi;
87 bool m_selectPsipKstarK;
88 bool m_selectPsipPPPiPi;
89 bool m_selectPsippCand;
90
91
92 bool m_writeDst;
93 bool m_writeRec;
94
95 // Declare r0, z0 cut for charged tracks
96 double m_vr0cut;
97 double m_vz0cut;
98 double m_pt0HighCut;
99 double m_pt0LowCut;
100
101 // Declare energy, dphi, dthe cuts for fake gamma's
102 double m_energyThreshold;
103 double m_gammaPhiCut;
104 double m_gammaThetaCut;
105
106 // Select creteria for each event
107
108
109 /**number of total events */
110 long int m_events;
111 int m_radbhabha_scale;
112 int m_bhabha_scale;
113 int m_dimu_scale;
114 int m_cosmic_scale;
115 int m_proton_scale;
116
117 double m_cosmic_lowp;
118
119 /**number of events selected */
120
121 long int m_radBhabhaNumber;
122 long int m_GGEENumber;
123 long int m_GG4PiNumber;
124 long int m_radBhabhaTNumber;
125 long int m_rhoPiNumber;
126 long int m_kstarKNumber;
127 long int m_ppPiPiNumber;
128 long int m_recoJpsiNumber;
129 long int m_bhabhaNumber;
130 long int m_dimuNumber;
131 long int m_cosmicNumber;
132 long int m_genProtonNumber;
133 long int m_psipRhoPiNumber;
134 long int m_psipKstarKNumber;
135 long int m_psipPPPiPiNumber;
136 long int m_psippCandNumber;
137
138 Algorithm* m_subalg1; //write dst
139 Algorithm* m_subalg2; //write rec
140 Algorithm* m_subalg3; //write rad bhabha
141 Algorithm* m_subalg4; //write gg to ee events
142 Algorithm* m_subalg5; //write gg to 4pi events
143 Algorithm* m_subalg6; //write rad bhabha with tight selection critera
144 Algorithm* m_subalg7; //write rhopi events
145 Algorithm* m_subalg8; //write KK* events
146 Algorithm* m_subalg9; //write pppipi events
147 Algorithm* m_subalg10; //write recoil jpsi (4,2 track) events
148 Algorithm* m_subalg11; //write bhabha events
149 Algorithm* m_subalg12; //write dimu events
150 Algorithm* m_subalg13; //write cosmic events
151 Algorithm* m_subalg14; //write generic proton events
152 Algorithm* m_subalg15; //write recoil rhopi events
153 Algorithm* m_subalg16; //write recoil kstark events
154 Algorithm* m_subalg17; //write recoil pppipi events
155 Algorithm* m_subalg18; //write psi'' candidates
156
157
158 // define Ntuples here
159
160 NTuple::Tuple* m_tuple0; //Trk2Sh2
161 NTuple::Item<double> m_esum;
162 NTuple::Item<double> m_eemc;
163 NTuple::Item<double> m_etot;
164 NTuple::Item<double> m_nGood;
165 NTuple::Item<double> m_nCharge;
166 NTuple::Item<double> m_nGam;
167 NTuple::Item<double> m_ptot;
168 NTuple::Item<double> m_pp;
169 NTuple::Item<double> m_pm;
170 NTuple::Item<long> m_runnb;
171 NTuple::Item<long> m_evtnb;
172 NTuple::Item<double> m_maxE;
173 NTuple::Item<double> m_secE;
174 NTuple::Item<double> m_dThe;
175 NTuple::Item<double> m_dPhi;
176 NTuple::Item<long> m_mdcHit1;
177 NTuple::Item<long> m_mdcHit2;
178
179 NTuple::Tuple* m_tuple1; // charged track vertex
180 NTuple::Item<double> m_vx0;
181 NTuple::Item<double> m_vy0;
182 NTuple::Item<double> m_vz0;
183 NTuple::Item<double> m_vr0;
184 NTuple::Item<double> m_theta0;
185 NTuple::Item<double> m_p0;
186 NTuple::Item<double> m_pt0;
187
188 NTuple::Tuple* m_tuple2; // photon
189 NTuple::Item<double> m_dthe;
190 NTuple::Item<double> m_dphi;
191 NTuple::Item<double> m_dang;
192 NTuple::Item<double> m_eraw;
193};
194
195#endif
int runNo
Definition: DQA_TO_DB.cxx:12
bool WhetherSector(double ph, double ph1, double ph2)
void readbeamEfromDb(int runNo, double &beamE)
StatusCode initialize()