ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConf::ThresholdConfig Class Reference

#include <ThresholdConfig.h>

Inheritance diagram for TrigConf::ThresholdConfig:
Collaboration diagram for TrigConf::ThresholdConfig:

Public Types

typedef std::vector< TriggerThreshold * > thrVec_t
typedef std::map< L1DataDef::TriggerType, thrVec_tthrVecMap_t

Public Member Functions

 ThresholdConfig ()
virtual ~ThresholdConfig () override
 ThresholdConfig (const ThresholdConfig &)=delete
ThresholdConfigoperator= (const ThresholdConfig &)=delete
const std::vector< TriggerThreshold * > & thresholdVector (L1DataDef::TriggerType) const
const std::vector< TriggerThreshold * > & getThresholdVector (L1DataDef::TriggerType) const
const std::vector< TriggerThreshold * > & getThresholdVector () const
const std::vector< TriggerThreshold * > & thresholdVector () const
std::string getClusterThresholdType (int thresholdnumber) const
float getThreshold (L1DataDef::TriggerType type, int eta, int phi, int thresholdnumber) const
int getWindow (L1DataDef::TriggerType type, int eta, int phi, int thresholdnumber) const
size_t size () const
size_t size (L1DataDef::TriggerType type) const
float getClusterThreshold (int eta, int phi, int thresholdnumber) const
float getJetThreshold (int eta, int phi, int thresholdnumber) const
float getJbThreshold (int eta, int phi, int thresholdnumber) const
float getJfThreshold (int eta, int phi, int thresholdnumber) const
float getMuonThreshold (int eta, int phi, int thresholdnumber) const
float getTotEtThreshold (int eta, int phi, int thresholdnumber) const
float getJetEtThreshold (int eta, int phi, int thresholdnumber) const
float getMissEtThreshold (int eta, int phi, int thresholdnumber) const
float getMissEtSigThreshold (int eta, int phi, int thresholdnumber) const
float getClusterEmIsolation (int eta, int phi, int thresholdnumber) const
float getClusterHadIsolation (int eta, int phi, int thresholdnumber) const
float getClusterHadVeto (int eta, int phi, int thresholdnumber) const
int getJetWindow (int eta, int phi, int thresholdnumber) const
int getJbWindow (int eta, int phi, int thresholdnumber) const
int getJfWindow (int eta, int phi, int thresholdnumber) const
const CaloInfocaloInfo () const
void setCaloInfo (const CaloInfo &ci)
bool addTriggerThreshold (TriggerThreshold *value)
virtual void print (const std::string &indent="", unsigned int detail=1) const override
void printTriggerThresholdVector (const std::string &indent="") const
void printThresholdValueMap () const
void printTtvMap (const TriggerThreshold *thr) const
void printTtvSummary (const thrVec_t &vec, const std::string &name) const
void clear ()
void attributeThresholdNumbers ()
TriggerThresholdfindTriggerThreshold (unsigned int id)
void setCtpVersion (unsigned int ctpVersion)
unsigned int ctpVersion () const
void setL1Version (unsigned int l1Version)
unsigned int l1Version () const
const std::vector< TriggerThreshold * > & getClusterThresholdVector () const
const std::vector< TriggerThreshold * > & getJetThresholdVector () const
const std::vector< TriggerThreshold * > & getFJetThresholdVector () const
const std::vector< TriggerThreshold * > & getJbThresholdVector () const
const std::vector< TriggerThreshold * > & getJfThresholdVector () const
const std::vector< TriggerThreshold * > & getTotEtVector () const
const std::vector< TriggerThreshold * > & getJetEtVector () const
const std::vector< TriggerThreshold * > & getMissEtVector () const
const std::vector< TriggerThreshold * > & getMissEtSignVector () const
const std::vector< TriggerThreshold * > & getMuonThresholdVector () const
const std::vector< TriggerThreshold * > & getRndmThresholdVector () const
const std::vector< TriggerThreshold * > & getBgrpThresholdVector () const
const std::vector< TriggerThreshold * > & getPclkThresholdVector () const
const std::vector< TriggerThreshold * > & getNimThresholdVector () const
const std::vector< TriggerThreshold * > & getZBThresholds () const
const std::vector< TriggerThreshold * > & getMbtsThresholdVector () const
const std::vector< TriggerThreshold * > & getMbtssiThresholdVector () const
const std::vector< TriggerThreshold * > & getTrtThresholdVector () const
const std::vector< TriggerThreshold * > & getZdcThresholdVector () const
const std::vector< TriggerThreshold * > & getBcmThresholdVector () const
const std::vector< TriggerThreshold * > & getBcmcmbThresholdVector () const
const std::vector< TriggerThreshold * > & getLucidThresholdVector () const
const std::vector< TriggerThreshold * > & getBptxThresholdVector () const
unsigned int lvl1MasterTableId () const
void setLvl1MasterTableId (unsigned int id)
int superMasterTableId () const
unsigned int smk () const
unsigned int id () const
const std::string & name () const
const std::string & comment () const
unsigned int version () const
void setSuperMasterTableId (int id)
void setSMK (int id)
void setId (unsigned int id)
void setName (const std::string &name)
void setVersion (unsigned int version)
void setComment (const std::string &c)
void printNameIdV (const std::string &indent="") const
virtual std::string __str__ () const

