449 if (rcalojets.isValid()) {
451 mycalojets=*rcalojets;
453 typedef reco::CaloJetCollection::const_iterator cjiter;
455 for ( cjiter
i=mycalojets.begin();
i!=mycalojets.end();
i++) {
473 if (rcalocorjets.isValid()) {
475 mycalojets=*rcalocorjets;
477 typedef reco::CaloJetCollection::const_iterator cjiter;
479 for ( cjiter
i=mycalojets.begin();
i!=mycalojets.end();
i++) {
497 if (ohcalojets.isValid()) {
499 mycalojets=*ohcalojets;
501 typedef reco::CaloJetCollection::const_iterator cjiter;
503 for ( cjiter
i=mycalojets.begin();
i!=mycalojets.end();
i++) {
522 if (ohcalocorjets.isValid()) {
524 mycalocorjets=*ohcalocorjets;
526 typedef reco::CaloJetCollection::const_iterator ccorjiter;
528 for ( ccorjiter
i=mycalocorjets.begin();
i!=mycalocorjets.end();
i++) {
547 if (ohcalocorL1L2L3jets.isValid()) {
549 mycalocorL1L2L3jets=*ohcalocorL1L2L3jets;
551 typedef reco::CaloJetCollection::const_iterator ccorL1L2L3jiter;
552 int jhcorL1L2L3cal=0;
553 for ( ccorL1L2L3jiter
i=mycalocorL1L2L3jets.begin();
i!=mycalocorL1L2L3jets.end();
i++) {
580 std::set<unsigned int> towersUpper;
581 std::set<unsigned int> towersLower;
582 std::set<unsigned int> towersNone;
584 bool towersUpperValid=
false;
585 bool towersLowerValid=
false;
586 bool towersNoneValid=
false;
587 if( caloTowersCleanerUpperR45.
isValid() ){
588 towersUpperValid =
true;
590 towersUpper.insert(tow->id().denseIndex());
593 if( caloTowersCleanerLowerR45.
isValid() ){
594 towersLowerValid =
true;
596 towersLower.insert(tow->id().denseIndex());
599 if( caloTowersCleanerNoR45.
isValid() ){
600 towersNoneValid =
true;
602 towersNone.insert(tow->id().denseIndex());
609 if(tower->energy() > thresholdForSavingTowers)
611 towet[jtow] = tower->et();
612 toweta[jtow] = tower->eta();
613 towphi[jtow] = tower->phi();
614 towen[jtow] = tower->energy();
615 towem[jtow] = tower->emEnergy();
616 towhd[jtow] = tower->hadEnergy();
617 towoe[jtow] = tower->outerEnergy();
619 if(towersUpperValid) {
if(towersUpper.find(tower->id().denseIndex()) == towersUpper.end())
towR45upper[jtow]=
true;
else towR45upper[jtow]=
false;}
620 if(towersLowerValid) {
if(towersLower.find(tower->id().denseIndex()) == towersLower.end())
towR45lower[jtow]=
true;
else towR45lower[jtow]=
false;}
621 if(towersNoneValid) {
if(towersNone.find(tower->id().denseIndex()) == towersNone.end())
towR45none[jtow]=
true;
else towR45none[jtow]=
false;}
629 if (recmets.isValid()) {
630 typedef reco::CaloMETCollection::const_iterator cmiter;
631 for ( cmiter
i=recmets->begin();
i!=recmets->end();
i++) {
639 typedef reco::PFMETCollection::const_iterator pfmetiter;
640 for( pfmetiter
i=pfmets->begin();
i!=pfmets->end();
i++) {
648 typedef reco::METCollection::const_iterator
iter;
649 for ( iter
i=ht->begin();
i!=ht->end();
i++) {
658 if (genjets.isValid()) {
662 typedef reco::GenJetCollection::const_iterator gjiter;
664 for ( gjiter
i=mygenjets.begin();
i!=mygenjets.end();
i++) {
670 jgene[jgen] =
i->energy();
679 if (genmets.isValid()) {
680 typedef reco::GenMETCollection::const_iterator gmiter;
681 for ( gmiter
i=genmets->begin();
i!=genmets->end();
i++) {
692 if (l2taujets.isValid()) {
697 for(reco::CaloJetCollection::const_iterator
i = l2taus.begin();
698 i!= l2taus.end(); ++
i){
707 if (taujets.isValid()) {
712 typedef reco::HLTTauCollection::const_iterator tauit;
714 for(tauit
i=mytaujets.begin();
i!=mytaujets.end();
i++){
722 l25tauPt[itau] =
i->getL25LeadTrackPtValue();
739 typedef reco::PFTauCollection::const_iterator pftauit;
741 for(pftauit
i=taus.begin();
i!=taus.end();
i++){
747 ohpfTauJetPt[ipftau] =
i->pfTauTagInfoRef()->pfjetRef()->pt();
754 if( (
i->leadPFNeutralCand()).isNonnull())
759 if((
i->leadPFChargedHadrCand()).isNonnull()){
767 float maxPtTrkIso = 0;
768 for (
unsigned int iTrk = 0; iTrk <
i->isolationPFChargedHadrCands().size(); iTrk++)
770 if(
i->isolationPFChargedHadrCands()[iTrk]->pt() > maxPtTrkIso) maxPtTrkIso =
i->isolationPFChargedHadrCands()[iTrk]->pt();
772 if (
i->isolationPFChargedHadrCands()[iTrk]->trackRef().isNonnull()){
787 float maxPtGammaIso = 0;
788 for (
unsigned int iGamma = 0; iGamma <
i->isolationPFGammaCands().size(); iGamma++)
790 if(
i->isolationPFGammaCands()[iGamma]->pt() > maxPtGammaIso) maxPtGammaIso =
i->isolationPFGammaCands()[iGamma]->pt();
795 for (
unsigned int iTrk = 0; iTrk <
i->signalPFChargedHadrCands().size(); iTrk++)
797 if (
i->signalPFChargedHadrCands ()[iTrk]->trackRef().isNonnull()){
820 if(pfTausTightCone.isValid()) {
826 typedef reco::PFTauCollection::const_iterator pftauit;
828 for(pftauit
i=taus.begin();
i!=taus.end();
i++){
837 if( (
i->leadPFNeutralCand()).isNonnull())
843 if((
i->leadPFChargedHadrCand()).isNonnull())
848 float maxPtTrkIso = 0;
849 for (
unsigned int iTrk = 0; iTrk <
i->isolationPFChargedHadrCands().size(); iTrk++)
851 if(
i->isolationPFChargedHadrCands()[iTrk]->pt() > maxPtTrkIso) maxPtTrkIso =
i->isolationPFChargedHadrCands()[iTrk]->pt();
855 float maxPtGammaIso = 0;
856 for (
unsigned int iGamma = 0; iGamma <
i->isolationPFGammaCands().size(); iGamma++)
858 if(
i->isolationPFGammaCands()[iGamma]->pt() > maxPtGammaIso) maxPtGammaIso =
i->isolationPFGammaCands()[iGamma]->pt();
868 if(recoPfTaus.isValid()) {
869 float minTrkPt = minPtCH;
870 float minGammaPt = minPtGamma;
876 typedef reco::PFTauCollection::const_iterator pftauit;
879 for(pftauit
i=taus.begin();
i!=taus.end();
i++){
885 if( (
i->leadPFNeutralCand()).isNonnull())
891 if((
i->leadPFChargedHadrCand()).isNonnull())
897 for (
unsigned int iTrk = 0; iTrk <
i->isolationPFChargedHadrCands().size(); iTrk++)
899 if(
i->isolationPFChargedHadrCands()[iTrk]->pt() > minTrkPt) myTrks++;
900 if (
i->isolationPFChargedHadrCands()[iTrk]->trackRef().isNonnull()){
916 for (
unsigned int iGamma = 0; iGamma <
i->isolationPFGammaCands().size(); iGamma++)
918 if(
i->isolationPFGammaCands()[iGamma]->pt() > minGammaPt) myGammas++;
923 for (
unsigned int iTrk = 0; iTrk <
i->signalPFChargedHadrCands().size(); iTrk++)
925 if (
i->signalPFChargedHadrCands ()[iTrk]->trackRef().isNonnull()){
940 if(theRecoPFTauDiscrByTanCOnePercent.
isValid()){
942 if(theRecoPFTauDiscrByIsolation.
isValid()){
944 if(theRecoPFTauDiscrAgainstMuon.
isValid()){
946 if(theRecoPFTauDiscrAgainstElec.
isValid()){
948 if(theRecoPFTauDiscrByTanCHalfPercent.
isValid()){
950 if(theRecoPFTauDiscrByTanCQuarterPercent.
isValid()){
952 if(theRecoPFTauDiscrByTanCTenthPercent.
isValid()){
964 typedef reco::PFJetCollection::const_iterator pfJetit;
970 for(pfJetit
i=Jets.begin();
i!=Jets.end();
i++){
984 if (
i->pt() > 40. &&
abs(
i->eta())<3.0)
987 pfMHTx = pfMHTx +
i->px();
988 pfMHTy = pfMHTy +
i->py();
992 pfMHT =
sqrt(pfMHTx*pfMHTx + pfMHTy*pfMHTy);
998 nrpj = recoPFJets->size();
1001 typedef reco::PFJetCollection::const_iterator pfJetit;
1003 for(pfJetit
i=Jets.begin();
i!=Jets.end();
i++){
float * recopfTauDiscrAgainstElec
std::vector< PFTau > PFTauCollection
collection of PFTau objects
int * hltpftauIsoTrToPFTauMatch
float * ohpfTauTightConeLeadTrackPt
float * HLTPFTauSignalTrDz
float * ohpfTauTightConeTrkIso
float * ohpfTauTightConePt
int * jpfrecochargedMultiplicity
float * ohpfTauLeadTrackPt
float * recopfTauDiscrByTancQuarterPercent
std::vector< GenJet > GenJetCollection
collection of GenJet objects
float * pfJetchargedHadronFraction
float * jpfrecochargedHadronFraction
std::vector< CaloTower >::const_iterator const_iterator
float * recopfTauDiscrByIso
float * recopfTauLeadTrackPt
float * recopfTauDiscrByTancHalfPercent
float * recoPFTauSignalTrPt
float * jhcorL1L2L3caleta
int * hltpftauSignalTrToPFTauMatch
float * ohpfTauTightConeLeadPionPt
float * ohpfTauTightConeJetPt
float * ohpfTauTightConeEta
float * jpfreconeutralHadronFraction
float * recopfTauLeadPionPt
reco::helper::JetIDHelper * jetID
Abs< T >::type abs(const T &t)
int * signalTrToPFTauMatch
float * ohpfTauTightConeGammaIso
float * recopfTauDiscrAgainstMuon
std::vector< HLTTau > HLTTauCollection
collection of HLTTau objects
float * recopfTauDiscrByTancOnePercent
float * pfJetneutralMultiplicity
float * pfJetneutralHadronEnergyFraction
float * ohpfTauLeadPionPt
float * HLTPFTauSignalTrPt
float * jpfreconeutralEMFraction
float * jhcorL1L2L3caln90hits
int * jpfreconeutralMultiplicity
int * ohpfTauTightConeProngs
float * recoPFTauSignalTrDz
std::vector< PFJet > PFJetCollection
collection of PFJet objects
float * jhcorL1L2L3calemf
float * jhcorL1L2L3caln90
float * jpfrecochargedEMFraction
float * pfJetneutralEMFraction
float * ohpfTauTightConePhi
float * recopfTauDiscrByTancTenthPercent
float * jhcorL1L2L3calphi
float * pfJetchargedMultiplicity
float * pfJetchargedEMFraction
float * ohpfTauLeadTrackVtxZ
void calculate(const edm::Event &event, const reco::CaloJet &jet, const int iDbg=0)
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects