17 : setup_(dataFormats->
setup()),
18 dataFormats_(dataFormats),
21 layerEncoding_(setup_->numSectorsEta(),
23 maybeLayer_(setup_->numSectorsEta(),
26 static constexpr
int boundaries = 2;
29 static constexpr
double delta = 1.e-3;
30 vector<const SensorModule*> sensorModules;
33 sensorModules.push_back(&sm);
39 stable_sort(sensorModules.begin(), sensorModules.end(), smallerR);
40 stable_sort(sensorModules.begin(), sensorModules.end(), smallerZ);
41 sensorModules.erase(
unique(sensorModules.begin(), sensorModules.end(), equalRZ), sensorModules.end());
50 for (
int binZT = 0; binZT <
pow(2,
zT_->
width()); binZT++) {
54 const vector<double> zTs = {sectorZT +
zT -
zT_->
base() / 2., sectorZT +
zT +
zT_->
base() / 2.};
56 for (
int binCot = 0; binCot <
pow(2,
cot_->
width()); binCot++) {
60 vector<set<int>>
layers(boundaries);
66 for (
int i = 0;
i < boundaries;
i++) {
67 const int j = boundaries -
i - 1;
72 (zTi - sm->z() + (sm->r() -
setup_->
chosenRofZ()) * coti) / (sm->cosTilt() - sm->sinTilt() * coti);
74 if (
abs(
d) < sm->numColumns() * sm->pitchCol() / 2.)
75 layers[
i].insert(sm->layerId());
105 const bool print =
false;
108 static constexpr
int widthLayer = 3;
109 static constexpr
auto layerIds = {1, 2, 3, 4, 5, 6, 11, 12, 13, 14, 15};
122 for (
int binZT = 0; binZT <
pow(2,
zT_->
width()); binZT++) {
123 for (
int binCot = 0; binCot <
pow(2,
cot_->
width()); binCot++) {
132 ss <<
"1" <<
TTBV(layerKF, widthLayer) << (
encode(maybes, layerKF) ?
"1" :
"0");
162 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_
const int layerIdKF(int binEta, int binZT, int binCot, int layerId) const
Power< A, B >::type pow(const A &a, const B &b)