test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AdHocNTupler.h
Go to the documentation of this file.
14 
20 
25 
29 
32 
34 
35 #include "EGamma/EGammaAnalysisTools/src/PFIsolationEstimator.cc"
37 
38 //for conversion safe electron veto
40 
41 #include "CMGTools/External/interface/PileupJetIdentifier.h"
42 
43 class AdHocNTupler : public NTupler {
44  public:
45 
46  typedef std::vector< edm::Handle< edm::ValueMap<double> > > IsoDepositVals;
47 
48  AdHocNTupler (const edm::ParameterSet& iConfig){
49  edm::ParameterSet adHocPSet = iConfig.getParameter<edm::ParameterSet>("AdHocNPSet");
50 
51  if (adHocPSet.exists("useTFileService"))
52  useTFileService_=adHocPSet.getParameter<bool>("useTFileService");
53  else
54  useTFileService_=iConfig.getParameter<bool>("useTFileService");
55 
56  if (useTFileService_){
57  if (adHocPSet.exists("treeName")){
58  treeName_=adHocPSet.getParameter<std::string>("treeName");
59  ownTheTree_=true;
60  }
61  else{
62  treeName_=iConfig.getParameter<std::string>("treeName");
63  ownTheTree_=false;
64  }
65  }
66 
67 
68  trigger_prescalevalue = new std::vector<float>;
69  trigger_name = new std::vector<std::string>;
70  trigger_decision = new std::vector<float>;
71  trigger_lastfiltername = new std::vector<std::string>;
72  triggerobject_pt = new std::vector<std::vector<float> >;
73  triggerobject_px = new std::vector<std::vector<float> >;
74  triggerobject_py = new std::vector<std::vector<float> >;
75  triggerobject_pz = new std::vector<std::vector<float> >;
76  triggerobject_et = new std::vector<std::vector<float> >;
77  triggerobject_energy = new std::vector<std::vector<float> >;
78  triggerobject_phi = new std::vector<std::vector<float> >;
79  triggerobject_eta = new std::vector<std::vector<float> >;
80  triggerobject_collectionname = new std::vector<std::vector<std::string> >;
81  standalone_triggerobject_pt = new std::vector<float>;
82  standalone_triggerobject_px = new std::vector<float>;
83  standalone_triggerobject_py = new std::vector<float>;
84  standalone_triggerobject_pz = new std::vector<float>;
85  standalone_triggerobject_et = new std::vector<float>;
86  standalone_triggerobject_energy = new std::vector<float>;
87  standalone_triggerobject_phi = new std::vector<float>;
88  standalone_triggerobject_eta = new std::vector<float>;
89  standalone_triggerobject_collectionname = new std::vector<std::string>;
90  L1trigger_bit = new std::vector<float>;
91  L1trigger_techTrigger = new std::vector<float>;
92  L1trigger_prescalevalue = new std::vector<float>;
93  L1trigger_name = new std::vector<std::string>;
94  L1trigger_alias = new std::vector<std::string>;
95  L1trigger_decision = new std::vector<float>;
96  L1trigger_decision_nomask = new std::vector<float>;
97  els_conversion_dist = new std::vector<float>;
98  els_conversion_dcot = new std::vector<float>;
99  els_PFchargedHadronIsoR03 = new std::vector<float>;
100  els_PFphotonIsoR03 = new std::vector<float>;
101  els_PFneutralHadronIsoR03 = new std::vector<float>;
102  els_hasMatchedConversion = new std::vector<bool>;
103  pf_els_PFchargedHadronIsoR03 = new std::vector<float>;
104  pf_els_PFphotonIsoR03 = new std::vector<float>;
105  pf_els_PFneutralHadronIsoR03 = new std::vector<float>;
106  pf_els_hasMatchedConversion = new std::vector<bool>;
107  trk_nTOBTEC = new int;
108  trk_ratioAllTOBTEC = new float;
109  trk_ratioJetTOBTEC = new float;
110  hbhefilter_decision_ = new int;
111  cschalofilter_decision_ = new int;
112  ecalTPfilter_decision_ = new int;
113  ecalBEfilter_decision_ = new int;
114  scrapingVeto_decision_ = new int;
116  greedymuonfilter_decision_ = new int;
118  hcallaserfilter_decision_ = new int;
119  ecallaserfilter_decision_ = new int;
120  eenoisefilter_decision_ = new int;
121  eebadscfilter_decision_ = new int;
133  MPT_ = new float;
134  genHT_ = new float;
135  jets_AK5PFclean_corrL2L3_ = new std::vector<float>;
136  jets_AK5PFclean_corrL2L3Residual_ = new std::vector<float>;
137  jets_AK5PFclean_corrL1FastL2L3_ = new std::vector<float>;
138  jets_AK5PFclean_corrL1L2L3_ = new std::vector<float>;
139  jets_AK5PFclean_corrL1FastL2L3Residual_ = new std::vector<float>;
140  jets_AK5PFclean_corrL1L2L3Residual_ = new std::vector<float>;
141  jets_AK5PFclean_Uncert_ = new std::vector<float>;
142  PU_zpositions_ = new std::vector<std::vector<float> >;
143  PU_sumpT_lowpT_ = new std::vector<std::vector<float> >;
144  PU_sumpT_highpT_ = new std::vector<std::vector<float> >;
145  PU_ntrks_lowpT_ = new std::vector<std::vector<int> >;
146  PU_ntrks_highpT_ = new std::vector<std::vector<int> >;
147  PU_NumInteractions_ = new std::vector<int>;
148  PU_bunchCrossing_ = new std::vector<int>;
149  PU_TrueNumInteractions_ = new std::vector<float>;
150  rho_kt6PFJetsForIsolation2011_ = new float;
151  rho_kt6PFJetsForIsolation2012_ = new float;
152  pfmets_fullSignif_ = new float;
153  pfmets_fullSignifCov00_ = new float;
154  pfmets_fullSignifCov10_ = new float;
155  pfmets_fullSignifCov11_ = new float;
156  softjetUp_dMEx_ = new float;
157  softjetUp_dMEy_ = new float;
158  pdfweights_cteq_ = new std::vector<float>;
159  pdfweights_mstw_ = new std::vector<float>;
160  pdfweights_nnpdf_ = new std::vector<float>;
161  photon_chIsoValues = new std::vector<float>;
162  photon_phIsoValues = new std::vector<float>;
163  photon_nhIsoValues = new std::vector<float>;
164  photon_passElectronVeto = new std::vector<bool>;
165  //PU Jet ID vars
166  puJet_rejectionBeta = new std::vector<std::vector<float> >;
167  puJet_rejectionMVA = new std::vector<std::vector<float> >;
168  pfmets_fullSignif_2012_ = new float;
169  pfmets_fullSignifCov00_2012_ = new float;
170  pfmets_fullSignifCov10_2012_ = new float;
171  pfmets_fullSignifCov11_2012_ = new float;
172 
173  }
174 
176  delete trigger_prescalevalue;
177  delete trigger_name;
178  delete trigger_decision;
179  delete trigger_lastfiltername;
180  delete triggerobject_pt;
181  delete triggerobject_px;
182  delete triggerobject_py;
183  delete triggerobject_pz;
184  delete triggerobject_et;
185  delete triggerobject_energy;
186  delete triggerobject_phi;
187  delete triggerobject_eta;
198  delete L1trigger_bit;
199  delete L1trigger_techTrigger;
201  delete L1trigger_name;
202  delete L1trigger_alias;
203  delete L1trigger_decision;
205  delete els_conversion_dist;
206  delete els_conversion_dcot;
208  delete els_PFphotonIsoR03;
212  delete pf_els_PFphotonIsoR03;
215  delete trk_nTOBTEC;
216  delete trk_ratioAllTOBTEC;
217  delete trk_ratioJetTOBTEC;
218  delete hbhefilter_decision_;
220  delete ecalTPfilter_decision_;
221  delete ecalBEfilter_decision_;
222  delete scrapingVeto_decision_;
241  delete MPT_;
242  delete genHT_;
250  delete PU_zpositions_;
251  delete PU_sumpT_lowpT_;
252  delete PU_sumpT_highpT_;
253  delete PU_ntrks_lowpT_;
254  delete PU_ntrks_highpT_;
255  delete PU_NumInteractions_;
256  delete PU_bunchCrossing_;
260  delete pfmets_fullSignif_;
264  delete softjetUp_dMEx_;
265  delete softjetUp_dMEy_;
266  delete pdfweights_cteq_;
267  delete pdfweights_mstw_;
268  delete pdfweights_nnpdf_;
269  delete photon_chIsoValues;
270  delete photon_phIsoValues;
271  delete photon_nhIsoValues;
273  delete puJet_rejectionBeta;
274  delete puJet_rejectionMVA;
279 
280  }
281 
283  uint nLeaves=0;
284  if (useTFileService_){
286  if (ownTheTree_){
287  ownTheTree_=true;
288  tree_=fs->make<TTree>(treeName_.c_str(),"StringBasedNTupler tree");
289  }else{
290  TObject * object = fs->file().Get(treeName_.c_str());
291  if (!object){
292  ownTheTree_=true;
293  tree_=fs->make<TTree>(treeName_.c_str(),"StringBasedNTupler tree");
294  }
295  tree_=dynamic_cast<TTree*>(object);
296  if (!tree_){
297  ownTheTree_=true;
298  tree_=fs->make<TTree>(treeName_.c_str(),"StringBasedNTupler tree");
299  }
300  }
301 
302  //register the leaves by hand
303  tree_->Branch("trigger_prescalevalue",&trigger_prescalevalue);
304  tree_->Branch("trigger_name",&trigger_name);
305  tree_->Branch("trigger_decision",&trigger_decision);
306  tree_->Branch("trigger_lastfiltername",&trigger_lastfiltername);
307  tree_->Branch("triggerobject_pt",&triggerobject_pt);
308  tree_->Branch("triggerobject_px",&triggerobject_px);
309  tree_->Branch("triggerobject_py",&triggerobject_py);
310  tree_->Branch("triggerobject_pz",&triggerobject_pz);
311  tree_->Branch("triggerobject_et",&triggerobject_et);
312  tree_->Branch("triggerobject_energy",&triggerobject_energy);
313  tree_->Branch("triggerobject_phi",&triggerobject_phi);
314  tree_->Branch("triggerobject_eta",&triggerobject_eta);
315  tree_->Branch("triggerobject_collectionname",&triggerobject_collectionname);
316  tree_->Branch("standalone_triggerobject_pt",&standalone_triggerobject_pt);
317  tree_->Branch("standalone_triggerobject_px",&standalone_triggerobject_px);
318  tree_->Branch("standalone_triggerobject_py",&standalone_triggerobject_py);
319  tree_->Branch("standalone_triggerobject_pz",&standalone_triggerobject_pz);
320  tree_->Branch("standalone_triggerobject_et",&standalone_triggerobject_et);
321  tree_->Branch("standalone_triggerobject_energy",&standalone_triggerobject_energy);
322  tree_->Branch("standalone_triggerobject_phi",&standalone_triggerobject_phi);
323  tree_->Branch("standalone_triggerobject_eta",&standalone_triggerobject_eta);
324  tree_->Branch("standalone_triggerobject_collectionname",&standalone_triggerobject_collectionname);
325  tree_->Branch("L1trigger_bit",&L1trigger_bit);
326  tree_->Branch("L1trigger_techTrigger",&L1trigger_techTrigger);
327  tree_->Branch("L1trigger_prescalevalue",&L1trigger_prescalevalue);
328  tree_->Branch("L1trigger_name",&L1trigger_name);
329  tree_->Branch("L1trigger_alias",&L1trigger_alias);
330  tree_->Branch("L1trigger_decision",&L1trigger_decision);
331  tree_->Branch("L1trigger_decision_nomask",&L1trigger_decision_nomask);
332  tree_->Branch("els_conversion_dist",&els_conversion_dist);
333  tree_->Branch("els_conversion_dcot",&els_conversion_dcot);
334  tree_->Branch("els_PFchargedHadronIsoR03",&els_PFchargedHadronIsoR03);
335  tree_->Branch("els_PFphotonIsoR03",&els_PFphotonIsoR03);
336  tree_->Branch("els_PFneutralHadronIsoR03",&els_PFneutralHadronIsoR03);
337  tree_->Branch("els_hasMatchedConversion",&els_hasMatchedConversion);
338  tree_->Branch("pf_els_PFchargedHadronIsoR03",&pf_els_PFchargedHadronIsoR03);
339  tree_->Branch("pf_els_PFphotonIsoR03",&pf_els_PFphotonIsoR03);
340  tree_->Branch("pf_els_PFneutralHadronIsoR03",&pf_els_PFneutralHadronIsoR03);
341  tree_->Branch("pf_els_hasMatchedConversion",&pf_els_hasMatchedConversion);
342  tree_->Branch("trk_nTOBTEC",trk_nTOBTEC,"Ctrk_nTOBTEC/I");
343  tree_->Branch("trk_ratioAllTOBTEC",trk_ratioAllTOBTEC,"trk_ratioAllTOBTEC/F");
344  tree_->Branch("trk_ratioJetTOBTEC",trk_ratioJetTOBTEC,"trk_ratioJetTOBTEC/F");
345  tree_->Branch("hbhefilter_decision",hbhefilter_decision_,"hbhefilter_decision/I");
346  tree_->Branch("trackingfailurefilter_decision",trackingfailurefilter_decision_,"trackingfailurefilter_decision/I");
347  tree_->Branch("cschalofilter_decision",cschalofilter_decision_,"cschalofilter_decision/I");
348  tree_->Branch("ecalTPfilter_decision",ecalTPfilter_decision_,"ecalTPfilter_decision/I");
349  tree_->Branch("ecalBEfilter_decision",ecalBEfilter_decision_,"ecalBEfilter_decision/I");
350  tree_->Branch("scrapingVeto_decision",scrapingVeto_decision_,"scrapingVeto_decision/I");
351  tree_->Branch("greedymuonfilter_decision",greedymuonfilter_decision_,"greedymuonfilter_decision/I");
352  tree_->Branch("inconsistentPFmuonfilter_decision",inconsistentPFmuonfilter_decision_,"inconsistentPFmuonfilter_decision/I");
353  tree_->Branch("hcallaserfilter_decision",hcallaserfilter_decision_,"hcallaserfilter_decision/I");
354  tree_->Branch("ecallaserfilter_decision",ecallaserfilter_decision_,"ecallaserfilter_decision/I");
355  tree_->Branch("eenoisefilter_decision",eenoisefilter_decision_,"eenoisefilter_decision/I");
356  tree_->Branch("eebadscfilter_decision",eebadscfilter_decision_,"eebadscfilter_decision/I");
357  tree_->Branch("trackercoherentnoisefilter1_decision", trackercoherentnoisefilter1_decision_, "trackercoherentnoisefilter1 /I");
358  tree_->Branch("trackercoherentnoisefilter2_decision", trackercoherentnoisefilter2_decision_, "trackercoherentnoisefilter2 /I");
359  tree_->Branch("trackertoomanyclustersfilter_decision", trackertoomanyclustersfilter_decision_, "trackertoomanyclustersfilter/I");
360  tree_->Branch("trackertoomanytripletsfilter_decision", trackertoomanytripletsfilter_decision_, "trackertoomanytripletsfilter/I");
361  tree_->Branch("trackertoomanyseedsfilter_decision", trackertoomanyseedsfilter_decision_, "trackertoomanyseedsfilter /I");
362  tree_->Branch("passprescalePFHT350filter_decision",passprescalePFHT350filter_decision_,"passprescalePFHT350filter_decision/I");
363  tree_->Branch("passprescaleHT250filter_decision",passprescaleHT250filter_decision_,"passprescaleHT250filter_decision/I");
364  tree_->Branch("passprescaleHT300filter_decision",passprescaleHT300filter_decision_,"passprescaleHT300filter_decision/I");
365  tree_->Branch("passprescaleHT350filter_decision",passprescaleHT350filter_decision_,"passprescaleHT350filter_decision/I");
366  tree_->Branch("passprescaleHT400filter_decision",passprescaleHT400filter_decision_,"passprescaleHT400filter_decision/I");
367  tree_->Branch("passprescaleHT450filter_decision",passprescaleHT450filter_decision_,"passprescaleHT450filter_decision/I");
368  tree_->Branch("MPT",MPT_,"MPT/F");
369  tree_->Branch("genHT",genHT_,"genHT/F");
370  tree_->Branch("jets_AK5PFclean_corrL2L3",&jets_AK5PFclean_corrL2L3_);
371  tree_->Branch("jets_AK5PFclean_corrL2L3Residual",&jets_AK5PFclean_corrL2L3Residual_);
372  tree_->Branch("jets_AK5PFclean_corrL1FastL2L3",&jets_AK5PFclean_corrL1FastL2L3_);
373  tree_->Branch("jets_AK5PFclean_corrL1L2L3",&jets_AK5PFclean_corrL1L2L3_);
374  tree_->Branch("jets_AK5PFclean_corrL1FastL2L3Residual",&jets_AK5PFclean_corrL1FastL2L3Residual_);
375  tree_->Branch("jets_AK5PFclean_corrL1L2L3Residual",&jets_AK5PFclean_corrL1L2L3Residual_);
376  tree_->Branch("jets_AK5PFclean_Uncert",&jets_AK5PFclean_Uncert_);
377  tree_->Branch("PU_zpositions",&PU_zpositions_);
378  tree_->Branch("PU_sumpT_lowpT",&PU_sumpT_lowpT_);
379  tree_->Branch("PU_sumpT_highpT",&PU_sumpT_highpT_);
380  tree_->Branch("PU_ntrks_lowpT",&PU_ntrks_lowpT_);
381  tree_->Branch("PU_ntrks_highpT",&PU_ntrks_highpT_);
382  tree_->Branch("PU_NumInteractions",&PU_NumInteractions_);
383  tree_->Branch("PU_bunchCrossing",&PU_bunchCrossing_);
384  tree_->Branch("PU_TrueNumInteractions",&PU_TrueNumInteractions_);
385  tree_->Branch("rho_kt6PFJetsForIsolation2011",rho_kt6PFJetsForIsolation2011_,"rho_kt6PFJetsForIsolation2011/F");
386  tree_->Branch("rho_kt6PFJetsForIsolation2012",rho_kt6PFJetsForIsolation2012_,"rho_kt6PFJetsForIsolation2012/F");
387  tree_->Branch("pfmets_fullSignif",pfmets_fullSignif_,"pfmets_fullSignif/F");
388  tree_->Branch("pfmets_fullSignifCov00",pfmets_fullSignifCov00_,"pfmets_fullSignifCov00/F");
389  tree_->Branch("pfmets_fullSignifCov10",pfmets_fullSignifCov10_,"pfmets_fullSignifCov10/F");
390  tree_->Branch("pfmets_fullSignifCov11",pfmets_fullSignifCov11_,"pfmets_fullSignifCov11/F");
391  tree_->Branch("softjetUp_dMEx",softjetUp_dMEx_,"softjetUp_dMEx/F");
392  tree_->Branch("softjetUp_dMEy",softjetUp_dMEy_,"softjetUp_dMEy/F");
393  tree_->Branch("pdfweights_cteq",&pdfweights_cteq_);
394  tree_->Branch("pdfweights_mstw",&pdfweights_mstw_);
395  tree_->Branch("pdfweights_nnpdf",&pdfweights_nnpdf_);
396  tree_->Branch("photon_chIsoValues",&photon_chIsoValues);
397  tree_->Branch("photon_phIsoValues",&photon_phIsoValues);
398  tree_->Branch("photon_nhIsoValues",&photon_nhIsoValues);
399  tree_->Branch("photon_passElectronVeto",&photon_passElectronVeto);
400  tree_->Branch("puJet_rejectionBeta",&puJet_rejectionBeta);
401  tree_->Branch("puJet_rejectionMVA",&puJet_rejectionMVA);
402  tree_->Branch("pfmets_fullSignif_2012",pfmets_fullSignif_2012_,"pfmets_fullSignif_2012/F");
403  tree_->Branch("pfmets_fullSignifCov00_2012",pfmets_fullSignifCov00_2012_,"pfmets_fullSignifCov00_2012/F");
404  tree_->Branch("pfmets_fullSignifCov10_2012",pfmets_fullSignifCov10_2012_,"pfmets_fullSignifCov10_2012/F");
405  tree_->Branch("pfmets_fullSignifCov11_2012",pfmets_fullSignifCov11_2012_,"pfmets_fullSignifCov11_2012/F");
406 
407  }
408 
409  else{
410  //EDM COMPLIANT PART
411  // producer->produce<ACertainCollection>(ACertainInstanceName);
412  }
413 
414 
415  return nLeaves;
416  }
417 
419  //open the collection that you want
420  //retrieve the objects
421  //fill the variable for tree filling
422 
423 
425  iEvent.getByLabel("patTriggerEvent",triggerevent);
426  // std::cout<<"The trigger HLT table is"<<triggerevent->nameHltTable()<<std::endl;
427 
428 
430  edm::InputTag myPatTrig("TriggerResults","","PAT");
431  iEvent.getByLabel(myPatTrig,hltresults);
432  // iEvent.getByLabel("TriggerResults","","PAT",hltresults);
433  int ntrigs=hltresults->size();
434 
435  // get hold of trigger names - based on TriggerResults object!
436  const edm::TriggerNames & triggerNames_ = iEvent.triggerNames(*hltresults);
437  int cschalofilterResult =1, trackingfailturefilterResult=1, ecaltpfilterResult=1, ecalbefilterResult=1, scrapingVetoResult=1;
438  int greedymuonfilterResult=1, inconsistentPFmuonfilterResult=1, hcallaserfilterResult=1, ecallaserfilterResult=1, eenoisefilterResult=1;
439  int eebadscfilterResult=1, passprescalePFHT350filterResult=1, passprescaleHT250filterResult=1, passprescaleHT300filterResult=1;
440  int passprescaleHT350filterResult=1, passprescaleHT400filterResult=1, passprescaleHT450filterResult=1;
441  int trackercoherentnoisefilter1Result=1, trackercoherentnoisefilter2Result=1, trackertoomanyclustersfilterResult=1, trackertoomanytripletsfilterResult=1, trackertoomanyseedsfilterResult=1;
442  for (int itrig=0; itrig< ntrigs; itrig++) {
443  std::string trigName = triggerNames_.triggerName(itrig);
444  int hltflag = (*hltresults)[itrig].accept();
445  if (trigName=="csctighthalofilter") cschalofilterResult = hltflag;
446  if (trigName=="trackingfailturefilter") trackingfailturefilterResult = hltflag;
447  if (trigName=="ecaltpfilter") ecaltpfilterResult = hltflag;
448  if (trigName=="ecalbefilter") ecalbefilterResult = hltflag;
449  if (trigName=="scrapingveto") scrapingVetoResult = hltflag;
450  if (trigName=="greedymuonfilter") greedymuonfilterResult = hltflag;
451  if (trigName=="inconsistentPFmuonfilter") inconsistentPFmuonfilterResult = hltflag;
452  if (trigName=="hcallaserfilter") hcallaserfilterResult = hltflag;
453  if (trigName=="ecallaserfilter") ecallaserfilterResult = hltflag;
454  if (trigName=="eenoisefilter") eenoisefilterResult = hltflag;
455  if (trigName=="eebadscfilter") eebadscfilterResult = hltflag;
456  if (trigName=="trackercoherentnoisefilter1") trackercoherentnoisefilter1Result = hltflag;
457  if (trigName=="trackercoherentnoisefilter2") trackercoherentnoisefilter2Result = hltflag;
458  if (trigName=="trackertoomanyclustersfilter") trackertoomanyclustersfilterResult = hltflag;
459  if (trigName=="trackertoomanytripletsfilter") trackertoomanytripletsfilterResult = hltflag;
460  if (trigName=="trackertoomanyseedsfilter") trackertoomanyseedsfilterResult = hltflag;
461  if (trigName=="passprescalePFHT350filter") passprescalePFHT350filterResult = hltflag;
462  if (trigName=="passprescaleHT250filter") passprescaleHT250filterResult = hltflag;
463  if (trigName=="passprescaleHT300filter") passprescaleHT300filterResult = hltflag;
464  if (trigName=="passprescaleHT350filter") passprescaleHT350filterResult = hltflag;
465  if (trigName=="passprescaleHT400filter") passprescaleHT400filterResult = hltflag;
466  if (trigName=="passprescaleHT450filter") passprescaleHT450filterResult = hltflag;
467 
468  }
469 
470  *cschalofilter_decision_ = cschalofilterResult;
471  *trackingfailurefilter_decision_ = trackingfailturefilterResult;
472  *ecalTPfilter_decision_ = ecaltpfilterResult;
473  *ecalBEfilter_decision_ = ecalbefilterResult;
474  *scrapingVeto_decision_ = scrapingVetoResult;
475  *greedymuonfilter_decision_ = greedymuonfilterResult;
476  *inconsistentPFmuonfilter_decision_ = inconsistentPFmuonfilterResult;
477  *hcallaserfilter_decision_ = hcallaserfilterResult;
478  *ecallaserfilter_decision_ = ecallaserfilterResult;
479  *eenoisefilter_decision_ = eenoisefilterResult;
480  *eebadscfilter_decision_ = eebadscfilterResult;
481  *trackercoherentnoisefilter1_decision_ = trackercoherentnoisefilter1Result;
482  *trackercoherentnoisefilter2_decision_ = trackercoherentnoisefilter2Result;
483  *trackertoomanyclustersfilter_decision_ = trackertoomanyclustersfilterResult;
484  *trackertoomanytripletsfilter_decision_ = trackertoomanytripletsfilterResult;
485  *trackertoomanyseedsfilter_decision_ = trackertoomanyseedsfilterResult;
486  *passprescalePFHT350filter_decision_ = passprescalePFHT350filterResult;
487  *passprescaleHT250filter_decision_ = passprescaleHT250filterResult;
488  *passprescaleHT300filter_decision_ = passprescaleHT300filterResult;
489  *passprescaleHT350filter_decision_ = passprescaleHT350filterResult;
490  *passprescaleHT400filter_decision_ = passprescaleHT400filterResult;
491  *passprescaleHT450filter_decision_ = passprescaleHT450filterResult;
492 
493 
495  iEvent.getByLabel("patTrigger",triggerpaths);
496  for( std::vector<pat::TriggerPath>::const_iterator tp=triggerpaths->begin(); tp!=triggerpaths->end(); ++tp ){
497  double prescalevalue = tp->prescale();
498  std::string name = tp->name();
499  float decision = tp->wasAccept();
500  (*trigger_prescalevalue).push_back(prescalevalue);
501  (*trigger_name).push_back(name);
502  (*trigger_decision).push_back(decision);
503 
504  std::vector<std::string> collection_names;
505  std::vector<float> pt_vector;
506  std::vector<float> px_vector;
507  std::vector<float> py_vector;
508  std::vector<float> pz_vector;
509  std::vector<float> et_vector;
510  std::vector<float> energy_vector;
511  std::vector<float> phi_vector;
512  std::vector<float> eta_vector;
513 
514  /*
515  cout<<""<<endl;
516  cout<<"Trigger names is: "<<name<<endl;
517  cout<<"Trigger decision is: "<<decision<<endl;
518  */
519 
520  edm::RefVector< pat::TriggerFilterCollection> toFilt = triggerevent->pathFilters(name);
522  if(toFilt.size()>0){
523  const pat::TriggerFilter *triggerfilter = (*(--toFilt_it)).get();
524  (*trigger_lastfiltername).push_back(triggerfilter->label());
525  //cout<<"The trigger filter is: "<<triggerfilter->label()<<endl;
526  edm::RefVector< pat::TriggerObjectCollection > tocoll = triggerevent->filterObjects(triggerfilter->label());
527 
529  const pat::TriggerObject *triggerObject = (*to).get();
530  double pt = triggerObject->pt();
531  double px = triggerObject->px();
532  double py = triggerObject->py();
533  double pz = triggerObject->pz();
534  double et = triggerObject->et();
535  double energy = triggerObject->energy();
536  double phi = triggerObject->phi();
537  double eta = triggerObject->eta();
538  std::string collname(triggerObject->collection());
539  //cout<<"The trigger collname is: "<<collname<<endl;
540  //cout<<"The trigger objectpt is: "<<pt<<endl;
541  collection_names.push_back(collname);
542  pt_vector.push_back(pt);
543  px_vector.push_back(px);
544  py_vector.push_back(py);
545  pz_vector.push_back(pz);
546  et_vector.push_back(et);
547  energy_vector.push_back(energy);
548  phi_vector.push_back(phi);
549  eta_vector.push_back(eta);
550  }
551 
552  (*triggerobject_collectionname).push_back(collection_names);
553  (*triggerobject_pt).push_back(pt_vector);
554  (*triggerobject_px).push_back(px_vector);
555  (*triggerobject_py).push_back(py_vector);
556  (*triggerobject_pz).push_back(pz_vector);
557  (*triggerobject_et).push_back(et_vector);
558  (*triggerobject_energy).push_back(energy_vector);
559  (*triggerobject_phi).push_back(phi_vector);
560  (*triggerobject_eta).push_back(eta_vector);
561  }//end of if statement requiring that reVector be greater than 0
562  else{
563  (*trigger_lastfiltername).push_back("none");
564  (*triggerobject_collectionname).push_back(collection_names);
565  (*triggerobject_pt).push_back(pt_vector);
566  (*triggerobject_px).push_back(px_vector);
567  (*triggerobject_py).push_back(py_vector);
568  (*triggerobject_pz).push_back(pz_vector);
569  (*triggerobject_et).push_back(et_vector);
570  (*triggerobject_energy).push_back(energy_vector);
571  (*triggerobject_phi).push_back(phi_vector);
572  (*triggerobject_eta).push_back(eta_vector);
573  }
574  collection_names.clear();
575  pt_vector.clear();
576  px_vector.clear();
577  py_vector.clear();
578  pz_vector.clear();
579  et_vector.clear();
580  energy_vector.clear();
581  phi_vector.clear();
582  eta_vector.clear();
583  }
584 
585 
586  //Get all trigger objects
588  iEvent.getByLabel("patTrigger",triggerobjects);
589  for( std::vector<pat::TriggerObject>::const_iterator to=triggerobjects->begin(); to!=triggerobjects->end(); ++to ){
590  double pt = to->pt();
591  double px = to->px();
592  double py = to->py();
593  double pz = to->pz();
594  double et = to->et();
595  double energy = to->energy();
596  double phi = to->phi();
597  double eta = to->eta();
598  std::string collname = to->collection();
599  //cout<<"The trigger collname is: "<<collname<<endl;
600  //cout<<"The trigger objectpt is: "<<pt<<endl;
601  (*standalone_triggerobject_collectionname).push_back(collname);
602  (*standalone_triggerobject_pt).push_back(pt);
603  (*standalone_triggerobject_px).push_back(px);
604  (*standalone_triggerobject_py).push_back(py);
605  (*standalone_triggerobject_pz).push_back(pz);
606  (*standalone_triggerobject_et).push_back(et);
607  (*standalone_triggerobject_energy).push_back(energy);
608  (*standalone_triggerobject_phi).push_back(phi);
609  (*standalone_triggerobject_eta).push_back(eta);
610  }
611 
612 
614  iEvent.getByLabel("patTrigger",triggeralgos);
615  for( std::vector<pat::TriggerAlgorithm>::const_iterator ta=triggeralgos->begin(); ta!=triggeralgos->end(); ++ta ){
616  float prescalevalue = ta->prescale();
617  std::string name = ta->name();
618  std::string alias = ta->alias();
619  float bit = ta->bit();
620  float techTrig = ta->techTrigger();
621  float decision = ta->decision();
622  float decision_nomask = ta->decisionBeforeMask();
623  (*L1trigger_prescalevalue).push_back(prescalevalue);
624  (*L1trigger_name).push_back(name);
625  (*L1trigger_alias).push_back(alias);
626  (*L1trigger_bit).push_back(bit);
627  (*L1trigger_techTrigger).push_back(techTrig);
628  (*L1trigger_decision).push_back(decision);
629  (*L1trigger_decision_nomask).push_back(decision_nomask);
630  }
631  edm::Handle<bool> filter_h;
632  if(iEvent.getByLabel("HBHENoiseFilterResultProducer","HBHENoiseFilterResult",filter_h)) {
633 
634  iEvent.getByLabel("HBHENoiseFilterResultProducer","HBHENoiseFilterResult", filter_h);
635  // cout<<"The filter decision is :"<<*filter_h<<endl;
636  if(*filter_h){*hbhefilter_decision_ = 1;}
637  if(!(*filter_h)){*hbhefilter_decision_ = 0;}
638  }
639  else{
640  *hbhefilter_decision_ = -1;
641  // cout<<"The hbheflag is not present, is this FastSim?"<<endl;
642  }
643 
644  *MPT_ = -1;
645 
647  iEvent.getByLabel("cleanPatElectrons",electrons);
648 
650  iEvent.getByLabel("selectedPatElectronsPF",PFelectrons);
651 
653  iEvent.getByLabel("cleanPatPhotons", photons);
654 
656  iEvent.getByLabel("offlinePrimaryVertices", vertexCollection);
657 
659  iEvent.getByLabel("particleFlow", pfCandidatesH);
660  const PFCandidateCollection thePfColl = *(pfCandidatesH.product());
661 
663  iEvent.getByLabel("generalTracks", tracks_h);
664 
666  iEvent.getByLabel("offlineBeamSpot", bsHandle);
667  const reco::BeamSpot &beamspot = *bsHandle.product();
668 
670  iEvent.getByLabel("allConversions", hConversions);
671 
673  iEvent.getByLabel("scalersRawToDigi", dcsHandle);
674  //iEvent.getByLabel(dcsTag_, dcsHandle);
675 
676  const edm::Run& iRun = iEvent.getRun();
677  // get ConditionsInRunBlock
679  iRun.getByLabel("conditionsInEdm", condInRunBlock);
680 
681 
682  // edm::Handle<BFieldCollection> bfield_;
684  iEvent.getByLabel("BFieldColl","BField", bfield_);
685  //iEvent.getByLabel(dcsTag_, dcsHandle);
686 
687 
688  double evt_bField;
689  // need the magnetic field
690  //
691  // if isData then derive bfield using the
692  // magnet current from DcsStatus
693  // otherwise take it from the IdealMagneticFieldRecord
694  if (iEvent.isRealData()) {
695  // scale factor = 3.801/18166.0 which are
696  // average values taken over a stable two
697  // week period
698  float currentToBFieldScaleFactor = 2.09237036221512717e-04;
699  float current;
700  if(dcsHandle->size()>0) current = (*dcsHandle)[0].magnetCurrent();
701  else current = condInRunBlock->BAvgCurrent;
702  evt_bField = current*currentToBFieldScaleFactor;
703  //cout<<"\n"<<evt_bField;
704  }
705  else {
706 
707  //edm::ESHandle<MagneticField> magneticField;
708  //iSetup.get<IdealMagneticFieldRecord>().get(magneticField);
709  //evt_bField = magneticField->inTesla(GlobalPoint(0.,0.,0.)).z();
710 
711  evt_bField = (*bfield_)[0];
712 
713  }
714 
715 
716  //electron PFiso variables
717  IsoDepositVals electronIsoValPFId(3);
718  const IsoDepositVals * electronIsoVals = &electronIsoValPFId;
719  iEvent.getByLabel("elPFIsoValueCharged03PFIdPFIso", electronIsoValPFId[0]);
720  iEvent.getByLabel("elPFIsoValueGamma03PFIdPFIso", electronIsoValPFId[1]);
721  iEvent.getByLabel("elPFIsoValueNeutral03PFIdPFIso", electronIsoValPFId[2]);
722 
723 
724  for(std::vector<pat::Electron>::const_iterator elec=electrons->begin(); elec!=electrons->end(); ++elec) {
725 
726  //Get Gsf electron
727  reco::GsfElectron* el = (reco::GsfElectron*) elec->originalObject();
728  if(el == NULL) {
729  throw cms::Exception("GsfElectron")<<"No GsfElectron matched to pat::Electron.\n";
730  }
731 
732  //cout << "Found and electron" << endl;
733  //if(!el->closestCtfTrackRef().isNonnull())
734  //cout<< "Could not find an electron ctf track" << endl;
735 
736  ConversionFinder convFinder;
737  ConversionInfo convInfo = convFinder.getConversionInfo(*el, tracks_h, evt_bField);
738 
739  (*els_conversion_dist).push_back(convInfo.dist());
740  (*els_conversion_dcot).push_back(convInfo.dcot());
741  //double convradius = convInfo.radiusOfConversion();
742  //math::XYZPoint convPoint = convInfo.pointOfConversion();
743 
744  bool hasMatchedConversion = ConversionTools::hasMatchedConversion(*el,hConversions,beamspot.position());
745  (*els_hasMatchedConversion).push_back(hasMatchedConversion);
746 
747  //get PF isolation
748  edm::Ptr< reco::GsfElectron > gsfel = (edm::Ptr< reco::GsfElectron >) elec->originalObjectRef();
749  double charged = (*(*electronIsoVals)[0])[gsfel];
750  double photon = (*(*electronIsoVals)[1])[gsfel];
751  double neutral = (*(*electronIsoVals)[2])[gsfel];
752  //cout<<charged<<" "<<photon<<" "<<neutral<<endl;
753  (*els_PFchargedHadronIsoR03).push_back(charged);
754  (*els_PFphotonIsoR03).push_back(photon);
755  (*els_PFneutralHadronIsoR03).push_back(neutral);
756 
757  }
758 
759 
760  //get PFelectron variables
761  for(std::vector<pat::Electron>::const_iterator elec=PFelectrons->begin(); elec!=PFelectrons->end(); ++elec) {
762 
763  //Get Gsf electron
764  reco::GsfElectron* el = (reco::GsfElectron*) elec->originalObject();
765  if(el == NULL) {
766  throw cms::Exception("GsfElectron")<<"No GsfElectron matched to pat::Electron.\n";
767  }
768 
769  bool hasMatchedConversion = ConversionTools::hasMatchedConversion(*el,hConversions,beamspot.position());
770  (*pf_els_hasMatchedConversion).push_back(hasMatchedConversion);
771 
772  //get PF isolation
773  edm::Ptr< reco::GsfElectron > gsfel = (edm::Ptr< reco::GsfElectron >) elec->originalObjectRef();
774  double charged = (*(*electronIsoVals)[0])[gsfel];
775  double photon = (*(*electronIsoVals)[1])[gsfel];
776  double neutral = (*(*electronIsoVals)[2])[gsfel];
777  (*pf_els_PFchargedHadronIsoR03).push_back(charged);
778  (*pf_els_PFphotonIsoR03).push_back(photon);
779  (*pf_els_PFneutralHadronIsoR03).push_back(neutral);
780 
781  }
782 
783  //-- Prepare safe electron conversion variables
785  iEvent.getByLabel("allConversions", hVetoConversions);
786 
788  iEvent.getByLabel("gsfElectrons", hVetoElectrons);
789 
790  //-- Get Photon iso variables
791  PFIsolationEstimator isolator;
792  isolator.initializePhotonIsolation(kTRUE);
793  isolator.setConeSize(0.3);
794 
795  unsigned int ivtx = 0;
796  VertexRef myVtxRef(vertexCollection, ivtx);
797 
798  bool passelectronveto = false;
799 
800  for(std::vector<pat::Photon>::const_iterator ph=photons->begin(); ph!=photons->end(); ++ph) {
801  //isolator.fGetIsolation((*ph),&candColl, myVtxRef, Vertices);
802 
803  isolator.fGetIsolation(&*ph,
804  &thePfColl,
805  myVtxRef,
806  vertexCollection);
807 
808  // std::cout << " ChargedIso " << isolator.getIsolationCharged() << std::endl;
809  // std::cout << " PhotonIso " << isolator.getIsolationPhoton() << std::endl;
810  // std::cout << " NeutralHadron Iso " << isolator.getIsolationNeutral() << std::endl;
811 
812  (*photon_chIsoValues).push_back(isolator.getIsolationCharged());
813  (*photon_phIsoValues).push_back(isolator.getIsolationPhoton());
814  (*photon_nhIsoValues).push_back(isolator.getIsolationNeutral());
815 
816  passelectronveto = !ConversionTools::hasMatchedPromptElectron(ph->superCluster(), hVetoElectrons, hVetoConversions, beamspot.position());
817 
818  (*photon_passElectronVeto).push_back(passelectronveto);
819 
820  }
821 
822  //Get PF jets---------------------------
824  //iEvent.getByLabel("selectedPatJetsPF",jets);
825  iEvent.getByLabel("cleanPatJetsAK5PF",jets);
826 
828  iEvent.getByLabel("JetCorrColl","ak5PFL2L3", ak5PFL2L3_);
829  edm::Handle< std::vector<double> > ak5PFL2L3Residual_;
830  iEvent.getByLabel("JetCorrColl","ak5PFL2L3Residual", ak5PFL2L3Residual_);
831  edm::Handle< std::vector<double> > ak5PFL1FastL2L3_;
832  iEvent.getByLabel("JetCorrColl","ak5PFL1FastL2L3", ak5PFL1FastL2L3_);
833  edm::Handle< std::vector<double> > ak5PFL1L2L3_;
834  iEvent.getByLabel("JetCorrColl","ak5PFL1L2L3", ak5PFL1L2L3_);
835  edm::Handle< std::vector<double> > ak5PFL1FastL2L3Residual_;
836  iEvent.getByLabel("JetCorrColl","ak5PFL1FastL2L3Residual", ak5PFL1FastL2L3Residual_);
837  edm::Handle< std::vector<double> > ak5PFL1L2L3Residual_;
838  iEvent.getByLabel("JetCorrColl","ak5PFL1L2L3Residual", ak5PFL1L2L3Residual_);
839  edm::Handle< std::vector<double> > ak5PFUncert_;
840  iEvent.getByLabel("JetCorrColl","ak5PFUncert", ak5PFUncert_);
841 
842  if(jets->size() != (*ak5PFL2L3_).size()) {
843  throw cms::Exception("JetCorrProblem")
844  << "cleanPatJetsAK5PF collection different size than JetCorrColl.\n";
845  }
846 
847  *softjetUp_dMEx_ = 0;
848  *softjetUp_dMEy_ = 0;
849 
850  for(uint it=0; it<(*ak5PFL2L3_).size(); it++){
851  if((jets->at(it)).pt()>10) { //only save jets with pT>10 GeV
852  (*jets_AK5PFclean_corrL2L3_).push_back((*ak5PFL2L3_)[it]);
853  (*jets_AK5PFclean_corrL2L3Residual_).push_back((*ak5PFL2L3Residual_)[it]);
854  (*jets_AK5PFclean_corrL1FastL2L3_).push_back((*ak5PFL1FastL2L3_)[it]);
855  (*jets_AK5PFclean_corrL1L2L3_).push_back((*ak5PFL1L2L3_)[it]);
856  (*jets_AK5PFclean_corrL1FastL2L3Residual_).push_back((*ak5PFL1FastL2L3Residual_)[it]);
857  (*jets_AK5PFclean_corrL1L2L3Residual_).push_back((*ak5PFL1L2L3Residual_)[it]);
858  (*jets_AK5PFclean_Uncert_).push_back((*ak5PFUncert_)[it]);
859  }
860  else { //save change in MET when soft jet energy increased by 10%
861  //subtract because MET opposite the extra jet energy
862  *softjetUp_dMEx_ -= 0.1*(jets->at(it)).px();
863  *softjetUp_dMEy_ -= 0.1*(jets->at(it)).py();
864  }
865  }
866 
867 
868  if(!iEvent.isRealData()) { //Access PU info in MC
870  iEvent.getByLabel("addPileupInfo", PupInfo);
871  std::vector<PileupSummaryInfo>::const_iterator PVI;
872 
873  for(PVI = PupInfo->begin(); PVI != PupInfo->end(); ++PVI) {
874  // std::cout << " Pileup Information: bunchXing, nvtx: " << PVI->getBunchCrossing() << " " << PVI->getPU_NumInteractions() <<" "<< iEvent.id().event() << std::endl;
875  (*PU_NumInteractions_).push_back(PVI->getPU_NumInteractions());
876  (*PU_bunchCrossing_).push_back(PVI->getBunchCrossing());
877  (*PU_TrueNumInteractions_).push_back(PVI->getTrueNumInteractions());
878  (*PU_zpositions_).push_back(PVI->getPU_zpositions());
879  (*PU_sumpT_lowpT_).push_back(PVI->getPU_sumpT_lowpT());
880  (*PU_sumpT_highpT_).push_back(PVI->getPU_sumpT_highpT());
881  (*PU_ntrks_lowpT_).push_back(PVI->getPU_ntrks_lowpT());
882  (*PU_ntrks_highpT_).push_back(PVI->getPU_ntrks_highpT());
883  }
884  }
885 
886 
888  iEvent.getByLabel("kt6PFJetsForIsolation2011","rho", rho_);
890 
891  if(iEvent.getByLabel(edm::InputTag("kt6PFJets:rho:RECO"), rho_)){
892  iEvent.getByLabel(edm::InputTag("kt6PFJets:rho:RECO"), rho_);
894  }
895  else if(iEvent.getByLabel("kt6PFJetsForIsolation2012","rho", rho_)){ //in case kt6PFJets:rho:RECO isn't present, as in FastSim
896  iEvent.getByLabel("kt6PFJetsForIsolation2012","rho", rho_);
898  }
899  else *rho_kt6PFJetsForIsolation2012_ = -999;
900 
901 
902  double htEvent = 0.0;
904  if(iEvent.getByLabel("source", product)){
905  iEvent.getByLabel("source", product);
906  const lhef::HEPEUP hepeup_ = product->hepeup();
907  const std::vector<lhef::HEPEUP::FiveVector> pup_ = hepeup_.PUP;
908 
909  size_t iMax = hepeup_.NUP;
910  for(size_t i = 2; i < iMax; ++i) {
911  if( hepeup_.ISTUP[i] != 1 ) continue;
912  int idabs = abs( hepeup_.IDUP[i] );
913  if( idabs != 21 && (idabs<1 || idabs>6) ) continue;
914  double ptPart = sqrt( pow(hepeup_.PUP[i][0],2) + pow(hepeup_.PUP[i][1],2) );
915  //std::cout << ptPart << std::endl;
916  htEvent += ptPart;
917  }
918  //std::cout <<"Total: " << htEvent << std::endl;
919  }
920  *genHT_ = htEvent;
921 
922  //met significance
923  edm::Handle< edm::View<pat::MET> > pfMEThandle;
924  iEvent.getByLabel("patMETsPF", pfMEThandle);
925  double sigmaX2= (pfMEThandle->front() ).getSignificanceMatrix()(0,0);
926  double sigmaY2= (pfMEThandle->front() ).getSignificanceMatrix()(1,1);
927  float significance = -1;
928  //required sanity check according to https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideMETSignificance?rev=5#Known_Issues
929  try {
930  if(sigmaX2<1.e10 && sigmaY2<1.e10) significance = (pfMEThandle->front() ).significance();
931  }
932  catch (cms::Exception &e) {
933  std::cout << "Caught exception in MET significance calculation:\n"
934  << e.what()
935  << "Setting MET significance to -1.0\n"
936  << std::endl;
937  significance = -1.;
938  }
939  *pfmets_fullSignif_ = significance;
940  *pfmets_fullSignifCov00_ = (float) sigmaX2;
941  *pfmets_fullSignifCov10_ = (pfMEThandle->front() ).getSignificanceMatrix()(1,0);
942  *pfmets_fullSignifCov11_ = (float) sigmaY2;
943 
944  //this is slightly dangerous in the sense that if the inputtag is missing but
945  //the user intends it to be there, the code will silently continue
946  //But it provides a smooth mechanism to disable the pdf weights in the python...
947  //just don't run the PdfWeightProducer
948  edm::InputTag pdfWeightTag("pdfWeights:cteq66"); // or any other PDF set
949  edm::Handle<std::vector<double> > weightHandle;
950  iEvent.getByLabel(pdfWeightTag, weightHandle);
951 
952  if (!weightHandle.failedToGet()) {
953  std::vector<double> weights = (*weightHandle);
954  unsigned int nmembers = weights.size();
955  for (unsigned int j=0; j<nmembers; j++) pdfweights_cteq_->push_back(weights[j]);
956  }
957 
958  edm::InputTag pdfWeightTag2("pdfWeights:MSTW2008nlo68cl"); // or any other PDF set
959  edm::Handle<std::vector<double> > weightHandle2;
960  iEvent.getByLabel(pdfWeightTag2, weightHandle2);
961 
962  if (!weightHandle2.failedToGet()) {
963  std::vector<double> weights2 = (*weightHandle2);
964  unsigned int nmembers2 = weights2.size();
965  for (unsigned int j2=0; j2<nmembers2; j2++) pdfweights_mstw_->push_back(weights2[j2]);
966  }
967 
968  edm::InputTag pdfWeightTag3("pdfWeights:NNPDF20"); // or any other PDF set
969  edm::Handle<std::vector<double> > weightHandle3;
970  iEvent.getByLabel(pdfWeightTag3, weightHandle3);
971 
972  if (!weightHandle3.failedToGet()) {
973  std::vector<double> weights3 = (*weightHandle3);
974  unsigned int nmembers3 = weights3.size();
975  for (unsigned int j3=0; j3<nmembers3; j3++) pdfweights_nnpdf_->push_back(weights3[j3]);
976  }
977 
978  //get tracking TOBTEC filter variables
979  // code copied from http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/KStenson/TrackingFilters/plugins/TobTecFakesFilter.cc?view=markup
980  const double piconst = 3.141592653589793;
981  const double twopiconst = 2.0*piconst;
982  const int phibins = 100;
983  const double phibinsize = twopiconst/static_cast<double>(phibins);
985  iEvent.getByLabel("generalTracks",trks);
986 
987  int phiIterPixelTrks[phibins][2] = { {0} };
988  int phiIterTobTecTrks[phibins][2] = { {0} };
989  double n_iterPixelTrks = 0;
990  double n_iterTobTecTrks = 0;
991 
992  int i_trkphi;
993  double trkabseta;
994  int trkalgo;
995 
996  // Count up pixel seeded tracks (n_iterPixelTrks) and TOBTEC seeded tracks (n_iterTobTecTrks)
997  // Also count up pixel seeded and TOBTEC seeded tracks in bins of phi in the transition region
998  for (reco::TrackCollection::const_iterator trk=trks->begin(); trk!=trks->end(); ++trk){
999  trkalgo = trk->algo();
1000  switch(trkalgo) {
1006  ++n_iterPixelTrks;
1007  break;
1009  ++n_iterTobTecTrks;
1010  break;
1011  default:
1012  break;
1013  }
1014 
1015  trkabseta = fabs(trk->eta());
1016  int zside = 0;
1017  if (trk->eta() > 0) zside = 1;
1018  if (trkabseta < 1.6 && trkabseta > 0.9) { // hardcode eta range from 0.9 to 1.6
1019  i_trkphi = std::max(0,std::min(phibins-1,(int) ((trk->phi()+piconst)/phibinsize)));
1020  switch(trkalgo) {
1026  ++phiIterPixelTrks[i_trkphi][zside];
1027  break;
1029  ++phiIterTobTecTrks[i_trkphi][zside];
1030  break;
1031  default:
1032  break;
1033  }
1034  }
1035  }
1036  if (n_iterPixelTrks < 0.5) n_iterPixelTrks = 1.0; // avoid divide by zero
1037  double ritertobtec = n_iterTobTecTrks / n_iterPixelTrks; // ratio of TOBTEC seeded to pixel seeded tracks
1038 
1039  // Simple jet finder for TOBTEC seeded tracks. Find the value of phi that maximizes
1040  // the number of tracks inside a phi window of windowRange (only for tracks in the
1041  // transition region.
1042  int windowRange = std::max(1,static_cast<int>(0.7/phibinsize+0.5));
1043  int runPhiIterTobTec[phibins][2] = { {0} };
1044  int lowindx;
1045  int maxIterTobTecPhiTrks = -1;
1046  int maxIterTobTecPhiTrksBin = -1;
1047  int maxIterTobTecPhiTrksZBin = -1;
1048  for (int zside = 0; zside < 2; ++zside) {
1049  for (int iphi = phibins-windowRange+1; iphi < phibins; ++iphi) {
1050  runPhiIterTobTec[0][zside] += phiIterTobTecTrks[iphi][zside];
1051  }
1052  runPhiIterTobTec[0][zside] += phiIterTobTecTrks[0][zside];
1053  for (int iphi = 1; iphi < phibins; ++iphi) {
1054  lowindx = iphi-windowRange;
1055  if (lowindx < 0) lowindx += phibins;
1056  runPhiIterTobTec[iphi][zside] = runPhiIterTobTec[iphi-1][zside] + phiIterTobTecTrks[iphi][zside] - phiIterTobTecTrks[lowindx][zside];
1057  if (runPhiIterTobTec[iphi][zside] > maxIterTobTecPhiTrks) {
1058  maxIterTobTecPhiTrks = runPhiIterTobTec[iphi][zside];
1059  maxIterTobTecPhiTrksBin = iphi;
1060  maxIterTobTecPhiTrksZBin = zside;
1061  }
1062  }
1063  }
1064  double n_iterTobTecTrksInIterTobTecJet = static_cast<double>(maxIterTobTecPhiTrks);
1065  double n_iterPixelTrksInIterTobTecJet = 0.0;
1066 
1067  // Find the number of pixel seeded tracks in the same region that maximizes the number
1068  // of TOBTEC seeded tracks.
1069  int indx;
1070  for (int iphi = maxIterTobTecPhiTrksBin-windowRange+1; iphi < maxIterTobTecPhiTrksBin+1; ++iphi) {
1071  indx = iphi < 0 ? phibins+iphi : iphi;
1072  n_iterPixelTrksInIterTobTecJet += phiIterPixelTrks[indx][maxIterTobTecPhiTrksZBin];
1073  }
1074  if (n_iterPixelTrksInIterTobTecJet < 0.5) n_iterPixelTrksInIterTobTecJet = 1.0; // avoid divide by zero
1075  // Calculate ratio of TOBTEC seeded tracks in "jet" to pixel seeded tracks in same region
1076  double ritertobtecjet = n_iterTobTecTrksInIterTobTecJet / n_iterPixelTrksInIterTobTecJet;
1077 
1078  *trk_nTOBTEC = n_iterTobTecTrksInIterTobTecJet;
1079  *trk_ratioAllTOBTEC = ritertobtec;
1080  *trk_ratioJetTOBTEC = ritertobtecjet;
1081 
1083 
1084  // PU Jet Rejection Variables
1085 
1087  iEvent.getByLabel("selectedPatJetsPF",pujets);
1088  const View<pat::Jet> & jetss = *pujets;
1089 
1091  iEvent.getByLabel("puJetIdChs",puJetId);
1092  //const edm::ValueMap<StoredPileupJetIdentifier> * puId = puJetId.product();
1093 
1094  edm::Handle<ValueMap<float> > puJetIdMVA_full;
1095  iEvent.getByLabel("puJetMvaChs","fullDiscriminant",puJetIdMVA_full);
1096  edm::Handle<ValueMap<int> > puJetIdFlag_full;
1097  iEvent.getByLabel("puJetMvaChs","fullId",puJetIdFlag_full);
1098 
1099  //For some reason the simpleDiscriminant isn't produced...
1100 
1101  edm::Handle<ValueMap<float> > puJetIdMVA_cutbased;
1102  iEvent.getByLabel("puJetMvaChs","cutbasedDiscriminant",puJetIdMVA_cutbased);
1103  edm::Handle<ValueMap<int> > puJetIdFlag_cutbased;
1104  iEvent.getByLabel("puJetMvaChs","cutbasedId",puJetIdFlag_cutbased);
1105 
1106  std::vector<float> betavector;
1107  std::vector<float> mvavector;
1108 
1109  //Fill the vector of vectors. They need to be done separately..
1110 
1111  //Store for each jet: pT, eta, beta, betaStar, betaClassic, betaStarClassic
1112  for ( unsigned int i=0; i<jetss.size(); ++i ) {
1113  const pat::Jet & patjet = jetss.at(i);
1114  float jec = patjet.jecFactor(0);
1115  float jpt = patjet.pt();
1116 
1117  //Apply the same jet pt cut as is done for eventB jet collection
1118  if ( jpt*jec>10.0 || jpt>20.0 ) {
1119 
1120  float pt = (*puJetId)[jetss.refAt(i)].jetPt() ;
1121  float eta = (*puJetId)[jetss.refAt(i)].jetEta() ;
1122  float beta = (*puJetId)[jetss.refAt(i)].beta() ;
1123  float betaStar = (*puJetId)[jetss.refAt(i)].betaStar() ;
1124  float betaClassic = (*puJetId)[jetss.refAt(i)].betaClassic() ;
1125  float betaStarClassic = (*puJetId)[jetss.refAt(i)].betaStarClassic() ;
1126 
1127  //cout << "pt=" << pt << " jpt=" << jpt << " jec=" << jec << " rawpt=" << jpt*jec << endl;
1128  betavector.push_back(pt);
1129  betavector.push_back(eta);
1130  betavector.push_back(beta);
1131  betavector.push_back(betaStar);
1132  betavector.push_back(betaClassic);
1133  betavector.push_back(betaStarClassic);
1134 
1135  (*puJet_rejectionBeta).push_back(betavector);
1136  } // jet pt cut
1137  betavector.clear();
1138  }//end
1139 
1140  //Store for each jet: pT, eta, MVA Full Discrim, MVA Full ID, MVA Cut Discrim, MVA Cut ID
1141  for ( unsigned int jeti = 0; jeti != jetss.size(); jeti++) {
1142  const pat::Jet & patjet = jetss.at(jeti);
1143  float pt = patjet.pt() ;
1144  float eta = patjet.eta();
1145  float jec = patjet.jecFactor(0);
1146 
1147  //Apply the same jet pt cut as is done for eventB jet collection
1148  if ( pt*jec>10.0 || pt>20.0 ) {
1149 
1150  float mvaF = (*puJetIdMVA_full)[jetss.refAt(jeti)];
1151  int idflagF = (*puJetIdFlag_full)[jetss.refAt(jeti)];
1152  float mvaC = (*puJetIdMVA_cutbased)[jetss.refAt(jeti)];
1153  int idflagC = (*puJetIdFlag_cutbased)[jetss.refAt(jeti)];
1154 
1155  mvavector.push_back(pt);
1156  mvavector.push_back(eta);
1157  mvavector.push_back(mvaF);
1158  mvavector.push_back(idflagF);
1159  mvavector.push_back(mvaC);
1160  mvavector.push_back(idflagC);
1161 
1162  (*puJet_rejectionMVA).push_back(mvavector);
1163  } // jet pt cut
1164  mvavector.clear();
1165  }
1166 
1167  // Met Significance
1168 
1169  edm::Handle<double> metsigHandle;
1170  iEvent.getByLabel("pfMetSig","METSignificance", metsigHandle);
1171  edm::Handle<double> metsigm00Handle;
1172  iEvent.getByLabel("pfMetSig","CovarianceMatrix00", metsigm00Handle);
1173  edm::Handle<double> metsigm10Handle;
1174  iEvent.getByLabel("pfMetSig","CovarianceMatrix10", metsigm10Handle);
1175  edm::Handle<double> metsigm11Handle;
1176  iEvent.getByLabel("pfMetSig","CovarianceMatrix11", metsigm11Handle);
1177  *pfmets_fullSignif_2012_ = *(metsigHandle.product());
1178  *pfmets_fullSignifCov00_2012_ = *(metsigm00Handle.product());
1179  *pfmets_fullSignifCov10_2012_ = *(metsigm10Handle.product());
1180  *pfmets_fullSignifCov11_2012_ = *(metsigm11Handle.product());
1181 
1182 
1184 
1185  //fill the tree
1186  if (ownTheTree_){ tree_->Fill(); }
1187  (*trigger_prescalevalue).clear();
1188  (*trigger_name).clear();
1189  (*trigger_decision).clear();
1190  (*trigger_lastfiltername).clear();
1191  (*triggerobject_pt).clear();
1192  (*triggerobject_px).clear();
1193  (*triggerobject_py).clear();
1194  (*triggerobject_pz).clear();
1195  (*triggerobject_et).clear();
1196  (*triggerobject_energy).clear();
1197  (*triggerobject_phi).clear();
1198  (*triggerobject_eta).clear();
1199  (*triggerobject_collectionname).clear();
1200  (*standalone_triggerobject_pt).clear();
1201  (*standalone_triggerobject_px).clear();
1202  (*standalone_triggerobject_py).clear();
1203  (*standalone_triggerobject_pz).clear();
1204  (*standalone_triggerobject_et).clear();
1205  (*standalone_triggerobject_energy).clear();
1206  (*standalone_triggerobject_phi).clear();
1207  (*standalone_triggerobject_eta).clear();
1208  (*standalone_triggerobject_collectionname).clear();
1209  (*L1trigger_bit).clear();
1210  (*L1trigger_techTrigger).clear();
1211  (*L1trigger_prescalevalue).clear();
1212  (*L1trigger_name).clear();
1213  (*L1trigger_alias).clear();
1214  (*L1trigger_decision).clear();
1215  (*L1trigger_decision_nomask).clear();
1216  (*els_conversion_dist).clear();
1217  (*els_conversion_dcot).clear();
1218  (*els_PFchargedHadronIsoR03).clear();
1219  (*els_PFphotonIsoR03).clear();
1220  (*els_PFneutralHadronIsoR03).clear();
1221  (*els_hasMatchedConversion).clear();
1222  (*pf_els_PFchargedHadronIsoR03).clear();
1223  (*pf_els_PFphotonIsoR03).clear();
1224  (*pf_els_PFneutralHadronIsoR03).clear();
1225  (*pf_els_hasMatchedConversion).clear();
1226  (*jets_AK5PFclean_corrL2L3_).clear();
1227  (*jets_AK5PFclean_corrL2L3Residual_).clear();
1228  (*jets_AK5PFclean_corrL1FastL2L3_).clear();
1229  (*jets_AK5PFclean_corrL1L2L3_).clear();
1230  (*jets_AK5PFclean_corrL1FastL2L3Residual_).clear();
1231  (*jets_AK5PFclean_corrL1L2L3Residual_).clear();
1232  (*jets_AK5PFclean_Uncert_).clear();
1233  (*PU_zpositions_).clear();
1234  (*PU_sumpT_lowpT_).clear();
1235  (*PU_sumpT_highpT_).clear();
1236  (*PU_ntrks_lowpT_).clear();
1237  (*PU_ntrks_highpT_).clear();
1238  (*PU_NumInteractions_).clear();
1239  (*PU_bunchCrossing_).clear();
1240  (*PU_TrueNumInteractions_).clear();
1241  (*pdfweights_cteq_).clear();
1242  (*pdfweights_mstw_).clear();
1243  (*pdfweights_nnpdf_).clear();
1244  (*photon_chIsoValues).clear();
1245  (*photon_phIsoValues).clear();
1246  (*photon_nhIsoValues).clear();
1247  (*photon_passElectronVeto).clear();
1248  (*puJet_rejectionBeta).clear();
1249  (*puJet_rejectionMVA).clear();
1250 
1251  }
1252 
1253  void callBack(){
1254  //clean up whatever memory was allocated
1255  }
1256 
1257  private:
1261 
1262  std::vector<float> * trigger_prescalevalue;
1263  std::vector<std::string> * trigger_name;
1264  std::vector<float> * trigger_decision;
1265  std::vector<std::string> * trigger_lastfiltername;
1266  std::vector<std::vector<float> > * triggerobject_pt;
1267  std::vector<std::vector<float> > * triggerobject_px;
1268  std::vector<std::vector<float> > * triggerobject_py;
1269  std::vector<std::vector<float> > * triggerobject_pz;
1270  std::vector<std::vector<float> > * triggerobject_et;
1271  std::vector<std::vector<float> > * triggerobject_energy;
1272  std::vector<std::vector<float> > * triggerobject_phi;
1273  std::vector<std::vector<float> > * triggerobject_eta;
1274  std::vector<std::vector<std::string> > * triggerobject_collectionname;
1275  std::vector<float> * standalone_triggerobject_pt;
1276  std::vector<float> * standalone_triggerobject_px;
1277  std::vector<float> * standalone_triggerobject_py;
1278  std::vector<float> * standalone_triggerobject_pz;
1279  std::vector<float> * standalone_triggerobject_et;
1280  std::vector<float> * standalone_triggerobject_energy;
1281  std::vector<float> * standalone_triggerobject_phi;
1282  std::vector<float> * standalone_triggerobject_eta;
1283  std::vector<std::string> * standalone_triggerobject_collectionname;
1284  std::vector<float> * L1trigger_bit;
1285  std::vector<float> * L1trigger_techTrigger;
1286  std::vector<float> * L1trigger_prescalevalue;
1287  std::vector<std::string> * L1trigger_name;
1288  std::vector<std::string> * L1trigger_alias;
1289  std::vector<float> * L1trigger_decision;
1290  std::vector<float> * L1trigger_decision_nomask;
1291  std::vector<float> * els_conversion_dist;
1292  std::vector<float> * els_conversion_dcot;
1293  std::vector<float> * els_PFchargedHadronIsoR03;
1294  std::vector<float> * els_PFphotonIsoR03;
1295  std::vector<float> * els_PFneutralHadronIsoR03;
1296  std::vector<bool> * els_hasMatchedConversion;
1297  std::vector<float> * pf_els_PFchargedHadronIsoR03;
1298  std::vector<float> * pf_els_PFphotonIsoR03;
1299  std::vector<float> * pf_els_PFneutralHadronIsoR03;
1300  std::vector<bool> * pf_els_hasMatchedConversion;
1327  float * MPT_;
1328  float * genHT_;
1329  std::vector<float> * jets_AK5PFclean_corrL2L3_;
1331  std::vector<float> * jets_AK5PFclean_corrL1FastL2L3_;
1332  std::vector<float> * jets_AK5PFclean_corrL1L2L3_;
1335  std::vector<float> * jets_AK5PFclean_Uncert_;
1336  std::vector<std::vector<float> > * PU_zpositions_;
1337  std::vector<std::vector<float> > * PU_sumpT_lowpT_;
1338  std::vector<std::vector<float> > * PU_sumpT_highpT_;
1339  std::vector<std::vector<int> > * PU_ntrks_lowpT_;
1340  std::vector<std::vector<int> > * PU_ntrks_highpT_;
1341  std::vector<int> * PU_NumInteractions_;
1342  std::vector<int> * PU_bunchCrossing_;
1343  std::vector<float> * PU_TrueNumInteractions_;
1352  std::vector<float> * pdfweights_cteq_;
1353  std::vector<float> * pdfweights_mstw_;
1354  std::vector<float> * pdfweights_nnpdf_;
1355  std::vector<float> * photon_chIsoValues;
1356  std::vector<float> * photon_phIsoValues;
1357  std::vector<float> * photon_nhIsoValues;
1358  std::vector<bool> * photon_passElectronVeto;
1359  std::vector<std::vector<float> > * puJet_rejectionBeta;
1360  std::vector<std::vector<float> > * puJet_rejectionMVA;
1365 
1366 };
virtual char const * what() const
Definition: Exception.cc:141
const double beta
T getParameter(std::string const &) const
bool getByLabel(std::string const &label, Handle< PROD > &result) const
Definition: Run.h:219
int i
Definition: DBlmapReader.cc:9
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:215
std::vector< float > * els_PFchargedHadronIsoR03
std::vector< std::vector< float > > * triggerobject_pt
TTree * tree_
Definition: NTupler.h:30
int * trackertoomanytripletsfilter_decision_
std::vector< std::vector< float > > * PU_sumpT_lowpT_
std::vector< std::string > * standalone_triggerobject_collectionname
std::vector< float > * pdfweights_cteq_
float * pfmets_fullSignif_2012_
int * greedymuonfilter_decision_
virtual double energy() const final
energy
std::vector< bool > * els_hasMatchedConversion
std::vector< float > * jets_AK5PFclean_Uncert_
std::vector< float > * PU_TrueNumInteractions_
std::vector< float > * jets_AK5PFclean_corrL1L2L3_
std::vector< float > * standalone_triggerobject_energy
std::vector< float > * jets_AK5PFclean_corrL2L3Residual_
std::vector< std::vector< float > > * triggerobject_px
ConversionInfo getConversionInfo(const reco::GsfElectronCore &, const edm::Handle< reco::TrackCollection > &ctftracks_h, const edm::Handle< reco::GsfTrackCollection > &gsftracks_h, const double bFieldAtOrigin, const double minFracSharedHits=0.45)
uint registerleaves(edm::ProducerBase *producer)
Definition: AdHocNTupler.h:282
struct HEPEUP_ hepeup_
float * pfmets_fullSignifCov00_
static bool hasMatchedPromptElectron(const reco::SuperClusterRef &sc, const edm::Handle< reco::GsfElectronCollection > &eleCol, const edm::Handle< reco::ConversionCollection > &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
std::vector< bool > * photon_passElectronVeto
std::vector< std::string > * trigger_name
std::vector< std::vector< float > > * puJet_rejectionMVA
bool exists(std::string const &parameterName) const
checks if a parameter exists
double dist() const
int * ecalBEfilter_decision_
virtual double phi() const final
momentum azimuthal angle
int * scrapingVeto_decision_
int * passprescaleHT450filter_decision_
#define NULL
Definition: scimark2.h:8
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
int * trackercoherentnoisefilter1_decision_
Run const & getRun() const
Definition: Event.cc:65
std::vector< std::vector< float > > * triggerobject_energy
int zside(DetId const &)
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:253
std::vector< edm::Handle< edm::ValueMap< double > > > IsoDepositVals
Definition: AdHocNTupler.h:46
Analysis-level trigger object class.
Definition: TriggerObject.h:47
bool isRealData() const
Definition: EventBase.h:63
tuple vertexCollection
std::vector< int > * PU_NumInteractions_
std::vector< std::vector< float > > * triggerobject_py
std::vector< std::vector< float > > * triggerobject_pz
int * trackertoomanyclustersfilter_decision_
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:248
std::vector< float > * els_PFneutralHadronIsoR03
std::vector< std::string > * L1trigger_alias
std::vector< float > * jets_AK5PFclean_corrL1L2L3Residual_
std::vector< bool > * pf_els_hasMatchedConversion
std::vector< float > * L1trigger_bit
float * pfmets_fullSignifCov00_2012_
float * pfmets_fullSignifCov10_2012_
Analysis-level HLTrigger filter class.
Definition: TriggerFilter.h:35
std::vector< float > * standalone_triggerobject_pt
int * passprescaleHT350filter_decision_
std::vector< float > * els_conversion_dist
int iEvent
Definition: GenABIO.cc:230
std::vector< float > * jets_AK5PFclean_corrL1FastL2L3_
T sqrt(T t)
Definition: SSEVec.h:18
float * softjetUp_dMEy_
int * hbhefilter_decision_
std::vector< FiveVector > PUP
Definition: LesHouches.h:248
vector< PseudoJet > jets
int * passprescalePFHT350filter_decision_
std::vector< float > * standalone_triggerobject_py
std::vector< float > * jets_AK5PFclean_corrL2L3_
const std::string & collection() const
Get the label of the collection the trigger object originates from.
Definition: TriggerObject.h:92
std::vector< float > * L1trigger_decision
std::vector< float > * trigger_decision
std::vector< float > * L1trigger_techTrigger
float * rho_kt6PFJetsForIsolation2011_
T get() const
get a component
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
std::vector< float > * trigger_prescalevalue
std::vector< float > * els_conversion_dcot
float * pfmets_fullSignifCov11_2012_
std::vector< std::vector< int > > * PU_ntrks_lowpT_
virtual double py() const final
y coordinate of momentum vector
float * trk_ratioAllTOBTEC
std::vector< std::vector< float > > * triggerobject_phi
std::vector< int > ISTUP
Definition: LesHouches.h:230
T min(T a, T b)
Definition: MathUtil.h:58
int * hcallaserfilter_decision_
std::vector< float > * photon_chIsoValues
std::vector< float > * standalone_triggerobject_et
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
Definition: VertexFwd.h:13
int * cschalofilter_decision_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:418
static bool hasMatchedConversion(const reco::GsfElectron &ele, const edm::Handle< reco::ConversionCollection > &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
virtual double pz() const final
z coordinate of momentum vector
std::vector< int > IDUP
Definition: LesHouches.h:225
std::vector< std::string > * trigger_lastfiltername
int * passprescaleHT300filter_decision_
float * genHT_
std::vector< std::vector< float > > * triggerobject_et
std::vector< std::vector< std::string > > * triggerobject_collectionname
bool failedToGet() const
Definition: HandleBase.h:79
TFile & file() const
return opened TFile
Definition: TFileService.h:37
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
T const * product() const
Definition: Handle.h:81
std::vector< std::vector< float > > * puJet_rejectionBeta
std::vector< float > * L1trigger_prescalevalue
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
float * pfmets_fullSignif_
Analysis-level calorimeter jet class.
Definition: Jet.h:77
std::vector< std::vector< float > > * triggerobject_eta
std::vector< float > * standalone_triggerobject_pz
int * passprescaleHT400filter_decision_
std::vector< float > * standalone_triggerobject_eta
std::string treeName_
bool useTFileService_
int * trackercoherentnoisefilter2_decision_
float * pfmets_fullSignifCov10_
std::vector< std::vector< int > > * PU_ntrks_highpT_
bfield_(config.getParameter< std::string >("MagFieldRecordName"))
std::vector< float > * standalone_triggerobject_phi
std::vector< std::vector< float > > * PU_zpositions_
std::vector< float > * standalone_triggerobject_px
std::vector< float > * photon_nhIsoValues
void initializePhotonIsolation(Bool_t bApplyVeto)
float fGetIsolation(const reco::PFCandidate *pfCandidate, const reco::PFCandidateCollection *pfParticlesColl, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
const std::string & label() const
Get the filter label.
Definition: TriggerFilter.h:89
size_type size() const
Size of the RefVector.
Definition: RefVector.h:107
int * trackingfailurefilter_decision_
virtual double px() const final
x coordinate of momentum vector
virtual double et() const final
transverse energy
int * ecalTPfilter_decision_
tuple cout
Definition: gather_cfg.py:145
const Point & position() const
position
Definition: BeamSpot.h:62
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
double dcot() const
std::vector< int > * PU_bunchCrossing_
virtual double eta() const final
momentum pseudorapidity
std::vector< float > * pdfweights_nnpdf_
int * ecallaserfilter_decision_
int * trackertoomanyseedsfilter_decision_
float * softjetUp_dMEx_
int * eenoisefilter_decision_
std::vector< std::vector< float > > * PU_sumpT_highpT_
float * rho_kt6PFJetsForIsolation2012_
int * inconsistentPFmuonfilter_decision_
void setConeSize(float fValue=0.4)
std::vector< float > * pdfweights_mstw_
std::vector< float > * pf_els_PFchargedHadronIsoR03
std::vector< float > * jets_AK5PFclean_corrL1FastL2L3Residual_
float * pfmets_fullSignifCov11_
std::vector< float > * pf_els_PFneutralHadronIsoR03
int * passprescaleHT250filter_decision_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
std::vector< std::string > * L1trigger_name
std::vector< float > * els_PFphotonIsoR03
AdHocNTupler(const edm::ParameterSet &iConfig)
Definition: AdHocNTupler.h:48
float * trk_ratioJetTOBTEC
std::vector< float > * photon_phIsoValues
Definition: Run.h:43
std::vector< float > * L1trigger_decision_nomask
virtual double pt() const final
transverse momentum
int * eebadscfilter_decision_
void fill(edm::Event &iEvent)
Definition: AdHocNTupler.h:418
std::vector< float > * pf_els_PFphotonIsoR03