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)
 
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::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(), PropagateToMuon::extrapolate(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), m_eta, m_gmtEta, m_gmtPhi, m_muon, m_phi, m_regMu, PV3DBase< T, PVType, FrameType >::phi(), reco::LeafCandidate::phi(), and l1t::Muon::phiAtVtx().

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

Definition at line 190 of file L1TMuonDQMOffline.h.

References HGC3DClusterGenMatchSelector_cfi::dR.

190 {};

Member Function Documentation

int MuonGmtPair::charge ( ) const
inline

Definition at line 196 of file L1TMuonDQMOffline.h.

Referenced by getDeltaVar().

196 { return m_muon->charge(); };
int charge() const final
electric charge
const reco::Muon * m_muon
double MuonGmtPair::dR ( )

Definition at line 66 of file L1TMuonDQMOffline.cc.

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

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
double MuonGmtPair::eta ( ) const
inline

Definition at line 194 of file L1TMuonDQMOffline.h.

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

194 { return m_muon->eta(); };
double eta() const final
momentum pseudorapidity
const reco::Muon * m_muon
L1TMuonDQMOffline::EtaRegion MuonGmtPair::etaRegion ( ) const
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
type
Definition: HCALResponse.h:21
double gmtPt() const
int gmtCharge() const
double gmtPhi() const
int charge() const
double pt() const
double gmtEta() const
double MuonGmtPair::getVar ( const L1TMuonDQMOffline::EffType  type) const
int MuonGmtPair::gmtCharge ( ) const
inline

Definition at line 200 of file L1TMuonDQMOffline.h.

Referenced by getDeltaVar().

200 { return m_regMu ? m_regMu->charge() : -5; };
int charge() const final
electric charge
const l1t::Muon * m_regMu
double MuonGmtPair::gmtEta ( ) const
inline

Definition at line 198 of file L1TMuonDQMOffline.h.

Referenced by getDeltaVar().

198 { return m_regMu ? m_gmtEta : -5.; };
const l1t::Muon * m_regMu
double MuonGmtPair::gmtPhi ( ) const
inline

Definition at line 199 of file L1TMuonDQMOffline.h.

Referenced by getDeltaVar().

199 { return m_regMu ? m_gmtPhi : -5.; };
const l1t::Muon * m_regMu
double MuonGmtPair::gmtPt ( ) const
inline

Definition at line 197 of file L1TMuonDQMOffline.h.

Referenced by getDeltaVar().

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

Definition at line 201 of file L1TMuonDQMOffline.h.

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

Definition at line 195 of file L1TMuonDQMOffline.h.

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

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

Member Data Documentation

double MuonGmtPair::m_eta
private

Definition at line 216 of file L1TMuonDQMOffline.h.

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

double MuonGmtPair::m_gmtEta
private

Definition at line 213 of file L1TMuonDQMOffline.h.

Referenced by dR(), and MuonGmtPair().

double MuonGmtPair::m_gmtPhi
private

Definition at line 214 of file L1TMuonDQMOffline.h.

Referenced by dR(), and MuonGmtPair().

const reco::Muon* MuonGmtPair::m_muon
private

Definition at line 208 of file L1TMuonDQMOffline.h.

Referenced by MuonGmtPair().

double MuonGmtPair::m_phi
private

Definition at line 217 of file L1TMuonDQMOffline.h.

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

const l1t::Muon* MuonGmtPair::m_regMu
private

Definition at line 209 of file L1TMuonDQMOffline.h.

Referenced by dR(), and MuonGmtPair().