ATLAS Offline Software
Loading...
Searching...
No Matches
PtEndcapLUT.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 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 <cstring>
15#define ETAS1 5
16#define PHIS1 6
17#define PTS1 3
18
19namespace TrigL2MuonSA {
20
22{
23 public:
25
26 public:
27
28 PtEndcapLUT(const std::string& type,
29 const std::string& name,
30 const IInterface* parent);
31 ~PtEndcapLUT(void);
32
33 StatusCode readLUT(const std::string& lut_fileName);
34 StatusCode readLUTSigmaMean(const std::string& lut_mean, const std::string& lut_sigma);
35
36 double alpha(double z1, double r1, double z2, double r2) const;
37 double radius(double z1, double r1, double s1, double z2, double r2, double s2, double deltar) const;
38 double lookup(int side, int charge, DataType type, int iEta, int iPhi, double value) const;
39 double ptcombined(int iEta, int iPhi, double ApT, double BpT, double &CApT, double &CBpT) const;
40private:
41 double m_meana[ETAS1][PHIS1][PTS1]{};
42 double m_meanb[ETAS1][PHIS1][PTS1]{};
43 double m_meanc[ETAS1][PHIS1][PTS1]{};
44 double m_sigmaa[ETAS1][PHIS1][PTS1]{};
45 double m_sigmab[ETAS1][PHIS1][PTS1]{};
46 double m_sigmac[ETAS1][PHIS1][PTS1]{};
47
48 enum sizes { ETAS = 30, PHIS = 12, PHISEE = 192};
49
50 struct KeyType
51 {
52 int m_side;
55 KeyType(int side, int charge, DataType type) :
56 m_side(side), m_charge(charge), m_type(type) {}
57 bool operator<(const KeyType& other) const;
58 std::string toString() const;
59 };
60
61 struct TableType
62 {
66 {
67 memset(m_xcepts, 0, sizeof(m_xcepts));
68 memset(m_slopes, 0, sizeof(m_slopes));
69 }
70 };
71
72 typedef std::map<KeyType, TableType*> TableMap;
73
74 static DataType s2dt(const char* type);
75 static const char* dt2s(DataType type);
76
78
79};
80
81}
82
83#endif
double charge(const T &p)
Definition AtlasPID.h:997
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
#define PTS1
Definition PtEndcapLUT.h:17
#define PHIS1
Definition PtEndcapLUT.h:16
#define ETAS1
Definition PtEndcapLUT.h:15
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
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:44
double ptcombined(int iEta, int iPhi, double ApT, double BpT, double &CApT, double &CBpT) const
static const char * dt2s(DataType type)
PtEndcapLUT(const std::string &type, const std::string &name, const IInterface *parent)
double m_sigmab[ETAS1][PHIS1][PTS1]
Definition PtEndcapLUT.h:45
std::map< KeyType, TableType * > TableMap
Definition PtEndcapLUT.h:72
double lookup(int side, int charge, DataType type, int iEta, int iPhi, double value) const
double m_sigmac[ETAS1][PHIS1][PTS1]
Definition PtEndcapLUT.h:46
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:43
double m_meana[ETAS1][PHIS1][PTS1]
Definition PtEndcapLUT.h:41
double m_meanb[ETAS1][PHIS1][PTS1]
Definition PtEndcapLUT.h:42
KeyType(int side, int charge, DataType type)
Definition PtEndcapLUT.h:55
bool operator<(const KeyType &other) const