PageRenderTime 26ms CodeModel.GetById 1ms app.highlight 20ms RepoModel.GetById 1ms app.codeStats 1ms

/ElectroWeakAnalysis/WENu/interface/GenPurposeSkimmerAcceptance.h

https://github.com/aivanov-cern/cmssw
C Header | 229 lines | 161 code | 32 blank | 36 comment | 0 complexity | 0f7b29829664ef7c9fcdef5a90486967 MD5 | raw file
  1#ifndef GenPurposeSkimmerAcceptance_H
  2#define GenPurposeSkimmerAcceptance_H
  3
  4// system include files
  5#include <memory>
  6
  7// user include files
  8#include "FWCore/Framework/interface/Frameworkfwd.h"
  9#include "FWCore/Framework/interface/EDAnalyzer.h"
 10
 11#include "FWCore/Framework/interface/Event.h"
 12#include "FWCore/Framework/interface/MakerMacros.h"
 13#include "FWCore/ParameterSet/interface/ParameterSet.h"
 14#include "FWCore/MessageLogger/interface/MessageLogger.h"
 15
 16// other files
 17// root + maths
 18#include "TFile.h"
 19#include "TBranch.h"
 20#include "TTree.h"
 21#include "TVector.h"
 22#include "TString.h"
 23#include "TMath.h"
 24//
 25#include "HLTrigger/HLTcore/interface/TriggerSummaryAnalyzerAOD.h"
 26#include "DataFormats/HLTReco/interface/TriggerEvent.h"
 27#include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
 28#include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
 29#include "DataFormats/EgammaCandidates/interface/Electron.h"
 30#include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
 31//
 32#include "DataFormats/Common/interface/TriggerResults.h"
 33#include "FWCore/Common/interface/TriggerNames.h"
 34#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h"
 35#include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
 36#include "DataFormats/HLTReco/interface/TriggerRefsCollections.h"
 37#include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h"
 38#include "DataFormats/HLTReco/interface/TriggerEvent.h"
 39#include "DataFormats/HLTReco/interface/TriggerObject.h"
 40
 41//
 42#include "DataFormats/Common/interface/ValueMap.h"
 43#include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
 44#include "DataFormats/TrackReco/interface/Track.h"
 45#include "DataFormats/TrackReco/interface/TrackFwd.h"
 46#include "DataFormats/METReco/interface/CaloMET.h"
 47#include "DataFormats/METReco/interface/CaloMETFwd.h"
 48#include "DataFormats/METReco/interface/PFMET.h"
 49#include "DataFormats/METReco/interface/PFMETFwd.h"
 50#include "DataFormats/METReco/interface/GenMET.h"
 51#include "DataFormats/METReco/interface/GenMETFwd.h"
 52
 53#include "RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h"
 54#include "RecoEgamma/ElectronIdentification/interface/ElectronIDAlgo.h"
 55//
 56#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
 57#include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
 58#include "DataFormats/RecoCandidate/interface/IsoDepositFwd.h"
 59#include "DataFormats/Common/interface/ValueMap.h"
 60
 61#include "DataFormats/PatCandidates/interface/Electron.h"
 62#include "DataFormats/PatCandidates/interface/MET.h"
 63#include "DataFormats/Math/interface/deltaR.h"
 64//
 65// class decleration
 66//
 67
 68class GenPurposeSkimmerAcceptance : public edm::EDAnalyzer {
 69   public:
 70      explicit GenPurposeSkimmerAcceptance(const edm::ParameterSet&);
 71      ~GenPurposeSkimmerAcceptance();
 72
 73
 74   private:
 75      virtual void beginJob(const edm::EventSetup&) ;
 76      virtual void analyze(const edm::Event&, const edm::EventSetup&);
 77      virtual void endJob() ;
 78
 79      // ----------member data ---------------------------
 80
 81  
 82  std::string outputFile_;
 83  int tree_fills_;
 84
 85  edm::InputTag ElectronCollection_;
 86  edm::InputTag MCCollection_;
 87  edm::InputTag MetCollectionTag_;
 88  edm::InputTag tcMetCollectionTag_;
 89  edm::InputTag pfMetCollectionTag_;
 90  edm::InputTag t1MetCollectionTag_;
 91  edm::InputTag t1MetCollectionTagTwiki_;
 92  edm::InputTag genMetCollectionTag_;
 93  //
 94  edm::InputTag HLTCollectionE29_;
 95  edm::InputTag HLTCollectionE31_;
 96  edm::InputTag HLTTriggerResultsE29_;
 97  edm::InputTag HLTTriggerResultsE31_;
 98  edm::InputTag HLTFilterType_[25];
 99  std::string HLTPath_[25];
100
101  TTree * probe_tree;
102  TFile * histofile;
103  //
104
105
106  //probe SC variables
107  double probe_sc_eta_for_tree[4];
108  double probe_sc_phi_for_tree[4];
109  double probe_sc_et_for_tree[4];
110  int probe_sc_pass_fiducial_cut[4]; 
111  int probe_sc_pass_et_cut[4]; 
112  
113  //probe electron variables
114  double probe_ele_eta_for_tree[4];
115  double probe_ele_phi_for_tree[4];
116  double probe_ele_et_for_tree[4];
117  double probe_ele_Xvertex_for_tree[4];
118  double probe_ele_Yvertex_for_tree[4];
119  double probe_ele_Zvertex_for_tree[4];
120  double probe_ele_tip[4];
121  int probe_charge_for_tree[4];
122  int probe_index_for_tree[4];
123  
124  //efficiency cuts
125  int probe_ele_pass_fiducial_cut[4]; 
126  int probe_ele_pass_et_cut[4]; 
127  int probe_pass_recoEle_cut[4]; 
128  int probe_pass_iso_cut[4]; 
129  //
130  double probe_isolation_value[4]; 
131  double probe_iso_user[4]; 
132  //
133  double probe_ecal_isolation_value[4];
134  double probe_ecal_iso_user[4];
135
136  double probe_hcal_isolation_value[4];
137  double probe_hcal_iso_user[4];
138  //
139  int probe_classification_index_for_tree[4]; 
140  int probe_pass_tip_cut[4];
141  //
142  int probe_pass_id_robust_loose[4];
143  int probe_pass_id_robust_tight[4];
144  int probe_pass_id_loose[4];
145  int probe_pass_id_tight[4];
146  double probe_ele_hoe[4];
147  double probe_ele_shh[4];
148  double probe_ele_sihih[4];
149  double probe_ele_dhi[4];
150  double probe_ele_dfi[4];
151  double probe_ele_eop[4];
152  double probe_ele_pin[4];
153  double probe_ele_pout[4];
154  double probe_ele_e5x5[4];
155  double probe_ele_e2x5[4];
156  double probe_ele_e1x5[4];
157
158  //
159  int probe_pass_trigger_cut[4][25];   
160  double probe_hlt_matched_dr[4];
161  //
162  double MCMatch_Deta_;
163  double MCMatch_Dphi_;
164  int probe_mc_matched[4];
165  double probe_mc_matched_deta[4];
166  double probe_mc_matched_dphi[4];
167  double probe_mc_matched_denergy[4];
168  int probe_mc_matched_mother[4];
169  
170 //event variables
171  int numberOfHLTFilterObjects[25];
172
173  int event_HLTPath[25];
174  
175  double BarrelMaxEta;
176  double EndcapMinEta;
177  double EndcapMaxEta;
178
179  double ProbeSCMinEt;
180  double ProbeRecoEleSCMaxDE; 
181
182  double ProbeHLTObjMaxDR;
183  double RecoEleSeedBCMaxDE;
184  double GsfTrackMinInnerPt;
185
186  int elec_number_in_event;      
187  int elec_1_duplicate_removal;
188
189  double    event_MET, event_MET_sig; 
190  //  double    event_MET_eta;
191  double    event_MET_phi;
192  double    event_tcMET, event_tcMET_sig, event_tcMET_phi;
193  double    event_pfMET, event_pfMET_sig; 
194  //  double    event_pfMET_eta;
195  double    event_pfMET_phi;
196  double    event_genMET, event_genMET_sig; 
197  //  double    event_genMET_eta; 
198  double    event_genMET_phi;
199  //
200  double event_t1MET, event_t1MET_phi, event_t1MET_sig;
201  double event_twikiT1MET, event_twikiT1MET_phi, event_twikiT1MET_sig;
202  //
203  //
204  // acceptance and t&p specific
205  double   mc_ele_eta[10];
206  double   mc_ele_phi[10];
207  double   mc_ele_et[10];
208  double   mc_ele_vertex_x[10];
209  double   mc_ele_vertex_y[10];
210  double   mc_ele_vertex_z[10];
211  int   mc_ele_mother[10];
212  int   mc_ele_charge[10];
213  int   mc_ele_status[10];
214  //
215  // for the sc collections
216  //  double sc0_eta[8], sc0_phi[8], sc0_et[8];
217  double sc1_eta[8], sc1_phi[8], sc1_et[8];
218  double sc2_eta[8], sc2_phi[8], sc2_et[8];
219  double sc3_eta[8], sc3_phi[8], sc3_et[8];
220  double sc4_eta[8], sc4_phi[8], sc4_et[8];
221  double sc5_eta[8], sc5_phi[8], sc5_et[8];
222  //  double sc6_eta[8], sc6_phi[8], sc6_et[8];
223  //  double sc7_eta[8], sc7_phi[8], sc7_et[8];
224
225};
226
227
228#endif
229