ATLAS Offline Software
Loading...
Searching...
No Matches
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
15namespace 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
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
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
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
std::vector< size_t > vec
const std::vector< TriggerThreshold * > & getBcmThresholdVector() const
const std::vector< TriggerThreshold * > & getMissEtSignVector() const
const std::vector< TriggerThreshold * > & getNimThresholdVector() const
ThresholdConfig(const ThresholdConfig &)=delete
void setCaloInfo(const CaloInfo &ci)
void printTtvMap(const TriggerThreshold *thr) const
std::map< L1DataDef::TriggerType, thrVec_t > thrVecMap_t
unsigned int ctpVersion() const
int getWindow(L1DataDef::TriggerType type, int eta, int phi, int thresholdnumber) const
float getClusterHadIsolation(int eta, int phi, int thresholdnumber) const
const std::vector< TriggerThreshold * > & getBgrpThresholdVector() const
const std::vector< TriggerThreshold * > & getFJetThresholdVector() const
int getJfWindow(int eta, int phi, int thresholdnumber) const
void printTtvSummary(const thrVec_t &vec, const std::string &name) const
float getTotEtThreshold(int eta, int phi, int thresholdnumber) const
size_t size(L1DataDef::TriggerType type) const
float getJetThreshold(int eta, int phi, int thresholdnumber) const
void printTriggerThresholdVector(const std::string &indent="") const
int getJetWindow(int eta, int phi, int thresholdnumber) const
ThresholdConfig & operator=(const ThresholdConfig &)=delete
float getThreshold(L1DataDef::TriggerType type, int eta, int phi, int thresholdnumber) const
float getMissEtThreshold(int eta, int phi, int thresholdnumber) const
const std::vector< TriggerThreshold * > & getTrtThresholdVector() const
const std::vector< TriggerThreshold * > & thresholdVector() const
const std::vector< TriggerThreshold * > & getMuonThresholdVector() const
TriggerThreshold * findTriggerThreshold(unsigned int id)
std::vector< TriggerThreshold * > getNimThresholdVectorByType(const std::string &type) const
bool addTriggerThreshold(TriggerThreshold *value)
const std::vector< TriggerThreshold * > & getTotEtVector() const
float getMuonThreshold(int eta, int phi, int thresholdnumber) const
const std::vector< TriggerThreshold * > & getMbtssiThresholdVector() const
int getJbWindow(int eta, int phi, int thresholdnumber) const
virtual ~ThresholdConfig() override
float getMissEtSigThreshold(int eta, int phi, int thresholdnumber) const
std::string getClusterThresholdType(int thresholdnumber) const
const std::vector< TriggerThreshold * > & getJbThresholdVector() const
const std::vector< TriggerThreshold * > & getJetThresholdVector() const
const std::vector< TriggerThreshold * > & getMbtsThresholdVector() const
const std::vector< TriggerThreshold * > & getZdcThresholdVector() const
void setCtpVersion(unsigned int ctpVersion)
virtual void print(const std::string &indent="", unsigned int detail=1) const override
bool insertInPosition(std::vector< TriggerThreshold * > &thrVec, TriggerThreshold *tt, unsigned int pos)
float getJetEtThreshold(int eta, int phi, int thresholdnumber) const
float getJfThreshold(int eta, int phi, int thresholdnumber) const
const std::vector< TriggerThreshold * > & getClusterThresholdVector() const
float getClusterThreshold(int eta, int phi, int thresholdnumber) const
std::vector< TriggerThreshold * > thrVec_t
const std::vector< TriggerThreshold * > & getThresholdVector() const
void setL1Version(unsigned int l1Version)
const std::vector< TriggerThreshold * > & getJetEtVector() const
const std::vector< TriggerThreshold * > & getZBThresholds() const
const std::vector< TriggerThreshold * > & getLucidThresholdVector() const
const CaloInfo & caloInfo() const
unsigned int l1Version() const
const std::vector< TriggerThreshold * > & getBcmcmbThresholdVector() const
float getClusterEmIsolation(int eta, int phi, int thresholdnumber) const
const std::vector< TriggerThreshold * > & getRndmThresholdVector() const
const std::vector< TriggerThreshold * > & getMissEtVector() const
const std::vector< TriggerThreshold * > & getBptxThresholdVector() const
float getJbThreshold(int eta, int phi, int thresholdnumber) const
const std::vector< TriggerThreshold * > & getJfThresholdVector() const
const std::vector< TriggerThreshold * > & getPclkThresholdVector() const
float getClusterHadVeto(int eta, int phi, int thresholdnumber) const
std::ostream & indent(std::ostream &o, int lvl, int size) const
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22