CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/RecoMuon/TrackerSeedGenerator/src/L1MuonRegionProducer.cc

Go to the documentation of this file.
00001 #include "RecoMuon/TrackerSeedGenerator/interface/L1MuonRegionProducer.h"
00002 
00003 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00004 #include "RecoTracker/TkTrackingRegions/interface/RectangularEtaPhiTrackingRegion.h"
00005 #include "RecoTracker/TkTrackingRegions/interface/GlobalTrackingRegion.h"
00006 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTCand.h"
00007 #include "RecoMuon/TrackerSeedGenerator/interface/L1MuonPixelTrackFitter.h"
00008 
00009 using namespace std;
00010 
00011 L1MuonRegionProducer::L1MuonRegionProducer(const edm::ParameterSet& cfg) { 
00012 
00013   edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
00014 
00015   thePtMin            = regionPSet.getParameter<double>("ptMin");
00016   theOriginRadius     = regionPSet.getParameter<double>("originRadius");
00017   theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
00018   theOrigin = GlobalPoint( regionPSet.getParameter<double>("originXPos"),
00019                            regionPSet.getParameter<double>("originYPos"),
00020                            regionPSet.getParameter<double>("originZPos"));
00021 }   
00022 
00023 void L1MuonRegionProducer::setL1Constraint(const L1MuGMTCand & muon)
00024 {
00025   thePhiL1 = muon.phiValue()+0.021817;
00026   theEtaL1 = muon.etaValue();
00027   theChargeL1 = muon.charge();
00028 }
00029 
00030 std::vector<TrackingRegion* > L1MuonRegionProducer::
00031       regions(const edm::Event& ev, const edm::EventSetup& es) const
00032 {
00033   double dx = cos(thePhiL1);
00034   double dy = sin(thePhiL1);
00035   double dz = sinh(theEtaL1);
00036   GlobalVector direction(dx,dy,dz);        // muon direction
00037 
00038   std::vector<TrackingRegion* > result;
00039   double bending = L1MuonPixelTrackFitter::getBending(1./thePtMin, theEtaL1, theChargeL1);
00040   bending = fabs(bending);
00041   double errBending = L1MuonPixelTrackFitter::getBendingError(1./thePtMin, theEtaL1);
00042 
00043   result.push_back( 
00044       new RectangularEtaPhiTrackingRegion( direction, theOrigin, 
00045           thePtMin, theOriginRadius, theOriginHalfLength, 0.15, bending+3*errBending) );
00046 
00047   return result;
00048 }
00049 
00050 
00051 
00052