CMS 3D CMS Logo

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