test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
MuonGmtPair Class Reference

#include <L1TEfficiencyMuons_Offline.h>

Public Member Functions

double dR ()
 
double eta () const
 
double gmtEta () const
 
double gmtPhi () const
 
double gmtPt () const
 
int gmtQual () const
 
 MuonGmtPair (const reco::Muon *muon, const l1t::Muon *regMu)
 
 MuonGmtPair (const MuonGmtPair &muonGmtPair)
 
double phi () const
 
void propagate (edm::ESHandle< MagneticField > bField, edm::ESHandle< Propagator > propagatorAlong, edm::ESHandle< Propagator > propagatorOpposite)
 
double pt () const
 
 ~MuonGmtPair ()
 

Private Member Functions

TrajectoryStateOnSurface cylExtrapTrkSam (reco::TrackRef track, double rho)
 
FreeTrajectoryState freeTrajStateMuon (reco::TrackRef track)
 
TrajectoryStateOnSurface surfExtrapTrkSam (reco::TrackRef track, double z)
 

Private Attributes

edm::ESHandle< MagneticFieldm_BField
 
double m_eta
 
const reco::Muonm_muon
 
double m_phi_bar
 
double m_phi_end
 
edm::ESHandle< Propagatorm_propagatorAlong
 
edm::ESHandle< Propagatorm_propagatorOpposite
 
const l1t::Muonm_regMu
 

Detailed Description

Definition at line 69 of file L1TEfficiencyMuons_Offline.h.

Constructor & Destructor Documentation

MuonGmtPair::MuonGmtPair ( const reco::Muon muon,
const l1t::Muon regMu 
)
inline

Definition at line 71 of file L1TEfficiencyMuons_Offline.h.

71  :
72  m_muon(muon), m_regMu(regMu), m_eta(999.), m_phi_bar(999.), m_phi_end(999.) { };
const l1t::Muon * m_regMu
const reco::Muon * m_muon
MuonGmtPair::MuonGmtPair ( const MuonGmtPair muonGmtPair)

Definition at line 28 of file L1TEfficiencyMuons_Offline.cc.

References m_eta, m_muon, m_phi_bar, m_phi_end, and m_regMu.

28  {
29  m_muon = muonGmtPair.m_muon;
30  m_regMu = muonGmtPair.m_regMu;
31 
32  m_eta = muonGmtPair.m_eta;
33  m_phi_bar = muonGmtPair.m_phi_bar;
34  m_phi_end = muonGmtPair.m_phi_end;
35 }
const l1t::Muon * m_regMu
const reco::Muon * m_muon
MuonGmtPair::~MuonGmtPair ( )
inline

Definition at line 75 of file L1TEfficiencyMuons_Offline.h.

75 { };

Member Function Documentation

TrajectoryStateOnSurface MuonGmtPair::cylExtrapTrkSam ( reco::TrackRef  track,
double  rho 
)
private

Definition at line 68 of file L1TEfficiencyMuons_Offline.cc.

References Cylinder::build(), TrajectoryStateOnSurface::isValid(), and makeMuonMisalignmentScenario::rot.

69 {
70  Cylinder::PositionType pos(0, 0, 0);
72  Cylinder::CylinderPointer myCylinder = Cylinder::build(pos, rot, rho);
73 
74  FreeTrajectoryState recoStart = freeTrajStateMuon(track);
75  TrajectoryStateOnSurface recoProp;
76  recoProp = m_propagatorAlong->propagate(recoStart, *myCylinder);
77  if (!recoProp.isValid()) {
78  recoProp = m_propagatorOpposite->propagate(recoStart, *myCylinder);
79  }
80  return recoProp;
81 }
edm::ESHandle< Propagator > m_propagatorOpposite
edm::ESHandle< Propagator > m_propagatorAlong
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, Bounds *bounds=0)
Definition: Cylinder.h:51
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef track)
double MuonGmtPair::dR ( )

Definition at line 37 of file L1TEfficiencyMuons_Offline.cc.

