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 gmtPt () const
 
 MuonGmtPair (const reco::Muon *muon, const L1MuGMTExtendedCand *gmt)
 
 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 L1MuGMTExtendedCandm_gmt
 
const reco::Muonm_muon
 
double m_phi_bar
 
double m_phi_end
 
edm::ESHandle< Propagatorm_propagatorAlong
 
edm::ESHandle< Propagatorm_propagatorOpposite
 

Detailed Description

Definition at line 75 of file L1TEfficiencyMuons_Offline.h.

Constructor & Destructor Documentation

MuonGmtPair::MuonGmtPair ( const reco::Muon muon,
const L1MuGMTExtendedCand gmt 
)
inline

Definition at line 79 of file L1TEfficiencyMuons_Offline.h.

79  :
80  m_muon(muon), m_gmt(gmt), m_eta(999.), m_phi_bar(999.), m_phi_end(999.) { };
const L1MuGMTExtendedCand * m_gmt
const reco::Muon * m_muon
MuonGmtPair::MuonGmtPair ( const MuonGmtPair muonGmtPair)

Definition at line 29 of file L1TEfficiencyMuons_Offline.cc.

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

29  {
30 
31  m_muon = muonGmtPair.m_muon;
32  m_gmt = muonGmtPair.m_gmt;
33  m_eta = muonGmtPair.m_eta;
34  m_phi_bar = muonGmtPair.m_phi_bar;
35  m_phi_end = muonGmtPair.m_phi_end;
36 
37 }
const L1MuGMTExtendedCand * m_gmt
const reco::Muon * m_muon
MuonGmtPair::~MuonGmtPair ( )
inline

Definition at line 84 of file L1TEfficiencyMuons_Offline.h.

84 { };

Member Function Documentation

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

Definition at line 84 of file L1TEfficiencyMuons_Offline.cc.

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

85 {
86 
87  Cylinder::PositionType pos(0, 0, 0);
89  Cylinder::CylinderPointer myCylinder = Cylinder::build(pos, rot, rho);
90 
91  FreeTrajectoryState recoStart = freeTrajStateMuon(track);
92  TrajectoryStateOnSurface recoProp;
93  recoProp = m_propagatorAlong->propagate(recoStart, *myCylinder);
94  if (!recoProp.isValid()) {
95  recoProp = m_propagatorOpposite->propagate(recoStart, *myCylinder);
96  }
97  return recoProp;
98 
99 }
TkRotation< Scalar > RotationType
Definition: Definitions.h:29
edm::ESHandle< Propagator > m_propagatorOpposite
edm::ESHandle< Propagator > m_propagatorAlong
Definition: DDAxes.h:10
Point3DBase< Scalar, GlobalTag > PositionType
Definition: Definitions.h:30
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef track)
double MuonGmtPair::dR ( )

Definition at line 40 of file L1TEfficiencyMuons_Offline.cc.

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

Referenced by L1TEfficiencyMuons_Offline::getMuonGmtPairs().

40  {
41 
42  float dEta = m_gmt ? (m_gmt->etaValue() - eta()) : 999.;
43  float dPhi = m_gmt ? (m_gmt->phiValue() - phi()) : 999.;
44 
45  float dr = sqrt(dEta*dEta + dPhi*dPhi);
46 
47  return dr;
48 
49 }
float etaValue() const
Definition: L1MuGMTCand.cc:114
float phiValue() const
Definition: L1MuGMTCand.cc:100
const L1MuGMTExtendedCand * m_gmt
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
T sqrt(T t)
Definition: SSEVec.h:48
double MuonGmtPair::eta ( ) const
inline

Definition at line 88 of file L1TEfficiencyMuons_Offline.h.

88 { return m_eta; };
FreeTrajectoryState MuonGmtPair::freeTrajStateMuon ( reco::TrackRef  track)
private

Definition at line 119 of file L1TEfficiencyMuons_Offline.cc.

120 {
121 
122  GlobalPoint innerPoint(track->innerPosition().x(), track->innerPosition().y(), track->innerPosition().z());
123  GlobalVector innerVec (track->innerMomentum().x(), track->innerMomentum().y(), track->innerMomentum().z());
124 
125  FreeTrajectoryState recoStart(innerPoint, innerVec, track->charge(), &*m_BField);
126 
127  return recoStart;
128 
129 }
edm::ESHandle< MagneticField > m_BField
double MuonGmtPair::gmtPt ( ) const
inline