Protected Member Functions

std::ostream & indent (std::ostream &o, int lvl, int size) const

Private Member Functions

bool insertInPosition (std::vector< TriggerThreshold * > &thrVec, TriggerThreshold *tt, unsigned int pos)
std::vector< TriggerThreshold * > getNimThresholdVectorByType (const std::string &type) const

Private Attributes

unsigned int m_ctpVersion
unsigned int m_l1Version
thrVecMap_t m_thresholdVectors
thrVec_t m_TriggerThresholdVector
thrVec_t m_ClusterThresholdVector
CaloInfo m_CaloInfo
unsigned int m_Lvl1MasterId
unsigned int m_smk
unsigned int m_id
std::string m_name
unsigned int m_version
std::string m_comment

Friends

class CTPConfig

Detailed Description

Definition at line 17 of file ThresholdConfig.h.

Member Typedef Documentation

◆ thrVec_t

Definition at line 20 of file ThresholdConfig.h.

◆ thrVecMap_t

Constructor & Destructor Documentation

◆ ThresholdConfig() [1/2]

ThresholdConfig::ThresholdConfig ( )

Definition at line 19 of file ThresholdConfig.cxx.

19 :
21 m_ctpVersion( 0 ),
22 m_l1Version( 0 )
23{
24 // create a vector for each trigger type registered in L1DataDef.cxx
25 // size of vector is 0 and grows while being filled
26 for( L1DataDef::TypeConfigMap_t::value_type tc: L1DataDef::typeConfigs() )
27 m_thresholdVectors.insert( thrVecMap_t::value_type(tc.first , thrVec_t(0) ) );
28}
static Double_t tc
static const TypeConfigMap_t & typeConfigs()
Definition L1DataDef.h:57
std::vector< TriggerThreshold * > thrVec_t

◆ ~ThresholdConfig()

ThresholdConfig::~ThresholdConfig ( )
overridevirtual

Definition at line 30 of file ThresholdConfig.cxx.

30 {
31 for(TriggerThreshold* thr: m_TriggerThresholdVector) {
32 delete thr;
33 }
34}

◆ ThresholdConfig() [2/2]

TrigConf::ThresholdConfig::ThresholdConfig ( const ThresholdConfig & )
delete

Member Function Documentation

◆ __str__()

string TrigConfData::__str__ ( ) const
virtualinherited

Reimplemented in TrigConf::HLTChain, TrigConf::HLTPrescaleSet, TrigConf::HLTSequence, and TrigConf::TriggerItem.

Definition at line 50 of file TrigConfData.cxx.

50 {
51 stringstream s;
52 s << *this;
53 return s.str();
54}

◆ addTriggerThreshold()

bool TrigConf::ThresholdConfig::addTriggerThreshold ( TriggerThreshold * value)

Definition at line 75 of file ThresholdConfig.cxx.

