11 namespace trackerDTC {
14 : setup_(&setup), sm_(sm), ttStubRef_(ttStubRef), hybrid_(iConfig.getParameter<bool>(
"UseHybrid")),
valid_(
true) {
17 const MeasurementPoint& mp = ttStubRef->clusterRef(0)->findAverageLocalCoordinatesCentered();
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.;
65 double zTMin = zT - dZT;
66 double zTMax = zT + dZT;
67 if (zTMin >= setup.
maxZT() || zTMax < -setup.
maxZT())
85 const double qOverPtOverBend = sm->
pitchRow() / dr /
d_;
87 const double qOverPt =
bend_ * setup.
baseBend() * qOverPtOverBend;
89 const double dQoverPt = setup.
bendCut() * qOverPtOverBend;
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.)
134 const auto pos =
find(encodingBend.begin(), encodingBend.end(),
abs(ttStubRef->bendBE()));
135 const int uBend =
distance(encodingBend.begin(), pos);
136 bend_ =
pow(-1, signbit(bend_)) * uBend;
146 double Stub::digi(
double value,
double precision)
const {
return (floor(value / precision) + .5) * precision; }
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 hybridWidthR(SensorModule::Type type) const
double hybridMinPt() const
const edm::EventSetup & c
double digi(double value, double precision) const
const std::vector< double > & encodingBend(int windowSize, bool psModule) const
double baseSector() const
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
double chosenRofZ() const
double baseRegion() const
double hybridChosenRofPhi() const
int widthSectorEta() const
int hybridWidthBend(SensorModule::Type type) const
double hybridBaseZ(SensorModule::Type type) const
std::bitset< TTBV::S > BV
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 encodedLayerId() const
int hybridWidthLayer() const
int hybridNumUnusedBits(SensorModule::Type type) const
void swap(Association< C > &lhs, Association< C > &rhs)
constexpr std::array< uint8_t, layerIndexSize > layer
TTDTC::BV formatTMTT(int region) const
double invPtToDphi() const
int dtcNumUnusedBits() const
int numSectorsEta() const
TTDTC::BV formatHybrid(int region) const
TTDTC::BV frame(int region) const
int htWidthQoverPt() const
double beamWindowZ() const
Abs< T >::type abs(const T &t)
Class to process and provide run-time constants used by Track Trigger emulators.
double hybridMaxCot() const
std::pair< double, double > phiT_
std::pair< double, double > qOverPt_
double hybridBaseAlpha(SensorModule::Type type) const
int hybridWidthAlpha(SensorModule::Type type) const
int hybridWidthZ(SensorModule::Type type) const
double hybridBaseR(SensorModule::Type type) const
double hybridBasePhi(SensorModule::Type type) const
int hybridWidthPhi(SensorModule::Type type) const
double boundarieEta(int eta) const
std::pair< double, double > cot_
int dtcNumMergedRows() const
double dtcBaseQoverPt() const
int numOverlappingRegions() const
double htBaseQoverPt() const
bool inRegion(int region) const
Power< A, B >::type pow(const A &a, const B &b)
int numSectorsPhi() const
double chosenRofPhi() const
int dtcWidthRowLUT() const