Skip to content

Commit

Permalink
porting into CMSSW_7X
Browse files Browse the repository at this point in the history
  • Loading branch information
beaudett committed Jul 5, 2013
1 parent 3f69083 commit a4eaf31
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -632,28 +632,12 @@ void PFEGammaAlgo::RunPFEG(const reco::PFBlockRef& blockRef,
elemsToLock.push_back(track2->second);
// so it's another active conversion track, that is in the Block and linked to the conversion track we already found
// find the ECAL cluster linked to it...
std::multimap<double, unsigned int> convEcalAll;
std::multimap<double, unsigned int> convEcal;
blockRef->associatedElements( track2->second,
linkData,
convEcalAll,
convEcal,
reco::PFBlockElement::ECAL,
reco::PFBlock::LINKTEST_ALL);

//create cleaned collection of associated ecal clusters restricted to subdetector of the seeding supercluster
//This cleaning is needed since poorly reconstructed conversions can occasionally have the second track pointing
//to the wrong subdetector
std::multimap<double, unsigned int> convEcal;
for(std::multimap<double, unsigned int>::iterator itecal = convEcalAll.begin();
itecal != convEcalAll.end(); ++itecal) {

// to get the reference to the PF clusters, this is needed.
reco::PFClusterRef clusterRef = elements[itecal->second].clusterRef();

if (clusterRef->hitsAndFractions().at(0).first.subdetId()==sc->superClusterRef()->seed()->hitsAndFractions().at(0).first.subdetId()) {
convEcal.insert(*itecal);
}
}

float p_in=sqrt(elements[track->second].trackRef()->innerMomentum().x()*elements[track->second].trackRef()->innerMomentum().x()+
elements[track->second].trackRef()->innerMomentum().y()*elements[track->second].trackRef()->innerMomentum().y()+
elements[track->second].trackRef()->innerMomentum().z()*elements[track->second].trackRef()->innerMomentum().z());
Expand Down

0 comments on commit a4eaf31

Please sign in to comment.