Go to the documentation of this file.00001 #ifndef GsfElectronFakeAnalyzer_h
00002 #define GsfElectronFakeAnalyzer_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "FWCore/Framework/interface/EDAnalyzer.h"
00018 #include "FWCore/Framework/interface/Event.h"
00019 #include "DataFormats/Common/interface/Handle.h"
00020 #include "FWCore/Framework/interface/ESHandle.h"
00021 #include "FWCore/Framework/interface/EventSetup.h"
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023
00024
00025 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00026
00027 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
00028
00029 class MagneticField;
00030 class TFile;
00031 class TH1F;
00032 class TH2F;
00033 class TH1I;
00034 class TProfile;
00035 class TTree;
00036
00037 class GsfElectronFakeAnalyzer : public edm::EDAnalyzer
00038 {
00039 public:
00040
00041 explicit GsfElectronFakeAnalyzer(const edm::ParameterSet& conf);
00042
00043 virtual ~GsfElectronFakeAnalyzer();
00044
00045 virtual void beginJob();
00046 virtual void endJob();
00047 virtual void analyze(const edm::Event& e, const edm::EventSetup& c);
00048
00049 private:
00050
00051 TrajectoryStateTransform transformer_;
00052 edm::ESHandle<TrackerGeometry> pDD;
00053 edm::ESHandle<MagneticField> theMagField;
00054 TFile *histfile_;
00055 TTree *tree_;
00056 float mcEnergy[10], mcEta[10], mcPhi[10], mcPt[10], mcQ[10];
00057 float superclusterEnergy[10], superclusterEta[10], superclusterPhi[10], superclusterEt[10];
00058 float seedMomentum[10], seedEta[10], seedPhi[10], seedPt[10], seedQ[10];
00059
00060 TH1F *h_matchingObjectNum;
00061
00062 TH1F *h_matchingObjectEta;
00063 TH1F *h_matchingObjectAbsEta;
00064 TH1F *h_matchingObjectP;
00065 TH1F *h_matchingObjectPt;
00066 TH1F *h_matchingObjectPhi;
00067 TH1F *h_matchingObjectZ;
00068
00069 TH1F *h_ele_matchingObjectEta_matched;
00070 TH1F *h_ele_matchingObjectAbsEta_matched;
00071 TH1F *h_ele_matchingObjectPt_matched;
00072 TH1F *h_ele_matchingObjectPhi_matched;
00073 TH1F *h_ele_matchingObjectZ_matched;
00074
00075 TH1F *h_ele_EoverP_all;
00076 TH1F *h_ele_EoverP_all_barrel;
00077 TH1F *h_ele_EoverP_all_endcaps;
00078 TH1F *h_ele_EseedOP_all;
00079 TH1F *h_ele_EseedOP_all_barrel;
00080 TH1F *h_ele_EseedOP_all_endcaps;
00081 TH1F *h_ele_EoPout_all;
00082 TH1F *h_ele_EoPout_all_barrel;
00083 TH1F *h_ele_EoPout_all_endcaps;
00084 TH1F *h_ele_EeleOPout_all;
00085 TH1F *h_ele_EeleOPout_all_barrel;
00086 TH1F *h_ele_EeleOPout_all_endcaps;
00087 TH1F *h_ele_dEtaSc_propVtx_all;
00088 TH1F *h_ele_dEtaSc_propVtx_all_barrel;
00089 TH1F *h_ele_dEtaSc_propVtx_all_endcaps;
00090 TH1F *h_ele_dPhiSc_propVtx_all;
00091 TH1F *h_ele_dPhiSc_propVtx_all_barrel;
00092 TH1F *h_ele_dPhiSc_propVtx_all_endcaps;
00093 TH1F *h_ele_dEtaCl_propOut_all;
00094 TH1F *h_ele_dEtaCl_propOut_all_barrel;
00095 TH1F *h_ele_dEtaCl_propOut_all_endcaps;
00096 TH1F *h_ele_dPhiCl_propOut_all;
00097 TH1F *h_ele_dPhiCl_propOut_all_barrel;
00098 TH1F *h_ele_dPhiCl_propOut_all_endcaps;
00099 TH1F *h_ele_TIP_all;
00100 TH1F *h_ele_TIP_all_barrel;
00101 TH1F *h_ele_TIP_all_endcaps;
00102 TH1F *h_ele_HoE_all;
00103 TH1F *h_ele_HoE_all_barrel;
00104 TH1F *h_ele_HoE_all_endcaps;
00105 TH1F *h_ele_vertexEta_all;
00106 TH1F *h_ele_vertexPt_all;
00107 TH1F *h_ele_mee_all;
00108 TH1F *h_ele_mee_os;
00109
00110 TH2F *h_ele_E2mnE1vsMee_all;
00111 TH2F *h_ele_E2mnE1vsMee_egeg_all;
00112
00113 TH1F *h_ele_charge;
00114 TH2F *h_ele_chargeVsEta;
00115 TH2F *h_ele_chargeVsPhi;
00116 TH2F *h_ele_chargeVsPt;
00117 TH1F *h_ele_vertexP;
00118 TH1F *h_ele_vertexPt;
00119 TH2F *h_ele_vertexPtVsEta;
00120 TH2F *h_ele_vertexPtVsPhi;
00121 TH1F *h_ele_vertexPt_5100;
00122 TH1F *h_ele_vertexEta;
00123 TH2F *h_ele_vertexEtaVsPhi;
00124 TH1F *h_ele_vertexAbsEta;
00125 TH1F *h_ele_vertexPhi;
00126 TH1F *h_ele_vertexX;
00127 TH1F *h_ele_vertexY;
00128 TH1F *h_ele_vertexZ;
00129 TH1F *h_ele_vertexTIP;
00130 TH2F *h_ele_vertexTIPVsEta;
00131 TH2F *h_ele_vertexTIPVsPhi;
00132 TH2F *h_ele_vertexTIPVsPt;
00133
00134 TH1F *histNum_;
00135
00136 TH1F *histSclEn_ ;
00137 TH1F *histSclEoEmatchingObject_barrel;
00138 TH1F *histSclEoEmatchingObject_endcaps;
00139 TH1F *histSclEt_ ;
00140 TH2F *histSclEtVsEta_ ;
00141 TH2F *histSclEtVsPhi_ ;
00142 TH2F *histSclEtaVsPhi_ ;
00143 TH1F *histSclEta_ ;
00144 TH1F *histSclPhi_ ;
00145 TH1F *histSclSigEtaEta_ ;
00146 TH1F *histSclSigEtaEta_barrel_ ;
00147 TH1F *histSclSigEtaEta_endcaps_ ;
00148 TH1F *histSclSigIEtaIEta_ ;
00149 TH1F *histSclSigIEtaIEta_barrel_ ;
00150 TH1F *histSclSigIEtaIEta_endcaps_ ;
00151 TH1F *histSclE1x5_ ;
00152 TH1F *histSclE1x5_barrel_ ;
00153 TH1F *histSclE1x5_endcaps_ ;
00154 TH1F *histSclE2x5max_ ;
00155 TH1F *histSclE2x5max_barrel_ ;
00156 TH1F *histSclE2x5max_endcaps_ ;
00157 TH1F *histSclE5x5_ ;
00158 TH1F *histSclE5x5_barrel_ ;
00159 TH1F *histSclE5x5_endcaps_ ;
00160
00161 TH1F *h_ele_ambiguousTracks;
00162 TH2F *h_ele_ambiguousTracksVsEta;
00163 TH2F *h_ele_ambiguousTracksVsPhi;
00164 TH2F *h_ele_ambiguousTracksVsPt;
00165 TH1F *h_ele_foundHits;
00166 TH1F *h_ele_foundHits_barrel;
00167 TH1F *h_ele_foundHits_endcaps;
00168 TH2F *h_ele_foundHitsVsEta;
00169 TH2F *h_ele_foundHitsVsPhi;
00170 TH2F *h_ele_foundHitsVsPt;
00171 TH1F *h_ele_lostHits;
00172 TH1F *h_ele_lostHits_barrel;
00173 TH1F *h_ele_lostHits_endcaps;
00174 TH2F *h_ele_lostHitsVsEta;
00175 TH2F *h_ele_lostHitsVsPhi;
00176 TH2F *h_ele_lostHitsVsPt;
00177 TH1F *h_ele_chi2;
00178 TH1F *h_ele_chi2_barrel;
00179 TH1F *h_ele_chi2_endcaps;
00180 TH2F *h_ele_chi2VsEta;
00181 TH2F *h_ele_chi2VsPhi;
00182 TH2F *h_ele_chi2VsPt;
00183
00184 TH1F *h_ele_PoPmatchingObject;
00185 TH2F *h_ele_PoPmatchingObjectVsEta;
00186 TH2F *h_ele_PoPmatchingObjectVsPhi;
00187 TH2F *h_ele_PoPmatchingObjectVsPt;
00188 TH1F *h_ele_PoPmatchingObject_barrel;
00189 TH1F *h_ele_PoPmatchingObject_endcaps;
00190 TH1F *h_ele_EtaMnEtamatchingObject;
00191 TH2F *h_ele_EtaMnEtamatchingObjectVsEta;
00192 TH2F *h_ele_EtaMnEtamatchingObjectVsPhi;
00193 TH2F *h_ele_EtaMnEtamatchingObjectVsPt;
00194 TH1F *h_ele_PhiMnPhimatchingObject;
00195 TH1F *h_ele_PhiMnPhimatchingObject2;
00196 TH2F *h_ele_PhiMnPhimatchingObjectVsEta;
00197 TH2F *h_ele_PhiMnPhimatchingObjectVsPhi;
00198 TH2F *h_ele_PhiMnPhimatchingObjectVsPt;
00199 TH1F *h_ele_PinMnPout;
00200 TH1F *h_ele_PinMnPout_mode;
00201 TH2F *h_ele_PinMnPoutVsEta_mode;
00202 TH2F *h_ele_PinMnPoutVsPhi_mode;
00203 TH2F *h_ele_PinMnPoutVsPt_mode;
00204 TH2F *h_ele_PinMnPoutVsE_mode;
00205 TH2F *h_ele_PinMnPoutVsChi2_mode;
00206
00207 TH1F *h_ele_outerP;
00208 TH1F *h_ele_outerP_mode;
00209 TH2F *h_ele_outerPVsEta_mode;
00210 TH1F *h_ele_outerPt;
00211 TH1F *h_ele_outerPt_mode;
00212 TH2F *h_ele_outerPtVsEta_mode;
00213 TH2F *h_ele_outerPtVsPhi_mode;
00214 TH2F *h_ele_outerPtVsPt_mode;
00215 TH1F *h_ele_EoP;
00216 TH1F *h_ele_EoP_barrel;
00217 TH1F *h_ele_EoP_endcaps;
00218 TH1F *h_ele_EoP_eg;
00219 TH1F *h_ele_EoP_eg_barrel;
00220 TH1F *h_ele_EoP_eg_endcaps;
00221 TH2F *h_ele_EoPVsEta;
00222 TH2F *h_ele_EoPVsPhi;
00223 TH2F *h_ele_EoPVsE;
00224 TH1F *h_ele_EseedOP;
00225 TH1F *h_ele_EseedOP_barrel;
00226 TH1F *h_ele_EseedOP_endcaps;
00227 TH1F *h_ele_EseedOP_eg;
00228 TH1F *h_ele_EseedOP_eg_barrel;
00229 TH1F *h_ele_EseedOP_eg_endcaps;
00230 TH2F *h_ele_EseedOPVsEta;
00231 TH2F *h_ele_EseedOPVsPhi;
00232 TH2F *h_ele_EseedOPVsE;
00233 TH1F *h_ele_EoPout;
00234 TH1F *h_ele_EoPout_barrel;
00235 TH1F *h_ele_EoPout_endcaps;
00236 TH1F *h_ele_EoPout_eg;
00237 TH1F *h_ele_EoPout_eg_barrel;
00238 TH1F *h_ele_EoPout_eg_endcaps;
00239 TH2F *h_ele_EoPoutVsEta;
00240 TH2F *h_ele_EoPoutVsPhi;
00241 TH2F *h_ele_EoPoutVsE;
00242 TH1F *h_ele_EeleOPout;
00243 TH1F *h_ele_EeleOPout_barrel;
00244 TH1F *h_ele_EeleOPout_endcaps;
00245 TH1F *h_ele_EeleOPout_eg;
00246 TH1F *h_ele_EeleOPout_eg_barrel;
00247 TH1F *h_ele_EeleOPout_eg_endcaps;
00248 TH2F *h_ele_EeleOPoutVsEta;
00249 TH2F *h_ele_EeleOPoutVsPhi;
00250 TH2F *h_ele_EeleOPoutVsE;
00251
00252 TH1F *h_ele_dEtaSc_propVtx;
00253 TH1F *h_ele_dEtaSc_propVtx_barrel;
00254 TH1F *h_ele_dEtaSc_propVtx_endcaps;
00255 TH1F *h_ele_dEtaSc_propVtx_eg;
00256 TH1F *h_ele_dEtaSc_propVtx_eg_barrel;
00257 TH1F *h_ele_dEtaSc_propVtx_eg_endcaps;
00258 TH2F *h_ele_dEtaScVsEta_propVtx;
00259 TH2F *h_ele_dEtaScVsPhi_propVtx;
00260 TH2F *h_ele_dEtaScVsPt_propVtx;
00261 TH1F *h_ele_dPhiSc_propVtx;
00262 TH1F *h_ele_dPhiSc_propVtx_barrel;
00263 TH1F *h_ele_dPhiSc_propVtx_endcaps;
00264 TH1F *h_ele_dPhiSc_propVtx_eg;
00265 TH1F *h_ele_dPhiSc_propVtx_eg_barrel;
00266 TH1F *h_ele_dPhiSc_propVtx_eg_endcaps;
00267 TH2F *h_ele_dPhiScVsEta_propVtx;
00268 TH2F *h_ele_dPhiScVsPhi_propVtx;
00269 TH2F *h_ele_dPhiScVsPt_propVtx;
00270 TH1F *h_ele_dEtaCl_propOut;
00271 TH1F *h_ele_dEtaCl_propOut_barrel;
00272 TH1F *h_ele_dEtaCl_propOut_endcaps;
00273 TH1F *h_ele_dEtaCl_propOut_eg;
00274 TH1F *h_ele_dEtaCl_propOut_eg_barrel;
00275 TH1F *h_ele_dEtaCl_propOut_eg_endcaps;
00276 TH2F *h_ele_dEtaClVsEta_propOut;
00277 TH2F *h_ele_dEtaClVsPhi_propOut;
00278 TH2F *h_ele_dEtaClVsPt_propOut;
00279 TH1F *h_ele_dPhiCl_propOut;
00280 TH1F *h_ele_dPhiCl_propOut_barrel;
00281 TH1F *h_ele_dPhiCl_propOut_endcaps;
00282 TH1F *h_ele_dPhiCl_propOut_eg;
00283 TH1F *h_ele_dPhiCl_propOut_eg_barrel;
00284 TH1F *h_ele_dPhiCl_propOut_eg_endcaps;
00285 TH2F *h_ele_dPhiClVsEta_propOut;
00286 TH2F *h_ele_dPhiClVsPhi_propOut;
00287 TH2F *h_ele_dPhiClVsPt_propOut;
00288 TH1F *h_ele_dEtaEleCl_propOut;
00289 TH1F *h_ele_dEtaEleCl_propOut_barrel;
00290 TH1F *h_ele_dEtaEleCl_propOut_endcaps;
00291 TH1F *h_ele_dEtaEleCl_propOut_eg;
00292 TH1F *h_ele_dEtaEleCl_propOut_eg_barrel;
00293 TH1F *h_ele_dEtaEleCl_propOut_eg_endcaps;
00294 TH2F *h_ele_dEtaEleClVsEta_propOut;
00295 TH2F *h_ele_dEtaEleClVsPhi_propOut;
00296 TH2F *h_ele_dEtaEleClVsPt_propOut;
00297 TH1F *h_ele_dPhiEleCl_propOut;
00298 TH1F *h_ele_dPhiEleCl_propOut_barrel;
00299 TH1F *h_ele_dPhiEleCl_propOut_endcaps;
00300 TH1F *h_ele_dPhiEleCl_propOut_eg;
00301 TH1F *h_ele_dPhiEleCl_propOut_eg_barrel;
00302 TH1F *h_ele_dPhiEleCl_propOut_eg_endcaps;
00303 TH2F *h_ele_dPhiEleClVsEta_propOut;
00304 TH2F *h_ele_dPhiEleClVsPhi_propOut;
00305 TH2F *h_ele_dPhiEleClVsPt_propOut;
00306
00307 TH1F *h_ele_seed_dphi2_;
00308 TH2F *h_ele_seed_dphi2VsEta_;
00309 TH2F *h_ele_seed_dphi2VsPt_ ;
00310 TH1F *h_ele_seed_drz2_;
00311 TH2F *h_ele_seed_drz2VsEta_;
00312 TH2F *h_ele_seed_drz2VsPt_;
00313 TH1F *h_ele_seed_subdet2_;
00314
00315 TH1F *h_ele_classes;
00316 TH1F *h_ele_eta;
00317 TH1F *h_ele_eta_golden;
00318 TH1F *h_ele_eta_bbrem;
00319 TH1F *h_ele_eta_narrow;
00320 TH1F *h_ele_eta_shower;
00321
00322 TH1F *h_ele_HoE;
00323 TH1F *h_ele_HoE_barrel;
00324 TH1F *h_ele_HoE_endcaps;
00325 TH1F *h_ele_HoE_eg;
00326 TH1F *h_ele_HoE_eg_barrel;
00327 TH1F *h_ele_HoE_eg_endcaps;
00328 TH1F *h_ele_HoE_fiducial;
00329 TH2F *h_ele_HoEVsEta;
00330 TH2F *h_ele_HoEVsPhi;
00331 TH2F *h_ele_HoEVsE;
00332
00333 TH1F *h_ele_fbrem;
00334 TProfile *h_ele_fbremVsEta_mode;
00335 TProfile *h_ele_fbremVsEta_mean;
00336
00337 TH2F *h_ele_PinVsPoutGolden_mode;
00338 TH2F *h_ele_PinVsPoutShowering_mode;
00339 TH2F *h_ele_PinVsPoutGolden_mean;
00340 TH2F *h_ele_PinVsPoutShowering_mean;
00341 TH2F *h_ele_PtinVsPtoutGolden_mode;
00342 TH2F *h_ele_PtinVsPtoutShowering_mode;
00343 TH2F *h_ele_PtinVsPtoutGolden_mean;
00344 TH2F *h_ele_PtinVsPtoutShowering_mean;
00345 TH1F *histSclEoEmatchingObjectGolden_barrel;
00346 TH1F *histSclEoEmatchingObjectGolden_endcaps;
00347 TH1F *histSclEoEmatchingObjectShowering_barrel;
00348 TH1F *histSclEoEmatchingObjectShowering_endcaps;
00349
00350 TH1F *h_ele_mva;
00351 TH1F *h_ele_provenance;
00352
00353 TH1F *h_ele_tkSumPt_dr03;
00354 TH1F *h_ele_ecalRecHitSumEt_dr03;
00355 TH1F *h_ele_hcalDepth1TowerSumEt_dr03;
00356 TH1F *h_ele_hcalDepth2TowerSumEt_dr03;
00357 TH1F *h_ele_tkSumPt_dr04;
00358 TH1F *h_ele_ecalRecHitSumEt_dr04;
00359 TH1F *h_ele_hcalDepth1TowerSumEt_dr04;
00360 TH1F *h_ele_hcalDepth2TowerSumEt_dr04;
00361
00362 std::string outputFile_;
00363 edm::InputTag electronCollection_;
00364 edm::InputTag matchingObjectCollection_;
00365 std::string type_;
00366 bool readAOD_;
00367
00368 double maxPt_;
00369 double maxAbsEta_;
00370 double deltaR_;
00371
00372
00373 double etamin;
00374 double etamax;
00375 double phimin;
00376 double phimax;
00377 double ptmax;
00378 double pmax;
00379 double eopmax;
00380 double eopmaxsht;
00381 double detamin;
00382 double detamax;
00383 double dphimin;
00384 double dphimax;
00385 double detamatchmin;
00386 double detamatchmax;
00387 double dphimatchmin;
00388 double dphimatchmax;
00389 double fhitsmax;
00390 double lhitsmax;
00391 double meemin;
00392 double meemax;
00393 double hoemin;
00394 double hoemax;
00395 int nbineta;
00396 int nbinp;
00397 int nbinpt;
00398 int nbinpteff;
00399 int nbinphi;
00400 int nbinp2D;
00401 int nbinpt2D;
00402 int nbineta2D;
00403 int nbinphi2D;
00404 int nbineop;
00405 int nbineop2D;
00406 int nbinfhits;
00407 int nbinlhits;
00408 int nbinxyz;
00409 int nbindeta;
00410 int nbindphi;
00411 int nbindetamatch;
00412 int nbindphimatch;
00413 int nbindetamatch2D;
00414 int nbindphimatch2D;
00415 int nbinmee;
00416 int nbinhoe;
00417
00418 };
00419
00420 #endif
00421
00422
00423