CMS 3D CMS Logo

AreaSeededTrackingRegionsProducer.h
Go to the documentation of this file.
1 #ifndef RecoTracker_TkTrackingRegions_AreaSeededTrackingRegionsProducer_h
2 #define RecoTracker_TkTrackingRegions_AreaSeededTrackingRegionsProducer_h
3 
5 
17 
18 #include "VertexBeamspotOrigins.h"
20 
21 #include <array>
22 #include <limits>
23 
49 public:
51 
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  }
67 
69 
70  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
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  }
92 
93  std::vector<std::unique_ptr<TrackingRegion> > regions(const edm::Event& e, const edm::EventSetup& es) const {
94  auto origins = m_origins.origins(e);
95  auto builder = m_builder.beginEvent(e);
96  return builder.regions(origins, m_areas);
97  }
98 
99 private:
102  std::vector<AreaSeededTrackingRegionsBuilder::Area> m_areas;
103 };
104 
105 #endif
AreaSeededTrackingRegionsProducer::m_builder
AreaSeededTrackingRegionsBuilder m_builder
Definition: AreaSeededTrackingRegionsProducer.h:101
ConfigurationDescriptions.h
Handle.h
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
VertexBeamspotOrigins::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc, const std::string &defaultBeamSpot="offlineBeamSpot", const std::string &defaultVertex="firstStepPrimaryVertices", int defaultMaxVertices=-1)
Definition: VertexBeamspotOrigins.cc:38
AreaSeededTrackingRegionsProducer::AreaSeededTrackingRegionsProducer
AreaSeededTrackingRegionsProducer(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
Definition: AreaSeededTrackingRegionsProducer.h:52
AreaSeededTrackingRegionsBuilder::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition: AreaSeededTrackingRegionsBuilder.cc:36
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
AreaSeededTrackingRegionsProducer::m_origins
VertexBeamspotOrigins m_origins
Definition: AreaSeededTrackingRegionsProducer.h:100
AreaSeededTrackingRegionsProducer::~AreaSeededTrackingRegionsProducer
~AreaSeededTrackingRegionsProducer()=default
AreaSeededTrackingRegionsProducer::VERTICES_FIXED
Definition: AreaSeededTrackingRegionsProducer.h:50
AreaSeededTrackingRegionsProducer::BEAM_SPOT_FIXED
Definition: AreaSeededTrackingRegionsProducer.h:50
VertexBeamspotOrigins.h
AreaSeededTrackingRegionsProducer::VERTICES_SIGMA
Definition: AreaSeededTrackingRegionsProducer.h:50
AreaSeededTrackingRegionsProducer::regions
std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const
Definition: AreaSeededTrackingRegionsProducer.h:93
AreaSeededTrackingRegionsBuilder.h
BeamSpot.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
AreaSeededTrackingRegionsBuilder::Builder::regions
std::vector< std::unique_ptr< TrackingRegion > > regions(const Origins &origins, const std::vector< Area > &areas) const
Definition: AreaSeededTrackingRegionsBuilder.cc:62
AreaSeededTrackingRegionsProducer::Mode
Mode
Definition: AreaSeededTrackingRegionsProducer.h:50
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
Vertex.h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
ParameterSet
Definition: Functions.h:16
RectangularEtaPhiTrackingRegion.h
edm::EventSetup
Definition: EventSetup.h:57
AreaSeededTrackingRegionsBuilder::beginEvent
Builder beginEvent(const edm::Event &e) const
Definition: AreaSeededTrackingRegionsBuilder.cc:50
InputTag.h
VertexFwd.h
PtEtaPhiMass.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
AreaSeededTrackingRegionsProducer
Definition: AreaSeededTrackingRegionsProducer.h:48
AreaSeededTrackingRegionsBuilder
Definition: AreaSeededTrackingRegionsBuilder.h:16
AreaSeededTrackingRegionsProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: AreaSeededTrackingRegionsProducer.h:70
VertexBeamspotOrigins
Definition: VertexBeamspotOrigins.h:15
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
AreaSeededTrackingRegionsProducer::BEAM_SPOT_SIGMA
Definition: AreaSeededTrackingRegionsProducer.h:50
ConsumesCollector.h
cms::Exception
Definition: Exception.h:70
AreaSeededTrackingRegionsProducer::m_areas
std::vector< AreaSeededTrackingRegionsBuilder::Area > m_areas
Definition: AreaSeededTrackingRegionsProducer.h:102
ParameterSet.h
edm::Event
Definition: Event.h:73
custom_jme_cff.area
area
Definition: custom_jme_cff.py:133
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
VertexBeamspotOrigins::origins
Origins origins(const edm::Event &iEvent) const
Definition: VertexBeamspotOrigins.cc:53
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37