CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
tmtt::ConverterToTTTrack Class Reference

#include <ConverterToTTTrack.h>

Public Member Functions

 ConverterToTTTrack (const Settings *settings)
 
TTTrack< Ref_Phase2TrackerDigi_makeTTTrack (const L1trackBase *trk, unsigned int iPhiSec, unsigned int iEtaReg) const
 

Private Member Functions

std::vector< TTStubRefstubRefs (const L1trackBase *trk) const
 

Private Attributes

float invPtToInvR_
 
const Settingssettings_
 

Detailed Description

Definition at line 18 of file ConverterToTTTrack.h.

Constructor & Destructor Documentation

◆ ConverterToTTTrack()

tmtt::ConverterToTTTrack::ConverterToTTTrack ( const Settings settings)
inline

Definition at line 21 of file ConverterToTTTrack.h.

21 : settings_(settings), invPtToInvR_(settings->invPtToInvR()) {}

Member Function Documentation

◆ makeTTTrack()

TTTrack< Ref_Phase2TrackerDigi_ > tmtt::ConverterToTTTrack::makeTTTrack ( const L1trackBase trk,
unsigned int  iPhiSec,
unsigned int  iEtaReg 
) const

Definition at line 10 of file ConverterToTTTrack.cc.

References tmtt::L1fittedTrack::accepted(), tmtt::L1fittedTrack::chi2rphi(), tmtt::L1fittedTrack::chi2rz(), d0, tmtt::L1fittedTrack::d0(), tmtt::L1fittedTrack::hitPattern(), HLT_2022v12_cff::magneticField, beam_dqm_sourceclient-live_cfg::mva, tmtt::L1fittedTrack::nHelixParam(), HcalResponse_cfi::nPar, tmtt::L1trackBase::phi0(), tmtt::L1trackBase::qOverPt(), trklet::rinv(), tmtt::L1fittedTrack::tanLambda(), HLT_2022v12_cff::track, HLTMuonOfflineAnalyzer_cfi::z0, and tmtt::L1fittedTrack::z0().

12  {
13  unsigned int nPar, hitPattern;
14  double d0, z0, tanL, chi2rphi, chi2rz;
15 
16  const L1fittedTrack* fitTrk = dynamic_cast<const L1fittedTrack*>(trk);
17 
18  // Handle variables that differ for L1fittedTrack & L1track3D
19  if (fitTrk == nullptr) {
20  // This is an L1track3D type (track before fit)
21  nPar = 4; // Before fit, TMTT algorithm assumes 4 helix params
22  // Set to zero variables that are unavailable for this track type.
23  hitPattern = 0;
24  d0 = 0.;
25  z0 = 0;
26  tanL = 0;
27  chi2rphi = 0.;
28  chi2rz = 0;
29  } else {
30  // This is an L1fittedTrack type (track after fit)
31  if (not fitTrk->accepted())
32  throw cms::Exception("LogicError") << "ConverterToTTTrack ERROR: requested to convert invalid L1fittedTrack";
33  nPar = fitTrk->nHelixParam(); // Number of helix parameters in track fit
34  hitPattern = fitTrk->hitPattern();
35  d0 = fitTrk->d0();
36  z0 = fitTrk->z0();
37  tanL = fitTrk->tanLambda();
38  chi2rphi = fitTrk->chi2rphi();
39  chi2rz = fitTrk->chi2rz();
40  }
41 
42  const double& rinv = invPtToInvR_ * trk->qOverPt();
43  const double& phi0 = trk->phi0();
44  constexpr double mva = -1.; // MVA quality flags not yet set.
45  const double& magneticField = settings_->magneticField();
46 
48  rinv, phi0, tanL, z0, d0, chi2rphi, chi2rz, mva, mva, mva, hitPattern, nPar, magneticField);
49 
50  // Set references to stubs on this track.
51  std::vector<TTStubRef> ttstubrefs = this->stubRefs(trk);
52  track.setStubRefs(ttstubrefs);
53 
54  // Note which (eta,phi) sector this track was reconstructed in.
55  track.setPhiSector(iPhiSec);
56  track.setEtaSector(iEtaReg);
57 
58  track.setStubPtConsistency(-1); // not yet filled.
59 
60  return track;
61  }
float magneticField() const
Definition: Settings.h:401
static constexpr float d0
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
double rinv(double phi1, double phi2, double r1, double r2)
Definition: Util.h:49
std::vector< TTStubRef > stubRefs(const L1trackBase *trk) const

◆ stubRefs()

std::vector< TTStubRef > tmtt::ConverterToTTTrack::stubRefs ( const L1trackBase trk) const
private

Definition at line 65 of file ConverterToTTTrack.cc.

References alignCSCRings::s, and tmtt::L1trackBase::stubs().

65  {
66  std::vector<TTStubRef> ttstubrefs;
67  const std::vector<Stub*>& stubs = trk->stubs();
68  for (Stub* s : stubs) {
69  const TTStubRef& ref = s->ttStubRef();
70  ttstubrefs.push_back(ref);
71  }
72  return ttstubrefs;
73  }

Member Data Documentation

◆ invPtToInvR_

float tmtt::ConverterToTTTrack::invPtToInvR_
private

Definition at line 34 of file ConverterToTTTrack.h.

◆ settings_

const Settings* tmtt::ConverterToTTTrack::settings_
private

Definition at line 33 of file ConverterToTTTrack.h.