CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ErsatzMEt.h
Go to the documentation of this file.
1 #ifndef ElectroWeakAnalysis_ErsatzMEt_h
2 #define ElectroWeakAnalysis_ErsatzMEt_h
3 // -*- C++ -*-
4 //
5 // Package: ErsatzMEt
6 // Class: ErsatzMEt
7 //
15 //
16 // Original Author: David Wardrope
17 // Created: Tue Nov 11 16:47:29 GMT 2008
18 // $Id: ErsatzMEt.h,v 1.6 2010/02/16 22:28:34 wdd Exp $
19 //
20 //
21 
22 
23 // system include files
24 #include <memory>
25 
26 //Framework
35 //Random Number Generator
37 #include "CLHEP/Random/RandFlat.h"
38 //CMSSW Containers
40 //Egamma Objects
44 //ECAL
47 //Geometry
55 //DetIds
57 //Other Objects
71 //Physics Tools
73 
74 //Maths
75 #include "Math/GenVector/VectorUtil.h"
76 //ROOT
77 #include "TTree.h"
78 #include "TH1.h"
79 #include "TH2.h"
80 //Helper Functions
85 
86 #define nEntries_arr_ 4
87 //#include "DataFormats/EgammaReco/interface/SuperCluster.h"
88 //
89 // class declaration
90 //
91 
92 class ErsatzMEt : public edm::EDAnalyzer {
93  public:
94  explicit ErsatzMEt(const edm::ParameterSet&);
95  ~ErsatzMEt();
96 
97 
98  private:
99  virtual void beginJob() ;
100  virtual void analyze(const edm::Event&, const edm::EventSetup&);
101 // std::map<reco::GsfElectronRef, reco::SuperClusterRef> probeFinder(const std::vector<reco::GsfElectronRef>&,
102 // const edm::Handle<reco::SuperClusterCollection>&,
103 // const edm::Handle<reco::SuperClusterCollection>&);
104  std::map<reco::GsfElectronRef, reco::GsfElectronRef> probeFinder(const std::vector<reco::GsfElectronRef>&,
107  const reco::MET&, const int);
109  const reco::MET&);
110  bool isInBarrel(double);
111  bool isInEndCap(double);
112  bool isInFiducial(double);
113 
114  virtual void endJob();
115 
116  // ----------member data ---------------------------
125  double mW_, mZ_, mTPmin_, mTPmax_;
127 
130 
131  std::vector<double> CutVector_;
132 
135 // std::vector<double> EtaWeights_;
137 
140  //Output variables
141  TTree* t_;
148 
152  //double tag_caloV1_rescPt_[nEntries_arr_], tag_caloV1_rescEta_[nEntries_arr_], tag_caloV1_rescPhi_[nEntries_arr_];
153  //double tag_caloV2_rescPt_[nEntries_arr_], tag_caloV2_rescEta_[nEntries_arr_], tag_caloV2_rescPhi_[nEntries_arr_];
154  //double tag_caloV3_rescPt_[nEntries_arr_], tag_caloV3_rescEta_[nEntries_arr_], tag_caloV3_rescPhi_[nEntries_arr_];
155  //double tag_caloV4_rescPt_[nEntries_arr_], tag_caloV4_rescEta_[nEntries_arr_], tag_caloV4_rescPhi_[nEntries_arr_];
182 
188 
195 
196  int iComb_;
197 };
198 #endif
199 
double tag_ecalIso_[nEntries_arr_]
Definition: ErsatzMEt.h:158
double McProbe_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:185
double probe_sIhIh_[nEntries_arr_]
Definition: ErsatzMEt.h:164
double McProbe_rescEta_[nEntries_arr_]
Definition: ErsatzMEt.h:186
double McElec_rescEta_[nEntries_arr_]
Definition: ErsatzMEt.h:184
double tag_rescEta_[nEntries_arr_]
Definition: ErsatzMEt.h:156
std::vector< double > CutVector_
Definition: ErsatzMEt.h:131
double tag_dPhiIn_[nEntries_arr_]
Definition: ErsatzMEt.h:157
double ErsatzV3CaloMt_[nEntries_arr_]
Definition: ErsatzMEt.h:173
ErsatzMEt(const edm::ParameterSet &)
Definition: ErsatzMEt.cc:4
double probe_trckIso_[nEntries_arr_]
Definition: ErsatzMEt.h:165
double mZ_
Definition: ErsatzMEt.h:125
double probe_sc_nClus_[nEntries_arr_]
Definition: ErsatzMEt.h:191
double McZ_pt_
Definition: ErsatzMEt.h:146
double ErsatzV1TcMt_[nEntries_arr_]
Definition: ErsatzMEt.h:177
edm::InputTag TriggerEvent_
Definition: ErsatzMEt.h:122
edm::InputTag eIdRobustTight_
Definition: ErsatzMEt.h:119
double probe_ecalIso_[nEntries_arr_]
Definition: ErsatzMEt.h:165
double McElec_rescPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:184
double probe_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:162
bool HLTPathCheck_
Definition: ErsatzMEt.h:134
int phiWidth_
Definition: ErsatzMEt.h:133
edm::ParameterSet hyb_fCorrPSet_
Definition: ErsatzMEt.h:124
double ErsatzV2CaloMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:172
double ErsatzV1CaloMt_[nEntries_arr_]
Definition: ErsatzMEt.h:171
double ErsatzV4CaloMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:174
double ErsatzV4CaloMt_[nEntries_arr_]
Definition: ErsatzMEt.h:174
edm::InputTag TriggerResults_
Definition: ErsatzMEt.h:122
double probe_sc_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:190
edm::InputTag M5x5ScCollection_
Definition: ErsatzMEt.h:118
double McElec_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:183
double BarrelEtaMax_
Definition: ErsatzMEt.h:126
double probe_hoe_[nEntries_arr_]
Definition: ErsatzMEt.h:167
double probe_hcalIso_[nEntries_arr_]
Definition: ErsatzMEt.h:165
edm::InputTag TriggerPath_
Definition: ErsatzMEt.h:122
double ErsatzV4_Mesc_[nEntries_arr_]
Definition: ErsatzMEt.h:181
double tag_e2x5Max_[nEntries_arr_]
Definition: ErsatzMEt.h:159
double McProbe_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:185
double probe_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:162
double McElecProbe_dR_[nEntries_arr_]
Definition: ErsatzMEt.h:187
double ErsatzV1T1MEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:175
double Z_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:168
double Z_m_[nEntries_arr_]
Definition: ErsatzMEt.h:168
edm::InputTag GenMEtCollection_
Definition: ErsatzMEt.h:120
bool Zevent_
Definition: ErsatzMEt.h:134
double McZ_rescY_
Definition: ErsatzMEt.h:147
double tag_hcalIso_[nEntries_arr_]
Definition: ErsatzMEt.h:158
~ErsatzMEt()
Definition: ErsatzMEt.cc:68
double ErsatzV1_rescMesc_[nEntries_arr_]
Definition: ErsatzMEt.h:178
edm::InputTag MCTruthCollection_
Definition: ErsatzMEt.h:117
double probe_eop_[nEntries_arr_]
Definition: ErsatzMEt.h:167
double Z_rescM_[nEntries_arr_]
Definition: ErsatzMEt.h:169
double mTPmin_
Definition: ErsatzMEt.h:125
double probe_e2x5Max_[nEntries_arr_]
Definition: ErsatzMEt.h:166
double tag_trckIso_[nEntries_arr_]
Definition: ErsatzMEt.h:158
double ErsatzV2_rescMesc_[nEntries_arr_]
Definition: ErsatzMEt.h:179
double T1MEt_
Definition: ErsatzMEt.h:143
double ErsatzV1_Mesc_[nEntries_arr_]
Definition: ErsatzMEt.h:178
double probe_pin_[nEntries_arr_]
Definition: ErsatzMEt.h:167
int etaWidth_
Definition: ErsatzMEt.h:133
double probe_sc_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:190
double TcMEt_
Definition: ErsatzMEt.h:143
double Z_rescY_[nEntries_arr_]
Definition: ErsatzMEt.h:169
double ErsatzV1T1Mt_[nEntries_arr_]
Definition: ErsatzMEt.h:175
double tag_hoe_[nEntries_arr_]
Definition: ErsatzMEt.h:160
int probe_nClus_[nEntries_arr_]
Definition: ErsatzMEt.h:149
double McElec_rescPt_[nEntries_arr_]
Definition: ErsatzMEt.h:184
edm::InputTag CaloMEtCollection_
Definition: ErsatzMEt.h:120
double Z_y_[nEntries_arr_]
Definition: ErsatzMEt.h:168
double mTPmax_
Definition: ErsatzMEt.h:125
double probe_scV3_E_[nEntries_arr_]
Definition: ErsatzMEt.h:193
int McElec_nZmum_
Definition: ErsatzMEt.h:145
double EndCapEtaMin_
Definition: ErsatzMEt.h:126
int nProbes_
Definition: ErsatzMEt.h:142
double probe_e5x5_[nEntries_arr_]
Definition: ErsatzMEt.h:166
double McZ_y_
Definition: ErsatzMEt.h:146
double T1MEtphi_
Definition: ErsatzMEt.h:144
edm::ParameterSet m5x5_fCorrPSet_
Definition: ErsatzMEt.h:124
double PfMEt_
Definition: ErsatzMEt.h:143
int tag_q_[nEntries_arr_]
Definition: ErsatzMEt.h:150
double probe_sc_rawE_[nEntries_arr_]
Definition: ErsatzMEt.h:191
double ErsatzV3CaloMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:173
Definition: MET.h:32
double ErsatzV1PfMt_[nEntries_arr_]
Definition: ErsatzMEt.h:176
int nTags_
Definition: ErsatzMEt.h:142
double Z_rescEta_[nEntries_arr_]
Definition: ErsatzMEt.h:169
double McZ_rescEta_
Definition: ErsatzMEt.h:147
double ErsatzV3CaloMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:173
double PfMEtphi_
Definition: ErsatzMEt.h:144
double McElec_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:183
double probe_e1x5Max_[nEntries_arr_]
Definition: ErsatzMEt.h:166
double ErsatzV3_rescMesc_[nEntries_arr_]
Definition: ErsatzMEt.h:180
double Z_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:168
double probe_rescPt_[nEntries_arr_]
Definition: ErsatzMEt.h:163
virtual void beginJob()
Definition: ErsatzMEt.cc:73
edm::InputTag HybridScCollection_
Definition: ErsatzMEt.h:118
double ErsatzV1T1MEt_[nEntries_arr_]
Definition: ErsatzMEt.h:175
double McZ_rescM_
Definition: ErsatzMEt.h:147
double McProbe_rescPt_[nEntries_arr_]
Definition: ErsatzMEt.h:186
double McZ_rescPhi_
Definition: ErsatzMEt.h:147
double probe_d_MCE_SCE_[nEntries_arr_]
Definition: ErsatzMEt.h:189
double CaloMEtphi_
Definition: ErsatzMEt.h:144
double ErsatzV1CaloMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:171
double McElec_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:183
double probe_dPhiIn_[nEntries_arr_]
Definition: ErsatzMEt.h:164
std::string ProcessName_
Definition: ErsatzMEt.h:123
double ErsatzV2_Mesc_[nEntries_arr_]
Definition: ErsatzMEt.h:179
edm::InputTag PfMEtCollection_
Definition: ErsatzMEt.h:120
double probe_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:162
double probe_scV2_E_[nEntries_arr_]
Definition: ErsatzMEt.h:192
double probe_rescPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:163
double McZ_phi_
Definition: ErsatzMEt.h:146
double tag_rescPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:156
edm::ESHandle< CaloGeometry > geoHandle_
Definition: ErsatzMEt.h:138
double tag_dEtaIn_[nEntries_arr_]
Definition: ErsatzMEt.h:157
double ErsatzV1CaloMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:171
double McZ_eta_
Definition: ErsatzMEt.h:146
bool isInFiducial(double)
Definition: ErsatzMEt.cc:938
double ErsatzV3_Mesc_[nEntries_arr_]
Definition: ErsatzMEt.h:180
bool isInBarrel(double)
Definition: ErsatzMEt.cc:928
double ErsatzV1PfMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:176
double tag_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:151
double tag_sIhIh_[nEntries_arr_]
Definition: ErsatzMEt.h:157
double probe_dEtaIn_[nEntries_arr_]
Definition: ErsatzMEt.h:164
double tag_rescPt_[nEntries_arr_]
Definition: ErsatzMEt.h:156
double tag_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:151
double Z_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:168
double McProbe_rescPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:186
int iComb_
Definition: ErsatzMEt.h:196
virtual void endJob()
Definition: ErsatzMEt.cc:944
edm::InputTag T1MEtCollection_
Definition: ErsatzMEt.h:120
double ErsatzV1TcMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:177
double probe_sc_E_[nEntries_arr_]
Definition: ErsatzMEt.h:191
edm::InputTag CaloTowerCollection_
Definition: ErsatzMEt.h:121
int McElec_nFinal_
Definition: ErsatzMEt.h:145
edm::InputTag TcMEtCollection_
Definition: ErsatzMEt.h:120
double ErsatzV4_rescMesc_[nEntries_arr_]
Definition: ErsatzMEt.h:181
double ErsatzV1PfMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:176
int probe_q_[nEntries_arr_]
Definition: ErsatzMEt.h:161
double tag_pin_[nEntries_arr_]
Definition: ErsatzMEt.h:160
double McZ_rescPt_
Definition: ErsatzMEt.h:147
double McZ_m_
Definition: ErsatzMEt.h:146
double Z_rescPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:169
HLTConfigProvider hltConfig_
Definition: ErsatzMEt.h:136
double ErsatzV1TcMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:177
double ErsatzV2CaloMt_[nEntries_arr_]
Definition: ErsatzMEt.h:172
double EndCapEtaMax_
Definition: ErsatzMEt.h:126
reco::MET ersatzFabrik(const reco::GsfElectronRef &, const reco::SuperCluster &, const reco::MET &, const int)
Definition: ErsatzMEt.cc:719
double probe_sc_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:190
double McElecProbe_dEta_[nEntries_arr_]
Definition: ErsatzMEt.h:187
double tag_e5x5_[nEntries_arr_]
Definition: ErsatzMEt.h:159
double probe_pout_[nEntries_arr_]
Definition: ErsatzMEt.h:167
edm::InputTag ElectronCollection_
Definition: ErsatzMEt.h:118
double ErsatzV4CaloMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:174
double tag_eop_[nEntries_arr_]
Definition: ErsatzMEt.h:160
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: ErsatzMEt.cc:218
bool isInEndCap(double)
Definition: ErsatzMEt.cc:933
std::map< reco::GsfElectronRef, reco::GsfElectronRef > probeFinder(const std::vector< reco::GsfElectronRef > &, const edm::Handle< reco::GsfElectronCollection >)
Definition: ErsatzMEt.cc:684
TTree * t_
Definition: ErsatzMEt.h:141
double Z_rescPt_[nEntries_arr_]
Definition: ErsatzMEt.h:169
double tag_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:151
double Z_probe_dPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:170
double McProbe_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:185
double probe_rescEta_[nEntries_arr_]
Definition: ErsatzMEt.h:163
double mW_
Definition: ErsatzMEt.h:125
edm::InputTag eIdRobust_
Definition: ErsatzMEt.h:119
double CaloMEt_
Definition: ErsatzMEt.h:143
edm::ESHandle< CaloTopology > pTopology_
Definition: ErsatzMEt.h:139
double ErsatzV2CaloMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:172
std::string TriggerName_
Definition: ErsatzMEt.h:123
double McElecProbe_dPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:187
#define nEntries_arr_
Definition: ErsatzMEt.h:86
double probe_scV4_E_[nEntries_arr_]
Definition: ErsatzMEt.h:194
double tag_pout_[nEntries_arr_]
Definition: ErsatzMEt.h:160
double TcMEtphi_
Definition: ErsatzMEt.h:144
double tag_e1x5Max_[nEntries_arr_]
Definition: ErsatzMEt.h:159