#include <EgAmbiguityTools.h>
Public Member Functions | |
isInnerMost (edm::ESHandle< TrackerGeometry > &geom) | |
bool | operator() (const reco::GsfElectron *, const reco::GsfElectron *) |
Public Attributes | |
edm::ESHandle< TrackerGeometry > | trackerHandle_ |
Definition at line 55 of file EgAmbiguityTools.h.
EgAmbiguityTools::isInnerMost::isInnerMost | ( | edm::ESHandle< TrackerGeometry > & | geom | ) | [inline] |
Definition at line 58 of file EgAmbiguityTools.h.
: trackerHandle_(geom) {}
bool EgAmbiguityTools::isInnerMost::operator() | ( | const reco::GsfElectron * | e1, |
const reco::GsfElectron * | e2 | ||
) |
Definition at line 72 of file EgAmbiguityTools.cc.
References reco::HitPattern::getHitPattern(), reco::HitPattern::getLayer(), reco::HitPattern::getSubStructure(), and EgAmbiguityTools::isBetter().
{ reco::HitPattern gsfHitPattern1 = e1->gsfTrack()->hitPattern() ; reco::HitPattern gsfHitPattern2 = e2->gsfTrack()->hitPattern() ; // retreive first valid hit int gsfHitCounter1 = 0 ; trackingRecHit_iterator elHitsIt1 ; for ( elHitsIt1 = e1->gsfTrack()->recHitsBegin() ; elHitsIt1 != e1->gsfTrack()->recHitsEnd() ; elHitsIt1++, gsfHitCounter1++ ) { if (((**elHitsIt1).isValid())) break ; } int gsfHitCounter2 = 0 ; trackingRecHit_iterator elHitsIt2 ; for ( elHitsIt2 = e2->gsfTrack()->recHitsBegin() ; elHitsIt2 != e2->gsfTrack()->recHitsEnd() ; elHitsIt2++, gsfHitCounter2++ ) { if (((**elHitsIt2).isValid())) break ; } uint32_t gsfHit1 = gsfHitPattern1.getHitPattern(gsfHitCounter1) ; uint32_t gsfHit2 = gsfHitPattern2.getHitPattern(gsfHitCounter2) ; if (gsfHitPattern1.getSubStructure(gsfHit1)!=gsfHitPattern2.getSubStructure(gsfHit2)) { return (gsfHitPattern1.getSubStructure(gsfHit1)<gsfHitPattern2.getSubStructure(gsfHit2)) ; } else if (gsfHitPattern1.getLayer(gsfHit1)!=gsfHitPattern2.getLayer(gsfHit2)) { return (gsfHitPattern1.getLayer(gsfHit1)<gsfHitPattern2.getLayer(gsfHit2)) ; } else { return isBetter(e1,e2) ; } }
Definition at line 57 of file EgAmbiguityTools.h.