75 {
76
77 // put the threshold into the vector of all thresholds
78 m_TriggerThresholdVector.push_back(thr);
79
80 // put the threshold to the correct vector
81 L1DataDef::TriggerType ttype = thr->ttype();
82
83 const auto& res = m_thresholdVectors.find(ttype);
84 if(res == m_thresholdVectors.end()) {
85 cerr << "Unknown triggertype '" << L1DataDef::typeAsString(ttype) << "' in ThresholdConfig::getThresholdVector encountered" << endl;
86 throw runtime_error("Unknown triggertype in ThresholdConfig::getThresholdVector encountered" );
87 }
88 vector<TriggerThreshold*>& thrVec = res->second;
89
90 // check if maximum is exceeded
91 unsigned int max_thr = L1DataDef::typeConfig(ttype).max;
92 if(thr->mapping()>0 && (unsigned int)thr->mapping() >= max_thr) {
93 cerr << "ThresholdConfig::addTriggerThreshold: threshold mapping " << thr->mapping()
94 << " exceeds maximum for type '" << thr->type() << "' , abort!" << endl;
95 throw runtime_error( "ThresholdConfig::addTriggerThreshold: threshold mapping exceeds limit" );
96 }
97
98 thr->setThresholdNumber(thr->mapping());
99 insertInPosition(thrVec, thr, thr->mapping() );
100
101
102 // BPTX threshold is type NIM but gets inserted as BPTX as well (in run 2 not anymore) - no easy way to make this backward compatible
103// if(thr->name().find("BPTX")!=string::npos) {
104// string::size_type pos = thr->name().find_first_of("0123456789");
105// int mapping = boost::lexical_cast<int,string>(thr->name().substr(pos));
106// insertInPosition( thresholdVector(L1DataDef::BPTX), thr, mapping );
107// }
108
109 // for backward compatibility a copy of all EM and TAU thresholds
110 // is safed in the cluster threshold vector
111
112 if(l1Version()==0) {
113 if(ttype==L1DataDef::EM) {
115 }
116 if(ttype==L1DataDef::TAU) {
117 unsigned int max_em = L1DataDef::typeConfig(L1DataDef::EM).max;
118 unsigned int max_tau = 0; //L1DataDef::typeConfig(L1DataDef::TAU).max;
119 unsigned int pos = max_em + max_tau - thr->mapping() - 1;
121 }
122 }
123 return true;
124}
std::pair< std::vector< unsigned int >, bool > res
static TriggerTypeConfig & typeConfig(TriggerType tt)
static std::string & typeAsString(TriggerType tt)
Definition L1DataDef.h:53
bool insertInPosition(std::vector< TriggerThreshold * > &thrVec, TriggerThreshold *tt, unsigned int pos)
unsigned int l1Version() const

◆ attributeThresholdNumbers()

void TrigConf::ThresholdConfig::attributeThresholdNumbers ( )

Definition at line 224 of file ThresholdConfig.cxx.

224 {
225 // set the thresholdnumber for each threshold
226
227 // Run 2:
228 // this has been changed, the thresholdnumbers now correspond to the position in the vector (the index)
229
230 // Run 1:
231 // EM/TAU thresholds were an exception:
232
233 // The EM and TAU vector are related,
234 //
235 // the total number of EM and TAU thresholds is less than EM.max, the maximum number of
236 // tau thresholds is TAU.max
237 //
238 // the arrangement is such that the EM thresholds above 7 are after the TAU thresholds in reverse order
239
240 // for instance if there would be 6 TAU thresholds and 10 EM thresholds
241 // EM-TAU vector : [EM0,EM1,...,EM7,TAU0,TAU1,...,TAU5,EM9,EM8]
242 // thresholdNumber: [ 0, 1,..., 7, 8, 9,..., 13, 14, 15]
243
244
245 for(TriggerThreshold* p: thresholdVector(L1DataDef::EM)) {
246 if(p==0) continue;
247 const unsigned int max_em = L1DataDef::typeConfig(L1DataDef::EM).max;
248
249 if ( p->mapping()>=8 )
250 p->setThresholdNumber(max_em - 1 - (p->mapping()-8) );
251 }
252
253 for(TrigConf::TriggerThreshold* p: thresholdVector(L1DataDef::TAU)) {
254 if(p==0) continue;
255 if( p->ttype()==L1DataDef::TAU )
256 p->setThresholdNumber(p->mapping() + 8);
257 }
258
259}
const std::vector< TriggerThreshold * > & thresholdVector() const

◆ caloInfo()

const CaloInfo & TrigConf::ThresholdConfig::caloInfo ( ) const
inline

Definition at line 64 of file ThresholdConfig.h.

64{ return m_CaloInfo; }

◆ clear()

void TrigConf::ThresholdConfig::clear ( )

Definition at line 375 of file ThresholdConfig.cxx.

375 {
376
377 for(TriggerThreshold* thr: m_TriggerThresholdVector) delete thr;
379
380 for(thrVecMap_t::value_type & p: m_thresholdVectors)
381 p.second.clear();
382
383 m_CaloInfo.clear();
384}

◆ comment()

const std::string & TrigConf::TrigConfData::comment ( ) const
inlineinherited

Definition at line 23 of file TrigConfData.h.

23{return m_comment;}

◆ ctpVersion()

unsigned int TrigConf::ThresholdConfig::ctpVersion ( ) const
inline

Definition at line 84 of file ThresholdConfig.h.

84{ return m_ctpVersion; }

◆ findTriggerThreshold()

TrigConf::TriggerThreshold * TrigConf::ThresholdConfig::findTriggerThreshold ( unsigned int id)

Definition at line 264 of file ThresholdConfig.cxx.

264 {
265 for(TrigConf::TriggerThreshold *thr: m_TriggerThresholdVector)
266 if(thr->id()==id) return thr;
267 return 0;
268}

◆ getBcmcmbThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getBcmcmbThresholdVector ( ) const
inline

Definition at line 128 of file ThresholdConfig.h.

const std::vector< TriggerThreshold * > & getThresholdVector() const

