20 layerEncoding_(layerEncoding),
22 ttStubRef_(ttStubRef),
23 hybrid_(iConfig.getParameter<
bool>(
"UseHybrid")),
56 const double phi0 = sm->
phi() + atan2(x0,
d_);
57 const double phi1 = sm->
phi() + atan2(x1,
d_);
58 const double c = (phi0 + phi1) / 2.;
59 const double m = (phi1 - phi0) /
setup->dtcNumMergedRows();
72 const double zT =
setup->chosenRofZ() *
z_ /
r_;
74 const double dZT =
setup->beamWindowZ() *
abs(1. -
setup->chosenRofZ() /
r_);
75 double zTMin = zT - dZT;
76 double zTMax = zT + dZT;
77 if (zTMin >=
setup->maxZT() || zTMax < -
setup->maxZT())
89 static const double chosenRofPhi =
hybrid_ ?
setup->hybridChosenRofPhi() :
setup->chosenRofPhi();
95 const double inv2ROverBend = sm->
pitchRow() / dr /
d_;
97 const double inv2R = -
bend_ *
setup->baseBend() * inv2ROverBend;
99 const double dInv2R =
setup->bendCut() * inv2ROverBend;
101 const double maxInv2R =
setup->invPtToDphi() /
minPt -
setup->dtcBaseInv2R() / 2.;
102 double inv2RMin =
digi(inv2R - dInv2R,
setup->dtcBaseInv2R());
103 double inv2RMax =
digi(inv2R + dInv2R,
setup->dtcBaseInv2R());
104 if (inv2RMin > maxInv2R || inv2RMax < -maxInv2R) {
108 inv2RMin =
max(inv2RMin, -maxInv2R);
109 inv2RMax =
min(inv2RMax, maxInv2R);
112 inv2R_ = {inv2RMin, inv2RMax};
123 if (
phiT_.first < 0.)
125 if (
phiT_.second >= 0.)
136 if (sm->
type() == SensorModule::Disk2S) {
145 const int uBend =
distance(encodingBend.begin(),
pos);
175 const TTBV hwValid(1, 1);
177 return Frame(hwGap.str() + hwR.str() + hwZ.str() + hwPhi.str() + hwAlpha.str() + hwBend.str() + hwLayer.str() +
188 else if (layerM == 2)
190 else if (layerM == 6 || layerM == 11)
192 else if (layerM == 5 || layerM == 12)
194 else if (layerM == 4 || layerM == 13)
196 else if (layerM == 14)
198 else if (layerM == 3 || layerM == 15)
202 if (
phiT_.first < 0.) {
210 if (
phiT_.second >= 0.) {
222 sectorEta.first =
bin;
225 for (
int bin = sectorEta.first; bin < setup_->numSectorsEta();
bin++)
227 sectorEta.second =
bin;
233 const TTBV hwValid(1, 1);
247 return Frame(hwGap.str() + hwValid.
str() + hwR.str() + hwPhi.str() + hwZ.str() + hwLayer.str() +
248 hwSectorPhis.str() + hwSectorEtaMin.str() + hwSectorEtaMax.str() + hwInv2RMin.str() +
std::bitset< TTBV::S_ > Frame
double hybridRangePhi() const
int tmttWidthSectorEta() const
int numSectorsPhi() const
int hybridWidthLayerId() const
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
tt::Frame formatHybrid(int region) const
int tmttWidthInv2R() const
Class to process and provide run-time constants used by Track Trigger emulators.
double tmttBasePhi() const
double boundarieEta(int eta) const
double hybridBaseAlpha(SensorModule::Type type) const
bool inRegion(int region) const
int hybridWidthZ(SensorModule::Type type) 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 hybridWidthPhi(SensorModule::Type type) const
void swap(Association< C > &lhs, Association< C > &rhs)
double hybridBaseR(SensorModule::Type type) const
int numSectorsEta() const
const LayerEncoding * layerEncoding_
double baseSector() const
int tmttNumUnusedBits() const
Abs< T >::type abs(const T &t)
int hybridNumUnusedBits(SensorModule::Type type) const
int hybridWidthAlpha(SensorModule::Type type) const
std::pair< double, double > phiT_
tt::Frame formatTMTT(int region) const
TTStubRef ttStubRef() const
tt::Frame frame(int region) const
int hybridWidthBend(SensorModule::Type type) const
Class to encode layer ids used between DTC and TFP in Hybrid.
int tmttWidthLayer() const
double digi(double value, double precision) const
double hybridBasePhi(SensorModule::Type type) const
std::pair< double, double > cot_
double hybridBaseZ(SensorModule::Type type) const
int numOverlappingRegions() const
int decode(tt::SensorModule *sm) const
double baseRegion() const
double tmttBaseInv2R() const
Power< A, B >::type pow(const A &a, const B &b)
int hybridWidthR(SensorModule::Type type) const
std::pair< double, double > inv2R_