CMS 3D CMS Logo

ConversionTools.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------
2 //
3 // ConversionTools
4 //
5 // Utility to match electrons/photons/tracks to conversions and perform various conversion
6 // selection criteria.
7 //
8 // Matching to photons is by geometrical match with the SuperCluster (defined by angle between
9 // conversion momentum and vector joining conversion vertex to SuperCluster position)
10 //
11 // Matching to tracks and electrons is by reference.
12 //
13 // Also implemented here is a "conversion-safe electron veto" for photons through the
14 // matchedPromptElectron and hasMatchedPromptElectron functions
15 //
16 //
17 // Authors: J.Bendavid
18 //--------------------------------------------------------------------------------------------------
19 
20 #ifndef EgammaTools_ConversionTools_h
21 #define EgammaTools_ConversionTools_h
22 
36 public:
38 
39  static bool isGoodConversion(const reco::Conversion &conv,
40  const math::XYZPoint &beamspot,
41  float lxyMin = 2.0,
42  float probMin = 1e-6,
43  unsigned int nHitsBeforeVtxMax = 1);
44 
45  static bool matchesConversion(const reco::GsfElectron &ele,
46  const reco::Conversion &conv,
47  bool allowCkfMatch = true,
48  bool allowAmbiguousGsfMatch = false);
49  static bool matchesConversion(const reco::GsfElectronCore &eleCore,
50  const reco::Conversion &conv,
51  bool allowCkfMatch = true);
52  static bool matchesConversion(const reco::SuperCluster &sc,
53  const reco::Conversion &conv,
54  float dRMax = 0.1,
55  float dEtaMax = 999.,
56  float dPhiMax = 999.);
57  static bool matchesConversion(const edm::RefToBase<reco::Track> &trk, const reco::Conversion &conv);
58  static bool matchesConversion(const reco::TrackRef &trk, const reco::Conversion &conv);
59  static bool matchesConversion(const reco::GsfTrackRef &trk, const reco::Conversion &conv);
60 
61  static bool hasMatchedConversion(const reco::GsfElectron &ele,
62  const reco::ConversionCollection &convCol,
63  const math::XYZPoint &beamspot,
64  bool allowCkfMatch = true,
65  float lxyMin = 2.0,
66  float probMin = 1e-6,
67  unsigned int nHitsBeforeVtxMax = 0);
68 
69  static bool hasMatchedConversion(const reco::TrackRef &trk,
70  const reco::ConversionCollection &convCol,
71  const math::XYZPoint &beamspot,
72  float lxyMin = 2.0,
73  float probMin = 1e-6,
74  unsigned int nHitsBeforeVtxMax = 1);
75 
76  static bool hasMatchedConversion(const reco::SuperCluster &sc,
77  const reco::ConversionCollection &convCol,
78  const math::XYZPoint &beamspot,
79  float dRMax = 0.1,
80  float dEtaMax = 999.,
81  float dPhiMax = 999.,
82  float lxyMin = 2.0,
83  float probMin = 1e-6,
84  unsigned int nHitsBeforeVtxMax = 1);
85 
86  static reco::Conversion const *matchedConversion(const reco::GsfElectron &ele,
87  const reco::ConversionCollection &convCol,
88  const math::XYZPoint &beamspot,
89  bool allowCkfMatch = true,
90  float lxyMin = 2.0,
91  float probMin = 1e-6,
92  unsigned int nHitsBeforeVtxMax = 0);
93 
94  static reco::Conversion const *matchedConversion(const reco::GsfElectronCore &eleCore,
95  const reco::ConversionCollection &convCol,
96  const math::XYZPoint &beamspot,
97  bool allowCkfMatch = true,
98  float lxyMin = 2.0,
99  float probMin = 1e-6,
100  unsigned int nHitsBeforeVtxMax = 0);
101 
102  static reco::Conversion const *matchedConversion(const reco::TrackRef &trk,
103  const reco::ConversionCollection &convCol,
104  const math::XYZPoint &beamspot,
105  float lxyMin = 2.0,
106  float probMin = 1e-6,
107  unsigned int nHitsBeforeVtxMax = 1);
108 
109  static reco::Conversion const *matchedConversion(const reco::SuperCluster &sc,
110  const reco::ConversionCollection &convCol,
111  const math::XYZPoint &beamspot,
112  float dRMax = 0.1,
113  float dEtaMax = 999.,
114  float dPhiMax = 999.,
115  float lxyMin = 2.0,
116  float probMin = 1e-6,
117  unsigned int nHitsBeforeVtxMax = 1);
118 
119  static bool hasMatchedPromptElectron(const reco::SuperClusterRef &sc,
120  const reco::GsfElectronCollection &eleCol,
121  const reco::ConversionCollection &convCol,
122  const math::XYZPoint &beamspot,
123  bool allowCkfMatch = true,
124  float lxyMin = 2.0,
125  float probMin = 1e-6,
126  unsigned int nHitsBeforeVtxMax = 0);
127 
129  const reco::GsfElectronCollection &eleCol,
130  const reco::ConversionCollection &convCol,
131  const math::XYZPoint &beamspot,
132  bool allowCkfMatch = true,
133  float lxyMin = 2.0,
134  float probMin = 1e-6,
135  unsigned int nHitsBeforeVtxMax = 0);
136 
137  static float getVtxFitProb(const reco::Conversion *conv);
138 };
139 #endif
static bool matchesConversion(const reco::GsfElectron &ele, const reco::Conversion &conv, bool allowCkfMatch=true, bool allowAmbiguousGsfMatch=false)
static reco::Conversion const * matchedConversion(const reco::GsfElectron &ele, const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
static HepMC::IO_HEPEVT conv
static bool hasMatchedPromptElectron(const reco::SuperClusterRef &sc, const reco::GsfElectronCollection &eleCol, const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
static float getVtxFitProb(const reco::Conversion *conv)
static bool hasMatchedConversion(const reco::GsfElectron &ele, const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
static reco::GsfElectron const * matchedPromptElectron(const reco::SuperClusterRef &sc, const reco::GsfElectronCollection &eleCol, const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
static bool isGoodConversion(const reco::Conversion &conv, const math::XYZPoint &beamspot, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=1)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12