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 {
37  public:
39 
40 
41  static bool isGoodConversion(const reco::Conversion &conv, const math::XYZPoint &beamspot, float lxyMin=2.0, float probMin=1e-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::GsfElectronCore &eleCore, const reco::Conversion &conv, bool allowCkfMatch=true);
45  static bool matchesConversion(const reco::SuperCluster &sc, const reco::Conversion &conv, float dRMax = 0.1, float dEtaMax = 999., float dPhiMax = 999.);
46  static bool matchesConversion(const edm::RefToBase<reco::Track> &trk, const reco::Conversion &conv);
47  static bool matchesConversion(const reco::TrackRef &trk, const reco::Conversion &conv);
48  static bool matchesConversion(const reco::GsfTrackRef &trk, const reco::Conversion &conv);
49 
50 
51  static bool hasMatchedConversion(const reco::GsfElectron &ele,
52  const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0);
53 
54  static bool hasMatchedConversion(const reco::TrackRef &trk,
55  const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=1);
56 
57  static bool hasMatchedConversion(const reco::SuperCluster &sc,
58  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);
59 
60 
61  static reco::Conversion const* matchedConversion(const reco::GsfElectron &ele,
62  const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0);
63 
64  static reco::Conversion const* matchedConversion(const reco::GsfElectronCore &eleCore,
65  const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0);
66 
67  static reco::Conversion const* matchedConversion(const reco::TrackRef &trk,
68  const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=1);
69 
71  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);
72 
74  const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0);
75 
76 
78  const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0);
79 
80  static float getVtxFitProb(const reco::Conversion* conv);
81 
82 };
83 #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