20 DataFormats::DataFormats()
35 template <Variable v, Process p>
40 countFormats<v, ++p>();
80 template <Variable v, Process p>
87 fillDataFormats<v, ++p>();
89 fillDataFormats<++v>();
93 template <Variable v, Process p, Process it>
99 fillFormats<v, p, ++it>();
103 template <
typename... Ts>
110 template <
int it,
typename... Ts>
113 formats_[+
v][+
p]->extract(ttBV,
get<
sizeof...(Ts) - 1 - it>(
data));
114 if constexpr (it + 1 !=
sizeof...(Ts))
115 extractStub<it + 1>(
p, ttBV,
data);
119 template <
typename... Ts>
127 template <
int it,
typename... Ts>
131 if constexpr (it + 1 !=
sizeof...(Ts))
132 attachStub<it + 1>(
p,
data, ttBV);
136 template <
typename... Ts>
143 template <
int it,
typename... Ts>
146 formats_[+
v][+
p]->extract(ttBV,
get<
sizeof...(Ts) - 1 - it>(
data));
147 if constexpr (it + 1 !=
sizeof...(Ts))
148 extractTrack<it + 1>(
p, ttBV,
data);
152 template <
typename... Ts>
160 template <
int it,
typename... Ts>
164 if constexpr (it + 1 !=
sizeof...(Ts))
165 attachTrack<it + 1>(
p,
data, ttBV);
169 template <
typename... Ts>
171 : dataFormats_(dataFormats), p_(
p), frame_(
frame), trackId_(0) {
172 dataFormats_->convertStub(
p,
frame.second, data_);
176 template <
typename... Ts>
177 template <
typename... Others>
179 : dataFormats_(stub.dataFormats()),
186 template <
typename... Ts>
188 : dataFormats_(dataFormats), p_(
p), frame_(ttStubRef,
Frame()), data_(
data...), trackId_(0) {}
208 :
Stub(stub, stub.r(), stub.phi(), stub.z(), stub.layer(), stub.inv2RMin(), stub.inv2RMax()),
358 :
Stub(stub, stub.r(), stub.phi(), stub.z(), dPhi, dZ),
layer_(layer) {
381 :
Stub(stub, stub.r(), 0., 0., stub.dPhi(), stub.dZ()),
layer_(stub.layer()) {
392 template <
typename... Ts>
394 : dataFormats_(dataFormats), p_(
p), frame_(
frame) {
395 dataFormats_->convertTrack(p_,
frame.second, data_);
399 template <
typename... Ts>
400 template <
typename... Others>
405 template <
typename... Ts>
406 template <
typename... Others>
408 : dataFormats_(stub.dataFormats()), p_(++stub.
p()), frame_(ttTrackRef,
Frame()), data_(
data...) {}
411 template <
typename... Ts>
413 : dataFormats_(dataFormats), p_(
p), frame_(ttTrackRef,
Frame()), data_(
data...) {}
418 vector<int> nStubs(
stubs_.size(), 0);
420 nStubs[stub->layer()]++;
424 const int layer = stub->layer();
433 stubs_(
setup()->numLayers()),
434 hitPattern_(0,
setup()->numLayers()) {
445 const TTBV& maybePattern,
452 :
Track(ttTrackRef, dataFormats,
Process::
kfin, maybePattern,
sectorPhi,
sectorEta,
phiT,
inv2R,
zT,
cot),
453 stubs_(
setup()->numLayers()),
454 hitPattern_(0,
setup()->numLayers()) {
459 vector<TTStubRef>
stubs;
485 const double invR = -this->
inv2R() * 2.;
494 vector<TTStubRef> ttStubRefs;
495 const int nLayer = stubs.size();
496 ttStubRefs.reserve(nLayer);
497 for (
const StubKF& stub : stubs) {
498 hitVector.
set(stub.layer());
499 const TTStubRef& ttStubRef = stub.ttStubRef();
502 ttStubRefs.push_back(ttStubRef);
504 static constexpr
int nPar = 4;
505 static constexpr
double d0 = 0.;
506 static constexpr
double trkMVA1 = 0.;
507 static constexpr
double trkMVA2 = 0.;
508 static constexpr
double trkMVA3 = 0.;
512 invR,
phi0,
cot,
z0,
d0, chi2phi, chi2z, trkMVA1, trkMVA2, trkMVA3,
hitPattern,
nPar,
bField);
513 ttTrack.setStubRefs(ttStubRefs);
539 const double cot = this->
cot();
540 const double z0 = this->
z0();
541 static constexpr
double d0 = 0.;
542 static constexpr
double chi2phi = 0.;
543 static constexpr
double chi2z = 0;
544 static constexpr
double trkMVA1 = 0.;
545 static constexpr
double trkMVA2 = 0.;
546 static constexpr
double trkMVA3 = 0.;
548 static constexpr
int nPar = 4;
549 static constexpr
double bField = 0.;
553 inv2R,
phi0,
cot,
z0,
d0, chi2phi, chi2z, trkMVA1, trkMVA2, trkMVA3,
hitPattern,
nPar,
bField);
576 const double mintPt = iConfig.
getParameter<
bool>(
"UseHybrid") ?
setup->hybridMinPtCand() :
setup->minPt();
592 const double chosenRofPhi =
698 const double rangeR =
722 const double chosenRofPhi =
724 const double rangeR = 2. *
max(
abs(
setup->outerRadius() - chosenRofPhi),
abs(
setup->innerRadius() - chosenRofPhi));
748 const double rangeR =
802 const double chosenRofPhi =
868 range_ =
zT.range() + rangeFactor *
zT.base();
constexpr std::initializer_list< Process > Processes
constexpr int32_t ceil(float num)
double extract(double base, int size, bool twos=false)
std::bitset< TTBV::S_ > Frame
T getParameter(std::string const &) const
static const char layer_[]
StubGP(const tt::FrameStub &frame, const DataFormats *dataFormats, int sectorPhi, int sectorEta)
TTTrack< Ref_Phase2TrackerDigi_ > ttTrack(const std::vector< StubKF > &stubs) const
double chosenRofZ() const
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
std::pair< TTStubRef, Frame > FrameStub
Class to process and provide run-time constants used by Track Trigger emulators.
double v1(const TTStubRef &ttStubRef, double cot) const
const std::bitset< S_ > & bs() const
int htNumBinsInv2R() const
int numDTCsPerRegion() const
StubZHT(const tt::FrameStub &frame, const DataFormats *dataFormats)
std::vector< std::vector< StubKFin * > > stubs_
DataFormat format(Variable v) const
Track(const tt::FrameTrack &frame, const DataFormats *dataFormats, Process p)
StubHT(const tt::FrameStub &frame, const DataFormats *dataFormats, int inv2R)
std::pair< TTTrackRef, Frame > FrameTrack
double v0(const TTStubRef &ttStubRef, double inv2R) const
StubKFin(const tt::FrameStub &frame, const DataFormats *dataFormats, int layer)
const DataFormats * dataFormats_
TrackDR(const tt::FrameTrack &frame, const DataFormats *dataFormats)
double baseSector() const
const DataFormats * dataFormats_
Abs< T >::type abs(const T &t)
const tt::Setup * setup() const
TrackKFin(const tt::FrameTrack &frame, const DataFormats *dataFormats, const std::vector< StubKFin *> &stubs)
int width(Variable v) const
double hybridChosenRofPhi() const
int numDTCsPerTFP() const
int mhtNumBinsInv2R() const
const DataFormats * dataFormats() const
static constexpr float d0
Class to store the L1 Track Trigger tracks.
std::tuple< Ts... > data_
StubMHT(const tt::FrameStub &frame, const DataFormats *dataFormats)
std::vector< TTStubRef > ttStubRefs(const TTBV &hitPattern, const std::vector< int > &layerMap) const
TTTrack< Ref_Phase2TrackerDigi_ > ttTrack() const
char data[epos_bytes_allocation]
TrackKF(const tt::FrameTrack &frame, const DataFormats *dataFormats)
int mhtNumBinsPhiT() const
static unsigned int const shift
StubKF(const tt::FrameStub &frame, const DataFormats *dataFormats, int layer)
void setTrackSeedType(int aSeed)
std::tuple< Ts... > data_
DataFormat format(Variable v) const
double baseRegion() const
std::vector< std::vector< StubKFin * > > stubs() const
double sectorCot(int eta) const
double base(Variable v) const
float getConsistency(TTTrack< Ref_Phase2TrackerDigi_ > aTrack, const TrackerGeometry *theTrackerGeom, const TrackerTopology *tTopo, double mMagneticFieldStrength, int nPar)