CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TrackingRecHitAlgorithm Class Reference

#include <TrackingRecHitAlgorithm.h>

Inheritance diagram for TrackingRecHitAlgorithm:
PixelTemplateSmearerBase TrackingRecHitNoSmearingPlugin TrackingRecHitStripGSPlugin PixelTemplateSmearerPlugin

Public Member Functions

virtual void beginEvent (edm::Event &event, const edm::EventSetup &eventSetup)
 
virtual void beginRun (edm::Run const &run, const edm::EventSetup &eventSetup, const SiPixelTemplateDBObject *pixelTemplateDBObjectPtr, std::vector< SiPixelTemplateStore > &tempStoreRef)
 
virtual void beginStream (const edm::StreamID &id)
 
virtual void endEvent (edm::Event &event, const edm::EventSetup &eventSetup)
 
virtual void endStream ()
 
const TrackerGeometrygetMisalignedGeometry () const
 
const std::string & getName () const
 
const RandomEngineAndDistributiongetRandomEngine () const
 
const std::string & getSelectionString () const
 
const TrackerGeometrygetTrackerGeometry () const
 
const TrackerTopologygetTrackerTopology () const
 
virtual TrackingRecHitProductPtr process (TrackingRecHitProductPtr product) const
 
 TrackingRecHitAlgorithm (const std::string &name, const edm::ParameterSet &config, edm::ConsumesCollector &consumesCollector)
 
virtual ~TrackingRecHitAlgorithm ()
 

Private Attributes

const TrackerGeometry_misalignedTrackerGeometry
 
const std::string _name
 
std::shared_ptr< RandomEngineAndDistribution_randomEngine
 
const std::string _selectionString
 
const TrackerGeometry_trackerGeometry
 
const TrackerTopology_trackerTopology
 

Detailed Description

Definition at line 26 of file TrackingRecHitAlgorithm.h.

Constructor & Destructor Documentation

◆ TrackingRecHitAlgorithm()

TrackingRecHitAlgorithm::TrackingRecHitAlgorithm ( const std::string &  name,
const edm::ParameterSet config,
edm::ConsumesCollector consumesCollector 
)

Definition at line 25 of file TrackingRecHitAlgorithm.cc.

28  : _name(name),
29  _selectionString(config.getParameter<std::string>("select")),
30  _trackerTopology(nullptr),
31  _trackerGeometry(nullptr),
33  _randomEngine(nullptr) {}

◆ ~TrackingRecHitAlgorithm()

TrackingRecHitAlgorithm::~TrackingRecHitAlgorithm ( )
virtual

Definition at line 99 of file TrackingRecHitAlgorithm.cc.

99 {}

Member Function Documentation

◆ beginEvent()

void TrackingRecHitAlgorithm::beginEvent ( edm::Event event,
const edm::EventSetup eventSetup 
)
virtual

Definition at line 74 of file TrackingRecHitAlgorithm.cc.

74  {
75  edm::ESHandle<TrackerTopology> trackerTopologyHandle;
76  edm::ESHandle<TrackerGeometry> trackerGeometryHandle;
77  edm::ESHandle<TrackerGeometry> misalignedGeometryHandle;
78 
79  eventSetup.get<TrackerTopologyRcd>().get(trackerTopologyHandle);
80  eventSetup.get<TrackerDigiGeometryRecord>().get(trackerGeometryHandle);
81  eventSetup.get<TrackerDigiGeometryRecord>().get("MisAligned", misalignedGeometryHandle);
82 
83  _trackerTopology = trackerTopologyHandle.product();
84  _trackerGeometry = trackerGeometryHandle.product();
85  _misalignedTrackerGeometry = misalignedGeometryHandle.product();
86 }

References _misalignedTrackerGeometry, _trackerGeometry, _trackerTopology, edm::EventSetup::get(), get, and edm::ESHandle< T >::product().

◆ beginRun()

void TrackingRecHitAlgorithm::beginRun ( edm::Run const &  run,
const edm::EventSetup eventSetup,
const SiPixelTemplateDBObject pixelTemplateDBObjectPtr,
std::vector< SiPixelTemplateStore > &  tempStoreRef 
)
virtual

Reimplemented in PixelTemplateSmearerBase.

Definition at line 67 of file TrackingRecHitAlgorithm.cc.

70  {
71  // The default is to do nothing.
72 }

◆ beginStream()