References dPhi(), eta, phi(), and mathSSE::sqrt().

Referenced by L1TEfficiencyMuons_Offline::getMuonGmtPairs().

37  {
38  float dEta = m_regMu ? (m_regMu->eta() - eta()) : 999.;
39  float dPhi = m_regMu ? (m_regMu->phi() - phi()) : 999.;
40  return sqrt(dEta*dEta + dPhi*dPhi);
41 }
virtual double phi() const final
momentum azimuthal angle
const l1t::Muon * m_regMu
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
T sqrt(T t)
Definition: SSEVec.h:18
virtual double eta() const final
momentum pseudorapidity
double MuonGmtPair::eta ( ) const
inline

Definition at line 78 of file L1TEfficiencyMuons_Offline.h.

References reco::LeafCandidate::eta(), and m_muon.

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), and Jet.Jet::puJetId().

78 { return m_muon->eta(); };
const reco::Muon * m_muon
virtual double eta() const final
momentum pseudorapidity
FreeTrajectoryState MuonGmtPair::freeTrajStateMuon ( reco::TrackRef  track)
private

Definition at line 98 of file L1TEfficiencyMuons_Offline.cc.

99 {
100  GlobalPoint innerPoint(track->innerPosition().x(), track->innerPosition().y(), track->innerPosition().z());
101  GlobalVector innerVec (track->innerMomentum().x(), track->innerMomentum().y(), track->innerMomentum().z());
102  FreeTrajectoryState recoStart(innerPoint, innerVec, track->charge(), &*m_BField);
103  return recoStart;
104 }
edm::ESHandle< MagneticField > m_BField
double MuonGmtPair::gmtEta ( ) const
inline

Definition at line 84 of file L1TEfficiencyMuons_Offline.h.

References reco::LeafCandidate::eta(), and m_regMu.

84 { return m_regMu ? m_regMu->eta() : -5.; };
const l1t::Muon * m_regMu
virtual double eta() const final
momentum pseudorapidity
double MuonGmtPair::gmtPhi ( ) const
inline

Definition at line 83 of file L1TEfficiencyMuons_Offline.h.

References m_regMu, and reco::LeafCandidate::phi().

83 { return m_regMu ? m_regMu->phi() : -5.; };
virtual double phi() const final
momentum azimuthal angle
const l1t::Muon * m_regMu
double MuonGmtPair::gmtPt ( ) const
inline

Definition at line 81 of file L1TEfficiencyMuons_Offline.h.

References m_regMu, and reco::LeafCandidate::pt().

81 { return m_regMu ? m_regMu->pt() : -1.; };
const l1t::Muon * m_regMu
virtual double pt() const final
transverse momentum
int MuonGmtPair::gmtQual ( ) const
inline

Definition at line 82 of file L1TEfficiencyMuons_Offline.h.

References l1t::L1Candidate::hwQual(), and m_regMu.

82 { return m_regMu ? m_regMu->hwQual() : -1; };
const l1t::Muon * m_regMu
int hwQual() const
Definition: L1Candidate.h:51
double MuonGmtPair::phi ( void  ) const
inline

Definition at line 79 of file L1TEfficiencyMuons_Offline.h.

References m_muon, and reco::LeafCandidate::phi().

Referenced by Particle.Particle::__str__().

79 { return m_muon->phi(); };
virtual double phi() const final
momentum azimuthal angle
const reco::Muon * m_muon
void MuonGmtPair::propagate ( edm::ESHandle< MagneticField bField,
edm::ESHandle< Propagator propagatorAlong,
edm::ESHandle< Propagator propagatorOpposite 
)

Definition at line 43 of file L1TEfficiencyMuons_Offline.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::bField, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), PV3DBase< T, PVType, FrameType >::phi(), HLT_25ns10e33_v2_cff::propagatorAlong, and HLT_25ns10e33_v2_cff::propagatorOpposite.