◆ getBcmThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getBcmThresholdVector ( ) const
inline

Definition at line 127 of file ThresholdConfig.h.

◆ getBgrpThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getBgrpThresholdVector ( ) const
inline

Definition at line 119 of file ThresholdConfig.h.

◆ getBptxThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getBptxThresholdVector ( ) const
inline

Definition at line 130 of file ThresholdConfig.h.

◆ getClusterEmIsolation()

float TrigConf::ThresholdConfig::getClusterEmIsolation ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 138 of file ThresholdConfig.cxx.

138 {
139 ClusterThresholdValue* ctv = dynamic_cast<ClusterThresholdValue*>
140 (getThresholdVector(L1DataDef::EM)[thresholdnumber]->triggerThresholdValue(eta,phi));
141 return ctv?ctv->emIsolation():0;
142}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method

◆ getClusterHadIsolation()

float TrigConf::ThresholdConfig::getClusterHadIsolation ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 144 of file ThresholdConfig.cxx.

144 {
145 ClusterThresholdValue* ctv = dynamic_cast<ClusterThresholdValue*>
146 (getThresholdVector(L1DataDef::EM)[thresholdnumber]->triggerThresholdValue(eta,phi));
147 return ctv?ctv->hadIsolation():0;
148}

◆ getClusterHadVeto()

float TrigConf::ThresholdConfig::getClusterHadVeto ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 150 of file ThresholdConfig.cxx.

150 {
151 ClusterThresholdValue* ctv = dynamic_cast<ClusterThresholdValue*>
152 (getThresholdVector(L1DataDef::EM)[thresholdnumber]->triggerThresholdValue(eta,phi));
153 return ctv?ctv->hadVeto():0;
154}

◆ getClusterThreshold()

float TrigConf::ThresholdConfig::getClusterThreshold ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 185 of file ThresholdConfig.cxx.

185 {
186 return getThreshold(TrigConf::L1DataDef::EM, eta, phi, thresholdnumber);
187}
float getThreshold(L1DataDef::TriggerType type, int eta, int phi, int thresholdnumber) const

◆ getClusterThresholdType()

string TrigConf::ThresholdConfig::getClusterThresholdType ( int thresholdnumber) const

Definition at line 129 of file ThresholdConfig.cxx.

129 {
130 TriggerThreshold* thr = getThresholdVector(L1DataDef::EM)[thresholdnumber];
131 return thr?thr->type():"EM";
132}

◆ getClusterThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getClusterThresholdVector ( ) const
inline

Definition at line 108 of file ThresholdConfig.h.

108{ return m_ClusterThresholdVector; }

◆ getFJetThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getFJetThresholdVector ( ) const
inline

Definition at line 110 of file ThresholdConfig.h.

◆ getJbThreshold()

float TrigConf::ThresholdConfig::getJbThreshold ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 209 of file ThresholdConfig.cxx.

209 {
210 return getThreshold(TrigConf::L1DataDef::JB, eta, phi, thresholdnumber);
211}

◆ getJbThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getJbThresholdVector ( ) const
inline

Definition at line 111 of file ThresholdConfig.h.

◆ getJbWindow()

int TrigConf::ThresholdConfig::getJbWindow ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 172 of file ThresholdConfig.cxx.

172 {
173 return getThreshold(TrigConf::L1DataDef::JB, eta, phi, thresholdnumber);
174}

◆ getJetEtThreshold()

float TrigConf::ThresholdConfig::getJetEtThreshold ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 193 of file ThresholdConfig.cxx.

193 {
194 return getThreshold(TrigConf::L1DataDef::JE, eta, phi, thresholdnumber);
195}

◆ getJetEtVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getJetEtVector ( ) const
inline

Definition at line 114 of file ThresholdConfig.h.

◆ getJetThreshold()

float TrigConf::ThresholdConfig::getJetThreshold ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 205 of file ThresholdConfig.cxx.

205 {
206 return getThreshold(TrigConf::L1DataDef::JET, eta, phi, thresholdnumber);
207}

◆ getJetThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getJetThresholdVector ( ) const
inline

Definition at line 109 of file ThresholdConfig.h.

◆ getJetWindow()

int TrigConf::ThresholdConfig::getJetWindow ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 164 of file ThresholdConfig.cxx.

164 {
165 return getThreshold(TrigConf::L1DataDef::JET, eta, phi, thresholdnumber);
166}

◆ getJfThreshold()

float TrigConf::ThresholdConfig::getJfThreshold ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 213 of file ThresholdConfig.cxx.

213 {
214 return getThreshold(TrigConf::L1DataDef::JF, eta, phi, thresholdnumber);
215}

◆ getJfThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getJfThresholdVector ( ) const
inline

