diff --git a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h index b85942885c3c5..cd60de7d4ce5f 100644 --- a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h +++ b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h @@ -53,7 +53,7 @@ class TauIdMVAAuxiliaries { EcalEnInSignalPFCands += pfcand->ecalEnergy(); HcalEnInSignalPFCands += pfcand->hcalEnergy(); } - // JAN - FIXME: not calculated for PackedCandidate + // TauReco@MiniAOD: recalculate for PackedCandidate if added to MiniAOD event content } float total = EcalEnInSignalPFCands + HcalEnInSignalPFCands; if(total == 0.){ diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronFromPFCandidatePlugin.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronFromPFCandidatePlugin.cc index 1a9e51c093c36..cf71e592938b0 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronFromPFCandidatePlugin.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronFromPFCandidatePlugin.cc @@ -186,7 +186,6 @@ PFRecoTauChargedHadronFromPFCandidatePlugin::return_type PFRecoTauChargedHadronF else algo = PFRecoTauChargedHadron::kPFNeutralHadron; std::auto_ptr chargedHadron(new PFRecoTauChargedHadron(**cand, algo)); - // JAN - work on this. This must be adapted carefully to MiniAOD packed candidates const reco::PFCandidate* pfCand = dynamic_cast(&**cand); if (pfCand) { if ( pfCand->trackRef().isNonnull() ) chargedHadron->track_ = edm::refToPtr(pfCand->trackRef()); @@ -194,9 +193,8 @@ PFRecoTauChargedHadronFromPFCandidatePlugin::return_type PFRecoTauChargedHadronF else if ( pfCand->muonRef().isNonnull() && pfCand->muonRef()->globalTrack().isNonnull() ) chargedHadron->track_ = edm::refToPtr(pfCand->muonRef()->globalTrack()); else if ( pfCand->muonRef().isNonnull() && pfCand->muonRef()->outerTrack().isNonnull() ) chargedHadron->track_ = edm::refToPtr(pfCand->muonRef()->outerTrack()); else if ( pfCand->gsfTrackRef().isNonnull() ) chargedHadron->track_ = edm::refToPtr(pfCand->gsfTrackRef()); - - - } + } // TauReco@MiniAOD: Tracks only available dynamically, so no possiblity to save ref here; checked by code downstream + chargedHadron->positionAtECALEntrance_ = atECALEntrance(&**cand, bField_); chargedHadron->chargedPFCandidate_ = (*cand); chargedHadron->addDaughter(*cand); @@ -238,7 +236,7 @@ PFRecoTauChargedHadronFromPFCandidatePlugin::return_type PFRecoTauChargedHadronF maxUnmatchedBlockElements = maxUnmatchedBlockElementsPhoton_; minMergeEt = minMergeGammaEt_; } - // JAN - FIXME - block matching possible in miniAOD? probably not?? but is it important after all? + // TauReco@MiniAOD: No access to PF blocks at MiniAOD level, but the code below seems to have very minor impact const reco::PFCandidate* pfCHCand = dynamic_cast(&*chargedHadron->chargedPFCandidate_); const reco::PFCandidate* pfJetConstituent = dynamic_cast(&**jetConstituent); if (pfCHCand && pfJetConstituent) { diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauEnergyAlgorithmPlugin.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauEnergyAlgorithmPlugin.cc index 4783d894f9fbf..5ec9c6679d4b2 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauEnergyAlgorithmPlugin.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauEnergyAlgorithmPlugin.cc @@ -337,8 +337,7 @@ void PFRecoTauEnergyAlgorithmPlugin::operator()(reco::PFTau& tau) const << " HCAL = " << (pfCand)->hcalEnergy() << "," << " HO = " << (pfCand)->hoEnergy() << std::endl; } - // JAN - FIXME - this info is not readily available in miniAOD - // This means this sub-algo is currently broken + // TauReco@MiniAOD: This info is not yet available in miniAOD. if ( edm::isFinite(pfCand->ecalEnergy()) ) allNeutralsSumEn += pfCand->ecalEnergy(); if ( edm::isFinite(pfCand->hcalEnergy()) ) allNeutralsSumEn += pfCand->hcalEnergy(); if ( edm::isFinite(pfCand->hoEnergy()) ) allNeutralsSumEn += pfCand->hoEnergy(); diff --git a/RecoTauTag/RecoTau/plugins/RecoTauProducer.cc b/RecoTauTag/RecoTau/plugins/RecoTauProducer.cc index 73fa286faa78d..693e6e287cc8c 100644 --- a/RecoTauTag/RecoTau/plugins/RecoTauProducer.cc +++ b/RecoTauTag/RecoTau/plugins/RecoTauProducer.cc @@ -203,7 +203,6 @@ void RecoTauProducer::produce(edm::Event& evt, const edm::EventSetup& es) builder != builders_.end(); ++builder) { // Get a ptr_vector of taus from the builder reco::tau::RecoTauBuilderPlugin::output_type taus((*builder)(jetRef, chargedHadrons, piZeros, uniqueRegionalCands)); - // JAN - convert reco::Jet ref to PFJet ref (only in direct interaction with PFTau) // Make sure all taus have their jetref set correctly std::for_each(taus.begin(), taus.end(), boost::bind(&reco::PFTau::setjetRef, _1, reco::JetBaseRef(jetRef))); diff --git a/RecoTauTag/RecoTau/src/RecoTauVertexAssociator.cc b/RecoTauTag/RecoTau/src/RecoTauVertexAssociator.cc index 152069f0933f5..8177d2d0ea5ed 100644 --- a/RecoTauTag/RecoTau/src/RecoTauVertexAssociator.cc +++ b/RecoTauTag/RecoTau/src/RecoTauVertexAssociator.cc @@ -34,6 +34,8 @@ namespace { inline const reco::TrackBaseRef getTrackRef(const Candidate& cand) { + // TauReco@MiniAOD: This version does not work on top of MiniAOD, however, + // it is only used for non-default track-vertex associations const PFCandidate* pfCandPtr = dynamic_cast(&cand); if (pfCandPtr != nullptr) { if ( pfCandPtr->trackRef().isNonnull() ) return reco::TrackBaseRef(pfCandPtr->trackRef()); @@ -41,9 +43,6 @@ namespace { else return reco::TrackBaseRef(); } - // FIXME - JAN - should put an error message somewhere that we use an algo that - // is not supported for PackedCandidates - return reco::TrackBaseRef(); } }