CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
IdealMagneticFieldRecord
theFieldToken
 
edm::ESGetToken
< MultipleScatteringParametrisationMaker,
TrackerMultipleScatteringRecord
theMSMakerToken
 
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 ( const edm::ParameterSet cfg,
edm::ConsumesCollector  iC 
)

Definition at line 15 of file L1MuonRegionProducer.cc.

References 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 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > theMSMakerToken
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
L1MuonRegionProducer::~L1MuonRegionProducer ( )
default

Member Function Documentation

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 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
static double getBendingError(double invPt, double eta)
tuple result
Definition: mps_fire.py:311
bool getData(T &iHolder) const
Definition: EventSetup.h:122
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
void L1MuonRegionProducer::setL1Constraint ( const L1MuGMTCand muon)

Definition at line 27 of file L1MuonRegionProducer.cc.

References L1MuGMTCand::charge(), L1MuGMTCand::etaValue(), L1MuGMTCand::phiValue(), theChargeL1, theEtaL1, and thePhiL1.

27  {
28  thePhiL1 = muon.phiValue() + 0.021817;
29  theEtaL1 = muon.etaValue();
30  theChargeL1 = muon.charge();
31 }
float etaValue() const
Definition: L1MuGMTCand.cc:102
float phiValue() const
Definition: L1MuGMTCand.cc:92
int charge() const
get charge (+1 -1)
Definition: L1MuGMTCand.h:132

Member Data Documentation

int L1MuonRegionProducer::theChargeL1
private

Definition at line 31 of file L1MuonRegionProducer.h.

Referenced by regions(), and setL1Constraint().

double L1MuonRegionProducer::theEtaL1
private

Definition at line 30 of file L1MuonRegionProducer.h.

Referenced by regions(), and setL1Constraint().

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

Definition at line 33 of file L1MuonRegionProducer.h.

Referenced by regions().

Definition at line 34 of file L1MuonRegionProducer.h.

Referenced by regions().

GlobalPoint L1MuonRegionProducer::theOrigin
private

Definition at line 27 of file L1MuonRegionProducer.h.

Referenced by L1MuonRegionProducer(), and regions().

double L1MuonRegionProducer::theOriginHalfLength
private

Definition at line 26 of file L1MuonRegionProducer.h.

Referenced by L1MuonRegionProducer(), and regions().

double L1MuonRegionProducer::theOriginRadius
private

Definition at line 26 of file L1MuonRegionProducer.h.

Referenced by L1MuonRegionProducer(), and regions().

double L1MuonRegionProducer::thePhiL1
private

Definition at line 30 of file L1MuonRegionProducer.h.

Referenced by regions(), and setL1Constraint().

double L1MuonRegionProducer::thePtL1
private

Definition at line 30 of file L1MuonRegionProducer.h.

double L1MuonRegionProducer::thePtMin
private

Definition at line 26 of file L1MuonRegionProducer.h.

Referenced by L1MuonRegionProducer(), and regions().