Definition at line 112 of file ThresholdConfig.h.

◆ getJfWindow()

int TrigConf::ThresholdConfig::getJfWindow ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 168 of file ThresholdConfig.cxx.

168 {
169 return getThreshold(TrigConf::L1DataDef::JF, eta, phi, thresholdnumber);
170}

◆ getLucidThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getLucidThresholdVector ( ) const
inline

Definition at line 129 of file ThresholdConfig.h.

◆ getMbtssiThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getMbtssiThresholdVector ( ) const
inline

Definition at line 124 of file ThresholdConfig.h.

◆ getMbtsThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getMbtsThresholdVector ( ) const
inline

Definition at line 123 of file ThresholdConfig.h.

◆ getMissEtSignVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getMissEtSignVector ( ) const
inline

Definition at line 116 of file ThresholdConfig.h.

◆ getMissEtSigThreshold()

float TrigConf::ThresholdConfig::getMissEtSigThreshold ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 201 of file ThresholdConfig.cxx.

201 {
202 return getThreshold(TrigConf::L1DataDef::XS, eta, phi, thresholdnumber);
203}

◆ getMissEtThreshold()

float TrigConf::ThresholdConfig::getMissEtThreshold ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 197 of file ThresholdConfig.cxx.

197 {
198 return getThreshold(TrigConf::L1DataDef::XE, eta, phi, thresholdnumber);
199}

◆ getMissEtVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getMissEtVector ( ) const
inline

Definition at line 115 of file ThresholdConfig.h.

◆ getMuonThreshold()

float TrigConf::ThresholdConfig::getMuonThreshold ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 189 of file ThresholdConfig.cxx.

189 {
190 return getThreshold(TrigConf::L1DataDef::MUON, eta, phi, thresholdnumber);
191}

◆ getMuonThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getMuonThresholdVector ( ) const
inline

Definition at line 117 of file ThresholdConfig.h.

◆ getNimThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getNimThresholdVector ( ) const
inline

Definition at line 121 of file ThresholdConfig.h.

◆ getNimThresholdVectorByType()

vector< TrigConf::TriggerThreshold * > TrigConf::ThresholdConfig::getNimThresholdVectorByType ( const std::string & type) const
private

Definition at line 367 of file ThresholdConfig.cxx.

367 {
368 vector<TriggerThreshold*> v;
369 for( TriggerThreshold* thr: getThresholdVector(L1DataDef::NIM) )
370 if ( thr->type() == type ) v.push_back(thr);
371 return v;
372}

◆ getPclkThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getPclkThresholdVector ( ) const
inline

Definition at line 120 of file ThresholdConfig.h.

◆ getRndmThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getRndmThresholdVector ( ) const
inline

Definition at line 118 of file ThresholdConfig.h.

◆ getThreshold()

float TrigConf::ThresholdConfig::getThreshold ( L1DataDef::TriggerType type,
int eta,
int phi,
int thresholdnumber ) const

Definition at line 181 of file ThresholdConfig.cxx.

181 {
182 return getThresholdVector(type)[thresholdnumber]->triggerThresholdValue(eta,phi)->ptcut();
183}

◆ getThresholdVector() [1/2]

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getThresholdVector ( ) const
inline

Definition at line 32 of file ThresholdConfig.h.

◆ getThresholdVector() [2/2]

const vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getThresholdVector ( L1DataDef::TriggerType type) const

Definition at line 37 of file ThresholdConfig.cxx.

37 {
38 thrVecMap_t::const_iterator res = m_thresholdVectors.find(type);
39 if(res == m_thresholdVectors.end()) {
40 cerr << "Unknown triggertype '" << L1DataDef::typeAsString(type) << "' in ThresholdConfig::getThresholdVector encountered" << endl;
41 throw std::runtime_error("Unknown triggertype in ThresholdConfig::getThresholdVector encountered" );
42 }
43 return res->second;
44}

◆ getTotEtThreshold()

float TrigConf::ThresholdConfig::getTotEtThreshold ( int eta,
int phi,
int thresholdnumber ) const

Definition at line 217 of file ThresholdConfig.cxx.

217 {
218 return getThreshold(TrigConf::L1DataDef::TE, eta, phi, thresholdnumber);
219}

◆ getTotEtVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getTotEtVector ( ) const
inline

Definition at line 113 of file ThresholdConfig.h.

◆ getTrtThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getTrtThresholdVector ( ) const
inline

Definition at line 125 of file ThresholdConfig.h.

◆ getWindow()

int TrigConf::ThresholdConfig::getWindow ( L1DataDef::TriggerType type,
int eta,
int phi,
int thresholdnumber ) const

Definition at line 160 of file ThresholdConfig.cxx.

