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