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