160 {
161 return getThresholdVector(type)[thresholdnumber]->triggerThresholdValue(eta,phi)->window();
162}

◆ getZBThresholds()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getZBThresholds ( ) const
inline

Definition at line 122 of file ThresholdConfig.h.

◆ getZdcThresholdVector()

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::getZdcThresholdVector ( ) const
inline

Definition at line 126 of file ThresholdConfig.h.

◆ id()

unsigned int TrigConf::TrigConfData::id ( ) const
inlineinherited

Definition at line 21 of file TrigConfData.h.

21{return m_id;}

◆ indent()

std::ostream & TrigConfData::indent ( std::ostream & o,
int lvl,
int size ) const
protectedinherited

Definition at line 23 of file TrigConfData.cxx.

23 {
24 int width = lvl*size;
25 if(width==0) return o;
26 o << setw(lvl*size) << " ";
27 return o;
28}
const double width

◆ insertInPosition()

bool TrigConf::ThresholdConfig::insertInPosition ( std::vector< TriggerThreshold * > & thrVec,
TriggerThreshold * tt,
unsigned int pos )
private

Definition at line 53 of file ThresholdConfig.cxx.

53 {
54 thr->print();
55
56 // extend if necessary (filled with 0)
57 if(pos >= thrVec.size()) thrVec.resize(pos+1, 0);
58
59 if(thrVec[pos] != 0) {
60 cerr << "ThresholdConfig::insertInPosition: position " << pos
61 << " already filled for type " << thr->type() << " [" << thr->ttype() << "]" << ", abort!!" << endl;
62 cerr << endl << "Existing threshold" << endl;
63 thrVec[pos]->print("",5);
64 cerr << endl << "New threshold" << endl;
65 thr->print("",5);
66 throw runtime_error("ThresholdConfig::insertInPosition position already filled" );
67 }
68 thrVec[pos] = thr;
69
70 return true;
71}

◆ l1Version()

unsigned int TrigConf::ThresholdConfig::l1Version ( ) const
inline

Definition at line 87 of file ThresholdConfig.h.

87{ return m_l1Version; }

◆ lvl1MasterTableId()

unsigned int TrigConf::L1DataBaseclass::lvl1MasterTableId ( ) const
inlineinherited

Definition at line 30 of file L1DataBaseclass.h.

30{ return m_Lvl1MasterId; }

◆ name()

const std::string & TrigConf::TrigConfData::name ( ) const
inlineinherited

Definition at line 22 of file TrigConfData.h.

22{return m_name;}

◆ operator=()

ThresholdConfig & TrigConf::ThresholdConfig::operator= ( const ThresholdConfig & )
delete

◆ print()

void TrigConf::ThresholdConfig::print ( const std::string & indent = "",
unsigned int detail = 1 ) const
overridevirtual

Implements TrigConf::TrigConfData.

Definition at line 282 of file ThresholdConfig.cxx.

282 {
283 if(detail>=2) {
284 cout << indent << "Threshold configuration: " << getThresholdVector().size() << " thresholds" << endl;
286 cout << indent << " " << L1DataDef::typeConfig(tt).name << " thresholds: "
287 << getThresholdVector(tt).size() << " thresholds" << endl;
288 }
289 cout << "Threshold configuration: " << getThresholdVector().size() << " thresholds" << endl;
290 }
291 if(detail>=3) {
292 cout << indent << "=========================================" << endl
293 << indent << "== ThresholdConfig for MT_id = " << lvl1MasterTableId() << endl
294 << indent << "=========================================" << endl;
295 printVectorSummary(getThresholdVector(L1DataDef::EM), "EMThresholdVector", indent, detail);
296 printVectorSummary(getThresholdVector(L1DataDef::TAU), "TauThresholdVector", indent, detail);
297 printVectorSummary(m_ClusterThresholdVector, "ClusterThresholdVector", indent, detail);
298 printVectorSummary(getThresholdVector(L1DataDef::JET), "JetThresholdVector", indent, detail);
299 printVectorSummary(getThresholdVector(L1DataDef::JF), "JFThresholdVector", indent, detail);
300 printVectorSummary(getThresholdVector(L1DataDef::JB), "JBThresholdVector", indent, detail);
304 printVectorSummary(getThresholdVector(L1DataDef::MUON), "MuonThresholdVector", indent, detail);
305 printVectorSummary(getThresholdVector(L1DataDef::NIM), "NimThresholdVector", indent, detail);
306 }
307 m_CaloInfo.print(indent, detail);
308}
void printVectorSummary(const TrigConf::ThresholdConfig::thrVec_t &vec, const string &name, const string &indent, unsigned int detail)
unsigned int lvl1MasterTableId() const
static const std::vector< TriggerType > & types()
Definition L1DataDef.h:55
std::ostream & indent(std::ostream &o, int lvl, int size) const

