CMS 3D CMS Logo

Functions
L1TkElectronTrackMatchAlgo Namespace Reference

Functions

GlobalPoint calorimeterPosition (double phi, double eta, double e)
 
double deltaEta (const GlobalPoint &epos, const edm::Ptr< L1TTTrackType > &pTrk)
 
double deltaPhi (const GlobalPoint &epos, const edm::Ptr< L1TTTrackType > &pTrk)
 
double deltaR (const GlobalPoint &epos, const edm::Ptr< L1TTTrackType > &pTrk)
 
void doMatch (BXVector< l1t::EGamma >::const_iterator egIter, const edm::Ptr< L1TTTrackType > &pTrk, double &dph, double &dr, double &deta)
 
void doMatch (const GlobalPoint &epos, const edm::Ptr< L1TTTrackType > &pTrk, double &dph, double &dr, double &deta)
 
void doMatch (l1t::EGammaBxCollection::const_iterator egIter, const edm::Ptr< L1TTTrackType > &pTrk, double &dph, double &dr, double &deta)
 

Function Documentation

◆ calorimeterPosition()

GlobalPoint L1TkElectronTrackMatchAlgo::calorimeterPosition ( double  phi,
double  eta,
double  e 
)

Definition at line 74 of file L1TkElectronTrackMatchAlgo.cc.

74  {
75  double x = 0.;
76  double y = 0.;
77  double z = 0.;
78  double depth = 0.89 * (7.7 + log(e));
79  double theta = 2 * atan(exp(-1 * eta));
80  double r = 0;
81  if (fabs(eta) > max_eb_eta) {
82  double ecalZ = max_eb_z * fabs(eta) / eta;
83 
84  r = ecalZ / cos(2 * atan(exp(-1 * eta))) + depth;
85  x = r * cos(phi) * sin(theta);
86  y = r * sin(phi) * sin(theta);
87  z = r * cos(theta);
88  } else {
89  double zface = sqrt(cos(theta) * cos(theta) / (1 - cos(theta) * cos(theta)) * eb_rperp * eb_rperp);
90  r = sqrt(eb_rperp * eb_rperp + zface * zface) + depth;
91  x = r * cos(phi) * sin(theta);
92  y = r * sin(phi) * sin(theta);
93  z = r * cos(theta);
94  }
95  GlobalPoint pos(x, y, z);
96  return pos;
97  }

References funct::cos(), LEDCalibrationChannels::depth, MillePedeFileConverter_cfg::e, eb_rperp, PVValHelper::eta, JetChargeProducer_cfi::exp, dqm-mbProfile::log, max_eb_eta, max_eb_z, alignCSCRings::r, funct::sin(), mathSSE::sqrt(), and theta().

Referenced by doMatch().

◆ deltaEta()

double L1TkElectronTrackMatchAlgo::deltaEta ( const GlobalPoint epos,
const edm::Ptr< L1TTTrackType > &  pTrk 
)

Definition at line 59 of file L1TkElectronTrackMatchAlgo.cc.

59  {
60  double corr_eta = 999.0;
61  double er = epos.perp();
62  double ez = epos.z();
63  double z0 = pTrk->POCA().z();
64  double theta = 0.0;
65  if (ez >= 0)
66  theta = atan(er / fabs(ez - z0));
67  else
68  theta = M_PI - atan(er / fabs(ez - z0));
69  corr_eta = -1.0 * log(tan(theta / 2.0));
70  double deleta = (corr_eta - pTrk->momentum().eta());
71  return deleta;
72  }

References dqm-mbProfile::log, M_PI, PV3DBase< T, PVType, FrameType >::perp(), funct::tan(), theta(), PV3DBase< T, PVType, FrameType >::z(), and HLTMuonOfflineAnalyzer_cfi::z0.

Referenced by deltaR(), and doMatch().

◆ deltaPhi()

double L1TkElectronTrackMatchAlgo::deltaPhi ( const GlobalPoint epos,
const edm::Ptr< L1TTTrackType > &  pTrk 
)

Definition at line 41 of file L1TkElectronTrackMatchAlgo.cc.

41  {
42  double er = epos.perp();
43  double curv = pTrk->rInv();
44 
45  double dphi_curv = (asin(er * curv / (2.0)));
46  double trk_phi_ecal = reco::deltaPhi(pTrk->momentum().phi(), dphi_curv);
47 
48  double dphi = reco::deltaPhi(trk_phi_ecal, epos.phi());
49  return dphi;
50  }

