17 |
|
// |
18 |
|
// |
19 |
|
|
20 |
+ |
|
21 |
+ |
//uncomment to save also jet collections 1 and 4 |
22 |
+ |
//#define ENABLE_SIMPLEJETS1 |
23 |
+ |
//#define ENABLE_SIMPLEJETS4 |
24 |
+ |
|
25 |
|
#include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h" |
26 |
|
#include "CondFormats/JetMETObjects/interface/JetCorrectionUncertainty.h" |
27 |
|
#include "JetMETCorrections/Objects/interface/JetCorrector.h" |
31 |
|
#include "VHbbAnalysis/HbbAnalyzer/interface/HbbAnalyzerNew.h" |
32 |
|
#include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h" |
33 |
|
|
34 |
+ |
#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" |
35 |
+ |
#include "DataFormats/Math/interface/deltaR.h" |
36 |
+ |
#include "DataFormats/Math/interface/LorentzVector.h" |
37 |
+ |
#include "DataFormats/Math/interface/Vector3D.h" |
38 |
+ |
#include "Math/GenVector/PxPyPzM4D.h" |
39 |
+ |
|
40 |
+ |
|
41 |
+ |
#include <cmath> |
42 |
+ |
|
43 |
+ |
|
44 |
+ |
|
45 |
+ |
|
46 |
|
#define GENPTOLOR(a) TLorentzVector((a).px(), (a).py(), (a).pz(), (a).energy()) |
47 |
|
#define GENPTOLORP(a) TLorentzVector((a)->px(), (a)->py(), (a)->pz(), (a)->energy()) |
48 |
|
|
49 |
|
|
50 |
+ |
|
51 |
|
struct CompareJetPtMuons { |
52 |
|
bool operator()( const VHbbEvent::MuonInfo& j1, const VHbbEvent::MuonInfo& j2 ) const { |
53 |
|
return j1.p4.Pt() > j2.p4.Pt(); |
69 |
|
HbbAnalyzerNew::HbbAnalyzerNew(const edm::ParameterSet& iConfig): |
70 |
|
eleLabel_(iConfig.getParameter<edm::InputTag>("electronTag")), |
71 |
|
muoLabel_(iConfig.getParameter<edm::InputTag>("muonTag")), |
72 |
+ |
lep_ptCutForBjets_(iConfig.getParameter<double>("lep_ptCutForBjets")), |
73 |
+ |
elenoCutsLabel_(iConfig.getParameter<edm::InputTag>("electronNoCutsTag")), |
74 |
+ |
muonoCutsLabel_(iConfig.getParameter<edm::InputTag>("muonNoCutsTag")), |
75 |
|
jetLabel_(iConfig.getParameter<edm::InputTag>("jetTag")), |
76 |
|
subjetLabel_(iConfig.getParameter<edm::InputTag>("subjetTag")), |
77 |
+ |
filterjetLabel_(iConfig.getParameter<edm::InputTag>("filterjetTag")), |
78 |
|
simplejet1Label_(iConfig.getParameter<edm::InputTag>("simplejet1Tag")), |
79 |
|
simplejet2Label_(iConfig.getParameter<edm::InputTag>("simplejet2Tag")), |
80 |
|
simplejet3Label_(iConfig.getParameter<edm::InputTag>("simplejet3Tag")), |
82 |
|
tauLabel_(iConfig.getParameter<edm::InputTag>("tauTag")), |
83 |
|
metLabel_(iConfig.getParameter<edm::InputTag>("metTag")), |
84 |
|
phoLabel_(iConfig.getParameter<edm::InputTag>("photonTag")), |
63 |
– |
dimuLabel_(iConfig.getParameter<edm::InputTag>("dimuTag")), |
64 |
– |
dielecLabel_(iConfig.getParameter<edm::InputTag>("dielecTag")), |
85 |
|
hltResults_(iConfig.getParameter<edm::InputTag>("hltResultsTag")), |
86 |
|
runOnMC_(iConfig.getParameter<bool>("runOnMC")), verbose_(iConfig.getUntrackedParameter<bool>("verbose")) { |
87 |
|
|
112 |
|
HbbAnalyzerNew::produce(edm::Event& iEvent, const edm::EventSetup& iSetup){ |
113 |
|
using namespace edm; |
114 |
|
using namespace reco; |
115 |
< |
|
115 |
> |
|
116 |
> |
|
117 |
|
// JEC Uncertainty |
118 |
|
|
119 |
|
// JetCorrectionUncertainty *jecUnc=0; |
120 |
|
edm::ESHandle<JetCorrectorParametersCollection> JetCorParColl; |
121 |
< |
iSetup.get<JetCorrectionsRecord>().get("AK5PF",JetCorParColl); |
121 |
> |
iSetup.get<JetCorrectionsRecord>().get("AK5PFchs",JetCorParColl); |
122 |
|
JetCorrectionUncertainty *jecUnc=0; |
123 |
|
// if (!runOnMC_){ |
124 |
|
JetCorrectorParameters const & JetCorPar = (*JetCorParColl)["Uncertainty"]; |
127 |
|
|
128 |
|
std::auto_ptr<VHbbEvent> hbbInfo( new VHbbEvent() ); |
129 |
|
std::auto_ptr<VHbbEventAuxInfo> auxInfo( new VHbbEventAuxInfo() ); |
130 |
< |
|
130 |
> |
|
131 |
> |
|
132 |
> |
if (runOnMC_){ |
133 |
> |
Handle<GenEventInfoProduct> evt_info; |
134 |
> |
iEvent.getByType(evt_info); |
135 |
> |
auxInfo->weightMCProd = evt_info->weight(); |
136 |
> |
} |
137 |
> |
else |
138 |
> |
{ auxInfo->weightMCProd =1.;} |
139 |
|
// |
140 |
|
// ?? |
141 |
< |
|
141 |
> |
|
142 |
|
// trigger |
143 |
|
|
144 |
|
// trigger |
186 |
|
|
187 |
|
auxInfo->pvInfo.firstPVInPT2 = TVector3(RecVtxFirst.x(), RecVtxFirst.y(), RecVtxFirst.z()); |
188 |
|
auxInfo->pvInfo.firstPVInProb = TVector3(RecVtx.x(), RecVtx.y(), RecVtx.z()); |
189 |
< |
|
189 |
> |
|
190 |
> |
(auxInfo->pvInfo).efirstPVInPT2 = (RecVtxFirst.error()); |
191 |
> |
(auxInfo->pvInfo).efirstPVInProb = RecVtx.error(); |
192 |
|
|
193 |
|
edm::Handle<double> rhoHandle; |
194 |
|
iEvent.getByLabel(edm::InputTag("kt6PFJets", "rho"),rhoHandle); |
195 |
|
auxInfo->puInfo.rho = *rhoHandle; |
196 |
< |
|
196 |
> |
|
197 |
> |
edm::Handle<double> rho25Handle; |
198 |
> |
iEvent.getByLabel(edm::InputTag("kt6PFJets25", "rho"),rho25Handle); |
199 |
> |
auxInfo->puInfo.rho25 = *rho25Handle; |
200 |
> |
|
201 |
|
edm::Handle<std::vector< PileupSummaryInfo> > puHandle; |
202 |
|
|
203 |
|
if (runOnMC_){ |
268 |
|
} |
269 |
|
auxInfo->mcW.push_back(wtemp); |
270 |
|
} |
271 |
+ |
|
272 |
+ |
if(abs(id)==15) { |
273 |
+ |
VHbbEventAuxInfo::ParticleMCInfo tautemp; |
274 |
+ |
tautemp.status=st; |
275 |
+ |
tautemp.charge=p.charge(); |
276 |
+ |
if(p.mother(0)!=0) tautemp.momid=p.mother(0)->pdgId(); |
277 |
+ |
if(p.mother(0)!=0 && p.mother(0)->mother(0)!=0) tautemp.gmomid=p.mother(0)->mother(0)->pdgId(); |
278 |
+ |
tautemp.p4=GENPTOLOR(p); |
279 |
+ |
|
280 |
+ |
int ndau = p.numberOfDaughters(); |
281 |
+ |
for(int j = 0; j < ndau; ++ j) { |
282 |
+ |
const Candidate * Taudau = p.daughter( j ); |
283 |
+ |
tautemp.dauid.push_back(Taudau->pdgId()); |
284 |
+ |
tautemp.dauFourMomentum.push_back(GENPTOLORP(Taudau)); |
285 |
+ |
} |
286 |
+ |
auxInfo->mcTau.push_back(tautemp); |
287 |
+ |
} |
288 |
|
|
289 |
|
if(abs(id)==23){ |
290 |
|
|
300 |
|
for(int j = 0; j < ndau; ++ j) { |
301 |
|
const Candidate * Zdau = p.daughter( j ); |
302 |
|
ztemp.dauid.push_back(Zdau->pdgId()); |
303 |
< |
ztemp.dauFourMomentum.push_back(GENPTOLOR(p)); |
303 |
> |
ztemp.dauFourMomentum.push_back(GENPTOLORP(Zdau)); |
304 |
|
} |
305 |
|
auxInfo->mcZ.push_back(ztemp); |
306 |
|
} |
388 |
|
iEvent.getByLabel(subjetLabel_,subjetHandle); |
389 |
|
edm::View<pat::Jet> subjets = *subjetHandle; |
390 |
|
|
391 |
+ |
// filter jet |
392 |
+ |
edm::Handle<edm::View<pat::Jet> > filterjetHandle; |
393 |
+ |
iEvent.getByLabel(filterjetLabel_,filterjetHandle); |
394 |
+ |
edm::View<pat::Jet> filterjets = *filterjetHandle; |
395 |
+ |
|
396 |
|
// standard jets |
397 |
|
|
398 |
|
edm::Handle<edm::View<pat::Jet> > simplejet1Handle; |
425 |
|
iEvent.getByLabel(tauLabel_,tauHandle); |
426 |
|
edm::View<pat::Tau> taus = *tauHandle; |
427 |
|
|
371 |
– |
edm::Handle<CandidateView> dimuons; |
372 |
– |
iEvent.getByLabel(dimuLabel_,dimuons); |
373 |
– |
|
374 |
– |
edm::Handle<CandidateView> dielectrons; |
375 |
– |
iEvent.getByLabel(dielecLabel_,dielectrons); |
428 |
|
|
429 |
|
//BTAGGING SCALE FACTOR FROM DATABASE |
430 |
|
//Combined Secondary Vertex Loose |
431 |
|
edm::ESHandle<BtagPerformance> bTagSF_CSVL_; |
432 |
|
iSetup.get<BTagPerformanceRecord>().get("BTAGCSVL",bTagSF_CSVL_); |
381 |
– |
const BtagPerformance & bTagSF_CSVL = *(bTagSF_CSVL_.product()); |
433 |
|
//Combined Secondary Vertex Medium |
434 |
|
edm::ESHandle<BtagPerformance> bTagSF_CSVM_; |
435 |
|
iSetup.get<BTagPerformanceRecord>().get("BTAGCSVM",bTagSF_CSVM_); |
385 |
– |
const BtagPerformance & bTagSF_CSVM = *(bTagSF_CSVM_.product()); |
436 |
|
//Combined Secondary Vertex Tight |
437 |
|
edm::ESHandle<BtagPerformance> bTagSF_CSVT_; |
438 |
|
iSetup.get<BTagPerformanceRecord>().get("BTAGCSVT",bTagSF_CSVT_); |
389 |
– |
const BtagPerformance & bTagSF_CSVT = *(bTagSF_CSVT_.product()); |
439 |
|
|
440 |
|
edm::ESHandle<BtagPerformance> mistagSF_CSVL_; |
441 |
|
iSetup.get<BTagPerformanceRecord>().get("MISTAGCSVL",mistagSF_CSVL_); |
393 |
– |
const BtagPerformance & mistagSF_CSVL = *(mistagSF_CSVL_.product()); |
442 |
|
//Combined Secondary Vertex Medium |
443 |
|
edm::ESHandle<BtagPerformance> mistagSF_CSVM_; |
444 |
|
iSetup.get<BTagPerformanceRecord>().get("MISTAGCSVM",mistagSF_CSVM_); |
397 |
– |
const BtagPerformance & mistagSF_CSVM = *(mistagSF_CSVM_.product()); |
445 |
|
//Combined Secondary Vertex Tight |
446 |
|
edm::ESHandle<BtagPerformance> mistagSF_CSVT_; |
447 |
|
iSetup.get<BTagPerformanceRecord>().get("MISTAGCSVT",mistagSF_CSVT_); |
401 |
– |
const BtagPerformance & mistagSF_CSVT = *(mistagSF_CSVT_.product()); |
448 |
|
|
449 |
|
BTagSFContainer btagSFs; |
450 |
|
btagSFs.BTAGSF_CSVL = (bTagSF_CSVL_.product()); |
454 |
|
btagSFs.MISTAGSF_CSVM = (mistagSF_CSVM_.product()); |
455 |
|
btagSFs.MISTAGSF_CSVT = (mistagSF_CSVT_.product()); |
456 |
|
|
457 |
+ |
#ifdef ENABLE_SIMPLEJETS1 |
458 |
|
for(edm::View<pat::Jet>::const_iterator jet_iter = simplejets1.begin(); jet_iter!=simplejets1.end(); ++jet_iter){ |
459 |
|
// if(jet_iter->pt()>50) |
460 |
|
// njetscounter++; |
461 |
|
VHbbEvent::SimpleJet sj; |
462 |
+ |
// std::cout <<" sj1"<<std::endl; |
463 |
|
fillSimpleJet(sj,jet_iter); |
464 |
|
// if(!runOnMC_) |
465 |
|
|
475 |
|
//genJet |
476 |
|
const reco::GenJet *gJ = jet_iter->genJet(); |
477 |
|
//physical parton for mother info ONLY |
478 |
< |
if( (jet_iter->genParton()) |
479 |
< |
and (jet_iter->genParton()->mother()) ) |
480 |
< |
sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId(); |
478 |
> |
if( (jet_iter->genParton()) ){ |
479 |
> |
sj.bestMCid = jet_iter->genParton()->pdgId(); |
480 |
> |
if( (jet_iter->genParton()->mother()) ) |
481 |
> |
sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId(); |
482 |
> |
} |
483 |
|
TLorentzVector gJp4; |
484 |
|
if(gJ){ |
485 |
|
gJp4.SetPtEtaPhiE(gJ->pt(),gJ->eta(),gJ->phi(),gJ->energy()); |
486 |
< |
sj. bestMCp4mom = gJp4; |
486 |
> |
sj.bestMCp4 = gJp4; |
487 |
|
if(verbose_){ |
488 |
|
std::clog << "genJet matched Pt = " << gJp4.Pt() << std::endl; |
489 |
|
std::clog << "genJet matched eta = " << gJp4.Eta() << std::endl; |
496 |
|
hbbInfo->simpleJets.push_back(sj); |
497 |
|
|
498 |
|
} |
499 |
+ |
#endif //ENABLE_SIMPLEJETS1 |
500 |
|
|
501 |
|
for(edm::View<pat::Jet>::const_iterator jet_iter = simplejets3.begin(); jet_iter!=simplejets3.end(); ++jet_iter){ |
502 |
|
// if(jet_iter->pt()>50) |
503 |
|
// njetscounter++; |
504 |
|
VHbbEvent::SimpleJet sj; |
505 |
+ |
// std::cout <<" sj3"<<std::endl; |
506 |
|
fillSimpleJet(sj,jet_iter); |
507 |
|
// if(!runOnMC_) |
508 |
|
setJecUnc(sj,jecUnc); |
509 |
|
|
458 |
– |
|
510 |
|
Particle::LorentzVector p4Jet = jet_iter->p4(); |
511 |
|
|
512 |
|
if(runOnMC_){ |
517 |
|
//genJet |
518 |
|
const reco::GenJet *gJ = jet_iter->genJet(); |
519 |
|
//physical parton for mother info ONLY |
520 |
< |
if( (jet_iter->genParton()) |
521 |
< |
and (jet_iter->genParton()->mother()) ) |
522 |
< |
sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId(); |
520 |
> |
if( (jet_iter->genParton()) ){ |
521 |
> |
sj.bestMCid = jet_iter->genParton()->pdgId(); |
522 |
> |
if( (jet_iter->genParton()->mother()) ) |
523 |
> |
sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId(); |
524 |
> |
} |
525 |
|
TLorentzVector gJp4; |
526 |
|
if(gJ){ |
527 |
|
gJp4.SetPtEtaPhiE(gJ->pt(),gJ->eta(),gJ->phi(),gJ->energy()); |
528 |
< |
sj. bestMCp4mom = gJp4; |
528 |
> |
sj.bestMCp4 = gJp4; |
529 |
|
if(verbose_){ |
530 |
|
std::clog << "genJet matched Pt = " << gJp4.Pt() << std::endl; |
531 |
|
std::clog << "genJet matched eta = " << gJp4.Eta() << std::endl; |
535 |
|
} |
536 |
|
|
537 |
|
} //isMC |
538 |
+ |
// |
539 |
+ |
|
540 |
+ |
|
541 |
|
hbbInfo->simpleJets3.push_back(sj); |
542 |
|
|
543 |
|
} |
544 |
|
|
545 |
+ |
#ifdef ENABLE_SIMPLEJETS4 |
546 |
|
for(edm::View<pat::Jet>::const_iterator jet_iter = simplejets4.begin(); jet_iter!=simplejets4.end(); ++jet_iter){ |
547 |
|
// if(jet_iter->pt()>50) |
548 |
|
// njetscounter++; |
549 |
|
VHbbEvent::SimpleJet sj; |
550 |
+ |
// std::cout <<" sj4"<<std::endl; |
551 |
|
fillSimpleJet(sj,jet_iter); |
552 |
|
// if(!runOnMC_) |
553 |
|
setJecUnc(sj,jecUnc); |
563 |
|
//genJet |
564 |
|
const reco::GenJet *gJ = jet_iter->genJet(); |
565 |
|
//physical parton for mother info ONLY |
566 |
< |
if( (jet_iter->genParton()) |
567 |
< |
and (jet_iter->genParton()->mother()) ) |
568 |
< |
sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId(); |
566 |
> |
if( (jet_iter->genParton()) ){ |
567 |
> |
sj.bestMCid = jet_iter->genParton()->pdgId(); |
568 |
> |
if( (jet_iter->genParton()->mother()) ) |
569 |
> |
sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId(); |
570 |
> |
} |
571 |
|
TLorentzVector gJp4; |
572 |
|
if(gJ){ |
573 |
|
gJp4.SetPtEtaPhiE(gJ->pt(),gJ->eta(),gJ->phi(),gJ->energy()); |
574 |
< |
sj. bestMCp4mom = gJp4; |
574 |
> |
sj.bestMCp4 = gJp4; |
575 |
|
if(verbose_){ |
576 |
|
std::clog << "genJet matched Pt = " << gJp4.Pt() << std::endl; |
577 |
|
std::clog << "genJet matched eta = " << gJp4.Eta() << std::endl; |
584 |
|
hbbInfo->simpleJets4.push_back(sj); |
585 |
|
|
586 |
|
} |
587 |
< |
|
587 |
> |
#endif //ENABLE SIMPLEJETS4 |
588 |
> |
|
589 |
|
|
590 |
|
for(edm::View<pat::Jet>::const_iterator jet_iter = simplejets2.begin(); jet_iter!=simplejets2.end(); ++jet_iter){ |
591 |
|
|
592 |
|
VHbbEvent::SimpleJet sj; |
593 |
+ |
// std::cout <<" sj2"<<std::endl; |
594 |
|
fillSimpleJet(sj,jet_iter); |
595 |
|
// if(!runOnMC_) |
596 |
|
setJecUnc(sj,jecUnc); |
637 |
|
*/ |
638 |
|
Particle::LorentzVector p4Jet = jet_iter->p4(); |
639 |
|
|
578 |
– |
|
640 |
|
if(runOnMC_){ |
641 |
|
|
642 |
|
//BTV scale factors |
646 |
|
//genJet |
647 |
|
const reco::GenJet *gJ = jet_iter->genJet(); |
648 |
|
//physical parton for mother info ONLY |
649 |
< |
if( (jet_iter->genParton()) |
650 |
< |
and (jet_iter->genParton()->mother()) ) |
651 |
< |
sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId(); |
649 |
> |
if( (jet_iter->genParton()) ){ |
650 |
> |
sj.bestMCid = jet_iter->genParton()->pdgId(); |
651 |
> |
if( (jet_iter->genParton()->mother()) ) |
652 |
> |
sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId(); |
653 |
> |
} |
654 |
|
TLorentzVector gJp4; |
655 |
|
if(gJ){ |
656 |
|
gJp4.SetPtEtaPhiE(gJ->pt(),gJ->eta(),gJ->phi(),gJ->energy()); |
657 |
< |
sj. bestMCp4mom = gJp4; |
657 |
> |
sj.bestMCp4 = gJp4; |
658 |
|
if(verbose_){ |
659 |
|
std::clog << "genJet matched Pt = " << gJp4.Pt() << std::endl; |
660 |
|
std::clog << "genJet matched eta = " << gJp4.Eta() << std::endl; |
663 |
|
} |
664 |
|
} |
665 |
|
|
666 |
< |
} //isMC |
666 |
> |
// add flag if a mc lepton is find inside a cone around the jets... |
667 |
> |
iEvent.getByLabel("genParticles", genParticles); |
668 |
> |
|
669 |
> |
for(size_t i = 0; i < genParticles->size(); ++ i) { |
670 |
> |
|
671 |
> |
const GenParticle & p = (*genParticles)[i]; |
672 |
> |
int id = 0; |
673 |
> |
p.pt()> lep_ptCutForBjets_ ? id= p.pdgId(): 0; |
674 |
> |
|
675 |
> |
// std::cout<< "found a muon with pt " << mu->pt() << std::endl; |
676 |
> |
if ((abs(id)==13 || abs(id)==11) && deltaR(p.eta(), p.phi(), sj.p4.Eta(), sj.p4.Phi() ) <0.5) sj.isSemiLeptMCtruth=1; |
677 |
> |
} |
678 |
> |
|
679 |
> |
} //isMC |
680 |
> |
|
681 |
> |
// add flag if a reco lepton is find inside a cone around the jets... |
682 |
> |
edm::Handle<edm::View<reco::Candidate> > muonNoCutsHandle; |
683 |
> |
iEvent.getByLabel(muonoCutsLabel_,muonNoCutsHandle); |
684 |
> |
edm::View<reco::Candidate> muonsNoCuts = *muonNoCutsHandle; |
685 |
> |
|
686 |
> |
|
687 |
> |
|
688 |
> |
for(edm::View<reco::Candidate>::const_iterator mu = muonsNoCuts.begin(); mu!=muonsNoCuts.end() && sj.isSemiLept!=1; ++mu){ |
689 |
> |
// std::cout<< "found a muon with pt " << mu->pt() << std::endl; |
690 |
> |
const pat::Muon& m = static_cast <const pat::Muon&> (*mu); |
691 |
> |
float Smpt = m.pt(); |
692 |
> |
float Smeta = m.eta(); |
693 |
> |
float Smphi = m.phi(); |
694 |
> |
|
695 |
> |
float SmJdR = deltaR(Smeta, Smphi, sj.p4.Eta(), sj.p4.Phi()); |
696 |
> |
|
697 |
> |
if ( Smpt> lep_ptCutForBjets_ && SmJdR <0.5) { |
698 |
> |
sj.isSemiLept=1; |
699 |
> |
//isSemiLept(-99), isSemiLeptMCtruth(-99), SoftLeptPt(-99), SoftLeptdR(-99), SoftLeptptRel(-99), SoftLeptpdgId(-99), SoftLeptIdlooseMu(-99), SoftLeptId95(-99), SoftLeptRelCombIso(-99), |
700 |
> |
sj.SoftLeptpdgId =13; |
701 |
> |
sj.SoftLeptdR= SmJdR; |
702 |
> |
sj.SoftLeptPt=Smpt; |
703 |
> |
TVector3 mvec ( m.p4().Vect().X(), m.p4().Vect().Y(), m.p4().Vect().Z() ); |
704 |
> |
sj.SoftLeptptRel= sj.p4.Perp( mvec ); |
705 |
> |
sj.SoftLeptRelCombIso = (m.trackIso() + m.ecalIso() + m.hcalIso() ) / Smpt ; |
706 |
> |
sj.SoftLeptIdlooseMu=m.muonID("TMLastStationLoose"); |
707 |
> |
} |
708 |
> |
} |
709 |
> |
|
710 |
> |
|
711 |
> |
edm::Handle<edm::View<reco::Candidate> > eleNoCutsHandle; |
712 |
> |
iEvent.getByLabel(elenoCutsLabel_,eleNoCutsHandle); |
713 |
> |
edm::View<reco::Candidate> elesNoCuts = *eleNoCutsHandle; |
714 |
> |
|
715 |
> |
|
716 |
> |
|
717 |
> |
for(edm::View<reco::Candidate>::const_iterator ele = elesNoCuts.begin(); ele!=elesNoCuts.end() && sj.isSemiLept!=1; ++ele){ |
718 |
> |
|
719 |
> |
const pat::Electron& e = static_cast <const pat::Electron&> (*ele); |
720 |
> |
float Smpt = e.pt(); |
721 |
> |
float Smeta = e.eta(); |
722 |
> |
float Smphi = e.phi(); |
723 |
> |
|
724 |
> |
float SmJdR = deltaR(Smeta, Smphi, sj.p4.Eta(), sj.p4.Phi()); |
725 |
> |
if ( Smpt> lep_ptCutForBjets_ && SmJdR <0.5) { |
726 |
> |
sj.isSemiLept=1; |
727 |
> |
sj.SoftLeptpdgId =11; |
728 |
> |
sj.SoftLeptdR= SmJdR; |
729 |
> |
sj.SoftLeptPt=Smpt; |
730 |
> |
TVector3 mvec ( e.p4().Vect().X(), e.p4().Vect().Y(), e.p4().Vect().Z() ); |
731 |
> |
sj.SoftLeptptRel= sj.p4.Perp( mvec ); |
732 |
> |
sj.SoftLeptRelCombIso = (e.trackIso() + e.ecalIso() + e.hcalIso() ) / Smpt ; |
733 |
> |
// sj.SoftLeptId95=e.electronID("eidVBTFCom95"); |
734 |
> |
//std::cout << "before ele id " << std::endl; |
735 |
> |
// std::cout << " e.e.sigmaIetaIeta " << e.sigmaIetaIeta() << std::endl; |
736 |
> |
//std::cout << " e.isEB() " << e.isEB() << std::endl; |
737 |
> |
if ( |
738 |
> |
( fabs(Smeta)<2.5 && !( abs(Smeta)>1.4442 && abs(Smeta)<1.566)) && |
739 |
> |
|
740 |
> |
(( abs(Smeta)>1.566 && (e.sigmaIetaIeta()<0.01) && ( e.deltaPhiSuperClusterTrackAtVtx()<0.8 && e.deltaPhiSuperClusterTrackAtVtx()>-0.8) && ( e.deltaEtaSuperClusterTrackAtVtx()<0.007 && e.deltaEtaSuperClusterTrackAtVtx()>-0.007 ) ) |
741 |
> |
|| ( abs(Smeta)<1.4442 && (e.sigmaIetaIeta()<0.03) && ( e.deltaPhiSuperClusterTrackAtVtx()<0.7 && e.deltaPhiSuperClusterTrackAtVtx()>-0.7 ) && ( e.deltaEtaSuperClusterTrackAtVtx()<0.01 && e.deltaEtaSuperClusterTrackAtVtx()>-0.01 ) )) |
742 |
> |
) |
743 |
> |
sj.SoftLeptId95=1; |
744 |
> |
} |
745 |
> |
} |
746 |
> |
|
747 |
> |
|
748 |
> |
|
749 |
> |
|
750 |
|
|
751 |
|
hbbInfo->simpleJets2.push_back(sj); |
752 |
|
|
817 |
|
<< "," << subjet_iter->bDiscriminator("combinedSecondaryVertexBJetTags") << "\n";} |
818 |
|
|
819 |
|
VHbbEvent::SimpleJet sj; |
820 |
+ |
// std::cout <<" sub jet "<<std::endl; |
821 |
|
fillSimpleJet(sj,subjet_iter); |
822 |
|
// if(!runOnMC_) |
823 |
|
setJecUnc(sj,jecUnc); |
853 |
|
|
854 |
|
} |
855 |
|
|
856 |
+ |
for(edm::View<pat::Jet>::const_iterator filterjet_iter = filterjets.begin(); filterjet_iter!=filterjets.end(); ++filterjet_iter){ |
857 |
+ |
|
858 |
+ |
if(printJet) {std::cout << "FilterjetTagged Pt: " << filterjet_iter->pt() << " E,M,eta,phi,Btag: " << filterjet_iter->p4().E() << "," << filterjet_iter->p4().M() << "," << filterjet_iter->eta() << "," << filterjet_iter->phi() << "," << filterjet_iter->bDiscriminator("combinedSecondaryVertexBJetTags") << "\n";} |
859 |
+ |
|
860 |
+ |
VHbbEvent::SimpleJet fj; |
861 |
+ |
// std::cout <<" sub jet "<<std::endl; |
862 |
+ |
fillSimpleJet(fj,filterjet_iter); |
863 |
+ |
// if(!runOnMC_) |
864 |
+ |
setJecUnc(fj,jecUnc); |
865 |
+ |
|
866 |
+ |
hbbInfo->filterJets.push_back(fj); |
867 |
+ |
|
868 |
+ |
|
869 |
+ |
} |
870 |
+ |
|
871 |
+ |
// |
872 |
+ |
// add charged met |
873 |
+ |
// |
874 |
+ |
|
875 |
+ |
edm::Handle<edm::View<reco::MET> > metChargedHandle; |
876 |
+ |
iEvent.getByLabel("pfMETNoPUCharge",metChargedHandle); |
877 |
+ |
edm::View<reco::MET> metsCh = *metChargedHandle; |
878 |
+ |
if(metsCh.size()){ |
879 |
+ |
hbbInfo->metCh.sumEt=(metsCh[0]).sumEt(); |
880 |
+ |
hbbInfo->metCh.metSig=metSignificance(& (metsCh[0])); |
881 |
+ |
hbbInfo->metCh.eLong=(metsCh[0]).e_longitudinal(); |
882 |
+ |
hbbInfo->metCh.p4=GENPTOLOR((metsCh[0])); |
883 |
+ |
if (verbose_) std::cout <<" METCharged "<< hbbInfo->metCh.metSig <<" " << hbbInfo->metCh.sumEt<<std::endl; |
884 |
+ |
} |
885 |
+ |
|
886 |
+ |
// type 1 corr met |
887 |
+ |
edm::Handle<edm::View<reco::MET> > pfmetType1corrHandle; |
888 |
+ |
iEvent.getByLabel("patType1CorrectedPFMet",pfmetType1corrHandle); |
889 |
+ |
edm::View<reco::MET> pfmetsType1corr = *pfmetType1corrHandle; |
890 |
+ |
if(pfmetsType1corr.size()){ |
891 |
+ |
hbbInfo->pfmetType1corr.sumEt=(pfmetsType1corr[0]).sumEt(); |
892 |
+ |
hbbInfo->pfmetType1corr.metSig=metSignificance(& (pfmetsType1corr[0])); |
893 |
+ |
hbbInfo->pfmetType1corr.eLong=(pfmetsType1corr[0]).e_longitudinal(); |
894 |
+ |
hbbInfo->pfmetType1corr.p4=GENPTOLOR((pfmetsType1corr[0])); |
895 |
+ |
if (verbose_) std::cout <<" type 1 corrected pfMET "<< hbbInfo->pfmetType1corr.metSig <<" " << hbbInfo->pfmetType1corr.sumEt<<std::endl; |
896 |
+ |
} |
897 |
+ |
|
898 |
+ |
|
899 |
+ |
// type 1 + 2 corr met |
900 |
+ |
edm::Handle<edm::View<reco::MET> > pfmetType1p2corrHandle; |
901 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMet",pfmetType1p2corrHandle); |
902 |
+ |
edm::View<reco::MET> pfmetsType1p2corr = *pfmetType1p2corrHandle; |
903 |
+ |
if(pfmetsType1p2corr.size()){ |
904 |
+ |
hbbInfo->pfmetType1p2corr.sumEt=(pfmetsType1p2corr[0]).sumEt(); |
905 |
+ |
hbbInfo->pfmetType1p2corr.metSig=metSignificance(& (pfmetsType1p2corr[0])); |
906 |
+ |
hbbInfo->pfmetType1p2corr.eLong=(pfmetsType1p2corr[0]).e_longitudinal(); |
907 |
+ |
hbbInfo->pfmetType1p2corr.p4=GENPTOLOR((pfmetsType1p2corr[0])); |
908 |
+ |
if (verbose_) std::cout <<" type 1 +2 corrected pfMET "<< hbbInfo->pfmetType1p2corr.metSig <<" " << hbbInfo->pfmetType1p2corr.sumEt<<std::endl; |
909 |
+ |
} |
910 |
+ |
|
911 |
+ |
// type 1 corr met NoPU |
912 |
+ |
edm::Handle<edm::View<reco::MET> > pfmetNoPUType1corrHandle; |
913 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetNoPU",pfmetNoPUType1corrHandle); |
914 |
+ |
edm::View<reco::MET> pfmetsNoPUType1corr = *pfmetNoPUType1corrHandle; |
915 |
+ |
if(pfmetsNoPUType1corr.size()){ |
916 |
+ |
hbbInfo->pfmetNoPUType1corr.sumEt=(pfmetsNoPUType1corr[0]).sumEt(); |
917 |
+ |
hbbInfo->pfmetNoPUType1corr.metSig=metSignificance(& (pfmetsNoPUType1corr[0])); |
918 |
+ |
hbbInfo->pfmetNoPUType1corr.eLong=(pfmetsNoPUType1corr[0]).e_longitudinal(); |
919 |
+ |
hbbInfo->pfmetNoPUType1corr.p4=GENPTOLOR((pfmetsNoPUType1corr[0])); |
920 |
+ |
if (verbose_) std::cout <<" type 1 corrected pfMET NoPU"<< hbbInfo->pfmetNoPUType1corr.metSig <<" " << hbbInfo->pfmetNoPUType1corr.sumEt<<std::endl; |
921 |
+ |
} |
922 |
+ |
|
923 |
+ |
|
924 |
+ |
// type 1 + 2 corr met |
925 |
+ |
edm::Handle<edm::View<reco::MET> > pfmetNoPUType1p2corrHandle; |
926 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetNoPU",pfmetNoPUType1p2corrHandle); |
927 |
+ |
edm::View<reco::MET> pfmetsNoPUType1p2corr = *pfmetNoPUType1p2corrHandle; |
928 |
+ |
if(pfmetsNoPUType1p2corr.size()){ |
929 |
+ |
hbbInfo->pfmetNoPUType1p2corr.sumEt=(pfmetsNoPUType1p2corr[0]).sumEt(); |
930 |
+ |
hbbInfo->pfmetNoPUType1p2corr.metSig=metSignificance(& (pfmetsNoPUType1p2corr[0])); |
931 |
+ |
hbbInfo->pfmetNoPUType1p2corr.eLong=(pfmetsNoPUType1p2corr[0]).e_longitudinal(); |
932 |
+ |
hbbInfo->pfmetNoPUType1p2corr.p4=GENPTOLOR((pfmetsNoPUType1p2corr[0])); |
933 |
+ |
if (verbose_) std::cout <<" type 1 +2 corrected pfMET "<< hbbInfo->pfmetNoPUType1p2corr.metSig <<" " << hbbInfo->pfmetNoPUType1p2corr.sumEt<<std::endl; |
934 |
+ |
} |
935 |
+ |
|
936 |
+ |
|
937 |
+ |
/* |
938 |
+ |
// MET uncertainty vector |
939 |
+ |
vector<pat::MET> "patType1CorrectedPFMet" "" "VH" |
940 |
+ |
vector<pat::MET> "patType1CorrectedPFMetElectronEnDown" "" "VH" |
941 |
+ |
vector<pat::MET> "patType1CorrectedPFMetElectronEnUp" "" "VH" |
942 |
+ |
vector<pat::MET> "patType1CorrectedPFMetJetEnDown" "" "VH" |
943 |
+ |
vector<pat::MET> "patType1CorrectedPFMetJetEnUp" "" "VH" |
944 |
+ |
vector<pat::MET> "patType1CorrectedPFMetJetResDown" "" "VH" |
945 |
+ |
vector<pat::MET> "patType1CorrectedPFMetJetResUp" "" "VH" |
946 |
+ |
vector<pat::MET> "patType1CorrectedPFMetMuonEnDown" "" "VH" |
947 |
+ |
vector<pat::MET> "patType1CorrectedPFMetMuonEnUp" "" "VH" |
948 |
+ |
vector<pat::MET> "patType1CorrectedPFMetNoPU" "" "VH" |
949 |
+ |
vector<pat::MET> "patType1CorrectedPFMetTauEnDown" "" "VH" |
950 |
+ |
vector<pat::MET> "patType1CorrectedPFMetTauEnUp" "" "VH" |
951 |
+ |
vector<pat::MET> "patType1CorrectedPFMetUnclusteredEnDown" "" "VH" |
952 |
+ |
vector<pat::MET> "patType1CorrectedPFMetUnclusteredEnUp" "" "VH" |
953 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMet" "" "VH" |
954 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetElectronEnDown" "" "VH" |
955 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetElectronEnUp" "" "VH" |
956 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetJetEnDown" "" "VH" |
957 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetJetEnUp" "" "VH" |
958 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetJetResDown" "" "VH" |
959 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetJetResUp" "" "VH" |
960 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetMuonEnDown" "" "VH" |
961 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetMuonEnUp" "" "VH" |
962 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetNoPU" "" "VH" |
963 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetTauEnDown" "" "VH" |
964 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetTauEnUp" "" "VH" |
965 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetUnclusteredEnDown" "" "VH" |
966 |
+ |
vector<pat::MET> "patType1p2CorrectedPFMetUnclusteredEnUp" "" "VH" |
967 |
+ |
*/ |
968 |
+ |
|
969 |
+ |
VHbbEvent::METInfo metunc; |
970 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetElectronEnDownHandle; |
971 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetElectronEnDown",patType1CorrectedPFMetElectronEnDownHandle); |
972 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsElectronEnDown = *patType1CorrectedPFMetElectronEnDownHandle; |
973 |
+ |
if(patType1CorrectedPFMetsElectronEnDown.size()){ |
974 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsElectronEnDown[0]).sumEt(); |
975 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsElectronEnDown[0])); |
976 |
+ |
metunc.eLong=(patType1CorrectedPFMetsElectronEnDown[0]).e_longitudinal(); |
977 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsElectronEnDown[0])); |
978 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
979 |
+ |
} |
980 |
+ |
|
981 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetElectronEnUpHandle; |
982 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetElectronEnUp",patType1CorrectedPFMetElectronEnUpHandle); |
983 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsElectronEnUp = *patType1CorrectedPFMetElectronEnUpHandle; |
984 |
+ |
if(patType1CorrectedPFMetsElectronEnUp.size()){ |
985 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsElectronEnUp[0]).sumEt(); |
986 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsElectronEnUp[0])); |
987 |
+ |
metunc.eLong=(patType1CorrectedPFMetsElectronEnUp[0]).e_longitudinal(); |
988 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsElectronEnUp[0])); |
989 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
990 |
+ |
} |
991 |
+ |
|
992 |
+ |
|
993 |
+ |
|
994 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetMuonEnDownHandle; |
995 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetMuonEnDown",patType1CorrectedPFMetMuonEnDownHandle); |
996 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsMuonEnDown = *patType1CorrectedPFMetMuonEnDownHandle; |
997 |
+ |
if(patType1CorrectedPFMetsMuonEnDown.size()){ |
998 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsMuonEnDown[0]).sumEt(); |
999 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsMuonEnDown[0])); |
1000 |
+ |
metunc.eLong=(patType1CorrectedPFMetsMuonEnDown[0]).e_longitudinal(); |
1001 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsMuonEnDown[0])); |
1002 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1003 |
+ |
} |
1004 |
+ |
|
1005 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetMuonEnUpHandle; |
1006 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetMuonEnUp",patType1CorrectedPFMetMuonEnUpHandle); |
1007 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsMuonEnUp = *patType1CorrectedPFMetMuonEnUpHandle; |
1008 |
+ |
if(patType1CorrectedPFMetsMuonEnUp.size()){ |
1009 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsMuonEnUp[0]).sumEt(); |
1010 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsMuonEnUp[0])); |
1011 |
+ |
metunc.eLong=(patType1CorrectedPFMetsMuonEnUp[0]).e_longitudinal(); |
1012 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsMuonEnUp[0])); |
1013 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1014 |
+ |
} |
1015 |
+ |
|
1016 |
+ |
|
1017 |
+ |
|
1018 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetTauEnDownHandle; |
1019 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetTauEnDown",patType1CorrectedPFMetTauEnDownHandle); |
1020 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsTauEnDown = *patType1CorrectedPFMetTauEnDownHandle; |
1021 |
+ |
if(patType1CorrectedPFMetsTauEnDown.size()){ |
1022 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsTauEnDown[0]).sumEt(); |
1023 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsTauEnDown[0])); |
1024 |
+ |
metunc.eLong=(patType1CorrectedPFMetsTauEnDown[0]).e_longitudinal(); |
1025 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsTauEnDown[0])); |
1026 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1027 |
+ |
} |
1028 |
+ |
|
1029 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetTauEnUpHandle; |
1030 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetTauEnUp",patType1CorrectedPFMetTauEnUpHandle); |
1031 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsTauEnUp = *patType1CorrectedPFMetTauEnUpHandle; |
1032 |
+ |
if(patType1CorrectedPFMetsTauEnUp.size()){ |
1033 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsTauEnUp[0]).sumEt(); |
1034 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsTauEnUp[0])); |
1035 |
+ |
metunc.eLong=(patType1CorrectedPFMetsTauEnUp[0]).e_longitudinal(); |
1036 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsTauEnUp[0])); |
1037 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1038 |
+ |
} |
1039 |
+ |
|
1040 |
+ |
|
1041 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetJetEnDownHandle; |
1042 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetJetEnDown",patType1CorrectedPFMetJetEnDownHandle); |
1043 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsJetEnDown = *patType1CorrectedPFMetJetEnDownHandle; |
1044 |
+ |
if(patType1CorrectedPFMetsJetEnDown.size()){ |
1045 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsJetEnDown[0]).sumEt(); |
1046 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsJetEnDown[0])); |
1047 |
+ |
metunc.eLong=(patType1CorrectedPFMetsJetEnDown[0]).e_longitudinal(); |
1048 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsJetEnDown[0])); |
1049 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1050 |
+ |
} |
1051 |
+ |
|
1052 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetJetEnUpHandle; |
1053 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetJetEnUp",patType1CorrectedPFMetJetEnUpHandle); |
1054 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsJetEnUp = *patType1CorrectedPFMetJetEnUpHandle; |
1055 |
+ |
if(patType1CorrectedPFMetsJetEnUp.size()){ |
1056 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsJetEnUp[0]).sumEt(); |
1057 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsJetEnUp[0])); |
1058 |
+ |
metunc.eLong=(patType1CorrectedPFMetsJetEnUp[0]).e_longitudinal(); |
1059 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsJetEnUp[0])); |
1060 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1061 |
+ |
} |
1062 |
+ |
|
1063 |
+ |
|
1064 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetJetResDownHandle; |
1065 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetJetResDown",patType1CorrectedPFMetJetResDownHandle); |
1066 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsJetResDown = *patType1CorrectedPFMetJetResDownHandle; |
1067 |
+ |
if(patType1CorrectedPFMetsJetResDown.size()){ |
1068 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsJetResDown[0]).sumEt(); |
1069 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsJetResDown[0])); |
1070 |
+ |
metunc.eLong=(patType1CorrectedPFMetsJetResDown[0]).e_longitudinal(); |
1071 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsJetResDown[0])); |
1072 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1073 |
+ |
} |
1074 |
+ |
|
1075 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetJetResUpHandle; |
1076 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetJetResUp",patType1CorrectedPFMetJetResUpHandle); |
1077 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsJetResUp = *patType1CorrectedPFMetJetResUpHandle; |
1078 |
+ |
if(patType1CorrectedPFMetsJetResUp.size()){ |
1079 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsJetResUp[0]).sumEt(); |
1080 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsJetResUp[0])); |
1081 |
+ |
metunc.eLong=(patType1CorrectedPFMetsJetResUp[0]).e_longitudinal(); |
1082 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsJetResUp[0])); |
1083 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1084 |
+ |
} |
1085 |
+ |
|
1086 |
+ |
|
1087 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetUnclusteredEnDownHandle; |
1088 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetUnclusteredEnDown",patType1CorrectedPFMetUnclusteredEnDownHandle); |
1089 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsUnclusteredEnDown = *patType1CorrectedPFMetUnclusteredEnDownHandle; |
1090 |
+ |
if(patType1CorrectedPFMetsUnclusteredEnDown.size()){ |
1091 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsUnclusteredEnDown[0]).sumEt(); |
1092 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsUnclusteredEnDown[0])); |
1093 |
+ |
metunc.eLong=(patType1CorrectedPFMetsUnclusteredEnDown[0]).e_longitudinal(); |
1094 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsUnclusteredEnDown[0])); |
1095 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1096 |
+ |
} |
1097 |
+ |
|
1098 |
+ |
edm::Handle<edm::View<reco::MET> > patType1CorrectedPFMetUnclusteredEnUpHandle; |
1099 |
+ |
iEvent.getByLabel("patType1CorrectedPFMetUnclusteredEnUp",patType1CorrectedPFMetUnclusteredEnUpHandle); |
1100 |
+ |
edm::View<reco::MET> patType1CorrectedPFMetsUnclusteredEnUp = *patType1CorrectedPFMetUnclusteredEnUpHandle; |
1101 |
+ |
if(patType1CorrectedPFMetsUnclusteredEnUp.size()){ |
1102 |
+ |
metunc.sumEt =(patType1CorrectedPFMetsUnclusteredEnUp[0]).sumEt(); |
1103 |
+ |
metunc.metSig=metSignificance(& (patType1CorrectedPFMetsUnclusteredEnUp[0])); |
1104 |
+ |
metunc.eLong=(patType1CorrectedPFMetsUnclusteredEnUp[0]).e_longitudinal(); |
1105 |
+ |
metunc.p4=GENPTOLOR((patType1CorrectedPFMetsUnclusteredEnUp[0])); |
1106 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1107 |
+ |
} |
1108 |
+ |
|
1109 |
+ |
|
1110 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetElectronEnDownHandle; |
1111 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetElectronEnDown",patType1p2CorrectedPFMetElectronEnDownHandle); |
1112 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsElectronEnDown = *patType1p2CorrectedPFMetElectronEnDownHandle; |
1113 |
+ |
if(patType1p2CorrectedPFMetsElectronEnDown.size()){ |
1114 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsElectronEnDown[0]).sumEt(); |
1115 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsElectronEnDown[0])); |
1116 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsElectronEnDown[0]).e_longitudinal(); |
1117 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsElectronEnDown[0])); |
1118 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1119 |
+ |
} |
1120 |
+ |
|
1121 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetElectronEnUpHandle; |
1122 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetElectronEnUp",patType1p2CorrectedPFMetElectronEnUpHandle); |
1123 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsElectronEnUp = *patType1p2CorrectedPFMetElectronEnUpHandle; |
1124 |
+ |
if(patType1p2CorrectedPFMetsElectronEnUp.size()){ |
1125 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsElectronEnUp[0]).sumEt(); |
1126 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsElectronEnUp[0])); |
1127 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsElectronEnUp[0]).e_longitudinal(); |
1128 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsElectronEnUp[0])); |
1129 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1130 |
+ |
} |
1131 |
+ |
|
1132 |
+ |
|
1133 |
+ |
|
1134 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetMuonEnDownHandle; |
1135 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetMuonEnDown",patType1p2CorrectedPFMetMuonEnDownHandle); |
1136 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsMuonEnDown = *patType1p2CorrectedPFMetMuonEnDownHandle; |
1137 |
+ |
if(patType1p2CorrectedPFMetsMuonEnDown.size()){ |
1138 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsMuonEnDown[0]).sumEt(); |
1139 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsMuonEnDown[0])); |
1140 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsMuonEnDown[0]).e_longitudinal(); |
1141 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsMuonEnDown[0])); |
1142 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1143 |
+ |
} |
1144 |
+ |
|
1145 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetMuonEnUpHandle; |
1146 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetMuonEnUp",patType1p2CorrectedPFMetMuonEnUpHandle); |
1147 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsMuonEnUp = *patType1p2CorrectedPFMetMuonEnUpHandle; |
1148 |
+ |
if(patType1p2CorrectedPFMetsMuonEnUp.size()){ |
1149 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsMuonEnUp[0]).sumEt(); |
1150 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsMuonEnUp[0])); |
1151 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsMuonEnUp[0]).e_longitudinal(); |
1152 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsMuonEnUp[0])); |
1153 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1154 |
+ |
} |
1155 |
+ |
|
1156 |
+ |
|
1157 |
+ |
|
1158 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetTauEnDownHandle; |
1159 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetTauEnDown",patType1p2CorrectedPFMetTauEnDownHandle); |
1160 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsTauEnDown = *patType1p2CorrectedPFMetTauEnDownHandle; |
1161 |
+ |
if(patType1p2CorrectedPFMetsTauEnDown.size()){ |
1162 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsTauEnDown[0]).sumEt(); |
1163 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsTauEnDown[0])); |
1164 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsTauEnDown[0]).e_longitudinal(); |
1165 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsTauEnDown[0])); |
1166 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1167 |
+ |
} |
1168 |
+ |
|
1169 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetTauEnUpHandle; |
1170 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetTauEnUp",patType1p2CorrectedPFMetTauEnUpHandle); |
1171 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsTauEnUp = *patType1p2CorrectedPFMetTauEnUpHandle; |
1172 |
+ |
if(patType1p2CorrectedPFMetsTauEnUp.size()){ |
1173 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsTauEnUp[0]).sumEt(); |
1174 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsTauEnUp[0])); |
1175 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsTauEnUp[0]).e_longitudinal(); |
1176 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsTauEnUp[0])); |
1177 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1178 |
+ |
} |
1179 |
+ |
|
1180 |
+ |
|
1181 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetJetEnDownHandle; |
1182 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetJetEnDown",patType1p2CorrectedPFMetJetEnDownHandle); |
1183 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsJetEnDown = *patType1p2CorrectedPFMetJetEnDownHandle; |
1184 |
+ |
if(patType1p2CorrectedPFMetsJetEnDown.size()){ |
1185 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsJetEnDown[0]).sumEt(); |
1186 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsJetEnDown[0])); |
1187 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsJetEnDown[0]).e_longitudinal(); |
1188 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsJetEnDown[0])); |
1189 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1190 |
+ |
} |
1191 |
+ |
|
1192 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetJetEnUpHandle; |
1193 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetJetEnUp",patType1p2CorrectedPFMetJetEnUpHandle); |
1194 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsJetEnUp = *patType1p2CorrectedPFMetJetEnUpHandle; |
1195 |
+ |
if(patType1p2CorrectedPFMetsJetEnUp.size()){ |
1196 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsJetEnUp[0]).sumEt(); |
1197 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsJetEnUp[0])); |
1198 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsJetEnUp[0]).e_longitudinal(); |
1199 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsJetEnUp[0])); |
1200 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1201 |
+ |
} |
1202 |
+ |
|
1203 |
+ |
|
1204 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetJetResDownHandle; |
1205 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetJetResDown",patType1p2CorrectedPFMetJetResDownHandle); |
1206 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsJetResDown = *patType1p2CorrectedPFMetJetResDownHandle; |
1207 |
+ |
if(patType1p2CorrectedPFMetsJetResDown.size()){ |
1208 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsJetResDown[0]).sumEt(); |
1209 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsJetResDown[0])); |
1210 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsJetResDown[0]).e_longitudinal(); |
1211 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsJetResDown[0])); |
1212 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1213 |
+ |
} |
1214 |
+ |
|
1215 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetJetResUpHandle; |
1216 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetJetResUp",patType1p2CorrectedPFMetJetResUpHandle); |
1217 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsJetResUp = *patType1p2CorrectedPFMetJetResUpHandle; |
1218 |
+ |
if(patType1p2CorrectedPFMetsJetResUp.size()){ |
1219 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsJetResUp[0]).sumEt(); |
1220 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsJetResUp[0])); |
1221 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsJetResUp[0]).e_longitudinal(); |
1222 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsJetResUp[0])); |
1223 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1224 |
+ |
} |
1225 |
+ |
|
1226 |
+ |
|
1227 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetUnclusteredEnDownHandle; |
1228 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetUnclusteredEnDown",patType1p2CorrectedPFMetUnclusteredEnDownHandle); |
1229 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsUnclusteredEnDown = *patType1p2CorrectedPFMetUnclusteredEnDownHandle; |
1230 |
+ |
if(patType1p2CorrectedPFMetsUnclusteredEnDown.size()){ |
1231 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsUnclusteredEnDown[0]).sumEt(); |
1232 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsUnclusteredEnDown[0])); |
1233 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsUnclusteredEnDown[0]).e_longitudinal(); |
1234 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsUnclusteredEnDown[0])); |
1235 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1236 |
+ |
} |
1237 |
+ |
|
1238 |
+ |
edm::Handle<edm::View<reco::MET> > patType1p2CorrectedPFMetUnclusteredEnUpHandle; |
1239 |
+ |
iEvent.getByLabel("patType1p2CorrectedPFMetUnclusteredEnUp",patType1p2CorrectedPFMetUnclusteredEnUpHandle); |
1240 |
+ |
edm::View<reco::MET> patType1p2CorrectedPFMetsUnclusteredEnUp = *patType1p2CorrectedPFMetUnclusteredEnUpHandle; |
1241 |
+ |
if(patType1p2CorrectedPFMetsUnclusteredEnUp.size()){ |
1242 |
+ |
metunc.sumEt =(patType1p2CorrectedPFMetsUnclusteredEnUp[0]).sumEt(); |
1243 |
+ |
metunc.metSig=metSignificance(& (patType1p2CorrectedPFMetsUnclusteredEnUp[0])); |
1244 |
+ |
metunc.eLong=(patType1p2CorrectedPFMetsUnclusteredEnUp[0]).e_longitudinal(); |
1245 |
+ |
metunc.p4=GENPTOLOR((patType1p2CorrectedPFMetsUnclusteredEnUp[0])); |
1246 |
+ |
hbbInfo->metUncInfo.push_back(metunc); |
1247 |
+ |
} |
1248 |
+ |
|
1249 |
+ |
|
1250 |
|
|
1251 |
|
// |
1252 |
|
// met is calomet |
1257 |
|
edm::View<pat::MET> metsTC = *metTCHandle; |
1258 |
|
if(metsTC.size()){ |
1259 |
|
hbbInfo->tcmet.sumEt=(metsTC[0]).sumEt(); |
1260 |
< |
hbbInfo->tcmet.metSig=(metsTC[0]).significance(); |
1260 |
> |
hbbInfo->tcmet.metSig=metSignificance(&(metsTC[0])); |
1261 |
|
hbbInfo->tcmet.eLong=(metsTC[0]).e_longitudinal(); |
1262 |
|
hbbInfo->tcmet.p4=GENPTOLOR((metsTC[0])); |
1263 |
|
if (verbose_) std::cout <<" METTC "<< hbbInfo->tcmet.metSig <<" " << hbbInfo->tcmet.sumEt<<std::endl; |
1264 |
|
} |
1265 |
|
|
1266 |
+ |
edm::Handle<edm::View<reco::MET> > pfMETNoPUHandle; |
1267 |
+ |
iEvent.getByLabel("pfMETNoPU",pfMETNoPUHandle); |
1268 |
+ |
edm::View<reco::MET> metspfMETNoPU = *pfMETNoPUHandle; |
1269 |
+ |
if(metspfMETNoPU.size()){ |
1270 |
+ |
hbbInfo->metNoPU.sumEt=(metspfMETNoPU[0]).sumEt(); |
1271 |
+ |
hbbInfo->metNoPU.metSig=metSignificance(&(metspfMETNoPU[0])); |
1272 |
+ |
hbbInfo->metNoPU.eLong=(metspfMETNoPU[0]).e_longitudinal(); |
1273 |
+ |
hbbInfo->metNoPU.p4=GENPTOLOR((metspfMETNoPU[0])); |
1274 |
+ |
if (verbose_) std::cout <<" pfMETNoPU "<< hbbInfo->metNoPU.metSig <<" " << hbbInfo->metNoPU.sumEt<<std::endl; |
1275 |
+ |
} |
1276 |
|
|
1277 |
|
edm::Handle<edm::View<reco::MET> > mHTHandle; |
1278 |
|
iEvent.getByLabel("patMETsHT",mHTHandle); |
1279 |
|
edm::View<reco::MET> metsHT = *mHTHandle; |
1280 |
|
if(metsHT.size()){ |
1281 |
|
hbbInfo->mht.sumEt=(metsHT[0]).sumEt(); |
1282 |
< |
hbbInfo->mht.metSig=(metsHT[0]).significance(); |
1282 |
> |
hbbInfo->mht.metSig=metSignificance(&(metsHT[0])); |
1283 |
|
hbbInfo->mht.eLong=(metsHT[0]).e_longitudinal(); |
1284 |
|
hbbInfo->mht.p4=GENPTOLOR((metsHT[0])); |
1285 |
|
if (verbose_) std::cout <<" METHT "<< hbbInfo->mht.metSig <<" " << hbbInfo->mht.sumEt<<std::endl; |
1286 |
|
} |
1287 |
|
|
1288 |
< |
edm::Handle<edm::View<pat::MET> > metHandle; |
1288 |
> |
edm::Handle<edm::View<reco::MET> > metHandle; |
1289 |
|
iEvent.getByLabel(metLabel_,metHandle); |
1290 |
< |
edm::View<pat::MET> mets = *metHandle; |
1290 |
> |
edm::View<reco::MET> mets = *metHandle; |
1291 |
|
|
1292 |
|
if(mets.size()){ |
1293 |
|
hbbInfo->calomet.sumEt=(mets[0]).sumEt(); |
1294 |
< |
hbbInfo->calomet.metSig=(mets[0]).significance(); |
1294 |
> |
hbbInfo->calomet.metSig=metSignificance(&(mets[0])); |
1295 |
|
hbbInfo->calomet.eLong=(mets[0]).e_longitudinal(); |
1296 |
|
hbbInfo->calomet.p4=GENPTOLOR((mets[0])); |
1297 |
|
if (verbose_) std::cout <<" METCALO "<< hbbInfo->calomet.metSig <<" " << hbbInfo->calomet.sumEt<<std::endl; |
1303 |
|
|
1304 |
|
if(metsPF.size()){ |
1305 |
|
hbbInfo->pfmet.sumEt=(metsPF[0]).sumEt(); |
1306 |
< |
hbbInfo->pfmet.metSig=(metsPF[0]).significance(); |
1306 |
> |
hbbInfo->pfmet.metSig=metSignificance(&(metsPF[0])); |
1307 |
|
hbbInfo->pfmet.eLong=(metsPF[0]).e_longitudinal(); |
1308 |
|
hbbInfo->pfmet.p4=GENPTOLOR((metsPF[0])); |
1309 |
|
if (verbose_) std::cout <<" METPF "<< hbbInfo->pfmet.metSig <<" " << hbbInfo->pfmet.sumEt<<std::endl; |
1325 |
|
mf.eIso=mu->ecalIso(); |
1326 |
|
mf.hIso=mu->hcalIso(); |
1327 |
|
mf.pfChaIso=mu->chargedHadronIso(); |
1328 |
+ |
mf.pfChaPUIso=mu->userIso(5); |
1329 |
|
mf.pfPhoIso=mu->photonIso(); |
1330 |
|
mf.pfNeuIso=mu->neutralHadronIso(); |
1331 |
|
Geom::Phi<double> deltaphi(mu->phi()-atan2(mf.p4.Px(), mf.p4.Py())); |
1332 |
|
double acop = deltaphi.value(); |
1333 |
|
mf.acop=acop; |
1334 |
|
|
1335 |
+ |
mf.emEnergy = mu->calEnergy().em; |
1336 |
+ |
mf.hadEnergy = mu->calEnergy().had; |
1337 |
+ |
|
1338 |
+ |
mf.nMatches = mu->numberOfMatches(); |
1339 |
+ |
|
1340 |
|
mf.ipDb=mu->dB(); |
1341 |
|
mf.ipErrDb=mu->edB(); |
1342 |
|
mf.cat=0; |
1343 |
+ |
|
1344 |
|
if(mu->isGlobalMuon()) mf.cat|=1; |
1345 |
|
if(mu->isTrackerMuon()) mf.cat|=2; |
1346 |
|
if(mu->isStandAloneMuon()) mf.cat|=4; |
1354 |
|
TrackRef iTrack1 = mu->innerTrack(); |
1355 |
|
const reco::HitPattern& p1 = iTrack1->hitPattern(); |
1356 |
|
mf.nPixelHits=p1.pixelLayersWithMeasurement(); |
1357 |
< |
} |
1357 |
> |
|
1358 |
> |
mf.nValidTracker = p1.numberOfValidTrackerHits(); |
1359 |
> |
mf.nValidPixel = p1.numberOfValidPixelHits(); |
1360 |
> |
|
1361 |
> |
|
1362 |
> |
|
1363 |
> |
} |
1364 |
|
if(mu->isGlobalMuon()){ |
1365 |
|
TrackRef gTrack = mu->globalTrack(); |
1366 |
|
const reco::HitPattern& q = gTrack->hitPattern(); |
1367 |
|
mf.globChi2=gTrack.get()->normalizedChi2(); |
1368 |
|
mf.globNHits=q.numberOfValidMuonHits(); |
1369 |
< |
mf. validMuStations = q. muonStationsWithValidHits(); |
1369 |
> |
mf.validMuStations = q.muonStationsWithValidHits(); |
1370 |
|
}else{ |
1371 |
|
mf.globChi2=-99; |
1372 |
|
mf.globNHits=-99; |
1425 |
|
ef.eIso=elec->ecalIso(); |
1426 |
|
ef.hIso=elec->hcalIso(); |
1427 |
|
ef.pfChaIso=elec->chargedHadronIso(); |
1428 |
+ |
ef.pfChaPUIso=elec->userIso(5); |
1429 |
|
ef.pfPhoIso=elec->photonIso(); |
1430 |
|
ef.pfNeuIso=elec->neutralHadronIso(); |
1431 |
|
|
1432 |
< |
Geom::Phi<double> deltaphi(elec->superCluster()->phi()-atan2(hbbInfo->calomet.p4.Py(),hbbInfo->calomet.p4.Px())); |
1432 |
> |
// |
1433 |
> |
// ip info |
1434 |
> |
// |
1435 |
> |
|
1436 |
> |
ef.ipDb=elec->dB(); |
1437 |
> |
ef.ipErrDb=elec->edB(); |
1438 |
> |
|
1439 |
> |
|
1440 |
> |
|
1441 |
> |
Geom::Phi<double> deltaphi(elec->superCluster()->phi()-atan2(hbbInfo->pfmet.p4.Py(),hbbInfo->pfmet.p4.Px())); |
1442 |
|
ef.acop = deltaphi.value(); |
1443 |
|
// |
1444 |
+ |
ef.sihih = elec->sigmaIetaIeta(); |
1445 |
+ |
ef.Dphi = elec->deltaPhiSuperClusterTrackAtVtx(); |
1446 |
+ |
ef.Deta = elec->deltaEtaSuperClusterTrackAtVtx(); |
1447 |
+ |
ef.HoE = elec->hadronicOverEm(); |
1448 |
+ |
ef.convDist = elec->convDist(); |
1449 |
+ |
ef.convDcot = elec->convDcot(); |
1450 |
+ |
if(elec->gsfTrack().isNonnull()) ef.innerHits = elec->gsfTrack()->trackerExpectedHitsInner().numberOfHits(); |
1451 |
+ |
ef.isEB = elec->isEB(); |
1452 |
+ |
ef.isEE = elec->isEE(); |
1453 |
+ |
// |
1454 |
|
// fill eleids |
1455 |
|
// |
1456 |
|
/* ef.id95 = elec->electronID("simpleEleId95cIso"); |
1507 |
|
tf.tIso=tau->trackIso(); |
1508 |
|
tf.eIso=tau->ecalIso(); |
1509 |
|
tf.hIso=tau->hcalIso(); |
1510 |
< |
Geom::Phi<double> deltaphi(tau->phi()-atan2(hbbInfo->calomet.p4.Py(),hbbInfo->calomet.p4.Px())); |
1510 |
> |
Geom::Phi<double> deltaphi(tau->phi()-atan2(hbbInfo->pfmet.p4.Py(),hbbInfo->pfmet.p4.Px())); |
1511 |
|
double acop = deltaphi.value(); |
1512 |
|
tf.acop=acop; |
1513 |
< |
tf.idbyIso=tau->tauID("byIsolation"); |
1514 |
< |
tf.idbyTrackIso=tau->tauID("trackIsolation"); |
1515 |
< |
tf.idbyTaNCfrOnePercent=tau->tauID("byTaNCfrOnePercent"); |
1516 |
< |
tf.idbyTaNCfrHalfPercent=tau->tauID("byTaNCfrHalfPercent"); |
1517 |
< |
tf.idbyTaNCfrQuarterPercent=tau->tauID("byTaNCfrQuarterPercent"); |
1518 |
< |
tf.idbyTaNCfrTenthPercent=tau->tauID("byTaNCfrTenthPercent"); |
1519 |
< |
tf.idbyTaNC=tau->tauID("byTaNC"); |
1513 |
> |
if (tau->isTauIDAvailable("againstElectronLoose")) tf.againstElectronLoose=tau->tauID("againstElectronLoose"); |
1514 |
> |
if (tau->isTauIDAvailable("againstElectronMedium")) tf.againstElectronMedium=tau->tauID("againstElectronMedium"); |
1515 |
> |
if (tau->isTauIDAvailable("againstElectronTight")) tf.againstElectronTight=tau->tauID("againstElectronTight"); |
1516 |
> |
if (tau->isTauIDAvailable("againstMuonLoose")) tf.againstMuonLoose=tau->tauID("againstMuonLoose"); |
1517 |
> |
if (tau->isTauIDAvailable("againstMuonTight")) tf.againstMuonTight=tau->tauID("againstMuonTight"); |
1518 |
> |
if (tau->isTauIDAvailable("byLooseIsolation")) tf.byLooseIsolation=tau->tauID("byLooseIsolation"); |
1519 |
> |
if (tau->isTauIDAvailable("byMediumIsolation")) tf.byMediumIsolation=tau->tauID("byMediumIsolation"); |
1520 |
> |
if (tau->isTauIDAvailable("byTightIsolation")) tf.byTightIsolation=tau->tauID("byTightIsolation"); |
1521 |
> |
if (tau->isTauIDAvailable("byVLooseIsolation")) tf.byVLooseIsolation=tau->tauID("byVLooseIsolation"); |
1522 |
> |
if (tau->isTauIDAvailable("decayModeFinding")) tf.decayModeFinding=tau->tauID("decayModeFinding"); |
1523 |
> |
if (tau->isTauIDAvailable("byIsolation")) tf.byIsolation=tau->tauID("byIsolation"); |
1524 |
> |
if (tau->isTauIDAvailable("trackIsolation")) tf.trackIsolation=tau->tauID("trackIsolation"); |
1525 |
> |
if (tau->isTauIDAvailable("byTaNCfrOnePercent")) tf.byTaNCfrOnePercent=tau->tauID("byTaNCfrOnePercent"); |
1526 |
> |
if (tau->isTauIDAvailable("byTaNCfrHalfPercent")) tf.byTaNCfrHalfPercent=tau->tauID("byTaNCfrHalfPercent"); |
1527 |
> |
if (tau->isTauIDAvailable("byTaNCfrQuarterPercent")) tf.byTaNCfrQuarterPercent=tau->tauID("byTaNCfrQuarterPercent"); |
1528 |
> |
if (tau->isTauIDAvailable("byTaNCfrTenthPercent")) tf.byTaNCfrTenthPercent=tau->tauID("byTaNCfrTenthPercent"); |
1529 |
> |
if (tau->isTauIDAvailable("byTaNC")) tf.byTaNC=tau->tauID("byTaNC"); |
1530 |
> |
if (tau->isTauIDAvailable("byLooseCombinedIsolationDeltaBetaCorr")) tf.byLooseCombinedIsolationDeltaBetaCorr=tau->tauID("byLooseCombinedIsolationDeltaBetaCorr"); |
1531 |
> |
if (tau->isTauIDAvailable("againstElectronMVA")) tf.againstElectronMVA=tau->tauID("againstElectronMVA"); |
1532 |
> |
if (tau->isPFTau()) { |
1533 |
> |
tf.isolationPFChargedHadrCandsPtSum = tau->isolationPFChargedHadrCandsPtSum(); |
1534 |
> |
tf.isolationPFGammaCandsEtSum = tau->isolationPFGammaCandsEtSum(); |
1535 |
> |
if (tau->leadPFChargedHadrCand().isAvailable()) tf.leadPFChargedHadrCandPt = tau->leadPFChargedHadrCand()->pt(); |
1536 |
> |
tf.NsignalPFChargedHadrCands = tau->signalPFChargedHadrCands().size(); |
1537 |
> |
tf.NsignalPFGammaCands = tau->signalPFGammaCands().size(); |
1538 |
> |
} |
1539 |
|
hbbInfo->tauInfo.push_back(tf); |
1540 |
+ |
if (verbose_) { |
1541 |
+ |
std::cout << "SCZ DEBUG: againstElectronLoose is " << tf.againstElectronLoose << std::endl; |
1542 |
+ |
std::cout << "SCZ DEBUG: againstElectronMedium is " << tf.againstElectronMedium << std::endl; |
1543 |
+ |
std::cout << "SCZ DEBUG: againstElectronTight is " << tf.againstElectronTight << std::endl; |
1544 |
+ |
std::cout << "SCZ DEBUG: againstMuonLoose is " << tf.againstMuonLoose << std::endl; |
1545 |
+ |
std::cout << "SCZ DEBUG: againstMuonTight is " << tf.againstMuonTight << std::endl; |
1546 |
+ |
std::cout << "SCZ DEBUG: byLooseIsolation is " << tf.byLooseIsolation << std::endl; |
1547 |
+ |
std::cout << "SCZ DEBUG: byMediumIsolation is " << tf.byMediumIsolation << std::endl; |
1548 |
+ |
std::cout << "SCZ DEBUG: byTightIsolation is " << tf.byTightIsolation << std::endl; |
1549 |
+ |
std::cout << "SCZ DEBUG: byVLooseIsolation is " << tf.byVLooseIsolation << std::endl; |
1550 |
+ |
std::cout << "SCZ DEBUG: decayModeFinding is " << tf.decayModeFinding << std::endl; |
1551 |
+ |
std::cout << "SCZ DEBUG: byIsolation is " << tf.byIsolation<< std::endl; |
1552 |
+ |
std::cout << "SCZ DEBUG: trackIsolation is " << tf.trackIsolation << std::endl; |
1553 |
+ |
std::cout << "SCZ DEBUG: byTaNCfrOnePercent is " << tf.byTaNCfrOnePercent << std::endl; |
1554 |
+ |
std::cout << "SCZ DEBUG: byTaNCfrHalfPercent is " << tf.byTaNCfrHalfPercent << std::endl; |
1555 |
+ |
std::cout << "SCZ DEBUG: byTaNCfrQuarterPercent is " << tf.byTaNCfrQuarterPercent << std::endl; |
1556 |
+ |
std::cout << "SCZ DEBUG: byTaNCfrTenthPercent is " << tf.byTaNCfrTenthPercent << std::endl; |
1557 |
+ |
std::cout << "SCZ DEBUG: byTaNC is " << tf.byTaNC << std::endl; |
1558 |
+ |
std::cout << "SCZ DEBUG: isolationPFChargedHadrCandsPtSum is " << tf.isolationPFChargedHadrCandsPtSum << std::endl; |
1559 |
+ |
std::cout << "SCZ DEBUG: isolationPFGammaCandsEtSum is " << tf.isolationPFGammaCandsEtSum << std::endl; |
1560 |
+ |
std::cout << "SCZ DEBUG: isolationPFGammaCandsEtSum is " << tf.leadPFChargedHadrCandPt << std::endl; |
1561 |
+ |
std::cout << "SCZ DEBUG: NsignalPFChargedHadrCands is " << tf.NsignalPFChargedHadrCands << std::endl; |
1562 |
+ |
std::cout << "SCZ DEBUG: NsignalPFGammaCands is " << tf.NsignalPFGammaCands << std::endl; |
1563 |
+ |
std::cout << "SCZ DEBUG: byLooseCombinedIsolationDeltaBetaCorr is " << tf.byLooseCombinedIsolationDeltaBetaCorr << std::endl; |
1564 |
+ |
std::cout << "SCZ DEBUG: againstElectronMVA is " << tf.againstElectronMVA << std::endl; |
1565 |
+ |
} |
1566 |
|
} |
1567 |
|
|
1568 |
|
CompareJetPtMuons ptComparatorMu; |
1574 |
|
std::sort(hbbInfo->tauInfo.begin(), hbbInfo->tauInfo.end(), ptComparatorTau); |
1575 |
|
|
1576 |
|
|
948 |
– |
// dimuons and dielectrons |
949 |
– |
|
950 |
– |
for( size_t i = 0; i < dimuons->size(); i++ ) { |
951 |
– |
VHbbEvent::DiMuonInfo df; |
952 |
– |
const Candidate & dimuonCand = (*dimuons)[ i ]; |
953 |
– |
df.p4= GENPTOLOR(dimuonCand); |
954 |
– |
const Candidate * lep0 = dimuonCand.daughter( 0 ); |
955 |
– |
const Candidate * lep1 = dimuonCand.daughter( 1 ); |
956 |
– |
// needed to access specific methods of pat::Muon |
957 |
– |
const pat::Muon & muonDau0 = dynamic_cast<const pat::Muon &>(*lep0->masterClone()); |
958 |
– |
const pat::Muon & muonDau1 = dynamic_cast<const pat::Muon &>(*lep1->masterClone()); |
959 |
– |
|
960 |
– |
df.daughter1.p4=GENPTOLOR(muonDau0); |
961 |
– |
df.daughter2.p4=GENPTOLOR(muonDau1); |
962 |
– |
|
963 |
– |
df.daughter1.tIso= muonDau0.trackIso(); |
964 |
– |
df.daughter2.tIso= muonDau1.trackIso(); |
965 |
– |
|
966 |
– |
df.daughter1.eIso= muonDau0.ecalIso(); |
967 |
– |
df.daughter2.eIso= muonDau1.ecalIso(); |
968 |
– |
|
969 |
– |
df.daughter1.hIso= muonDau0.hcalIso(); |
970 |
– |
df.daughter2.hIso= muonDau1.hcalIso(); |
971 |
– |
|
972 |
– |
df.daughter1.ipDb=muonDau0.dB(); |
973 |
– |
df.daughter2.ipDb=muonDau1.dB(); |
974 |
– |
|
975 |
– |
df.daughter1.ipErrDb=muonDau0.edB(); |
976 |
– |
df.daughter2.ipErrDb=muonDau1.edB(); |
977 |
– |
|
978 |
– |
df.daughter1.cat=0; |
979 |
– |
if(muonDau0.isGlobalMuon()) df.daughter1.cat|=1; |
980 |
– |
if(muonDau0.isTrackerMuon()) df.daughter1.cat|=2; |
981 |
– |
if(muonDau0.isStandAloneMuon()) df.daughter1.cat|=4; |
982 |
– |
df.daughter2.cat=0; |
983 |
– |
if(muonDau1.isGlobalMuon()) df.daughter2.cat|=1; |
984 |
– |
if(muonDau1.isTrackerMuon()) df.daughter2.cat|=2; |
985 |
– |
if(muonDau1.isStandAloneMuon()) df.daughter2.cat|=4; |
986 |
– |
|
987 |
– |
TrackRef trkMu1Ref = muonDau0.get<TrackRef>(); |
988 |
– |
TrackRef trkMu2Ref = muonDau1.get<TrackRef>(); |
989 |
– |
|
990 |
– |
if(trkMu1Ref.isNonnull() && trkMu2Ref.isNonnull()){ |
991 |
– |
const Track* MuTrk1 = muonDau0.get<TrackRef>().get(); |
992 |
– |
const Track* MuTrk2 = muonDau1.get<TrackRef>().get(); |
993 |
– |
df.daughter1.zPVPt=MuTrk1->dz(RecVtxFirst.position()); |
994 |
– |
df.daughter1.zPVProb=MuTrk1->dz(RecVtx.position()); |
995 |
– |
df.daughter2.zPVPt=MuTrk2->dz(RecVtxFirst.position()); |
996 |
– |
df.daughter2.zPVProb=MuTrk2->dz(RecVtx.position()); |
997 |
– |
|
998 |
– |
df.daughter1.nHits = MuTrk1->numberOfValidHits(); |
999 |
– |
df.daughter2.nHits = MuTrk2->numberOfValidHits(); |
1000 |
– |
|
1001 |
– |
df.daughter1.chi2 = MuTrk1->normalizedChi2(); |
1002 |
– |
df.daughter2.chi2 = MuTrk2->normalizedChi2(); |
1003 |
– |
|
1004 |
– |
TrackRef iTrack1 = muonDau0.innerTrack(); |
1005 |
– |
const reco::HitPattern& p1 = iTrack1->hitPattern(); |
1006 |
– |
TrackRef iTrack2 = muonDau1.innerTrack(); |
1007 |
– |
const reco::HitPattern& p2 = iTrack2->hitPattern(); |
1008 |
– |
|
1009 |
– |
df.daughter1.nPixelHits = p1.pixelLayersWithMeasurement(); |
1010 |
– |
df.daughter2.nPixelHits = p2.pixelLayersWithMeasurement(); |
1011 |
– |
|
1012 |
– |
if(muonDau0.isGlobalMuon()){ |
1013 |
– |
TrackRef gTrack = muonDau0.globalTrack(); |
1014 |
– |
const reco::HitPattern& q = gTrack->hitPattern(); |
1015 |
– |
df.daughter1.globNHits=q.numberOfValidMuonHits(); |
1016 |
– |
df.daughter1.globChi2=gTrack.get()->normalizedChi2(); |
1017 |
– |
df.daughter1.validMuStations = q. muonStationsWithValidHits(); |
1018 |
– |
} |
1019 |
– |
if(muonDau1.isGlobalMuon()){ |
1020 |
– |
TrackRef gTrack = muonDau1.globalTrack(); |
1021 |
– |
const reco::HitPattern& q = gTrack->hitPattern(); |
1022 |
– |
df.daughter2.globNHits=q.numberOfValidMuonHits(); |
1023 |
– |
df.daughter2.globChi2=gTrack.get()->normalizedChi2(); |
1024 |
– |
df.daughter2.validMuStations = q. muonStationsWithValidHits(); |
1025 |
– |
} |
1026 |
– |
|
1027 |
– |
} |
1028 |
– |
|
1029 |
– |
hbbInfo->diMuonInfo.push_back(df); |
1030 |
– |
} |
1031 |
– |
|
1032 |
– |
for( size_t i = 0; i < dielectrons->size(); i++ ) { |
1033 |
– |
VHbbEvent::DiElectronInfo df; |
1034 |
– |
const Candidate & dielecCand = (*dielectrons)[ i ]; |
1035 |
– |
|
1036 |
– |
df.p4=GENPTOLOR(dielecCand); |
1037 |
– |
|
1038 |
– |
// accessing the daughters of the dimuon candidate |
1039 |
– |
const Candidate * lep0 = dielecCand.daughter( 0 ); |
1040 |
– |
const Candidate * lep1 = dielecCand.daughter( 1 ); |
1041 |
– |
// needed to access specific methods of pat::Muon |
1042 |
– |
const pat::Electron & elecDau0 = dynamic_cast<const pat::Electron &>(*lep0->masterClone()); |
1043 |
– |
const pat::Electron & elecDau1 = dynamic_cast<const pat::Electron &>(*lep1->masterClone()); |
1044 |
– |
|
1045 |
– |
df.daughter1.p4 = GENPTOLOR(elecDau0); |
1046 |
– |
df.daughter2.p4= GENPTOLOR(elecDau1); |
1047 |
– |
|
1048 |
– |
df.daughter1.tIso = elecDau0.trackIso(); |
1049 |
– |
df.daughter2.tIso = elecDau1.trackIso(); |
1050 |
– |
|
1051 |
– |
df.daughter1.eIso = elecDau0.ecalIso(); |
1052 |
– |
df.daughter2.eIso = elecDau1.ecalIso(); |
1053 |
– |
|
1054 |
– |
df.daughter1.hIso = elecDau0.hcalIso(); |
1055 |
– |
df.daughter2.hIso = elecDau1.hcalIso(); |
1056 |
– |
|
1057 |
– |
// ids |
1058 |
– |
/*df.daughter1.id95 = elecDau0.electronID("simpleEleId95cIso"); |
1059 |
– |
df.daughter1.id85 = elecDau0.electronID ("simpleEleId85cIso"); |
1060 |
– |
df.daughter1.id70 = elecDau0.electronID ("simpleEleId70cIso"); |
1061 |
– |
df.daughter1.id95r = elecDau0.electronID ("simpleEleId95relIso"); |
1062 |
– |
df.daughter1.id85r = elecDau0.electronID ("simpleEleId85relIso"); |
1063 |
– |
df.daughter1.id70r = elecDau0.electronID ("simpleEleId70relIso"); |
1064 |
– |
|
1065 |
– |
|
1066 |
– |
df.daughter2.id95 = elecDau1.electronID("simpleEleId95cIso"); |
1067 |
– |
df.daughter2.id85 = elecDau1.electronID ("simpleEleId85cIso"); |
1068 |
– |
df.daughter2.id70 = elecDau1.electronID ("simpleEleId70cIso"); |
1069 |
– |
df.daughter2.id95r = elecDau1.electronID ("simpleEleId95relIso"); |
1070 |
– |
df.daughter2.id85r = elecDau1.electronID ("simpleEleId85relIso"); |
1071 |
– |
df.daughter2.id70r = elecDau1.electronID ("simpleEleId70relIso"); |
1072 |
– |
*/ |
1073 |
– |
hbbInfo->diElectronInfo.push_back(df); |
1577 |
|
|
1578 |
< |
} |
1578 |
> |
|
1579 |
|
if (verbose_){ |
1580 |
|
std::cout <<" Pushing hbbInfo "<<std::endl; |
1581 |
|
std::cout <<" SimpleJets1 = "<<hbbInfo->simpleJets.size()<<std::endl<< |
1582 |
|
" SimpleJets2 = "<<hbbInfo->simpleJets2.size()<<std::endl<< |
1583 |
|
" SubJets = "<<hbbInfo->subJets.size()<<std::endl<< |
1584 |
|
" HardJets = "<<hbbInfo->hardJets.size()<<std::endl<< |
1585 |
+ |
" FilterJets = "<<hbbInfo->filterJets.size()<<std::endl<< |
1586 |
|
" Muons = "<<hbbInfo->muInfo.size()<<std::endl<< |
1587 |
|
" Electrons = "<<hbbInfo->eleInfo.size()<<std::endl<< |
1588 |
|
" Taus = "<<hbbInfo->tauInfo.size()<<std::endl<< |
1595 |
|
iEvent.put(auxInfo); |
1596 |
|
|
1597 |
|
|
1598 |
+ |
delete jecUnc; |
1599 |
+ |
|
1600 |
|
} |
1601 |
|
|
1602 |
|
void |
1785 |
|
// test |
1786 |
|
// |
1787 |
|
|
1788 |
< |
return; |
1788 |
> |
// return; |
1789 |
|
double eta = sj.p4.Eta(); |
1790 |
|
double pt = sj.p4.Pt(); |
1791 |
|
|
1805 |
|
sj.jpb=jet_iter->bDiscriminator("jetBProbabilityBJetTags"); |
1806 |
|
sj.ssvhe=jet_iter->bDiscriminator("simpleSecondaryVertexHighEffBJetTags"); |
1807 |
|
sj.csv=jet_iter->bDiscriminator("combinedSecondaryVertexBJetTags"); |
1808 |
< |
sj.csvmva=jet_iter->bDiscriminator("combinedSecondaryVertexMVABJetTags"); |
1808 |
> |
sj.csvmva=jet_iter->bDiscriminator("combinedSecondaryVertexMVABJetTags"); |
1809 |
|
sj.charge=jet_iter->jetCharge(); |
1810 |
|
sj.ntracks=jet_iter->associatedTracks().size(); |
1811 |
|
sj.p4=GENPTOLORP(jet_iter); |
1812 |
+ |
// std::cout << " ECCO "<<sj.csv<< " "<< sj.p4.Pt()<<std::endl; |
1813 |
|
sj.chargedTracksFourMomentum=(getChargedTracksMomentum(&*(jet_iter))); |
1814 |
|
sj.SF_CSVL=1; |
1815 |
|
sj.SF_CSVM=1; |
1825 |
|
sj.neutralHadronEFraction = jet_iter-> neutralHadronEnergyFraction (); |
1826 |
|
sj.chargedEmEFraction = jet_iter-> chargedEmEnergyFraction (); |
1827 |
|
sj.neutralEmEFraction = jet_iter-> neutralEmEnergyFraction (); |
1828 |
< |
sj. nConstituents = jet_iter->getPFConstituents().size(); |
1828 |
> |
sj.nConstituents = jet_iter->getPFConstituents().size(); |
1829 |
|
|
1830 |
|
} |
1831 |
|
// |
1852 |
|
// add tVector |
1853 |
|
// |
1854 |
|
sj.tVector = getTvect(&(*jet_iter)); |
1855 |
+ |
|
1856 |
+ |
|
1857 |
+ |
} |
1858 |
+ |
|
1859 |
+ |
float HbbAnalyzerNew::metSignificance(const reco::MET * met) |
1860 |
+ |
{ |
1861 |
+ |
double sigmaX2= met->getSignificanceMatrix()(0,0); |
1862 |
+ |
double sigmaY2= met->getSignificanceMatrix()(1,1); |
1863 |
+ |
double significance = 0; |
1864 |
+ |
try { |
1865 |
+ |
if(sigmaX2<1.e10 && sigmaY2<1.e10) significance = met->significance(); |
1866 |
+ |
} |
1867 |
+ |
catch(...) |
1868 |
+ |
{ |
1869 |
+ |
std::cout << "PROBLEM WITH MET SIGNIFICANCE sigma X2 and Y2 are: " << sigmaX2 << " " << sigmaY2 << std::endl; |
1870 |
+ |
} |
1871 |
+ |
return significance; |
1872 |
|
} |
1873 |
|
|
1874 |
|
|