◆ printNameIdV()

void TrigConfData::printNameIdV ( const std::string & indent = "") const
inherited

Definition at line 31 of file TrigConfData.cxx.

31 {
32 cout << indent << name();
33 if(id()>0 || version()>0)
34 cout << " (id=" << id() << "/v=" << version() << ")";
35 cout << endl;
36 if(comment()!="")
37 cout << indent << "Comment: " << comment() << endl;
38}
unsigned int id() const
const std::string & name() const
const std::string & comment() const
unsigned int version() const

◆ printThresholdValueMap()

void TrigConf::ThresholdConfig::printThresholdValueMap ( ) const

Definition at line 326 of file ThresholdConfig.cxx.

326 {
327 printTtvSummary(getThresholdVector(L1DataDef::EM), "EM threshold values");
328 printTtvSummary(getThresholdVector(L1DataDef::TAU), "Tau threshold values");
329 printTtvSummary(m_ClusterThresholdVector, "Cluster threshold values (EM + Tau)");
330 printTtvSummary(getThresholdVector(L1DataDef::JET), "JetThreshold values");
331 printTtvSummary(getThresholdVector(L1DataDef::FJET), "FJetThreshold values");
335 printTtvSummary(getThresholdVector(L1DataDef::MUON), "MuonThreshold values");
336 printTtvSummary(getThresholdVector(L1DataDef::NIM), "NimThreshold values");
337}
void printTtvSummary(const thrVec_t &vec, const std::string &name) const

◆ printTriggerThresholdVector()

void TrigConf::ThresholdConfig::printTriggerThresholdVector ( const std::string & indent = "") const

Definition at line 311 of file ThresholdConfig.cxx.

311 {
312 printVectorSummary(getThresholdVector(),"complete threshold vector", indent, 5);
313}

◆ printTtvMap()

void TrigConf::ThresholdConfig::printTtvMap ( const TriggerThreshold * thr) const

Definition at line 340 of file ThresholdConfig.cxx.

340 {
341 char line[1000];
342
343 cout << "#---------------------------------------------------------" << endl
344 << "# TTV(type,name) eta phi : pt window emIsol hadIsol hadVeto" << endl
345 << "# Number of theshold values: " << thr->thresholdValueVector().size() << endl
346 << "#---------------------------------------------------------" << endl;
347 for (int ieta = -49; ieta <= 49; ++ieta) {
348 for (int iphi = 0; iphi < 64; ++iphi) {
349 TriggerThresholdValue* ttv = thr->triggerThresholdValue(ieta, iphi);
350 float emiso(-1), hadiso(-1), hadveto(-1);
351 const ClusterThresholdValue* ctv = dynamic_cast<const ClusterThresholdValue*>(ttv);
352 if(ctv) {
353 emiso = ctv->emIsolation();
354 hadiso = ctv->hadIsolation();
355 hadveto = ctv->hadVeto();
356 }
357 sprintf(line, "TTV(%-4s,%-10s) eta[%2d] phi[%2d]: %3f %6u %6f %6f %6f",
358 thr->type().c_str(), thr->name().c_str(), ieta, iphi,
359 ttv->ptcut(), ttv->window(), emiso, hadiso, hadveto);
360 cout << line << endl;
361 }
362 }
363 return;
364}

◆ printTtvSummary()

void TrigConf::ThresholdConfig::printTtvSummary ( const thrVec_t & vec,
const std::string & name ) const

Definition at line 318 of file ThresholdConfig.cxx.

318 {
319 cout << "#=========================================" << endl
320 << "# " << name << ":" << endl
321 << "#=========================================" << endl;
322 for(TriggerThreshold* thr: vec) printTtvMap(thr);
323}
std::vector< size_t > vec
void printTtvMap(const TriggerThreshold *thr) const

◆ setCaloInfo()

void TrigConf::ThresholdConfig::setCaloInfo ( const CaloInfo & ci)
inline

Definition at line 65 of file ThresholdConfig.h.

65{ m_CaloInfo = ci; }

◆ setComment()

void TrigConf::TrigConfData::setComment ( const std::string & c)
inlineinherited

Definition at line 32 of file TrigConfData.h.

◆ setCtpVersion()

void TrigConf::ThresholdConfig::setCtpVersion ( unsigned int ctpVersion)
inline

Definition at line 83 of file ThresholdConfig.h.

unsigned int ctpVersion() const

◆ setId()

void TrigConf::TrigConfData::setId ( unsigned int id)
inlineinherited

Definition at line 29 of file TrigConfData.h.

29{ m_id=id; }

◆ setL1Version()

void TrigConf::ThresholdConfig::setL1Version ( unsigned int l1Version)
inline

