CMS 3D CMS Logo

L1MuonRegionProducer.cc
Go to the documentation of this file.
2 
8 
9 using namespace std;
10 
12  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
13 
14  thePtMin = regionPSet.getParameter<double>("ptMin");
15  theOriginRadius = regionPSet.getParameter<double>("originRadius");
16  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
17  theOrigin = GlobalPoint(regionPSet.getParameter<double>("originXPos"),
18  regionPSet.getParameter<double>("originYPos"),
19  regionPSet.getParameter<double>("originZPos"));
20 }
21 
23  thePhiL1 = muon.phiValue() + 0.021817;
24  theEtaL1 = muon.etaValue();
25  theChargeL1 = muon.charge();
26 }
27 
28 std::vector<std::unique_ptr<TrackingRegion> > L1MuonRegionProducer::regions() const {
29  double dx = cos(thePhiL1);
30  double dy = sin(thePhiL1);
31  double dz = sinh(theEtaL1);
32  GlobalVector direction(dx, dy, dz); // muon direction
33 
34  std::vector<std::unique_ptr<TrackingRegion> > result;
35  double bending = L1MuonPixelTrackFitter::getBending(1. / thePtMin, theEtaL1, theChargeL1);
36  bending = fabs(bending);
37  double errBending = L1MuonPixelTrackFitter::getBendingError(1. / thePtMin, theEtaL1);
38 
39  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
40  direction, theOrigin, thePtMin, theOriginRadius, theOriginHalfLength, 0.15, bending + 3 * errBending));
41 
42  return result;
43 }
float etaValue() const
Definition: L1MuGMTCand.cc:102
T getParameter(std::string const &) const
float phiValue() const
Definition: L1MuGMTCand.cc:92
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)
std::vector< std::unique_ptr< TrackingRegion > > regions() const
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:132