16 : setup_(dataFormats->
setup()),
17 dataFormats_(dataFormats),
20 layerEncoding_(setup_->numSectorsEta(),
22 layerEncodingMap_(setup_->numSectorsEta(),
25 maybeLayer_(setup_->numSectorsEta(),
32 vector<const SensorModule*> sensorModules;
35 sensorModules.push_back(&
sm);
41 stable_sort(sensorModules.begin(), sensorModules.end(), smallerR);
42 stable_sort(sensorModules.begin(), sensorModules.end(), smallerZ);
43 sensorModules.erase(
unique(sensorModules.begin(), sensorModules.end(), equalRZ), sensorModules.end());
52 for (
int binZT = 0; binZT <
pow(2,
zT_->
width()); binZT++) {
56 const vector<double> zTs = {sectorZT +
zT -
zT_->
base() / 2., sectorZT +
zT +
zT_->
base() / 2.};
58 for (
int binCot = 0; binCot <
pow(2,
cot_->
width()); binCot++) {
62 vector<set<int>>
layers(boundaries);
63 map<int, const SensorModule*>& layermaps =
layerEncodingMap_[binEta][binZT][binCot];
69 for (
int i = 0;
i < boundaries;
i++) {
70 const int j = boundaries -
i - 1;
77 if (
abs(
d) <
sm->numColumns() *
sm->pitchCol() / 2.) {
79 layermaps[
sm->layerId()] =
sm;
110 const bool print =
false;
114 static constexpr auto layerIds = {1, 2, 3, 4, 5, 6, 11, 12, 13, 14, 15};
127 for (
int binZT = 0; binZT <
pow(2,
zT_->
width()); binZT++) {
128 for (
int binCot = 0; binCot <
pow(2,
cot_->
width()); binCot++) {
137 ss <<
"1" <<
TTBV(layerKF, widthLayer) << (
encode(maybes, layerKF) ?
"1" :
"0");
167 const vector<int>& maybes =
maybeLayer_[binEta][binZT][binCot];
const std::vector< int > & maybeLayer(int binEta, int binZT, int binCot) const
double chosenRofZ() const
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
double boundarieEta(int eta) const
const std::vector< int > & layerEncoding(int binEta, int binZT, int binCot) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
TTBV maybePattern(int binEta, int binZT, int binCot) const
int numSectorsEta() const
const std::vector< SensorModule > & sensorModules() const
def unique(seq, keepstr=True)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Abs< T >::type abs(const T &t)
std::vector< std::vector< std::vector< std::vector< int > > > > layerEncoding_
std::vector< std::vector< std::vector< std::vector< int > > > > maybeLayer_
ALPAKA_FN_ACC int sm(int ieta, int iphi)
const int layerIdKF(int binEta, int binZT, int binCot, int layerId) const
std::vector< std::vector< std::vector< std::map< int, const tt::SensorModule * > > > > layerEncodingMap_
Power< A, B >::type pow(const A &a, const B &b)