|
|
#include <HTrphi.h>
|
std::pair< unsigned int, unsigned int > | cell (const L1fittedTrack *fitTrk) const override |
|
unsigned int | getMbinRange (const L1track2D &trk) const |
|
std::pair< float, float > | helix2Dconventional (unsigned int i, unsigned int j) const override |
|
std::pair< float, float > | helix2Dhough (unsigned int i, unsigned int j) const override |
|
| HTrphi (const Settings *settings, unsigned int iPhiSec, unsigned int iEtaReg, float etaMinSector, float etaMaxSector, float phiCentreSector, ErrorMonitor *errMon=nullptr) |
|
bool | mergedCell (unsigned int iQoverPtBin, unsigned int jPhiTrkBin) const |
|
unsigned int | nReceivedStubs () const |
|
void | store (Stub *stub, const std::vector< bool > &inEtaSubSecs) |
|
std::pair< unsigned int, unsigned int > | trueCell (const TP *tp) const override |
|
| ~HTrphi () override=default |
|
virtual const Array2D< std::unique_ptr< HTcell > > & | allCells () const |
|
virtual std::vector< const L1track2D * > | assocTrackCands2D (const TP &tp) const |
|
virtual void | disableBendFilter () |
|
virtual void | end () |
|
| HTbase (const Settings *settings, unsigned int iPhiSec, unsigned int iEtaReg, unsigned int nBinsX, unsigned int nBinsY) |
|
virtual unsigned int | numStubsExc () const |
|
virtual unsigned int | numStubsInc () const |
|
virtual unsigned int | numStubsOnTrackCands2D () const |
|
virtual unsigned int | numTrackCands2D () const |
|
virtual void | replaceTrackCands2D (const std::list< L1track2D > &newTracks) |
|
virtual const std::list< L1track2D > & | trackCands2D () const |
|
virtual | ~HTbase ()=default |
|
Definition at line 23 of file HTrphi.h.
◆ HTshape
Enumerator |
---|
square | |
diamond | |
hexagon | |
brick | |
Definition at line 25 of file HTrphi.h.
25 {
square, diamond, hexagon, brick };
◆ HTrphi()
tmtt::HTrphi::HTrphi |
( |
const Settings * |
settings, |
|
|
unsigned int |
iPhiSec, |
|
|
unsigned int |
iEtaReg, |
|
|
float |
etaMinSector, |
|
|
float |
etaMaxSector, |
|
|
float |
phiCentreSector, |
|
|
HTrphi::ErrorMonitor * |
errMon = nullptr |
|
) |
| |
Definition at line 29 of file HTrphi.cc.
36 :
HTbase(settings, iPhiSec, iEtaReg, settings->houghNbinsPt(), settings->houghNbinsPhi()),
38 shape_(static_cast<HTshape>(settings->shape())),
64 enableMerge2x2_ = (settings->enableMerge2x2() || settings->miniHTstage());
65 if (settings->miniHTstage()) {
80 throw cms::Exception(
"BadConfig") <<
"HTrphi: You are not allowed to set EnableMerge2x2 or MiniHTstage = True if "
81 "you have an odd number of bins "
106 bool rescaleMbins =
false;
111 unsigned int nTotalBins = 0;
118 throw cms::Exception(
"BadConfig") <<
"HTrphi: BusySectorUserMbin error";
134 float qOverPt = helix.first;
141 std::make_unique<HTcell>(settings, iPhiSec, iEtaReg, etaMinSector, etaMaxSector, qOverPt,
i,
mergedCell);
145 std::stringstream
text;
147 text <<
"=== R-PHI HOUGH TRANSFORM AXES RANGES: abs(q/Pt) < " <<
maxAbsQoverPtAxis_ <<
" & abs(track-phi) < "
154 text <<
"=== R-PHI HOUGH TRANSFORM WARNING: Rescaled m bin ranges specified by cfg parameter "
155 "BusySectorMbinRanges, as they were inconsistent with total number of m bins in HT.\n";
156 text <<
"=== Rescaled values for BusySectorMbinRanges =";
162 static std::once_flag printOnce;
164 printOnce, [](
string t) { PrintL1trk() <<
t; },
text.str());
169 std::vector<std::pair<float, float> > binCenters;
171 binCenters.push_back(this->helix2Dhough(
m,
c));
References binSizePhiTrkAxis_, binSizeQoverPtAxis_, tmtt::Settings::busyInputSectorKill(), busyInputSectorKill_, tmtt::Settings::busyInputSectorNumStubs(), busyInputSectorNumStubs_, tmtt::Settings::busySectorKill(), busySectorKill_, busySectorMbinHigh_, busySectorMbinLow_, tmtt::Settings::busySectorMbinOrder(), busySectorMbinOrder_, tmtt::Settings::busySectorMbinRanges(), busySectorMbinRanges_, tmtt::Settings::busySectorNumStubs(), busySectorNumStubs_, busySectorUseMbinOrder_, busySectorUseMbinRanges_, c, cellCenters_, diamond, tmtt::Settings::enableMerge2x2(), enableMerge2x2_, Exception, dqmMemoryStats::float, helix2Dconventional(), hexagon, tmtt::HTbase::htArray_, mps_fire::i, dqmiolumiharvest::j, tmtt::Settings::killSomeHTCellsRphi(), killSomeHTCellsRphi_, visualization-live-secondInstance_cfg::m, maxAbsPhiTrkAxis_, maxAbsQoverPtAxis_, tmtt::Settings::maxPtToMerge2x2(), mergedCell(), tmtt::Settings::miniHTstage(), minInvPtToMerge2x2_, nBinsPhiTrkAxis_, nBinsQoverPtAxis_, nReceivedStubs_, tmtt::HTbase::settings_, shape_, square, submitPVValidationJobs::t, and runonSM::text.
◆ ~HTrphi()
tmtt::HTrphi::~HTrphi |
( |
| ) |
|
|
overridedefault |
◆ calcLineGradArray()
float tmtt::HTrphi::calcLineGradArray |
( |
float |
r | ) |
const |
|
private |
◆ cell()
pair< unsigned int, unsigned int > tmtt::HTrphi::cell |
( |
const L1fittedTrack * |
fitTrk | ) |
const |
|
overridevirtual |
Implements tmtt::HTbase.
Definition at line 507 of file HTrphi.cc.
508 bool beamConstraint = fitTrk->done_bcon();
510 float qOverPt = beamConstraint ? fitTrk->qOverPt_bcon() : fitTrk->qOverPt();
512 float phiTrk = fitTrk->phiAtChosenR(beamConstraint);
516 int iQoverPt = 999999;
517 int iPhiTrk = 999999;
552 for (
auto cellCenter : binCenters) {
575 return pair<unsigned int, unsigned int>(iQoverPt, iPhiTrk);
References binSizePhiTrkAxis_, binSizeQoverPtAxis_, c, cellCenters_, ztail::d, SiPixelRawToDigiRegional_cfi::deltaPhi, reco::deltaPhi(), tmtt::L1fittedTrack::done_bcon(), infinity, visualization-live-secondInstance_cfg::m, maxAbsPhiTrkAxis_, maxAbsQoverPtAxis_, nBinsPhiTrkAxis_, nBinsQoverPtAxis_, tmtt::L1fittedTrack::phiAtChosenR(), phiCentreSector_, funct::pow(), tmtt::L1fittedTrack::qOverPt(), tmtt::L1fittedTrack::qOverPt_bcon(), shape_, and square.
◆ countFirmwareErrors()
void tmtt::HTrphi::countFirmwareErrors |
( |
unsigned int |
iQoverPtBin, |
|
|
unsigned int |
iPhiTrkBinMin, |
|
|
unsigned int |
iPhiTrkBinMax, |
|
|
unsigned int |
jPhiTrkBinMinLast, |
|
|
unsigned int |
jPhiTrkBinMaxLast |
|
) |
| |
|
private |
◆ getMbinRange()
unsigned int tmtt::HTrphi::getMbinRange |
( |
const L1track2D & |
trk | ) |
const |
Definition at line 317 of file HTrphi.cc.
319 unsigned int mBin = trk.cellLocationHT().first;
320 unsigned int mBinOrder;
328 if (mBinOrder == 99999)
329 throw cms::Exception(
"LogicError") <<
"HTrphi::getMbinRange() mBinOrder calculation wrong.";
338 throw cms::Exception(
"LogicError") <<
"HTrphi::getMbinRange() messed up";
References busySectorMbinHigh_, busySectorMbinLow_, busySectorMbinOrder_, busySectorMbinRanges_, busySectorUseMbinOrder_, busySectorUseMbinRanges_, tmtt::L1track2D::cellLocationHT(), Exception, mps_fire::i, and dqmdumpme::k.
Referenced by tmtt::MuxHToutputs::exec(), and killTracksBusySec().
◆ helix2Dconventional()
pair< float, float > tmtt::HTrphi::helix2Dconventional |
( |
unsigned int |
i, |
|
|
unsigned int |
j |
|
) |
| const |
|
overridevirtual |
◆ helix2Dhough()
pair< float, float > tmtt::HTrphi::helix2Dhough |
( |
unsigned int |
i, |
|
|
unsigned int |
j |
|
) |
| const |
|
overridevirtual |
Implements tmtt::HTbase.
Definition at line 404 of file HTrphi.cc.
405 unsigned int qOverPtBin =
i;
406 unsigned int phiTrkBin =
j;
423 float qOverPtBinCenter = .5;
424 float phiTrkBinCenter = .5;
427 qOverPtBinCenter = 0.;
429 float evenPhiPos = 0., oddPhiPos = 0.;
431 evenPhiPos = 1. / 6.;
440 phiTrkBinCenter = (qOverPtBin % 2 == 0) ? evenPhiPos : oddPhiPos;
453 return pair<float, float>(qOverPt, phiTrk);
References binSizePhiTrkAxis_, binSizeQoverPtAxis_, brick, reco::deltaPhi(), diamond, enableMerge2x2_, hexagon, mps_fire::i, dqmiolumiharvest::j, maxAbsPhiTrkAxis_, maxAbsQoverPtAxis_, mergedCell(), phiCentreSector_, shape_, and square.
Referenced by helix2Dconventional().
◆ iPhiRange()
pair< unsigned int, unsigned int > tmtt::HTrphi::iPhiRange |
( |
const Stub * |
stub, |
|
|
unsigned int |
iQoverPtBin, |
|
|
bool |
debug = false |
|
) |
| const |
|
private |
Definition at line 348 of file HTrphi.cc.
363 float phiTrkMin = phiTrk - phiTrkVar;
364 float phiTrkMax = phiTrk + phiTrkVar;
368 pair<float, float> phiTrkRange(deltaPhiMin, deltaPhiMax);
374 return iPhiTrkBinRange;
References funct::abs(), binSizePhiTrkAxis_, binSizeQoverPtAxis_, chosenRofPhi_, tmtt::HTbase::convertCoordRangeToBinRange(), reco::deltaPhi(), invPtToDphi_, killSomeHTCellsRphi_, maxAbsPhiTrkAxis_, maxAbsQoverPtAxis_, nBinsPhiTrkAxis_, tmtt::Stub::phi(), phiCentreSector_, and tmtt::Stub::r().
Referenced by store().
◆ killTracksBusySec()
list< L1track2D > tmtt::HTrphi::killTracksBusySec |
( |
const std::list< L1track2D > & |
tracks | ) |
const |
|
overrideprivatevirtual |
◆ mergedCell()
bool tmtt::HTrphi::mergedCell |
( |
unsigned int |
iQoverPtBin, |
|
|
unsigned int |
jPhiTrkBin |
|
) |
| const |
Definition at line 581 of file HTrphi.cc.
585 unsigned int i = iQoverPtBin;
591 unsigned int numQoverPtBinsToMerge = 2 *
min((
unsigned int)(std::round(fMergeBins)), (
nBinsQoverPtAxis_ / 4));
592 const float small = 0.001;
594 numQoverPtBinsToMerge++;
596 if (
min(
i, iB) < numQoverPtBinsToMerge)
References binSizeQoverPtAxis_, enableMerge2x2_, mps_fire::i, maxAbsQoverPtAxis_, MatrixUtil::merge(), min(), minInvPtToMerge2x2_, and nBinsQoverPtAxis_.
Referenced by helix2Dhough(), HTrphi(), and store().
◆ nReceivedStubs()
unsigned int tmtt::HTrphi::nReceivedStubs |
( |
| ) |
const |
|
inline |
◆ rowOrder()
vector< unsigned int > tmtt::HTrphi::rowOrder |
( |
unsigned int |
numRows | ) |
const |
|
overrideprivatevirtual |
Implements tmtt::HTbase.
Definition at line 658 of file HTrphi.cc.
659 vector<unsigned int> iOrder;
662 const bool oddNumRows = (numRows % 2 == 1);
666 unsigned int middleRow = (numRows - 1) / 2;
667 iOrder.push_back(middleRow);
668 for (
unsigned int i = 1;
i <= (numRows - 1) / 2;
i++) {
669 iOrder.push_back(middleRow -
i);
670 iOrder.push_back(middleRow +
i);
673 unsigned int startRowPos = numRows / 2;
674 unsigned int startRowNeg = startRowPos - 1;
675 for (
unsigned int i = 0;
i < numRows / 2;
i++) {
676 iOrder.push_back(startRowNeg -
i);
677 iOrder.push_back(startRowPos +
i);
References mps_fire::i.
◆ store()
void tmtt::HTrphi::store |
( |
Stub * |
stub, |
|
|
const std::vector< bool > & |
inEtaSubSecs |
|
) |
| |
Definition at line 179 of file HTrphi.cc.
184 unsigned int jPhiTrkBinMinLast = 0;
185 unsigned int jPhiTrkBinMaxLast = 99999;
193 pair<unsigned int, unsigned int> jRange = this->
iPhiRange(stub,
i);
194 unsigned int jPhiTrkBinMin = jRange.first;
195 unsigned int jPhiTrkBinMax = jRange.second;
198 for (
unsigned int j = jPhiTrkBinMin;
j <= jPhiTrkBinMax;
j++) {
199 bool canStoreStub =
true;
200 unsigned int iStore =
i;
201 unsigned int jStore =
j;
216 canStoreStub =
false;
226 this->
countFirmwareErrors(
i, jPhiTrkBinMin, jPhiTrkBinMax, jPhiTrkBinMinLast, jPhiTrkBinMaxLast);
227 jPhiTrkBinMinLast = jPhiTrkBinMin;
228 jPhiTrkBinMaxLast = jPhiTrkBinMax;
254 float phiTrkMin = phiTrk - phiTrkVar;
255 float phiTrkMax = phiTrk + phiTrkVar;
266 std::pair<bool, unsigned int> binCenter;
267 std::pair<bool, unsigned int>
binMin;
268 std::pair<bool, unsigned int>
binMax;
269 binCenter.second = iCenter / 3;
272 binCenter.first = !(iCenter % 3 == 2);
273 binMin.first = (iMin % 3 == 0);
274 binMax.first = (iMax % 3 == 0);
290 float phiTrkMin = phiTrk - phiTrkVar;
291 float phiTrkMax = phiTrk + phiTrkVar;
294 std::pair<bool, unsigned int>
binMin;
295 std::pair<bool, unsigned int>
binMax;
298 binMin.first = (iMin % 2 ==
i % 2);
299 binMax.first = (iMax % 2 ==
i % 2);
References funct::abs(), spclusmultinvestigator_cfi::binMax, binMin, binSizePhiTrkAxis_, binSizeQoverPtAxis_, brick, busyInputSectorKill_, busyInputSectorNumStubs_, calcLineGradArray(), chosenRofPhi_, countFirmwareErrors(), reco::deltaPhi(), diamond, enableMerge2x2_, errMon_, hexagon, tmtt::HTbase::htArray_, mps_fire::i, invPtToDphi_, iPhiRange(), dqmiolumiharvest::j, SiStripPI::max, maxAbsPhiTrkAxis_, maxAbsQoverPtAxis_, tmtt::HTrphi::ErrorMonitor::maxLineGradient, mergedCell(), nBinsPhiTrkAxis_, nBinsQoverPtAxis_, nReceivedStubs_, tmtt::Stub::phi(), phiCentreSector_, tmtt::Stub::r(), shape_, and square.
◆ trueCell()
pair< unsigned int, unsigned int > tmtt::HTrphi::trueCell |
( |
const TP * |
tp | ) |
const |
|
overridevirtual |
Implements tmtt::HTbase.
Definition at line 473 of file HTrphi.cc.
475 float qOverPt =
tp->qOverPt();
500 return pair<unsigned int, unsigned int>(iQoverPt, iPhiTrk);
References binSizePhiTrkAxis_, binSizeQoverPtAxis_, chosenRofPhi_, SiPixelRawToDigiRegional_cfi::deltaPhi, reco::deltaPhi(), maxAbsPhiTrkAxis_, maxAbsQoverPtAxis_, nBinsPhiTrkAxis_, nBinsQoverPtAxis_, phiCentreSector_, and cmsswSequenceInfo::tp.
Referenced by tmtt::L1track3D::cheat().
◆ binSizePhiTrkAxis_
float tmtt::HTrphi::binSizePhiTrkAxis_ |
|
private |
◆ binSizeQoverPtAxis_
float tmtt::HTrphi::binSizeQoverPtAxis_ |
|
private |
◆ busyInputSectorKill_
bool tmtt::HTrphi::busyInputSectorKill_ |
|
private |
◆ busyInputSectorNumStubs_
unsigned int tmtt::HTrphi::busyInputSectorNumStubs_ |
|
private |
◆ busySectorKill_
bool tmtt::HTrphi::busySectorKill_ |
|
private |
◆ busySectorMbinHigh_
std::vector<unsigned int> tmtt::HTrphi::busySectorMbinHigh_ |
|
private |
◆ busySectorMbinLow_
std::vector<unsigned int> tmtt::HTrphi::busySectorMbinLow_ |
|
private |
◆ busySectorMbinOrder_
std::vector<unsigned int> tmtt::HTrphi::busySectorMbinOrder_ |
|
private |
◆ busySectorMbinRanges_
std::vector<unsigned int> tmtt::HTrphi::busySectorMbinRanges_ |
|
private |
◆ busySectorNumStubs_
unsigned int tmtt::HTrphi::busySectorNumStubs_ |
|
private |
◆ busySectorUseMbinOrder_
bool tmtt::HTrphi::busySectorUseMbinOrder_ |
|
private |
◆ busySectorUseMbinRanges_
bool tmtt::HTrphi::busySectorUseMbinRanges_ |
|
private |
◆ cellCenters_
std::vector<std::vector<std::pair<float, float> > > tmtt::HTrphi::cellCenters_ |
|
private |
◆ chosenRofPhi_
float tmtt::HTrphi::chosenRofPhi_ |
|
private |
◆ enableMerge2x2_
bool tmtt::HTrphi::enableMerge2x2_ |
|
private |
◆ errMon_
◆ invPtToDphi_
float tmtt::HTrphi::invPtToDphi_ |
|
private |
◆ killSomeHTCellsRphi_
unsigned int tmtt::HTrphi::killSomeHTCellsRphi_ |
|
private |
◆ maxAbsPhiTrkAxis_
float tmtt::HTrphi::maxAbsPhiTrkAxis_ |
|
private |
◆ maxAbsQoverPtAxis_
float tmtt::HTrphi::maxAbsQoverPtAxis_ |
|
private |
◆ minInvPtToMerge2x2_
float tmtt::HTrphi::minInvPtToMerge2x2_ |
|
private |
◆ nBinsPhiTrkAxis_
unsigned int tmtt::HTrphi::nBinsPhiTrkAxis_ |
|
private |
◆ nBinsQoverPtAxis_
unsigned int tmtt::HTrphi::nBinsQoverPtAxis_ |
|
private |
◆ nReceivedStubs_
unsigned int tmtt::HTrphi::nReceivedStubs_ |
|
private |
◆ phiCentreSector_
float tmtt::HTrphi::phiCentreSector_ |
|
private |
◆ shape_
std::atomic< unsigned int > numErrorsTypeB
unsigned int busySectorNumStubs() const
unsigned int nReceivedStubs_
unsigned int busyInputSectorNumStubs_
float binSizeQoverPtAxis_
virtual std::pair< unsigned int, unsigned int > convertCoordRangeToBinRange(std::pair< float, float > coordRange, unsigned int nBinsAxis, float coordAxisMin, float coordAxisBinSize, unsigned int killSomeHTcells) const
const std::vector< unsigned int > & busySectorMbinOrder() const
unsigned int nBinsQoverPtAxis_
std::pair< float, float > helix2Dconventional(unsigned int i, unsigned int j) const override
constexpr double deltaPhi(double phi1, double phi2)
bool busySectorUseMbinRanges_
bool busyInputSectorKill_
float minInvPtToMerge2x2_
bool busyInputSectorKill() const
unsigned int busySectorNumStubs_
const Settings * settings_
double square(const double a)
unsigned int busyInputSectorNumStubs() const
unsigned int nBinsPhiTrkAxis_
std::pair< unsigned int, unsigned int > iPhiRange(const Stub *stub, unsigned int iQoverPtBin, bool debug=false) const
std::atomic< unsigned int > numErrorsTypeA
unsigned int killSomeHTCellsRphi_
std::pair< float, float > helix2Dhough(unsigned int i, unsigned int j) const override
std::vector< std::vector< std::pair< float, float > > > cellCenters_
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
std::vector< unsigned int > busySectorMbinOrder_
unsigned int getMbinRange(const L1track2D &trk) const
std::vector< unsigned int > busySectorMbinLow_
Array2D< std::unique_ptr< HTcell > > htArray_
bool busySectorUseMbinOrder_
bool busySectorKill() const
HTbase(const Settings *settings, unsigned int iPhiSec, unsigned int iEtaReg, unsigned int nBinsX, unsigned int nBinsY)
std::atomic< float > maxLineGradient
bool mergedCell(unsigned int iQoverPtBin, unsigned int jPhiTrkBin) const
std::vector< unsigned int > busySectorMbinRanges_
Power< A, B >::type pow(const A &a, const B &b)
Abs< T >::type abs(const T &t)
std::atomic< unsigned int > numErrorsNorm
def merge(dictlist, TELL=False)
std::vector< unsigned int > busySectorMbinHigh_
void countFirmwareErrors(unsigned int iQoverPtBin, unsigned int iPhiTrkBinMin, unsigned int iPhiTrkBinMax, unsigned int jPhiTrkBinMinLast, unsigned int jPhiTrkBinMaxLast)
float calcLineGradArray(float r) const
const std::vector< unsigned int > & busySectorMbinRanges() const