CMS 3D CMS Logo

KFin.cc
Go to the documentation of this file.
2 
3 #include <vector>
4 #include <numeric>
5 #include <algorithm>
6 
7 using namespace std;
8 using namespace edm;
9 using namespace tt;
10 using namespace trackerTFP;
11 
12 namespace trklet {
13 
14  KFin::KFin(const ParameterSet& iConfig,
15  const Setup* setup,
16  const DataFormats* dataFormats,
17  const LayerEncoding* layerEncoding,
18  const ChannelAssignment* channelAssignment,
19  const Settings* settings,
20  int region)
21  : enableTruncation_(iConfig.getParameter<bool>("EnableTruncation")),
22  useTTStubResiduals_(iConfig.getParameter<bool>("UseTTStubResiduals")),
23  setup_(setup),
24  dataFormats_(dataFormats),
25  layerEncoding_(layerEncoding),
26  channelAssignment_(channelAssignment),
27  settings_(settings),
28  region_(region),
29  input_(channelAssignment_->numChannelsTrack()) {
30  // unified tracklet digitisation granularity
34  baseUzT_ = settings_->kz() * pow(2, settings_->z0_shift());
35  baseUr_ = settings_->kr();
37  baseUz_ = settings_->kz();
38  // KF input format digitisation granularity (identical to TMTT)
39  baseLinv2R_ = dataFormats->base(Variable::inv2R, Process::kfin);
40  baseLphiT_ = dataFormats->base(Variable::phiT, Process::kfin);
41  baseLcot_ = dataFormats->base(Variable::cot, Process::kfin);
42  baseLzT_ = dataFormats->base(Variable::zT, Process::kfin);
43  baseLr_ = dataFormats->base(Variable::r, Process::kfin);
44  baseLphi_ = dataFormats->base(Variable::phi, Process::kfin);
45  baseLz_ = dataFormats->base(Variable::z, Process::kfin);
46  // Finer granularity (by powers of 2) than the TMTT one. Used to transform from Tracklet to TMTT base.
47  baseHinv2R_ = baseLinv2R_ * pow(2, floor(log2(baseUinv2R_ / baseLinv2R_)));
48  baseHphiT_ = baseLphiT_ * pow(2, floor(log2(baseUphiT_ / baseLphiT_)));
49  baseHcot_ = baseLcot_ * pow(2, floor(log2(baseUcot_ / baseLcot_)));
50  baseHzT_ = baseLzT_ * pow(2, floor(log2(baseUzT_ / baseLzT_)));
51  baseHr_ = baseLr_ * pow(2, floor(log2(baseUr_ / baseLr_)));
52  baseHphi_ = baseLphi_ * pow(2, floor(log2(baseUphi_ / baseLphi_)));
53  baseHz_ = baseLz_ * pow(2, floor(log2(baseUz_ / baseLz_)));
54  // calculate digitisation granularity used for inverted cot(theta)
55  const int baseShiftInvCot = ceil(log2(setup_->outerRadius() / setup_->hybridRangeR())) - setup_->widthDSPbu();
56  baseInvCot_ = pow(2, baseShiftInvCot);
57  }
58 
59  // read in and organize input tracks and stubs
60  void KFin::consume(const StreamsTrack& streamsTrack, const StreamsStub& streamsStub) {
61  static const double maxCot = sinh(setup_->maxEta()) + setup_->beamWindowZ() / setup_->chosenRofZ();
62  static const int unusedMSBcot = floor(log2(baseUcot_ * pow(2, settings_->nbitst()) / (2. * maxCot)));
63  static const double baseCot =
64  baseUcot_ * pow(2, settings_->nbitst() - unusedMSBcot - 1 - setup_->widthAddrBRAM18());
65  const int offsetTrack = region_ * channelAssignment_->numChannelsTrack();
66  // count tracks and stubs to reserve container
67  int nTracks(0);
68  int nStubs(0);
69  for (int channel = 0; channel < channelAssignment_->numChannelsTrack(); channel++) {
70  const int channelTrack = offsetTrack + channel;
71  const int offsetStub = channelAssignment_->offsetStub(channelTrack);
72  const StreamTrack& streamTrack = streamsTrack[channelTrack];
73  input_[channel].reserve(streamTrack.size());
74  for (int frame = 0; frame < (int)streamTrack.size(); frame++) {
75  if (streamTrack[frame].first.isNull())
76  continue;
77  nTracks++;
78  for (int layer = 0; layer < channelAssignment_->numProjectionLayers(channel); layer++)
79  if (streamsStub[offsetStub + layer][frame].first.isNonnull())
80  nStubs++;
81  }
82  }
83  stubs_.reserve(nStubs + nTracks * channelAssignment_->numSeedingLayers());
84  tracks_.reserve(nTracks);
85  // store tracks and stubs
86  for (int channel = 0; channel < channelAssignment_->numChannelsTrack(); channel++) {
87  const int channelTrack = offsetTrack + channel;
88  const int offsetStub = channelAssignment_->offsetStub(channelTrack);
89  const StreamTrack& streamTrack = streamsTrack[channelTrack];
90  vector<Track*>& input = input_[channel];
91  for (int frame = 0; frame < (int)streamTrack.size(); frame++) {
92  const TTTrackRef& ttTrackRef = streamTrack[frame].first;
93  if (ttTrackRef.isNull()) {
94  input.push_back(nullptr);
95  continue;
96  }
97  //convert track parameter
98  const double r2Inv = digi(-ttTrackRef->rInv() / 2., baseUinv2R_);
99  const double phi0U =
100  digi(tt::deltaPhi(ttTrackRef->phi() - region_ * setup_->baseRegion() + setup_->hybridRangePhi() / 2.),
101  baseUphiT_);
102  const double phi0S = digi(phi0U - setup_->hybridRangePhi() / 2., baseUphiT_);
103  const double cot = digi(ttTrackRef->tanL(), baseUcot_);
104  const double z0 = digi(ttTrackRef->z0(), baseUzT_);
105  const double phiT = digi(phi0S + r2Inv * digi(dataFormats_->chosenRofPhi(), baseUr_), baseUphiT_);
106  const double zT = digi(z0 + cot * digi(setup_->chosenRofZ(), baseUr_), baseUzT_);
107  // kill tracks outside of fiducial range
108  if (abs(phiT) > setup_->baseRegion() / 2. || abs(zT) > setup_->hybridMaxCot() * setup_->chosenRofZ() ||
109  abs(z0) > setup_->beamWindowZ()) {
110  input.push_back(nullptr);
111  continue;
112  }
113  // convert stubs
114  vector<Stub*> stubs;
116  for (int layer = 0; layer < channelAssignment_->numProjectionLayers(channel); layer++) {
117  const FrameStub& frameStub = streamsStub[offsetStub + layer][frame];
118  const TTStubRef& ttStubRef = frameStub.first;
119  const int layerId = channelAssignment_->layerId(channel, layer);
120  if (ttStubRef.isNull())
121  continue;
122  // parse residuals from tt::Frame and take r and layerId from tt::TTStubRef
123  const bool barrel = setup_->barrel(ttStubRef);
124  const int layerIdTracklet = setup_->trackletLayerId(ttStubRef);
125  const double basePhi = barrel ? settings_->kphi1() : settings_->kphi(layerIdTracklet);
126  const double baseRZ = barrel ? settings_->kz(layerIdTracklet) : settings_->kz();
127  const int widthRZ = barrel ? settings_->zresidbits() : settings_->rresidbits();
128  TTBV hw(frameStub.second);
129  const TTBV hwRZ(hw, widthRZ, 0, true);
130  hw >>= widthRZ;
131  const TTBV hwPhi(hw, settings_->phiresidbits(), 0, true);
132  hw >>= settings_->phiresidbits();
133  const double r = digi(setup_->stubR(hw, ttStubRef) - dataFormats_->chosenRofPhi(), baseUr_);
134  double phi = hwPhi.val(basePhi);
135  if (basePhi > baseUphi_)
136  phi += baseUphi_ / 2.;
137  const double z = digi(hwRZ.val(baseRZ) * (barrel ? 1. : -cot), baseUz_);
138  // determine module type
139  bool psTilt;
140  if (barrel) {
141  const double posZ = (r + digi(dataFormats_->chosenRofPhi(), baseUr_)) * cot + z0 + z;
142  const int indexLayerId = setup_->indexLayerId(ttStubRef);
143  const double limit = setup_->tiltedLayerLimitZ(indexLayerId);
144  psTilt = abs(posZ) < limit;
145  } else
146  psTilt = setup_->psModule(ttStubRef);
147  if (useTTStubResiduals_) {
148  const GlobalPoint gp = setup_->stubPos(ttStubRef);
149  const double ttR = r;
150  const double ttZ = gp.z() - (z0 + (ttR + dataFormats_->chosenRofPhi()) * cot);
151  stubs_.emplace_back(ttStubRef, layerId, ttR, phi, ttZ, psTilt);
152  } else
153  stubs_.emplace_back(ttStubRef, layerId, r, phi, z, psTilt);
154  stubs.push_back(&stubs_.back());
155  }
156  // create fake seed stubs, since TrackBuilder doesn't output these stubs, required by the KF.
157  for (int layerId : channelAssignment_->seedingLayers(channel)) {
158  const vector<TTStubRef>& ttStubRefs = ttTrackRef->getStubRefs();
159  auto sameLayer = [this, layerId](const TTStubRef& ttStubRef) {
160  return setup_->layerId(ttStubRef) == layerId;
161  };
162  const TTStubRef& ttStubRef = *find_if(ttStubRefs.begin(), ttStubRefs.end(), sameLayer);
163  const bool barrel = setup_->barrel(ttStubRef);
164  double r;
165  if (barrel)
167  else {
168  r = (z0 +
170  digi(1. / digi(abs(cot), baseCot), baseInvCot_);
172  }
173  static constexpr double phi = 0.;
174  static constexpr double z = 0.;
175  // determine module type
176  bool psTilt;
177  if (barrel) {
178  const double posZ =
179  digi(digi(setup_->hybridLayerR(layerId - setup_->offsetLayerId()), baseUr_) * cot + z0, baseUz_);
180  const int indexLayerId = setup_->indexLayerId(ttStubRef);
181  const double limit = digi(setup_->tiltedLayerLimitZ(indexLayerId), baseUz_);
182  psTilt = abs(posZ) < limit;
183  } else
184  psTilt = true;
185  const GlobalPoint gp = setup_->stubPos(ttStubRef);
186  const double ttR = gp.perp() - dataFormats_->chosenRofPhi();
187  const double ttZ = gp.z() - (z0 + (ttR + dataFormats_->chosenRofPhi()) * cot);
189  stubs_.emplace_back(ttStubRef, layerId, ttR, phi, ttZ, psTilt);
190  else
191  stubs_.emplace_back(ttStubRef, layerId, r, phi, z, psTilt);
192  stubs.push_back(&stubs_.back());
193  }
194  const bool valid = frame < setup_->numFrames() ? true : enableTruncation_;
195  tracks_.emplace_back(ttTrackRef, valid, r2Inv, phiT, cot, zT, stubs);
196  input.push_back(&tracks_.back());
197  }
198  }
199  }
200 
201  // fill output products
202  void KFin::produce(StreamsStub& accpetedStubs,
203  StreamsTrack& acceptedTracks,
204  StreamsStub& lostStubs,
206  static constexpr int usedMSBpitchOverRaddr = 1;
207  static const double baseR =
208  baseLr_ *
209  pow(2, dataFormats_->width(Variable::r, Process::zht) - setup_->widthAddrBRAM18() + usedMSBpitchOverRaddr);
210  static const double baseRinvR =
211  baseLr_ * pow(2, dataFormats_->width(Variable::r, Process::zht) - setup_->widthAddrBRAM18());
212  static const double basePhi = baseLinv2R_ * baseLr_;
213  static const double baseInvR =
214  pow(2., ceil(log2(baseLr_ / setup_->tbInnerRadius())) - setup_->widthDSPbu()) / baseLr_;
215  static const double maxCot = sinh(setup_->maxEta()) + setup_->beamWindowZ() / setup_->chosenRofZ();
216  static constexpr int usedMSBCotLutaddr = 3;
217  static const double baseCotLut = pow(2., ceil(log2(maxCot)) - setup_->widthAddrBRAM18() + usedMSBCotLutaddr);
218  // base transform into high precision TMTT format
219  for (Track& track : tracks_) {
220  track.inv2R_ = redigi(track.inv2R_, baseUinv2R_, baseHinv2R_, setup_->widthDSPbu());
221  track.phiT_ = redigi(track.phiT_, baseUphiT_, baseHphiT_, setup_->widthDSPbu());
224  for (Stub* stub : track.stubs_) {
225  stub->r_ = redigi(stub->r_, baseUr_, baseHr_, setup_->widthDSPbu());
226  stub->phi_ = redigi(stub->phi_, baseUphi_, baseHphi_, setup_->widthDSPbu());
227  stub->z_ = redigi(stub->z_, baseUz_, baseHz_, setup_->widthDSPbu());
228  }
229  }
230  // find sector
231  for (Track& track : tracks_) {
232  const int sectorPhi = track.phiT_ < 0. ? 0 : 1;
233  track.phiT_ -= (sectorPhi - .5) * setup_->baseSector();
234  int sectorEta(-1);
235  for (; sectorEta < setup_->numSectorsEta(); sectorEta++)
236  if (track.zT_ < digi(setup_->chosenRofZ() * sinh(setup_->boundarieEta(sectorEta + 1)), baseHzT_))
237  break;
238  if (sectorEta >= setup_->numSectorsEta() || sectorEta <= -1) {
239  track.valid_ = false;
240  continue;
241  }
242  track.cot_ = track.cot_ - digi(setup_->sectorCot(sectorEta), baseHcot_);
244  track.sector_ = sectorPhi * setup_->numSectorsEta() + sectorEta;
245  }
246  // base transform into TMTT format
247  for (Track& track : tracks_) {
248  if (!track.valid_)
249  continue;
250  // store track parameter shifts
251  const double dinv2R = digi(track.inv2R_ - digi(track.inv2R_, baseLinv2R_), baseHinv2R_);
252  const double dphiT = digi(track.phiT_ - digi(track.phiT_, baseLphiT_), baseHphiT_);
253  const double dcot = digi(track.cot_ - digi(track.cot_, baseLcot_), baseHcot_);
254  const double dzT = digi(track.zT_ - digi(track.zT_, baseLzT_), baseHzT_);
255  // shift track parameter;
256  track.inv2R_ = digi(track.inv2R_, baseLinv2R_);
257  track.phiT_ = digi(track.phiT_, baseLphiT_);
258  track.cot_ = digi(track.cot_, baseLcot_);
259  track.zT_ = digi(track.zT_, baseLzT_);
260  // range checks
261  if (!dataFormats_->format(Variable::inv2R, Process::kfin).inRange(track.inv2R_, true))
262  track.valid_ = false;
263  if (!dataFormats_->format(Variable::phiT, Process::kfin).inRange(track.phiT_, true))
264  track.valid_ = false;
265  if (!dataFormats_->format(Variable::cot, Process::kfin).inRange(track.cot_, true))
266  track.valid_ = false;
267  if (!dataFormats_->format(Variable::zT, Process::kfin).inRange(track.zT_, true))
268  track.valid_ = false;
269  if (!track.valid_)
270  continue;
271  // adjust stub residuals by track parameter shifts
272  for (Stub* stub : track.stubs_) {
273  const double dphi = digi(dphiT + stub->r_ * dinv2R, baseHphi_);
274  const double r = stub->r_ + digi(dataFormats_->chosenRofPhi() - setup_->chosenRofZ(), baseHr_);
275  const double dz = digi(dzT + r * dcot, baseHz_);
276  stub->phi_ = digi(stub->phi_ + dphi, baseLphi_);
277  stub->z_ = digi(stub->z_ + dz, baseLz_);
278  // range checks
279  if (!dataFormats_->format(Variable::phi, Process::kfin).inRange(stub->phi_))
280  stub->valid_ = false;
281  if (!dataFormats_->format(Variable::z, Process::kfin).inRange(stub->z_))
282  stub->valid_ = false;
283  }
284  }
285  // encode layer id
286  for (Track& track : tracks_) {
287  if (!track.valid_)
288  continue;
289  const int sectorEta = track.sector_ % setup_->numSectorsEta();
290  const int zT = dataFormats_->format(Variable::zT, Process::kfin).toUnsigned(track.zT_);
291  const int cot = dataFormats_->format(Variable::cot, Process::kfin).toUnsigned(track.cot_);
292  track.maybe_ = TTBV(0, setup_->numLayers());
293  for (Stub* stub : track.stubs_) {
294  if (!stub->valid_)
295  continue;
296  // replace layerId by encoded layerId
297  stub->layer_ = layerEncoding_->layerIdKF(sectorEta, zT, cot, stub->layer_);
298  // kill stubs from layers which can't be crossed by track
299  if (stub->layer_ == -1)
300  stub->valid_ = false;
301  if (stub->valid_) {
302  if (track.maybe_[stub->layer_]) {
303  for (Stub* s : track.stubs_) {
304  if (s == stub)
305  break;
306  if (s->layer_ == stub->layer_)
307  s->valid_ = false;
308  }
309  } else
310  track.maybe_.set(stub->layer_);
311  }
312  }
313  // lookup maybe layers
315  }
316  // kill tracks with not enough layer
317  for (Track& track : tracks_) {
318  if (!track.valid_)
319  continue;
320  TTBV hits(0, setup_->numLayers());
321  for (const Stub* stub : track.stubs_)
322  if (stub->valid_)
323  hits.set(stub->layer_);
324  if (hits.count() < setup_->kfMinLayers())
325  track.valid_ = false;
326  }
327  // calculate stub uncertainties
328  for (Track& track : tracks_) {
329  if (!track.valid_)
330  continue;
331  const int sectorEta = track.sector_ % setup_->numSectorsEta();
332  const double inv2R = abs(track.inv2R_);
333  for (Stub* stub : track.stubs_) {
334  if (!stub->valid_)
335  continue;
336  const bool barrel = setup_->barrel(stub->ttStubRef_);
337  const bool ps = barrel ? setup_->psModule(stub->ttStubRef_) : stub->psTilt_;
338  const bool tilt = barrel ? (ps && !stub->psTilt_) : false;
339  const double length = ps ? setup_->lengthPS() : setup_->length2S();
340  const double pitch = ps ? setup_->pitchPS() : setup_->pitch2S();
341  const double pitchOverR = digi(pitch / (digi(stub->r_, baseR) + dataFormats_->chosenRofPhi()), basePhi);
342  const double r = digi(stub->r_, baseRinvR) + dataFormats_->chosenRofPhi();
343  const double sumdz = track.zT_ + stub->z_;
344  const double dZ = digi(sumdz - digi(setup_->chosenRofZ(), baseLr_) * track.cot_, baseLcot_ * baseLr_);
345  const double sumcot = track.cot_ + digi(setup_->sectorCot(sectorEta), baseHcot_);
346  const double cot = digi(abs(dZ * digi(1. / r, baseInvR) + sumcot), baseCotLut);
347  double lengthZ = length;
348  double lengthR = 0.;
349  if (!barrel) {
350  lengthZ = length * cot;
351  lengthR = length;
352  } else if (tilt) {
353  lengthZ = length * abs(setup_->tiltApproxSlope() * cot + setup_->tiltApproxIntercept());
354  lengthR = setup_->tiltUncertaintyR();
355  }
356  const double scat = digi(setup_->scattering(), baseLr_);
357  stub->dZ_ = lengthZ + baseLz_;
358  stub->dPhi_ = (scat + digi(lengthR, baseLr_)) * inv2R + pitchOverR;
359  stub->dPhi_ = digi(stub->dPhi_, baseLphi_) + baseLphi_;
360  }
361  }
362  // fill products StreamsStub& accpetedStubs, StreamsTrack& acceptedTracks, StreamsStub& lostStubs, StreamsTrack& lostTracks
363  auto frameTrack = [this](Track* track) {
364  const TTBV maybe(track->maybe_);
365  const TTBV sectorPhi(
366  dataFormats_->format(Variable::sectorPhi, Process::kfin).ttBV(track->sector_ / setup_->numSectorsEta()));
367  const TTBV sectorEta(
368  dataFormats_->format(Variable::sectorEta, Process::kfin).ttBV(track->sector_ % setup_->numSectorsEta()));
369  const TTBV inv2R(dataFormats_->format(Variable::inv2R, Process::kfin).ttBV(track->inv2R_));
370  const TTBV phiT(dataFormats_->format(Variable::phiT, Process::kfin).ttBV(track->phiT_));
371  const TTBV cot(dataFormats_->format(Variable::cot, Process::kfin).ttBV(track->cot_));
372  const TTBV zT(dataFormats_->format(Variable::zT, Process::kfin).ttBV(track->zT_));
373  return FrameTrack(track->ttTrackRef_,
374  Frame("1" + maybe.str() + sectorPhi.str() + sectorEta.str() + phiT.str() + inv2R.str() +
375  zT.str() + cot.str()));
376  };
377  auto frameStub = [this](Track* track, int layer) {
378  auto equal = [layer](Stub* stub) { return stub->valid_ && stub->layer_ == layer; };
379  const auto it = find_if(track->stubs_.begin(), track->stubs_.end(), equal);
380  if (it == track->stubs_.end() || !(*it)->valid_)
381  return FrameStub();
382  Stub* stub = *it;
383  const TTBV r(dataFormats_->format(Variable::r, Process::kfin).ttBV(stub->r_));
384  const TTBV phi(dataFormats_->format(Variable::phi, Process::kfin).ttBV(stub->phi_));
385  const TTBV z(dataFormats_->format(Variable::z, Process::kfin).ttBV(stub->z_));
386  const TTBV dPhi(dataFormats_->format(Variable::dPhi, Process::kfin).ttBV(stub->dPhi_));
387  const TTBV dZ(dataFormats_->format(Variable::dZ, Process::kfin).ttBV(stub->dZ_));
388  return FrameStub(stub->ttStubRef_, Frame("1" + r.str() + phi.str() + z.str() + dPhi.str() + dZ.str()));
389  };
390  auto invalid = [](Track* track) { return track && !track->valid_; };
391  auto acc = [invalid](int& sum, Track* track) { return sum += (invalid(track) ? 1 : 0); };
392  const int offsetTrack = region_ * channelAssignment_->numChannelsTrack();
393  for (int channel = 0; channel < channelAssignment_->numChannelsTrack(); channel++) {
394  const int channelTrack = offsetTrack + channel;
395  const int offsetStub = channelTrack * setup_->numLayers();
396  vector<Track*>& input = input_[channel];
397  // fill lost tracks and stubs without gaps
398  const int lost = accumulate(input.begin(), input.end(), 0, acc);
399  lostTracks[channelTrack].reserve(lost);
400  for (int layer = 0; layer < setup_->numLayers(); layer++)
401  lostStubs[offsetStub + layer].reserve(lost);
402  for (Track* track : input) {
403  if (!track || track->valid_)
404  continue;
405  lostTracks[channelTrack].emplace_back(frameTrack(track));
406  for (int layer = 0; layer < setup_->numLayers(); layer++)
407  lostStubs[offsetStub + layer].emplace_back(frameStub(track, layer));
408  }
409  // fill accepted tracks and stubs with gaps
410  acceptedTracks[channelTrack].reserve(input.size());
411  for (int layer = 0; layer < setup_->numLayers(); layer++)
412  accpetedStubs[offsetStub + layer].reserve(input.size());
413  for (Track* track : input) {
414  if (!track || !track->valid_) { // fill gap
415  acceptedTracks[channelTrack].emplace_back(FrameTrack());
416  for (int layer = 0; layer < setup_->numLayers(); layer++)
417  accpetedStubs[offsetStub + layer].emplace_back(FrameStub());
418  continue;
419  }
420  acceptedTracks[channelTrack].emplace_back(frameTrack(track));
421  for (int layer = 0; layer < setup_->numLayers(); layer++)
422  accpetedStubs[offsetStub + layer].emplace_back(frameStub(track, layer));
423  }
424  }
425  }
426 
427  // basetransformation of val from baseLow into baseHigh using widthMultiplier bit multiplication
428  double KFin::redigi(double val, double baseLow, double baseHigh, int widthMultiplier) const {
429  const double base = pow(2, 1 - widthMultiplier);
430  const double transform = digi(baseLow / baseHigh, base);
431  return (floor(val * transform / baseLow) + .5) * baseHigh;
432  }
433 
434 } // namespace trklet
double baseUcot_
Definition: KFin.h:116
double hybridDiskZ(int layerId) const
Definition: Setup.h:298
bool inRange(double d, bool digi=false) const
Definition: DataFormats.h:106
bool enableTruncation_
Definition: KFin.h:92
double baseUzT_
Definition: KFin.h:117
constexpr int32_t ceil(float num)
double base(Variable v, Process p) const
Definition: DataFormats.h:492
double baseUinv2R_
Definition: KFin.h:114
double kz() const
Definition: Settings.h:314
std::bitset< TTBV::S_ > Frame
Definition: TTTypes.h:58
double hybridLayerR(int layerId) const
Definition: Setup.h:296
double dPhi_
Definition: KFin.h:56
double hybridRangePhi() const
Definition: Setup.h:300
double hybridMaxCot() const
Definition: Setup.h:292
std::vector< StreamTrack > StreamsTrack
Definition: TTTypes.h:67
bool psTilt_
Definition: KFin.h:60
double kphi1() const
Definition: Settings.h:311
double z_
Definition: KFin.h:54
double length2S() const
Definition: Setup.h:173
double phi_
Definition: KFin.h:52
double chosenRofZ() const
Definition: Setup.h:413
double baseUphi_
Definition: KFin.h:119
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
Definition: TTBV.h:20
std::pair< TTStubRef, Frame > FrameStub
Definition: TTTypes.h:60
TTBV ttBV(int i) const
Definition: DataFormats.h:78
std::vector< Stub > stubs_
Definition: KFin.h:110
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
std::vector< StreamStub > StreamsStub
Definition: TTTypes.h:66
double baseLr_
Definition: KFin.h:126
const std::vector< int > & seedingLayers(int seedType) const
base
Main Program
Definition: newFWLiteAna.py:92
double boundarieEta(int eta) const
Definition: Setup.h:417
double baseHzT_
Definition: KFin.h:133
double baseHcot_
Definition: KFin.h:132
int numFrames() const
Definition: Setup.h:153
int widthDSPbu() const
Definition: Setup.h:141
void consume(const tt::StreamsTrack &streamsTrack, const tt::StreamsStub &streamsStub)
Definition: KFin.cc:60
double digi(double val, double base) const
Definition: KFin.h:40
const ChannelAssignment * channelAssignment_
Definition: KFin.h:102
double baseHphi_
Definition: KFin.h:135
double lengthPS() const
Definition: Setup.h:175
double baseUr_
Definition: KFin.h:118
int phi0_shift() const
Definition: Settings.h:353
Class to assign tracklet tracks and stubs to output channel based on their Pt or seed type as well as...
double baseInvCot_
Definition: KFin.h:138
double baseHinv2R_
Definition: KFin.h:130
bool useTTStubResiduals_
Definition: KFin.h:94
float float float z
TTBV maybePattern(int binEta, int binZT, int binCot) const
int kfMinLayers() const
Definition: Setup.h:489
std::vector< FrameTrack > StreamTrack
Definition: TTTypes.h:64
bool equal(const T &first, const T &second)
Definition: Equal.h:32
int offsetStub(int channelTrack) const
int rresidbits() const
Definition: Settings.h:381
static std::string const input
Definition: EdmProvDump.cc:50
int width(Variable v, Process p) const
Definition: DataFormats.h:490
double chosenRofPhi() const
Definition: DataFormats.h:508
double baseLz_
Definition: KFin.h:128
double tiltedLayerLimitZ(int layer) const
Definition: Setup.h:165
double pitch2S() const
Definition: Setup.h:169
std::pair< TTTrackRef, Frame > FrameTrack
Definition: TTTypes.h:62
double pitchPS() const
Definition: Setup.h:171
int nbitst() const
Definition: Settings.h:348
int numSectorsEta() const
Definition: Setup.h:411
Definition: TTTypes.h:54
double beamWindowZ() const
Definition: Setup.h:180
double tiltUncertaintyR() const
Definition: Setup.h:253
std::string str() const
Definition: TTBV.h:253
TTStubRef ttStubRef_
Definition: KFin.h:47
GlobalPoint stubPos(const TTStubRef &ttStubRef) const
Definition: Setup.cc:820
int t_shift() const
Definition: Settings.h:354
double r_
Definition: KFin.h:50
double baseSector() const
Definition: Setup.h:420
double maxEta() const
Definition: Setup.h:211
const int region_
Definition: KFin.h:106
int layerId(const TTStubRef &ttStubRef) const
Definition: Setup.cc:507
std::vector< Track > tracks_
Definition: KFin.h:108
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const Settings * settings_
Definition: KFin.h:104
double stubR(const TTBV &hw, const TTStubRef &ttStubRef) const
Definition: Setup.cc:754
std::vector< std::vector< Track * > > input_
Definition: KFin.h:112
double baseLcot_
Definition: KFin.h:124
double baseHr_
Definition: KFin.h:134
double baseHphiT_
Definition: KFin.h:131
double dZ_
Definition: KFin.h:58
double tiltApproxSlope() const
Definition: Setup.h:249
double hybridRangeR() const
Definition: Setup.h:302
int z0_shift() const
Definition: Settings.h:355
bool isNull() const
Checks for null.
Definition: Ref.h:235
double outerRadius() const
Definition: Setup.h:241
int numLayers() const
Definition: Setup.h:215
int offsetLayerDisks() const
Definition: Setup.h:367
int offsetLayerId() const
Definition: Setup.h:369
double baseLinv2R_
Definition: KFin.h:122
int numProjectionLayers(int seedType) const
double kr() const
Definition: Settings.h:316
double baseLzT_
Definition: KFin.h:125
double redigi(double val, double baseLow, double baseHigh, int widthMultiplier) const
Definition: KFin.cc:428
int widthAddrBRAM18() const
Definition: Setup.h:151
bool psModule(int dtcId) const
Definition: Setup.cc:318
int val() const
Definition: TTBV.h:259
double tbInnerRadius() const
Definition: Setup.h:304
double baseUphiT_
Definition: KFin.h:115
double baseHz_
Definition: KFin.h:136
double scattering() const
Definition: Setup.h:255
int toUnsigned(int i) const
Definition: DataFormats.h:102
int trackletLayerId(const TTStubRef &ttStubRef) const
Definition: Setup.cc:514
int zresidbits() const
Definition: Settings.h:380
HLT enums.
int phiresidbits() const
Definition: Settings.h:379
Class to encode layer ids for Kalman Filter Layers consitent with rough r-z track parameters are coun...
Definition: LayerEncoding.h:18
int rinv_shift() const
Definition: Settings.h:352
double deltaPhi(double lhs, double rhs=0.)
Definition: Setup.h:37
double tiltApproxIntercept() const
Definition: Setup.h:251
double baseLphi_
Definition: KFin.h:127
const int layerIdKF(int binEta, int binZT, int binCot, int layerId) const
bool layerId(int seedType, const TTStubRef &ttStubRef, int &layerId) const
int indexLayerId(const TTStubRef &ttStubRef) const
Definition: Setup.cc:519
double baseLphiT_
Definition: KFin.h:123
Class to calculate and provide dataformats used by Track Trigger emulator.
Definition: DataFormats.h:216
double baseRegion() const
Definition: Setup.h:184
double sectorCot(int eta) const
Definition: Setup.h:428
const trackerTFP::DataFormats * dataFormats_
Definition: KFin.h:98
const tt::Setup * setup_
Definition: KFin.h:96
double kphi() const
Definition: Settings.h:310
void produce(tt::StreamsStub &accpetedStubs, tt::StreamsTrack &acceptedTracks, tt::StreamsStub &lostStubs, tt::StreamsTrack &lostTracks)
Definition: KFin.cc:202
bool barrel(const TTStubRef &ttStubRef) const
Definition: Setup.cc:524
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
const trackerTFP::LayerEncoding * layerEncoding_
Definition: KFin.h:100
double baseUz_
Definition: KFin.h:120
const DataFormat & format(Variable v, Process p) const
Definition: DataFormats.h:506
unsigned transform(const HcalDetId &id, unsigned transformCode)