References reco::deltaPhi(), PV3DBase< T, PVType, FrameType >::perp(), and PV3DBase< T, PVType, FrameType >::phi().

Referenced by deltaR(), and doMatch().

◆ deltaR()

double L1TkElectronTrackMatchAlgo::deltaR ( const GlobalPoint epos,
const edm::Ptr< L1TTTrackType > &  pTrk 
)

Definition at line 52 of file L1TkElectronTrackMatchAlgo.cc.

52  {
53  //double dPhi = fabs(reco::deltaPhi(epos.phi(), pTrk->momentum().phi()));
54  double dPhi = L1TkElectronTrackMatchAlgo::deltaPhi(epos, pTrk);
55  double dEta = deltaEta(epos, pTrk);
56  return sqrt(dPhi * dPhi + dEta * dEta);
57  }

References deltaEta(), deltaPhi(), HLT_2018_cff::dEta, HLT_2018_cff::dPhi, and mathSSE::sqrt().

Referenced by doMatch().

◆ doMatch() [1/3]

void L1TkElectronTrackMatchAlgo::doMatch ( BXVector< l1t::EGamma >::const_iterator  egIter,
const edm::Ptr< L1TTTrackType > &  pTrk,
double &  dph,
double &  dr,
double &  deta 
)

◆ doMatch() [2/3]

void L1TkElectronTrackMatchAlgo::doMatch ( const GlobalPoint epos,
const edm::Ptr< L1TTTrackType > &  pTrk,
double &  dph,
double &  dr,
double &  deta 
)

Definition at line 35 of file L1TkElectronTrackMatchAlgo.cc.

35  {
36  dph = L1TkElectronTrackMatchAlgo::deltaPhi(epos, pTrk);
38  deta = L1TkElectronTrackMatchAlgo::deltaEta(epos, pTrk);
39  }

References deltaEta(), deltaPhi(), deltaR(), and flavorHistoryFilter_cfi::dr.

◆ doMatch() [3/3]

void L1TkElectronTrackMatchAlgo::doMatch ( l1t::EGammaBxCollection::const_iterator  egIter,
const edm::Ptr< L1TTTrackType > &  pTrk,
double &  dph,
double &  dr,
double &  deta 
)

Definition at line 24 of file L1TkElectronTrackMatchAlgo.cc.

28  {
29  GlobalPoint egPos = L1TkElectronTrackMatchAlgo::calorimeterPosition(egIter->phi(), egIter->eta(), egIter->energy());
30  dph = L1TkElectronTrackMatchAlgo::deltaPhi(egPos, pTrk);
32  deta = L1TkElectronTrackMatchAlgo::deltaEta(egPos, pTrk);
33  }

References calorimeterPosition(), deltaEta(), deltaPhi(), deltaR(), and flavorHistoryFilter_cfi::dr.

L1TkElectronTrackMatchAlgo::deltaPhi
double deltaPhi(const GlobalPoint &epos, const edm::Ptr< L1TTTrackType > &pTrk)
Definition: L1TkElectronTrackMatchAlgo.cc:41
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
reco::deltaPhi
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
pos
Definition: PixelAliasList.h:18
L1TkElectronTrackMatchAlgo::deltaR
double deltaR(const GlobalPoint &epos, const edm::Ptr< L1TTTrackType > &pTrk)
Definition: L1TkElectronTrackMatchAlgo.cc:52
HLT_2018_cff.dEta
dEta
Definition: HLT_2018_cff.py:12289
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
spr::deltaEta
static const double deltaEta
Definition: CaloConstants.h:8
PVValHelper::eta
Definition: PVValidationHelpers.h:69
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
vertices_cff.x
x
Definition: vertices_cff.py:29
HLT_2018_cff.dPhi
dPhi
Definition: HLT_2018_cff.py:12290
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
Point3DBase< float, GlobalTag >
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
L1TkElectronTrackMatchAlgo::deltaEta
double deltaEta(const GlobalPoint &epos, const edm::Ptr< L1TTTrackType > &pTrk)
Definition: L1TkElectronTrackMatchAlgo.cc:59
PVValHelper::phi
Definition: PVValidationHelpers.h:68
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
alignCSCRings.r
r
Definition: alignCSCRings.py:93
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
L1TkElectronTrackMatchAlgo::calorimeterPosition
GlobalPoint calorimeterPosition(double phi, double eta, double e)
Definition: L1TkElectronTrackMatchAlgo.cc:74
detailsBasic3DVector::y
float float y
Definition: extBasic3DVector.h:14
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37