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 48 of file AreaSeededTrackingRegionsProducer.h.

Member Enumeration Documentation

◆ Mode

Constructor & Destructor Documentation

◆ AreaSeededTrackingRegionsProducer()

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

Definition at line 52 of file AreaSeededTrackingRegionsProducer.h.

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

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

◆ ~AreaSeededTrackingRegionsProducer()

AreaSeededTrackingRegionsProducer::~AreaSeededTrackingRegionsProducer ( )
default

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 70 of file AreaSeededTrackingRegionsProducer.h.

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

70  {
72 
74  descAreas.add<double>("rmin", 0.0);
75  descAreas.add<double>("rmax", 0.0);
76  descAreas.add<double>("zmin", 0.0);
77  descAreas.add<double>("zmax", 0.0);
78  descAreas.add<double>("phimin", 0.0);
79  descAreas.add<double>("phimax", 0.0);
80  std::vector<edm::ParameterSet> vDefaults;
81  desc.addVPSet("areas", descAreas, vDefaults);
82 
85 
86  // Only for backwards-compatibility
88  descRegion.add<edm::ParameterSetDescription>("RegionPSet", desc);
89 
90  descriptions.add("areaSeededTrackingRegion", descRegion);
91  }
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)

◆ regions()

std::vector<std::unique_ptr<TrackingRegion> > AreaSeededTrackingRegionsProducer::regions ( const edm::Event e,
const edm::EventSetup es 
) const
inline

Definition at line 93 of file AreaSeededTrackingRegionsProducer.h.

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

93  {
94  auto origins = m_origins.origins(e);
95  auto builder = m_builder.beginEvent(e, es);
96  return builder.regions(origins, m_areas);
97  }
std::vector< std::unique_ptr< TrackingRegion > > regions(const Origins &origins, const std::vector< Area > &areas) const
Builder beginEvent(const edm::Event &e, const edm::EventSetup &es) const
std::vector< AreaSeededTrackingRegionsBuilder::Area > m_areas
Origins origins(const edm::Event &iEvent) const

Member Data Documentation

◆ m_areas

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

◆ m_builder

AreaSeededTrackingRegionsBuilder AreaSeededTrackingRegionsProducer::m_builder
private

Definition at line 101 of file AreaSeededTrackingRegionsProducer.h.

Referenced by regions().

◆ m_origins

VertexBeamspotOrigins AreaSeededTrackingRegionsProducer::m_origins
private

Definition at line 100 of file AreaSeededTrackingRegionsProducer.h.

Referenced by regions().