22 : enableTruncation_(iConfig.getParameter<
bool>(
"EnableTruncation")),
23 useTTStubResiduals_(iConfig.getParameter<
bool>(
"UseTTStubResiduals")),
25 dataFormats_(dataFormats),
26 layerEncoding_(layerEncoding),
27 channelAssignment_(channelAssignment),
30 input_(channelAssignment_->numChannelsTrack()),
32 baseUinv2R_(.5 * settings_->kphi1() / settings_->kr() *
pow(2, settings_->rinv_shift())),
33 baseUphiT_(settings_->kphi1() *
pow(2, settings_->phi0_shift())),
34 baseUcot_(settings_->kz() / settings_->kr() *
pow(2, settings_->t_shift())),
35 baseUzT_(settings_->kz() *
pow(2, settings_->z0_shift())),
36 baseUr_(settings_->kr()),
37 baseUphi_(settings_->kphi1()),
38 baseUz_(settings_->kz()),
48 baseHinv2R_(baseLinv2R_ *
pow(2, floor(log2(baseUinv2R_ / baseLinv2R_)))),
49 baseHphiT_(baseLphiT_ *
pow(2, floor(log2(baseUphiT_ / baseLphiT_)))),
50 baseHcot_(baseLcot_ *
pow(2, floor(log2(baseUcot_ / baseLcot_)))),
51 baseHzT_(baseLzT_ *
pow(2, floor(log2(baseUzT_ / baseLzT_)))),
52 baseHr_(baseLr_ *
pow(2, floor(log2(baseUr_ / baseLr_)))),
53 baseHphi_(baseLphi_ *
pow(2, floor(log2(baseUphi_ / baseLphi_)))),
54 baseHz_(baseLz_ *
pow(2, floor(log2(baseUz_ / baseLz_)))) {
64 static const double baseCot =
71 const int channelTrack = offsetTrack + channel;
73 const StreamTrack& streamTrack = streamsTrack[channelTrack];
74 input_[channel].reserve(streamTrack.size());
80 if (streamsStub[offsetStub + layer][
frame].
first.isNonnull())
88 const int channelTrack = offsetTrack + channel;
90 const StreamTrack& streamTrack = streamsTrack[channelTrack];
95 input.push_back(
nullptr);
111 input.push_back(
nullptr);
118 const FrameStub& frameStub = streamsStub[offsetStub + layer][
frame];
119 const TTStubRef& ttStubRef = frameStub.first;
129 TTBV hw(frameStub.second);
130 const TTBV hwRZ(hw, widthRZ, 0,
true);
141 if (
type == SensorModule::Disk2S)
144 double phi =
hwPhi.val(basePhi);
149 const int stubId = hwStubId.
val();
161 const double ttR = r;
163 stubs_.emplace_back(ttStubRef, layerId, layerIdTracklet,
false, stubId, ttR, phi, ttZ, psTilt);
165 stubs_.emplace_back(ttStubRef, layerId, layerIdTracklet,
false, stubId, r, phi, z, psTilt);
171 const FrameStub& frameStub = streamsStub[offsetStub + channelStub][
frame];
172 const TTStubRef& ttStubRef = frameStub.first;
204 stubs_.emplace_back(ttStubRef, layerId, layerIdTracklet,
true, stubId, ttR, phi, ttZ, psTilt);
206 stubs_.emplace_back(ttStubRef, layerId, layerIdTracklet,
true, stubId, r, phi, z, psTilt);
242 track.valid_ =
false;
265 track.valid_ =
false;
267 track.valid_ =
false;
269 track.valid_ =
false;
271 track.valid_ =
false;
326 track.valid_ =
false;
342 auto frameStub = [
this](
Track*
track,
int layer) {
343 auto equal = [layer](
Stub* stub) {
return stub->valid_ && stub->layerKF_ == layer; };
345 if (
it ==
track->stubs_.end() || !(*it)->valid_)
355 Frame(
"1" +
to_string(stub->
psTilt_) + layerId.str() + stubId.str() + r.str() + phi.str() + z.str()));
360 deque<Track*> accepted;
367 if (match && !
track->valid_)
368 lost.push_back(
track);
378 !all_of(stacks.begin(), stacks.end(), [](
const deque<Track*>&
tracks) {
return tracks.empty(); })) {
381 deque<Track*>&
stack = stacks[channel];
390 bool nothingToRoute(
true);
394 nothingToRoute =
false;
395 accepted.push_back(
track);
400 accepted.push_back(
nullptr);
406 accepted.erase(
limit, accepted.end());
409 for (
auto it = accepted.end();
it != accepted.begin();)
410 it = (*--
it) ? accepted.begin() : accepted.erase(
it);
412 const int channelTrack = offsetTrack + nodeDR;
415 lostTracks[channelTrack].reserve(lost.size());
417 lostStubs[offsetStub + layer].reserve(lost.size());
421 lostStubs[offsetStub + layer].emplace_back(frameStub(
track, layer));
424 acceptedTracks[channelTrack].reserve(accepted.size());
426 accpetedStubs[offsetStub + layer].reserve(accepted.size());
429 acceptedTracks[channelTrack].emplace_back(
FrameTrack());
431 accpetedStubs[offsetStub + layer].emplace_back(
FrameStub());
434 acceptedTracks[channelTrack].emplace_back(frameTrack(
track));
436 accpetedStubs[offsetStub + layer].emplace_back(frameStub(
track, layer));
453 double DRin::redigi(
double val,
double baseLow,
double baseHigh,
int widthMultiplier)
const {
454 const double base =
pow(2, 1 - widthMultiplier);
456 return (floor(
val *
transform / baseLow) + .5) * baseHigh;
double hybridDiskZ(int layerId) const
constexpr int32_t ceil(float num)
std::bitset< TTBV::S_ > Frame
double redigi(double val, double baseLow, double baseHigh, int widthMultiplier) const
double hybridLayerR(int layerId) const
double hybridRangePhi() const
double hybridMaxCot() const
std::vector< StreamTrack > StreamsTrack
std::vector< Stub > stubs_
double chosenRofZ() const
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
std::pair< TTStubRef, Frame > FrameStub
const trackerTFP::LayerEncoding * layerEncoding_
Class to process and provide run-time constants used by Track Trigger emulators.
std::vector< StreamStub > StreamsStub
int tbWidthR(SensorModule::Type type) const
double boundarieEta(int eta) const
int numChannelsTrack() const
int nodeDR(const TTTrackRef &ttTrackRef) const
Class to assign tracklet tracks and stubs to output channel based on their Pt or seed type as well as...
SensorModule::Type type(const TTStubRef &ttStubRef) const
TTBV maybePattern(int binEta, int binZT, int binCot) const
double hybridBaseR(SensorModule::Type type) const
std::vector< FrameTrack > StreamTrack
static std::string to_string(const XMLCh *ch)
bool equal(const T &first, const T &second)
int offsetStub(int channelTrack) const
static std::string const input
double tiltedLayerLimitZ(int layer) const
std::pair< TTTrackRef, Frame > FrameTrack
int numSectorsEta() const
double beamWindowZ() const
int numSeedingLayers() const
GlobalPoint stubPos(const TTStubRef &ttStubRef) const
void consume(const tt::StreamsTrack &streamsTrack, const tt::StreamsStub &streamsStub)
double baseSector() 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
Abs< T >::type abs(const T &t)
double digi(double val, double base) const
double hybridRangeR() const
bool isNull() const
Checks for null.
const trackerTFP::DataFormats * dataFormats_
double outerRadius() const
const Settings * settings_
std::vector< Track > tracks_
int offsetLayerDisks() const
int offsetLayerId() const
int numProjectionLayers(int seedType) const
int widthAddrBRAM18() const
bool psModule(int dtcId) const
void produce(tt::StreamsStub &accpetedStubs, tt::StreamsTrack &acceptedTracks, tt::StreamsStub &lostStubs, tt::StreamsTrack &lostTracks)
int trackletLayerId(const TTStubRef &ttStubRef) const
double disk2SR(int layerId, int r) const
Class to encode layer ids for Kalman Filter Layers consitent with rough r-z track parameters are coun...
const ChannelAssignment * channelAssignment_
T * pop_front(std::deque< T *> &ts) const
double deltaPhi(double lhs, double rhs=0.)
const int layerIdKF(int binEta, int binZT, int binCot, int layerId) const
bool layerId(int seedType, const TTStubRef &ttStubRef, int &layerId) const
int indexLayerId(const TTStubRef &ttStubRef) const
std::vector< std::vector< Track * > > input_
double baseRegion() const
double sectorCot(int eta) const
int widthSeedStubId() const
if(threadIdxLocalY==0 &&threadIdxLocalX==0)
bool barrel(const TTStubRef &ttStubRef) const
Power< A, B >::type pow(const A &a, const B &b)