1 #ifndef TkNavigation_TkMSParameterization_H
2 #define TkNavigation_TkMSParameterization_H
8 #include <unordered_map>
15 namespace tkMSParameterization {
17 constexpr
unsigned short packLID(
unsigned int id,
unsigned int od) {
return (
id << 8) |
od; }
18 constexpr std::tuple<unsigned short, unsigned short>
unpackLID(
unsigned short lid) {
19 return std::make_tuple(lid >> 8, lid & 255);
22 constexpr
unsigned int nLmBins() {
return 12 * 10; }
23 constexpr
float lmBin() {
return 0.1f; }
37 auto p = find_if(
data.begin(),
data.end(), [=](
Elem const&
d) {
return d.vo >
v; });
38 if (
p !=
data.begin())
51 Elems const&
get(
float tnLambda)
const {
59 std::array<Elems, nLmBins()>
data;
63 using AllData = std::unordered_map<unsigned short, FromToData>;
68 os << d.
vi <<
'/' << d.
vo <<
':' << d.
uerr <<
'/' << d.
verr;
80 using namespace tkMSParameterization;
82 auto p =
data.find(
id);
95 #endif // TkNavigation_TkMSParameterization_H
constexpr unsigned int nLmBins()
auto const & operator()() const
tkMSParameterization::AllData AllData
constexpr std::tuple< unsigned short, unsigned short > unpackLID(unsigned short lid)
friend TkMSParameterizationBuilder
std::ostream & operator<<(std::ostream &out, const ALILine &li)
std::array< Elems, nLmBins()> data
constexpr unsigned short packLID(unsigned int id, unsigned int od)
friend TkMSParameterizationBuilder
Abs< T >::type abs(const T &t)
std::unordered_map< unsigned short, FromToData > AllData
friend TkMSParameterizationBuilder
auto const & operator()() const
FromToData const * fromTo(int in, int out) const
auto const & operator()() const
constexpr float lmBinInv()
FromToData const * fromTo(DetLayer const &in, DetLayer const &out) const