Main Page
Namespaces
Classes
Package Documentation
RecoEgamma
EgammaTools
interface
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
23
#include "
DataFormats/TrackReco/interface/Track.h
"
24
#include "
DataFormats/Math/interface/Point3D.h
"
25
#include "
DataFormats/EgammaCandidates/interface/GsfElectron.h
"
26
#include "
DataFormats/EgammaCandidates/interface/GsfElectronFwd.h
"
27
#include "
DataFormats/EgammaCandidates/interface/Photon.h
"
28
#include "
DataFormats/EgammaCandidates/interface/ConversionFwd.h
"
29
#include "
DataFormats/TrackReco/interface/Track.h
"
30
#include "
DataFormats/TrackReco/interface/TrackExtra.h
"
31
#include "
DataFormats/TrackReco/interface/TrackFwd.h
"
32
#include "
DataFormats/Math/interface/Point3D.h
"
33
#include "
DataFormats/GsfTrackReco/interface/GsfTrack.h
"
34
#include "
DataFormats/GsfTrackReco/interface/GsfTrackFwd.h
"
35
class
ConversionTools
36
{
37
public
:
38
ConversionTools
() {}
39
40
41
static
bool
isGoodConversion
(
const
reco::Conversion
&
conv
,
const
math::XYZPoint
&
beamspot
,
float
lxyMin=2.0,
float
probMin=1
e
-6,
unsigned
int
nHitsBeforeVtxMax=1);
42
43
static
bool
matchesConversion
(
const
reco::GsfElectron
&ele,
const
reco::Conversion
&conv,
bool
allowCkfMatch=
true
,
bool
allowAmbiguousGsfMatch=
false
);
44
static
bool
matchesConversion
(
const
reco::SuperCluster
&
sc
,
const
reco::Conversion
&conv,
float
dRMax
= 0.1,
float
dEtaMax
= 999.,
float
dPhiMax
= 999.);
45
static
bool
matchesConversion
(
const
edm::RefToBase<reco::Track>
&trk,
const
reco::Conversion
&conv);
46
static
bool
matchesConversion
(
const
reco::TrackRef
&trk,
const
reco::Conversion
&conv);
47
static
bool
matchesConversion
(
const
reco::GsfTrackRef
&trk,
const
reco::Conversion
&conv);
48
49
50
static
bool
hasMatchedConversion
(
const
reco::GsfElectron
&ele,
51
const
edm::Handle<reco::ConversionCollection>
&convCol,
const
math::XYZPoint
&beamspot,
bool
allowCkfMatch=
true
,
float
lxyMin=2.0,
float
probMin=1
e
-6,
unsigned
int
nHitsBeforeVtxMax=0);
52
53
static
bool
hasMatchedConversion
(
const
reco::TrackRef
&trk,
54
const
edm::Handle<reco::ConversionCollection>
&convCol,
const
math::XYZPoint
&beamspot,
float
lxyMin=2.0,
float
probMin=1
e
-6,
unsigned
int
nHitsBeforeVtxMax=1);
55
56
static
bool
hasMatchedConversion
(
const
reco::SuperCluster
&sc,
57
const
edm::Handle<reco::ConversionCollection>
&convCol,
const
math::XYZPoint
&beamspot,
float
dRMax
= 0.1,
float
dEtaMax
= 999.,
float
dPhiMax
= 999.,
float
lxyMin=2.0,
float
probMin=1
e
-6,
unsigned
int
nHitsBeforeVtxMax=1);
58
59
60
static
reco::ConversionRef
matchedConversion
(
const
reco::GsfElectron
&ele,
61
const
edm::Handle<reco::ConversionCollection>
&convCol,
const
math::XYZPoint
&beamspot,
bool
allowCkfMatch=
true
,
float
lxyMin=2.0,
float
probMin=1
e
-6,
unsigned
int
nHitsBeforeVtxMax=0);
62
63
static
reco::ConversionRef
matchedConversion
(
const
reco::TrackRef
&trk,
64
const
edm::Handle<reco::ConversionCollection>
&convCol,
const
math::XYZPoint
&beamspot,
float
lxyMin=2.0,
float
probMin=1
e
-6,
unsigned
int
nHitsBeforeVtxMax=1);
65
66
static
reco::ConversionRef
matchedConversion
(
const
reco::SuperCluster
&sc,
67
const
edm::Handle<reco::ConversionCollection>
&convCol,
const
math::XYZPoint
&beamspot,
float
dRMax
= 0.1,
float
dEtaMax
= 999.,
float
dPhiMax
= 999.,
float
lxyMin=2.0,
float
probMin=1
e
-6,
unsigned
int
nHitsBeforeVtxMax=1);
68
69
static
bool
hasMatchedPromptElectron
(
const
reco::SuperClusterRef
&sc,
const
edm::Handle<reco::GsfElectronCollection>
&eleCol,
70
const
edm::Handle<reco::ConversionCollection>
&convCol,
const
math::XYZPoint
&beamspot,
bool
allowCkfMatch=
true
,
float
lxyMin=2.0,
float
probMin=1
e
-6,
unsigned
int
nHitsBeforeVtxMax=0);
71
72
73
static
reco::GsfElectronRef
matchedPromptElectron
(
const
reco::SuperClusterRef
&sc,
const
edm::Handle<reco::GsfElectronCollection>
&eleCol,
74
const
edm::Handle<reco::ConversionCollection>
&convCol,
const
math::XYZPoint
&beamspot,
bool
allowCkfMatch=
true
,
float
lxyMin=2.0,
float
probMin=1
e
-6,
unsigned
int
nHitsBeforeVtxMax=0);
75
76
};
77
#endif
reco::Conversion
Definition:
Conversion.h:24
ConversionTools::matchesConversion
static bool matchesConversion(const reco::GsfElectron &ele, const reco::Conversion &conv, bool allowCkfMatch=true, bool allowAmbiguousGsfMatch=false)
Definition:
ConversionTools.cc:50
conv
static HepMC::IO_HEPEVT conv
Definition:
BeamHaloProducer.cc:50
edm::Ref< TrackCollection >
reco::GsfElectron
Definition:
GsfElectron.h:37
edm::Handle< reco::ConversionCollection >
Photon.h
ConversionTools::hasMatchedPromptElectron
static bool hasMatchedPromptElectron(const reco::SuperClusterRef &sc, const edm::Handle< reco::GsfElectronCollection > &eleCol, const edm::Handle< 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:296
allElectronIsolations_cfi.dRMax
dRMax
Definition:
allElectronIsolations_cfi.py:7
TrackFwd.h
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
SimDataFormats::CaloAnalysis::sc
SimCluster sc
Definition:
classes.h:9
Point3D.h
edm::RefToBase< reco::Track >
ConversionTools::ConversionTools
ConversionTools()
Definition:
ConversionTools.h:38
ConversionTools
Definition:
ConversionTools.h:35
reco::SuperCluster
Definition:
SuperCluster.h:19
ConversionTools::hasMatchedConversion
static bool hasMatchedConversion(const reco::GsfElectron &ele, const edm::Handle< 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:149
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:18
beamspot
Definition:
BeamSpotWrite2Txt.h:8
GsfElectron.h
GsfTrack.h
GsfElectronFwd.h
TrackExtra.h
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition:
Point3D.h:12
photonValidator_cfi.dEtaMax
dEtaMax
Definition:
photonValidator_cfi.py:76
ConversionFwd.h
Track.h
GsfTrackFwd.h
CSCSegmentAlgorithmRU_cfi.dPhiMax
dPhiMax
Definition:
CSCSegmentAlgorithmRU_cfi.py:9
ConversionTools::matchedConversion
static reco::ConversionRef matchedConversion(const reco::GsfElectron &ele, const edm::Handle< 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:211
ConversionTools::matchedPromptElectron
static reco::GsfElectronRef matchedPromptElectron(const reco::SuperClusterRef &sc, const edm::Handle< reco::GsfElectronCollection > &eleCol, const edm::Handle< 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:326
Generated for CMSSW Reference Manual by
1.8.11