CMS 3D CMS Logo

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

#include <L1TMuonDQMOffline.h>

Public Member Functions

int charge () const
 
double dR ()
 
double eta () const
 
L1TMuonDQMOffline::EtaRegion etaRegion () const
 
double getDeltaVar (const L1TMuonDQMOffline::ResType) const
 
double getVar (const L1TMuonDQMOffline::EffType) const
 
int gmtCharge () const
 
double gmtEta () const
 
double gmtPhi () const
 
double gmtPt () const
 
int gmtQual () const
 
 MuonGmtPair (const MuonGmtPair &muonGmtPair)
 
 MuonGmtPair (const reco::Muon *muon, const l1t::Muon *regMu, const PropagateToMuon &propagator, bool useAtVtxCoord)
 
double phi () const
 
double pt () const
 
 ~MuonGmtPair ()
 

Private Attributes

double m_eta
 
double m_gmtEta
 
double m_gmtPhi
 
const reco::Muonm_muon
 
double m_phi
 
const l1t::Muonm_regMu
 

Detailed Description

Definition at line 186 of file L1TMuonDQMOffline.h.

Constructor & Destructor Documentation

◆ MuonGmtPair() [1/2]

MuonGmtPair::MuonGmtPair ( const reco::Muon muon,
const l1t::Muon regMu,
const PropagateToMuon propagator,
bool  useAtVtxCoord 
)

Definition at line 23 of file L1TMuonDQMOffline.cc.

27  : m_muon(muon), m_regMu(regMu) {
28  if (m_regMu) {
29  if (useAtVtxCoord) {
32  } else {
33  m_gmtEta = m_regMu->eta();
34  m_gmtPhi = m_regMu->phi();
35  }
36  } else {
37  m_gmtEta = -5.;
38  m_gmtPhi = -5.;
39  }
40  if (m_muon) {
41  TrajectoryStateOnSurface trajectory = propagator.extrapolate(*m_muon);
42  if (trajectory.isValid()) {
43  m_eta = trajectory.globalPosition().eta();
44  m_phi = trajectory.globalPosition().phi();
45  } else {
46  m_eta = 999.;
47  m_phi = 999.;
48  }
49  } else {
50  m_eta = 999.;
51  m_phi = 999.;
52  }
53 };

References PV3DBase< T, PVType, FrameType >::eta(), reco::LeafCandidate::eta(), l1t::Muon::etaAtVtx(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), m_eta, m_gmtEta, m_gmtPhi, m_muon, m_phi, m_regMu, PV3DBase< T, PVType, FrameType >::phi(), reco::LeafCandidate::phi(), l1t::Muon::phiAtVtx(), and TrackCandidateProducer_cfi::propagator.

◆ MuonGmtPair() [2/2]

MuonGmtPair::MuonGmtPair ( const MuonGmtPair muonGmtPair)

Definition at line 55 of file L1TMuonDQMOffline.cc.

55  {
56  m_muon = muonGmtPair.m_muon;
57  m_regMu = muonGmtPair.m_regMu;
58 
59  m_gmtEta = muonGmtPair.m_gmtEta;
60  m_gmtPhi = muonGmtPair.m_gmtPhi;
61 
62  m_eta = muonGmtPair.m_eta;
63  m_phi = muonGmtPair.m_phi;
64 }

References m_eta, m_gmtEta, m_gmtPhi, m_muon, m_phi, and m_regMu.

◆ ~MuonGmtPair()

MuonGmtPair::~MuonGmtPair ( )
inline

Definition at line 190 of file L1TMuonDQMOffline.h.

190 {};

Member Function Documentation

◆ charge()

int MuonGmtPair::charge ( ) const
inline

Definition at line 196 of file L1TMuonDQMOffline.h.

196 { return m_muon->charge(); };

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

Referenced by getDeltaVar().

◆ dR()

double MuonGmtPair::dR ( )

Definition at line 66 of file L1TMuonDQMOffline.cc.

66  {
67  float dEta = m_regMu ? (m_gmtEta - m_eta) : 999.;
68  float dPhi = m_regMu ? reco::deltaPhi(m_gmtPhi, m_phi) : 999.;
69  return sqrt(dEta * dEta + dPhi * dPhi);
70 }

