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 reco::Muon *muon, const l1t::Muon *regMu, const PropagateToMuon &propagator, bool useAtVtxCoord)
 
 MuonGmtPair (const MuonGmtPair &muonGmtPair)
 
MuonGmtPairoperator= (const MuonGmtPair &muonGmtPair)=default
 
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 187 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.

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.

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 };
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T eta() const
Definition: PV3DBase.h:73
double phiAtVtx() const
Definition: Muon.h:104
const l1t::Muon * m_regMu
GlobalPoint globalPosition() const
const reco::Muon * m_muon
double etaAtVtx() const
Definition: Muon.h:103
double phi() const final
momentum azimuthal angle
double eta() const final
momentum pseudorapidity

◆ MuonGmtPair() [2/2]

MuonGmtPair::MuonGmtPair ( const MuonGmtPair muonGmtPair)

Definition at line 55 of file L1TMuonDQMOffline.cc.

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

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 }
const l1t::Muon * m_regMu
const reco::Muon * m_muon

◆ ~MuonGmtPair()

MuonGmtPair::~MuonGmtPair ( )
inline

Definition at line 192 of file L1TMuonDQMOffline.h.

192 {};

Member Function Documentation

◆ charge()

int MuonGmtPair::charge ( ) const
inline

Definition at line 198 of file L1TMuonDQMOffline.h.

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

Referenced by getDeltaVar().

198 { return m_muon->charge(); };
const reco::Muon * m_muon
int charge() const final
electric charge

◆ dR()

double MuonGmtPair::dR ( )

Definition at line 66 of file L1TMuonDQMOffline.cc.

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

Referenced by L1TMuonDQMOffline::getMuonGmtPairs().

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 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
const l1t::Muon * m_regMu
T sqrt(T t)
Definition: SSEVec.h:19

◆ eta()

double MuonGmtPair::eta ( ) const
inline

Definition at line 196 of file L1TMuonDQMOffline.h.

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

Referenced by Particle.Particle::__str__(), datamodel.Object::DeltaR(), Jet.Jet::jetID(), datamodel.Object::p4(), and Jet.Jet::puJetId().

196 { return m_muon->eta(); };
const reco::Muon * m_muon
double eta() const final
momentum pseudorapidity

◆ etaRegion()

L1TMuonDQMOffline::EtaRegion MuonGmtPair::etaRegion ( ) const

◆ getDeltaVar()

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

Definition at line 82 of file L1TMuonDQMOffline.cc.

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().

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 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
double pt() const
double gmtPt() const
double gmtPhi() const
double gmtEta() const
int charge() const
int gmtCharge() const

◆ getVar()

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

◆ gmtCharge()

int MuonGmtPair::gmtCharge ( ) const
inline

Definition at line 202 of file L1TMuonDQMOffline.h.

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

Referenced by getDeltaVar().

202 { return m_regMu ? m_regMu->charge() : -5; };
const l1t::Muon * m_regMu
int charge() const final
electric charge

◆ gmtEta()

double MuonGmtPair::gmtEta ( ) const
inline

Definition at line 200 of file L1TMuonDQMOffline.h.

References m_gmtEta, and m_regMu.

Referenced by getDeltaVar().

200 { return m_regMu ? m_gmtEta : -5.; };
const l1t::Muon * m_regMu

◆ gmtPhi()

double MuonGmtPair::gmtPhi ( ) const
inline

Definition at line 201 of file L1TMuonDQMOffline.h.

References m_gmtPhi, and m_regMu.

Referenced by getDeltaVar().

201 { return m_regMu ? m_gmtPhi : -5.; };
const l1t::Muon * m_regMu

◆ gmtPt()

double MuonGmtPair::gmtPt ( ) const
inline

Definition at line 199 of file L1TMuonDQMOffline.h.

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

Referenced by getDeltaVar().

199 { return m_regMu ? m_regMu->pt() : -1.; };
double pt() const final
transverse momentum
const l1t::Muon * m_regMu

◆ gmtQual()

int MuonGmtPair::gmtQual ( ) const
inline

Definition at line 203 of file L1TMuonDQMOffline.h.

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

203 { return m_regMu ? m_regMu->hwQual() : -1; };
int hwQual() const
Definition: L1Candidate.h:38
const l1t::Muon * m_regMu

◆ operator=()

MuonGmtPair& MuonGmtPair::operator= ( const MuonGmtPair muonGmtPair)
default

◆ phi()

double MuonGmtPair::phi ( void  ) const
inline

Definition at line 197 of file L1TMuonDQMOffline.h.

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

Referenced by Particle.Particle::__str__(), datamodel.Object::DeltaR(), datamodel.Object::p4(), and ntupleDataFormat.Track::phiPull().

197 { return m_muon->phi(); };
const reco::Muon * m_muon
double phi() const final
momentum azimuthal angle

◆ pt()

double MuonGmtPair::pt ( ) const
inline

Member Data Documentation

◆ m_eta

double MuonGmtPair::m_eta
private

Definition at line 218 of file L1TMuonDQMOffline.h.

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

◆ m_gmtEta

double MuonGmtPair::m_gmtEta
private

Definition at line 215 of file L1TMuonDQMOffline.h.

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

◆ m_gmtPhi

double MuonGmtPair::m_gmtPhi
private

Definition at line 216 of file L1TMuonDQMOffline.h.

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

◆ m_muon

const reco::Muon* MuonGmtPair::m_muon
private

Definition at line 210 of file L1TMuonDQMOffline.h.

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

◆ m_phi

double MuonGmtPair::m_phi
private

Definition at line 219 of file L1TMuonDQMOffline.h.

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

◆ m_regMu

const l1t::Muon* MuonGmtPair::m_regMu
private

Definition at line 211 of file L1TMuonDQMOffline.h.

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