Skip to content

Commit

Permalink
Remove commented code, and update comments related to tau reco at Min…
Browse files Browse the repository at this point in the history
…iAOD
  • Loading branch information
steggema committed Mar 12, 2018
1 parent 413e8fb commit 95d5cef
Showing 1 changed file with 4 additions and 29 deletions.
33 changes: 4 additions & 29 deletions PhysicsTools/PatAlgos/plugins/PATTauProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -408,16 +408,13 @@ void PATTauProducer::produce(edm::Event & iEvent, const edm::EventSetup & iSetup
else{
const pat::PackedCandidate* packedCandPtr = dynamic_cast<const pat::PackedCandidate*>(it.get());
if(packedCandPtr != nullptr) {
//position at ECAL entrance can be recomputed, but individual ECAL and HCAL energies not
//ecalEnergy += packedCandPtr->ecalEnergy();
//hcalEnergy += packedCandPtr->hcalEnergy();
//sumPhiTimesEnergy += packedCandPtr->positionAtECALEntrance().phi()*packedCandPtr->energy();
//sumEtaTimesEnergy += packedCandPtr->positionAtECALEntrance().eta()*packedCandPtr->energy();
// TauReco@MiniAOD: individual ECAL and HCAL energies currently not available for PackedCandidates
// (see above implementation for PFCandidates).
// Should be added if available, as well as on-the-fly computation of position at ECAL entrance
sumEnergy += packedCandPtr->energy();
const reco::Track* track = packedCandPtr->hasTrackDetails() ? &packedCandPtr->pseudoTrack() : nullptr;
if( track != nullptr ) {
if( track->pt() > leadChargedCandPt ) {
//leadChargedCandEtaAtEcalEntrance = packedCandPtr->positionAtECALEntrance().eta();
leadChargedCandPt = track->pt();
}
}
Expand Down Expand Up @@ -473,32 +470,10 @@ void PATTauProducer::produce(edm::Event & iEvent, const edm::EventSetup & iSetup
else {
const pat::PackedCandidate* packedCandPtr = dynamic_cast<const pat::PackedCandidate*>(leadingPFCharged.get());
if (packedCandPtr != nullptr) {
//individual ECAL and HCAL energies not available with packedCandPtridates
//ecalEnergyLeadChargedHadrCand = packedCandPtr->ecalEnergy();
//hcalEnergyLeadChargedHadrCand = packedCandPtr->hcalEnergy();
// TauReco@MiniAOD: Update code below if ecal/hcal energies are available.
const reco::Track* track = packedCandPtr->hasTrackDetails() ? &packedCandPtr->pseudoTrack() : nullptr;
if (track != nullptr) {
leadingTrackNormChi2 = track->normalizedChi2();
//individual ECAL and HCAL energies not available with packedCandidates
/*
for(const auto& tauIt : pfTauRef->isolationPFCands()){
const pat::PackedCandidate* packedPtr = dynamic_cast<const pat::PackedCandidate*>(tauIt.get());
if(packedPtr != nullptr) {
myHCALenergy += packedPtr->hcalEnergy();
myECALenergy += packedPtr->ecalEnergy();
}
}
for(const auto& tauIt : pfTauRef->signalPFCands()){
const pat::PackedCandidate* packedPtr = dynamic_cast<const pat::PackedCandidate*>(tauIt.get());
if(packedPtr != nullptr) {
myHCALenergy += packedPtr->hcalEnergy();
myECALenergy += packedPtr->ecalEnergy();
}
}
if( myHCALenergy + myECALenergy > 0. ) {
emFraction = myECALenergy/( myHCALenergy + myECALenergy);
}
*/
}
}
}
Expand Down

0 comments on commit 95d5cef

Please sign in to comment.