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