void TrackingRecHitAlgorithm::beginStream ( const edm::StreamID id)
virtual

Definition at line 63 of file TrackingRecHitAlgorithm.cc.

63  {
64  _randomEngine = std::make_shared<RandomEngineAndDistribution>(id);
65 }

References _randomEngine.

◆ endEvent()

void TrackingRecHitAlgorithm::endEvent ( edm::Event event,
const edm::EventSetup eventSetup 
)
virtual

Definition at line 90 of file TrackingRecHitAlgorithm.cc.

90  {
91  //set these to 0 -> ensures that beginEvent needs to be executed before accessing these pointers again
92  _trackerGeometry = nullptr;
93  _trackerTopology = nullptr;
95 }

References _misalignedTrackerGeometry, _trackerGeometry, and _trackerTopology.

◆ endStream()

void TrackingRecHitAlgorithm::endStream ( )
virtual

Definition at line 97 of file TrackingRecHitAlgorithm.cc.

97 { _randomEngine.reset(); }

References _randomEngine.

◆ getMisalignedGeometry()

const TrackerGeometry & TrackingRecHitAlgorithm::getMisalignedGeometry ( ) const

Definition at line 49 of file TrackingRecHitAlgorithm.cc.

49  {
51  throw cms::Exception("TrackingRecHitAlgorithm ") << _name << ": MisalignedGeometry not defined";
52  }
54 }

References _misalignedTrackerGeometry, _name, and Exception.

Referenced by PixelTemplateSmearerBase::smearHit().

◆ getName()

const std::string& TrackingRecHitAlgorithm::getName ( void  ) const
inline

Definition at line 40 of file TrackingRecHitAlgorithm.h.

40 { return _name; }

References _name.

Referenced by plotting.Plot::draw().

◆ getRandomEngine()

const RandomEngineAndDistribution & TrackingRecHitAlgorithm::getRandomEngine ( ) const

Definition at line 56 of file TrackingRecHitAlgorithm.cc.

56  {
57  if (!_randomEngine) {
58  throw cms::Exception("TrackingRecHitAlgorithm ") << _name << ": RandomEngineAndDistribution not defined";
59  }
60  return *_randomEngine;
61 }

References _name, _randomEngine, and Exception.

Referenced by TrackingRecHitStripGSPlugin::process(), and PixelTemplateSmearerBase::process().

◆ getSelectionString()

const std::string& TrackingRecHitAlgorithm::getSelectionString ( ) const
inline

Definition at line 41 of file TrackingRecHitAlgorithm.h.

41 { return _selectionString; }

References _selectionString.

◆ getTrackerGeometry()

const TrackerGeometry & TrackingRecHitAlgorithm::getTrackerGeometry ( ) const

Definition at line 42 of file TrackingRecHitAlgorithm.cc.

42  {
43  if (!_trackerGeometry) {
44  throw cms::Exception("TrackingRecHitAlgorithm ") << _name << ": TrackerGeometry not defined";
45  }
46  return *_trackerGeometry;
47 }

References _name, _trackerGeometry, and Exception.

Referenced by TrackingRecHitNoSmearingPlugin::process(), TrackingRecHitStripGSPlugin::process(), and PixelTemplateSmearerBase::process().

◆ getTrackerTopology()

const TrackerTopology & TrackingRecHitAlgorithm::getTrackerTopology ( ) const

Definition at line 35 of file TrackingRecHitAlgorithm.cc.

35  {
36  if (!_trackerTopology) {
37  throw cms::Exception("TrackingRecHitAlgorithm ") << _name << ": TrackerTopology not defined";
38  }
39  return *_trackerTopology;
40 }

References _name, _trackerTopology, and Exception.

◆ process()

TrackingRecHitProductPtr TrackingRecHitAlgorithm::process ( TrackingRecHitProductPtr  product) const
virtual

Reimplemented in PixelTemplateSmearerBase, TrackingRecHitStripGSPlugin, and TrackingRecHitNoSmearingPlugin.

Definition at line 88 of file TrackingRecHitAlgorithm.cc.

88 { return product; }

Member Data Documentation

◆ _misalignedTrackerGeometry

const TrackerGeometry* TrackingRecHitAlgorithm::_misalignedTrackerGeometry
private

Definition at line 32 of file TrackingRecHitAlgorithm.h.

Referenced by beginEvent(), endEvent(), and getMisalignedGeometry().

