test
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  edm::ConsumesCollector && iC) {
13 
14  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
15 
16  thePtMin = regionPSet.getParameter<double>("ptMin");
17  theOriginRadius = regionPSet.getParameter<double>("originRadius");
18  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
19  theOrigin = GlobalPoint( regionPSet.getParameter<double>("originXPos"),
20  regionPSet.getParameter<double>("originYPos"),
21  regionPSet.getParameter<double>("originZPos"));
22 }
23 
25 {
26  thePhiL1 = muon.phiValue()+0.021817;
27  theEtaL1 = muon.etaValue();
28  theChargeL1 = muon.charge();
29 }
30 
31 std::vector<std::unique_ptr<TrackingRegion> > L1MuonRegionProducer::
32  regions(const edm::Event& ev, const edm::EventSetup& es) const
33 {
34  double dx = cos(thePhiL1);
35  double dy = sin(thePhiL1);
36  double dz = sinh(theEtaL1);
37  GlobalVector direction(dx,dy,dz); // muon direction
38 
39  std::vector<std::unique_ptr<TrackingRegion> > result;
40  double bending = L1MuonPixelTrackFitter::getBending(1./thePtMin, theEtaL1, theChargeL1);
41  bending = fabs(bending);
42  double errBending = L1MuonPixelTrackFitter::getBendingError(1./thePtMin, theEtaL1);
43 
44  result.push_back(
45  std::make_unique<RectangularEtaPhiTrackingRegion>( direction, theOrigin,
46  thePtMin, theOriginRadius, theOriginHalfLength, 0.15, bending+3*errBending) );
47 
48  return result;
49 }
50 
51 
52 
53 
float etaValue() const
Definition: L1MuGMTCand.cc:114
T getParameter(std::string const &) const
float phiValue() const
Definition: L1MuGMTCand.cc:100
tuple cfg
Definition: looper.py:293
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static double getBendingError(double invPt, double eta)
bool ev
tuple result
Definition: mps_fire.py:83
L1MuonRegionProducer(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static double getBending(double invPt, double eta, int charge)
virtual std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &ev, const edm::EventSetup &es) const override
void setL1Constraint(const L1MuGMTCand &muon)
int charge() const
get charge (+1 -1)
Definition: L1MuGMTCand.h:135