ATLAS Offline Software
ThresholdConfig.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TrigConf_ThresholdConfig
8 #define TrigConf_ThresholdConfig
9 
14 
15 namespace TrigConf {
16 
18  public:
19 
20  typedef std::vector<TriggerThreshold*> thrVec_t;
21  typedef std::map< L1DataDef::TriggerType, thrVec_t> thrVecMap_t;
22 
24  virtual ~ThresholdConfig() override;
25 
26  ThresholdConfig(const ThresholdConfig &) = delete;
28 
29  const std::vector<TriggerThreshold*>& thresholdVector(L1DataDef::TriggerType) const; // backward compatible
30  const std::vector<TriggerThreshold*>& getThresholdVector(L1DataDef::TriggerType) const;
31 
32  const std::vector<TriggerThreshold*>& getThresholdVector() const { return m_TriggerThresholdVector; }
33  const std::vector<TriggerThreshold*>& thresholdVector() const { return m_TriggerThresholdVector; } // backward compatible
34 
35  //access functions
36  std::string getClusterThresholdType( int thresholdnumber ) const;
37 
38  // access to ptcut
39  float getThreshold(L1DataDef::TriggerType type, int eta, int phi, int thresholdnumber) const;
40 
41  // access to window
42  int getWindow(L1DataDef::TriggerType type, int eta, int phi, int thresholdnumber) const;
43 
44  size_t size() const { return getThresholdVector().size(); }
45  size_t size(L1DataDef::TriggerType type) const { return getThresholdVector(type).size(); }
46 
47  // and specialized (should be faced out)
48  float getClusterThreshold(int eta, int phi, int thresholdnumber) const;
49  float getJetThreshold(int eta, int phi, int thresholdnumber) const;
50  float getJbThreshold(int eta, int phi, int thresholdnumber) const;
51  float getJfThreshold(int eta, int phi, int thresholdnumber) const;
52  float getMuonThreshold(int eta, int phi, int thresholdnumber) const;
53  float getTotEtThreshold(int eta, int phi, int thresholdnumber) const;
54  float getJetEtThreshold(int eta, int phi, int thresholdnumber) const;
55  float getMissEtThreshold(int eta, int phi, int thresholdnumber) const;
56  float getMissEtSigThreshold(int eta, int phi, int thresholdnumber) const;
57  float getClusterEmIsolation(int eta, int phi, int thresholdnumber) const;
58  float getClusterHadIsolation(int eta, int phi, int thresholdnumber) const;
59  float getClusterHadVeto(int eta, int phi, int thresholdnumber) const;
60  int getJetWindow(int eta, int phi, int thresholdnumber) const;
61  int getJbWindow(int eta, int phi, int thresholdnumber) const;
62  int getJfWindow(int eta, int phi, int thresholdnumber) const;
63 
64  const CaloInfo& caloInfo() const { return m_CaloInfo; }
65  void setCaloInfo (const CaloInfo& ci) { m_CaloInfo = ci; }
66 
67  bool addTriggerThreshold(TriggerThreshold* value); // add according to type
68 
69  virtual void print(const std::string& indent="", unsigned int detail=1) const override;
70 
71  void printTriggerThresholdVector(const std::string& indent="") const;
72 
73  void printThresholdValueMap() const;
74  void printTtvMap(const TriggerThreshold* thr) const;
75  void printTtvSummary(const thrVec_t& vec, const std::string& name) const;
76 
77  void clear();
78 
80 
81  TriggerThreshold* findTriggerThreshold(unsigned int id);
82 
83  void setCtpVersion(unsigned int ctpVersion) { m_ctpVersion = ctpVersion; }
84  unsigned int ctpVersion() const { return m_ctpVersion; }
85 
86  void setL1Version(unsigned int l1Version) { m_l1Version = l1Version; }
87  unsigned int l1Version() const { return m_l1Version; }
88 
89  private:
90 
91  bool insertInPosition(std::vector<TriggerThreshold*>& thrVec, TriggerThreshold* tt, unsigned int pos);
92 
93  std::vector<TriggerThreshold*> getNimThresholdVectorByType(const std::string& type) const;
94 
95  private:
96  friend class CTPConfig;
97 
98  unsigned int m_ctpVersion;
99  unsigned int m_l1Version;
100  thrVecMap_t m_thresholdVectors; // vectors of TriggerThresholds accessed by type (map)
101  thrVec_t m_TriggerThresholdVector; // vector of all TriggerThresholds (owns all thresholds)
102  thrVec_t m_ClusterThresholdVector; // vector of all EM TAU thresholds (for backward compatibility, where EM and TAU thresholds are in one vector)
104 
105 
106  public:
107  // these need to stay here temporarily to make the migration not too painfull
108  const std::vector<TriggerThreshold*>& getClusterThresholdVector() const { return m_ClusterThresholdVector; }
109  const std::vector<TriggerThreshold*>& getJetThresholdVector() const { return getThresholdVector(L1DataDef::JET); }
110  const std::vector<TriggerThreshold*>& getFJetThresholdVector() const { return getThresholdVector(L1DataDef::FJ); }
111  const std::vector<TriggerThreshold*>& getJbThresholdVector() const { return getThresholdVector(L1DataDef::JB); }
112  const std::vector<TriggerThreshold*>& getJfThresholdVector() const { return getThresholdVector(L1DataDef::JF); }
113  const std::vector<TriggerThreshold*>& getTotEtVector() const { return getThresholdVector(L1DataDef::TE); }
114  const std::vector<TriggerThreshold*>& getJetEtVector() const { return getThresholdVector(L1DataDef::JE); }
115  const std::vector<TriggerThreshold*>& getMissEtVector() const { return getThresholdVector(L1DataDef::XE); }
116  const std::vector<TriggerThreshold*>& getMissEtSignVector() const { return getThresholdVector(L1DataDef::XS); }
117  const std::vector<TriggerThreshold*>& getMuonThresholdVector() const { return getThresholdVector(L1DataDef::MUON); }
118  const std::vector<TriggerThreshold*>& getRndmThresholdVector() const { return getThresholdVector(L1DataDef::RNDM); }
119  const std::vector<TriggerThreshold*>& getBgrpThresholdVector() const { return getThresholdVector(L1DataDef::BGRP); }
120  const std::vector<TriggerThreshold*>& getPclkThresholdVector() const { return getThresholdVector(L1DataDef::PCLK); }
121  const std::vector<TriggerThreshold*>& getNimThresholdVector() const { return getThresholdVector(L1DataDef::NIM); }
122  const std::vector<TriggerThreshold*>& getZBThresholds() const { return getThresholdVector(L1DataDef::ZB);}
123  const std::vector<TriggerThreshold*>& getMbtsThresholdVector() const { return getThresholdVector(L1DataDef::MBTS); }
124  const std::vector<TriggerThreshold*>& getMbtssiThresholdVector() const { return getThresholdVector(L1DataDef::MBTSSI); }
125  const std::vector<TriggerThreshold*>& getTrtThresholdVector() const { return getThresholdVector(L1DataDef::TRT); }
126  const std::vector<TriggerThreshold*>& getZdcThresholdVector() const { return getThresholdVector(L1DataDef::ZDC); }
127  const std::vector<TriggerThreshold*>& getBcmThresholdVector() const { return getThresholdVector(L1DataDef::BCM); }
128  const std::vector<TriggerThreshold*>& getBcmcmbThresholdVector() const { return getThresholdVector(L1DataDef::BCMCMB); }
129  const std::vector<TriggerThreshold*>& getLucidThresholdVector() const { return getThresholdVector(L1DataDef::LUCID); }
130  const std::vector<TriggerThreshold*>& getBptxThresholdVector() const { return getThresholdVector(L1DataDef::BPTX); }
131  };
132 }
133 
134 #endif
TrigConf::L1DataDef::FJ
@ FJ
Definition: L1DataDef.h:32
TrigConf::ThresholdConfig::thrVec_t
std::vector< TriggerThreshold * > thrVec_t
Definition: ThresholdConfig.h:20
TrigConf::ThresholdConfig
Definition: ThresholdConfig.h:17
TrigConf::ThresholdConfig::getJetThresholdVector
const std::vector< TriggerThreshold * > & getJetThresholdVector() const
Definition: ThresholdConfig.h:109
TrigConf::ThresholdConfig::getTotEtThreshold
float getTotEtThreshold(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:217
TrigConf::ThresholdConfig::m_l1Version
unsigned int m_l1Version
Definition: ThresholdConfig.h:99
TrigConf::L1DataDef::LUCID
@ LUCID
Definition: L1DataDef.h:34
TrigConf::ThresholdConfig::getNimThresholdVector
const std::vector< TriggerThreshold * > & getNimThresholdVector() const
Definition: ThresholdConfig.h:121
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
TrigConf::ThresholdConfig::getThreshold
float getThreshold(L1DataDef::TriggerType type, int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:181
TrigConf::L1DataDef::PCLK
@ PCLK
Definition: L1DataDef.h:38
TrigConf::ThresholdConfig::getJfThreshold
float getJfThreshold(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:213
TrigConf::ThresholdConfig::getJbWindow
int getJbWindow(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:172
TrigConf::ThresholdConfig::getWindow
int getWindow(L1DataDef::TriggerType type, int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:160
TrigConf::L1DataDef::JE
@ JE
Definition: L1DataDef.h:32
TrigConf::L1DataDef::BPTX
@ BPTX
Definition: L1DataDef.h:35
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
TrigConf::ThresholdConfig::printTtvSummary
void printTtvSummary(const thrVec_t &vec, const std::string &name) const
Definition: ThresholdConfig.cxx:318
TrigConf::ThresholdConfig::m_ClusterThresholdVector
thrVec_t m_ClusterThresholdVector
Definition: ThresholdConfig.h:102
TrigConf::ThresholdConfig::getClusterHadIsolation
float getClusterHadIsolation(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:144
TrigConf::L1DataDef::MBTSSI
@ MBTSSI
Definition: L1DataDef.h:34
TrigConf::L1DataDef::BCMCMB
@ BCMCMB
Definition: L1DataDef.h:35
TrigConf::ThresholdConfig::m_thresholdVectors
thrVecMap_t m_thresholdVectors
Definition: ThresholdConfig.h:100
TrigConf::L1DataDef::JF
@ JF
Definition: L1DataDef.h:32
TrigConf::L1DataDef::MUON
@ MUON
Definition: L1DataDef.h:31
TrigConf::ThresholdConfig::getBcmcmbThresholdVector
const std::vector< TriggerThreshold * > & getBcmcmbThresholdVector() const
Definition: ThresholdConfig.h:128
TrigConf::ThresholdConfig::thrVecMap_t
std::map< L1DataDef::TriggerType, thrVec_t > thrVecMap_t
Definition: ThresholdConfig.h:21
TrigConf::ThresholdConfig::getBgrpThresholdVector
const std::vector< TriggerThreshold * > & getBgrpThresholdVector() const
Definition: ThresholdConfig.h:119
TrigConf::ThresholdConfig::m_TriggerThresholdVector
thrVec_t m_TriggerThresholdVector
Definition: ThresholdConfig.h:101
TrigConf::L1DataDef::ZDC
@ ZDC
Definition: L1DataDef.h:34
athena.value
value
Definition: athena.py:122
detail
Definition: extract_histogram_tag.cxx:14
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
TrigConf::ThresholdConfig::getClusterThresholdType
std::string getClusterThresholdType(int thresholdnumber) const
Definition: ThresholdConfig.cxx:129
TrigConf::ThresholdConfig::size
size_t size(L1DataDef::TriggerType type) const
Definition: ThresholdConfig.h:45
TrigConf::ThresholdConfig::clear
void clear()
Definition: ThresholdConfig.cxx:375
TrigConf::ThresholdConfig::size
size_t size() const
Definition: ThresholdConfig.h:44
TrigConf::ThresholdConfig::getClusterHadVeto
float getClusterHadVeto(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:150
TrigConf::ThresholdConfig::getJbThresholdVector
const std::vector< TriggerThreshold * > & getJbThresholdVector() const
Definition: ThresholdConfig.h:111
TrigConf::ThresholdConfig::getJetWindow
int getJetWindow(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:164
TrigConf::L1DataDef::XE
@ XE
Definition: L1DataDef.h:33
TrigConf::ThresholdConfig::getBcmThresholdVector
const std::vector< TriggerThreshold * > & getBcmThresholdVector() const
Definition: ThresholdConfig.h:127
TrigConf::ThresholdConfig::caloInfo
const CaloInfo & caloInfo() const
Definition: ThresholdConfig.h:64
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
TrigConf::ThresholdConfig::setL1Version
void setL1Version(unsigned int l1Version)
Definition: ThresholdConfig.h:86
TrigConf::ThresholdConfig::getPclkThresholdVector
const std::vector< TriggerThreshold * > & getPclkThresholdVector() const
Definition: ThresholdConfig.h:120
TrigConf::ThresholdConfig::getBptxThresholdVector
const std::vector< TriggerThreshold * > & getBptxThresholdVector() const
Definition: ThresholdConfig.h:130
TrigConf::L1DataDef::RNDM
@ RNDM
Definition: L1DataDef.h:38
TrigConf::ThresholdConfig::getRndmThresholdVector
const std::vector< TriggerThreshold * > & getRndmThresholdVector() const
Definition: ThresholdConfig.h:118
TrigConf::ThresholdConfig::getMbtsThresholdVector
const std::vector< TriggerThreshold * > & getMbtsThresholdVector() const
Definition: ThresholdConfig.h:123
TrigConf::ThresholdConfig::getZBThresholds
const std::vector< TriggerThreshold * > & getZBThresholds() const
Definition: ThresholdConfig.h:122
TrigConf::L1DataDef::NIM
@ NIM
Definition: L1DataDef.h:34
TrigConf::CaloInfo
Definition: CaloInfo.h:35
TrigConf::ThresholdConfig::l1Version
unsigned int l1Version() const
Definition: ThresholdConfig.h:87
CaloInfo.h
TrigConf::ThresholdConfig::printTriggerThresholdVector
void printTriggerThresholdVector(const std::string &indent="") const
Definition: ThresholdConfig.cxx:311
TrigConf::ThresholdConfig::getJfWindow
int getJfWindow(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:168
TrigConf::ThresholdConfig::getNimThresholdVectorByType
std::vector< TriggerThreshold * > getNimThresholdVectorByType(const std::string &type) const
Definition: ThresholdConfig.cxx:367
TrigConf::ThresholdConfig::m_CaloInfo
CaloInfo m_CaloInfo
Definition: ThresholdConfig.h:103
TrigConf::ThresholdConfig::m_ctpVersion
unsigned int m_ctpVersion
Definition: ThresholdConfig.h:98
TrigConf::ThresholdConfig::~ThresholdConfig
virtual ~ThresholdConfig() override
Definition: ThresholdConfig.cxx:30
TrigConf::ThresholdConfig::ctpVersion
unsigned int ctpVersion() const
Definition: ThresholdConfig.h:84
TrigConf::ThresholdConfig::ThresholdConfig
ThresholdConfig(const ThresholdConfig &)=delete
TriggerThreshold.h
TrigConf::ThresholdConfig::findTriggerThreshold
TriggerThreshold * findTriggerThreshold(unsigned int id)
Definition: ThresholdConfig.cxx:264
TrigConf::ThresholdConfig::thresholdVector
const std::vector< TriggerThreshold * > & thresholdVector() const
Definition: ThresholdConfig.h:33
TrigConf::ThresholdConfig::getClusterThreshold
float getClusterThreshold(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:185
TrigConf::L1DataDef::MBTS
@ MBTS
Definition: L1DataDef.h:34
TrigConf::ThresholdConfig::getMissEtSigThreshold
float getMissEtSigThreshold(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:201
TrigConf::ThresholdConfig::setCaloInfo
void setCaloInfo(const CaloInfo &ci)
Definition: ThresholdConfig.h:65
TrigConf::name
Definition: HLTChainList.h:35
TrigConf::L1DataDef::BCM
@ BCM
Definition: L1DataDef.h:34
TrigConf::L1DataDef::TE
@ TE
Definition: L1DataDef.h:33
TrigConf::ThresholdConfig::getFJetThresholdVector
const std::vector< TriggerThreshold * > & getFJetThresholdVector() const
Definition: ThresholdConfig.h:110
TrigConf::ThresholdConfig::getMissEtSignVector
const std::vector< TriggerThreshold * > & getMissEtSignVector() const
Definition: ThresholdConfig.h:116
TrigConf::ThresholdConfig::attributeThresholdNumbers
void attributeThresholdNumbers()
Definition: ThresholdConfig.cxx:224
TrigConf::ThresholdConfig::getMbtssiThresholdVector
const std::vector< TriggerThreshold * > & getMbtssiThresholdVector() const
Definition: ThresholdConfig.h:124
TrigConf::ThresholdConfig::getTotEtVector
const std::vector< TriggerThreshold * > & getTotEtVector() const
Definition: ThresholdConfig.h:113
TrigConf::ThresholdConfig::getJetThreshold
float getJetThreshold(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:205
TrigConf::ThresholdConfig::getMuonThresholdVector
const std::vector< TriggerThreshold * > & getMuonThresholdVector() const
Definition: ThresholdConfig.h:117
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
L1DataDef.h
TrigConf::L1DataDef::JB
@ JB
Definition: L1DataDef.h:32
TrigConf::L1DataDef::JET
@ JET
Definition: L1DataDef.h:32
TrigConf::ThresholdConfig::getZdcThresholdVector
const std::vector< TriggerThreshold * > & getZdcThresholdVector() const
Definition: ThresholdConfig.h:126
TrigConf::ThresholdConfig::getThresholdVector
const std::vector< TriggerThreshold * > & getThresholdVector() const
Definition: ThresholdConfig.h:32
TrigConf::ThresholdConfig::getMissEtVector
const std::vector< TriggerThreshold * > & getMissEtVector() const
Definition: ThresholdConfig.h:115
TrigConf::L1DataDef::TriggerType
TriggerType
Definition: L1DataDef.h:30
TrigConf::ThresholdConfig::getMuonThreshold
float getMuonThreshold(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:189
TrigConf::ThresholdConfig::insertInPosition
bool insertInPosition(std::vector< TriggerThreshold * > &thrVec, TriggerThreshold *tt, unsigned int pos)
Definition: ThresholdConfig.cxx:53
TrigConf::ThresholdConfig::getJbThreshold
float getJbThreshold(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:209
TrigConf::ThresholdConfig::getJfThresholdVector
const std::vector< TriggerThreshold * > & getJfThresholdVector() const
Definition: ThresholdConfig.h:112
TrigConf::ThresholdConfig::getClusterEmIsolation
float getClusterEmIsolation(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:138
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigConf::L1DataDef::XS
@ XS
Definition: L1DataDef.h:33
TrigConf::ThresholdConfig::ThresholdConfig
ThresholdConfig()
Definition: ThresholdConfig.cxx:19
TrigConf::ThresholdConfig::setCtpVersion
void setCtpVersion(unsigned int ctpVersion)
Definition: ThresholdConfig.h:83
TrigConf::L1DataDef::TRT
@ TRT
Definition: L1DataDef.h:34
TrigConf::ThresholdConfig::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override
Definition: ThresholdConfig.cxx:282
TrigConf::CTPConfig
Definition: CTPConfig.h:27
TrigConf::ThresholdConfig::addTriggerThreshold
bool addTriggerThreshold(TriggerThreshold *value)
Definition: ThresholdConfig.cxx:75
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition: TrigConfData.cxx:23
TrigConf::ThresholdConfig::printTtvMap
void printTtvMap(const TriggerThreshold *thr) const
Definition: ThresholdConfig.cxx:340
TrigConf::ThresholdConfig::printThresholdValueMap
void printThresholdValueMap() const
Definition: ThresholdConfig.cxx:326
TrigConf::ThresholdConfig::getLucidThresholdVector
const std::vector< TriggerThreshold * > & getLucidThresholdVector() const
Definition: ThresholdConfig.h:129
TrigConf::L1DataBaseclass
Definition: L1DataBaseclass.h:22
TrigConf::ThresholdConfig::getClusterThresholdVector
const std::vector< TriggerThreshold * > & getClusterThresholdVector() const
Definition: ThresholdConfig.h:108
TrigConf::L1DataDef::ZB
@ ZB
Definition: L1DataDef.h:35
L1DataBaseclass.h
TrigConf::ThresholdConfig::getTrtThresholdVector
const std::vector< TriggerThreshold * > & getTrtThresholdVector() const
Definition: ThresholdConfig.h:125
TrigConf::ThresholdConfig::getMissEtThreshold
float getMissEtThreshold(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:197
TrigConf::TriggerThreshold
Definition: TriggerThreshold.h:20
TrigConf::ThresholdConfig::operator=
ThresholdConfig & operator=(const ThresholdConfig &)=delete
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
TrigConf::L1DataDef::BGRP
@ BGRP
Definition: L1DataDef.h:38
TrigConf::ThresholdConfig::getJetEtVector
const std::vector< TriggerThreshold * > & getJetEtVector() const
Definition: ThresholdConfig.h:114
TrigConf::ThresholdConfig::getJetEtThreshold
float getJetEtThreshold(int eta, int phi, int thresholdnumber) const
Definition: ThresholdConfig.cxx:193