◆ _name

const std::string TrackingRecHitAlgorithm::_name
private

Definition at line 28 of file TrackingRecHitAlgorithm.h.

Referenced by plotting.Subtract::__str__(), plotting.Transform::__str__(), plotting.FakeDuplicate::__str__(), plotting.CutEfficiency::__str__(), plotting.AggregateBins::__str__(), plotting.AggregateHistos::__str__(), plotting.ROC::__str__(), trackingPlots.TimePerEventPlot::__str__(), trackingPlots.TimePerTrackPlot::__str__(), SequenceTypes.SequencePlaceholder::_clonesequence(), trackingPlots.TimePerEventPlot::_create(), plotting.PlotGroup::_drawSeparate(), plotting.PlotGroup::_save(), SequenceTypes.SequencePlaceholder::copy(), SequenceTypes.TaskPlaceholder::copy(), plotting.Subtract::create(), plotting.Transform::create(), plotting.FakeDuplicate::create(), plotting.CutEfficiency::create(), plotting.AggregateBins::create(), plotting.AggregateHistos::create(), trackingPlots.TimePerTrackPlot::create(), plotting.Plot::create(), plotting.PlotGroup::draw(), SequenceTypes.SequencePlaceholder::dumpPython(), SequenceTypes.TaskPlaceholder::dumpPython(), SequenceTypes.SequencePlaceholder::dumpSequenceConfig(), SequenceTypes.SequencePlaceholder::dumpSequencePython(), SequenceTypes.TaskPlaceholder::dumpSequencePython(), getMisalignedGeometry(), getName(), plotting.Plot::getName(), plotting.PlotGroup::getName(), plotting.PlotterFolder::getName(), plotting.PlotterItem::getName(), getRandomEngine(), plotting.PlotterFolder::getSelectionNameIterator(), getTrackerGeometry(), getTrackerTopology(), SequenceTypes.SequencePlaceholder::insertInto(), SequenceTypes.TaskPlaceholder::insertInto(), validation.SimpleSample::name(), trackingPlots.Iteration::name(), plotting.PlotterItem::readDirs(), plotting.PlotGroup::remove(), SequenceTypes.SequencePlaceholder::resolve(), and SequenceTypes.TaskPlaceholder::resolve().

◆ _randomEngine

std::shared_ptr<RandomEngineAndDistribution> TrackingRecHitAlgorithm::_randomEngine
private

Definition at line 33 of file TrackingRecHitAlgorithm.h.

Referenced by beginStream(), endStream(), and getRandomEngine().

◆ _selectionString

const std::string TrackingRecHitAlgorithm::_selectionString
private

Definition at line 29 of file TrackingRecHitAlgorithm.h.

Referenced by getSelectionString().

◆ _trackerGeometry

const TrackerGeometry* TrackingRecHitAlgorithm::_trackerGeometry
private

Definition at line 31 of file TrackingRecHitAlgorithm.h.

Referenced by beginEvent(), endEvent(), and getTrackerGeometry().

◆ _trackerTopology

const TrackerTopology* TrackingRecHitAlgorithm::_trackerTopology
private

Definition at line 30 of file TrackingRecHitAlgorithm.h.

Referenced by beginEvent(), endEvent(), and getTrackerTopology().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TrackingRecHitAlgorithm::_selectionString
const std::string _selectionString
Definition: TrackingRecHitAlgorithm.h:29
TrackingRecHitAlgorithm::_name
const std::string _name
Definition: TrackingRecHitAlgorithm.h:28
config
Definition: config.py:1
TrackingRecHitAlgorithm::_misalignedTrackerGeometry
const TrackerGeometry * _misalignedTrackerGeometry
Definition: TrackingRecHitAlgorithm.h:32
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
TrackingRecHitAlgorithm::_trackerTopology
const TrackerTopology * _trackerTopology
Definition: TrackingRecHitAlgorithm.h:30
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
edm::ESHandle< TrackerTopology >
TrackingRecHitAlgorithm::_randomEngine
std::shared_ptr< RandomEngineAndDistribution > _randomEngine
Definition: TrackingRecHitAlgorithm.h:33
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackingRecHitAlgorithm::_trackerGeometry
const TrackerGeometry * _trackerGeometry
Definition: TrackingRecHitAlgorithm.h:31
get
#define get
Exception
Definition: hltDiff.cc:246
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10