CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ConversionTrackPairFinder.h
Go to the documentation of this file.
1 #ifndef ConversionTrackPairFinder_H
2 #define ConversionTrackPairFinder_H
3 
19 
20 //
27 
28 //
32 
33 
35  bool operator() ( const reco::TransientTrack& a, const reco::TransientTrack & b ) const{
37 };
38 
40  bool operator() ( const std::vector<reco::TransientTrack> & a, const std::vector<reco::TransientTrack> & b ) const{
41  return ( a[0].impactPointState().globalMomentum().perp() >
42  b[0].impactPointState().globalMomentum().perp() ) ;}
43  };
44 
45 
47 
48 public:
49 
51 
52 
54 
55 
56 
57  std::map<std::vector<reco::TransientTrack>, reco::CaloClusterPtr, CompareTwoTracksVectors> run(std::vector<reco::TransientTrack> outIn,
58  const edm::Handle<reco::TrackCollection>& outInTrkHandle,
60  std::vector<reco::TransientTrack> inOut,
61  const edm::Handle<reco::TrackCollection>& inOutTrkHandle,
62  const edm::Handle<reco::TrackCaloClusterPtrAssociation>& inOutTrackSCAssH );
63 
64 
65 
66 
67  private:
68 
69 class ByNumOfHits {
70  public:
72  if (a.numberOfValidHits() == b.numberOfValidHits() ) {
73  return a.normalizedChi2() < b.normalizedChi2();
74  } else {
75  return a.numberOfValidHits() > b.numberOfValidHits() ;
76  }
77  }
78 };
79 
80 
81 
82 };
83 
84 #endif // ConversionTrackPairFinder_H
85 
86 
unsigned short numberOfValidHits() const
number of hits found
std::map< std::vector< reco::TransientTrack >, reco::CaloClusterPtr, CompareTwoTracksVectors > run(std::vector< reco::TransientTrack > outIn, const edm::Handle< reco::TrackCollection > &outInTrkHandle, const edm::Handle< reco::TrackCaloClusterPtrAssociation > &outInTrackSCAssH, std::vector< reco::TransientTrack > inOut, const edm::Handle< reco::TrackCollection > &inOutTrkHandle, const edm::Handle< reco::TrackCaloClusterPtrAssociation > &inOutTrackSCAssH)
bool operator()(const reco::TransientTrack &a, const reco::TransientTrack &b) const
T perp() const
Definition: PV3DBase.h:71
bool operator()(const std::vector< reco::TransientTrack > &a, const std::vector< reco::TransientTrack > &b) const
edm::Ptr< CaloCluster > CaloClusterPtr
bool operator()(reco::TransientTrack const &a, reco::TransientTrack const &b)
double b
Definition: hdecay.h:120
double normalizedChi2() const
chi-squared divided by n.d.o.f.
T perp() const
Magnitude of transverse component.
GlobalVector globalMomentum() const
double a
Definition: hdecay.h:121
TrajectoryStateOnSurface impactPointState() const