CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoTracker/TkTrackingRegions/plugins/GlobalTrackingRegionProducer.h

Go to the documentation of this file.
00001 #ifndef RecoTracker_TkTrackingRegions_GlobalTrackingRegionProducer_H 
00002 #define RecoTracker_TkTrackingRegions_GlobalTrackingRegionProducer_H
00003 
00004 #include "RecoTracker/TkTrackingRegions/interface/TrackingRegionProducer.h"
00005 #include "RecoTracker/TkTrackingRegions/interface/GlobalTrackingRegion.h"
00006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00007 
00008 class GlobalTrackingRegionProducer : public TrackingRegionProducer {
00009 
00010 public:
00011 
00012   GlobalTrackingRegionProducer(const edm::ParameterSet& cfg) { 
00013 
00014     edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
00015 
00016     thePtMin            = regionPSet.getParameter<double>("ptMin");
00017     theOriginRadius     = regionPSet.getParameter<double>("originRadius");
00018     theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
00019     double xPos         = regionPSet.getParameter<double>("originXPos");
00020     double yPos         = regionPSet.getParameter<double>("originYPos");
00021     double zPos         = regionPSet.getParameter<double>("originZPos");
00022     thePrecise          = regionPSet.getParameter<bool>("precise"); 
00023     theOrigin = GlobalPoint(xPos,yPos,zPos);
00024   }   
00025 
00026   virtual ~GlobalTrackingRegionProducer(){}
00027 
00028   virtual std::vector<TrackingRegion* > regions(const edm::Event&, const edm::EventSetup&) const {
00029     std::vector<TrackingRegion* > result;
00030     result.push_back( 
00031         new GlobalTrackingRegion( thePtMin, theOrigin, theOriginRadius, theOriginHalfLength, thePrecise) );
00032     return result;
00033   }
00034 
00035 private:
00036   double thePtMin; 
00037   GlobalPoint theOrigin;
00038   double theOriginRadius; 
00039   double theOriginHalfLength; 
00040   bool thePrecise;
00041 };
00042 
00043 #endif