References reco::deltaPhi(), HLT_2018_cff::dEta, HLT_2018_cff::dPhi, m_eta, m_gmtEta, m_gmtPhi, m_phi, m_regMu, and mathSSE::sqrt().

Referenced by L1TMuonDQMOffline::getMuonGmtPairs().

◆ eta()

double MuonGmtPair::eta ( ) const
inline

Definition at line 194 of file L1TMuonDQMOffline.h.

194 { return m_muon->eta(); };

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

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

◆ etaRegion()

L1TMuonDQMOffline::EtaRegion MuonGmtPair::etaRegion ( ) const

◆ getDeltaVar()

double MuonGmtPair::getDeltaVar ( const L1TMuonDQMOffline::ResType  type) const

Definition at line 82 of file L1TMuonDQMOffline.cc.

82  {
84  return (gmtPt() - pt()) / pt();
86  return (pt() - gmtPt()) / gmtPt(); // (1/gmtPt - 1/pt) / (1/pt)
88  return (gmtCharge() * charge() * pt() - gmtPt()) /
89  gmtPt(); // (gmtCharge/gmtPt - charge/pt) / (charge/pt) with gmtCharge/charge = gmtCharge*charge
91  return reco::deltaPhi(gmtPhi(), m_phi);
93  return gmtEta() - m_eta;
95  return gmtCharge() - charge();
96  return -999.;
97 }

References charge(), reco::deltaPhi(), gmtCharge(), gmtEta(), gmtPhi(), gmtPt(), L1TMuonDQMOffline::kRes1OverPt, L1TMuonDQMOffline::kResCh, L1TMuonDQMOffline::kResEta, L1TMuonDQMOffline::kResPhi, L1TMuonDQMOffline::kResPt, L1TMuonDQMOffline::kResQOverPt, m_eta, m_phi, and pt().

◆ getVar()

double MuonGmtPair::getVar ( const L1TMuonDQMOffline::EffType  type) const

Definition at line 99 of file L1TMuonDQMOffline.cc.

99  {
101  return pt();
103  return m_phi;
105  return m_eta;
106  return -999.;
107 }

References L1TMuonDQMOffline::kEffEta, L1TMuonDQMOffline::kEffPhi, L1TMuonDQMOffline::kEffPt, m_eta, m_phi, and pt().

Referenced by L1TMuonDQMOffline::getMuonGmtPairs().

◆ gmtCharge()

int MuonGmtPair::gmtCharge ( ) const
inline

Definition at line 200 of file L1TMuonDQMOffline.h.

200 { return m_regMu ? m_regMu->charge() : -5; };

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

Referenced by getDeltaVar().

◆ gmtEta()

double MuonGmtPair::gmtEta ( ) const
inline

Definition at line 198 of file L1TMuonDQMOffline.h.

198 { return m_regMu ? m_gmtEta : -5.; };

References m_gmtEta, and m_regMu.

Referenced by getDeltaVar().

◆ gmtPhi()

double MuonGmtPair::gmtPhi ( ) const
inline

Definition at line 199 of file L1TMuonDQMOffline.h.

199 { return m_regMu ? m_gmtPhi : -5.; };

References m_gmtPhi, and m_regMu.

Referenced by getDeltaVar().

◆ gmtPt()

double MuonGmtPair::gmtPt ( ) const
inline

Definition at line 197 of file L1TMuonDQMOffline.h.

197 { return m_regMu ? m_regMu->pt() : -1.; };

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

Referenced by getDeltaVar().

◆ gmtQual()

int MuonGmtPair::gmtQual ( ) const
inline

Definition at line 201 of file L1TMuonDQMOffline.h.

201 { return m_regMu ? m_regMu->hwQual() : -1; };

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

◆ phi()

double MuonGmtPair::phi ( void  ) const
inline

Definition at line 195 of file L1TMuonDQMOffline.h.

195 { return m_muon->phi(); };

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

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

◆ pt()

double MuonGmtPair::pt ( ) const
inline

Member Data Documentation

◆ m_eta

double MuonGmtPair::m_eta
private

Definition at line 216 of file L1TMuonDQMOffline.h.

Referenced by dR(), etaRegion(), getDeltaVar(), getVar(), and MuonGmtPair().

◆ m_gmtEta

double MuonGmtPair::m_gmtEta
private

Definition at line 213 of file L1TMuonDQMOffline.h.

