ATLAS Offline Software
Loading...
Searching...
No Matches
PtEndcapLUT.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGL2MUONSA_PTENDCAPLUT_H
6#define TRIGL2MUONSA_PTENDCAPLUT_H
7
9
10#include "GaudiKernel/Service.h"
11#include "GaudiKernel/IInterface.h"
12
13#include <map>
14#include <string>
15
16
17namespace TrigL2MuonSA {
18
20{
21 public:
22 //mean, sigma array dimensions
23 static constexpr std::size_t ETAS1=5;
24 static constexpr std::size_t PHIS1=6;
25 static constexpr std::size_t PTS1=3;
26
28
29 public:
30
31 PtEndcapLUT(const std::string& type,
32 const std::string& name,
33 const IInterface* parent);
34 ~PtEndcapLUT(void);
35
36 StatusCode readLUT(const std::string& lut_fileName);
37 StatusCode readLUTSigmaMean(const std::string& lut_mean, const std::string& lut_sigma);
38
39 double alpha(double z1, double r1, double z2, double r2) const;
40 double radius(double z1, double r1, double s1, double z2, double r2, double s2, double deltar) const;
41 double lookup(int side, int charge, DataType type, int iEta, int iPhi, double value) const;
42 double ptcombined(int iEta, int iPhi, double ApT, double BpT, double &CApT, double &CBpT) const;
43private:
44 double m_meana[ETAS1][PHIS1][PTS1]{};
45 double m_meanb[ETAS1][PHIS1][PTS1]{};
46 double m_meanc[ETAS1][PHIS1][PTS1]{};
47 double m_sigmaa[ETAS1][PHIS1][PTS1]{};
48 double m_sigmab[ETAS1][PHIS1][PTS1]{};
49 double m_sigmac[ETAS1][PHIS1][PTS1]{};
50
51 enum sizes { ETAS = 30, PHIS = 12, PHISEE = 192};
52
53 struct KeyType
54 {
55 int m_side;
58 KeyType(int side, int charge, DataType type) :
59 m_side(side), m_charge(charge), m_type(type) {}
60 bool operator<(const KeyType& other) const;
61 std::string toString() const;
62 };
63
64 struct TableType
65 {
66 double m_xcepts[ETAS][PHISEE]{};
67 double m_slopes[ETAS][PHISEE]{};
68 };
69
70 typedef std::map<KeyType, TableType*> TableMap;
71
72 static DataType s2dt(const char* type);
73 static const char* dt2s(DataType type);
74
76
77};
78
79}
80
81#endif
double charge(const T &p)
Definition AtlasPID.h:997
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
static constexpr std::size_t ETAS1
Definition PtEndcapLUT.h:23
static constexpr std::size_t PHIS1
Definition PtEndcapLUT.h:24
double radius(double z1, double r1, double s1, double z2, double r2, double s2, double deltar) const
double m_sigmaa[ETAS1][PHIS1][PTS1]
Definition PtEndcapLUT.h:47
double ptcombined(int iEta, int iPhi, double ApT, double BpT, double &CApT, double &CBpT) const
static const char * dt2s(DataType type)
static constexpr std::size_t PTS1
Definition PtEndcapLUT.h:25
PtEndcapLUT(const std::string &type, const std::string &name, const IInterface *parent)
double m_sigmab[ETAS1][PHIS1][PTS1]
Definition PtEndcapLUT.h:48
std::map< KeyType, TableType * > TableMap
Definition PtEndcapLUT.h:70
double lookup(int side, int charge, DataType type, int iEta, int iPhi, double value) const
double m_sigmac[ETAS1][PHIS1][PTS1]
Definition PtEndcapLUT.h:49
double alpha(double z1, double r1, double z2, double r2) const
StatusCode readLUT(const std::string &lut_fileName)
StatusCode readLUTSigmaMean(const std::string &lut_mean, const std::string &lut_sigma)
static DataType s2dt(const char *type)
double m_meanc[ETAS1][PHIS1][PTS1]
Definition PtEndcapLUT.h:46
double m_meana[ETAS1][PHIS1][PTS1]
Definition PtEndcapLUT.h:44
double m_meanb[ETAS1][PHIS1][PTS1]
Definition PtEndcapLUT.h:45
KeyType(int side, int charge, DataType type)
Definition PtEndcapLUT.h:58
bool operator<(const KeyType &other) const