20 DataFormats::DataFormats()
35 template <Variable v, Process p>
40 countFormats<v, ++p>();
81 template <Variable v, Process p>
88 fillDataFormats<v, ++p>();
90 fillDataFormats<++v>();
94 template <Variable v, Process p, Process it>
100 fillFormats<v, p, ++it>();
104 template <
typename... Ts>
111 template <
int it,
typename... Ts>
116 extractStub<it + 1>(
p, ttBV,
data);
120 template <
typename... Ts>
128 template <
int it,
typename... Ts>
133 attachStub<it + 1>(
p,
data, ttBV);
137 template <
typename... Ts>
144 template <
int it,
typename... Ts>
149 extractTrack<it + 1>(
p, ttBV,
data);
153 template <
typename... Ts>
161 template <
int it,
typename... Ts>
166 attachTrack<it + 1>(
p,
data, ttBV);
170 template <
typename... Ts>
172 : dataFormats_(dataFormats), p_(
p), frame_(
frame), trackId_(0) {
173 dataFormats_->convertStub(
p,
frame.second, data_);
177 template <
typename... Ts>
178 template <
typename... Others>
180 : dataFormats_(stub.dataFormats()),
187 template <
typename... Ts>
189 : dataFormats_(dataFormats), p_(
p), frame_(ttStubRef,
Frame()), data_(
data...), trackId_(0) {}
209 :
Stub(stub, stub.r(), stub.phi(), stub.z(), stub.layer(), stub.inv2RMin(), stub.inv2RMax()),
359 :
Stub(stub, stub.r(), stub.phi(), stub.z(), dPhi, dZ),
layer_(layer) {
382 :
Stub(stub, stub.r(), 0., 0., stub.dPhi(), stub.dZ()),
layer_(stub.layer()) {
393 template <
typename... Ts>
395 : dataFormats_(dataFormats), p_(
p), frame_(
frame) {
396 dataFormats_->convertTrack(p_,
frame.second, data_);
400 template <
typename... Ts>
401 template <
typename... Others>
406 template <
typename... Ts>
407 template <
typename... Others>
409 : dataFormats_(stub.dataFormats()), p_(++stub.
p()), frame_(ttTrackRef,
Frame()), data_(
data...) {}
412 template <
typename... Ts>
414 : dataFormats_(dataFormats), p_(
p), frame_(ttTrackRef,
Frame()), data_(
data...) {}
419 vector<int> nStubs(
stubs_.size(), 0);
421 nStubs[stub->layer()]++;
425 const int layer = stub->layer();
434 stubs_(
setup()->numLayers()),
435 hitPattern_(0,
setup()->numLayers()) {
446 const TTBV& maybePattern,
453 :
Track(ttTrackRef, dataFormats,
Process::
kfin, maybePattern,
sectorPhi,
sectorEta,
phiT,
inv2R,
zT,
cot),
454 stubs_(
setup()->numLayers()),
455 hitPattern_(0,
setup()->numLayers()) {
460 vector<TTStubRef>
stubs;
486 const double invR = -this->
inv2R() * 2.;
495 vector<TTStubRef> ttStubRefs;
496 const int nLayer = stubs.size();
497 ttStubRefs.reserve(nLayer);
498 for (
const StubKF& stub : stubs) {
499 hitVector.
set(stub.layer());
500 const TTStubRef& ttStubRef = stub.ttStubRef();
503 ttStubRefs.push_back(ttStubRef);
513 invR,
phi0,
cot,
z0,
d0, chi2phi, chi2z, trkMVA1, trkMVA2, trkMVA3,
hitPattern,
nPar,
bField);
514 ttTrack.setStubRefs(ttStubRefs);
540 const double cot = this->
cot();
541 const double z0 = this->
z0();
554 inv2R,
phi0,
cot,
z0,
d0, chi2phi, chi2z, trkMVA1, trkMVA2, trkMVA3,
hitPattern,
nPar,
bField);
577 const double mintPt = iConfig.
getParameter<
bool>(
"UseHybrid") ?
setup->hybridMinPtCand() :
setup->minPt();
593 const double chosenRofPhi =
699 const double rangeR =
723 const double chosenRofPhi =
725 const double rangeR = 2. *
max(
abs(
setup->outerRadius() - chosenRofPhi),
abs(
setup->innerRadius() - chosenRofPhi));
749 const double rangeR =
803 const double chosenRofPhi =
869 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)