CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1MuonRegionProducer Class Reference

#include <L1MuonRegionProducer.h>

Public Member Functions

 L1MuonRegionProducer (const edm::ParameterSet &cfg, edm::ConsumesCollector iC)
 
std::vector< std::unique_ptr< TrackingRegion > > regions (const edm::EventSetup &iSetup) const
 
void setL1Constraint (const L1MuGMTCand &muon)
 
 ~L1MuonRegionProducer ()=default
 

Private Attributes

int theChargeL1
 
double theEtaL1
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordtheFieldToken
 
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecordtheMSMakerToken
 
GlobalPoint theOrigin
 
double theOriginHalfLength
 
double theOriginRadius
 
double thePhiL1
 
double thePtL1
 
double thePtMin
 

Detailed Description

Definition at line 17 of file L1MuonRegionProducer.h.

Constructor & Destructor Documentation

◆ L1MuonRegionProducer()

L1MuonRegionProducer::L1MuonRegionProducer ( const edm::ParameterSet cfg,
edm::ConsumesCollector  iC 
)

Definition at line 15 of file L1MuonRegionProducer.cc.

References looper::cfg, edm::ParameterSet::getParameter(), theOrigin, theOriginHalfLength, theOriginRadius, and thePtMin.

17  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
18 
19  thePtMin = regionPSet.getParameter<double>("ptMin");
20  theOriginRadius = regionPSet.getParameter<double>("originRadius");
21  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
22  theOrigin = GlobalPoint(regionPSet.getParameter<double>("originXPos"),
23  regionPSet.getParameter<double>("originYPos"),
24  regionPSet.getParameter<double>("originZPos"));
25 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > theMSMakerToken
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken

◆ ~L1MuonRegionProducer()

L1MuonRegionProducer::~L1MuonRegionProducer ( )
default

Member Function Documentation

◆ regions()

std::vector< std::unique_ptr< TrackingRegion > > L1MuonRegionProducer::regions ( const edm::EventSetup iSetup) const

Definition at line 33 of file L1MuonRegionProducer.cc.

References funct::cos(), PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, L1MuonPixelTrackFitter::getBending(), L1MuonPixelTrackFitter::getBendingError(), edm::EventSetup::getData(), mps_fire::result, funct::sin(), theChargeL1, theEtaL1, theFieldToken, theMSMakerToken, theOrigin, theOriginHalfLength, theOriginRadius, thePhiL1, and thePtMin.

33  {
34  const auto& field = iSetup.getData(theFieldToken);
35  const auto& msmaker = iSetup.getData(theMSMakerToken);
36  double dx = cos(thePhiL1);
37  double dy = sin(thePhiL1);
38  double dz = sinh(theEtaL1);
39  GlobalVector direction(dx, dy, dz); // muon direction
40 
41  std::vector<std::unique_ptr<TrackingRegion> > result;
43  bending = fabs(bending);
45 
46  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(direction,
47  theOrigin,
48  thePtMin,
51  0.15,
52  bending + 3 * errBending,
53  field,
54  &msmaker));
55 
56  return result;
57 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
static double getBendingError(double invPt, double eta)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > theMSMakerToken
static double getBending(double invPt, double eta, int charge)
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken

◆ setL1Constraint()

void L1MuonRegionProducer::setL1Constraint ( const L1MuGMTCand muon)

Definition at line 27 of file L1MuonRegionProducer.cc.

References theChargeL1, theEtaL1, and thePhiL1.

27  {
28  thePhiL1 = muon.phiValue() + 0.021817;
29  theEtaL1 = muon.etaValue();
30  theChargeL1 = muon.charge();
31 }

Member Data Documentation

◆ theChargeL1

int L1MuonRegionProducer::theChargeL1
private

Definition at line 31 of file L1MuonRegionProducer.h.

Referenced by regions(), and setL1Constraint().

◆ theEtaL1

double L1MuonRegionProducer::theEtaL1
private

Definition at line 30 of file L1MuonRegionProducer.h.

Referenced by regions(), and setL1Constraint().

◆ theFieldToken

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> L1MuonRegionProducer::theFieldToken
private

Definition at line 33 of file L1MuonRegionProducer.h.

Referenced by regions().

◆ theMSMakerToken

Definition at line 34 of file L1MuonRegionProducer.h.

Referenced by regions().

◆ theOrigin

GlobalPoint L1MuonRegionProducer::theOrigin
private

Definition at line 27 of file L1MuonRegionProducer.h.

Referenced by L1MuonRegionProducer(), and regions().

◆ theOriginHalfLength

double L1MuonRegionProducer::theOriginHalfLength
private

Definition at line 26 of file L1MuonRegionProducer.h.

Referenced by L1MuonRegionProducer(), and regions().

◆ theOriginRadius

double L1MuonRegionProducer::theOriginRadius
private

Definition at line 26 of file L1MuonRegionProducer.h.

Referenced by L1MuonRegionProducer(), and regions().

◆ thePhiL1

double L1MuonRegionProducer::thePhiL1
private

Definition at line 30 of file L1MuonRegionProducer.h.

Referenced by regions(), and setL1Constraint().

◆ thePtL1

double L1MuonRegionProducer::thePtL1
private

Definition at line 30 of file L1MuonRegionProducer.h.

◆ thePtMin

double L1MuonRegionProducer::thePtMin
private

Definition at line 26 of file L1MuonRegionProducer.h.

Referenced by L1MuonRegionProducer(), and regions().