Referenced by dR(), gmtEta(), and MuonGmtPair().

◆ m_gmtPhi

double MuonGmtPair::m_gmtPhi
private

Definition at line 214 of file L1TMuonDQMOffline.h.

Referenced by dR(), gmtPhi(), and MuonGmtPair().

◆ m_muon

const reco::Muon* MuonGmtPair::m_muon
private

Definition at line 208 of file L1TMuonDQMOffline.h.

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

◆ m_phi

double MuonGmtPair::m_phi
private

Definition at line 217 of file L1TMuonDQMOffline.h.

Referenced by dR(), getDeltaVar(), getVar(), and MuonGmtPair().

◆ m_regMu

const l1t::Muon* MuonGmtPair::m_regMu
private

Definition at line 209 of file L1TMuonDQMOffline.h.

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

muon
Definition: MuonCocktails.h:17
MuonGmtPair::gmtCharge
int gmtCharge() const
Definition: L1TMuonDQMOffline.h:200
reco::deltaPhi
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
L1TMuonDQMOffline::kEffPt
Definition: L1TMuonDQMOffline.h:77
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
L1TMuonDQMOffline::kEtaRegionEmtf
Definition: L1TMuonDQMOffline.h:79
l1t::L1Candidate::hwQual
int hwQual() const
Definition: L1Candidate.h:38
MuonGmtPair::m_regMu
const l1t::Muon * m_regMu
Definition: L1TMuonDQMOffline.h:209
L1TMuonDQMOffline::kEffEta
Definition: L1TMuonDQMOffline.h:77
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
L1TMuonDQMOffline::kRes1OverPt
Definition: L1TMuonDQMOffline.h:78
HLT_2018_cff.dEta
dEta
Definition: HLT_2018_cff.py:12289
MuonGmtPair::m_gmtEta
double m_gmtEta
Definition: L1TMuonDQMOffline.h:213
l1t::Muon::phiAtVtx
double phiAtVtx() const
Definition: Muon.h:104
MuonGmtPair::gmtPt
double gmtPt() const
Definition: L1TMuonDQMOffline.h:197
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
L1TMuonDQMOffline::kEtaRegionBmtf
Definition: L1TMuonDQMOffline.h:79
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
MuonGmtPair::m_eta
double m_eta
Definition: L1TMuonDQMOffline.h:216
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HLT_2018_cff.dPhi
dPhi
Definition: HLT_2018_cff.py:12290
L1TMuonDQMOffline::kResCh
Definition: L1TMuonDQMOffline.h:78
MuonGmtPair::m_phi
double m_phi
Definition: L1TMuonDQMOffline.h:217
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
MuonGmtPair::charge
int charge() const
Definition: L1TMuonDQMOffline.h:196
MuonGmtPair::pt
double pt() const
Definition: L1TMuonDQMOffline.h:193
reco::LeafCandidate::charge
int charge() const final
electric charge
Definition: LeafCandidate.h:106
L1TMuonDQMOffline::kResQOverPt
Definition: L1TMuonDQMOffline.h:78
MuonGmtPair::m_muon
const reco::Muon * m_muon
Definition: L1TMuonDQMOffline.h:208
L1TMuonDQMOffline::kEffPhi
Definition: L1TMuonDQMOffline.h:77
l1t::Muon::etaAtVtx
double etaAtVtx() const
Definition: Muon.h:103
L1TMuonDQMOffline::kEtaRegionOmtf
Definition: L1TMuonDQMOffline.h:79
type
type
Definition: HCALResponse.h:21
MuonGmtPair::gmtPhi
double gmtPhi() const
Definition: L1TMuonDQMOffline.h:199
L1TMuonDQMOffline::kResPt
Definition: L1TMuonDQMOffline.h:78
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
L1TMuonDQMOffline::kEtaRegionOut
Definition: L1TMuonDQMOffline.h:79
L1TMuonDQMOffline::kResPhi
Definition: L1TMuonDQMOffline.h:78
MuonGmtPair::m_gmtPhi
double m_gmtPhi
Definition: L1TMuonDQMOffline.h:214
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1TMuonDQMOffline::kResEta
Definition: L1TMuonDQMOffline.h:78
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
MuonGmtPair::gmtEta
double gmtEta() const
Definition: L1TMuonDQMOffline.h:198