42 |
|
#include "TrackingTools/Records/interface/TransientTrackRecord.h" |
43 |
|
#include "TrackingTools/IPTools/interface/IPTools.h" |
44 |
|
|
45 |
+ |
#include "CMGTools/External/interface/PileupJetIdentifier.h" |
46 |
+ |
#include "CMGTools/External/interface/PileupJetIdAlgo.h" |
47 |
+ |
//#include "CMGTools/External/interface/PileupJetIdProducer.h" |
48 |
|
|
49 |
|
#include <cmath> |
50 |
|
|
564 |
|
for(edm::View<pat::Jet>::const_iterator jet_iter = simplejets4.begin(); jet_iter!=simplejets4.end(); ++jet_iter){ |
565 |
|
// if(jet_iter->pt()>50) |
566 |
|
// njetscounter++; |
567 |
< |
VHbbEvent::SimpleJet sj; |
567 |
> |
|
568 |
> |
VHbbEvent::SimpleJet sj; |
569 |
|
// std::cout <<" sj4"<<std::endl; |
570 |
|
fillSimpleJet(sj,jet_iter); |
571 |
|
// if(!runOnMC_) |
572 |
|
setJecUnc(sj,jecUnc); |
573 |
+ |
|
574 |
|
|
575 |
|
|
576 |
|
Particle::LorentzVector p4Jet = jet_iter->p4(); |
606 |
|
} |
607 |
|
#endif //ENABLE SIMPLEJETS4 |
608 |
|
|
609 |
< |
|
609 |
> |
|
610 |
|
for(edm::View<pat::Jet>::const_iterator jet_iter = simplejets2.begin(); jet_iter!=simplejets2.end(); ++jet_iter){ |
611 |
|
|
612 |
+ |
|
613 |
+ |
|
614 |
|
VHbbEvent::SimpleJet sj; |
615 |
|
// std::cout <<" sj2"<<std::endl; |
616 |
< |
fillSimpleJet(sj,jet_iter); |
616 |
> |
fillSimpleJet(sj,jet_iter); |
617 |
> |
|
618 |
> |
///########### PU JET ID ################# |
619 |
> |
// add puId... |
620 |
> |
edm::Handle<edm::ValueMap<float> > puJetIdMVA; |
621 |
> |
iEvent.getByLabel("puJetMva","fullDiscriminant", puJetIdMVA); |
622 |
> |
|
623 |
> |
edm::Handle<edm::ValueMap<int> > puJetIdFlag; |
624 |
> |
iEvent.getByLabel("puJetMva", "fullId", puJetIdFlag); |
625 |
> |
|
626 |
> |
// cout << " pt " << jet_iter->pt() << " eta " << jet_iter->eta() << std::endl; |
627 |
> |
unsigned int idx = jet_iter - simplejets2.begin(); |
628 |
> |
|
629 |
> |
|
630 |
> |
|
631 |
> |
sj.puJetIdMva = (*puJetIdMVA)[simplejets2.refAt(idx)]; |
632 |
> |
int idflag = (*puJetIdFlag)[simplejets2.refAt(idx)]; |
633 |
> |
|
634 |
> |
|
635 |
> |
// cout << " PU JetID MVA " << mva; |
636 |
> |
if( PileupJetIdentifier::passJetId( idflag, PileupJetIdentifier::kLoose )) { |
637 |
> |
//cout << " pass loose wp"; |
638 |
> |
sj.puJetIdL =1; |
639 |
> |
} |
640 |
> |
if( PileupJetIdentifier::passJetId( idflag, PileupJetIdentifier::kMedium )) { |
641 |
> |
// cout << " pass medium wp"; |
642 |
> |
sj.puJetIdM =1; |
643 |
> |
} |
644 |
> |
if( PileupJetIdentifier::passJetId( idflag, PileupJetIdentifier::kTight )) { |
645 |
> |
// cout << " pass tight wp"; |
646 |
> |
sj.puJetIdT =1; |
647 |
> |
} |
648 |
> |
// cout << endl; |
649 |
> |
// ############# END OF PU JET ID ###################### |
650 |
> |
|
651 |
> |
|
652 |
|
// if(!runOnMC_) |
653 |
|
setJecUnc(sj,jecUnc); |
654 |
|
/* sj.flavour = jet_iter->partonFlavour(); |
671 |
|
sj.SF_CSVLerr=0; |
672 |
|
sj.SF_CSVMerr=0; |
673 |
|
sj.SF_CSVTerr=0; |
674 |
< |
|
674 |
> |
|
675 |
> |
|
676 |
|
// |
677 |
|
// addtaginfo for csv |
678 |
|
// |
1975 |
|
sj.SF_CSVTerr=0; |
1976 |
|
|
1977 |
|
|
1978 |
+ |
|
1979 |
+ |
|
1980 |
+ |
|
1981 |
|
if (jet_iter->isPFJet() == true) { |
1982 |
|
|
1983 |
|
sj.chargedHadronEFraction = jet_iter-> chargedHadronEnergyFraction(); |