Go to the documentation of this file.00001 #ifndef GenPurposeSkimmerAcceptance_H
00002 #define GenPurposeSkimmerAcceptance_H
00003
00004
00005 #include <memory>
00006
00007
00008 #include "FWCore/Framework/interface/Frameworkfwd.h"
00009 #include "FWCore/Framework/interface/EDAnalyzer.h"
00010
00011 #include "FWCore/Framework/interface/Event.h"
00012 #include "FWCore/Framework/interface/MakerMacros.h"
00013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00014 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00015
00016
00017
00018 #include "TFile.h"
00019 #include "TBranch.h"
00020 #include "TTree.h"
00021 #include "TVector.h"
00022 #include "TString.h"
00023 #include "TMath.h"
00024
00025 #include "HLTrigger/HLTcore/interface/TriggerSummaryAnalyzerAOD.h"
00026 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
00027 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00028 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00029 #include "DataFormats/EgammaCandidates/interface/Electron.h"
00030 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
00031
00032 #include "DataFormats/Common/interface/TriggerResults.h"
00033 #include "FWCore/Common/interface/TriggerNames.h"
00034 #include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h"
00035 #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
00036 #include "DataFormats/HLTReco/interface/TriggerRefsCollections.h"
00037 #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h"
00038 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
00039 #include "DataFormats/HLTReco/interface/TriggerObject.h"
00040
00041
00042 #include "DataFormats/Common/interface/ValueMap.h"
00043 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
00044 #include "DataFormats/TrackReco/interface/Track.h"
00045 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00046 #include "DataFormats/METReco/interface/CaloMET.h"
00047 #include "DataFormats/METReco/interface/CaloMETFwd.h"
00048 #include "DataFormats/METReco/interface/PFMET.h"
00049 #include "DataFormats/METReco/interface/PFMETFwd.h"
00050 #include "DataFormats/METReco/interface/GenMET.h"
00051 #include "DataFormats/METReco/interface/GenMETFwd.h"
00052
00053 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h"
00054 #include "RecoEgamma/ElectronIdentification/interface/ElectronIDAlgo.h"
00055
00056 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00057 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
00058 #include "DataFormats/RecoCandidate/interface/IsoDepositFwd.h"
00059 #include "DataFormats/Common/interface/ValueMap.h"
00060
00061 #include "DataFormats/PatCandidates/interface/Electron.h"
00062 #include "DataFormats/PatCandidates/interface/MET.h"
00063 #include "DataFormats/Math/interface/deltaR.h"
00064
00065
00066
00067
00068 class GenPurposeSkimmerAcceptance : public edm::EDAnalyzer {
00069 public:
00070 explicit GenPurposeSkimmerAcceptance(const edm::ParameterSet&);
00071 ~GenPurposeSkimmerAcceptance();
00072
00073
00074 private:
00075 virtual void beginJob(const edm::EventSetup&) ;
00076 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00077 virtual void endJob() ;
00078
00079
00080
00081
00082 std::string outputFile_;
00083 int tree_fills_;
00084
00085 edm::InputTag ElectronCollection_;
00086 edm::InputTag MCCollection_;
00087 edm::InputTag MetCollectionTag_;
00088 edm::InputTag tcMetCollectionTag_;
00089 edm::InputTag pfMetCollectionTag_;
00090 edm::InputTag t1MetCollectionTag_;
00091 edm::InputTag t1MetCollectionTagTwiki_;
00092 edm::InputTag genMetCollectionTag_;
00093
00094 edm::InputTag HLTCollectionE29_;
00095 edm::InputTag HLTCollectionE31_;
00096 edm::InputTag HLTTriggerResultsE29_;
00097 edm::InputTag HLTTriggerResultsE31_;
00098 edm::InputTag HLTFilterType_[25];
00099 std::string HLTPath_[25];
00100
00101 TTree * probe_tree;
00102 TFile * histofile;
00103
00104
00105
00106
00107 double probe_sc_eta_for_tree[4];
00108 double probe_sc_phi_for_tree[4];
00109 double probe_sc_et_for_tree[4];
00110 int probe_sc_pass_fiducial_cut[4];
00111 int probe_sc_pass_et_cut[4];
00112
00113
00114 double probe_ele_eta_for_tree[4];
00115 double probe_ele_phi_for_tree[4];
00116 double probe_ele_et_for_tree[4];
00117 double probe_ele_Xvertex_for_tree[4];
00118 double probe_ele_Yvertex_for_tree[4];
00119 double probe_ele_Zvertex_for_tree[4];
00120 double probe_ele_tip[4];
00121 int probe_charge_for_tree[4];
00122 int probe_index_for_tree[4];
00123
00124
00125 int probe_ele_pass_fiducial_cut[4];
00126 int probe_ele_pass_et_cut[4];
00127 int probe_pass_recoEle_cut[4];
00128 int probe_pass_iso_cut[4];
00129
00130 double probe_isolation_value[4];
00131 double probe_iso_user[4];
00132
00133 double probe_ecal_isolation_value[4];
00134 double probe_ecal_iso_user[4];
00135
00136 double probe_hcal_isolation_value[4];
00137 double probe_hcal_iso_user[4];
00138
00139 int probe_classification_index_for_tree[4];
00140 int probe_pass_tip_cut[4];
00141
00142 int probe_pass_id_robust_loose[4];
00143 int probe_pass_id_robust_tight[4];
00144 int probe_pass_id_loose[4];
00145 int probe_pass_id_tight[4];
00146 double probe_ele_hoe[4];
00147 double probe_ele_shh[4];
00148 double probe_ele_sihih[4];
00149 double probe_ele_dhi[4];
00150 double probe_ele_dfi[4];
00151 double probe_ele_eop[4];
00152 double probe_ele_pin[4];
00153 double probe_ele_pout[4];
00154 double probe_ele_e5x5[4];
00155 double probe_ele_e2x5[4];
00156 double probe_ele_e1x5[4];
00157
00158
00159 int probe_pass_trigger_cut[4][25];
00160 double probe_hlt_matched_dr[4];
00161
00162 double MCMatch_Deta_;
00163 double MCMatch_Dphi_;
00164 int probe_mc_matched[4];
00165 double probe_mc_matched_deta[4];
00166 double probe_mc_matched_dphi[4];
00167 double probe_mc_matched_denergy[4];
00168 int probe_mc_matched_mother[4];
00169
00170
00171 int numberOfHLTFilterObjects[25];
00172
00173 int event_HLTPath[25];
00174
00175 double BarrelMaxEta;
00176 double EndcapMinEta;
00177 double EndcapMaxEta;
00178
00179 double ProbeSCMinEt;
00180 double ProbeRecoEleSCMaxDE;
00181
00182 double ProbeHLTObjMaxDR;
00183 double RecoEleSeedBCMaxDE;
00184 double GsfTrackMinInnerPt;
00185
00186 int elec_number_in_event;
00187 int elec_1_duplicate_removal;
00188
00189 double event_MET, event_MET_sig;
00190
00191 double event_MET_phi;
00192 double event_tcMET, event_tcMET_sig, event_tcMET_phi;
00193 double event_pfMET, event_pfMET_sig;
00194
00195 double event_pfMET_phi;
00196 double event_genMET, event_genMET_sig;
00197
00198 double event_genMET_phi;
00199
00200 double event_t1MET, event_t1MET_phi, event_t1MET_sig;
00201 double event_twikiT1MET, event_twikiT1MET_phi, event_twikiT1MET_sig;
00202
00203
00204
00205 double mc_ele_eta[10];
00206 double mc_ele_phi[10];
00207 double mc_ele_et[10];
00208 double mc_ele_vertex_x[10];
00209 double mc_ele_vertex_y[10];
00210 double mc_ele_vertex_z[10];
00211 int mc_ele_mother[10];
00212 int mc_ele_charge[10];
00213 int mc_ele_status[10];
00214
00215
00216
00217 double sc1_eta[8], sc1_phi[8], sc1_et[8];
00218 double sc2_eta[8], sc2_phi[8], sc2_et[8];
00219 double sc3_eta[8], sc3_phi[8], sc3_et[8];
00220 double sc4_eta[8], sc4_phi[8], sc4_et[8];
00221 double sc5_eta[8], sc5_phi[8], sc5_et[8];
00222
00223
00224
00225 };
00226
00227
00228 #endif
00229