File indexing completed on 2024-04-06 12:11:24
0001 #ifndef FastSimulation_TrackingRecHitProducer_TrackingRecHitAlgorithm_H
0002 #define FastSimulation_TrackingRecHitProducer_TrackingRecHitAlgorithm_H
0003
0004 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0005 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0006 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0007 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0008 #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
0009 #include "FWCore/Framework/interface/ProducerBase.h"
0010 #include "FWCore/Utilities/interface/ESGetToken.h"
0011 #include "FastSimulation/TrackingRecHitProducer/interface/TrackingRecHitProduct.h"
0012
0013 #include "FastSimulation/Utilities/interface/RandomEngineAndDistribution.h"
0014
0015
0016 #include "CondFormats/SiPixelObjects/interface/SiPixelTemplateDBObject.h"
0017 #include "CondFormats/SiPixelTransient/interface/SiPixelTemplate.h"
0018
0019 #include <string>
0020 #include <memory>
0021
0022 class TrackingRecHitAlgorithm {
0023 private:
0024 const std::string _name;
0025 const std::string _selectionString;
0026 const TrackerTopology* _trackerTopology;
0027 const TrackerGeometry* _trackerGeometry;
0028 const TrackerGeometry* _misalignedTrackerGeometry;
0029 const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> trackerTopologyESToken_;
0030 const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeometryESToken_;
0031 const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> misalignedTrackerGeometryESToken_;
0032 std::shared_ptr<RandomEngineAndDistribution> _randomEngine;
0033
0034 public:
0035 TrackingRecHitAlgorithm(const std::string& name,
0036 const edm::ParameterSet& config,
0037 edm::ConsumesCollector& consumesCollector);
0038
0039 inline const std::string& getName() const { return _name; }
0040 inline const std::string& getSelectionString() const { return _selectionString; }
0041
0042 const TrackerTopology& getTrackerTopology() const;
0043 const TrackerGeometry& getTrackerGeometry() const;
0044 const TrackerGeometry& getMisalignedGeometry() const;
0045 const RandomEngineAndDistribution& getRandomEngine() const;
0046
0047
0048 virtual void beginStream(const edm::StreamID& id);
0049
0050
0051 virtual void beginRun(edm::Run const& run,
0052 const edm::EventSetup& eventSetup,
0053 const SiPixelTemplateDBObject* pixelTemplateDBObjectPtr,
0054 const std::vector<SiPixelTemplateStore>& tempStoreRef);
0055
0056
0057 virtual void beginEvent(edm::Event& event, const edm::EventSetup& eventSetup);
0058
0059
0060 virtual TrackingRecHitProductPtr process(TrackingRecHitProductPtr product) const;
0061
0062
0063 virtual void endEvent(edm::Event& event, const edm::EventSetup& eventSetup);
0064
0065
0066 virtual void endStream();
0067
0068 virtual ~TrackingRecHitAlgorithm();
0069 };
0070
0071 #endif