File indexing completed on 2024-04-06 12:24:52
0001 #ifndef EgammaHLTPixelMatchElectronAlgo_H
0002 #define EgammaHLTPixelMatchElectronAlgo_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include "DataFormats/EgammaCandidates/interface/Electron.h"
0014 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
0015
0016 #include "FWCore/Framework/interface/ESHandle.h"
0017 #include "FWCore/Framework/interface/EventSetup.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/ConsumesCollector.h"
0020 #include "FWCore/Framework/interface/ESWatcher.h"
0021
0022 #include "MagneticField/Engine/interface/MagneticField.h"
0023 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
0024
0025 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0026
0027 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0028
0029 #include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h"
0030 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0031
0032 #include "TrackingTools/GsfTools/interface/MultiTrajectoryStateTransform.h"
0033
0034 class MultiTrajectoryStateTransform;
0035
0036 class EgammaHLTPixelMatchElectronAlgo {
0037 public:
0038 EgammaHLTPixelMatchElectronAlgo(const edm::ParameterSet& conf, edm::ConsumesCollector&& iC);
0039
0040
0041 private:
0042 EgammaHLTPixelMatchElectronAlgo(const EgammaHLTPixelMatchElectronAlgo& rhs) {}
0043 EgammaHLTPixelMatchElectronAlgo& operator=(const EgammaHLTPixelMatchElectronAlgo& rhs) { return *this; }
0044
0045 public:
0046 void setupES(const edm::EventSetup& setup);
0047 void run(edm::Event&, reco::ElectronCollection&);
0048
0049 private:
0050
0051
0052 void process(edm::Handle<reco::TrackCollection> tracksH,
0053 edm::Handle<reco::GsfTrackCollection> gsfTracksH,
0054 reco::ElectronCollection& outEle,
0055 Global3DPoint& bs);
0056 bool isInnerMostWithLostHits(const reco::GsfTrackRef&, const reco::GsfTrackRef&, bool&);
0057
0058 edm::EDGetTokenT<reco::TrackCollection> trackProducer_;
0059 edm::EDGetTokenT<reco::GsfTrackCollection> gsfTrackProducer_;
0060 bool useGsfTracks_;
0061 edm::EDGetTokenT<reco::BeamSpot> bsProducer_;
0062
0063 std::unique_ptr<MultiTrajectoryStateTransform> mtsTransform_ = nullptr;
0064
0065 edm::ESHandle<MagneticField> magField_;
0066 edm::ESHandle<TrackerGeometry> trackerGeom_;
0067
0068 edm::ESWatcher<IdealMagneticFieldRecord> magneticFieldWatcher_;
0069 edm::ESWatcher<TrackerDigiGeometryRecord> trackerGeometryWatcher_;
0070
0071 const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> magneticFieldToken_;
0072 const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeometryToken_;
0073 };
0074
0075 #endif