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