20 : enableTruncation_(iConfig.getParameter<
bool>(
"EnableTruncation")),
22 dataFormats_(dataFormats),
23 layerEncoding_(layerEncoding),
24 channelAssignment_(channelAssignment),
26 input_(channelAssignment_->numNodesDR()) {}
31 auto nonNullTrack = [](
int sum,
const FrameTrack&
frame) {
return sum + (
frame.first.isNonnull() ? 1 : 0); };
32 auto nonNullStub = [](
int sum,
const FrameStub&
frame) {
return sum + (
frame.first.isNonnull() ? 1 : 0); };
37 const int streamTrackId = offsetTrack + channel;
39 const StreamTrack& streamTrack = streamsTrack[streamTrackId];
40 input_[channel].reserve(streamTrack.size());
41 sizeTracks += accumulate(streamTrack.begin(), streamTrack.end(), 0, nonNullTrack);
43 const StreamStub& streamStub = streamsStub[offsetStub + layer];
44 sizeStubs += accumulate(streamStub.begin(), streamStub.end(), 0, nonNullStub);
52 const int streamTrackId = offsetTrack + channel;
54 const StreamTrack& streamTrack = streamsTrack[streamTrackId];
57 if (frameTrack.first.isNull()) {
58 input.push_back(
nullptr);
64 const FrameStub& frameStub = streamsStub[offsetStub + layer][
frame];
65 if (frameStub.first.isNull())
67 TTBV ttBV = frameStub.second;
80 stubs_.emplace_back(frameStub.first, r, phi, z, layerIdBV.val(), tiltBV.val(), layer);
81 stubs.push_back(&
stubs_.back());
83 TTBV ttBV = frameTrack.second;
103 Frame(
"1" + maybe.
str() + sectorPhiBV.str() + sectorEtaBV.str() + phiTBV.str() +
104 inv2RBV.str() + zTBV.str() + cotBV.str()));
120 static constexpr int usedMSBpitchOverRaddr = 1;
121 static const double baseRlut =
126 static const double basePhi =
128 static const double baseInvR =
134 static constexpr int usedMSBCotLutaddr = 3;
136 static const double baseCot =
dataFormats_->
base(Variable::cot, Process::kfin);
150 const double sumdz =
track.zT_ + stub->
z_;
153 const double cot =
digi(
abs(dZ *
digi(1. / r, baseInvR) + sumcot), baseCotLut);
154 double lengthZ = length;
157 lengthZ = length *
cot;
164 stub->
dZ_ = lengthZ + baseZ;
171 auto frameStub = [
this](
Track*
track,
int layer) {
172 auto equal = [layer](
Stub* stub) {
return stub->channel_ == layer; };
188 const int offset = nodeKF * nMux;
189 deque<Track*> accepted;
191 vector<deque<Track*>> stacks(nMux);
192 vector<deque<Track*>>
inputs(nMux);
193 for (
int channel = 0; channel < nMux; channel++) {
199 !all_of(stacks.begin(), stacks.end(), [](
const deque<Track*>&
tracks) {
return tracks.empty(); })) {
201 for (
int channel = 0; channel < nMux; channel++) {
202 deque<Track*>&
stack = stacks[channel];
208 bool nothingToRoute(
true);
209 for (
int channel = nMux - 1; channel >= 0; channel--) {
212 nothingToRoute =
false;
213 accepted.push_back(
track);
218 accepted.push_back(
nullptr);
224 accepted.erase(
limit, accepted.end());
227 for (
auto it = accepted.end();
it != accepted.begin();)
228 it = (*--
it) ? accepted.begin() : accepted.erase(
it);
230 const int channelTrack = offsetTrack + nodeKF;
233 lostTracks[channelTrack].reserve(lost.size());
235 lostStubs[offsetStub + layer].reserve(lost.size());
239 lostStubs[offsetStub + layer].emplace_back(frameStub(
track, layer));
242 acceptedTracks[channelTrack].reserve(accepted.size());
244 accpetedStubs[offsetStub + layer].reserve(accepted.size());
247 acceptedTracks[channelTrack].emplace_back(
FrameTrack());
249 accpetedStubs[offsetStub + layer].emplace_back(
FrameStub());
252 acceptedTracks[channelTrack].emplace_back(frameTrack(
track));
254 accpetedStubs[offsetStub + layer].emplace_back(frameStub(
track, layer));
constexpr int32_t ceil(float num)
std::bitset< TTBV::S_ > Frame
std::vector< StreamTrack > StreamsTrack
double chosenRofZ() const
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
std::pair< TTStubRef, Frame > FrameStub
std::vector< Stub > stubs_
Class to process and provide run-time constants used by Track Trigger emulators.
std::vector< StreamStub > StreamsStub
std::vector< FrameStub > StreamStub
void consume(const tt::StreamsTrack &streamsTrack, const tt::StreamsStub &streamsStub)
double digi(double val, double base) const
const ChannelAssignment * channelAssignment_
Class to assign tracklet tracks and stubs to output channel based on their Pt or seed type as well as...
TTBV maybePattern(int binEta, int binZT, int binCot) const
std::vector< FrameTrack > StreamTrack
bool equal(const T &first, const T &second)
static std::string const input
std::pair< TTTrackRef, Frame > FrameTrack
double beamWindowZ() const
double tiltUncertaintyR() const
T * pop_front(std::deque< T *> &ts) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::vector< Track > tracks_
Abs< T >::type abs(const T &t)
std::vector< std::vector< Track * > > input_
double tiltApproxSlope() const
int widthAddrBRAM18() const
bool psModule(int dtcId) const
double tbInnerRadius() const
double scattering() const
Class to encode layer ids for Kalman Filter Layers consitent with rough r-z track parameters are coun...
double tiltApproxIntercept() const
double sectorCot(int eta) const
const trackerTFP::DataFormats * dataFormats_
void produce(tt::StreamsStub &accpetedStubs, tt::StreamsTrack &acceptedTracks, tt::StreamsStub &lostStubs, tt::StreamsTrack &lostTracks)
bool barrel(const TTStubRef &ttStubRef) const
Power< A, B >::type pow(const A &a, const B &b)
const trackerTFP::LayerEncoding * layerEncoding_