CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrackingRecHitAlgorithm.cc
Go to the documentation of this file.
2 
9 
12 
14 
16 
18 
20 
23  edm::ConsumesCollector& consumesCollector)
24  : _name(name),
25  _selectionString(config.getParameter<std::string>("select")),
26  _trackerTopology(nullptr),
27  _trackerGeometry(nullptr),
28  _misalignedTrackerGeometry(nullptr),
29  trackerTopologyESToken_(consumesCollector.esConsumes()),
30  trackerGeometryESToken_(consumesCollector.esConsumes()),
31  misalignedTrackerGeometryESToken_(consumesCollector.esConsumes(edm::ESInputTag("", "MisAligned"))),
32  _randomEngine(nullptr) {}
33 
35  if (!_trackerTopology) {
36  throw cms::Exception("TrackingRecHitAlgorithm ") << _name << ": TrackerTopology not defined";
37  }
38  return *_trackerTopology;
39 }
40 
42  if (!_trackerGeometry) {
43  throw cms::Exception("TrackingRecHitAlgorithm ") << _name << ": TrackerGeometry not defined";
44  }
45  return *_trackerGeometry;
46 }
47 
50  throw cms::Exception("TrackingRecHitAlgorithm ") << _name << ": MisalignedGeometry not defined";
51  }
53 }
54 
56  if (!_randomEngine) {
57  throw cms::Exception("TrackingRecHitAlgorithm ") << _name << ": RandomEngineAndDistribution not defined";
58  }
59  return *_randomEngine;
60 }
61 
63  _randomEngine = std::make_shared<RandomEngineAndDistribution>(id);
64 }
65 
67  const edm::EventSetup& eventSetup,
68  const SiPixelTemplateDBObject* pixelTemplateDBObjectPtr,
69  std::vector<SiPixelTemplateStore>& tempStoreRef) {
70  // The default is to do nothing.
71 }
72 
77 }
78 
80 
82  //set these to 0 -> ensures that beginEvent needs to be executed before accessing these pointers again
83  _trackerGeometry = nullptr;
84  _trackerTopology = nullptr;
86 }
87 
89 
uint16_t *__restrict__ id
const TrackerGeometry & getTrackerGeometry() const
const TrackerGeometry * _trackerGeometry
bool getData(T &iHolder) const
Definition: EventSetup.h:128
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > misalignedTrackerGeometryESToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyESToken_
virtual void beginEvent(edm::Event &event, const edm::EventSetup &eventSetup)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryESToken_
TrackingRecHitAlgorithm(const std::string &name, const edm::ParameterSet &config, edm::ConsumesCollector &consumesCollector)
const TrackerGeometry * _misalignedTrackerGeometry
const RandomEngineAndDistribution & getRandomEngine() const
const TrackerTopology & getTrackerTopology() const
std::shared_ptr< TrackingRecHitProduct > TrackingRecHitProductPtr
virtual void beginRun(edm::Run const &run, const edm::EventSetup &eventSetup, const SiPixelTemplateDBObject *pixelTemplateDBObjectPtr, std::vector< SiPixelTemplateStore > &tempStoreRef)
const TrackerTopology * _trackerTopology
virtual TrackingRecHitProductPtr process(TrackingRecHitProductPtr product) const
std::shared_ptr< RandomEngineAndDistribution > _randomEngine
tuple config
parse the configuration file
const TrackerGeometry & getMisalignedGeometry() const
virtual void beginStream(const edm::StreamID &id)
virtual void endEvent(edm::Event &event, const edm::EventSetup &eventSetup)
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
Definition: Run.h:45