CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
AreaSeededTrackingRegionsProducer Class Reference

#include <AreaSeededTrackingRegionsProducer.h>

Public Types

enum  Mode { BEAM_SPOT_FIXED, BEAM_SPOT_SIGMA, VERTICES_FIXED, VERTICES_SIGMA }
 

Public Member Functions

 AreaSeededTrackingRegionsProducer (const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
 
std::vector< std::unique_ptr< TrackingRegion > > regions (const edm::Event &e, const edm::EventSetup &es) const
 
 ~AreaSeededTrackingRegionsProducer ()=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

std::vector< AreaSeededTrackingRegionsBuilder::Aream_areas
 
AreaSeededTrackingRegionsBuilder m_builder
 
VertexBeamspotOrigins m_origins
 

Detailed Description

class AreaSeededTrackingRegionsProducer

eta-phi TrackingRegions producer in directions defined by z-phi area-based objects of interest from the "input" parameters.

Four operational modes are supported ("mode" parameter):

BeamSpotFixed: origin is defined by the beam spot z-half-length is defined by a fixed zErrorBeamSpot parameter BeamSpotSigma: origin is defined by the beam spot z-half-length is defined by nSigmaZBeamSpot * beamSpot.sigmaZ VerticesFixed: origins are defined by vertices from VertexCollection (use maximum MaxNVertices of them) z-half-length is defined by a fixed zErrorVertex parameter VerticesSigma: origins are defined by vertices from VertexCollection (use maximum MaxNVertices of them) z-half-length is defined by nSigmaZVertex * vetex.zError

If, while using one of the "Vertices" modes, there's no vertices in an event, we fall back into either BeamSpotSigma or BeamSpotFixed mode, depending on the positiveness of nSigmaZBeamSpot.

Definition at line 49 of file AreaSeededTrackingRegionsProducer.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

AreaSeededTrackingRegionsProducer::AreaSeededTrackingRegionsProducer ( const edm::ParameterSet conf,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 54 of file AreaSeededTrackingRegionsProducer.h.

References custom_jme_cff::area, edm::ParameterSet::getParameter(), m_areas, and ~AreaSeededTrackingRegionsProducer().

54  :
55  m_origins(conf.getParameter<edm::ParameterSet>("RegionPSet"), iC),
56  m_builder(conf.getParameter<edm::ParameterSet>("RegionPSet"), iC)
57  {
58  edm::ParameterSet regPSet = conf.getParameter<edm::ParameterSet>("RegionPSet");
59  for(const auto& area: regPSet.getParameter<std::vector<edm::ParameterSet> >("areas")) {
60  m_areas.emplace_back(area.getParameter<double>("rmin"),
61  area.getParameter<double>("rmax"),
62  area.getParameter<double>("phimin"),
63  area.getParameter<double>("phimax"),
64  area.getParameter<double>("zmin"),
65  area.getParameter<double>("zmax"));
66  }
67  if(m_areas.empty())
68  throw cms::Exception("Configuration") << "Empty 'areas' parameter.";
69  }
T getParameter(std::string const &) const
std::vector< AreaSeededTrackingRegionsBuilder::Area > m_areas
AreaSeededTrackingRegionsProducer::~AreaSeededTrackingRegionsProducer ( )
default

Member Function Documentation

static void AreaSeededTrackingRegionsProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 73 of file AreaSeededTrackingRegionsProducer.h.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addVPSet(), VertexBeamspotOrigins::fillDescriptions(), and AreaSeededTrackingRegionsBuilder::fillDescriptions().

73  {
75 
77  descAreas.add<double>("rmin", 0.0);
78  descAreas.add<double>("rmax", 0.0);
79  descAreas.add<double>("zmin", 0.0);
80  descAreas.add<double>("zmax", 0.0);
81  descAreas.add<double>("phimin", 0.0);
82  descAreas.add<double>("phimax", 0.0);
83  std::vector<edm::ParameterSet> vDefaults;
84  desc.addVPSet("areas", descAreas, vDefaults);
85 
88 
89  // Only for backwards-compatibility
91  descRegion.add<edm::ParameterSetDescription>("RegionPSet", desc);
92 
93  descriptions.add("areaSeededTrackingRegion", descRegion);
94  }
static void fillDescriptions(edm::ParameterSetDescription &desc)
static void fillDescriptions(edm::ParameterSetDescription &desc, const std::string &defaultBeamSpot="offlineBeamSpot", const std::string &defaultVertex="firstStepPrimaryVertices", int defaultMaxVertices=-1)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector<std::unique_ptr<TrackingRegion> > AreaSeededTrackingRegionsProducer::regions ( const edm::Event e,
const edm::EventSetup es 
) const
inline

Definition at line 96 of file AreaSeededTrackingRegionsProducer.h.

References AreaSeededTrackingRegionsBuilder::beginEvent(), m_areas, m_builder, m_origins, VertexBeamspotOrigins::origins(), and AreaSeededTrackingRegionsBuilder::Builder::regions().

97  {
98  auto origins = m_origins.origins(e);
99  auto builder = m_builder.beginEvent(e);
100  return builder.regions(origins, m_areas);
101  }
Origins origins(const edm::Event &iEvent) const
std::vector< std::unique_ptr< TrackingRegion > > regions(const Origins &origins, const std::vector< Area > &areas) const
std::vector< AreaSeededTrackingRegionsBuilder::Area > m_areas
Builder beginEvent(const edm::Event &e) const

Member Data Documentation

std::vector<AreaSeededTrackingRegionsBuilder::Area> AreaSeededTrackingRegionsProducer::m_areas
private
AreaSeededTrackingRegionsBuilder AreaSeededTrackingRegionsProducer::m_builder
private

Definition at line 105 of file AreaSeededTrackingRegionsProducer.h.

Referenced by regions().

VertexBeamspotOrigins AreaSeededTrackingRegionsProducer::m_origins
private

Definition at line 104 of file AreaSeededTrackingRegionsProducer.h.

Referenced by regions().