Go to the documentation of this file.00001 #ifndef GsfElectronDataAnalyzer_h
00002 #define GsfElectronDataAnalyzer_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 #include "DataFormats/Common/interface/EDProduct.h"
00025
00026 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00027
00028 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
00029
00030 class MagneticField;
00031 class TFile;
00032 class TH1F;
00033 class TH2F;
00034 class TH1I;
00035 class TProfile;
00036 class TTree;
00037
00038 class GsfElectronDataAnalyzer : public edm::EDAnalyzer
00039 {
00040 public:
00041
00042 explicit GsfElectronDataAnalyzer(const edm::ParameterSet& conf);
00043
00044 virtual ~GsfElectronDataAnalyzer();
00045
00046 virtual void beginJob();
00047 virtual void endJob();
00048 virtual void analyze(const edm::Event& e, const edm::EventSetup& c);
00049
00050 private:
00051
00052 bool trigger(const edm::Event & e);
00053
00054 unsigned int nEvents_;
00055 unsigned int nAfterTrigger_;
00056
00057 edm::InputTag triggerResults_;
00058
00059 std::vector<std::string > HLTPathsByName_;
00060 std::vector<unsigned int> HLTPathsByIndex_;
00061
00062 std::string outputFile_;
00063 edm::InputTag electronCollection_;
00064 edm::InputTag matchingObjectCollection_;
00065 std::string matchingCondition_;
00066 std::string type_;
00067 bool readAOD_;
00068
00069 double maxPtMatchingObject_;
00070 double maxAbsEtaMatchingObject_;
00071 double deltaR_;
00072
00073 TrajectoryStateTransform transformer_;
00074 edm::ESHandle<TrackerGeometry> pDD;
00075 edm::ESHandle<MagneticField> theMagField;
00076
00077 TFile *histfile_;
00078 TTree *tree_;
00079 float mcEnergy[10], mcEta[10], mcPhi[10], mcPt[10], mcQ[10];
00080 float superclusterEnergy[10], superclusterEta[10], superclusterPhi[10], superclusterEt[10];
00081 float seedMomentum[10], seedEta[10], seedPhi[10], seedPt[10], seedQ[10];
00082
00083 TH1F *h_matchingObjectNum;
00084
00085 TH1F *h_matchingObjectEta;
00086 TH1F *h_matchingObjectAbsEta;
00087 TH1F *h_matchingObjectP;
00088 TH1F *h_matchingObjectPt;
00089 TH1F *h_matchingObjectPhi;
00090 TH1F *h_matchingObjectZ;
00091
00092 TH1F *h_ele_matchingObjectEta_matched;
00093 TH1F *h_ele_matchingObjectAbsEta_matched;
00094 TH1F *h_ele_matchingObjectPt_matched;
00095 TH1F *h_ele_matchingObjectPhi_matched;
00096 TH1F *h_ele_matchingObjectZ_matched;
00097
00098 TH1F *h_ele_mee_all;
00099 TH1F *h_ele_mee_os;
00100 TH1F *h_ele_mee_os_ebeb;
00101 TH1F *h_ele_mee_os_ebee;
00102 TH1F *h_ele_mee_os_eeee;
00103 TH1F *h_ele_mee_os_gg;
00104 TH1F *h_ele_mee_os_gb;
00105 TH1F *h_ele_mee_os_bb;
00106
00107 TH2F *h_ele_E2mnE1vsMee_all;
00108 TH2F *h_ele_E2mnE1vsMee_egeg_all;
00109
00110 TH1F *h_ele_charge;
00111 TH2F *h_ele_chargeVsEta;
00112 TH2F *h_ele_chargeVsPhi;
00113 TH2F *h_ele_chargeVsPt;
00114 TH1F *h_ele_vertexP;
00115 TH1F *h_ele_vertexPt;
00116 TH1F *h_ele_Et;
00117 TH2F *h_ele_vertexPtVsEta;
00118 TH2F *h_ele_vertexPtVsPhi;
00119 TH1F *h_ele_vertexPt_5100;
00120 TH1F *h_ele_vertexEta;
00121 TH2F *h_ele_vertexEtaVsPhi;
00122 TH1F *h_ele_vertexAbsEta;
00123 TH1F *h_ele_vertexPhi;
00124 TH1F *h_ele_vertexX;
00125 TH1F *h_ele_vertexY;
00126 TH1F *h_ele_vertexZ;
00127 TH1F *h_ele_vertexTIP;
00128 TH2F *h_ele_vertexTIPVsEta;
00129 TH2F *h_ele_vertexTIPVsPhi;
00130 TH2F *h_ele_vertexTIPVsPt;
00131
00132 TH1F *histNum_;
00133
00134 TH1F *histSclEn_ ;
00135 TH1F *histSclEoEmatchingObject_barrel_matched;
00136 TH1F *histSclEoEmatchingObject_endcaps_matched;
00137 TH1F *histSclEoEmatchingObject_barrel_new_matched;
00138 TH1F *histSclEoEmatchingObject_endcaps_new_matched;
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_PtoPtmatchingObject_matched;
00185 TH1F *h_ele_PoPmatchingObject_matched;
00186 TH2F *h_ele_PoPmatchingObjectVsEta_matched;
00187 TH2F *h_ele_PoPmatchingObjectVsPhi_matched;
00188 TH2F *h_ele_PoPmatchingObjectVsPt_matched;
00189 TH1F *h_ele_PoPmatchingObject_barrel_matched;
00190 TH1F *h_ele_PoPmatchingObject_endcaps_matched;
00191 TH1F *h_ele_PtoPtmatchingObject_barrel_matched;
00192 TH1F *h_ele_PtoPtmatchingObject_endcaps_matched;
00193 TH1F *h_ele_EtaMnEtamatchingObject_matched;
00194 TH2F *h_ele_EtaMnEtamatchingObjectVsEta_matched;
00195 TH2F *h_ele_EtaMnEtamatchingObjectVsPhi_matched;
00196 TH2F *h_ele_EtaMnEtamatchingObjectVsPt_matched;
00197 TH1F *h_ele_PhiMnPhimatchingObject_matched;
00198 TH1F *h_ele_PhiMnPhimatchingObject2_matched;
00199 TH2F *h_ele_PhiMnPhimatchingObjectVsEta_matched;
00200 TH2F *h_ele_PhiMnPhimatchingObjectVsPhi_matched;
00201 TH2F *h_ele_PhiMnPhimatchingObjectVsPt_matched;
00202 TH1F *h_ele_PinMnPout;
00203 TH1F *h_ele_PinMnPout_mode;
00204 TH2F *h_ele_PinMnPoutVsEta_mode;
00205 TH2F *h_ele_PinMnPoutVsPhi_mode;
00206 TH2F *h_ele_PinMnPoutVsPt_mode;
00207 TH2F *h_ele_PinMnPoutVsE_mode;
00208 TH2F *h_ele_PinMnPoutVsChi2_mode;
00209
00210 TH1F *h_ele_outerP;
00211 TH1F *h_ele_outerP_mode;
00212 TH2F *h_ele_outerPVsEta_mode;
00213 TH1F *h_ele_outerPt;
00214 TH1F *h_ele_outerPt_mode;
00215 TH2F *h_ele_outerPtVsEta_mode;
00216 TH2F *h_ele_outerPtVsPhi_mode;
00217 TH2F *h_ele_outerPtVsPt_mode;
00218 TH1F *h_ele_EoP;
00219 TH1F *h_ele_EoP_barrel;
00220 TH1F *h_ele_EoP_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 TH2F *h_ele_EseedOPVsEta;
00228 TH2F *h_ele_EseedOPVsPhi;
00229 TH2F *h_ele_EseedOPVsE;
00230 TH1F *h_ele_EoPout;
00231 TH1F *h_ele_EoPout_barrel;
00232 TH1F *h_ele_EoPout_endcaps;
00233 TH2F *h_ele_EoPoutVsEta;
00234 TH2F *h_ele_EoPoutVsPhi;
00235 TH2F *h_ele_EoPoutVsE;
00236 TH1F *h_ele_EeleOPout;
00237 TH1F *h_ele_EeleOPout_barrel;
00238 TH1F *h_ele_EeleOPout_endcaps;
00239 TH2F *h_ele_EeleOPoutVsEta;
00240 TH2F *h_ele_EeleOPoutVsPhi;
00241 TH2F *h_ele_EeleOPoutVsE;
00242
00243 TH1F *h_ele_dEtaSc_propVtx;
00244 TH1F *h_ele_dEtaSc_propVtx_barrel;
00245 TH1F *h_ele_dEtaSc_propVtx_endcaps;
00246 TH2F *h_ele_dEtaScVsEta_propVtx;
00247 TH2F *h_ele_dEtaScVsPhi_propVtx;
00248 TH2F *h_ele_dEtaScVsPt_propVtx;
00249 TH1F *h_ele_dPhiSc_propVtx;
00250 TH1F *h_ele_dPhiSc_propVtx_barrel;
00251 TH1F *h_ele_dPhiSc_propVtx_endcaps;
00252 TH2F *h_ele_dPhiScVsEta_propVtx;
00253 TH2F *h_ele_dPhiScVsPhi_propVtx;
00254 TH2F *h_ele_dPhiScVsPt_propVtx;
00255 TH1F *h_ele_dEtaCl_propOut;
00256 TH1F *h_ele_dEtaCl_propOut_barrel;
00257 TH1F *h_ele_dEtaCl_propOut_endcaps;
00258 TH2F *h_ele_dEtaClVsEta_propOut;
00259 TH2F *h_ele_dEtaClVsPhi_propOut;
00260 TH2F *h_ele_dEtaClVsPt_propOut;
00261 TH1F *h_ele_dPhiCl_propOut;
00262 TH1F *h_ele_dPhiCl_propOut_barrel;
00263 TH1F *h_ele_dPhiCl_propOut_endcaps;
00264 TH2F *h_ele_dPhiClVsEta_propOut;
00265 TH2F *h_ele_dPhiClVsPhi_propOut;
00266 TH2F *h_ele_dPhiClVsPt_propOut;
00267 TH1F *h_ele_dEtaEleCl_propOut;
00268 TH1F *h_ele_dEtaEleCl_propOut_barrel;
00269 TH1F *h_ele_dEtaEleCl_propOut_endcaps;
00270 TH2F *h_ele_dEtaEleClVsEta_propOut;
00271 TH2F *h_ele_dEtaEleClVsPhi_propOut;
00272 TH2F *h_ele_dEtaEleClVsPt_propOut;
00273 TH1F *h_ele_dPhiEleCl_propOut;
00274 TH1F *h_ele_dPhiEleCl_propOut_barrel;
00275 TH1F *h_ele_dPhiEleCl_propOut_endcaps;
00276 TH2F *h_ele_dPhiEleClVsEta_propOut;
00277 TH2F *h_ele_dPhiEleClVsPhi_propOut;
00278 TH2F *h_ele_dPhiEleClVsPt_propOut;
00279
00280 TH1F *h_ele_seed_dphi2_;
00281 TH2F *h_ele_seed_dphi2VsEta_;
00282 TH2F *h_ele_seed_dphi2VsPt_ ;
00283 TH1F *h_ele_seed_drz2_;
00284 TH2F *h_ele_seed_drz2VsEta_;
00285 TH2F *h_ele_seed_drz2VsPt_;
00286 TH1F *h_ele_seed_subdet2_;
00287
00288 TH1F *h_ele_classes;
00289 TH1F *h_ele_eta;
00290 TH1F *h_ele_eta_golden;
00291 TH1F *h_ele_eta_bbrem;
00292 TH1F *h_ele_eta_narrow;
00293 TH1F *h_ele_eta_shower;
00294
00295 TH1F *h_ele_HoE;
00296 TH1F *h_ele_HoE_barrel;
00297 TH1F *h_ele_HoE_endcaps;
00298 TH1F *h_ele_HoE_fiducial;
00299 TH2F *h_ele_HoEVsEta;
00300 TH2F *h_ele_HoEVsPhi;
00301 TH2F *h_ele_HoEVsE;
00302
00303 TH1F *h_ele_fbrem;
00304 TProfile *h_ele_fbremVsEta_mode;
00305 TProfile *h_ele_fbremVsEta_mean;
00306
00307 TH2F *h_ele_PinVsPoutGolden_mode;
00308 TH2F *h_ele_PinVsPoutShowering_mode;
00309 TH2F *h_ele_PinVsPoutGolden_mean;
00310 TH2F *h_ele_PinVsPoutShowering_mean;
00311 TH2F *h_ele_PtinVsPtoutGolden_mode;
00312 TH2F *h_ele_PtinVsPtoutShowering_mode;
00313 TH2F *h_ele_PtinVsPtoutGolden_mean;
00314 TH2F *h_ele_PtinVsPtoutShowering_mean;
00315 TH1F *histSclEoEmatchingObjectGolden_barrel;
00316 TH1F *histSclEoEmatchingObjectGolden_endcaps;
00317 TH1F *histSclEoEmatchingObjectShowering_barrel;
00318 TH1F *histSclEoEmatchingObjectShowering_endcaps;
00319
00320 TH1F *h_ele_mva;
00321 TH1F *h_ele_provenance;
00322
00323 TH1F *h_ele_tkSumPt_dr03;
00324 TH1F *h_ele_ecalRecHitSumEt_dr03;
00325 TH1F *h_ele_hcalDepth1TowerSumEt_dr03;
00326 TH1F *h_ele_hcalDepth2TowerSumEt_dr03;
00327 TH1F *h_ele_tkSumPt_dr04;
00328 TH1F *h_ele_ecalRecHitSumEt_dr04;
00329 TH1F *h_ele_hcalDepth1TowerSumEt_dr04;
00330 TH1F *h_ele_hcalDepth2TowerSumEt_dr04;
00331
00332
00333 double minEt_;
00334 double minPt_;
00335 double maxAbsEta_;
00336 bool isEB_;
00337 bool isEE_;
00338 bool isNotEBEEGap_;
00339 bool isEcalDriven_;
00340 bool isTrackerDriven_;
00341 double eOverPMinBarrel_;
00342 double eOverPMaxBarrel_;
00343 double eOverPMinEndcaps_;
00344 double eOverPMaxEndcaps_;
00345 double dEtaMinBarrel_;
00346 double dEtaMaxBarrel_;
00347 double dEtaMinEndcaps_;
00348 double dEtaMaxEndcaps_;
00349 double dPhiMinBarrel_;
00350 double dPhiMaxBarrel_;
00351 double dPhiMinEndcaps_;
00352 double dPhiMaxEndcaps_;
00353 double sigIetaIetaMinBarrel_;
00354 double sigIetaIetaMaxBarrel_;
00355 double sigIetaIetaMinEndcaps_;
00356 double sigIetaIetaMaxEndcaps_;
00357 double hadronicOverEmMaxBarrel_;
00358 double hadronicOverEmMaxEndcaps_;
00359 double mvaMin_;
00360 double tipMaxBarrel_;
00361 double tipMaxEndcaps_;
00362 double tkIso03Max_;
00363 double hcalIso03Depth1MaxBarrel_;
00364 double hcalIso03Depth1MaxEndcaps_;
00365 double hcalIso03Depth2MaxEndcaps_;
00366 double ecalIso03MaxBarrel_;
00367 double ecalIso03MaxEndcaps_;
00368
00369
00370 double etamin;
00371 double etamax;
00372 double phimin;
00373 double phimax;
00374 double ptmax;
00375 double pmax;
00376 double eopmax;
00377 double eopmaxsht;
00378 double detamin;
00379 double detamax;
00380 double dphimin;
00381 double dphimax;
00382 double detamatchmin;
00383 double detamatchmax;
00384 double dphimatchmin;
00385 double dphimatchmax;
00386 double fhitsmax;
00387 double lhitsmax;
00388 double poptruemin;
00389 double poptruemax;
00390 double meemin;
00391 double meemax;
00392 double hoemin;
00393 double hoemax;
00394 int nbineta;
00395 int nbinp;
00396 int nbinpt;
00397 int nbinpteff;
00398 int nbinphi;
00399 int nbinp2D;
00400 int nbinpt2D;
00401 int nbineta2D;
00402 int nbinphi2D;
00403 int nbineop;
00404 int nbineop2D;
00405 int nbinfhits;
00406 int nbinlhits;
00407 int nbinxyz;
00408 int nbindeta;
00409 int nbindphi;
00410 int nbindetamatch;
00411 int nbindphimatch;
00412 int nbindetamatch2D;
00413 int nbindphimatch2D;
00414 int nbinpoptrue;
00415 int nbinmee;
00416 int nbinhoe;
00417
00418 };
00419
00420 #endif
00421
00422
00423