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