1 #ifndef TkNavigation_TkMSParameterization_H 2 #define TkNavigation_TkMSParameterization_H 8 #include<unordered_map> 18 constexpr unsigned short packLID(
unsigned int id,
unsigned int od) {
return (
id<<8) | od ;}
19 constexpr std::tuple<unsigned short, unsigned short>
unpackLID(
unsigned short lid) {
return std::make_tuple(lid>>8, lid&255);}
38 auto p = find_if(
data.begin(),
data.end(),[=](
Elem const &
d) {
return d.vo>
v;});
52 Elems const &
get(
float tnLambda)
const {
59 std::array<Elems,nLmBins()>
data;
63 using AllData = std::unordered_map<unsigned short, FromToData>;
87 auto p =
data.find(
id);
88 if (
p!=
data.end())
return &(*p).second;
102 #endif // TkNavigation_TkMSParameterization_H unsigned short packLID(unsigned int id, unsigned int od)
auto const & operator()() const
tkMSParameterization::AllData AllData
std::array< Elems, nLmBins()> data
friend TkMSParameterizationBuilder
std::ostream & operator<<(std::ostream &os, tkMSParameterization::Elem d)
friend TkMSParameterizationBuilder
Abs< T >::type abs(const T &t)
std::unordered_map< unsigned short, FromToData > AllData
friend TkMSParameterizationBuilder
char data[epos_bytes_allocation]
auto const & operator()() const
FromToData const * fromTo(int in, int out) const
auto const & operator()() const
FromToData const * fromTo(DetLayer const &in, DetLayer const &out) const
std::tuple< unsigned short, unsigned short > unpackLID(unsigned short lid)