14 : setup_(&
setup), sm_(sm), ttStubRef_(ttStubRef), hybrid_(iConfig.getParameter<
bool>(
"UseHybrid")),
valid_(
true) {
36 d_ = sm->
r() + y * sm->
sin();
46 const double phi0 = sm->
phi() + atan2(x0,
d_);
47 const double phi1 = sm->
phi() + atan2(
x1,
d_);
48 const double c = (phi0 + phi1) / 2.;
49 const double m = (phi1 - phi0) /
setup.dtcNumMergedRows();
62 const double zT =
setup.chosenRofZ() *
z_ /
r_;
64 const double dZT =
setup.beamWindowZ() *
abs(1. -
setup.chosenRofZ() /
r_);
65 double zTMin = zT - dZT;
66 double zTMax = zT + dZT;
67 if (zTMin >=
setup.maxZT() || zTMax < -
setup.maxZT())
79 static const double chosenRofPhi =
hybrid_ ?
setup.hybridChosenRofPhi() :
setup.chosenRofPhi();
87 const double qOverPt =
bend_ *
setup.baseBend() * qOverPtOverBend;
89 const double dQoverPt =
setup.bendCut() * qOverPtOverBend;
91 const double maxQoverPt =
setup.invPtToDphi() /
minPt -
setup.dtcBaseQoverPt() / 2.;
92 double qOverPtMin =
digi(qOverPt - dQoverPt,
setup.dtcBaseQoverPt());
93 double qOverPtMax =
digi(qOverPt + dQoverPt,
setup.dtcBaseQoverPt());
94 if (qOverPtMin >= maxQoverPt || qOverPtMax < -maxQoverPt)
98 qOverPtMin =
max(qOverPtMin, -maxQoverPt);
99 qOverPtMax =
min(qOverPtMax, maxQoverPt);
102 qOverPt_ = {qOverPtMin, qOverPtMax};
113 if (
phiT_.first < 0.)
115 if (
phiT_.second >= 0.)
135 const int uBend =
distance(encodingBend.begin(),
pos);
163 const TTBV hwValid(1, 1);
165 return TTDTC::BV(hwGap.str() + hwR.str() + hwZ.str() + hwPhi.str() + hwAlpha.str() + hwBend.str() + hwLayer.str() +
176 else if (layerM == 2)
178 else if (layerM == 6 || layerM == 11)
180 else if (layerM == 5 || layerM == 12)
182 else if (layerM == 4 || layerM == 13)
184 else if (layerM == 14)
186 else if (layerM == 3 || layerM == 15)
190 if (
phiT_.first < 0.) {
198 if (
phiT_.second >= 0.) {
210 setcorEta.first =
bin;
213 for (
int bin = setcorEta.first; bin < setup_->numSectorsEta();
bin++)
215 setcorEta.second =
bin;
221 const TTBV hwValid(1, 1);
235 return TTDTC::BV(hwGap.str() + hwValid.
str() + hwR.str() + hwPhi.str() + hwZ.str() + hwQoverPtMin.str() +
236 hwQoverPtMax.str() + hwSectorEtaMin.str() + hwSectorEtaMax.str() + hwSectorPhis.str() +
int numSectorsPhi() const
double hybridBaseR(SensorModule::Type type) const
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
double baseSector() const
int hybridWidthPhi(SensorModule::Type type) const
int htWidthQoverPt() const
std::bitset< TTBV::S > BV
bool inRegion(int region) const
static const uint16_t valid_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< int > regions_
int dtcNumUnusedBits() const
void swap(Association< C > &lhs, Association< C > &rhs)
double htBaseQoverPt() const
constexpr std::array< uint8_t, layerIndexSize > layer
int hybridWidthR(SensorModule::Type type) const
int widthSectorEta() const
int hybridWidthZ(SensorModule::Type type) const
Abs< T >::type abs(const T &t)
double hybridBasePhi(SensorModule::Type type) const
double hybridBaseZ(SensorModule::Type type) const
Class to process and provide run-time constants used by Track Trigger emulators.
TTDTC::BV formatHybrid(int region) const
std::pair< double, double > phiT_
std::pair< double, double > qOverPt_
TTDTC::BV frame(int region) const
int encodedLayerId() const
double hybridBaseAlpha(SensorModule::Type type) const
int numSectorsEta() const
TTStubRef ttStubRef() const
int hybridWidthLayer() const
double digi(double value, double precision) const
std::pair< double, double > cot_
int hybridNumUnusedBits(SensorModule::Type type) const
int numOverlappingRegions() const
int hybridWidthBend(SensorModule::Type type) const
TTDTC::BV formatTMTT(int region) const
double baseRegion() const
int hybridWidthAlpha(SensorModule::Type type) const
Power< A, B >::type pow(const A &a, const B &b)
double boundarieEta(int eta) const