450 if (rcalojets.isValid()) {
452 mycalojets=*rcalojets;
454 typedef reco::CaloJetCollection::const_iterator cjiter;
456 for ( cjiter
i=mycalojets.begin();
i!=mycalojets.end();
i++) {
474 if (rcalocorjets.isValid()) {
476 mycalojets=*rcalocorjets;
478 typedef reco::CaloJetCollection::const_iterator cjiter;
480 for ( cjiter
i=mycalojets.begin();
i!=mycalojets.end();
i++) {
498 if (ohcalojets.isValid()) {
500 mycalojets=*ohcalojets;
502 typedef reco::CaloJetCollection::const_iterator cjiter;
504 for ( cjiter
i=mycalojets.begin();
i!=mycalojets.end();
i++) {
523 if (ohcalocorjets.isValid()) {
525 mycalocorjets=*ohcalocorjets;
527 typedef reco::CaloJetCollection::const_iterator ccorjiter;
529 for ( ccorjiter
i=mycalocorjets.begin();
i!=mycalocorjets.end();
i++) {
548 if (ohcalocorL1L2L3jets.isValid()) {
550 mycalocorL1L2L3jets=*ohcalocorL1L2L3jets;
552 typedef reco::CaloJetCollection::const_iterator ccorL1L2L3jiter;
553 int jhcorL1L2L3cal=0;
554 for ( ccorL1L2L3jiter
i=mycalocorL1L2L3jets.begin();
i!=mycalocorL1L2L3jets.end();
i++) {
581 std::set<unsigned int> towersUpper;
582 std::set<unsigned int> towersLower;
583 std::set<unsigned int> towersNone;
585 bool towersUpperValid=
false;
586 bool towersLowerValid=
false;
587 bool towersNoneValid=
false;
588 if( caloTowersCleanerUpperR45.
isValid() ){
589 towersUpperValid =
true;
591 towersUpper.insert(cttopo->
denseIndex(tow->id()));
594 if( caloTowersCleanerLowerR45.
isValid() ){
595 towersLowerValid =
true;
597 towersLower.insert(cttopo->
denseIndex(tow->id()));
600 if( caloTowersCleanerNoR45.
isValid() ){
601 towersNoneValid =
true;
603 towersNone.insert(cttopo->
denseIndex(tow->id()));
610 if(tower->energy() > thresholdForSavingTowers)
612 towet[jtow] = tower->et();
613 toweta[jtow] = tower->eta();
614 towphi[jtow] = tower->phi();
615 towen[jtow] = tower->energy();
616 towem[jtow] = tower->emEnergy();
617 towhd[jtow] = tower->hadEnergy();
618 towoe[jtow] = tower->outerEnergy();
622 if(towersNoneValid) {
if(towersNone.find(cttopo->
denseIndex(tower->id())) == towersNone.end())
towR45none[jtow]=
true;
else towR45none[jtow]=
false;}
630 if (recmets.isValid()) {
631 typedef reco::CaloMETCollection::const_iterator cmiter;
632 for ( cmiter
i=recmets->begin();
i!=recmets->end();
i++) {
640 typedef reco::PFMETCollection::const_iterator pfmetiter;
641 for( pfmetiter
i=pfmets->begin();
i!=pfmets->end();
i++) {
649 typedef reco::METCollection::const_iterator iter;
650 for ( iter
i=ht->begin();
i!=ht->end();
i++) {
659 if (genjets.isValid()) {
663 typedef reco::GenJetCollection::const_iterator gjiter;
665 for ( gjiter
i=mygenjets.begin();
i!=mygenjets.end();
i++) {
671 jgene[jgen] =
i->energy();
680 if (genmets.isValid()) {
681 typedef reco::GenMETCollection::const_iterator gmiter;
682 for ( gmiter
i=genmets->begin();
i!=genmets->end();
i++) {
693 if (l2taujets.isValid()) {
698 for(reco::CaloJetCollection::const_iterator
i = l2taus.begin();
699 i!= l2taus.end(); ++
i){
708 if (taujets.isValid()) {
713 typedef reco::HLTTauCollection::const_iterator tauit;
715 for(tauit
i=mytaujets.begin();
i!=mytaujets.end();
i++){
723 l25tauPt[itau] =
i->getL25LeadTrackPtValue();
740 typedef reco::PFTauCollection::const_iterator pftauit;
742 for(pftauit
i=taus.begin();
i!=taus.end();
i++){
748 ohpfTauJetPt[ipftau] =
i->pfTauTagInfoRef()->pfjetRef()->pt();
755 if( (
i->leadPFNeutralCand()).isNonnull())
760 if((
i->leadPFChargedHadrCand()).isNonnull()){
768 float maxPtTrkIso = 0;
769 for (
unsigned int iTrk = 0; iTrk <
i->isolationPFChargedHadrCands().size(); iTrk++)
771 if(
i->isolationPFChargedHadrCands()[iTrk]->pt() > maxPtTrkIso) maxPtTrkIso =
i->isolationPFChargedHadrCands()[iTrk]->pt();
773 if (
i->isolationPFChargedHadrCands()[iTrk]->trackRef().isNonnull()){
788 float maxPtGammaIso = 0;
789 for (
unsigned int iGamma = 0; iGamma <
i->isolationPFGammaCands().size(); iGamma++)
791 if(
i->isolationPFGammaCands()[iGamma]->pt() > maxPtGammaIso) maxPtGammaIso =
i->isolationPFGammaCands()[iGamma]->pt();
796 for (
unsigned int iTrk = 0; iTrk <
i->signalPFChargedHadrCands().size(); iTrk++)
798 if (
i->signalPFChargedHadrCands ()[iTrk]->trackRef().isNonnull()){
821 if(pfTausTightCone.isValid()) {
827 typedef reco::PFTauCollection::const_iterator pftauit;
829 for(pftauit
i=taus.begin();
i!=taus.end();
i++){
838 if( (
i->leadPFNeutralCand()).isNonnull())
844 if((
i->leadPFChargedHadrCand()).isNonnull())
849 float maxPtTrkIso = 0;
850 for (
unsigned int iTrk = 0; iTrk <
i->isolationPFChargedHadrCands().size(); iTrk++)
852 if(
i->isolationPFChargedHadrCands()[iTrk]->pt() > maxPtTrkIso) maxPtTrkIso =
i->isolationPFChargedHadrCands()[iTrk]->pt();
856 float maxPtGammaIso = 0;
857 for (
unsigned int iGamma = 0; iGamma <
i->isolationPFGammaCands().size(); iGamma++)
859 if(
i->isolationPFGammaCands()[iGamma]->pt() > maxPtGammaIso) maxPtGammaIso =
i->isolationPFGammaCands()[iGamma]->pt();
869 if(recoPfTaus.isValid()) {
870 float minTrkPt = minPtCH;
871 float minGammaPt = minPtGamma;
877 typedef reco::PFTauCollection::const_iterator pftauit;
880 for(pftauit
i=taus.begin();
i!=taus.end();
i++){
886 if( (
i->leadPFNeutralCand()).isNonnull())
892 if((
i->leadPFChargedHadrCand()).isNonnull())
898 for (
unsigned int iTrk = 0; iTrk <
i->isolationPFChargedHadrCands().size(); iTrk++)
900 if(
i->isolationPFChargedHadrCands()[iTrk]->pt() > minTrkPt) myTrks++;
901 if (
i->isolationPFChargedHadrCands()[iTrk]->trackRef().isNonnull()){
917 for (
unsigned int iGamma = 0; iGamma <
i->isolationPFGammaCands().size(); iGamma++)
919 if(
i->isolationPFGammaCands()[iGamma]->pt() > minGammaPt) myGammas++;
924 for (
unsigned int iTrk = 0; iTrk <
i->signalPFChargedHadrCands().size(); iTrk++)
926 if (
i->signalPFChargedHadrCands ()[iTrk]->trackRef().isNonnull()){
941 if(theRecoPFTauDiscrByTanCOnePercent.
isValid()){
943 if(theRecoPFTauDiscrByIsolation.
isValid()){
945 if(theRecoPFTauDiscrAgainstMuon.
isValid()){
947 if(theRecoPFTauDiscrAgainstElec.
isValid()){
949 if(theRecoPFTauDiscrByTanCHalfPercent.
isValid()){
951 if(theRecoPFTauDiscrByTanCQuarterPercent.
isValid()){
953 if(theRecoPFTauDiscrByTanCTenthPercent.
isValid()){
965 typedef reco::PFJetCollection::const_iterator pfJetit;
971 for(pfJetit
i=Jets.begin();
i!=Jets.end();
i++){
985 if (
i->pt() > 40. &&
abs(
i->eta())<3.0)
988 pfMHTx = pfMHTx +
i->px();
989 pfMHTy = pfMHTy +
i->py();
993 pfMHT =
sqrt(pfMHTx*pfMHTx + pfMHTy*pfMHTy);
999 nrpj = recoPFJets->size();
1002 typedef reco::PFJetCollection::const_iterator pfJetit;
1004 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
uint32_t denseIndex(const DetId &id) const
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