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 27 of file TrackingRecHitAlgorithm.h.

Constructor & Destructor Documentation

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

Definition at line 25 of file TrackingRecHitAlgorithm.cc.

29  :
30  _name(name),
31  _selectionString(config.getParameter<std::string>("select")),
32  _trackerTopology(nullptr),
33  _trackerGeometry(nullptr),
35  _randomEngine(nullptr)
36 {
37 }
T getParameter(std::string const &) const
const TrackerGeometry * _trackerGeometry
const std::string _selectionString
const TrackerGeometry * _misalignedTrackerGeometry
const TrackerTopology * _trackerTopology
std::shared_ptr< RandomEngineAndDistribution > _randomEngine
TrackingRecHitAlgorithm::~TrackingRecHitAlgorithm ( )
virtual

Definition at line 123 of file TrackingRecHitAlgorithm.cc.

124 {
125 }

Member Function Documentation

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

Definition at line 89 of file TrackingRecHitAlgorithm.cc.

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

90 {
91  edm::ESHandle<TrackerTopology> trackerTopologyHandle;
92  edm::ESHandle<TrackerGeometry> trackerGeometryHandle;
93  edm::ESHandle<TrackerGeometry> misalignedGeometryHandle;
94 
95  eventSetup.get<TrackerTopologyRcd>().get(trackerTopologyHandle);
96  eventSetup.get<TrackerDigiGeometryRecord>().get(trackerGeometryHandle);
97  eventSetup.get<TrackerDigiGeometryRecord>().get("MisAligned",misalignedGeometryHandle);
98 
99  _trackerTopology = trackerTopologyHandle.product();
100  _trackerGeometry = trackerGeometryHandle.product();
101  _misalignedTrackerGeometry = misalignedGeometryHandle.product();
102 
103 }
const TrackerGeometry * _trackerGeometry
const TrackerGeometry * _misalignedTrackerGeometry
const TrackerTopology * _trackerTopology
T get() const
Definition: EventSetup.h:63
T const * product() const
Definition: ESHandle.h:86
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 81 of file TrackingRecHitAlgorithm.cc.

84 {
85  // The default is to do nothing.
86 }
void TrackingRecHitAlgorithm::beginStream ( const edm::StreamID id)
virtual

Definition at line 75 of file TrackingRecHitAlgorithm.cc.

References _randomEngine, and triggerObjects_cff::id.

76 {
77  _randomEngine = std::make_shared<RandomEngineAndDistribution>(id);
78 }
std::shared_ptr< RandomEngineAndDistribution > _randomEngine
void TrackingRecHitAlgorithm::endEvent ( edm::Event event,
const edm::EventSetup eventSetup 
)
virtual

Definition at line 110 of file TrackingRecHitAlgorithm.cc.

References _misalignedTrackerGeometry, _trackerGeometry, and _trackerTopology.

111 {
112  //set these to 0 -> ensures that beginEvent needs to be executed before accessing these pointers again
113  _trackerGeometry=nullptr;
114  _trackerTopology=nullptr;
116 }
const TrackerGeometry * _trackerGeometry
const TrackerGeometry * _misalignedTrackerGeometry
const TrackerTopology * _trackerTopology
void TrackingRecHitAlgorithm::endStream ( )
virtual

Definition at line 118 of file TrackingRecHitAlgorithm.cc.

References _randomEngine.

119 {
120  _randomEngine.reset();
121 }
std::shared_ptr< RandomEngineAndDistribution > _randomEngine
const TrackerGeometry & TrackingRecHitAlgorithm::getMisalignedGeometry ( ) const

Definition at line 57 of file TrackingRecHitAlgorithm.cc.

References _misalignedTrackerGeometry, _name, and Exception.

Referenced by PixelTemplateSmearerBase::smearHit().

