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
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordmisalignedTrackerGeometryESToken_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtrackerGeometryESToken_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtrackerTopologyESToken_
 

Detailed Description

Definition at line 22 of file TrackingRecHitAlgorithm.h.

Constructor & Destructor Documentation

◆ TrackingRecHitAlgorithm()

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

Definition at line 21 of file TrackingRecHitAlgorithm.cc.

24  : _name(name),
25  _selectionString(config.getParameter<std::string>("select")),
26  _trackerTopology(nullptr),
27  _trackerGeometry(nullptr),
29  trackerTopologyESToken_(consumesCollector.esConsumes()),
30  trackerGeometryESToken_(consumesCollector.esConsumes()),
31  misalignedTrackerGeometryESToken_(consumesCollector.esConsumes(edm::ESInputTag("", "MisAligned"))),
32  _randomEngine(nullptr) {}
Definition: config.py:1
const TrackerGeometry * _trackerGeometry
const std::string _selectionString
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > misalignedTrackerGeometryESToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyESToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryESToken_
const TrackerGeometry * _misalignedTrackerGeometry
const TrackerTopology * _trackerTopology
std::shared_ptr< RandomEngineAndDistribution > _randomEngine

◆ ~TrackingRecHitAlgorithm()

TrackingRecHitAlgorithm::~TrackingRecHitAlgorithm ( )
virtual

Definition at line 90 of file TrackingRecHitAlgorithm.cc.

90 {}

Member Function Documentation

◆ beginEvent()

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

Definition at line 73 of file TrackingRecHitAlgorithm.cc.

References _misalignedTrackerGeometry, _trackerGeometry, _trackerTopology, options_cfi::eventSetup, misalignedTrackerGeometryESToken_, trackerGeometryESToken_, and trackerTopologyESToken_.

73  {
77 }
const TrackerGeometry * _trackerGeometry
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > misalignedTrackerGeometryESToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyESToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryESToken_
const TrackerGeometry * _misalignedTrackerGeometry
const TrackerTopology * _trackerTopology

◆ 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 66 of file TrackingRecHitAlgorithm.cc.

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

◆ beginStream()

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

Definition at line 62 of file TrackingRecHitAlgorithm.cc.

References _randomEngine, and l1ctLayer2EG_cff::id.

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

◆ endEvent()

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

Definition at line 81 of file TrackingRecHitAlgorithm.cc.

References _misalignedTrackerGeometry, _trackerGeometry, and _trackerTopology.

81  {
82  //set these to 0 -> ensures that beginEvent needs to be executed before accessing these pointers again
83  _trackerGeometry = nullptr;
84  _trackerTopology = nullptr;
86 }
const TrackerGeometry * _trackerGeometry
const TrackerGeometry * _misalignedTrackerGeometry
const TrackerTopology * _trackerTopology

◆ endStream()

void TrackingRecHitAlgorithm::endStream ( )
virtual

Definition at line 88 of file TrackingRecHitAlgorithm.cc.

References _randomEngine.

88 { _randomEngine.reset(); }
std::shared_ptr< RandomEngineAndDistribution > _randomEngine

◆ getMisalignedGeometry()

const TrackerGeometry & TrackingRecHitAlgorithm::getMisalignedGeometry ( ) const

Definition at line 48 of file TrackingRecHitAlgorithm.cc.

References _misalignedTrackerGeometry, _name, and Exception.

Referenced by PixelTemplateSmearerBase::smearHit().

48  {
50  throw cms::Exception("TrackingRecHitAlgorithm ") << _name << ": MisalignedGeometry not defined";
51  }
53 }
const TrackerGeometry * _misalignedTrackerGeometry

◆ getName()

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

Definition at line 39 of file TrackingRecHitAlgorithm.h.

References _name.

Referenced by plotting.Plot::draw().

39 { return _name; }

◆ getRandomEngine()

const RandomEngineAndDistribution & TrackingRecHitAlgorithm::getRandomEngine ( ) const

Definition at line 55 of file TrackingRecHitAlgorithm.cc.

References _name, _randomEngine, and Exception.

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

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

◆ getSelectionString()

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

Definition at line 40 of file TrackingRecHitAlgorithm.h.

References _selectionString.

40 { return _selectionString; }
const std::string _selectionString

◆ getTrackerGeometry()

const TrackerGeometry & TrackingRecHitAlgorithm::getTrackerGeometry ( ) const

Definition at line 41 of file TrackingRecHitAlgorithm.cc.

References _name, _trackerGeometry, and Exception.

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

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

◆ getTrackerTopology()

const TrackerTopology & TrackingRecHitAlgorithm::getTrackerTopology ( ) const

Definition at line 34 of file TrackingRecHitAlgorithm.cc.

References _name, _trackerTopology, and Exception.

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

◆ process()

TrackingRecHitProductPtr TrackingRecHitAlgorithm::process ( TrackingRecHitProductPtr  product) const
virtual

Reimplemented in PixelTemplateSmearerBase, TrackingRecHitStripGSPlugin, and TrackingRecHitNoSmearingPlugin.

Definition at line 79 of file TrackingRecHitAlgorithm.cc.

79 { return product; }

Member Data Documentation

◆ _misalignedTrackerGeometry

const TrackerGeometry* TrackingRecHitAlgorithm::_misalignedTrackerGeometry
private

Definition at line 28 of file TrackingRecHitAlgorithm.h.

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

◆ _name

const std::string TrackingRecHitAlgorithm::_name
private

Definition at line 24 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._TaskBasePlaceholder::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._TaskBasePlaceholder::dumpPython(), SequenceTypes.SequencePlaceholder::dumpSequenceConfig(), SequenceTypes.SequencePlaceholder::dumpSequencePython(), SequenceTypes._TaskBasePlaceholder::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._TaskBasePlaceholder::insertInto(), validation.SimpleSample::name(), trackingPlots.Iteration::name(), plotting.PlotterItem::readDirs(), plotting.PlotGroup::remove(), SequenceTypes.SequencePlaceholder::resolve(), SequenceTypes._TaskBasePlaceholder::resolve(), and plotting.Plot::setName().

◆ _randomEngine

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

Definition at line 32 of file TrackingRecHitAlgorithm.h.

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

◆ _selectionString

const std::string TrackingRecHitAlgorithm::_selectionString
private

Definition at line 25 of file TrackingRecHitAlgorithm.h.

Referenced by getSelectionString().

◆ _trackerGeometry

const TrackerGeometry* TrackingRecHitAlgorithm::_trackerGeometry
private

Definition at line 27 of file TrackingRecHitAlgorithm.h.

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

◆ _trackerTopology

const TrackerTopology* TrackingRecHitAlgorithm::_trackerTopology
private

Definition at line 26 of file TrackingRecHitAlgorithm.h.

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

◆ misalignedTrackerGeometryESToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> TrackingRecHitAlgorithm::misalignedTrackerGeometryESToken_
private

Definition at line 31 of file TrackingRecHitAlgorithm.h.

Referenced by beginEvent().

◆ trackerGeometryESToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> TrackingRecHitAlgorithm::trackerGeometryESToken_
private

Definition at line 30 of file TrackingRecHitAlgorithm.h.

Referenced by beginEvent().

◆ trackerTopologyESToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> TrackingRecHitAlgorithm::trackerTopologyESToken_
private

Definition at line 29 of file TrackingRecHitAlgorithm.h.

Referenced by beginEvent().