CMS 3D CMS Logo

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

#include <L1TMuonDQMOffline.h>

Public Member Functions

int charge () const
 
double dR ()
 
double eta () const
 
int gmtCharge () 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 L1TMuonDQMOffline.h.

Constructor & Destructor Documentation

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

Definition at line 71 of file L1TMuonDQMOffline.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 27 of file L1TMuonDQMOffline.cc.

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

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

Definition at line 75 of file L1TMuonDQMOffline.h.

References dR().

75 { };

Member Function Documentation

int MuonGmtPair::charge ( ) const
inline

Definition at line 81 of file L1TMuonDQMOffline.h.

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

81 {return m_muon->charge(); };
int charge() const final
electric charge
Definition: LeafCandidate.h:91
const reco::Muon * m_muon
TrajectoryStateOnSurface MuonGmtPair::cylExtrapTrkSam ( reco::TrackRef  track,
double  rho 
)
private

Definition at line 67 of file L1TMuonDQMOffline.cc.

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

Referenced by gmtQual().

68 {
69  Cylinder::PositionType pos(0, 0, 0);
72 
73  FreeTrajectoryState recoStart = freeTrajStateMuon(track);
74  TrajectoryStateOnSurface recoProp;
75  recoProp = m_propagatorAlong->propagate(recoStart, *myCylinder);
76  if (!recoProp.isValid()) {
77  recoProp = m_propagatorOpposite->propagate(recoStart, *myCylinder);
78  }
79  return recoProp;
80 }
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)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:53
double MuonGmtPair::dR ( )

Definition at line 36 of file L1TMuonDQMOffline.cc.

References PVValHelper::eta, and mathSSE::sqrt().

Referenced by L1TMuonDQMOffline::getMuonGmtPairs(), and ~MuonGmtPair().

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

Definition at line 79 of file L1TMuonDQMOffline.h.

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

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

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

Definition at line 97 of file L1TMuonDQMOffline.cc.

Referenced by gmtQual().

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

Definition at line 85 of file L1TMuonDQMOffline.h.

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

85 {return m_regMu ? m_regMu->charge() : -5; };
int charge() const final
electric charge
Definition: LeafCandidate.h:91
const l1t::Muon * m_regMu
double MuonGmtPair::gmtEta ( ) const
inline

Definition at line 83 of file L1TMuonDQMOffline.h.

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

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

Definition at line 84 of file L1TMuonDQMOffline.h.

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

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

Definition at line 82 of file L1TMuonDQMOffline.h.

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

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

Definition at line 80 of file L1TMuonDQMOffline.h.

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

Referenced by Particle.Particle::__str__(), and ntupleDataFormat.Track::phiPull().

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

Definition at line 42 of file L1TMuonDQMOffline.cc.

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

Referenced by gmtQual().

44  {
45  m_BField = bField;
48  TrackRef standaloneMuon = m_muon->outerTrack();
49  TrajectoryStateOnSurface trajectory;
50  trajectory = cylExtrapTrkSam(standaloneMuon, 500); // track at MB2 radius - extrapolation
51  if (trajectory.isValid()) {
52  m_eta = trajectory.globalPosition().eta();
53  m_phi_bar = trajectory.globalPosition().phi();
54  }
55  trajectory = surfExtrapTrkSam(standaloneMuon, 790); // track at ME2+ plane - extrapolation
56  if (trajectory.isValid()) {
57  m_eta = trajectory.globalPosition().eta();
58  m_phi_end = trajectory.globalPosition().phi();
59  }
60  trajectory = surfExtrapTrkSam(standaloneMuon, -790); // track at ME2- disk - extrapolation
61  if (trajectory.isValid()) {
62  m_eta = trajectory.globalPosition().eta();
63  m_phi_end = trajectory.globalPosition().phi();
64  }
65 }
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 ( ) const
inline
TrajectoryStateOnSurface MuonGmtPair::surfExtrapTrkSam ( reco::TrackRef  track,
double  z 
)
private

Definition at line 82 of file L1TMuonDQMOffline.cc.

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

Referenced by gmtQual().

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

Member Data Documentation

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

Definition at line 102 of file L1TMuonDQMOffline.h.

double MuonGmtPair::m_eta
private

Definition at line 106 of file L1TMuonDQMOffline.h.

Referenced by MuonGmtPair().

const reco::Muon* MuonGmtPair::m_muon
private

Definition at line 99 of file L1TMuonDQMOffline.h.

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

double MuonGmtPair::m_phi_bar
private

Definition at line 107 of file L1TMuonDQMOffline.h.

Referenced by MuonGmtPair().

double MuonGmtPair::m_phi_end
private

Definition at line 108 of file L1TMuonDQMOffline.h.

Referenced by MuonGmtPair().

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

Definition at line 103 of file L1TMuonDQMOffline.h.

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

Definition at line 104 of file L1TMuonDQMOffline.h.

const l1t::Muon* MuonGmtPair::m_regMu
private

Definition at line 100 of file L1TMuonDQMOffline.h.

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