CMS 3D CMS Logo

ConversionTrackPairFinder.h
Go to the documentation of this file.
1 #ifndef ConversionTrackPairFinder_H
2 #define ConversionTrackPairFinder_H
3 
18 
19 //
26 
27 //
31 
34  return a.impactPointState().globalMomentum().perp() > b.impactPointState().globalMomentum().perp();
35  }
36 };
37 
39  bool operator()(const std::vector<reco::TransientTrack>& a, const std::vector<reco::TransientTrack>& b) const {
40  return (a[0].impactPointState().globalMomentum().perp() > b[0].impactPointState().globalMomentum().perp());
41  }
42 };
43 
45 public:
47 
49 
50  std::map<std::vector<reco::TransientTrack>, reco::CaloClusterPtr, CompareTwoTracksVectors> run(
51  const std::vector<reco::TransientTrack>& outIn,
52  const edm::Handle<reco::TrackCollection>& outInTrkHandle,
54  const std::vector<reco::TransientTrack>& inOut,
55  const edm::Handle<reco::TrackCollection>& inOutTrkHandle,
57 
58 private:
59  class ByNumOfHits {
60  public:
62  if (a.numberOfValidHits() == b.numberOfValidHits()) {
63  return a.normalizedChi2() < b.normalizedChi2();
64  } else {
65  return a.numberOfValidHits() > b.numberOfValidHits();
66  }
67  }
68  };
69 };
70 
71 #endif // ConversionTrackPairFinder_H
TrackExtra.h
Handle.h
GsfTrackExtra.h
ESHandle.h
ConversionTrackPairFinder::ByNumOfHits::operator()
bool operator()(reco::TransientTrack const &a, reco::TransientTrack const &b)
Definition: ConversionTrackPairFinder.h:61
CompareTwoTracks::operator()
bool operator()(const reco::TransientTrack &a, const reco::TransientTrack &b) const
Definition: ConversionTrackPairFinder.h:33
ConversionTrackPairFinder::ConversionTrackPairFinder
ConversionTrackPairFinder()
Definition: ConversionTrackPairFinder.cc:15
TransientTrack.h
perp
T perp() const
Magnitude of transverse component.
Definition: Basic3DVectorLD.h:133
edm::Handle< reco::TrackCollection >
reco::CaloClusterPtr
edm::Ptr< CaloCluster > CaloClusterPtr
Definition: CaloClusterFwd.h:21
ConversionTrackPairFinder
Definition: ConversionTrackPairFinder.h:44
ConversionTrackPairFinder::run
std::map< std::vector< reco::TransientTrack >, reco::CaloClusterPtr, CompareTwoTracksVectors > run(const std::vector< reco::TransientTrack > &outIn, const edm::Handle< reco::TrackCollection > &outInTrkHandle, const edm::Handle< reco::TrackCaloClusterPtrAssociation > &outInTrackSCAssH, const std::vector< reco::TransientTrack > &inOut, const edm::Handle< reco::TrackCollection > &inOutTrkHandle, const edm::Handle< reco::TrackCaloClusterPtrAssociation > &inOutTrackSCAssH)
Definition: ConversionTrackPairFinder.cc:26
CompareTwoTracksVectors::operator()
bool operator()(const std::vector< reco::TransientTrack > &a, const std::vector< reco::TransientTrack > &b) const
Definition: ConversionTrackPairFinder.h:39
Track.h
CaloClusterFwd.h
ConversionTrackPairFinder::~ConversionTrackPairFinder
~ConversionTrackPairFinder()
Definition: ConversionTrackPairFinder.cc:20
b
double b
Definition: hdecay.h:118
ConversionTrackPairFinder::ByNumOfHits
Definition: ConversionTrackPairFinder.h:59
a
double a
Definition: hdecay.h:119
Event.h
TrackTransientTrack.h
GsfTrack.h
ValueMap.h
TrackCaloClusterAssociation.h
GsfTrackFwd.h
reco::TransientTrack
Definition: TransientTrack.h:19
CompareTwoTracksVectors
Definition: ConversionTrackPairFinder.h:38
EventSetup.h
CompareTwoTracks
Definition: ConversionTrackPairFinder.h:32