00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef EgammaTools_ConversionTools_h
00022 #define EgammaTools_ConversionTools_h
00023
00024 #include "DataFormats/TrackReco/interface/Track.h"
00025 #include "DataFormats/Math/interface/Point3D.h"
00026 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00027 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00028 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00029 #include "DataFormats/EgammaCandidates/interface/ConversionFwd.h"
00030 #include "DataFormats/TrackReco/interface/Track.h"
00031 #include "DataFormats/TrackReco/interface/TrackExtra.h"
00032 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00033 #include "DataFormats/Math/interface/Point3D.h"
00034 #include "MagneticField/Engine/interface/MagneticField.h"
00035 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
00036 #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h"
00037 class ConversionTools
00038 {
00039 public:
00040 ConversionTools() {}
00041
00042
00043 static bool isGoodConversion(const reco::Conversion &conv, const math::XYZPoint &beamspot, float lxyMin=2.0, float probMin=1e-6, uint nHitsBeforeVtxMax=1);
00044
00045 static bool matchesConversion(const reco::GsfElectron &ele, const reco::Conversion &conv, bool allowCkfMatch=true);
00046 static bool matchesConversion(const reco::SuperCluster &sc, const reco::Conversion &conv, float dRMax = 0.1, float dEtaMax = 999., float dPhiMax = 999.);
00047 static bool matchesConversion(const edm::RefToBase<reco::Track> &trk, const reco::Conversion &conv);
00048 static bool matchesConversion(const reco::TrackRef &trk, const reco::Conversion &conv);
00049 static bool matchesConversion(const reco::GsfTrackRef &trk, const reco::Conversion &conv);
00050
00051
00052 static bool hasMatchedConversion(const reco::GsfElectron &ele,
00053 const edm::Handle<reco::ConversionCollection> &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, uint nHitsBeforeVtxMax=0);
00054
00055 static bool hasMatchedConversion(const reco::TrackRef &trk,
00056 const edm::Handle<reco::ConversionCollection> &convCol, const math::XYZPoint &beamspot, float lxyMin=2.0, float probMin=1e-6, uint nHitsBeforeVtxMax=1);
00057
00058 static bool hasMatchedConversion(const reco::SuperCluster &sc,
00059 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=1e-6, uint nHitsBeforeVtxMax=1);
00060
00061
00062 static reco::ConversionRef matchedConversion(const reco::GsfElectron &ele,
00063 const edm::Handle<reco::ConversionCollection> &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, uint nHitsBeforeVtxMax=0);
00064
00065 static reco::ConversionRef matchedConversion(const reco::TrackRef &trk,
00066 const edm::Handle<reco::ConversionCollection> &convCol, const math::XYZPoint &beamspot, float lxyMin=2.0, float probMin=1e-6, uint nHitsBeforeVtxMax=1);
00067
00068 static reco::ConversionRef matchedConversion(const reco::SuperCluster &sc,
00069 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=1e-6, uint nHitsBeforeVtxMax=1);
00070
00071 static bool hasMatchedPromptElectron(const reco::SuperClusterRef &sc, const edm::Handle<reco::GsfElectronCollection> &eleCol,
00072 const edm::Handle<reco::ConversionCollection> &convCol, const math::XYZPoint &beamspot, float lxyMin=2.0, float probMin=1e-6, uint nHitsBeforeVtxMax=0);
00073
00074
00075 static reco::GsfElectronRef matchedPromptElectron(const reco::SuperClusterRef &sc, const edm::Handle<reco::GsfElectronCollection> &eleCol,
00076 const edm::Handle<reco::ConversionCollection> &convCol, const math::XYZPoint &beamspot, float lxyMin=2.0, float probMin=1e-6, uint nHitsBeforeVtxMax=0);
00077
00078 };
00079 #endif