|
ATLAS Offline Software
|
Go to the documentation of this file.
106 TrigConfMessaging(
name),
111 m_isLegacyTopo(false)
235 TCS_EXCEPTION(
"Algorithm configuration failed for " <<
name() <<
"! Caught exception: " <<
e.what());
273 std::string newTitle =
title;
276 newTitle = xmin_str+
title+xmax_str;
284 std::string xTitle =
title;
295 int xmin_new,xmax_new,binx_new=binx;
299 { xmin_new=1.5*
xmin; }
308 else {xmax_new = 1.5*
xmax;}
320 if (
title.find(
"ETA") != std::string::npos ){
324 if (
title.find(
"PHI") != std::string::npos ||
title.find(
"DPHI") != std::string::npos ){
328 if (
title.find(
"DETA") != std::string::npos ||
title.find(
"DR") != std::string::npos ){
333 TH1 *
h =
new TH1F(
newName.c_str(), newTitle.c_str(), binx_new, xmin_new, xmax_new);
334 h->GetXaxis()->SetTitle(xTitle.c_str());
343 h->GetXaxis()->SetTitle(
xtitle.c_str());
348 auto usPos =
title.find(
" vs ");
349 std::string xName =
title.substr(0,usPos);
350 std::string yName =
title.substr(usPos+4);
355 std::string newTitle =
title;
358 newTitle = xmin_str+xName+xmax_str+
" vs "+ymin_str+yName+ymax_str;
359 newName =
name+
"_"+xmin_str+xName+xmax_str+
"_"+ymin_str+yName+ymax_str;
366 std::string xTitle = xName;
367 std::string yTitle = yName;
369 if (xName ==
"ETA" || xName ==
"DETA" || xName ==
"PHI" || xName ==
"DPHI" || xName ==
"DR") { xTitle = xName+
"#times10"; }
370 if (xName ==
"PT" || xName ==
"ET" || xName ==
"HT" || xName ==
"INVM" || xName ==
"MT") { xTitle = xName+
" [GeV]"; }
372 if (yName ==
"ETA" || yName ==
"DETA" || yName ==
"PHI" || yName ==
"DPHI" || yName ==
"DR") { yTitle = yName+
"#times10"; }
373 if (yName ==
"PT" || yName ==
"ET" || yName ==
"HT" || yName ==
"INVM" || yName ==
"MT") { yTitle = yName+
" [GeV]"; }
376 if (xName ==
"ETA" || xName ==
"DETA" || xName ==
"DR") { xTitle = xName+
"#times40"; }
377 if (xName ==
"PHI" || xName ==
"DPHI") { xTitle = xName+
"#times20"; }
378 if (xName ==
"PT" || xName ==
"ET" || xName ==
"HT" || xName ==
"INVM" || xName ==
"MT") { xTitle = xName+
" [100 MeV]"; }
380 if (yName ==
"ETA" || yName ==
"DETA" || yName ==
"DR") { yTitle = yName+
"#times40"; }
381 if (yName ==
"PHI" || yName ==
"DPHI") { yTitle = yName+
"#times20"; }
382 if (yName ==
"PT" || yName ==
"ET" || yName ==
"HT" || yName ==
"INVM" || yName ==
"MT") { yTitle = yName+
" [100 MeV]"; }
385 int xmin_new,xmax_new,binx_new=binx;
389 { xmin_new=1.5*
xmin; }
398 else {xmax_new = 1.5*
xmax;}
400 int ymin_new,ymax_new,biny_new=biny;
404 { ymin_new=1.5*
ymin; }
413 else {ymax_new = 1.5*
ymax;}
426 if ( xName.find(
"ETA") != std::string::npos ){
430 if ( yName.find(
"ETA") != std::string::npos ){
434 if ( xName.find(
"PHI") != std::string::npos || xName.find(
"DPHI") != std::string::npos ){
438 if ( yName.find(
"PHI") != std::string::npos || yName.find(
"DPHI") != std::string::npos ){
442 if ( xName.find(
"DETA") != std::string::npos || xName.find(
"DR") != std::string::npos ){
446 if ( yName.find(
"DETA") != std::string::npos || yName.find(
"DR") != std::string::npos ){
451 TH2 *
h =
new TH2F(
newName.c_str(), newTitle.c_str(), binx_new, xmin_new, xmax_new, biny_new, ymin_new, ymax_new);
452 h->GetXaxis()->SetTitle(xTitle.c_str());
453 h->GetYaxis()->SetTitle(yTitle.c_str());
457 void ConfigurableAlg::bookHistMult(std::vector<std::string> ®Name,
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) {
462 h->GetXaxis()->SetTitle(
xtitle.c_str());
463 h->GetYaxis()->SetTitle(ytitle.c_str());
477 const int val_int =
static_cast<int>(
val);
478 std::ostringstream
temp;
485 unsigned int value = 0;
495 if (bit >=
value) {
return true;}
510 o <<
"algorithm '" <<
alg.fullname() <<
"'" << std::endl;
511 o <<
alg.parameters();
std::string replace(std::string s, const std::string &s2, const std::string &s3)
static unsigned int calcTMassBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaR2BWLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcInvMass(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcTMass(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
const Parameter & parameter(const std::string ¶meterName) const
static unsigned int calcDeltaPhiBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
The implementation class.
const ParameterSpace & parameters() const
ParameterSpace & addParameter(const Parameter &p)
std::unique_ptr< ConfigurableAlgImpl > m_impl
const std::string & name() const
unsigned int calcTMass(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
std::string ToString(const int val)
void fillHist2D(const std::string &histName, double x, double y)
unsigned int calcDeltaEtaBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
std::vector< TH1 * > m_localHistStore
static unsigned int calcDeltaPhi(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcInvMassBWLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaEtaBWLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaR2BW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
void fillHist1D(const std::string &histName, double x)
const Parameter & parameter(const std::string ¶meterName) const
void registerHist(TH2 *h)
static unsigned int calcDeltaEtaBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaR2Legacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
void registerHist(TH1 *h)
unsigned int selection() const
static unsigned int calcDeltaR2(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaPhiBWLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
const std::string & name() const
virtual ~ConfigurableAlg()
ParameterSpace & setParameter(const Parameter &p)
ConfigurableAlgImpl(const std::string &name)
static unsigned int calcDeltaEtaLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
void defineParameter(const std::string &name, TCS::parType_t value)
void setL1TopoHistSvc(std::shared_ptr< IL1TopoHistSvc > histSvc)
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
void fillHist2D(const std::string &histName, double x, double y)
bool isocut(const std::string &threshold, const unsigned int bit) const
static unsigned int calcInvMassBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcDeltaEta(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcDeltaR2(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
ConfigurableAlg(const std::string &name, AlgType algType)
#define TCS_EXCEPTION(MSG)
unsigned int calcInvMassBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
#define TRG_MSG_WARNING(x)
static unsigned long quadraticSumBW(int i1, int i2)
compute the sum in quadrature of two ints
void setL1TopoHistSvc(std::shared_ptr< IL1TopoHistSvc >)
sets the external hist service
static unsigned int calcDeltaPhiLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
void bookHist(std::vector< std::string > ®Name, const std::string &name, const std::string &title, const int binx, const int xmin, const int xmax)
unsigned int calcDeltaR2BW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
void bookHistMult(std::vector< std::string > ®Name, const std::string &name, const std::string &title, const std::string &xtitle, const int binx, const int xmin, const int xmax)
static unsigned int calcTMassBWLegacy(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcDeltaPhi(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
static unsigned int calcDeltaEta(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcInvMass(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
void setParameters(const ParameterSpace &)
const std::string & algName() const
unsigned long quadraticSumBW(int i1, int i2)
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
void fillHist1D(const std::string &histName, double x)
std::shared_ptr< IL1TopoHistSvc > m_histSvc
std::ostream & operator<<(std::ostream &, const TCS::CountingConnector &)
unsigned int calcTMassBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
ParameterSpace m_parameters
unsigned int calcDeltaPhiBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)