20 DataFormats::DataFormats()
35 template <Variable v, Process p>
40 countFormats<v, ++p>();
75 template <Variable v, Process p>
82 fillDataFormats<v, ++p>();
84 fillDataFormats<++v>();
88 template <Variable v, Process p, Process it>
94 fillFormats<v, p, ++it>();
98 template <
typename... Ts>
105 template <
int it,
typename... Ts>
108 formats_[+
v][+
p]->extract(ttBV,
get<
sizeof...(Ts) - 1 - it>(
data));
109 if constexpr (it + 1 !=
sizeof...(Ts))
110 extractStub<it + 1>(
p, ttBV,
data);
114 template <
typename... Ts>
122 template <
int it,
typename... Ts>
126 if constexpr (it + 1 !=
sizeof...(Ts))
127 attachStub<it + 1>(
p,
data, ttBV);
131 template <
typename... Ts>
138 template <
int it,
typename... Ts>
141 formats_[+
v][+
p]->extract(ttBV,
get<
sizeof...(Ts) - 1 - it>(
data));
142 if constexpr (it + 1 !=
sizeof...(Ts))
143 extractTrack<it + 1>(
p, ttBV,
data);
147 template <
typename... Ts>
155 template <
int it,
typename... Ts>
159 if constexpr (it + 1 !=
sizeof...(Ts))
160 attachTrack<it + 1>(
p,
data, ttBV);
164 template <
typename... Ts>
166 : dataFormats_(dataFormats), p_(
p), frame_(
frame), trackId_(0) {
167 dataFormats_->convertStub(
p,
frame.second, data_);
171 template <
typename... Ts>
172 template <
typename... Others>
174 : dataFormats_(stub.dataFormats()),
181 template <
typename... Ts>
183 : dataFormats_(dataFormats), p_(
p), frame_(ttStubRef,
Frame()), data_(
data...), trackId_(0) {}
203 :
Stub(stub, stub.r(), stub.phi(), stub.z(), stub.layer(), stub.inv2RMin(), stub.inv2RMax()),
353 :
Stub(stub, stub.r(), stub.phi(), stub.z(), dPhi, dZ),
layer_(layer) {
376 :
Stub(stub, stub.r(), 0., 0., stub.dPhi(), stub.dZ()),
layer_(stub.layer()) {
387 template <
typename... Ts>
389 : dataFormats_(dataFormats), p_(
p), frame_(
frame) {
390 dataFormats_->convertTrack(p_,
frame.second, data_);
394 template <
typename... Ts>
395 template <
typename... Others>
400 template <
typename... Ts>
401 template <
typename... Others>
403 : dataFormats_(stub.dataFormats()), p_(++stub.
p()), frame_(ttTrackRef,
Frame()), data_(
data...) {}
406 template <
typename... Ts>
408 : dataFormats_(dataFormats), p_(
p), frame_(ttTrackRef,
Frame()), data_(
data...) {}
413 vector<int> nStubs(
stubs_.size(), 0);
415 nStubs[stub->layer()]++;
419 const int layer = stub->layer();
428 stubs_(
setup()->numLayers()),
429 hitPattern_(0,
setup()->numLayers()) {
440 const TTBV& maybePattern,
447 :
Track(ttTrackRef, dataFormats,
Process::
kfin, maybePattern,
sectorPhi,
sectorEta,
phiT,
inv2R,
zT,
cot),
448 stubs_(
setup()->numLayers()),
449 hitPattern_(0,
setup()->numLayers()) {
454 vector<TTStubRef>
stubs;
480 const double invR = -this->
inv2R() * 2.;
489 vector<TTStubRef> ttStubRefs;
490 const int nLayer = stubs.size();
491 ttStubRefs.reserve(nLayer);
492 for (
const StubKF& stub : stubs) {
493 hitVector.
set(stub.layer());
494 const TTStubRef& ttStubRef = stub.ttStubRef();
497 ttStubRefs.push_back(ttStubRef);
499 static constexpr
int nPar = 4;
500 static constexpr
double d0 = 0.;
501 static constexpr
double trkMVA1 = 0.;
502 static constexpr
double trkMVA2 = 0.;
503 static constexpr
double trkMVA3 = 0.;
507 invR,
phi0,
cot,
z0,
d0, chi2phi, chi2z, trkMVA1, trkMVA2, trkMVA3,
hitPattern,
nPar,
bField);
508 ttTrack.setStubRefs(ttStubRefs);
534 const double cot = this->
cot();
535 const double z0 = this->
z0();
536 static constexpr
double d0 = 0.;
537 static constexpr
double chi2phi = 0.;
538 static constexpr
double chi2z = 0;
539 static constexpr
double trkMVA1 = 0.;
540 static constexpr
double trkMVA2 = 0.;
541 static constexpr
double trkMVA3 = 0.;
543 static constexpr
int nPar = 4;
544 static constexpr
double bField = 0.;
548 inv2R,
phi0,
cot,
z0,
d0, chi2phi, chi2z, trkMVA1, trkMVA2, trkMVA3,
hitPattern,
nPar,
bField);
571 const double mintPt = iConfig.
getParameter<
bool>(
"UseHybrid") ?
setup->hybridMinPtCand() :
setup->minPt();
587 const double chosenRofPhi =
693 const double rangeR =
717 const double chosenRofPhi =
719 const double rangeR = 2. *
max(
abs(
setup->outerRadius() - chosenRofPhi),
abs(
setup->innerRadius() - chosenRofPhi));
743 const double rangeR =
797 const double chosenRofPhi =
863 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
Power< A, B >::type pow(const A &a, const B &b)
double base(Variable v) const
float getConsistency(TTTrack< Ref_Phase2TrackerDigi_ > aTrack, const TrackerGeometry *theTrackerGeom, const TrackerTopology *tTopo, double mMagneticFieldStrength, int nPar)