00001
00002
00003 #ifndef __TELECTRONISEMSELECTOR__
00004 #define __TELECTRONISEMSELECTOR__
00005
00016
00017 #include <TString.h>
00018
00019 #include "PATCore/TAccept.h"
00020 #include "PATCore/TSelectorToolBase.h"
00021 #include "ElectronPhotonSelectorTools/egammaPIDdefs.h"
00022 #include "AsgTools/AsgMessaging.h"
00023 #include <vector>
00024
00025 class AsgElectronIsEMSelector;
00026
00027 namespace Root {
00028 class TElectronIsEMSelector : public TSelectorToolBase, public asg::AsgMessaging
00029 {
00030
00031 friend class ::AsgElectronIsEMSelector;
00032
00033 public:
00035 TElectronIsEMSelector(const char* name="TElectronIsEMSelector");
00036
00038 ~TElectronIsEMSelector();
00039
00040
00041
00043 int initialize();
00044
00046 inline int finalize() { return 1 ;};
00047
00049 const Root::TAccept& accept(
00050
00051 float eta2,
00052
00053 double et,
00055
00056 float Reta,
00057
00058 float Rphi,
00059
00060 float Rhad1,
00061
00062 float Rhad,
00063
00064 float e277,
00065
00066 float weta1c,
00067
00068 float weta2c,
00069
00070 float f1,
00071
00072 float emax2,
00073
00074 float Eratio,
00075
00076 float DeltaE,
00077
00078 float wtot,
00079
00080 float fracm,
00081
00082 float f3,
00084
00085 bool passBLayerRequirement,
00086
00087 int nPixHitsPlusDeadSensors,
00088
00089 int nSiHitsPlusDeadSensors,
00090
00091 int nTRThigh,
00092 int nTRThighOutliers,
00093 int nTRT,
00094 int nTRTOutliers,
00095 int nTRTXenonHits,
00096 float TRT_PID,
00097
00098 float trackd0,
00099
00100 float deltaeta,
00101 float deltaphi,
00102
00103 double ep) const;
00104
00105
00106 unsigned int calcIsEm(
00107
00108 float eta2,
00109
00110 double et,
00112
00113 float Reta,
00114
00115 float Rphi,
00116
00117 float Rhad1,
00118
00119 float Rhad,
00120
00121 float e277,
00122
00123 float weta1c,
00124
00125 float weta2c,
00126
00127 float f1,
00128
00129 float emax2,
00130
00131 float Eratio,
00132
00133 float DeltaE,
00134
00135 float wtot,
00136
00137 float fracm,
00138
00139 float f3,
00141
00142 bool passBLayerRequirement,
00143
00144 int nPixHitsPlusDeadSensors,
00145
00146 int nSiHitsPlusDeadSensors,
00147
00148 int nTRThigh,
00149 int nTRThighOutliers,
00150 int nTRT,
00151 int nTRTOutliers,
00152 int nTRTXenonHits,
00153 float TRT_PID,
00154
00155 float trackd0,
00156
00157 float deltaeta,
00158 float deltaphi,
00159
00160 double ep) const;
00161
00162
00163
00164
00165 unsigned int calocuts_electrons(
00166
00167 float eta2,
00168
00169 double et,
00170
00171 float Reta,
00172
00173 float Rphi,
00174
00175 float Rhad1,
00176
00177 float Rhad,
00178
00179 float e277,
00180
00181 float weta1c,
00182
00183 float weta2c,
00184
00185 float f1,
00186
00187 float emax2,
00188
00189 float Eratio,
00190
00191 float DeltaE,
00192
00193 float wtot,
00194
00195 float fracm,
00196
00197 float f3,
00198
00199 unsigned int iflag,
00200
00201 double trigEtTh=0
00202 ) const;
00203
00204
00205
00206
00207 unsigned int TrackCut(
00208
00209 float eta2,
00210
00211 double et,
00212
00213 bool passBLayerRequirement,
00214
00215 int nPixHitsPlusDeadSensors,
00216
00217 int nSiHitsPlusDeadSensors,
00218
00219 int nTRThigh,
00220 int nTRThighOutliers,
00221 int nTRT,
00222 int nTRTOutliers,
00223 int nTRTXenonHits,
00224 float TRT_PID,
00225
00226 float trackd0,
00227
00228 float deltaeta,
00229 float deltaphi,
00230
00231 double ep,
00232 unsigned int iflag) const;
00233
00234
00235 unsigned int isEM() const {return m_isEM; };
00236
00237
00239
00241
00243 unsigned int isEMMask;
00244
00246 bool useTRTOutliers;
00248 bool useTRTXenonHits;
00249
00251 std::vector<float> CutBinEta;
00253 std::vector<float> CutBinET;
00255 std::vector<float> CutF1;
00257 std::vector<float> CutHadLeakage;
00259 std::vector<float> CutReta37;
00261 std::vector<float> CutRphi33;
00263 std::vector<float> CutWeta2c;
00265 std::vector<float> CutDeltaEmax2;
00267 std::vector<float> CutDeltaE;
00269 std::vector<float> CutDEmaxs1;
00271 std::vector<float> CutWtot;
00273 std::vector<float> CutWeta1c;
00275 std::vector<float> CutFracm;
00276
00278 std::vector<float> CutF3;
00279
00281 std::vector<int> CutBL;
00283 std::vector<int> CutPi;
00285 std::vector<int> CutSi;
00287 std::vector<float> CutA0;
00289 std::vector<float> CutA0Tight;
00291 std::vector<float> CutDeltaEta;
00293 std::vector<float> CutDeltaEtaTight;
00295 std::vector<float> CutminDeltaPhi;
00297 std::vector<float> CutmaxDeltaPhi;
00299 std::vector<float> CutminEp;
00301 std::vector<float> CutmaxEp;
00302
00304 std::vector<float> CutBinEta_TRT;
00306 std::vector<float> CutBinET_TRT;
00308 std::vector<float> CutNumTRT;
00310 std::vector<float> CutTRTRatio;
00312 std::vector<float> CutTRTRatio90;
00314 std::vector<float> CutEProbabilityHT;
00315
00316
00317 private:
00318
00319
00320 void setIsEM(unsigned int isEM) { m_isEM = isEM; };
00321 const Root::TAccept& fillAccept() const;
00322
00323 std::vector<int> FindEtEtaBin(double et, double eta2) const;
00324
00325 template<typename T>
00326 bool CheckVar(const std::vector<T>& vec, int choice) const;
00327
00328 mutable unsigned int m_isEM;
00329
00330
00331
00333 int m_cutPositionClusterEtaRange_Electron;
00334
00336 int m_cutPositionConversionMatch_Electron;
00337
00339 int m_cutPositionClusterHadronicLeakage_Electron;
00341 int m_cutPositionClusterMiddleEnergy_Electron;
00343 int m_cutPositionClusterMiddleEratio37_Electron;
00345 int m_cutPositionClusterMiddleEratio33_Electron;
00347 int m_cutPositionClusterMiddleWidth_Electron;
00348
00350 int m_cutPositionClusterBackEnergyFraction_Electron;
00351
00353 int m_cutPositionClusterStripsEratio_Electron;
00355 int m_cutPositionClusterStripsDeltaEmax2_Electron;
00357 int m_cutPositionClusterStripsDeltaE_Electron;
00359 int m_cutPositionClusterStripsWtot_Electron;
00361 int m_cutPositionClusterStripsFracm_Electron;
00363 int m_cutPositionClusterStripsWeta1c_Electron;
00364
00366 int m_cutPositionClusterStripsDEmaxs1_Electron;
00368 int m_cutPositionTrackBlayer_Electron;
00370 int m_cutPositionTrackPixel_Electron;
00372 int m_cutPositionTrackSi_Electron;
00374 int m_cutPositionTrackA0_Electron;
00376 int m_cutPositionTrackMatchEta_Electron;
00378 int m_cutPositionTrackMatchPhi_Electron;
00380 int m_cutPositionTrackMatchEoverP_Electron;
00382 int m_cutPositionTrackTRTeProbabilityHT_Electron;
00384 int m_cutPositionTrackTRThits_Electron;
00386 int m_cutPositionTrackTRTratio_Electron;
00388 int m_cutPositionTrackTRTratio90_Electron;
00389
00391 int m_cutPositionTrackA0Tight_Electron;
00394 int m_cutPositionTrackMatchEtaTight_Electron;
00395
00397 int m_cutPositionIsolation_Electron;
00399 int m_cutPositionClusterIsolation_Electron;
00401 int m_cutPositionTrackIsolation_Electron;
00402
00403
00404
00406 const TString m_cutNameClusterEtaRange_Electron;
00407
00409 const TString m_cutNameConversionMatch_Electron;
00410
00412 const TString m_cutNameClusterHadronicLeakage_Electron;
00414 const TString m_cutNameClusterMiddleEnergy_Electron;
00416 const TString m_cutNameClusterMiddleEratio37_Electron;
00418 const TString m_cutNameClusterMiddleEratio33_Electron;
00420 const TString m_cutNameClusterMiddleWidth_Electron;
00421
00423 const TString m_cutNameClusterBackEnergyFraction_Electron;
00424
00426 const TString m_cutNameClusterStripsEratio_Electron;
00428 const TString m_cutNameClusterStripsDeltaEmax2_Electron;
00430 const TString m_cutNameClusterStripsDeltaE_Electron;
00432 const TString m_cutNameClusterStripsWtot_Electron;
00434 const TString m_cutNameClusterStripsFracm_Electron;
00436 const TString m_cutNameClusterStripsWeta1c_Electron;
00437
00439 const TString m_cutNameClusterStripsDEmaxs1_Electron;
00441 const TString m_cutNameTrackBlayer_Electron;
00443 const TString m_cutNameTrackPixel_Electron;
00445 const TString m_cutNameTrackSi_Electron;
00447 const TString m_cutNameTrackA0_Electron;
00449 const TString m_cutNameTrackMatchEta_Electron;
00451 const TString m_cutNameTrackMatchPhi_Electron;
00453 const TString m_cutNameTrackMatchEoverP_Electron;
00455 const TString m_cutNameTrackTRTeProbabilityHT_Electron;
00457 const TString m_cutNameTrackTRThits_Electron;
00459 const TString m_cutNameTrackTRTratio_Electron;
00461 const TString m_cutNameTrackTRTratio90_Electron;
00462
00464 const TString m_cutNameTrackA0Tight_Electron;
00467 const TString m_cutNameTrackMatchEtaTight_Electron;
00468
00470 const TString m_cutNameIsolation_Electron;
00472 const TString m_cutNameClusterIsolation_Electron;
00474 const TString m_cutNameTrackIsolation_Electron;
00475
00476
00477
00478 };
00479
00480 }
00481
00482 #endif
00483