Definition at line 86 of file ThresholdConfig.h.

◆ setLvl1MasterTableId()

void TrigConf::L1DataBaseclass::setLvl1MasterTableId ( unsigned int id)
inlineinherited

Definition at line 31 of file L1DataBaseclass.h.

31{ m_Lvl1MasterId = id; }

◆ setName()

void TrigConf::TrigConfData::setName ( const std::string & name)
inlineinherited

Definition at line 30 of file TrigConfData.h.

30{ m_name = name;}

◆ setSMK()

void TrigConf::TrigConfData::setSMK ( int id)
inlineinherited

Definition at line 28 of file TrigConfData.h.

28{m_smk=id;}

◆ setSuperMasterTableId()

void TrigConf::TrigConfData::setSuperMasterTableId ( int id)
inlineinherited

Definition at line 27 of file TrigConfData.h.

27{m_smk=id;}

◆ setVersion()

void TrigConf::TrigConfData::setVersion ( unsigned int version)
inlineinherited

Definition at line 31 of file TrigConfData.h.

◆ size() [1/2]

size_t TrigConf::ThresholdConfig::size ( ) const
inline

Definition at line 44 of file ThresholdConfig.h.

44{ return getThresholdVector().size(); }

◆ size() [2/2]

size_t TrigConf::ThresholdConfig::size ( L1DataDef::TriggerType type) const
inline

Definition at line 45 of file ThresholdConfig.h.

45{ return getThresholdVector(type).size(); }

◆ smk()

unsigned int TrigConf::TrigConfData::smk ( ) const
inlineinherited

Definition at line 20 of file TrigConfData.h.

20{return m_smk;}

◆ superMasterTableId()

int TrigConf::TrigConfData::superMasterTableId ( ) const
inlineinherited

Definition at line 19 of file TrigConfData.h.

19{return (int)m_smk;}

◆ thresholdVector() [1/2]

const std::vector< TriggerThreshold * > & TrigConf::ThresholdConfig::thresholdVector ( ) const
inline

Definition at line 33 of file ThresholdConfig.h.

33{ return m_TriggerThresholdVector; } // backward compatible

◆ thresholdVector() [2/2]

const std::vector< TrigConf::TriggerThreshold * > & TrigConf::ThresholdConfig::thresholdVector ( L1DataDef::TriggerType type) const

Definition at line 47 of file ThresholdConfig.cxx.

47 {
48 return getThresholdVector(type);
49}

◆ version()

unsigned int TrigConf::TrigConfData::version ( ) const
inlineinherited

Definition at line 24 of file TrigConfData.h.

24{return m_version;}

◆ CTPConfig

friend class CTPConfig
friend

Definition at line 96 of file ThresholdConfig.h.

Member Data Documentation

◆ m_CaloInfo

CaloInfo TrigConf::ThresholdConfig::m_CaloInfo
private

Definition at line 103 of file ThresholdConfig.h.

◆ m_ClusterThresholdVector

thrVec_t TrigConf::ThresholdConfig::m_ClusterThresholdVector
private

Definition at line 102 of file ThresholdConfig.h.

◆ m_comment

std::string TrigConf::TrigConfData::m_comment
privateinherited

Definition at line 48 of file TrigConfData.h.

◆ m_ctpVersion

unsigned int TrigConf::ThresholdConfig::m_ctpVersion
private

Definition at line 98 of file ThresholdConfig.h.

◆ m_id

unsigned int TrigConf::TrigConfData::m_id
privateinherited

Definition at line 45 of file TrigConfData.h.

◆ m_l1Version

unsigned int TrigConf::ThresholdConfig::m_l1Version
private

Definition at line 99 of file ThresholdConfig.h.

◆ m_Lvl1MasterId

unsigned int TrigConf::L1DataBaseclass::m_Lvl1MasterId
privateinherited

Definition at line 35 of file L1DataBaseclass.h.

◆ m_name

std::string TrigConf::TrigConfData::m_name
privateinherited

Definition at line 46 of file TrigConfData.h.

◆ m_smk

unsigned int TrigConf::TrigConfData::m_smk
privateinherited

Definition at line 44 of file TrigConfData.h.

◆ m_thresholdVectors

thrVecMap_t TrigConf::ThresholdConfig::m_thresholdVectors
private

Definition at line 100 of file ThresholdConfig.h.

◆ m_TriggerThresholdVector

thrVec_t TrigConf::ThresholdConfig::m_TriggerThresholdVector
private

Definition at line 101 of file ThresholdConfig.h.

◆ m_version

unsigned int TrigConf::TrigConfData::m_version
privateinherited

Definition at line 47 of file TrigConfData.h.


The documentation for this class was generated from the following files: