CMS 3D CMS Logo

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

#include <Stub.h>

Public Types

enum  DigiStage {
  DigiStage::NONE, DigiStage::GP, DigiStage::HT, DigiStage::SF,
  DigiStage::TF
}
 

Public Member Functions

float alpha () const
 
const TPassocTP () const
 
std::array< const TP *, 2 > assocTPofCluster () const
 
const std::set< const TP * > & assocTPs () const
 
bool barrel () const
 
float bend () const
 
float bendCut () const
 
float bendCutInFrontend () const
 
float bendInFrontend () const
 
void calcQoverPtrange ()
 
const DigitalStubdigitalStub () const
 
void digitize (unsigned int iPhiSec, DigiStage digiStep)
 
float dphiOverBend () const
 
float eta () const
 
void fillTruth (const std::map< edm::Ptr< TrackingParticle >, const TP *> &translateTP, const edm::Handle< TTStubAssMap > &mcTruthTTStubHandle, const edm::Handle< TTClusterAssMap > &mcTruthTTClusterHandle)
 
bool frontendPass () const
 
bool genuine () const
 
std::array< bool, 2 > genuineCluster () const
 
unsigned int index () const
 
unsigned int iphi () const
 
unsigned int layerId () const
 
unsigned int layerIdReduced () const
 
std::array< float, 2 > localU_cluster () const
 
std::array< float, 2 > localV_cluster () const
 
unsigned int max_qOverPt_bin () const
 
unsigned int min_qOverPt_bin () const
 
unsigned int nStrips () const
 
float numMergedBend () const
 
bool operator== (const Stub &stubOther)
 
float phi () const
 
float phiDiff (float rad, float Pt) const
 
bool psModule () const
 
float qOverPt () const
 
float qOverPtcut () const
 
float qOverPtOverBend () const
 
float r () const
 
void setDigitizeWarningsOn (bool newVal)
 
float sigmaPar () const
 
float sigmaPerp () const
 
float sigmaR () const
 
float sigmaZ () const
 
float stripLength () const
 
float stripPitch () const
 
 Stub (const Settings *settings, unsigned int idStub, double phi, double r, double z, double bend, unsigned int iphi, double alpha, unsigned int layerId, unsigned int iPhiSec, bool psModule, bool barrel, bool tiltedBarrel, float stripPitch, float stripLength, unsigned int nStrips)
 
 Stub (const TTStubRef &ttStubRef, unsigned int index_in_vStubs, const Settings *settings, const TrackerTopology *trackerTopology, const TrackerModule *trackerModule, const DegradeBend *degradeBend, const StubKiller *stubKiller)
 
bool stubFailedDegradeWindow () const
 
float theta () const
 
float tiltAngle () const
 
bool tiltedBarrel () const
 
const TrackerModuletrackerModule () const
 
float trkPhiAtR (float rad) const
 
float trkPhiAtRcut (float rad) const
 
const TTStubRefttStubRef () const
 
float z () const
 

Private Member Functions

double approxB ()
 
void calcDphiOverBend ()
 
void degradeResolution (float bend, float &degradedBend, unsigned int &num) const
 
void setFrontend (const StubKiller *stubKiller)
 
void setTrackerModule (const TrackerGeometry *trackerGeometry, const TrackerTopology *trackerTopology, const DetId &detId)
 

Private Attributes

float alpha_
 
const TPassocTP_
 
std::array< const TP *, 2 > assocTPofCluster_
 
std::set< const TP * > assocTPs_
 
bool barrel_
 
float bend_
 
float bendInFrontend_
 
const DegradeBenddegradeBend_
 
std::unique_ptr< DigitalStubdigitalStub_
 
bool digitizeWarningsOn_
 
float dphiOverBend_
 
bool frontendPass_
 
unsigned int index_in_vStubs_
 
const float invRoot12 = sqrt(1. / 12.)
 
unsigned int iphi_
 
DigiStage lastDigiStep_
 
unsigned int layerId_
 
unsigned int layerIdReduced_
 
std::array< float, 2 > localU_cluster_
 
std::array< float, 2 > localV_cluster_
 
unsigned int max_qOverPt_bin_
 
unsigned int min_qOverPt_bin_
 
unsigned int nStrips_
 
unsigned int numMergedBend_
 
float phi_
 
bool psModule_
 
float r_
 
const float rejectedStubBend_ = 99999.
 
const Settingssettings_
 
float stripLength_
 
float stripPitch_
 
bool stubFailedDegradeWindow_
 
float tiltAngle_
 
bool tiltedBarrel_
 
const TrackerModuletrackerModule_
 
TTStubRef ttStubRef_
 
float z_
 

Detailed Description

Definition at line 43 of file Stub.h.

Member Enumeration Documentation

◆ DigiStage

enum tmtt::Stub::DigiStage
strong
Enumerator
NONE 
GP 
HT 
SF 
TF 

Definition at line 89 of file Stub.h.

89 { NONE, GP, HT, SF, TF };
Definition: TkAlStyle.h:43

Constructor & Destructor Documentation

◆ Stub() [1/2]

tmtt::Stub::Stub ( const Settings settings,
unsigned int  idStub,
double  phi,
double  r,
double  z,
double  bend,
unsigned int  iphi,
double  alpha,
unsigned int  layerId,
unsigned int  iPhiSec,
bool  psModule,
bool  barrel,
bool  tiltedBarrel,
float  stripPitch,
float  stripLength,
unsigned int  nStrips 
)

Definition at line 21 of file Stub.cc.

37  : index_in_vStubs_(idStub), // A unique ID to label the stub.
38  phi_(phi),
39  r_(r),
40  z_(z),
41  bend_(bend),
42  iphi_(iphi),
43  alpha_(alpha),
44  digitalStub_(std::make_unique<DigitalStub>(settings, r, phi, z, iPhiSec)),
51  barrel_(barrel),
float stripLength_
Definition: Stub.h:285
unsigned int layerId() const
Definition: Stub.h:198
float r() const
Definition: Stub.h:108
float bend() const
Definition: Stub.h:126
unsigned int nStrips() const
Definition: Stub.h:209
std::unique_ptr< DigitalStub > digitalStub_
Definition: Stub.h:269
unsigned int index_in_vStubs_
Definition: Stub.h:235
unsigned int iphi_
Definition: Stub.h:251
unsigned int nStrips_
Definition: Stub.h:286
unsigned int layerId_
Definition: Stub.h:281
float alpha() const
Definition: Stub.h:119
float z() const
Definition: Stub.h:109
float r_
Definition: Stub.h:240
bool psModule_
Definition: Stub.h:287
bool barrel_
Definition: Stub.h:288
static unsigned int calcLayerIdReduced(unsigned int layerId)
float alpha_
Definition: Stub.h:252
bool barrel() const
Definition: Stub.h:201
float z_
Definition: Stub.h:241
float phi() const
Definition: Stub.h:107
bool tiltedBarrel() const
Definition: Stub.h:203
float phi_
Definition: Stub.h:239
float stripPitch_
Definition: Stub.h:284
unsigned int layerIdReduced_
Definition: Stub.h:282
float bend_
Definition: Stub.h:242
unsigned int iphi() const
Definition: Stub.h:115
bool tiltedBarrel_
Definition: Stub.h:289
bool psModule() const
Definition: Stub.h:196
float stripLength() const
Definition: Stub.h:207
float stripPitch() const
Definition: Stub.h:205

◆ Stub() [2/2]

tmtt::Stub::Stub ( const TTStubRef ttStubRef,
unsigned int  index_in_vStubs,
const Settings settings,
const TrackerTopology trackerTopology,
const TrackerModule trackerModule,
const DegradeBend degradeBend,
const StubKiller stubKiller 
)

Definition at line 56 of file Stub.cc.

References alpha_, assocTPofCluster_, barrel(), bend_, bendInFrontend_, calcDphiOverBend(), calcQoverPtrange(), TTStub< T >::clusterRef(), tmtt::Settings::degradeBendRes(), degradeResolution(), nano_mu_digi_cff::float, edm::Ref< C, T, F >::get(), iphi_, Topology::localPosition(), localU_cluster_, localV_cluster_, nStrips(), numMergedBend_, tmtt::TrackerModule::outerModuleAtSmallerR(), phi_, psModule(), r_, tmtt::TrackerModule::sensorWidth(), setFrontend(), tmtt::TrackerModule::specDet(), tmtt::TrackerModule::specTopol(), GeomDet::surface(), Surface::toGlobal(), trackerModule_, ttStubRef_, and z_.

64  settings_(settings),
65  index_in_vStubs_(index_in_vStubs),
66  assocTP_(nullptr), // Initialize in case job is using no MC truth info.
68  digitizeWarningsOn_(true),
69  trackerModule_(trackerModule), // Info about tracker module containing stub
70  degradeBend_(degradeBend), // Used to degrade stub bend information.
71  // Module related variables (need to be stored for Hybrid)
81  // Get coordinates of stub.
83 
84  const PixelGeomDetUnit* specDet = trackerModule_->specDet();
85  const PixelTopology* specTopol = trackerModule_->specTopol();
86  MeasurementPoint measurementPoint = ttStubRef_->clusterRef(0)->findAverageLocalCoordinatesCentered();
87  LocalPoint clustlp = specTopol->localPosition(measurementPoint);
88  GlobalPoint pos = specDet->surface().toGlobal(clustlp);
89 
90  phi_ = pos.phi();
91  r_ = pos.perp();
92  z_ = pos.z();
93 
94  // Get the coordinates of the two clusters that make up this stub, measured in units of strip pitch, and measured
95  // in the local frame of the sensor. They have a granularity of 0.5*pitch.
96  for (unsigned int iClus = 0; iClus <= 1; iClus++) { // Loop over two clusters in stub.
97  localU_cluster_[iClus] = ttStubP->clusterRef(iClus)->findAverageLocalCoordinatesCentered().x();
98  localV_cluster_[iClus] = ttStubP->clusterRef(iClus)->findAverageLocalCoordinatesCentered().y();
99  }
100 
101  // Get location of stub in module in units of strip number (or pixel number along finest granularity axis).
102  // Range from 0 to (nStrips - 1) inclusive.
103  // N.B. Since iphi is integer, this degrades the granularity by a factor 2. This seems silly, but track fit wants it.
104  iphi_ = localU_cluster_[0]; // granularity 1*strip (unclear why we want to degrade it ...)
105 
106  // Determine alpha correction for non-radial strips in endcap 2S modules.
107  // (If true hit at larger r than stub r by deltaR, then stub phi needs correcting by +alpha*deltaR).
108  alpha_ = 0.;
109  if ((not barrel()) && (not psModule())) {
110  float fracPosInModule = (float(iphi_) - 0.5 * float(nStrips())) / float(nStrips());
111  float phiRelToModule = trackerModule_->sensorWidth() * fracPosInModule / r_;
112  if (z_ < 0)
113  phiRelToModule *= -1;
115  phiRelToModule *= -1; // Module flipped.
116  // If true hit at larger r than stub r by deltaR, then stub phi needs correcting by +alpha*deltaR.
117  alpha_ = -phiRelToModule / r_;
118  }
119 
120  // Calculate variables giving ratio of track intercept angle to stub bend.
121  this->calcDphiOverBend();
122 
123  // Get stub bend that is available in front-end electronics, where bend is displacement between
124  // two hits in stubs in units of strip pitch.
125  bendInFrontend_ = ttStubRef_->bendFE();
126  if ((not barrel()) && pos.z() > 0)
127  bendInFrontend_ *= -1;
128  if (barrel())
129  bendInFrontend_ *= -1;
130 
131  // Get stub bend that is available in off-detector electronics, allowing for degredation of
132  // bend resolution due to bit encoding by FE chip if required.
133  numMergedBend_ = 1; // Number of bend values merged into single degraded one.
134  if (settings->degradeBendRes() == 2) {
135  float degradedBend; // degraded bend
136  // This returns values of degradedBend & numMergedBend_
137  this->degradeResolution(bendInFrontend_, degradedBend, numMergedBend_);
138  bend_ = degradedBend;
139  } else if (settings->degradeBendRes() == 1) {
140  bend_ = ttStubRef_->bendBE(); // Degraded bend from official CMS recipe.
141  if ((not barrel()) && pos.z() > 0)
142  bend_ *= -1;
143  if (barrel())
144  bend_ *= -1;
145  } else {
147  }
148 
149  // Fill frontendPass_ flag, indicating if frontend readout electronics will output this stub.
150  this->setFrontend(stubKiller);
151 
152  // Calculate bin range along q/Pt axis of r-phi Hough transform array consistent with bend of this stub.
153  this->calcQoverPtrange();
154 
155  // Initialize truth info to false in case job is using no MC truth info.
156  for (unsigned int iClus = 0; iClus <= 1; iClus++) {
157  assocTPofCluster_[iClus] = nullptr;
158  }
159  }
const edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > & clusterRef(unsigned int hitStackMember) const
Clusters composing the Stub – see https://twiki.cern.ch/twiki/bin/viewauth/CMS/SLHCTrackerTriggerSWT...
Definition: TTStub.h:150
float stripLength_
Definition: Stub.h:285
float stripLength() const
Definition: TrackerModule.h:85
DigiStage lastDigiStep_
Definition: Stub.h:270
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
unsigned int nStrips() const
Definition: Stub.h:209
const Settings * settings_
Definition: Stub.h:233
bool outerModuleAtSmallerR() const
Definition: TrackerModule.h:62
unsigned int index_in_vStubs_
Definition: Stub.h:235
unsigned int iphi_
Definition: Stub.h:251
unsigned int nStrips_
Definition: Stub.h:286
unsigned int layerId_
Definition: Stub.h:281
std::array< const TP *, 2 > assocTPofCluster_
Definition: Stub.h:267
unsigned int layerId() const
Definition: TrackerModule.h:67
bool psModule() const
Definition: TrackerModule.h:64
const TTStubRef & ttStubRef() const
Definition: Stub.h:75
const TrackerModule * trackerModule() const
Definition: Stub.h:78
const DegradeBend * degradeBend_
Definition: Stub.h:277
unsigned int numMergedBend_
Definition: Stub.h:261
float r_
Definition: Stub.h:240
std::array< float, 2 > localV_cluster_
Definition: Stub.h:249
bool psModule_
Definition: Stub.h:287
void calcQoverPtrange()
Definition: Stub.cc:163
bool barrel_
Definition: Stub.h:288
float alpha_
Definition: Stub.h:252
float tiltAngle() const
Definition: TrackerModule.h:75
float tiltAngle_
Definition: Stub.h:283
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
bool barrel() const
Definition: Stub.h:201
float z_
Definition: Stub.h:241
const PixelTopology * specTopol() const
Definition: TrackerModule.h:51
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
void setFrontend(const StubKiller *stubKiller)
Definition: Stub.cc:267
std::array< float, 2 > localU_cluster_
Definition: Stub.h:248
bool digitizeWarningsOn_
Definition: Stub.h:271
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
float phi_
Definition: Stub.h:239
const TP * assocTP_
Definition: Stub.h:264
TTStubRef ttStubRef_
Definition: Stub.h:231
void calcDphiOverBend()
Definition: Stub.cc:314
float stripPitch_
Definition: Stub.h:284
unsigned int layerIdReduced_
Definition: Stub.h:282
bool barrel() const
Definition: TrackerModule.h:65
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
float bend_
Definition: Stub.h:242
unsigned int nStrips() const
Definition: TrackerModule.h:81
const TrackerModule * trackerModule_
Definition: Stub.h:274
bool tiltedBarrel_
Definition: Stub.h:289
unsigned int layerIdReduced() const
Definition: TrackerModule.h:69
const PixelGeomDetUnit * specDet() const
Definition: TrackerModule.h:50
float sensorWidth() const
Definition: TrackerModule.h:77
bool psModule() const
Definition: Stub.h:196
float bendInFrontend_
Definition: Stub.h:259
bool tiltedBarrel() const
Definition: TrackerModule.h:73
void degradeResolution(float bend, float &degradedBend, unsigned int &num) const
Definition: Stub.cc:248
float stripPitch() const
Definition: TrackerModule.h:83

Member Function Documentation

◆ alpha()

float tmtt::Stub::alpha ( void  ) const
inline

Definition at line 119 of file Stub.h.

References alpha_.

Referenced by tmtt::KFParamsComb::matrixV(), and tmtt::KFbase::residual().

119 { return alpha_; }
float alpha_
Definition: Stub.h:252

◆ approxB()

double tmtt::Stub::approxB ( )
private

Definition at line 304 of file Stub.cc.

References funct::abs(), tmtt::Settings::bApprox_gradient(), tmtt::Settings::bApprox_intercept(), barrel(), r_, settings_, tiltedBarrel(), and z_.

Referenced by calcDphiOverBend().

304  {
305  if (tiltedBarrel()) {
307  } else {
308  return barrel() ? 1 : std::abs(z_) / r_;
309  }
310  }
const Settings * settings_
Definition: Stub.h:233
double bApprox_intercept() const
Definition: Settings.h:105
float r_
Definition: Stub.h:240
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double bApprox_gradient() const
Definition: Settings.h:104
bool barrel() const
Definition: Stub.h:201
float z_
Definition: Stub.h:241
bool tiltedBarrel() const
Definition: Stub.h:203

◆ assocTP()

const TP* tmtt::Stub::assocTP ( ) const
inline

Definition at line 168 of file Stub.h.

References assocTP_.

168  {
169  return assocTP_;
170  } // If only one TP contributed to both clusters, this tells you which TP it is. Returns nullptr if none.
const TP * assocTP_
Definition: Stub.h:264

◆ assocTPofCluster()

std::array<const TP*, 2> tmtt::Stub::assocTPofCluster ( ) const
inline

Definition at line 176 of file Stub.h.

References assocTPofCluster_.

176  {
177  return assocTPofCluster_;
178  } // Which TP made each cluster. Warning: If cluster was not produced by a single TP, then returns nullptr! (P.S. If both clusters match same TP, then this will equal assocTP()).
std::array< const TP *, 2 > assocTPofCluster_
Definition: Stub.h:267

◆ assocTPs()

const std::set<const TP*>& tmtt::Stub::assocTPs ( ) const
inline

Definition at line 164 of file Stub.h.

References assocTPs_.

Referenced by tmtt::KalmanState::good(), and tmtt::KFbase::printStub().

164  {
165  return assocTPs_;
166  } // Return TPs associated to this stub. (Whether only TPs contributing to both clusters are returned is determined by "StubMatchStrict" config param.)
std::set< const TP * > assocTPs_
Definition: Stub.h:265

◆ barrel()

bool tmtt::Stub::barrel ( ) const
inline

◆ bend()

float tmtt::Stub::bend ( ) const
inline

Definition at line 126 of file Stub.h.

References bend_.

Referenced by calcQoverPtrange(), degradeResolution(), qOverPt(), and setFrontend().

126 { return bend_; }
float bend_
Definition: Stub.h:242

◆ bendCut()

float tmtt::Stub::bendCut ( ) const
inline

Definition at line 128 of file Stub.h.

References tmtt::Settings::bendCut(), tmtt::Settings::bendCutExtra(), numMergedBend_, and settings_.

Referenced by calcQoverPtrange(), qOverPtcut(), setFrontend(), and trkPhiAtRcut().

128 { return (settings_->bendCut() + (numMergedBend_ - 1) * settings_->bendCutExtra()); }
const Settings * settings_
Definition: Stub.h:233
double bendCut() const
Definition: Settings.h:70
unsigned int numMergedBend_
Definition: Stub.h:261
double bendCutExtra() const
Definition: Settings.h:74

◆ bendCutInFrontend()

float tmtt::Stub::bendCutInFrontend ( ) const
inline

Definition at line 124 of file Stub.h.

References tmtt::Settings::bendCut(), and settings_.

Referenced by degradeResolution(), tmtt::StubWindowSuggest::process(), and setFrontend().

124 { return settings_->bendCut(); }
const Settings * settings_
Definition: Stub.h:233
double bendCut() const
Definition: Settings.h:70

◆ bendInFrontend()

float tmtt::Stub::bendInFrontend ( ) const
inline

Definition at line 123 of file Stub.h.

References bendInFrontend_.

Referenced by setFrontend().

123 { return bendInFrontend_; }
float bendInFrontend_
Definition: Stub.h:259

◆ calcDphiOverBend()

void tmtt::Stub::calcDphiOverBend ( )
private

Definition at line 314 of file Stub.cc.

References funct::abs(), approxB(), funct::cos(), dphiOverBend_, tmtt::TrackerModule::pitchOverSep(), settings_, funct::sin(), theta(), tmtt::TrackerModule::tiltAngle(), trackerModule_, and tmtt::Settings::useApproxB().

Referenced by digitize(), and Stub().

314  {
315  // Uses stub (r,z) instead of module (r,z). Logically correct but has negligable effect on results.
316  if (settings_->useApproxB()) {
317  float dphiOverBendCorrection_approx_ = approxB();
318  dphiOverBend_ = trackerModule_->pitchOverSep() * dphiOverBendCorrection_approx_;
319  } else {
320  float dphiOverBendCorrection_ = std::abs(cos(this->theta() - trackerModule_->tiltAngle()) / sin(this->theta()));
321  dphiOverBend_ = trackerModule_->pitchOverSep() * dphiOverBendCorrection_;
322  }
323  }
float theta() const
Definition: Stub.h:110
float dphiOverBend_
Definition: Stub.h:243
const Settings * settings_
Definition: Stub.h:233
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
bool useApproxB() const
Definition: Settings.h:103
double approxB()
Definition: Stub.cc:304
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
float tiltAngle() const
Definition: TrackerModule.h:75
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float pitchOverSep() const
Definition: TrackerModule.h:91
const TrackerModule * trackerModule_
Definition: Stub.h:274

◆ calcQoverPtrange()

void tmtt::Stub::calcQoverPtrange ( )

Definition at line 163 of file Stub.cc.

References bend(), bendCut(), tmtt::Settings::houghMinPt(), tmtt::Settings::houghNbinsPt(), createfilelist::int, SiStripPI::max, max_qOverPt_bin_, SiStripPI::min, min_qOverPt_bin_, L1MuTriggerPtScale_cfi::nbinsPt, qOverPtOverBend(), settings_, tmtt::Settings::shape(), and createJobs::tmp.

Referenced by digitize(), and Stub().

163  {
164  // First determine bin range along q/Pt axis of HT array
165  // (Use "int" as nasty things happen if multiply "int" and "unsigned int").
166  const int nbinsPt = (int)settings_->houghNbinsPt();
167  const int min_array_bin = 0;
168  const int max_array_bin = nbinsPt - 1;
169  // Now calculate range of q/Pt bins allowed by bend filter.
170  float qOverPtMin = this->qOverPtOverBend() * (this->bend() - this->bendCut());
171  float qOverPtMax = this->qOverPtOverBend() * (this->bend() + this->bendCut());
172  int houghNbinsPt = settings_->houghNbinsPt();
173  const float houghMaxInvPt = 1. / settings_->houghMinPt();
174  float qOverPtBinSize = (2. * houghMaxInvPt) / houghNbinsPt;
175  if (settings_->shape() == 2 || settings_->shape() == 1 || settings_->shape() == 3) // Non-square HT cells.
176  qOverPtBinSize = 2. * houghMaxInvPt / (houghNbinsPt - 1);
177  // Convert to bin number along q/Pt axis of HT array.
178  // N.B. For square HT cells, setting "tmp = -0.5" causeas cell to be accepted if q/Pt at its centre is consistent
179  // with the stub bend. Instead using "tmp = 0.0" accepts cells if q/Pt at any point in cell is consistent with bend.
180  // So if you use change from -0.5 to 0.0, you have to tighten the bend cut (by ~0.05) to get similar performance.
181  // Decision to set tmp = 0.0 taken in softare & GP firmware on 9th August 2016.
182 
183  float tmp = (settings_->shape() == 2 || settings_->shape() == 1 || settings_->shape() == 3) ? 1. : 0.;
184  int min_bin = std::floor(-tmp + (qOverPtMin + houghMaxInvPt) / qOverPtBinSize);
185  int max_bin = std::floor(tmp + (qOverPtMax + houghMaxInvPt) / qOverPtBinSize);
186 
187  // Limit it to range of HT array.
188  min_bin = max(min_bin, min_array_bin);
189  max_bin = min(max_bin, max_array_bin);
190  // If min_bin > max_bin at this stage, it means that the Pt estimated from the bend is below the cutoff for track-finding.
191  // Keep min_bin > max_bin, so such stubs can be rejected, but set both variables to values inside the HT bin range.
192  if (min_bin > max_bin) {
193  min_bin = max_array_bin;
194  max_bin = min_array_bin;
195  }
196  min_qOverPt_bin_ = (unsigned int)min_bin;
197  max_qOverPt_bin_ = (unsigned int)max_bin;
198  }
unsigned int min_qOverPt_bin_
Definition: Stub.h:244
float bend() const
Definition: Stub.h:126
unsigned int shape() const
Definition: Settings.h:147
const Settings * settings_
Definition: Stub.h:233
float qOverPtOverBend() const
Definition: Stub.h:148
unsigned int houghNbinsPt() const
Definition: Settings.h:137
unsigned int max_qOverPt_bin_
Definition: Stub.h:245
double houghMinPt() const
Definition: Settings.h:135
float bendCut() const
Definition: Stub.h:128
tmp
align.sh
Definition: createJobs.py:716

◆ degradeResolution()

void tmtt::Stub::degradeResolution ( float  bend,
float &  degradedBend,
unsigned int &  num 
) const
private

Definition at line 248 of file Stub.cc.

References funct::abs(), bend(), bendCutInFrontend(), tmtt::DegradeBend::degrade(), degradeBend_, tmtt::TrackerModule::detId(), tmtt::Settings::houghMinPt(), tmtt::Settings::killLowPtStubs(), EgammaValidation_cff::num, psModule(), qOverPtOverBend(), rejectedStubBend_, settings_, and trackerModule_.

Referenced by Stub().

248  {
249  // If TMTT code is tightening official CMS FE stub window cuts, then calculate TMTT stub windows.
250  float windowFE;
251  if (settings_->killLowPtStubs()) {
252  // Window size corresponding to Pt cut used for tracking.
253  float invPtMax = 1. / (settings_->houghMinPt());
254  windowFE = invPtMax / std::abs(this->qOverPtOverBend());
255  // Increase half-indow size to allow for resolution in bend.
256  windowFE += this->bendCutInFrontend();
257  } else {
258  windowFE = rejectedStubBend_; // TMTT is not tightening windows.
259  }
260 
261  degradeBend_->degrade(bend, psModule(), trackerModule_->detId(), windowFE, degradedBend, num);
262  }
float bend() const
Definition: Stub.h:126
bool killLowPtStubs() const
Definition: Settings.h:66
const Settings * settings_
Definition: Stub.h:233
const DetId & detId() const
Definition: TrackerModule.h:44
float qOverPtOverBend() const
Definition: Stub.h:148
void degrade(float bend, bool psModule, const DetId &stDetId, float windowFEnew, float &degradedBend, unsigned int &numInGroup) const
Definition: DegradeBend.cc:24
const DegradeBend * degradeBend_
Definition: Stub.h:277
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const float rejectedStubBend_
Definition: Stub.h:291
double houghMinPt() const
Definition: Settings.h:135
float bendCutInFrontend() const
Definition: Stub.h:124
const TrackerModule * trackerModule_
Definition: Stub.h:274
bool psModule() const
Definition: Stub.h:196

◆ digitalStub()

const DigitalStub* tmtt::Stub::digitalStub ( ) const
inline

Definition at line 96 of file Stub.h.

References digitalStub_.

Referenced by tmtt::Sector::insideEtaSubSecs().

96 { return digitalStub_.get(); }
std::unique_ptr< DigitalStub > digitalStub_
Definition: Stub.h:269

◆ digitize()

void tmtt::Stub::digitize ( unsigned int  iPhiSec,
Stub::DigiStage  digiStep 
)

Definition at line 203 of file Stub.cc.

References bend_, calcDphiOverBend(), calcQoverPtrange(), digitalStub_, digitizeWarningsOn_, tmtt::Settings::enableDigitize(), GP, HT, lastDigiStep_, max_qOverPt_bin_, min_qOverPt_bin_, phi_, r_, settings_, and z_.

203  {
204  if (settings_->enableDigitize()) {
205  bool updated = true;
206  if (not digitalStub_) {
207  // Digitize stub if not yet done.
208  digitalStub_ =
209  std::make_unique<DigitalStub>(settings_, phi_, r_, z_, min_qOverPt_bin_, max_qOverPt_bin_, bend_, iPhiSec);
210  } else {
211  // If digitization already done, redo phi digi if phi sector has changed.
212  updated = digitalStub_->changePhiSec(iPhiSec);
213  }
214 
215  // Save CPU by only updating if something has changed.
216  if (updated || digiStep != lastDigiStep_) {
217  lastDigiStep_ = digiStep;
218 
219  // Replace stub coords with those degraded by digitization process.
220  if (digiStep == DigiStage::GP) {
221  phi_ = digitalStub_->phi_GP();
222  } else {
223  phi_ = digitalStub_->phi_HT_TF();
224  }
225  if (digiStep == DigiStage::GP || digiStep == DigiStage::HT) {
226  r_ = digitalStub_->r_GP_HT();
227  } else {
228  r_ = digitalStub_->r_SF_TF();
229  }
230  z_ = digitalStub_->z();
231  bend_ = digitalStub_->bend();
232 
233  // Update data members that depend on updated coords.
234  // (Logically part of digitisation, so disable warnings)
235  digitizeWarningsOn_ = false;
236  if (digiStep == DigiStage::GP)
237  this->calcDphiOverBend();
238  if (digiStep == DigiStage::HT)
239  this->calcQoverPtrange();
240  digitizeWarningsOn_ = true;
241  }
242  }
243  }
DigiStage lastDigiStep_
Definition: Stub.h:270
bool enableDigitize() const
Definition: Settings.h:80
unsigned int min_qOverPt_bin_
Definition: Stub.h:244
std::unique_ptr< DigitalStub > digitalStub_
Definition: Stub.h:269
const Settings * settings_
Definition: Stub.h:233
float r_
Definition: Stub.h:240
unsigned int max_qOverPt_bin_
Definition: Stub.h:245
void calcQoverPtrange()
Definition: Stub.cc:163
float z_
Definition: Stub.h:241
bool digitizeWarningsOn_
Definition: Stub.h:271
float phi_
Definition: Stub.h:239
void calcDphiOverBend()
Definition: Stub.cc:314
float bend_
Definition: Stub.h:242

◆ dphiOverBend()

float tmtt::Stub::dphiOverBend ( ) const
inline

Definition at line 146 of file Stub.h.

References dphiOverBend_.

146 { return dphiOverBend_; }
float dphiOverBend_
Definition: Stub.h:243

◆ eta()

float tmtt::Stub::eta ( void  ) const
inline

Definition at line 111 of file Stub.h.

References r_, and z_.

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

111 { return asinh(z_ / r_); }
float r_
Definition: Stub.h:240
float z_
Definition: Stub.h:241

◆ fillTruth()

void tmtt::Stub::fillTruth ( const std::map< edm::Ptr< TrackingParticle >, const TP *> &  translateTP,
const edm::Handle< TTStubAssMap > &  mcTruthTTStubHandle,
const edm::Handle< TTClusterAssMap > &  mcTruthTTClusterHandle 
)

Definition at line 328 of file Stub.cc.

References assocTP_, assocTPofCluster_, assocTPs_, TTClusterAssociationMap< T >::findTrackingParticlePtr(), TTStubAssociationMap< T >::findTrackingParticlePtr(), TTClusterAssociationMap< T >::findTrackingParticlePtrs(), genuine(), genuineCluster(), TTClusterAssociationMap< T >::isGenuine(), TTStubAssociationMap< T >::isGenuine(), settings_, tmtt::Settings::stubMatchStrict(), and ttStubRef_.

330  {
331  //--- Fill assocTP_ info. If both clusters in this stub were produced by the same single tracking particle, find out which one it was.
332 
333  bool genuine = mcTruthTTStubHandle->isGenuine(ttStubRef_); // Same TP contributed to both clusters?
334  assocTP_ = nullptr;
335 
336  // Require same TP contributed to both clusters.
337  if (genuine) {
338  edm::Ptr<TrackingParticle> tpPtr = mcTruthTTStubHandle->findTrackingParticlePtr(ttStubRef_);
339  if (translateTP.find(tpPtr) != translateTP.end()) {
340  assocTP_ = translateTP.at(tpPtr);
341  // N.B. Since not all tracking particles are stored in InputData::vTPs_, sometimes no match will be found.
342  }
343  }
344 
345  // Fill assocTPs_ info.
346 
347  if (settings_->stubMatchStrict()) {
348  // We consider only stubs in which this TP contributed to both clusters.
349  if (assocTP_ != nullptr)
350  assocTPs_.insert(assocTP_);
351 
352  } else {
353  // We consider stubs in which this TP contributed to either cluster.
354 
355  for (unsigned int iClus = 0; iClus <= 1; iClus++) { // Loop over both clusters that make up stub.
356  const TTClusterRef& ttClusterRef = ttStubRef_->clusterRef(iClus);
357 
358  // Now identify all TP's contributing to either cluster in stub.
359  vector<edm::Ptr<TrackingParticle> > vecTpPtr = mcTruthTTClusterHandle->findTrackingParticlePtrs(ttClusterRef);
360 
361  for (const edm::Ptr<TrackingParticle>& tpPtr : vecTpPtr) {
362  if (translateTP.find(tpPtr) != translateTP.end()) {
363  assocTPs_.insert(translateTP.at(tpPtr));
364  // N.B. Since not all tracking particles are stored in InputData::vTPs_, sometimes no match will be found.
365  }
366  }
367  }
368  }
369 
370  //--- Also note which tracking particles produced the two clusters that make up the stub
371 
372  for (unsigned int iClus = 0; iClus <= 1; iClus++) { // Loop over both clusters that make up stub.
373  const TTClusterRef& ttClusterRef = ttStubRef_->clusterRef(iClus);
374 
375  bool genuineCluster = mcTruthTTClusterHandle->isGenuine(ttClusterRef); // Only 1 TP made cluster?
376  assocTPofCluster_[iClus] = nullptr;
377 
378  // Only consider clusters produced by just one TP.
379  if (genuineCluster) {
380  edm::Ptr<TrackingParticle> tpPtr = mcTruthTTClusterHandle->findTrackingParticlePtr(ttClusterRef);
381 
382  if (translateTP.find(tpPtr) != translateTP.end()) {
383  assocTPofCluster_[iClus] = translateTP.at(tpPtr);
384  // N.B. Since not all tracking particles are stored in InputData::vTPs_, sometimes no match will be found.
385  }
386  }
387  }
388  }
std::array< bool, 2 > genuineCluster() const
Definition: Stub.h:173
const TrackingParticlePtr & findTrackingParticlePtr(TTStubRefT< T > aStub) const
Operations.
const Settings * settings_
Definition: Stub.h:233
std::array< const TP *, 2 > assocTPofCluster_
Definition: Stub.h:267
const TrackingParticlePtr & findTrackingParticlePtr(TTClusterRefT< T > aCluster) const
Get main TP associated to a cluster. (Non-NULL if isGenuine() below is true).
bool stubMatchStrict() const
Definition: Settings.h:241
bool genuine() const
Definition: Stub.h:167
std::set< const TP * > assocTPs_
Definition: Stub.h:265
const TP * assocTP_
Definition: Stub.h:264
TTStubRef ttStubRef_
Definition: Stub.h:231
bool isGenuine(TTStubRefT< T > aStub) const
MC truth.
const std::vector< TrackingParticlePtr > & findTrackingParticlePtrs(TTClusterRefT< T > aCluster) const
Get all TPs associated to a cluster.
bool isGenuine(TTClusterRefT< T > aCluster) const

◆ frontendPass()

bool tmtt::Stub::frontendPass ( ) const
inline

Definition at line 157 of file Stub.h.

References frontendPass_.

157 { return frontendPass_; }
bool frontendPass_
Definition: Stub.h:255

◆ genuine()

bool tmtt::Stub::genuine ( ) const
inline

Definition at line 167 of file Stub.h.

References assocTPs_.

Referenced by fillTruth().

167 { return (not assocTPs_.empty()); } // Did stub match at least one TP?
std::set< const TP * > assocTPs_
Definition: Stub.h:265

◆ genuineCluster()

std::array<bool, 2> tmtt::Stub::genuineCluster ( ) const
inline

Definition at line 173 of file Stub.h.

References assocTPofCluster_.

Referenced by fillTruth().

173  {
174  return std::array<bool, 2>{{(assocTPofCluster_[0] != nullptr), (assocTPofCluster_[1] != nullptr)}};
175  } // Was cluster produced by a single TP?
std::array< const TP *, 2 > assocTPofCluster_
Definition: Stub.h:267

◆ index()

unsigned int tmtt::Stub::index ( ) const
inline

Definition at line 101 of file Stub.h.

References index_in_vStubs_.

Referenced by operator==(), and tmtt::KFbase::printStub().

101 { return index_in_vStubs_; }
unsigned int index_in_vStubs_
Definition: Stub.h:235

◆ iphi()

unsigned int tmtt::Stub::iphi ( ) const
inline

Definition at line 115 of file Stub.h.

References iphi_.

115 { return iphi_; }
unsigned int iphi_
Definition: Stub.h:251

◆ layerId()

unsigned int tmtt::Stub::layerId ( ) const
inline

Definition at line 198 of file Stub.h.

References layerId_.

Referenced by tmtt::KFbase::printStub().

198 { return layerId_; }
unsigned int layerId_
Definition: Stub.h:281

◆ layerIdReduced()

unsigned int tmtt::Stub::layerIdReduced ( ) const
inline

Definition at line 200 of file Stub.h.

References layerIdReduced_.

200 { return layerIdReduced_; }
unsigned int layerIdReduced_
Definition: Stub.h:282

◆ localU_cluster()

std::array<float, 2> tmtt::Stub::localU_cluster ( ) const
inline

Definition at line 153 of file Stub.h.

References localU_cluster_.

153 { return localU_cluster_; }
std::array< float, 2 > localU_cluster_
Definition: Stub.h:248

◆ localV_cluster()

std::array<float, 2> tmtt::Stub::localV_cluster ( ) const
inline

Definition at line 154 of file Stub.h.

References localV_cluster_.

154 { return localV_cluster_; }
std::array< float, 2 > localV_cluster_
Definition: Stub.h:249

◆ max_qOverPt_bin()

unsigned int tmtt::Stub::max_qOverPt_bin ( ) const
inline

Definition at line 136 of file Stub.h.

References max_qOverPt_bin_.

136 { return max_qOverPt_bin_; }
unsigned int max_qOverPt_bin_
Definition: Stub.h:245

◆ min_qOverPt_bin()

unsigned int tmtt::Stub::min_qOverPt_bin ( ) const
inline

Definition at line 135 of file Stub.h.

References min_qOverPt_bin_.

135 { return min_qOverPt_bin_; }
unsigned int min_qOverPt_bin_
Definition: Stub.h:244

◆ nStrips()

unsigned int tmtt::Stub::nStrips ( ) const
inline

Definition at line 209 of file Stub.h.

References nStrips_.

Referenced by Stub().

209 { return nStrips_; }
unsigned int nStrips_
Definition: Stub.h:286

◆ numMergedBend()

float tmtt::Stub::numMergedBend ( ) const
inline

Definition at line 130 of file Stub.h.

References numMergedBend_.

130 { return numMergedBend_; }
unsigned int numMergedBend_
Definition: Stub.h:261

◆ operator==()

bool tmtt::Stub::operator== ( const Stub stubOther)
inline

Definition at line 72 of file Stub.h.

References index().

72 { return (this->index() == stubOther.index()); }
unsigned int index() const
Definition: Stub.h:101

◆ phi()

float tmtt::Stub::phi ( void  ) const
inline

◆ phiDiff()

float tmtt::Stub::phiDiff ( float  rad,
float  Pt 
) const
inline

Definition at line 138 of file Stub.h.

References funct::abs(), tmtt::Settings::invPtToDphi(), r_, and settings_.

Referenced by tmtt::Sector::insidePhi().

138 { return std::abs(r_ - rad) * (settings_->invPtToDphi()) / Pt; }
double invPtToDphi() const
Definition: Settings.h:397
const Settings * settings_
Definition: Stub.h:233
float r_
Definition: Stub.h:240
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ psModule()

bool tmtt::Stub::psModule ( ) const
inline

Definition at line 196 of file Stub.h.

References psModule_.

Referenced by degradeResolution(), tmtt::KFParamsComb::matrixV(), tmtt::KFbase::residual(), and Stub().

196 { return psModule_; }
bool psModule_
Definition: Stub.h:287

◆ qOverPt()

float tmtt::Stub::qOverPt ( ) const
inline

Definition at line 132 of file Stub.h.

References bend(), and qOverPtOverBend().

132 { return (this->qOverPtOverBend() * this->bend()); }
float bend() const
Definition: Stub.h:126
float qOverPtOverBend() const
Definition: Stub.h:148

◆ qOverPtcut()

float tmtt::Stub::qOverPtcut ( ) const
inline

Definition at line 133 of file Stub.h.

References bendCut(), and qOverPtOverBend().

133 { return (this->qOverPtOverBend() * this->bendCut()); }
float qOverPtOverBend() const
Definition: Stub.h:148
float bendCut() const
Definition: Stub.h:128

◆ qOverPtOverBend()

float tmtt::Stub::qOverPtOverBend ( ) const
inline

Definition at line 148 of file Stub.h.

References dphiOverBend_, tmtt::Settings::invPtToDphi(), r_, and settings_.

Referenced by calcQoverPtrange(), degradeResolution(), tmtt::StubWindowSuggest::process(), qOverPt(), qOverPtcut(), and setFrontend().

148 { return dphiOverBend_ / (r_ * settings_->invPtToDphi()); }
double invPtToDphi() const
Definition: Settings.h:397
float dphiOverBend_
Definition: Stub.h:243
const Settings * settings_
Definition: Stub.h:233
float r_
Definition: Stub.h:240

◆ r()

float tmtt::Stub::r ( ) const
inline

◆ setDigitizeWarningsOn()

void tmtt::Stub::setDigitizeWarningsOn ( bool  newVal)
inline

Definition at line 93 of file Stub.h.

References digitizeWarningsOn_.

93 { digitizeWarningsOn_ = newVal; }
bool digitizeWarningsOn_
Definition: Stub.h:271

◆ setFrontend()

void tmtt::Stub::setFrontend ( const StubKiller stubKiller)
private

Definition at line 267 of file Stub.cc.

References funct::abs(), bend(), bendCut(), bendCutInFrontend(), bendInFrontend(), eta(), Exception, frontendPass_, edm::Ref< C, T, F >::get(), tmtt::Settings::houghMinPt(), tmtt::Settings::killLowPtStubs(), tmtt::Settings::killScenario(), tmtt::StubKiller::killStub(), tmtt::Settings::maxStubEta(), tmtt::StubKiller::none, qOverPtOverBend(), rejectedStubBend_, settings_, stubFailedDegradeWindow_, and ttStubRef_.

Referenced by Stub().

267  {
268  frontendPass_ = true; // Did stub pass cuts applied in front-end chip
269  stubFailedDegradeWindow_ = false; // Did it only fail cuts corresponding to windows encoded in DegradeBend.h?
270  // Don't use stubs at large eta, since it is impossible to form L1 tracks from them, so they only contribute to combinatorics.
271  if (std::abs(this->eta()) > settings_->maxStubEta())
272  frontendPass_ = false;
273  // Don't use stubs whose Pt is significantly below the Pt cut used in the L1 tracking, allowing for uncertainty in q/Pt due to stub bend resolution.
274  const float qOverPtCut = 1. / settings_->houghMinPt();
275  if (settings_->killLowPtStubs()) {
276  // Apply this cut in the front-end electronics.
277  if (std::abs(this->bendInFrontend()) - this->bendCutInFrontend() > qOverPtCut / this->qOverPtOverBend())
278  frontendPass_ = false;
279  }
280 
281  if (frontendPass_ && this->bend() == rejectedStubBend_) {
282  throw cms::Exception(
283  "BadConfig: FE stub bend window sizes provided in cfg ES source are tighter than those to make the stubs. "
284  "Please fix them");
285  }
286 
287  if (settings_->killLowPtStubs()) {
288  // Reapply the same cut using the degraded bend information available in the off-detector electronics.
289  // The reason is that the bend degredation can move the Pt below the Pt cut, making the stub useless to the off-detector electronics.
290  if (std::abs(this->bend()) - this->bendCut() > qOverPtCut / this->qOverPtOverBend())
291  frontendPass_ = false;
292  }
293 
294  // Emulate stubs in dead tracker regions..
296  if (killScenario != StubKiller::KillOptions::none) {
297  bool kill = stubKiller->killStub(ttStubRef_.get());
298  if (kill)
299  frontendPass_ = false;
300  }
301  }
float eta() const
Definition: Stub.h:111
float bendInFrontend() const
Definition: Stub.h:123
float bend() const
Definition: Stub.h:126
bool killLowPtStubs() const
Definition: Settings.h:66
const Settings * settings_
Definition: Stub.h:233
unsigned int killScenario() const
Definition: Settings.h:343
float qOverPtOverBend() const
Definition: Stub.h:148
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const float rejectedStubBend_
Definition: Stub.h:291
double maxStubEta() const
Definition: Settings.h:64
TTStubRef ttStubRef_
Definition: Stub.h:231
double houghMinPt() const
Definition: Settings.h:135
float bendCutInFrontend() const
Definition: Stub.h:124
float bendCut() const
Definition: Stub.h:128
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
bool frontendPass_
Definition: Stub.h:255
bool stubFailedDegradeWindow_
Definition: Stub.h:257

◆ setTrackerModule()

void tmtt::Stub::setTrackerModule ( const TrackerGeometry trackerGeometry,
const TrackerTopology trackerTopology,
const DetId detId 
)
private

◆ sigmaPar()

float tmtt::Stub::sigmaPar ( ) const
inline

Definition at line 191 of file Stub.h.

References invRoot12, and stripLength_.

Referenced by tmtt::KFParamsComb::matrixV(), tmtt::KFbase::printStub(), sigmaR(), and sigmaZ().

191 { return invRoot12 * stripLength_; }
float stripLength_
Definition: Stub.h:285
const float invRoot12
Definition: Stub.h:293

◆ sigmaPerp()

float tmtt::Stub::sigmaPerp ( ) const
inline

Definition at line 189 of file Stub.h.

References invRoot12, and stripPitch_.

Referenced by tmtt::KFParamsComb::matrixV(), and tmtt::KFbase::printStub().

189 { return invRoot12 * stripPitch_; }
float stripPitch_
Definition: Stub.h:284
const float invRoot12
Definition: Stub.h:293

◆ sigmaR()

float tmtt::Stub::sigmaR ( ) const
inline

Definition at line 186 of file Stub.h.

References barrel(), and sigmaPar().

186 { return (barrel() ? 0. : sigmaPar()); }
bool barrel() const
Definition: Stub.h:201
float sigmaPar() const
Definition: Stub.h:191

◆ sigmaZ()

float tmtt::Stub::sigmaZ ( ) const
inline

Definition at line 187 of file Stub.h.

References barrel(), and sigmaPar().

187 { return (barrel() ? sigmaPar() : 0.); }
bool barrel() const
Definition: Stub.h:201
float sigmaPar() const
Definition: Stub.h:191

◆ stripLength()

float tmtt::Stub::stripLength ( ) const
inline

Definition at line 207 of file Stub.h.

References stripLength_.

207 { return stripLength_; }
float stripLength_
Definition: Stub.h:285

◆ stripPitch()

float tmtt::Stub::stripPitch ( ) const
inline

Definition at line 205 of file Stub.h.

References stripPitch_.

205 { return stripPitch_; }
float stripPitch_
Definition: Stub.h:284

◆ stubFailedDegradeWindow()

bool tmtt::Stub::stubFailedDegradeWindow ( ) const
inline

Definition at line 159 of file Stub.h.

References stubFailedDegradeWindow_.

159 { return stubFailedDegradeWindow_; }
bool stubFailedDegradeWindow_
Definition: Stub.h:257

◆ theta()

float tmtt::Stub::theta ( void  ) const
inline

Definition at line 110 of file Stub.h.

References r_, and z_.

Referenced by calcDphiOverBend(), and Tau.Tau::zImpact().

110 { return atan2(r_, z_); }
float r_
Definition: Stub.h:240
float z_
Definition: Stub.h:241

◆ tiltAngle()

float tmtt::Stub::tiltAngle ( ) const
inline

Definition at line 184 of file Stub.h.

References tiltAngle_.

Referenced by tmtt::KFParamsComb::matrixV().

184 { return tiltAngle_; }
float tiltAngle_
Definition: Stub.h:283

◆ tiltedBarrel()

bool tmtt::Stub::tiltedBarrel ( ) const
inline

Definition at line 203 of file Stub.h.

References tiltedBarrel_.

Referenced by approxB(), and tmtt::KFParamsComb::matrixV().

203 { return tiltedBarrel_; }
bool tiltedBarrel_
Definition: Stub.h:289

◆ trackerModule()

const TrackerModule* tmtt::Stub::trackerModule ( ) const
inline

Definition at line 78 of file Stub.h.

References trackerModule_.

Referenced by tmtt::StubWindowSuggest::updateStoredWindow().

78 { return trackerModule_; }
const TrackerModule * trackerModule_
Definition: Stub.h:274

◆ trkPhiAtR()

float tmtt::Stub::trkPhiAtR ( float  rad) const
inline

Definition at line 140 of file Stub.h.

References bend_, dphiOverBend_, phi_, and r_.

Referenced by tmtt::Sector::insidePhi().

140 { return phi_ + (bend_ * dphiOverBend_) * (1. - rad / r_); }
float dphiOverBend_
Definition: Stub.h:243
float r_
Definition: Stub.h:240
float phi_
Definition: Stub.h:239
float bend_
Definition: Stub.h:242

◆ trkPhiAtRcut()

float tmtt::Stub::trkPhiAtRcut ( float  rad) const
inline

Definition at line 142 of file Stub.h.

References funct::abs(), bendCut(), dphiOverBend_, and r_.

Referenced by tmtt::Sector::insidePhi().

142 { return (bendCut() * dphiOverBend_) * std::abs(1. - rad / r_); }
float dphiOverBend_
Definition: Stub.h:243
float r_
Definition: Stub.h:240
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float bendCut() const
Definition: Stub.h:128

◆ ttStubRef()

const TTStubRef& tmtt::Stub::ttStubRef ( ) const
inline

Definition at line 75 of file Stub.h.

References ttStubRef_.

75 { return ttStubRef_; }
TTStubRef ttStubRef_
Definition: Stub.h:231

◆ z()

float tmtt::Stub::z ( ) const
inline

Member Data Documentation

◆ alpha_

float tmtt::Stub::alpha_
private

Definition at line 252 of file Stub.h.

Referenced by alpha(), and Stub().

◆ assocTP_

const TP* tmtt::Stub::assocTP_
private

Definition at line 264 of file Stub.h.

Referenced by assocTP(), and fillTruth().

◆ assocTPofCluster_

std::array<const TP*, 2> tmtt::Stub::assocTPofCluster_
private

Definition at line 267 of file Stub.h.

Referenced by assocTPofCluster(), fillTruth(), genuineCluster(), and Stub().

◆ assocTPs_

std::set<const TP*> tmtt::Stub::assocTPs_
private

Definition at line 265 of file Stub.h.

Referenced by assocTPs(), fillTruth(), and genuine().

◆ barrel_

bool tmtt::Stub::barrel_
private

Definition at line 288 of file Stub.h.

Referenced by barrel().

◆ bend_

float tmtt::Stub::bend_
private

Definition at line 242 of file Stub.h.

Referenced by bend(), digitize(), Stub(), and trkPhiAtR().

◆ bendInFrontend_

float tmtt::Stub::bendInFrontend_
private

Definition at line 259 of file Stub.h.

Referenced by bendInFrontend(), and Stub().

◆ degradeBend_

const DegradeBend* tmtt::Stub::degradeBend_
private

Definition at line 277 of file Stub.h.

Referenced by degradeResolution().

◆ digitalStub_

std::unique_ptr<DigitalStub> tmtt::Stub::digitalStub_
private

Definition at line 269 of file Stub.h.

Referenced by digitalStub(), and digitize().

◆ digitizeWarningsOn_

bool tmtt::Stub::digitizeWarningsOn_
private

Definition at line 271 of file Stub.h.

Referenced by digitize(), and setDigitizeWarningsOn().

◆ dphiOverBend_

float tmtt::Stub::dphiOverBend_
private

Definition at line 243 of file Stub.h.

Referenced by calcDphiOverBend(), dphiOverBend(), qOverPtOverBend(), trkPhiAtR(), and trkPhiAtRcut().

◆ frontendPass_

bool tmtt::Stub::frontendPass_
private

Definition at line 255 of file Stub.h.

Referenced by frontendPass(), and setFrontend().

◆ index_in_vStubs_

unsigned int tmtt::Stub::index_in_vStubs_
private

Definition at line 235 of file Stub.h.

Referenced by index().

◆ invRoot12

const float tmtt::Stub::invRoot12 = sqrt(1. / 12.)
private

Definition at line 293 of file Stub.h.

Referenced by sigmaPar(), and sigmaPerp().

◆ iphi_

unsigned int tmtt::Stub::iphi_
private

Definition at line 251 of file Stub.h.

Referenced by iphi(), and Stub().

◆ lastDigiStep_

DigiStage tmtt::Stub::lastDigiStep_
private

Definition at line 270 of file Stub.h.

Referenced by digitize().

◆ layerId_

unsigned int tmtt::Stub::layerId_
private

Definition at line 281 of file Stub.h.

Referenced by layerId().

◆ layerIdReduced_

unsigned int tmtt::Stub::layerIdReduced_
private

Definition at line 282 of file Stub.h.

Referenced by layerIdReduced().

◆ localU_cluster_

std::array<float, 2> tmtt::Stub::localU_cluster_
private

Definition at line 248 of file Stub.h.

Referenced by localU_cluster(), and Stub().

◆ localV_cluster_

std::array<float, 2> tmtt::Stub::localV_cluster_
private

Definition at line 249 of file Stub.h.

Referenced by localV_cluster(), and Stub().

◆ max_qOverPt_bin_

unsigned int tmtt::Stub::max_qOverPt_bin_
private

Definition at line 245 of file Stub.h.

Referenced by calcQoverPtrange(), digitize(), and max_qOverPt_bin().

◆ min_qOverPt_bin_

unsigned int tmtt::Stub::min_qOverPt_bin_
private

Definition at line 244 of file Stub.h.

Referenced by calcQoverPtrange(), digitize(), and min_qOverPt_bin().

◆ nStrips_

unsigned int tmtt::Stub::nStrips_
private

Definition at line 286 of file Stub.h.

Referenced by nStrips().

◆ numMergedBend_

unsigned int tmtt::Stub::numMergedBend_
private

Definition at line 261 of file Stub.h.

Referenced by bendCut(), numMergedBend(), and Stub().

◆ phi_

float tmtt::Stub::phi_
private

Definition at line 239 of file Stub.h.

Referenced by digitize(), phi(), Stub(), and trkPhiAtR().

◆ psModule_

bool tmtt::Stub::psModule_
private

Definition at line 287 of file Stub.h.

Referenced by psModule().

◆ r_

float tmtt::Stub::r_
private

Definition at line 240 of file Stub.h.

Referenced by approxB(), digitize(), eta(), phiDiff(), qOverPtOverBend(), r(), Stub(), theta(), trkPhiAtR(), and trkPhiAtRcut().

◆ rejectedStubBend_

const float tmtt::Stub::rejectedStubBend_ = 99999.
private

Definition at line 291 of file Stub.h.

Referenced by degradeResolution(), and setFrontend().

◆ settings_

const Settings* tmtt::Stub::settings_
private

◆ stripLength_

float tmtt::Stub::stripLength_
private

Definition at line 285 of file Stub.h.

Referenced by sigmaPar(), and stripLength().

◆ stripPitch_

float tmtt::Stub::stripPitch_
private

Definition at line 284 of file Stub.h.

Referenced by sigmaPerp(), and stripPitch().

◆ stubFailedDegradeWindow_

bool tmtt::Stub::stubFailedDegradeWindow_
private

Definition at line 257 of file Stub.h.

Referenced by setFrontend(), and stubFailedDegradeWindow().

◆ tiltAngle_

float tmtt::Stub::tiltAngle_
private

Definition at line 283 of file Stub.h.

Referenced by tiltAngle().

◆ tiltedBarrel_

bool tmtt::Stub::tiltedBarrel_
private

Definition at line 289 of file Stub.h.

Referenced by tiltedBarrel().

◆ trackerModule_

const TrackerModule* tmtt::Stub::trackerModule_
private

Definition at line 274 of file Stub.h.

Referenced by calcDphiOverBend(), degradeResolution(), Stub(), and trackerModule().

◆ ttStubRef_

TTStubRef tmtt::Stub::ttStubRef_
private

Definition at line 231 of file Stub.h.

Referenced by fillTruth(), setFrontend(), Stub(), and ttStubRef().

◆ z_

float tmtt::Stub::z_
private

Definition at line 241 of file Stub.h.

Referenced by approxB(), digitize(), eta(), Stub(), theta(), and z().