CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuonRegionProducer.cc
Go to the documentation of this file.
2 
8 
9 using namespace std;
10 
12 
13  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
14 
15  thePtMin = regionPSet.getParameter<double>("ptMin");
16  theOriginRadius = regionPSet.getParameter<double>("originRadius");
17  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
18  theOrigin = GlobalPoint( regionPSet.getParameter<double>("originXPos"),
19  regionPSet.getParameter<double>("originYPos"),
20  regionPSet.getParameter<double>("originZPos"));
21 }
22 
24 {
25  thePhiL1 = muon.phiValue()+0.021817;
26  theEtaL1 = muon.etaValue();
27  theChargeL1 = muon.charge();
28 }
29 
30 std::vector<TrackingRegion* > L1MuonRegionProducer::
31  regions(const edm::Event& ev, const edm::EventSetup& es) const
32 {
33  double dx = cos(thePhiL1);
34  double dy = sin(thePhiL1);
35  double dz = sinh(theEtaL1);
36  GlobalVector direction(dx,dy,dz); // muon direction
37 
38  std::vector<TrackingRegion* > result;
39  double bending = L1MuonPixelTrackFitter::getBending(1./thePtMin, theEtaL1, theChargeL1);
40  bending = fabs(bending);
41  double errBending = L1MuonPixelTrackFitter::getBendingError(1./thePtMin, theEtaL1);
42 
43  result.push_back(
44  new RectangularEtaPhiTrackingRegion( direction, theOrigin,
45  thePtMin, theOriginRadius, theOriginHalfLength, 0.15, bending+3*errBending) );
46 
47  return result;
48 }
49 
50 
51 
52 
float etaValue() const
Definition: L1MuGMTCand.cc:116
T getParameter(std::string const &) const
float phiValue() const
Definition: L1MuGMTCand.cc:102
virtual std::vector< TrackingRegion * > regions(const edm::Event &ev, const edm::EventSetup &es) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static double getBendingError(double invPt, double eta)
L1MuonRegionProducer(const edm::ParameterSet &cfg)
tuple result
Definition: query.py:137
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static double getBending(double invPt, double eta, int charge)
void setL1Constraint(const L1MuGMTCand &muon)
int charge() const
get charge (+1 -1)
Definition: L1MuGMTCand.h:137