Definition at line 92 of file L1TEfficiencyMuons_Offline.h.

Referenced by L1TEfficiencyMuons_Offline::getMuonGmtPairs().

92 { return m_gmt ? m_gmt->ptValue() : -1.; };
const L1MuGMTExtendedCand * m_gmt
float ptValue() const
Definition: L1MuGMTCand.cc:128
double MuonGmtPair::phi ( void  ) const
inline

Definition at line 89 of file L1TEfficiencyMuons_Offline.h.

void MuonGmtPair::propagate ( edm::ESHandle< MagneticField bField,
edm::ESHandle< Propagator propagatorAlong,
edm::ESHandle< Propagator propagatorOpposite 
)

Definition at line 52 of file L1TEfficiencyMuons_Offline.cc.

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

Referenced by L1TEfficiencyMuons_Offline::getMuonGmtPairs().

54  {
55 
56  m_BField = bField;
57  m_propagatorAlong = propagatorAlong;
58  m_propagatorOpposite = propagatorOpposite;
59 
60  TrackRef standaloneMuon = m_muon->outerTrack();
61 
62  TrajectoryStateOnSurface trajectory;
63  trajectory = cylExtrapTrkSam(standaloneMuon, 500); // track at MB2 radius - extrapolation
64  if (trajectory.isValid()) {
65  m_eta = trajectory.globalPosition().eta();
66  m_phi_bar = trajectory.globalPosition().phi();
67  }
68 
69  trajectory = surfExtrapTrkSam(standaloneMuon, 790); // track at ME2+ plane - extrapolation
70  if (trajectory.isValid()) {
71  m_eta = trajectory.globalPosition().eta();
72  m_phi_end = trajectory.globalPosition().phi();
73  }
74 
75  trajectory = surfExtrapTrkSam(standaloneMuon, -790); // track at ME2- disk - extrapolation
76  if (trajectory.isValid()) {
77  m_eta = trajectory.globalPosition().eta();
78  m_phi_end = trajectory.globalPosition().phi();
79  }
80 
81 }
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

Definition at line 90 of file L1TEfficiencyMuons_Offline.h.

90 { return m_muon->isGlobalMuon() ? m_muon->globalTrack()->pt() : -1; };
bool isGlobalMuon() const
Definition: Muon.h:218
const reco::Muon * m_muon
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:54
TrajectoryStateOnSurface MuonGmtPair::surfExtrapTrkSam ( reco::TrackRef  track,
double  z 
)
private

Definition at line 102 of file L1TEfficiencyMuons_Offline.cc.

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

103 {
104 
105  Plane::PositionType pos(0, 0, z);
107  Plane::PlanePointer myPlane = Plane::build(pos, rot);
108 
109  FreeTrajectoryState recoStart = freeTrajStateMuon(track);
110  TrajectoryStateOnSurface recoProp;
111  recoProp = m_propagatorAlong->propagate(recoStart, *myPlane);
112  if (!recoProp.isValid()) {
113  recoProp = m_propagatorOpposite->propagate(recoStart, *myPlane);
114  }
115  return recoProp;
116 }
edm::ESHandle< Propagator > m_propagatorOpposite
edm::ESHandle< Propagator > m_propagatorAlong
float float float z
static PlanePointer build(Args &&...args)
Definition: Plane.h:36
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef track)

Member Data Documentation

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

Definition at line 110 of file L1TEfficiencyMuons_Offline.h.

double MuonGmtPair::m_eta
private

Definition at line 114 of file L1TEfficiencyMuons_Offline.h.

Referenced by MuonGmtPair().

const L1MuGMTExtendedCand* MuonGmtPair::m_gmt
private

Definition at line 108 of file L1TEfficiencyMuons_Offline.h.

Referenced by MuonGmtPair().

const reco::Muon* MuonGmtPair::m_muon
private

Definition at line 107 of file L1TEfficiencyMuons_Offline.h.

Referenced by MuonGmtPair().

double MuonGmtPair::m_phi_bar
private

Definition at line 115 of file L1TEfficiencyMuons_Offline.h.

Referenced by MuonGmtPair().

double MuonGmtPair::m_phi_end
private

Definition at line 116 of file L1TEfficiencyMuons_Offline.h.

Referenced by MuonGmtPair().

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

Definition at line 111 of file L1TEfficiencyMuons_Offline.h.

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

Definition at line 112 of file L1TEfficiencyMuons_Offline.h.