ATLAS Offline Software
Loading...
Searching...
No Matches
TCS::ConfigurableAlg Class Referenceabstract

#include <ConfigurableAlg.h>

Inheritance diagram for TCS::ConfigurableAlg:
Collaboration diagram for TCS::ConfigurableAlg:

Classes

class  ConfigurableAlgImpl
 The implementation class. More...

Public Member Functions

 ConfigurableAlg (const std::string &name, AlgType algType)
virtual ~ConfigurableAlg ()
void setClassName (const std::string &className)
void setLegacyMode (bool isLegacyTopo)
const std::string & name () const
const std::string & className () const
std::string fullname () const
unsigned int algoId () const
virtual StatusCode initialize ()
StatusCode reset ()
bool isSortingAlg () const
bool isDecisionAlg () const
bool isCountingAlg () const
bool isLegacyTopo () const
unsigned int calcDeltaPhiBW (const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcDeltaEtaBW (const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcInvMassBW (const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcTMassBW (const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcDeltaR2BW (const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned long quadraticSumBW (int i1, int i2)
unsigned int calcDeltaPhi (const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcDeltaEta (const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcInvMass (const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcTMass (const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcDeltaR2 (const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
const Parameterparameter (std::string_view parameterName) const
const Parameterparameter (std::string_view parameterName, unsigned int selection) const
const ParameterSpaceparameters () const
void setParameters (const ParameterSpace &)
void setAlgoId (unsigned int algoId)
void setL1TopoHistSvc (std::shared_ptr< IL1TopoHistSvc >)
 sets the external hist service
void bookHistMult (std::vector< std::string > &regName, const std::string &name, const std::string &title, const std::string &xtitle, const int binx, const int xmin, const int xmax)
void bookHist (std::vector< std::string > &regName, std::string_view name, std::string_view title, const int binx, const int xmin, const int xmax)
void bookHistMult (std::vector< std::string > &regName, const std::string &name, const std::string &title, const std::string &xtitle, const std::string &ytitle, const int binx, const int xmin, const int xmax, const int biny, const int ymin, const int ymax)
void bookHist (std::vector< std::string > &regName, std::string_view name, std::string_view title, const int binx, const int xmin, const int xmax, const int biny, const int ymin, const int ymax)
bool msgLvl (const MSGTC::Level lvl) const
 Test the output level.
MsgStreamTC & msg () const
 The standard message stream.
MsgStreamTC & msg (const MSGTC::Level lvl) const
 The standard message stream.
const std::string & getName () const
 name accessor

Protected Types

enum  AlgType { NONE , SORT , DECISION , COUNT }

Protected Member Functions

void defineParameter (std::string_view name, TCS::parType_t value)
void defineParameter (std::string_view name, TCS::parType_t value, unsigned int selection)
virtual StatusCode doReset ()=0
void registerHist (TH1 *)
void registerHist (TH2 *)
void fillHist1D (const std::string &histName, double x)
void fillHist2D (const std::string &histName, double x, double y)
bool isocut (const std::string &threshold, const unsigned int bit) const
bool isocut (const unsigned int threshold, const unsigned int bit) const

Private Member Functions

void defineParameter (const Parameter &)
std::string ToString (const int val)

Private Attributes

std::unique_ptr< ConfigurableAlgImplm_impl
std::string m_name {""}
std::string m_className {""}
unsigned int m_algoId {0}
ParameterSpace m_parameters {""}
AlgType m_algType
bool m_isLegacyTopo
boost::thread_specific_ptr< MsgStreamTC > m_msg_tls
 MsgStreamTC instance (a std::cout like with print-out levels).

Detailed Description

Definition at line 31 of file ConfigurableAlg.h.

Member Enumeration Documentation

◆ AlgType

Enumerator
NONE 
SORT 
DECISION 
COUNT 

Definition at line 33 of file ConfigurableAlg.h.

Constructor & Destructor Documentation

◆ ConfigurableAlg()

ConfigurableAlg::ConfigurableAlg ( const std::string & name,
AlgType algType )

Definition at line 107 of file ConfigurableAlg.cxx.

107 :
110 m_name(name),
112 m_algType(algType),
113 m_isLegacyTopo(false)
114{}
const std::string & name() const
std::unique_ptr< ConfigurableAlgImpl > m_impl
ParameterSpace m_parameters

◆ ~ConfigurableAlg()

ConfigurableAlg::~ConfigurableAlg ( )
virtual

Definition at line 117 of file ConfigurableAlg.cxx.

118{}

Member Function Documentation

◆ algoId()

unsigned int TCS::ConfigurableAlg::algoId ( ) const
inline

Definition at line 54 of file ConfigurableAlg.h.

54{ return m_algoId; }

◆ bookHist() [1/2]

void ConfigurableAlg::bookHist ( std::vector< std::string > & regName,
std::string_view name,
std::string_view title,
const int binx,
const int xmin,
const int xmax )

Definition at line 272 of file ConfigurableAlg.cxx.

272 {
273 std::string xmin_str = ToString(xmin);
274 std::string xmax_str = ToString(xmax);
275 std::string newTitle{title};
276 std::string newName{name};
277
278
279 newName = newName+"_"+xmin_str+newTitle+xmax_str;
280 newTitle = xmin_str+newTitle+xmax_str;
281 std::replace( newName.begin(), newName.end(), '-', 'n');
282 std::replace( newName.begin(), newName.end(), ' ', '_');
283
284 regName.push_back(m_name+"/"+newName);
285
286 // Add units to axis labels
287 std::string xTitle{title};
288 if (m_isLegacyTopo) {
289 if (title == "ETA" || title == "DETA" || title == "PHI" || title == "DPHI" || title == "DR") { xTitle += "#times10"; }
290 if (title == "PT" || title == "ET" || title == "HT" || title == "INVM" || title == "MT") { xTitle +=" [GeV]"; }
291 }
292 else {
293 if (title == "ETA" || title == "DETA" || title == "DR") { xTitle +="#times40"; }
294 if (title == "PHI" || title == "DPHI") { xTitle +="#times20"; }
295 if (title == "PT" || title == "ET" || title == "HT" || title == "INVM" || title == "MT") { xTitle +=" [100 MeV]"; }
296 }
297
298 int xmin_new,xmax_new,binx_new=binx;
299 if ( xmin > 0.0)
300 { xmin_new=0.0; }
301 else
302 { xmin_new=1.5*xmin; }
303
304 // if the maximum inv. mass cut defined by the menu over 4000 MeV,
305 // set x-axis range maximum to 4000 MeV. This is only for legacy triggers,
306 // phase1 does not exceed this limit- asonay 08/2022
307 if (xmax > 4000 && m_isLegacyTopo) {
308 xmax_new = 4000;
309 binx_new = 200;
310 }
311 else {xmax_new = 1.5*xmax;}
312
313 // if angular kinematics, use fixed range
314 int eta_max = 50;
315 int phi_max = 64;
316 int dr_max = 30;
317 if (not m_isLegacyTopo) {
318 eta_max *= 4;
319 phi_max *= 2;
320 dr_max *= 4;
321 }
322
323 if ( title.find("ETA") != std::string_view::npos ){
324 xmin_new=-eta_max;
325 xmax_new=eta_max;
326 }
327 if ( title.find("PHI") != std::string_view::npos || title.find("DPHI") != std::string_view::npos ){
328 xmin_new=0;
329 xmax_new=phi_max;
330 }
331 if ( title.find("DETA") != std::string_view::npos || title.find("DR") != std::string_view::npos ){
332 xmin_new=0;
333 xmax_new=dr_max;
334 }
335
336 TH1 *h = new TH1F(newName.c_str(), newTitle.c_str(), binx_new, xmin_new, xmax_new);
337 h->GetXaxis()->SetTitle(xTitle.c_str());
338 m_impl->registerHist(h);
339}
std::string ToString(const int val)
double xmax
Definition listroot.cxx:61
double xmin
Definition listroot.cxx:60
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)

◆ bookHist() [2/2]

void ConfigurableAlg::bookHist ( std::vector< std::string > & regName,
std::string_view name,
std::string_view title,
const int binx,
const int xmin,
const int xmax,
const int biny,
const int ymin,
const int ymax )

Definition at line 350 of file ConfigurableAlg.cxx.

350 {
351 auto usPos = title.find(" vs ");
352 std::string xName;
353 std::string yName;
354 if (usPos != std::string_view::npos)[[likely]]{
355 xName.assign(title.substr(0,usPos));
356 yName.assign(title.substr(usPos+4));
357 }
358 std::string xmin_str = ToString(xmin);
359 std::string xmax_str = ToString(xmax);
360 std::string ymin_str = ToString(ymin);
361 std::string ymax_str = ToString(ymax);
362 std::string newTitle{title};
363 std::string newName{name};
364
365 newTitle = xmin_str+xName+xmax_str+" vs "+ymin_str+yName+ymax_str;
366 newName = newName+"_"+xmin_str+xName+xmax_str+"_"+ymin_str+yName+ymax_str;
367 std::replace( newName.begin(), newName.end(), '-', 'n');
368 std::replace( newName.begin(), newName.end(), ' ', '_');
369
370 regName.push_back(m_name+"/"+newName);
371
372 // Add units to axis labels
373 std::string xTitle = xName;
374 std::string yTitle = yName;
375 if (m_isLegacyTopo) {
376 if (xName == "ETA" || xName == "DETA" || xName == "PHI" || xName == "DPHI" || xName == "DR") { xTitle = xName+"#times10"; }
377 if (xName == "PT" || xName == "ET" || xName == "HT" || xName == "INVM" || xName == "MT") { xTitle = xName+" [GeV]"; }
378
379 if (yName == "ETA" || yName == "DETA" || yName == "PHI" || yName == "DPHI" || yName == "DR") { yTitle = yName+"#times10"; }
380 if (yName == "PT" || yName == "ET" || yName == "HT" || yName == "INVM" || yName == "MT") { yTitle = yName+" [GeV]"; }
381 }
382 else {
383 if (xName == "ETA" || xName == "DETA" || xName == "DR") { xTitle = xName+"#times40"; }
384 if (xName == "PHI" || xName == "DPHI") { xTitle = xName+"#times20"; }
385 if (xName == "PT" || xName == "ET" || xName == "HT" || xName == "INVM" || xName == "MT") { xTitle = xName+" [100 MeV]"; }
386
387 if (yName == "ETA" || yName == "DETA" || yName == "DR") { yTitle = yName+"#times40"; }
388 if (yName == "PHI" || yName == "DPHI") { yTitle = yName+"#times20"; }
389 if (yName == "PT" || yName == "ET" || yName == "HT" || yName == "INVM" || yName == "MT") { yTitle = yName+" [100 MeV]"; }
390 }
391
392 int xmin_new,xmax_new,binx_new=binx;
393 if ( xmin > 0.0)
394 { xmin_new=0.0; }
395 else
396 { xmin_new=1.5*xmin; }
397
398 // if the maximum inv. mass cut defined by the menu over 4000 MeV,
399 // set x-axis range maximum to 4000 MeV. This is only for legacy triggers,
400 // phase1 does not exceed this limit- asonay 08/2022
401 if (xmax > 4000 && m_isLegacyTopo) {
402 xmax_new = 4000;
403 binx_new = 200;
404 }
405 else {xmax_new = 1.5*xmax;}
406
407 int ymin_new,ymax_new,biny_new=biny;
408 if ( ymin > 0.0)
409 { ymin_new=0.0; }
410 else
411 { ymin_new=1.5*ymin; }
412
413 // if the maximum inv. mass cut defined by the menu over 4000 MeV,
414 // set y-axis range maximum to 4000 MeV. This is only for legacy triggers,
415 // phase1 does not exceed this limit- asonay 08/2022
416 if (ymax > 4000 && m_isLegacyTopo) {
417 ymax_new = 4000;
418 biny_new = 200;
419 }
420 else {ymax_new = 1.5*ymax;}
421
422
423 // if angular kinematics, use fixed range
424 int eta_max = 50;
425 int phi_max = 64;
426 int dr_max = 30;
427 if (not m_isLegacyTopo) {
428 eta_max *= 4;
429 phi_max *= 2;
430 dr_max *= 4;
431 }
432
433 if ( xName.find("ETA") != std::string::npos ){
434 xmin_new=-eta_max;
435 xmax_new=eta_max;
436 }
437 if ( yName.find("ETA") != std::string::npos ){
438 ymin_new=-eta_max;
439 ymax_new=eta_max;
440 }
441 if ( xName.find("PHI") != std::string::npos || xName.find("DPHI") != std::string::npos ){
442 xmin_new=0;
443 xmax_new=phi_max;
444 }
445 if ( yName.find("PHI") != std::string::npos || yName.find("DPHI") != std::string::npos ){
446 ymin_new=0;
447 ymax_new=phi_max;
448 }
449 if ( xName.find("DETA") != std::string::npos || xName.find("DR") != std::string::npos ){
450 xmin_new=0;
451 xmax_new=dr_max;
452 }
453 if ( yName.find("DETA") != std::string::npos || yName.find("DR") != std::string::npos ){
454 ymin_new=0;
455 ymax_new=dr_max;
456 }
457
458 TH2 *h = new TH2F(newName.c_str(), newTitle.c_str(), binx_new, xmin_new, xmax_new, biny_new, ymin_new, ymax_new);
459 h->GetXaxis()->SetTitle(xTitle.c_str());
460 h->GetYaxis()->SetTitle(yTitle.c_str());
461 m_impl->registerHist(h);
462}
double ymin
Definition listroot.cxx:63
double ymax
Definition listroot.cxx:64
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
#define likely(x)

◆ bookHistMult() [1/2]

void ConfigurableAlg::bookHistMult ( std::vector< std::string > & regName,
const std::string & name,
const std::string & title,
const std::string & xtitle,
const int binx,
const int xmin,
const int xmax )

Definition at line 341 of file ConfigurableAlg.cxx.

341 {
342
343 regName.push_back(m_name+"/"+name);
344
345 TH1 *h = new TH1F(name.c_str(), title.c_str(), binx, xmin, xmax);
346 h->GetXaxis()->SetTitle(xtitle.c_str());
347 m_impl->registerHist(h);
348}

◆ bookHistMult() [2/2]

void ConfigurableAlg::bookHistMult ( std::vector< std::string > & regName,
const std::string & name,
const std::string & title,
const std::string & xtitle,
const std::string & ytitle,
const int binx,
const int xmin,
const int xmax,
const int biny,
const int ymin,
const int ymax )

Definition at line 464 of file ConfigurableAlg.cxx.

464 {
465
466 regName.push_back(m_name+"/"+name);
467
468 TH2 *h = new TH2F(name.c_str(), title.c_str(), binx, xmin, xmax, biny, ymin, ymax);
469 h->GetXaxis()->SetTitle(xtitle.c_str());
470 h->GetYaxis()->SetTitle(ytitle.c_str());
471 m_impl->registerHist(h);
472}

◆ calcDeltaEta()

unsigned int ConfigurableAlg::calcDeltaEta ( const TCS::GenericTOB * tob1,
const TCS::GenericTOB * tob2 )

Definition at line 175 of file ConfigurableAlg.cxx.

175 {
176 if (m_isLegacyTopo)
177 {return TSU::Kinematics::calcDeltaEtaLegacy(tob1,tob2);}
178 else
179 {return TSU::Kinematics::calcDeltaEta(tob1,tob2);}
180}
static unsigned int calcDeltaEta(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaEtaLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)

◆ calcDeltaEtaBW()

unsigned int ConfigurableAlg::calcDeltaEtaBW ( const TCS::GenericTOB * tob1,
const TCS::GenericTOB * tob2 )

Definition at line 130 of file ConfigurableAlg.cxx.

130 {
131 if (m_isLegacyTopo)
132 {return TSU::Kinematics::calcDeltaEtaBWLegacy(tob1,tob2);}
133 else
134 {return TSU::Kinematics::calcDeltaEtaBW(tob1,tob2);}
135}
static unsigned int calcDeltaEtaBWLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaEtaBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)

◆ calcDeltaPhi()

unsigned int ConfigurableAlg::calcDeltaPhi ( const TCS::GenericTOB * tob1,
const TCS::GenericTOB * tob2 )

Definition at line 167 of file ConfigurableAlg.cxx.

167 {
168 if (m_isLegacyTopo)
169 {return TSU::Kinematics::calcDeltaPhiLegacy(tob1,tob2);}
170 else
171 {return TSU::Kinematics::calcDeltaPhi(tob1,tob2);}
172}
static unsigned int calcDeltaPhi(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaPhiLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)

◆ calcDeltaPhiBW()

unsigned int ConfigurableAlg::calcDeltaPhiBW ( const TCS::GenericTOB * tob1,
const TCS::GenericTOB * tob2 )

Definition at line 122 of file ConfigurableAlg.cxx.

122 {
123 if (m_isLegacyTopo)
124 {return TSU::Kinematics::calcDeltaPhiBWLegacy(tob1,tob2);}
125 else
126 {return TSU::Kinematics::calcDeltaPhiBW(tob1,tob2);}
127}
static unsigned int calcDeltaPhiBWLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaPhiBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)

◆ calcDeltaR2()

unsigned int ConfigurableAlg::calcDeltaR2 ( const TCS::GenericTOB * tob1,
const TCS::GenericTOB * tob2 )

Definition at line 193 of file ConfigurableAlg.cxx.

193 {
194 if (m_isLegacyTopo)
195 {return TSU::Kinematics::calcDeltaR2Legacy(tob1,tob2);}
196 else
197 {return TSU::Kinematics::calcDeltaR2(tob1,tob2);}
198}
static unsigned int calcDeltaR2Legacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaR2(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)

◆ calcDeltaR2BW()

unsigned int ConfigurableAlg::calcDeltaR2BW ( const TCS::GenericTOB * tob1,
const TCS::GenericTOB * tob2 )

Definition at line 154 of file ConfigurableAlg.cxx.

154 {
155 if (m_isLegacyTopo)
156 {return TSU::Kinematics::calcDeltaR2BWLegacy(tob1,tob2);}
157 else
158 {return TSU::Kinematics::calcDeltaR2BW(tob1,tob2);}
159}
static unsigned int calcDeltaR2BW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaR2BWLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)

◆ calcInvMass()

unsigned int ConfigurableAlg::calcInvMass ( const TCS::GenericTOB * tob1,
const TCS::GenericTOB * tob2 )

Definition at line 183 of file ConfigurableAlg.cxx.

183 {
184 return TSU::Kinematics::calcInvMass(tob1,tob2);
185}
static unsigned int calcInvMass(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)

◆ calcInvMassBW()

unsigned int ConfigurableAlg::calcInvMassBW ( const TCS::GenericTOB * tob1,
const TCS::GenericTOB * tob2 )

Definition at line 138 of file ConfigurableAlg.cxx.

138 {
139 if (m_isLegacyTopo)
140 {return TSU::Kinematics::calcInvMassBWLegacy(tob1,tob2);}
141 else
142 {return TSU::Kinematics::calcInvMassBW(tob1,tob2);}
143}
static unsigned int calcInvMassBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcInvMassBWLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)

◆ calcTMass()

unsigned int ConfigurableAlg::calcTMass ( const TCS::GenericTOB * tob1,
const TCS::GenericTOB * tob2 )

Definition at line 188 of file ConfigurableAlg.cxx.

188 {
189 return TSU::Kinematics::calcTMass(tob1,tob2);
190}
static unsigned int calcTMass(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)

◆ calcTMassBW()

unsigned int ConfigurableAlg::calcTMassBW ( const TCS::GenericTOB * tob1,
const TCS::GenericTOB * tob2 )

Definition at line 146 of file ConfigurableAlg.cxx.

146 {
147 if (m_isLegacyTopo)
148 {return TSU::Kinematics::calcTMassBWLegacy(tob1,tob2);}
149 else
150 {return TSU::Kinematics::calcTMassBW(tob1,tob2);}
151}
static unsigned int calcTMassBWLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcTMassBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)

◆ className()

const std::string & TCS::ConfigurableAlg::className ( ) const
inline

Definition at line 50 of file ConfigurableAlg.h.

50{ return m_className; }

◆ defineParameter() [1/3]

void ConfigurableAlg::defineParameter ( const Parameter & parameter)
private

Definition at line 215 of file ConfigurableAlg.cxx.

215 {
216 if( parameters().contains( parameter.name(), parameter.selection() ) ) {
217 TCS_EXCEPTION("Duplicate parameter definition '" << parameter.name() << "' for algorithm '" << name() << "'");
218 }
219 m_parameters.addParameter(parameter);
220}
const ParameterSpace & parameters() const
const Parameter & parameter(std::string_view parameterName) const
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:116

◆ defineParameter() [2/3]

void ConfigurableAlg::defineParameter ( std::string_view name,
TCS::parType_t value )
protected

Definition at line 203 of file ConfigurableAlg.cxx.

203 {
204 defineParameter( Parameter(name, value) );
205}
void defineParameter(std::string_view name, TCS::parType_t value)

◆ defineParameter() [3/3]

void ConfigurableAlg::defineParameter ( std::string_view name,
TCS::parType_t value,
unsigned int selection )
protected

Definition at line 209 of file ConfigurableAlg.cxx.

209 {
210 defineParameter( Parameter(name, value, selection) );
211}
const std::string selection

◆ doReset()

virtual StatusCode TCS::ConfigurableAlg::doReset ( )
protectedpure virtual

◆ fillHist1D()

void ConfigurableAlg::fillHist1D ( const std::string & histName,
double x )
protected

Definition at line 474 of file ConfigurableAlg.cxx.

474 {
475 m_impl->fillHist1D(histName,x);
476}
#define x

◆ fillHist2D()

void ConfigurableAlg::fillHist2D ( const std::string & histName,
double x,
double y )
protected

Definition at line 478 of file ConfigurableAlg.cxx.

478 {
479 m_impl->fillHist2D(histName,x,y);
480}
#define y

◆ fullname()

std::string TCS::ConfigurableAlg::fullname ( ) const
inline

Definition at line 51 of file ConfigurableAlg.h.

51{ return m_className + "/" + m_name; }

◆ getName()

const std::string & TrigConf::TrigConfMessaging::getName ( ) const
inlineinherited

name accessor

Returns
the name

Definition at line 101 of file TrigConfMessaging.h.

101 {
102 return m_name;
103 }

◆ initialize()

virtual StatusCode TCS::ConfigurableAlg::initialize ( )
inlinevirtual

Reimplemented in TCS::ADVAE_2A, TCS::AnomalyDetectionBDT, TCS::ARTEMIS_2A, TCS::ClusterNoSort, TCS::ClusterSelect, TCS::ClusterSort, TCS::cTauMultiplicity, TCS::DeltaEtaIncl1, TCS::DeltaEtaIncl2, TCS::DeltaEtaPhiIncl1, TCS::DeltaEtaPhiIncl2, TCS::DeltaPhiIncl1, TCS::DeltaPhiIncl2, TCS::DeltaRApproxBoxCutIncl1, TCS::DeltaRApproxBoxCutIncl2, TCS::DeltaRSqrIncl1, TCS::DeltaRSqrIncl1Charge, TCS::DeltaRSqrIncl2, TCS::DeltaRSqrIncl2Charge, TCS::DisambiguationDetaDPhiIncl3, TCS::DisambiguationDRIncl2, TCS::DisambiguationDRIncl3, TCS::DisambiguationIncl2, TCS::DisambiguationIncl3, TCS::DisambiguationInvmIncl2, TCS::eEmMultiplicity, TCS::eEmNoSort, TCS::eEmSelect, TCS::eEmSort, TCS::EnergyThreshold, TCS::EtaPhiWindow, TCS::eTauMultiplicity, TCS::eTauNoSort, TCS::eTauSelect, TCS::eTauSort, TCS::EtCut, TCS::ExclusiveJets, TCS::gJetMultiplicity, TCS::gJetNoSort, TCS::gJetSelect, TCS::gJetSort, TCS::gLJetMultiplicity, TCS::gLJetNoSort, TCS::gLJetSelect, TCS::gLJetSort, TCS::InvariantMassDeltaPhiInclusive1, TCS::InvariantMassDeltaPhiInclusive2, TCS::InvariantMassDeltaPhiInclusive2Charge, TCS::InvariantMassDeltaPhiSumEtInclusive1, TCS::InvariantMassInclusive1, TCS::InvariantMassInclusive1Disambiguation2, TCS::InvariantMassInclusive2, TCS::InvariantMassInclusiveDeltaRSqrIncl1, TCS::InvariantMassInclusiveDeltaRSqrIncl1Charge, TCS::InvariantMassInclusiveDeltaRSqrIncl2, TCS::InvariantMassInclusiveDeltaRSqrIncl2Charge, TCS::InvariantMassThreeTOBsIncl1, TCS::InvariantMassThreeTOBsIncl1Charge, TCS::jEmMultiplicity, TCS::jEmNoSort, TCS::jEmSelect, TCS::jEmSort, TCS::JetHT, TCS::JetMatch, TCS::JetNoSort, TCS::JetNoSortMatch, TCS::JetSelect, TCS::JetSort, TCS::jJetMultiplicity, TCS::jJetNoSort, TCS::jJetSelect, TCS::jJetSort, TCS::jLJetMultiplicity, TCS::jLJetNoSort, TCS::jLJetSelect, TCS::jLJetSort, TCS::jTauMultiplicity, TCS::jTauNoSort, TCS::jTauSelect, TCS::jTauSort, TCS::jTENoSort, TCS::jXENoSort, TCS::jXESort, TCS::KalmanMETCorrection, TCS::LAr, TCS::LArSaturation, TCS::METCut, TCS::METNoSort, TCS::MetSort, TCS::METSortingAlg, TCS::MinDeltaPhiIncl2, TCS::Multiplicity, TCS::MultiplicityCustom, TCS::MuonAbbreviated, TCS::MuonNoSort, TCS::MuonSelect, TCS::MuonSort, TCS::MuonSort_1BC, TCS::NotMatch, TCS::Ratio2, TCS::Ratio, TCS::RatioMatch, TCS::RatioSum, TCS::SimpleCone, TCS::Sum, TCS::TauMatching, TCS::TeAsymmetry, TCS::TeATIME, TCS::TransverseMassInclusive1, and TCS::ZeroBias.

Definition at line 57 of file ConfigurableAlg.h.

◆ isCountingAlg()

bool TCS::ConfigurableAlg::isCountingAlg ( ) const
inline

Definition at line 65 of file ConfigurableAlg.h.

65{ return m_algType == COUNT; }

◆ isDecisionAlg()

bool TCS::ConfigurableAlg::isDecisionAlg ( ) const
inline

Definition at line 63 of file ConfigurableAlg.h.

63{ return m_algType == DECISION; }

◆ isLegacyTopo()

bool TCS::ConfigurableAlg::isLegacyTopo ( ) const
inline

Definition at line 67 of file ConfigurableAlg.h.

67{ return m_isLegacyTopo; }

◆ isocut() [1/2]

bool ConfigurableAlg::isocut ( const std::string & threshold,
const unsigned int bit ) const
protected

Definition at line 491 of file ConfigurableAlg.cxx.

491 {
492 unsigned int value = 0;
493 if (threshold == "None") {value = 0;}
494 else if (threshold == "Loose") {value = 1;}
495 else if (threshold == "Medium") {value = 2;}
496 else if (threshold == "HadMedium") {value = 2;}
497 else if (threshold == "Tight") {value = 3;}
498 else {
499 TRG_MSG_WARNING("No isolation defined as " << threshold);
500 }
501
502 if (bit >= value) {return true;}
503 else {return false;}
504}

◆ isocut() [2/2]

bool ConfigurableAlg::isocut ( const unsigned int threshold,
const unsigned int bit ) const
protected

Definition at line 507 of file ConfigurableAlg.cxx.

507 {
508 if (bit >= threshold) {return true;}
509 else {return false;}
510}

◆ isSortingAlg()

bool TCS::ConfigurableAlg::isSortingAlg ( ) const
inline

Definition at line 61 of file ConfigurableAlg.h.

61{ return m_algType == SORT; }

◆ msg() [1/2]

MsgStreamTC & TrigConf::TrigConfMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 86 of file TrigConfMessaging.h.

87 {
88 MsgStreamTC* ms = m_msg_tls.get();
89 if (!ms) {
90 ms = new MsgStreamTC(m_name);
91 m_msg_tls.reset(ms);
92 }
93 return *ms;
94 }
boost::thread_specific_ptr< MsgStreamTC > m_msg_tls
MsgStreamTC instance (a std::cout like with print-out levels).

◆ msg() [2/2]

MsgStreamTC & TrigConf::TrigConfMessaging::msg ( const MSGTC::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 96 of file TrigConfMessaging.h.

97 {
98 return msg() << lvl;
99 }
MsgStreamTC & msg() const
The standard message stream.

◆ msgLvl()

bool TrigConf::TrigConfMessaging::msgLvl ( const MSGTC::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicting if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 75 of file TrigConfMessaging.h.

76 {
77 if (msg().level() <= lvl) {
78 msg() << lvl;
79 return true;
80 }
81 else {
82 return false;
83 }
84 }

◆ name()

const std::string & TCS::ConfigurableAlg::name ( ) const
inline

Definition at line 49 of file ConfigurableAlg.h.

49{ return m_name; }

◆ parameter() [1/2]

const TCS::Parameter & ConfigurableAlg::parameter ( std::string_view parameterName) const

Definition at line 245 of file ConfigurableAlg.cxx.

245 {
246 return parameters().parameter(parameterName);
247}
const Parameter & parameter(std::string_view parameterName) const

◆ parameter() [2/2]

const TCS::Parameter & ConfigurableAlg::parameter ( std::string_view parameterName,
unsigned int selection ) const

Definition at line 251 of file ConfigurableAlg.cxx.

251 {
252 return parameters().parameter(parameterName, selection);
253}

◆ parameters()

const ParameterSpace & TCS::ConfigurableAlg::parameters ( ) const
inline

Definition at line 88 of file ConfigurableAlg.h.

88{ return m_parameters; }

◆ quadraticSumBW()

unsigned long ConfigurableAlg::quadraticSumBW ( int i1,
int i2 )

Definition at line 162 of file ConfigurableAlg.cxx.

162 {
163 return TSU::Kinematics::quadraticSumBW(i1, i2);
164}
static unsigned long quadraticSumBW(int i1, int i2)
compute the sum in quadrature of two ints

◆ registerHist() [1/2]

void ConfigurableAlg::registerHist ( TH1 * h)
protected

Definition at line 264 of file ConfigurableAlg.cxx.

264 {
265 m_impl->registerHist(h);
266}

◆ registerHist() [2/2]

void ConfigurableAlg::registerHist ( TH2 * h)
protected

Definition at line 268 of file ConfigurableAlg.cxx.

268 {
269 m_impl->registerHist(h);
270}

◆ reset()

StatusCode TCS::ConfigurableAlg::reset ( )
inline

Definition at line 59 of file ConfigurableAlg.h.

59{ return doReset(); }
virtual StatusCode doReset()=0

◆ setAlgoId()

void TCS::ConfigurableAlg::setAlgoId ( unsigned int algoId)
inline

Definition at line 94 of file ConfigurableAlg.h.

94{ m_algoId = algoId; }
unsigned int algoId() const

◆ setClassName()

void TCS::ConfigurableAlg::setClassName ( const std::string & className)
inline

Definition at line 44 of file ConfigurableAlg.h.

const std::string & className() const

◆ setL1TopoHistSvc()

void ConfigurableAlg::setL1TopoHistSvc ( std::shared_ptr< IL1TopoHistSvc > histSvc)

sets the external hist service

forwarding public interface

Definition at line 260 of file ConfigurableAlg.cxx.

260 {
261 m_impl->setL1TopoHistSvc(std::move(histSvc));
262}

◆ setLegacyMode()

void TCS::ConfigurableAlg::setLegacyMode ( bool isLegacyTopo)
inline

Definition at line 46 of file ConfigurableAlg.h.

◆ setParameters()

void ConfigurableAlg::setParameters ( const ParameterSpace & parameters)

Definition at line 224 of file ConfigurableAlg.cxx.

224 {
225
226 // check if parameterspace is for this algorithm
227 if(name() != parameters.algName()) {
228 TCS_EXCEPTION("Name of parameter set (" << parameters.algName() << ") do not match configurable name (" << name() << ")" );
229 }
230
231 // copy parameters
232 for(const Parameter & p : parameters) {
233 try {
234 m_parameters.setParameter(p);
235 }
236 catch(const TCS::Exception& e) {
237 TCS_EXCEPTION("Algorithm configuration failed for " << name() << "! Caught exception: " << e.what());
238 }
239 }
240}

◆ ToString()

std::string ConfigurableAlg::ToString ( const int val)
private

Definition at line 482 of file ConfigurableAlg.cxx.

483{
484 const int val_int = static_cast<int>(val);
485 std::ostringstream temp;
486 temp << val_int;
487 return temp.str();
488}

Member Data Documentation

◆ m_algoId

unsigned int TCS::ConfigurableAlg::m_algoId {0}
private

Definition at line 139 of file ConfigurableAlg.h.

139{0};

◆ m_algType

AlgType TCS::ConfigurableAlg::m_algType
private

Definition at line 143 of file ConfigurableAlg.h.

◆ m_className

std::string TCS::ConfigurableAlg::m_className {""}
private

Definition at line 136 of file ConfigurableAlg.h.

136{""};

◆ m_impl

std::unique_ptr<ConfigurableAlgImpl> TCS::ConfigurableAlg::m_impl
private

Definition at line 130 of file ConfigurableAlg.h.

◆ m_isLegacyTopo

bool TCS::ConfigurableAlg::m_isLegacyTopo
private

Definition at line 145 of file ConfigurableAlg.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStreamTC> TrigConf::TrigConfMessaging::m_msg_tls
mutableprivateinherited

MsgStreamTC instance (a std::cout like with print-out levels).

Definition at line 71 of file TrigConfMessaging.h.

◆ m_name

std::string TCS::ConfigurableAlg::m_name {""}
private

Definition at line 135 of file ConfigurableAlg.h.

135{""};

◆ m_parameters

ParameterSpace TCS::ConfigurableAlg::m_parameters {""}
private

Definition at line 141 of file ConfigurableAlg.h.

141{""};

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