45  {
46  m_BField = bField;
49  TrackRef standaloneMuon = m_muon->outerTrack();
50  TrajectoryStateOnSurface trajectory;
51  trajectory = cylExtrapTrkSam(standaloneMuon, 500); // track at MB2 radius - extrapolation
52  if (trajectory.isValid()) {
53  m_eta = trajectory.globalPosition().eta();
54  m_phi_bar = trajectory.globalPosition().phi();
55  }
56  trajectory = surfExtrapTrkSam(standaloneMuon, 790); // track at ME2+ plane - extrapolation
57  if (trajectory.isValid()) {
58  m_eta = trajectory.globalPosition().eta();
59  m_phi_end = trajectory.globalPosition().phi();
60  }
61  trajectory = surfExtrapTrkSam(standaloneMuon, -790); // track at ME2- disk - extrapolation
62  if (trajectory.isValid()) {
63  m_eta = trajectory.globalPosition().eta();
64  m_phi_end = trajectory.globalPosition().phi();
65  }
66 }
edm::ESHandle< Propagator > m_propagatorOpposite
edm::ESHandle< Propagator > m_propagatorAlong
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalPoint globalPosition() const
edm::ESHandle< MagneticField > m_BField
TrajectoryStateOnSurface cylExtrapTrkSam(reco::TrackRef track, double rho)
const reco::Muon * m_muon
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
Definition: Muon.h:51
TrajectoryStateOnSurface surfExtrapTrkSam(reco::TrackRef track, double z)
T eta() const
Definition: PV3DBase.h:76
double MuonGmtPair::pt ( void  ) const
inline
TrajectoryStateOnSurface MuonGmtPair::surfExtrapTrkSam ( reco::TrackRef  track,
double  z 
)
private

Definition at line 83 of file L1TEfficiencyMuons_Offline.cc.

References Plane::build(), TrajectoryStateOnSurface::isValid(), and makeMuonMisalignmentScenario::rot.

84 {
85  Plane::PositionType pos(0, 0, z);
87  Plane::PlanePointer myPlane = Plane::build(pos, rot);
88 
89  FreeTrajectoryState recoStart = freeTrajStateMuon(track);
90  TrajectoryStateOnSurface recoProp;
91  recoProp = m_propagatorAlong->propagate(recoStart, *myPlane);
92  if (!recoProp.isValid()) {
93  recoProp = m_propagatorOpposite->propagate(recoStart, *myPlane);
94  }
95  return recoProp;
96 }
edm::ESHandle< Propagator > m_propagatorOpposite
edm::ESHandle< Propagator > m_propagatorAlong
static PlanePointer build(Args &&...args)
Definition: Plane.h:33
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef track)

Member Data Documentation

edm::ESHandle<MagneticField> MuonGmtPair::m_BField
private

Definition at line 100 of file L1TEfficiencyMuons_Offline.h.

double MuonGmtPair::m_eta
private

Definition at line 104 of file L1TEfficiencyMuons_Offline.h.

Referenced by MuonGmtPair().

const reco::Muon* MuonGmtPair::m_muon
private

Definition at line 97 of file L1TEfficiencyMuons_Offline.h.

Referenced by eta(), MuonGmtPair(), phi(), and pt().

double MuonGmtPair::m_phi_bar
private

Definition at line 105 of file L1TEfficiencyMuons_Offline.h.

Referenced by MuonGmtPair().

double MuonGmtPair::m_phi_end
private

Definition at line 106 of file L1TEfficiencyMuons_Offline.h.

Referenced by MuonGmtPair().

edm::ESHandle<Propagator> MuonGmtPair::m_propagatorAlong
private

Definition at line 101 of file L1TEfficiencyMuons_Offline.h.

edm::ESHandle<Propagator> MuonGmtPair::m_propagatorOpposite
private

Definition at line 102 of file L1TEfficiencyMuons_Offline.h.

const l1t::Muon* MuonGmtPair::m_regMu
private

Definition at line 98 of file L1TEfficiencyMuons_Offline.h.

Referenced by gmtEta(), gmtPhi(), gmtPt(), gmtQual(), and MuonGmtPair().