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.);
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
TrackExtra.h
photonValidator_cfi.dEtaMax
dEtaMax
Definition: photonValidator_cfi.py:76
reco::Conversion
Definition: Conversion.h:23
conv
static HepMC::IO_HEPEVT conv
Definition: BeamHaloProducer.cc:48
ConversionTools::ConversionTools
ConversionTools()
Definition: ConversionTools.h:37
reco::SuperCluster
Definition: SuperCluster.h:18
recoSelectForWrite_cfi.probMin
probMin
Definition: recoSelectForWrite_cfi.py:8
ConversionTools::hasMatchedPromptElectron
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)
Definition: ConversionTools.cc:392
ConversionTools::getVtxFitProb
static float getVtxFitProb(const reco::Conversion *conv)
Definition: ConversionTools.cc:441
reco::GsfElectronCollection
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
Definition: GsfElectronFwd.h:14
ConversionFwd.h
edm::Ref< TrackCollection >
reco::ConversionCollection
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
Photon.h
Track.h
TrackFwd.h
ConversionTools::hasMatchedConversion
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)
Definition: ConversionTools.cc:184
beamspot
Definition: BeamSpotWrite2Txt.h:8
reco::GsfElectron
Definition: GsfElectron.h:35
GsfElectron.h
GsfElectronFwd.h
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
ConversionTools::matchesConversion
static bool matchesConversion(const reco::GsfElectron &ele, const reco::Conversion &conv, bool allowCkfMatch=true, bool allowAmbiguousGsfMatch=false)
Definition: ConversionTools.cc:54
ConversionTools::isGoodConversion
static bool isGoodConversion(const reco::Conversion &conv, const math::XYZPoint &beamspot, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=1)
Definition: ConversionTools.cc:16
reco::GsfElectronCore
Definition: GsfElectronCore.h:32
GsfTrack.h
metBenchmark_cfi.dRMax
dRMax
Definition: metBenchmark_cfi.py:18
GsfTrackFwd.h
ConversionTools::matchedPromptElectron
static const reco::GsfElectron * 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)
Definition: ConversionTools.cc:405
ConversionTools::matchedConversion
static const reco::Conversion * 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)
Definition: ConversionTools.cc:258
Point3D.h
edm::RefToBase< reco::Track >
ConversionTools
Definition: ConversionTools.h:35
CSCSegmentAlgorithmRU_cfi.dPhiMax
dPhiMax
Definition: CSCSegmentAlgorithmRU_cfi.py:10
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37