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 #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 GsfElectronFakeAnalyzer : public edm::EDAnalyzer
00039 {
00040 public:
00041
00042 explicit GsfElectronFakeAnalyzer(const edm::ParameterSet& conf);
00043
00044 virtual ~GsfElectronFakeAnalyzer();
00045
00046 virtual void beginJob(edm::EventSetup const& iSetup);
00047 virtual void endJob();
00048 virtual void analyze(const edm::Event& e, const edm::EventSetup& c);
00049
00050 private:
00051
00052 TrajectoryStateTransform transformer_;
00053 edm::ESHandle<TrackerGeometry> pDD;
00054 edm::ESHandle<MagneticField> theMagField;
00055 TFile *histfile_;
00056 TTree *tree_;
00057 float mcEnergy[10], mcEta[10], mcPhi[10], mcPt[10], mcQ[10];
00058 float superclusterEnergy[10], superclusterEta[10], superclusterPhi[10], superclusterEt[10];
00059 float seedMomentum[10], seedEta[10], seedPhi[10], seedPt[10], seedQ[10];
00060
00061 TH1F *h_matchingObjectNum;
00062
00063 TH1F *h_matchingObjectEta;
00064 TH1F *h_matchingObjectAbsEta;
00065 TH1F *h_matchingObjectP;
00066 TH1F *h_matchingObjectPt;
00067 TH1F *h_matchingObjectPhi;
00068 TH1F *h_matchingObjectZ;
00069
00070 TH1F *h_ele_matchingObjectEta_matched;
00071 TH1F *h_ele_matchingObjectAbsEta_matched;
00072 TH1F *h_ele_matchingObjectPt_matched;
00073 TH1F *h_ele_matchingObjectPhi_matched;
00074 TH1F *h_ele_matchingObjectZ_matched;
00075
00076 TH1F *h_ele_TIP_all;
00077 TH1F *h_ele_EoverP_all;
00078 TH1F *h_ele_vertexEta_all;
00079 TH1F *h_ele_vertexPt_all;
00080 TH1F *h_ele_mee_all;
00081
00082 TH1F *h_ele_charge;
00083 TH2F *h_ele_chargeVsEta;
00084 TH2F *h_ele_chargeVsPhi;
00085 TH2F *h_ele_chargeVsPt;
00086 TH1F *h_ele_vertexP;
00087 TH1F *h_ele_vertexPt;
00088 TH2F *h_ele_vertexPtVsEta;
00089 TH2F *h_ele_vertexPtVsPhi;
00090 TH1F *h_ele_vertexPt_5100;
00091 TH1F *h_ele_vertexEta;
00092 TH2F *h_ele_vertexEtaVsPhi;
00093 TH1F *h_ele_vertexAbsEta;
00094 TH1F *h_ele_vertexPhi;
00095 TH1F *h_ele_vertexX;
00096 TH1F *h_ele_vertexY;
00097 TH1F *h_ele_vertexZ;
00098 TH1F *h_ele_vertexTIP;
00099 TH2F *h_ele_vertexTIPVsEta;
00100 TH2F *h_ele_vertexTIPVsPhi;
00101 TH2F *h_ele_vertexTIPVsPt;
00102
00103 TH1F *histNum_;
00104
00105 TH1F *histSclEn_ ;
00106 TH1F *histSclEoEmatchingObject_barrel;
00107 TH1F *histSclEoEmatchingObject_endcaps;
00108 TH1F *histSclEt_ ;
00109 TH2F *histSclEtVsEta_ ;
00110 TH2F *histSclEtVsPhi_ ;
00111 TH2F *histSclEtaVsPhi_ ;
00112 TH1F *histSclEta_ ;
00113 TH1F *histSclPhi_ ;
00114
00115 TH1F *h_ctf_foundHits;
00116 TH2F *h_ctf_foundHitsVsEta;
00117 TH2F *h_ctf_lostHitsVsEta;
00118
00119 TH1F *h_ele_foundHits;
00120 TH2F *h_ele_foundHitsVsEta;
00121 TH2F *h_ele_foundHitsVsPhi;
00122 TH2F *h_ele_foundHitsVsPt;
00123 TH1F *h_ele_lostHits;
00124 TH2F *h_ele_lostHitsVsEta;
00125 TH2F *h_ele_lostHitsVsPhi;
00126 TH2F *h_ele_lostHitsVsPt;
00127 TH1F *h_ele_chi2;
00128 TH2F *h_ele_chi2VsEta;
00129 TH2F *h_ele_chi2VsPhi;
00130 TH2F *h_ele_chi2VsPt;
00131
00132 TH1F *h_ele_PoPmatchingObject;
00133 TH2F *h_ele_PoPmatchingObjectVsEta;
00134 TH2F *h_ele_PoPmatchingObjectVsPhi;
00135 TH2F *h_ele_PoPmatchingObjectVsPt;
00136 TH1F *h_ele_PoPmatchingObject_barrel;
00137 TH1F *h_ele_PoPmatchingObject_endcaps;
00138 TH1F *h_ele_EtaMnEtamatchingObject;
00139 TH2F *h_ele_EtaMnEtamatchingObjectVsEta;
00140 TH2F *h_ele_EtaMnEtamatchingObjectVsPhi;
00141 TH2F *h_ele_EtaMnEtamatchingObjectVsPt;
00142 TH1F *h_ele_PhiMnPhimatchingObject;
00143 TH1F *h_ele_PhiMnPhimatchingObject2;
00144 TH2F *h_ele_PhiMnPhimatchingObjectVsEta;
00145 TH2F *h_ele_PhiMnPhimatchingObjectVsPhi;
00146 TH2F *h_ele_PhiMnPhimatchingObjectVsPt;
00147 TH1F *h_ele_PinMnPout;
00148 TH1F *h_ele_PinMnPout_mode;
00149 TH2F *h_ele_PinMnPoutVsEta_mode;
00150 TH2F *h_ele_PinMnPoutVsPhi_mode;
00151 TH2F *h_ele_PinMnPoutVsPt_mode;
00152 TH2F *h_ele_PinMnPoutVsE_mode;
00153 TH2F *h_ele_PinMnPoutVsChi2_mode;
00154
00155 TH1F *h_ele_outerP;
00156 TH1F *h_ele_outerP_mode;
00157 TH2F *h_ele_outerPVsEta_mode;
00158 TH1F *h_ele_outerPt;
00159 TH1F *h_ele_outerPt_mode;
00160 TH2F *h_ele_outerPtVsEta_mode;
00161 TH2F *h_ele_outerPtVsPhi_mode;
00162 TH2F *h_ele_outerPtVsPt_mode;
00163 TH1F *h_ele_EoP;
00164 TH2F *h_ele_EoPVsEta;
00165 TH2F *h_ele_EoPVsPhi;
00166 TH2F *h_ele_EoPVsE;
00167 TH1F *h_ele_EoPout;
00168 TH2F *h_ele_EoPoutVsEta;
00169 TH2F *h_ele_EoPoutVsPhi;
00170 TH2F *h_ele_EoPoutVsE;
00171
00172 TH1F *h_ele_dEtaSc_propVtx;
00173 TH2F *h_ele_dEtaScVsEta_propVtx;
00174 TH2F *h_ele_dEtaScVsPhi_propVtx;
00175 TH2F *h_ele_dEtaScVsPt_propVtx;
00176 TH1F *h_ele_dPhiSc_propVtx;
00177 TH2F *h_ele_dPhiScVsEta_propVtx;
00178 TH2F *h_ele_dPhiScVsPhi_propVtx;
00179 TH2F *h_ele_dPhiScVsPt_propVtx;
00180 TH1F *h_ele_dEtaCl_propOut;
00181 TH2F *h_ele_dEtaClVsEta_propOut;
00182 TH2F *h_ele_dEtaClVsPhi_propOut;
00183 TH2F *h_ele_dEtaClVsPt_propOut;
00184 TH1F *h_ele_dPhiCl_propOut;
00185 TH2F *h_ele_dPhiClVsEta_propOut;
00186 TH2F *h_ele_dPhiClVsPhi_propOut;
00187 TH2F *h_ele_dPhiClVsPt_propOut;
00188
00189 TH1F *h_ele_classes;
00190 TH1F *h_ele_eta;
00191 TH1F *h_ele_eta_golden;
00192 TH1F *h_ele_eta_bbrem;
00193 TH1F *h_ele_eta_narrow;
00194 TH1F *h_ele_eta_shower;
00195
00196 TH1F *h_ele_HoE;
00197 TH2F *h_ele_HoEVsEta;
00198 TH2F *h_ele_HoEVsPhi;
00199 TH2F *h_ele_HoEVsE;
00200
00201 TProfile *h_ele_fbremVsEta_mode;
00202 TProfile *h_ele_fbremVsEta_mean;
00203
00204 TH2F *h_ele_PinVsPoutGolden_mode;
00205 TH2F *h_ele_PinVsPoutShowering0_mode;
00206 TH2F *h_ele_PinVsPoutShowering1234_mode;
00207 TH2F *h_ele_PinVsPoutGolden_mean;
00208 TH2F *h_ele_PinVsPoutShowering0_mean;
00209 TH2F *h_ele_PinVsPoutShowering1234_mean;
00210 TH2F *h_ele_PtinVsPtoutGolden_mode;
00211 TH2F *h_ele_PtinVsPtoutShowering0_mode;
00212 TH2F *h_ele_PtinVsPtoutShowering1234_mode;
00213 TH2F *h_ele_PtinVsPtoutGolden_mean;
00214 TH2F *h_ele_PtinVsPtoutShowering0_mean;
00215 TH2F *h_ele_PtinVsPtoutShowering1234_mean;
00216 TH1F *histSclEoEmatchingObjectGolden_barrel;
00217 TH1F *histSclEoEmatchingObjectGolden_endcaps;
00218 TH1F *histSclEoEmatchingObjectShowering0_barrel;
00219 TH1F *histSclEoEmatchingObjectShowering0_endcaps;
00220 TH1F *histSclEoEmatchingObjectShowering1234_barrel;
00221 TH1F *histSclEoEmatchingObjectShowering1234_endcaps;
00222
00223 std::string outputFile_;
00224 edm::InputTag electronCollection_;
00225 edm::InputTag matchingObjectCollection_;
00226 std::string type_;
00227
00228 double maxPt_;
00229 double maxAbsEta_;
00230 double deltaR_;
00231
00232
00233 double etamin;
00234 double etamax;
00235 double phimin;
00236 double phimax;
00237 double ptmax;
00238 double pmax;
00239 double eopmax;
00240 double eopmaxsht;
00241 double detamin;
00242 double detamax;
00243 double dphimin;
00244 double dphimax;
00245 double detamatchmin;
00246 double detamatchmax;
00247 double dphimatchmin;
00248 double dphimatchmax;
00249 double fhitsmax;
00250 double lhitsmax;
00251 int nbineta;
00252 int nbinp;
00253 int nbinpt;
00254 int nbinpteff;
00255 int nbinphi;
00256 int nbinp2D;
00257 int nbinpt2D;
00258 int nbineta2D;
00259 int nbinphi2D;
00260 int nbineop;
00261 int nbineop2D;
00262 int nbinfhits;
00263 int nbinlhits;
00264 int nbinxyz;
00265 int nbindeta;
00266 int nbindphi;
00267 int nbindetamatch;
00268 int nbindphimatch;
00269 int nbindetamatch2D;
00270 int nbindphimatch2D;
00271
00272 };
00273
00274 #endif
00275
00276
00277