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 ---------------------------
130  double mW_, mZ_, mTPmin_, mTPmax_;
132 
135 
136  std::vector<double> CutVector_;
137 
140 // std::vector<double> EtaWeights_;
142 
145  //Output variables
146  TTree* t_;
153 
157  //double tag_caloV1_rescPt_[nEntries_arr_], tag_caloV1_rescEta_[nEntries_arr_], tag_caloV1_rescPhi_[nEntries_arr_];
158  //double tag_caloV2_rescPt_[nEntries_arr_], tag_caloV2_rescEta_[nEntries_arr_], tag_caloV2_rescPhi_[nEntries_arr_];
159  //double tag_caloV3_rescPt_[nEntries_arr_], tag_caloV3_rescEta_[nEntries_arr_], tag_caloV3_rescPhi_[nEntries_arr_];
160  //double tag_caloV4_rescPt_[nEntries_arr_], tag_caloV4_rescEta_[nEntries_arr_], tag_caloV4_rescPhi_[nEntries_arr_];
187 
193 
200 
201  int iComb_;
202 };
203 #endif
204 
double tag_ecalIso_[nEntries_arr_]
Definition: ErsatzMEt.h:163
double McProbe_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:190
double probe_sIhIh_[nEntries_arr_]
Definition: ErsatzMEt.h:169
double McProbe_rescEta_[nEntries_arr_]
Definition: ErsatzMEt.h:191
double McElec_rescEta_[nEntries_arr_]
Definition: ErsatzMEt.h:189
double tag_rescEta_[nEntries_arr_]
Definition: ErsatzMEt.h:161
std::vector< double > CutVector_
Definition: ErsatzMEt.h:136
double tag_dPhiIn_[nEntries_arr_]
Definition: ErsatzMEt.h:162
double ErsatzV3CaloMt_[nEntries_arr_]
Definition: ErsatzMEt.h:178
ErsatzMEt(const edm::ParameterSet &)
Definition: ErsatzMEt.cc:4
double probe_trckIso_[nEntries_arr_]
Definition: ErsatzMEt.h:170
double mZ_
Definition: ErsatzMEt.h:130
double probe_sc_nClus_[nEntries_arr_]
Definition: ErsatzMEt.h:196
double McZ_pt_
Definition: ErsatzMEt.h:151
double ErsatzV1TcMt_[nEntries_arr_]
Definition: ErsatzMEt.h:182
edm::EDGetTokenT< trigger::TriggerEvent > TriggerEvent_
Definition: ErsatzMEt.h:125
double probe_ecalIso_[nEntries_arr_]
Definition: ErsatzMEt.h:170
double McElec_rescPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:189
double probe_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:167
bool HLTPathCheck_
Definition: ErsatzMEt.h:139
int phiWidth_
Definition: ErsatzMEt.h:138
edm::ParameterSet hyb_fCorrPSet_
Definition: ErsatzMEt.h:129
double ErsatzV2CaloMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:177
double ErsatzV1CaloMt_[nEntries_arr_]
Definition: ErsatzMEt.h:176
double ErsatzV4CaloMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:179
double ErsatzV4CaloMt_[nEntries_arr_]
Definition: ErsatzMEt.h:179
double probe_sc_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:195
double McElec_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:188
double BarrelEtaMax_
Definition: ErsatzMEt.h:131
double probe_hoe_[nEntries_arr_]
Definition: ErsatzMEt.h:172
double probe_hcalIso_[nEntries_arr_]
Definition: ErsatzMEt.h:170
edm::InputTag TriggerPath_
Definition: ErsatzMEt.h:127
double ErsatzV4_Mesc_[nEntries_arr_]
Definition: ErsatzMEt.h:186
double tag_e2x5Max_[nEntries_arr_]
Definition: ErsatzMEt.h:164
double McProbe_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:190
double probe_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:167
double McElecProbe_dR_[nEntries_arr_]
Definition: ErsatzMEt.h:192
double ErsatzV1T1MEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:180
double Z_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:173
edm::EDGetTokenT< reco::GenMETCollection > GenMEtCollection_
Definition: ErsatzMEt.h:120
double Z_m_[nEntries_arr_]
Definition: ErsatzMEt.h:173
bool Zevent_
Definition: ErsatzMEt.h:139
double McZ_rescY_
Definition: ErsatzMEt.h:152
double tag_hcalIso_[nEntries_arr_]
Definition: ErsatzMEt.h:163
~ErsatzMEt()
Definition: ErsatzMEt.cc:68
double ErsatzV1_rescMesc_[nEntries_arr_]
Definition: ErsatzMEt.h:183
double probe_eop_[nEntries_arr_]
Definition: ErsatzMEt.h:172
double Z_rescM_[nEntries_arr_]
Definition: ErsatzMEt.h:174
double mTPmin_
Definition: ErsatzMEt.h:130
double probe_e2x5Max_[nEntries_arr_]
Definition: ErsatzMEt.h:171
double tag_trckIso_[nEntries_arr_]
Definition: ErsatzMEt.h:163
double ErsatzV2_rescMesc_[nEntries_arr_]
Definition: ErsatzMEt.h:184
double T1MEt_
Definition: ErsatzMEt.h:148
double ErsatzV1_Mesc_[nEntries_arr_]
Definition: ErsatzMEt.h:183
double probe_pin_[nEntries_arr_]
Definition: ErsatzMEt.h:172
int etaWidth_
Definition: ErsatzMEt.h:138
double probe_sc_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:195
double TcMEt_
Definition: ErsatzMEt.h:148
double Z_rescY_[nEntries_arr_]
Definition: ErsatzMEt.h:174
double ErsatzV1T1Mt_[nEntries_arr_]
Definition: ErsatzMEt.h:180
double tag_hoe_[nEntries_arr_]
Definition: ErsatzMEt.h:165
int probe_nClus_[nEntries_arr_]
Definition: ErsatzMEt.h:154
double McElec_rescPt_[nEntries_arr_]
Definition: ErsatzMEt.h:189
double Z_y_[nEntries_arr_]
Definition: ErsatzMEt.h:173
double mTPmax_
Definition: ErsatzMEt.h:130
double probe_scV3_E_[nEntries_arr_]
Definition: ErsatzMEt.h:198
int McElec_nZmum_
Definition: ErsatzMEt.h:150
double EndCapEtaMin_
Definition: ErsatzMEt.h:131
int nProbes_
Definition: ErsatzMEt.h:147
double probe_e5x5_[nEntries_arr_]
Definition: ErsatzMEt.h:171
double McZ_y_
Definition: ErsatzMEt.h:151
double T1MEtphi_
Definition: ErsatzMEt.h:149
edm::ParameterSet m5x5_fCorrPSet_
Definition: ErsatzMEt.h:129
double PfMEt_
Definition: ErsatzMEt.h:148
int tag_q_[nEntries_arr_]
Definition: ErsatzMEt.h:155
double probe_sc_rawE_[nEntries_arr_]
Definition: ErsatzMEt.h:196
double ErsatzV3CaloMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:178
Definition: MET.h:39
double ErsatzV1PfMt_[nEntries_arr_]
Definition: ErsatzMEt.h:181
int nTags_
Definition: ErsatzMEt.h:147
double Z_rescEta_[nEntries_arr_]
Definition: ErsatzMEt.h:174
double McZ_rescEta_
Definition: ErsatzMEt.h:152
double ErsatzV3CaloMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:178
double PfMEtphi_
Definition: ErsatzMEt.h:149
double McElec_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:188
double probe_e1x5Max_[nEntries_arr_]
Definition: ErsatzMEt.h:171
double ErsatzV3_rescMesc_[nEntries_arr_]
Definition: ErsatzMEt.h:185
double Z_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:173
double probe_rescPt_[nEntries_arr_]
Definition: ErsatzMEt.h:168
virtual void beginJob()
Definition: ErsatzMEt.cc:73
double ErsatzV1T1MEt_[nEntries_arr_]
Definition: ErsatzMEt.h:180
double McZ_rescM_
Definition: ErsatzMEt.h:152
double McProbe_rescPt_[nEntries_arr_]
Definition: ErsatzMEt.h:191
double McZ_rescPhi_
Definition: ErsatzMEt.h:152
double probe_d_MCE_SCE_[nEntries_arr_]
Definition: ErsatzMEt.h:194
double CaloMEtphi_
Definition: ErsatzMEt.h:149
double ErsatzV1CaloMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:176
double McElec_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:188
double probe_dPhiIn_[nEntries_arr_]
Definition: ErsatzMEt.h:169
std::string ProcessName_
Definition: ErsatzMEt.h:128
double ErsatzV2_Mesc_[nEntries_arr_]
Definition: ErsatzMEt.h:184
double probe_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:167
double probe_scV2_E_[nEntries_arr_]
Definition: ErsatzMEt.h:197
double probe_rescPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:168
double McZ_phi_
Definition: ErsatzMEt.h:151
double tag_rescPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:161
edm::ESHandle< CaloGeometry > geoHandle_
Definition: ErsatzMEt.h:143
edm::EDGetTokenT< reco::PFMETCollection > PfMEtCollection_
Definition: ErsatzMEt.h:123
double tag_dEtaIn_[nEntries_arr_]
Definition: ErsatzMEt.h:162
double ErsatzV1CaloMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:176
double McZ_eta_
Definition: ErsatzMEt.h:151
bool isInFiducial(double)
Definition: ErsatzMEt.cc:872
double ErsatzV3_Mesc_[nEntries_arr_]
Definition: ErsatzMEt.h:185
bool isInBarrel(double)
Definition: ErsatzMEt.cc:862
double ErsatzV1PfMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:181
double tag_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:156
edm::EDGetTokenT< edm::TriggerResults > TriggerResults_
Definition: ErsatzMEt.h:126
double tag_sIhIh_[nEntries_arr_]
Definition: ErsatzMEt.h:162
double probe_dEtaIn_[nEntries_arr_]
Definition: ErsatzMEt.h:169
double tag_rescPt_[nEntries_arr_]
Definition: ErsatzMEt.h:161
double tag_pt_[nEntries_arr_]
Definition: ErsatzMEt.h:156
double Z_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:173
double McProbe_rescPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:191
int iComb_
Definition: ErsatzMEt.h:201
virtual void endJob()
Definition: ErsatzMEt.cc:878
double ErsatzV1TcMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:182
double probe_sc_E_[nEntries_arr_]
Definition: ErsatzMEt.h:196
int McElec_nFinal_
Definition: ErsatzMEt.h:150
edm::EDGetTokenT< reco::SuperClusterCollection > HybridScCollection_
Definition: ErsatzMEt.h:118
double ErsatzV4_rescMesc_[nEntries_arr_]
Definition: ErsatzMEt.h:186
edm::EDGetTokenT< reco::GsfElectronCollection > ElectronCollection_
Definition: ErsatzMEt.h:117
double ErsatzV1PfMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:181
edm::EDGetTokenT< reco::GenParticleCollection > MCTruthCollection_
Definition: ErsatzMEt.h:116
edm::EDGetTokenT< reco::CaloMETCollection > CaloMEtCollection_
Definition: ErsatzMEt.h:121
int probe_q_[nEntries_arr_]
Definition: ErsatzMEt.h:166
double tag_pin_[nEntries_arr_]
Definition: ErsatzMEt.h:165
edm::EDGetTokenT< reco::SuperClusterCollection > M5x5ScCollection_
Definition: ErsatzMEt.h:119
double McZ_rescPt_
Definition: ErsatzMEt.h:152
double McZ_m_
Definition: ErsatzMEt.h:151
double Z_rescPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:174
HLTConfigProvider hltConfig_
Definition: ErsatzMEt.h:141
double ErsatzV1TcMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:182
double ErsatzV2CaloMt_[nEntries_arr_]
Definition: ErsatzMEt.h:177
double EndCapEtaMax_
Definition: ErsatzMEt.h:131
reco::MET ersatzFabrik(const reco::GsfElectronRef &, const reco::SuperCluster &, const reco::MET &, const int)
Definition: ErsatzMEt.cc:653
double probe_sc_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:195
double McElecProbe_dEta_[nEntries_arr_]
Definition: ErsatzMEt.h:192
double tag_e5x5_[nEntries_arr_]
Definition: ErsatzMEt.h:164
double probe_pout_[nEntries_arr_]
Definition: ErsatzMEt.h:172
double ErsatzV4CaloMEt_[nEntries_arr_]
Definition: ErsatzMEt.h:179
edm::EDGetTokenT< reco::METCollection > TcMEtCollection_
Definition: ErsatzMEt.h:124
double tag_eop_[nEntries_arr_]
Definition: ErsatzMEt.h:165
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: ErsatzMEt.cc:218
bool isInEndCap(double)
Definition: ErsatzMEt.cc:867
std::map< reco::GsfElectronRef, reco::GsfElectronRef > probeFinder(const std::vector< reco::GsfElectronRef > &, const edm::Handle< reco::GsfElectronCollection >)
Definition: ErsatzMEt.cc:618
TTree * t_
Definition: ErsatzMEt.h:146
double Z_rescPt_[nEntries_arr_]
Definition: ErsatzMEt.h:174
double tag_eta_[nEntries_arr_]
Definition: ErsatzMEt.h:156
double Z_probe_dPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:175
double McProbe_phi_[nEntries_arr_]
Definition: ErsatzMEt.h:190
double probe_rescEta_[nEntries_arr_]
Definition: ErsatzMEt.h:168
double mW_
Definition: ErsatzMEt.h:130
double CaloMEt_
Definition: ErsatzMEt.h:148
edm::ESHandle< CaloTopology > pTopology_
Definition: ErsatzMEt.h:144
double ErsatzV2CaloMEtPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:177
edm::EDGetTokenT< reco::METCollection > T1MEtCollection_
Definition: ErsatzMEt.h:122
std::string TriggerName_
Definition: ErsatzMEt.h:128
double McElecProbe_dPhi_[nEntries_arr_]
Definition: ErsatzMEt.h:192
#define nEntries_arr_
Definition: ErsatzMEt.h:85
double probe_scV4_E_[nEntries_arr_]
Definition: ErsatzMEt.h:199
double tag_pout_[nEntries_arr_]
Definition: ErsatzMEt.h:165
double TcMEtphi_
Definition: ErsatzMEt.h:149
double tag_e1x5Max_[nEntries_arr_]
Definition: ErsatzMEt.h:164