CMS 3D CMS Logo

GlobalTrackingRegionProducer.h
Go to the documentation of this file.
1 #ifndef RecoTracker_TkTrackingRegions_GlobalTrackingRegionProducer_H
2 #define RecoTracker_TkTrackingRegions_GlobalTrackingRegionProducer_H
3 
10 
12 public:
14  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
15 
16  thePtMin = regionPSet.getParameter<double>("ptMin");
17  theOriginRadius = regionPSet.getParameter<double>("originRadius");
18  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
19  double xPos = regionPSet.getParameter<double>("originXPos");
20  double yPos = regionPSet.getParameter<double>("originYPos");
21  double zPos = regionPSet.getParameter<double>("originZPos");
22  thePrecise = regionPSet.getParameter<bool>("precise");
23  theOrigin = GlobalPoint(xPos, yPos, zPos);
24  }
25 
27 
28  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
30 
31  desc.add<bool>("precise", true);
32  desc.add<bool>("useMultipleScattering", false);
33  desc.add<double>("originHalfLength", 21.2);
34  desc.add<double>("originRadius", 0.2);
35  desc.add<double>("originXPos", 0.0);
36  desc.add<double>("originYPos", 0.0);
37  desc.add<double>("originZPos", 0.0);
38  desc.add<double>("ptMin", 0.9);
39 
40  // Only for backwards-compatibility
42  descRegion.add<edm::ParameterSetDescription>("RegionPSet", desc);
43 
44  descriptions.add("globalTrackingRegion", descRegion);
45  }
46 
47  std::vector<std::unique_ptr<TrackingRegion> > regions(const edm::Event&, const edm::EventSetup&) const override {
48  std::vector<std::unique_ptr<TrackingRegion> > result;
49  result.push_back(
50  std::make_unique<GlobalTrackingRegion>(thePtMin, theOrigin, theOriginRadius, theOriginHalfLength, thePrecise));
51  return result;
52  }
53 
54 private:
55  double thePtMin;
59  bool thePrecise;
60 };
61 
62 #endif
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &, const edm::EventSetup &) const override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
GlobalTrackingRegionProducer(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
void add(std::string const &label, ParameterSetDescription const &psetDescription)