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 
13 public:
14 
16  edm::ConsumesCollector && iC) {
17 
18  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
19 
20  thePtMin = regionPSet.getParameter<double>("ptMin");
21  theOriginRadius = regionPSet.getParameter<double>("originRadius");
22  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
23  double xPos = regionPSet.getParameter<double>("originXPos");
24  double yPos = regionPSet.getParameter<double>("originYPos");
25  double zPos = regionPSet.getParameter<double>("originZPos");
26  thePrecise = regionPSet.getParameter<bool>("precise");
27  theOrigin = GlobalPoint(xPos,yPos,zPos);
28  }
29 
31 
32  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
34 
35  desc.add<bool>("precise", true);
36  desc.add<bool>("useMultipleScattering", false);
37  desc.add<double>("originHalfLength", 21.2);
38  desc.add<double>("originRadius", 0.2);
39  desc.add<double>("originXPos", 0.0);
40  desc.add<double>("originYPos", 0.0);
41  desc.add<double>("originZPos", 0.0);
42  desc.add<double>("ptMin", 0.9);
43 
44  // Only for backwards-compatibility
46  descRegion.add<edm::ParameterSetDescription>("RegionPSet", desc);
47 
48  descriptions.add("globalTrackingRegion", descRegion);
49  }
50 
51  std::vector<std::unique_ptr<TrackingRegion> > regions(const edm::Event&, const edm::EventSetup&) const override {
52  std::vector<std::unique_ptr<TrackingRegion> > result;
53  result.push_back(
54  std::make_unique<GlobalTrackingRegion>( thePtMin, theOrigin, theOriginRadius, theOriginHalfLength, thePrecise) );
55  return result;
56  }
57 
58 private:
59  double thePtMin;
61  double theOriginRadius;
63  bool thePrecise;
64 };
65 
66 #endif
T getParameter(std::string const &) const
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)