58 {
60  {
61  throw cms::Exception("TrackingRecHitAlgorithm ") << _name <<": MisalignedGeometry not defined";
62  }
64 }
const TrackerGeometry * _misalignedTrackerGeometry
const std::string& TrackingRecHitAlgorithm::getName ( void  ) const
inline

Definition at line 42 of file TrackingRecHitAlgorithm.h.

Referenced by plotting.Plot::draw().

43  {
44  return _name;
45  }
const RandomEngineAndDistribution & TrackingRecHitAlgorithm::getRandomEngine ( ) const

Definition at line 66 of file TrackingRecHitAlgorithm.cc.

References _name, _randomEngine, and Exception.

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

67 {
68  if (!_randomEngine)
69  {
70  throw cms::Exception("TrackingRecHitAlgorithm ") << _name <<": RandomEngineAndDistribution not defined";
71  }
72  return *_randomEngine;
73 }
std::shared_ptr< RandomEngineAndDistribution > _randomEngine
const std::string& TrackingRecHitAlgorithm::getSelectionString ( ) const
inline

Definition at line 46 of file TrackingRecHitAlgorithm.h.

References LaserDQM_cfg::process, and findQualityFiles::run.

Referenced by TrackingRecHitProducer::setupDetIdPipes().

47  {
48  return _selectionString;
49  }
const std::string _selectionString
const TrackerGeometry & TrackingRecHitAlgorithm::getTrackerGeometry ( ) const

Definition at line 48 of file TrackingRecHitAlgorithm.cc.

References _name, _trackerGeometry, and Exception.

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

49 {
50  if (!_trackerGeometry)
51  {
52  throw cms::Exception("TrackingRecHitAlgorithm ") << _name <<": TrackerGeometry not defined";
53  }
54  return *_trackerGeometry;
55 }
const TrackerGeometry * _trackerGeometry
const TrackerTopology & TrackingRecHitAlgorithm::getTrackerTopology ( ) const

Definition at line 39 of file TrackingRecHitAlgorithm.cc.

References _name, _trackerTopology, and Exception.

40 {
41  if (!_trackerTopology)
42  {
43  throw cms::Exception("TrackingRecHitAlgorithm ") << _name <<": TrackerTopology not defined";
44  }
45  return *_trackerTopology;
46 }
const TrackerTopology * _trackerTopology
TrackingRecHitProductPtr TrackingRecHitAlgorithm::process ( TrackingRecHitProductPtr  product) const
virtual

Member Data Documentation

const TrackerGeometry* TrackingRecHitAlgorithm::_misalignedTrackerGeometry
private

Definition at line 34 of file TrackingRecHitAlgorithm.h.

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

const std::string TrackingRecHitAlgorithm::_name
private

Definition at line 30 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(), plotting.Plot::getName(), plotting.PlotGroup::getName(), plotting.PlotterFolder::getName(), plotting.PlotterItem::getName(), getRandomEngine(), plotting.PlotterFolder::getSelectionNameIterator(), getTrackerGeometry(), getTrackerTopology(), SequenceTypes.SequencePlaceholder::insertInto(), SequenceTypes.TaskPlaceholder::insertInto(), Vispa.Views.PropertyView.Property::name(), validation.SimpleSample::name(), trackingPlots.Iteration::name(), plotting.PlotterItem::readDirs(), plotting.PlotGroup::remove(), SequenceTypes.SequencePlaceholder::resolve(), and SequenceTypes.TaskPlaceholder::resolve().

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

Definition at line 35 of file TrackingRecHitAlgorithm.h.

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

const std::string TrackingRecHitAlgorithm::_selectionString
private

Definition at line 31 of file TrackingRecHitAlgorithm.h.

const TrackerGeometry* TrackingRecHitAlgorithm::_trackerGeometry
private

Definition at line 33 of file TrackingRecHitAlgorithm.h.

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

const TrackerTopology* TrackingRecHitAlgorithm::_trackerTopology
private

Definition at line 32 of file TrackingRecHitAlgorithm.h.

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