CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
WenuPlots.h
Go to the documentation of this file.
1 #ifndef WenuPlots_H
2 #define WenuPlots_H
3 
4 #include <memory>
5 
8 
18 
19 //#include "DataFormats/BeamSpot/interface/BeamSpot.h"
20 
21 #include <vector>
22 #include <iostream>
23 #include "TFile.h"
24 #include "TTree.h"
25 #include "TString.h"
26 #include "TH1F.h"
27 #include "TMath.h"
28 
29 //
30 // class decleration
31 //
32 
33 class WenuPlots : public edm::EDAnalyzer {
34  public:
35  explicit WenuPlots(const edm::ParameterSet&);
36  ~WenuPlots();
37 
38 
39  private:
40  virtual void beginJob() ;
41  virtual void analyze(const edm::Event&, const edm::EventSetup&);
42  virtual void endJob() ;
43 
44  // ----------member data ---------------------------
45  Bool_t CheckCuts( const pat::Electron * ele);
46  Bool_t CheckCut( const pat::Electron *wenu, Int_t i);
47  Bool_t CheckCutsInverse(const pat::Electron *ele);
48  Bool_t CheckCutInv( const pat::Electron *wenu, Int_t i);
49  Bool_t CheckCutsNminusOne(const pat::Electron *ele, Int_t jj);
50  Double_t ReturnCandVar(const pat::Electron *ele, Int_t i);
51  Bool_t PassPreselectionCriteria(const pat::Electron *ele);
52  // for the extra identifications and selections
53  Bool_t usePrecalcID_;
54  std::string usePrecalcIDSign_;
55  std::string usePrecalcIDType_;
57  // for extra preselection criteria:
63  std::string outputFile_;
69  TFile *histofile;
70  //
71  // math::XYZPoint bspotPosition_; // comment out only if you don't use pat
72  //
73  // the histograms ********************
74 
75  TH1F *h_met;
77  TH1F *h_mt;
78  TH1F *h_mt_inverse;
79 
80  TH1F *h_met_EB;
82  TH1F *h_mt_EB;
84 
85  TH1F *h_met_EE;
87  TH1F *h_mt_EE;
89 
90 
91  TH1F *h_scEt;
92  TH1F *h_scEta;
93  TH1F *h_scPhi;
94 
95  TH1F *h_EB_trkiso;
96  TH1F *h_EB_ecaliso;
97  TH1F *h_EB_hcaliso;
99  TH1F *h_EB_dphi;
100  TH1F *h_EB_deta;
101  TH1F *h_EB_HoE;
102 
103  TH1F *h_EE_trkiso;
107  TH1F *h_EE_dphi;
108  TH1F *h_EE_deta;
109  TH1F *h_EE_HoE;
110 
111  //
114  // ***********************************
115  //
116  // the selection cuts
117  Double_t trackIso_EB_;
118  Double_t ecalIso_EB_;
119  Double_t hcalIso_EB_;
120  //
121  Double_t trackIso_EE_;
122  Double_t ecalIso_EE_;
123  Double_t hcalIso_EE_;
124  //
125  Double_t sihih_EB_;
126  Double_t deta_EB_;
127  Double_t dphi_EB_;
128  Double_t hoe_EB_;
129  Double_t cIso_EB_;
130  Double_t tip_bspot_EB_;
131  Double_t eop_EB_;
132  //
133  Double_t sihih_EE_;
134  Double_t deta_EE_;
135  Double_t dphi_EE_;
136  Double_t hoe_EE_;
137  Double_t cIso_EE_;
138  Double_t tip_bspot_EE_;
139  Double_t eop_EE_;
140  //
142  Double_t ecalIsoUser_EB_;
143  Double_t hcalIsoUser_EB_;
145  Double_t ecalIsoUser_EE_;
146  Double_t hcalIsoUser_EE_;
147  //
151  //
155  //
156  Bool_t sihih_EB_inv;
157  Bool_t deta_EB_inv;
158  Bool_t dphi_EB_inv;
159  Bool_t hoe_EB_inv;
160  Bool_t cIso_EB_inv;
162  Bool_t eop_EB_inv;
163  //
164  Bool_t sihih_EE_inv;
165  Bool_t deta_EE_inv;
166  Bool_t dphi_EE_inv;
167  Bool_t hoe_EE_inv;
168  Bool_t cIso_EE_inv;
170  Bool_t eop_EE_inv;
171  //
178  //
179  //
181  //
182  std::vector<Double_t> CutVars_;
183  std::vector<Bool_t> InvVars_;
184  //
185  // variables related to the VBTF root tuples:
186  //
188  Long64_t eventNumber;
190  Float_t ele_sc_gsf_et;
196  Float_t ele_vx, ele_vy, ele_vz;
197  Float_t ele_pin, ele_pout;
198  Float_t pv_x, pv_y, pv_z;
205  Float_t calojet_et[5];
206  Float_t calojet_eta[5];
207  Float_t calojet_phi[5];
208  Float_t pfjet_et[5];
209  Float_t pfjet_eta[5];
210  Float_t pfjet_phi[5];
212  Float_t ele2nd_sc_eta;
213  Float_t ele2nd_sc_phi;
214  Float_t ele2nd_sc_rho;
217  Float_t ele2nd_pin;
218  Float_t ele2nd_pout;
224 
234  Int_t DatasetTag_;
235  // for the 2nd electron storage
237  Float_t ele2nd_cand_et;
245  std::vector<Int_t> VtxTracksSize;
246  std::vector<Float_t> VtxNormalizedChi2;
247  std::vector<Int_t> VtxTracksSizeBS;
248  std::vector<Float_t> VtxNormalizedChi2BS;
249  Float_t pvbs_x, pvbs_y, pvbs_z;
251 };
252 
253 #endif
Float_t ele_vy
Definition: WenuPlots.h:196
TH1F * h_mt_inverse_EE
Definition: WenuPlots.h:88
Float_t ele2nd_cr_dcot
Definition: WenuPlots.h:240
Double_t trackIsoUser_EB_
Definition: WenuPlots.h:141
Int_t ele2nd_ctfCharge
Definition: WenuPlots.h:242
Float_t ele2nd_id_deta
Definition: WenuPlots.h:239
int i
Definition: DBlmapReader.cc:9
Float_t ele2nd_sc_gsf_et
Definition: WenuPlots.h:211
Int_t maxNumberOfExpectedMissingHits_
Definition: WenuPlots.h:61
Double_t cIso_EE_
Definition: WenuPlots.h:137
Double_t trackIso_EB_
Definition: WenuPlots.h:117
Bool_t PassPreselectionCriteria(const pat::Electron *ele)
Definition: WenuPlots.cc:819
Float_t ele_iso_ecal
Definition: WenuPlots.h:192
std::string WENU_VBTFselectionFileName_
Definition: WenuPlots.h:229
TH1F * h_met_inverse_EB
Definition: WenuPlots.h:81
Bool_t hcalIso_EE_inv
Definition: WenuPlots.h:154
edm::InputTag wenuCollectionTag_
Definition: WenuPlots.h:64
Bool_t deta_EE_inv
Definition: WenuPlots.h:165
Float_t event_caloMET
Definition: WenuPlots.h:201
Float_t ele_iso_hcal
Definition: WenuPlots.h:192
Float_t ele2nd_tip_bs
Definition: WenuPlots.h:243
Float_t ele2nd_id_hoe
Definition: WenuPlots.h:239
Double_t eop_EE_
Definition: WenuPlots.h:139
Float_t ele_eop
Definition: WenuPlots.h:200
Bool_t ecalIso_EB_inv
Definition: WenuPlots.h:149
TH1F * h_EE_trkiso
Definition: WenuPlots.h:103
Double_t trackIsoUser_EE_
Definition: WenuPlots.h:144
Int_t nBarrelVars_
Definition: WenuPlots.h:180
Float_t pfjet_eta[5]
Definition: WenuPlots.h:209
Float_t ele2nd_eop
Definition: WenuPlots.h:243
TH1F * h_EB_HoE
Definition: WenuPlots.h:101
TH1F * h_met_EB
Definition: WenuPlots.h:80
Float_t pvbs_z
Definition: WenuPlots.h:249
Int_t lumiSection
Definition: WenuPlots.h:187
Float_t event_tcMET_phi
Definition: WenuPlots.h:203
Int_t ele2nd_passes_selection
Definition: WenuPlots.h:219
TH1F * h_mt
Definition: WenuPlots.h:77
Float_t ele_vz
Definition: WenuPlots.h:196
Double_t cIso_EB_
Definition: WenuPlots.h:129
Float_t ele_pout
Definition: WenuPlots.h:197
Float_t ele_sc_rho
Definition: WenuPlots.h:189
Int_t ele2nd_scPixCharge
Definition: WenuPlots.h:242
Bool_t tip_bspot_EE_inv
Definition: WenuPlots.h:169
Float_t event_caloMET_phi
Definition: WenuPlots.h:203
Float_t ele_id_dphi
Definition: WenuPlots.h:193
TH1F * h_trackIso_ee_NmOne
Definition: WenuPlots.h:113
Bool_t tip_bspot_EB_inv
Definition: WenuPlots.h:161
Float_t ele_cr_dist
Definition: WenuPlots.h:194
std::string WENU_VBTFpreseleFileName_
Definition: WenuPlots.h:230
WenuPlots(const edm::ParameterSet &)
Definition: WenuPlots.cc:61
TH1F * h_scPhi
Definition: WenuPlots.h:93
Bool_t CheckCutInv(const pat::Electron *wenu, Int_t i)
Definition: WenuPlots.cc:778
Int_t ele2nd_ecalDriven
Definition: WenuPlots.h:220
Double_t ecalIsoUser_EB_
Definition: WenuPlots.h:142
Int_t ele_gsfCharge
Definition: WenuPlots.h:199
Float_t calojet_eta[5]
Definition: WenuPlots.h:206
Bool_t includeJetInformationInNtuples_
Definition: WenuPlots.h:231
Int_t runNumber
Definition: WenuPlots.h:187
Double_t dphi_EE_
Definition: WenuPlots.h:135
Bool_t sihih_EE_inv
Definition: WenuPlots.h:164
TTree * vbtfSele_tree
Definition: WenuPlots.h:227
TH1F * h_EB_trkiso
Definition: WenuPlots.h:95
Float_t ele2nd_pout
Definition: WenuPlots.h:218
Bool_t dphi_EE_inv
Definition: WenuPlots.h:166
Bool_t hcalIsoUser_EE_inv
Definition: WenuPlots.h:177
Float_t pv_x
Definition: WenuPlots.h:198
Bool_t usePreselection_
Definition: WenuPlots.h:62
Float_t ele2nd_vy
Definition: WenuPlots.h:241
Float_t event_caloSumEt
Definition: WenuPlots.h:202
Double_t tip_bspot_EB_
Definition: WenuPlots.h:130
Float_t ele2nd_sc_eta
Definition: WenuPlots.h:212
Bool_t CheckCutsInverse(const pat::Electron *ele)
Definition: WenuPlots.cc:752
Float_t ele2nd_sc_phi
Definition: WenuPlots.h:213
Bool_t ecalIso_EE_inv
Definition: WenuPlots.h:153
Bool_t CheckCuts(const pat::Electron *ele)
Definition: WenuPlots.cc:723
std::vector< Double_t > CutVars_
Definition: WenuPlots.h:182
Float_t ele_sc_eta
Definition: WenuPlots.h:189
Double_t deta_EE_
Definition: WenuPlots.h:134
TH1F * h_EE_sIetaIeta
Definition: WenuPlots.h:106
Float_t ele2nd_vx
Definition: WenuPlots.h:241
Float_t ele2nd_id_sihih
Definition: WenuPlots.h:239
Float_t event_pfMET
Definition: WenuPlots.h:201
Bool_t useExpectedMissingHits_
Definition: WenuPlots.h:60
TH1F * h_EB_sIetaIeta
Definition: WenuPlots.h:98
Int_t DatasetTag_
Definition: WenuPlots.h:234
Float_t ele2nd_cand_phi
Definition: WenuPlots.h:216
Double_t hcalIso_EB_
Definition: WenuPlots.h:119
std::string usePrecalcIDSign_
Definition: WenuPlots.h:54
Float_t pv_y
Definition: WenuPlots.h:198
Float_t ele_sc_phi
Definition: WenuPlots.h:189
Double_t trackIso_EE_
Definition: WenuPlots.h:121
TH1F * h_met_EE
Definition: WenuPlots.h:85
Double_t deta_EB_
Definition: WenuPlots.h:126
TH1F * h_met
Definition: WenuPlots.h:75
TH1F * h_EB_ecaliso
Definition: WenuPlots.h:96
Float_t ele_id_deta
Definition: WenuPlots.h:193
Double_t hcalIsoUser_EB_
Definition: WenuPlots.h:143
TH1F * h_scEt
Definition: WenuPlots.h:91
Double_t hcalIso_EE_
Definition: WenuPlots.h:123
Float_t ele2nd_cand_et
Definition: WenuPlots.h:237
Float_t ele_cand_et
Definition: WenuPlots.h:191
Bool_t deta_EB_inv
Definition: WenuPlots.h:157
TFile * WENU_VBTFselectionFile_
Definition: WenuPlots.h:226
Bool_t hcalIsoUser_EB_inv
Definition: WenuPlots.h:174
Double_t sihih_EE_
Definition: WenuPlots.h:133
virtual void beginJob()
Definition: WenuPlots.cc:861
TH1F * h_EE_ecaliso
Definition: WenuPlots.h:104
TH1F * h_EB_hcaliso
Definition: WenuPlots.h:97
Float_t ele2nd_pin
Definition: WenuPlots.h:217
TH1F * h_met_inverse
Definition: WenuPlots.h:76
Float_t ele2nd_tip_pvbs
Definition: WenuPlots.h:250
Bool_t ecalIsoUser_EE_inv
Definition: WenuPlots.h:176
Int_t event_triggerDecision
Definition: WenuPlots.h:222
Float_t ele2nd_hltmatched_dr
Definition: WenuPlots.h:244
Bool_t eop_EE_inv
Definition: WenuPlots.h:170
edm::InputTag PrimaryVerticesCollectionBS_
Definition: WenuPlots.h:68
Float_t pvbs_x
Definition: WenuPlots.h:249
Float_t ele2nd_sc_rho
Definition: WenuPlots.h:214
Double_t ecalIso_EB_
Definition: WenuPlots.h:118
Float_t ele2nd_cand_eta
Definition: WenuPlots.h:215
Float_t ele_hltmatched_dr
Definition: WenuPlots.h:221
Float_t ele_vx
Definition: WenuPlots.h:196
Double_t eop_EB_
Definition: WenuPlots.h:131
TH1F * h_met_inverse_EE
Definition: WenuPlots.h:86
TH1F * h_mt_inverse
Definition: WenuPlots.h:78
Double_t usePrecalcIDValue_
Definition: WenuPlots.h:56
TH1F * h_EE_dphi
Definition: WenuPlots.h:107
Double_t hcalIsoUser_EE_
Definition: WenuPlots.h:146
Bool_t trackIso_EE_inv
Definition: WenuPlots.h:152
Float_t ele_tip_pvbs
Definition: WenuPlots.h:250
edm::InputTag caloJetCollectionTag_
Definition: WenuPlots.h:65
Float_t ele_id_hoe
Definition: WenuPlots.h:193
Int_t ele_scPixCharge
Definition: WenuPlots.h:199
std::vector< Int_t > VtxTracksSizeBS
Definition: WenuPlots.h:247
Bool_t eop_EB_inv
Definition: WenuPlots.h:162
Bool_t storeAllSecondElectronVariables_
Definition: WenuPlots.h:236
Bool_t useConversionRejection_
Definition: WenuPlots.h:59
Float_t calojet_phi[5]
Definition: WenuPlots.h:207
std::vector< Int_t > VtxTracksSize
Definition: WenuPlots.h:245
Double_t ReturnCandVar(const pat::Electron *ele, Int_t i)
Definition: WenuPlots.cc:792
TH1F * h_EB_deta
Definition: WenuPlots.h:100
Float_t ele_tip_pv
Definition: WenuPlots.h:200
TFile * WENU_VBTFpreseleFile_
Definition: WenuPlots.h:225
TH1F * h_scEta
Definition: WenuPlots.h:92
Float_t ele2nd_iso_hcal
Definition: WenuPlots.h:238
Float_t pfjet_phi[5]
Definition: WenuPlots.h:210
Float_t ele_iso_track
Definition: WenuPlots.h:192
Int_t ele2nd_gsfCharge
Definition: WenuPlots.h:242
TTree * vbtfPresele_tree
Definition: WenuPlots.h:228
Int_t event_datasetTag
Definition: WenuPlots.h:223
Float_t ele_pin
Definition: WenuPlots.h:197
TH1F * h_EB_dphi
Definition: WenuPlots.h:99
Float_t event_tcSumEt
Definition: WenuPlots.h:202
Int_t ele_cr_mhitsinner
Definition: WenuPlots.h:195
TH1F * h_trackIso_eb_NmOne
Definition: WenuPlots.h:112
Float_t pv_z
Definition: WenuPlots.h:198
Bool_t sihih_EB_inv
Definition: WenuPlots.h:156
Float_t ele2nd_iso_track
Definition: WenuPlots.h:238
Bool_t CheckCutsNminusOne(const pat::Electron *ele, Int_t jj)
Definition: WenuPlots.cc:761
edm::InputTag PrimaryVerticesCollection_
Definition: WenuPlots.h:67
Float_t ele_cand_eta
Definition: WenuPlots.h:191
Bool_t cIso_EB_inv
Definition: WenuPlots.h:160
Bool_t trackIsoUser_EE_inv
Definition: WenuPlots.h:175
Float_t pfjet_et[5]
Definition: WenuPlots.h:208
Bool_t hcalIso_EB_inv
Definition: WenuPlots.h:150
Bool_t storeExtraInformation_
Definition: WenuPlots.h:232
Bool_t hoe_EE_inv
Definition: WenuPlots.h:167
Float_t ele2nd_vz
Definition: WenuPlots.h:241
Int_t ele_ctfCharge
Definition: WenuPlots.h:199
Analysis-level electron class.
Definition: Electron.h:52
Float_t event_pfMT
Definition: WenuPlots.h:204
virtual void endJob()
Definition: WenuPlots.cc:1181
Float_t event_tcMT
Definition: WenuPlots.h:204
Bool_t useValidFirstPXBHit_
Definition: WenuPlots.h:58
edm::InputTag pfJetCollectionTag_
Definition: WenuPlots.h:66
std::string usePrecalcIDType_
Definition: WenuPlots.h:55
Float_t ele_cand_phi
Definition: WenuPlots.h:191
Bool_t ecalIsoUser_EB_inv
Definition: WenuPlots.h:173
TFile * histofile
Definition: WenuPlots.h:69
TH1F * h_EE_deta
Definition: WenuPlots.h:108
TH1F * h_mt_inverse_EB
Definition: WenuPlots.h:83
Double_t DRJetFromElectron_
Definition: WenuPlots.h:233
Float_t ele2nd_tip_pv
Definition: WenuPlots.h:243
Float_t ele2nd_cr_dist
Definition: WenuPlots.h:240
Float_t event_tcMET
Definition: WenuPlots.h:201
Float_t event_pfMET_phi
Definition: WenuPlots.h:203
Float_t pvbs_y
Definition: WenuPlots.h:249
Bool_t cIso_EE_inv
Definition: WenuPlots.h:168
Float_t event_caloMT
Definition: WenuPlots.h:204
std::string outputFile_
Definition: WenuPlots.h:63
TH1F * h_mt_EB
Definition: WenuPlots.h:82
Float_t ele2nd_id_dphi
Definition: WenuPlots.h:239
Bool_t dphi_EB_inv
Definition: WenuPlots.h:158
Float_t calojet_et[5]
Definition: WenuPlots.h:205
Double_t hoe_EB_
Definition: WenuPlots.h:128
Float_t ele_id_sihih
Definition: WenuPlots.h:193
Bool_t trackIsoUser_EB_inv
Definition: WenuPlots.h:172
Float_t ele_tip_bs
Definition: WenuPlots.h:200
std::vector< Float_t > VtxNormalizedChi2BS
Definition: WenuPlots.h:248
TH1F * h_mt_EE
Definition: WenuPlots.h:87
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: WenuPlots.cc:205
Int_t ele2nd_cr_mhitsinner
Definition: WenuPlots.h:242
Double_t tip_bspot_EE_
Definition: WenuPlots.h:138
Double_t dphi_EB_
Definition: WenuPlots.h:127
Double_t sihih_EB_
Definition: WenuPlots.h:125
Float_t ele2nd_iso_ecal
Definition: WenuPlots.h:238
std::vector< Bool_t > InvVars_
Definition: WenuPlots.h:183
Float_t ele_cr_dcot
Definition: WenuPlots.h:194
Bool_t trackIso_EB_inv
Definition: WenuPlots.h:148
Double_t ecalIsoUser_EE_
Definition: WenuPlots.h:145
Float_t ele_sc_energy
Definition: WenuPlots.h:189
Double_t ecalIso_EE_
Definition: WenuPlots.h:122
TH1F * h_EE_HoE
Definition: WenuPlots.h:109
Float_t ele_sc_gsf_et
Definition: WenuPlots.h:190
Bool_t usePrecalcID_
Definition: WenuPlots.h:53
TH1F * h_EE_hcaliso
Definition: WenuPlots.h:105
Float_t event_pfSumEt
Definition: WenuPlots.h:202
Bool_t hoe_EB_inv
Definition: WenuPlots.h:159
Double_t hoe_EE_
Definition: WenuPlots.h:136
std::vector< Float_t > VtxNormalizedChi2
Definition: WenuPlots.h:246
Long64_t eventNumber
Definition: WenuPlots.h:188
Bool_t CheckCut(const pat::Electron *wenu, Int_t i)
Definition: WenuPlots.cc:770