CMS 3D CMS Logo

ConversionFinder.h
Go to the documentation of this file.
1 #ifndef EgammaTools_ConversionFinder_h
2 #define EgammaTools_ConversionFinder_h
3 
23 #include "Math/VectorUtil.h"
24 #include "ConversionInfo.h"
25 
26 
27 
28 /*
29  Class Looks for oppositely charged track in the
30  track collection with the minimum delta cot(theta) between the track
31  and the electron's CTF track (if it doesn't exist, we use the electron's
32  GSF track). Calculate the dist, dcot, point of conversion and the
33  radius of conversion for this pair and fill the ConversionInfo
34 */
35 
36 namespace egammaTools {
37  //bField has to be supplied in Tesla
38 
39  //returns a vector of Conversion Infos.
40  //you have to decide which is the best
41  std::vector<ConversionInfo> getConversionInfos(const reco::GsfElectronCore&,
42  const edm::Handle<reco::TrackCollection>& ctftracks_h,
43  const edm::Handle<reco::GsfTrackCollection>& gsftracks_h,
44  const double bFieldAtOrigin,
45  const double minFracSharedHits = 0.45);
46 
47  //retruns the "best" Conversion Info after calling getConversionInfos
49  const edm::Handle<reco::TrackCollection>& ctftracks_h,
50  const edm::Handle<reco::GsfTrackCollection>& gsftracks_h,
51  const double bFieldAtOrigin,
52  const double minFracSharedHits = 0.45);
53 
54  //retruns the "best" Conversion Info after calling getConversionInfos
56  const edm::Handle<reco::TrackCollection>& ctftracks_h,
57  const edm::Handle<reco::GsfTrackCollection>& gsftracks_h,
58  const double bFieldAtOrigin,
59  const double minFracSharedHits = 0.45);
60 
61  //takes in a vector of candidate conversion partners
62  //and arbitrates between them returning the one with the
63  //smallest R=sqrt(dist*dist + dcot*dcot)
64  ConversionInfo arbitrateConversionPartnersbyR(const std::vector<ConversionInfo>& v_convCandidates);
65 
66 
67  //places different cuts on dist, dcot, delmissing hits and arbitration based on R = sqrt(dist*dist + dcot*dcot)
68  ConversionInfo findBestConversionMatch(const std::vector<ConversionInfo>& v_convCandidates);
69 
70  //for backwards compatibility. Does not use the GSF track collection. This function will be
71  //deprecated soon
74  const double bFieldAtOrigin,
75  const double minFracSharedHits = 0.45);
76 
77 
78  // DEPRECATED
79  bool isFromConversion( const ConversionInfo &, double maxAbsDist = 0.02, double maxAbsDcot = 0.02);
80 
81 }
82 #endif
ConversionInfo getConversionInfo(const reco::GsfElectronCore &, const edm::Handle< reco::TrackCollection > &ctftracks_h, const edm::Handle< reco::GsfTrackCollection > &gsftracks_h, const double bFieldAtOrigin, const double minFracSharedHits=0.45)
bool isFromConversion(const ConversionInfo &, double maxAbsDist=0.02, double maxAbsDcot=0.02)
ConversionInfo arbitrateConversionPartnersbyR(const std::vector< ConversionInfo > &v_convCandidates)
ConversionInfo findBestConversionMatch(const std::vector< ConversionInfo > &v_convCandidates)
std::vector< ConversionInfo > getConversionInfos(const reco::GsfElectronCore &, const edm::Handle< reco::TrackCollection > &ctftracks_h, const edm::Handle< reco::GsfTrackCollection > &gsftracks_h, const double bFieldAtOrigin, const double minFracSharedHits=0.45)