1 #ifndef L1Trigger_TrackFindingTMTT_L1track3D_h
2 #define L1Trigger_TrackFindingTMTT_L1track3D_h
15 #include <unordered_set>
27 enum TrackletSeedType {
L1L2,
L2L3,
L3L4,
L5L6,
D1D2,
D3D4,
L1D1,
L2D1,
L3L4L2,
L5L6L4,
L2L3D1,
D1D2L2,
NONE };
31 const std::vector<Stub*>&
stubs,
34 std::pair<float, float>
helixRz,
64 const std::vector<Stub*>&
stubs,
67 std::pair<float, float>
helixRz,
73 settings, stubs, cellLocationHT, helixRphi, helixRz, 0.0, iPhiSec, iEtaReg, optoLinkID, mergedHTcell) {}
95 const std::vector<Stub*>&
stubs()
const override {
return stubs_; }
110 std::vector<float>
result;
113 result.push_back(chi_phi);
121 for (
const float& chi_phi : this->
chiPhi()) {
122 int iDigi_chi_phi = floor(chi_phi * phiMult);
123 result.push_back(iDigi_chi_phi);
129 std::vector<float>
result;
131 float chi_z =
s->z() - (this->
z0() +
s->r() * this->
tanLambda());
132 result.push_back(chi_z);
140 for (
const float& chi_z : this->
chiZ()) {
141 int iDigi_chi_z = floor(chi_z * zMult);
142 result.push_back(iDigi_chi_z);
154 constexpr
float small = 1.0e-6;
155 return 1. / (small + this->
invPt());
205 std::vector<Stub*> stubsSel;
208 const TP*
tp =
s->assocTP();
211 stubsSel.push_back(
s);
232 std::pair<unsigned int, unsigned int> htCell = this->
cellLocationHT();
233 bool consistent = (htCell == trueCell);
236 std::pair<unsigned int, unsigned int> htCell10(htCell.first + 1, htCell.second);
237 std::pair<unsigned int, unsigned int> htCell01(htCell.first, htCell.second + 1);
238 std::pair<unsigned int, unsigned int> htCell11(htCell.first + 1, htCell.second + 1);
239 if (htCell10 == trueCell)
241 if (htCell01 == trueCell)
243 if (htCell11 == trueCell)
std::pair< unsigned int, unsigned int > cellLocationHT_
unsigned int iEtaReg() const override
constexpr double deltaPhi(double phi1, double phi2)
unsigned int seedPS() const
float phi0() const override
L1track3D(const Settings *settings, const std::vector< Stub * > &stubs, std::pair< unsigned int, unsigned int > cellLocationHT, std::pair< float, float > helixRphi, std::pair< float, float > helixRz, float helixD0, unsigned int iPhiSec, unsigned int iEtaReg, unsigned int optoLinkID, bool mergedHTcell)
std::pair< float, float > helixRphi() const
static std::vector< std::string > checklist log
unsigned int numMatchedStubs() const override
float qOverPt() const override
void setSeedLayerType(unsigned int seedLayerType)
unsigned int phiSBits() const
std::vector< int > chiZDigi()
TrackletSeedType seedLayerType_
TrackletSeedType seedLayerType() const
std::unordered_set< const Stub * > bestStubs() const
unsigned int index() const
const Settings * settings_
unsigned int nMatchedLayers_
const TP * matchedTP() const override
const std::vector< const Stub * > & stubsConst() const override
unsigned int numMatchedLayers() const override
const std::vector< Stub * > & stubs() const override
std::unordered_set< const Stub * > bestStubs_
const TP * matchingTP(const Settings *settings, const std::vector< const Stub * > &vstubs, unsigned int &nMatchedLayersBest, std::vector< const Stub * > &matchedStubsBest)
std::pair< unsigned int, unsigned int > cellLocationHT() const override
~L1track3D() override=default
const std::vector< const Stub * > & matchedStubs() const override
unsigned int iPhiSec() const override
std::pair< unsigned int, unsigned int > trueCell(const TP *tp) const override
L1track3D(const Settings *settings, const std::vector< Stub * > &stubs, std::pair< unsigned int, unsigned int > cellLocationHT, std::pair< float, float > helixRphi, std::pair< float, float > helixRz, unsigned int iPhiSec, unsigned int iEtaReg, unsigned int optoLinkID, bool mergedHTcell)
unsigned int numLayers() const override
void setBestStubs(std::unordered_set< const Stub * > bestStubs)
double chosenRofPhi() const
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
std::vector< int > chiPhiDigi()
bool useForAlgEff() const
std::vector< float > chiPhi()
double invPtToDphi() const
void setSeedPS(unsigned int seedPS)
std::vector< Stub * > stubs_
std::pair< float, float > helixRz() const
std::vector< const Stub * > matchedStubs_
unsigned int countLayers(const Settings *settings, const std::vector< const Stub * > &stubs, bool disableReducedLayerID=false, bool onlyPS=false)
unsigned int zBits() const
bool mergedHTcell() const
unsigned int optoLinkID() const override
unsigned int numStubs() const override
std::pair< float, float > helixRphi_
double chosenRofZ() const
std::vector< const Stub * > stubsConst_
Power< A, B >::type pow(const A &a, const B &b)
float phiAtChosenR() const
std::vector< float > chiZ()
std::pair< float, float > helixRz_