ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
egammaLayerRecalibTool Class Reference

#include <egammaLayerRecalibTool.h>

Inheritance diagram for egammaLayerRecalibTool:
Collaboration diagram for egammaLayerRecalibTool:

Public Types

typedef std::vector< std::pair< InputModifier *, GetAmountBase * > > ModifiersList
 

Public Member Functions

 egammaLayerRecalibTool (const std::string &name, const std::string &tune, int SaccEnable=1)
 
 egammaLayerRecalibTool (const std::string &tune, int SaccEnable=1)
 
 ~egammaLayerRecalibTool ()
 
CP::CorrectionCode applyCorrection (xAOD::Egamma &, const xAOD::EventInfo &event_info) const
 
CP::CorrectionCode scale_inputs (StdCalibrationInputs &inputs) const
 apply layer calibration to the More...
 
void add_scale (InputModifier *modifier, GetAmountBase *amount)
 add custom layer scale correction. More...
 
void add_scale (const std::string &scale)
 add scale correction from string. More...
 
void clear_corrections ()
 remove all the scale corrections More...
 
void fixForMissingCells (bool fix=true)
 
void scaleMC (bool scaleMC=true)
 
void disable_PSCorrections ()
 
void disable_S12Corrections ()
 
void disable_SaccCorrections ()
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Static Public Member Functions

static std::pair< std::string, egammaLayerRecalibTool * > create (const std::string &type, const std::string &args)
 helper to create a tool from a string (useful for command line arguments) More...
 

Private Member Functions

const std::string resolve_path (std::string filename) const
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Static Private Member Functions

static std::string resolve_alias (const std::string &tune)
 

Private Attributes

std::string m_tune
 
bool m_doPSCorrections = true
 
bool m_doS12Corrections = true
 
bool m_doSaccCorrections = true
 
ModifiersList m_modifiers
 
corr_pileupShiftm_pileup_tool = nullptr
 
bool m_aodFixMissingCells = false
 
bool m_scaleMC = false
 
std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Static Private Attributes

static const unsigned int m_Run2Run3runNumberTransition = 400000
 

Detailed Description

Definition at line 316 of file egammaLayerRecalibTool.h.

Member Typedef Documentation

◆ ModifiersList

Definition at line 319 of file egammaLayerRecalibTool.h.

Constructor & Destructor Documentation

◆ egammaLayerRecalibTool() [1/2]

egammaLayerRecalibTool::egammaLayerRecalibTool ( const std::string &  name,
const std::string &  tune,
int  SaccEnable = 1 
)
Parameters
tunestring to configure the tuning
  • "" the tool has no effect
  • as default it is "current_default"
  • "test1" just for testing

Definition at line 921 of file egammaLayerRecalibTool.cxx.

923 {
924  add_scale(tune);
925 }

◆ egammaLayerRecalibTool() [2/2]

egammaLayerRecalibTool::egammaLayerRecalibTool ( const std::string &  tune,
int  SaccEnable = 1 
)

Definition at line 928 of file egammaLayerRecalibTool.cxx.

929  : egammaLayerRecalibTool("egammaLayerRecalibTool", tune, SaccEnable) { }

◆ ~egammaLayerRecalibTool()

egammaLayerRecalibTool::~egammaLayerRecalibTool ( )
inline

Definition at line 328 of file egammaLayerRecalibTool.h.

328 { clear_corrections(); delete m_pileup_tool; }

Member Function Documentation

◆ add_scale() [1/2]

void egammaLayerRecalibTool::add_scale ( const std::string &  scale)

add scale correction from string.

Can be called multiple times. The list of valid values is on the twiki

Definition at line 247 of file egammaLayerRecalibTool.cxx.

248 {
249  ATH_MSG_INFO("using scale " << tuneIn);
250  std::string tune = resolve_alias(tuneIn);
251 
252  if (tune.empty()) { }
253  else if ("es2022_22.0_Precision" == tune) {
254  add_scale("run2_alt_with_layer2_r22_Precision");
255  }
256  else if ("es2018_21.0_v0" == tune) {
257  add_scale("run2_alt_with_layer2_r21_v1");
258  }
259  else if ("es2017_21.0_v0" == tune) {
260  add_scale("run2_alt_with_layer2_r21_v0");
261  }
262  else if ("es2017_20.7_final" == tune) {
263  add_scale("pileup_20.7");
264  add_scale("run2_alt_with_layer2_modif");
265  }
266  else if ("es2017_20.7_improved" == tune) {
267  add_scale("pileup_20.7"); // new pileup correction Guillaume for 20.7
268  //TEMPORARY HACK REMOVED (two intermediate tags with this ES model use different layer corrections)
269  add_scale("2012_alt_with_layer2_modif"); // temporary old corrections from run1 + EMECPS HV
270  }
271  else if ("pileup_20.7" == tune) {
277  }
278  //Run 2 release 22
279  else if ("run2_alt_with_layer2_r22_Precision"==tune) {
280  add_scale("layer2_alt_el_mu_comb_r21_v0");
281  add_scale("ps_mu_r21_v0");
282  if(m_doSaccCorrections) add_scale("acc_zee_r22_v0");
283  }
284  else if ("run2_alt_with_layer2_r21_v1"==tune) {
285  add_scale("layer2_alt_run2_r21_v1");
286  add_scale("ps_2016_r21_v0");
287  }
288  else if ("run2_alt_with_layer2_r21_v0"==tune) {
289  add_scale("layer2_alt_run2_r21_v0");
290  add_scale("ps_2016_r21_v0");
291  }
292  else if("run2_alt_with_layer2_modif" == tune) {
293  add_scale("ps_EMECHV1");
294  add_scale("layer2_alt_run2_v1");
295  add_scale("ps_2016");
296  }
297  // 2012
298  else if ("2012" == tune) {
299  add_scale("ps_HV1");
300  add_scale("layer1_2012");
301  add_scale("ps_2012");
302  }
303  else if("2012_with_layer2" == tune) {
304  add_scale("ps_HV1");
305  add_scale("layer2_2012_v5");
306  add_scale("ps_2012");
307  }
308  else if ("2012_alt" == tune) {
309  add_scale("ps_HV1");
310  add_scale("layer1_alt_2012");
311  add_scale("ps_2012");
312  }
313  else if("2012_alt_with_layer2" == tune) {
314  add_scale("ps_HV1");
315  add_scale("layer2_alt_2012_v5");
316  add_scale("ps_2012");
317  }
318  else if("2012_alt_with_layer2_modif" == tune) {
319  add_scale("ps_HV1");
320  add_scale("ps_EMECHV1");
321  add_scale("layer2_alt_2012_v5");
322  add_scale("ps_2012");
323  }
324  else if("2010_with_layer2" == tune) {
325  add_scale("layer2_2010_v5");
326  add_scale("ps_2010");
327  }
328  else if ("2012_layer1_up" == tune) {
329  add_scale("ps_HV1");
330  add_scale("layer1_2012_up");
331  add_scale("ps_2012");
332  }
333  else if ("2012_layer1_down" == tune) {
334  add_scale("ps_HV1");
335  add_scale("layer1_2012_down");
336  add_scale("ps_2012");
337  }
338  else if ("2012_layer1_errup" == tune) {
339  add_scale("layer1_2012_errup");
340  }
341  else if ("2012_layer1_errdown" == tune) {
342  add_scale("layer1_2012_errdown");
343  }
344  else if ("2012_ps_down" == tune) {
345  add_scale("ps_HV1");
346  add_scale("layer1_2012");
347  add_scale("ps_2012_down");
348  }
349  else if ("2012_ps_up" == tune) {
350  add_scale("ps_HV1");
351  add_scale("layer1_2012");
352  add_scale("ps_2012_up");
353  }
354  else if ("2012_ps_errdown" == tune) {
355  add_scale("ps_2012_errdown");
356  }
357  else if ("2012_ps_errup" == tune) {
358  add_scale("ps_2012_errup");
359  }
360  else if ("2012_up" == tune) {
361  add_scale("ps_HV1");
362  add_scale("layer1_2012_up");
363  add_scale("ps_2012_up");
364  }
365  else if ("2012_down" == tune) {
366  add_scale("ps_HV1");
367  add_scale("layer1_2012_down");
368  add_scale("ps_2012_down");
369  }
370  else if ("2012_errup" == tune) {
371  add_scale("layer1_2012_errup");
372  add_scale("ps_2012_errup");
373  }
374  else if ("2012_errdown" == tune) {
375  add_scale("layer1_2012_errdown");
376  add_scale("ps_2012_errdown");
377  }
378  // 2011
379  else if ("2011" == tune) {
380  add_scale("layer1_2011");
381  add_scale("ps_2011");
382  }
383  else if("2011_with_layer2" == tune) {
384  add_scale("layer2_2011_v5");
385  add_scale("ps_2011");
386  }
387  else if ("2011_alt" == tune) {
388  add_scale("layer1_alt_2011");
389  add_scale("ps_2011");
390  }
391  else if("2011_alt_with_layer2" == tune) {
392  add_scale("layer2_alt_2011_v5");
393  add_scale("ps_2011");
394  }
395  else if ("2011_layer1_up" == tune) {
396  add_scale("layer1_2011_up");
397  add_scale("ps_2011");
398  }
399  else if ("2011_layer1_down" == tune) {
400  add_scale("layer1_2011_down");
401  add_scale("ps_2011");
402  }
403  else if ("2011_layer1_errup" == tune) {
404  add_scale("layer1_2011_errup");
405  }
406  else if ("2011_layer1_errdown" == tune) {
407  add_scale("layer1_2011_errdown");
408  }
409  else if ("2011_ps_down" == tune) {
410  add_scale("layer1_2011");
411  add_scale("ps_2011_down");
412  }
413  else if ("2011_ps_up" == tune) {
414  add_scale("layer1_2011");
415  add_scale("ps_2011_up");
416  }
417  else if ("2011_ps_errdown" == tune) {
418  add_scale("ps_2011_errdown");
419  }
420  else if ("2011_ps_errup" == tune) {
421  add_scale("ps_2011_errup");
422  }
423  else if ("2011_up" == tune) {
424  add_scale("layer1_2011_up");
425  add_scale("ps_2011_up");
426  }
427  else if ("2011_down" == tune) {
428  add_scale("layer1_2011_down");
429  add_scale("ps_2011_down");
430  }
431  else if ("2011_errup" == tune) {
432  add_scale("layer1_2011_errup");
433  add_scale("ps_2011_errup");
434  }
435  else if ("2011_errdown" == tune) {
436  add_scale("layer1_2011_errdown");
437  add_scale("ps_2011_errdown");
438  }
439  // 2010
440  else if ("2010" == tune) {
441  add_scale("layer1_2010");
442  add_scale("ps_2010");
443  }
444  else if ("2010_layer1_up" == tune) {
445  add_scale("layer1_2010_up");
446  add_scale("ps_2010");
447  }
448  else if ("2010_layer1_down" == tune) {
449  add_scale("layer1_2010_down");
450  add_scale("ps_2010");
451  }
452  else if ("2010_layer1_errup" == tune) {
453  add_scale("layer1_2010_errup");
454  }
455  else if ("2010_layer1_errdown" == tune) {
456  add_scale("layer1_2010_errdown");
457  }
458  else if ("2010_ps_down" == tune) {
459  add_scale("layer1_2010");
460  add_scale("ps_2010_down");
461  }
462  else if ("2010_ps_up" == tune) {
463  add_scale("layer1_2010");
464  add_scale("ps_2010_up");
465  }
466  else if ("2010_ps_errdown" == tune) {
467  add_scale("ps_2010_errdown");
468  }
469  else if ("2010_ps_errup" == tune) {
470  add_scale("ps_2010_errup");
471  }
472  else if ("2010_up" == tune) {
473  add_scale("layer1_2010_up");
474  add_scale("ps_2010_up");
475  }
476  else if ("2010_down" == tune) {
477  add_scale("layer1_2010_down");
478  add_scale("ps_2010_down");
479  }
480  else if ("2010_errup" == tune) {
481  add_scale("layer1_2010_errup");
482  add_scale("ps_2010_errup");
483  }
484  else if ("2010_errdown" == tune) {
485  add_scale("layer1_2010_errdown");
486  add_scale("ps_2010_errdown");
487  }
488  else if ("ps_HV1" == tune) {
490  }
491  else if ("ps_EMECHV1" == tune) {
493  }
494  else if ("test1" == tune) {
495  TH1F h_presampler("h_presampler", "h_presampler", 10, -2.5, 2.5);
496  // just as an example, correct E0 by 0.1 * sign(eta)
497  // and E1 by 1%
498  for (int ibin = 1; ibin <= 5; ++ibin) {
499  h_presampler.SetBinContent(ibin, -0.1);
500  h_presampler.SetBinContent(ibin + 5, 0.1);
501  }
504  }
505  else if ("acc_zee_r22_v0" == tune) {
506  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v11/egammaLayerRecalibTunes.root");
507  TFile f(file.c_str());
508  TH2F* histo_acc = static_cast<TH2F*>(f.Get("hACC_Zee_rel22"));
509  assert(histo_acc);
511  new GetAmountHisto2DEtaCaloRunNumber(*histo_acc));
512  }
513  else if ("layer1_1" == tune) {
514  TFormula f("formula_layer1_1", "(abs(x)<1.425) ? 0.97 : 1");
516  }
517  else if ("layer1_2" == tune) {
518  TFormula f("formula_layer1_2", "(abs(x)<1.425) ? 0.97 : 1.05");
520  }
521  else if ("layer1_alt_2012_v5" == tune) {
522  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
523  TFile f(file.c_str());
524  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_alt_2012"));
526  new GetAmountHisto1D(*histo));
527  }
528  else if ("layer1_2012_v5" == tune) {
529  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
530  TFile f(file.c_str());
531  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2012"));
533  new GetAmountHisto1D(*histo));
534  }
535  else if ("layer1_2012_v5_down" == tune) {
536  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
537  TFile f(file.c_str());
538  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2012"));
540  new GetAmountHisto1DUp(*histo));
541  }
542  else if ("layer1_2012_v5_up" == tune) {
543  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
544  TFile f(file.c_str());
545  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2012"));
548  }
549  else if ("layer1_2012_v5_errdown" == tune) {
550  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
551  TFile f(file.c_str());
552  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2012"));
555  }
556  else if ("layer1_2012_v5_errup" == tune) {
557  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
558  TFile f(file.c_str());
559  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2012"));
562  }
563  else if ("layer1_alt_2011_v5" == tune) {
564  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
565  TFile f(file.c_str());
566  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_alt_2011"));
568  new GetAmountHisto1D(*histo));
569  }
570  else if ("layer1_2011_v5" == tune) {
571  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
572  TFile f(file.c_str());
573  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2011"));
575  new GetAmountHisto1D(*histo));
576  }
577  else if ("layer1_2011_v5_down" == tune) {
578  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
579  TFile f(file.c_str());
580  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2011"));
582  new GetAmountHisto1DUp(*histo));
583  }
584  else if ("layer1_2011_v5_up" == tune) {
585  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
586  TFile f(file.c_str());
587  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2011"));
590  }
591  else if ("layer1_2011_v5_errdown" == tune) {
592  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
593  TFile f(file.c_str());
594  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2011"));
597  }
598  else if ("layer1_2011_v5_errup" == tune) {
599  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
600  TFile f(file.c_str());
601  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2011"));
604  }
605  else if ("layer1_2010_v5" == tune) {
606  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
607  TFile f(file.c_str());
608  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2010"));
610  new GetAmountHisto1D(*histo));
611  }
612  else if ("layer1_2010_v5_down" == tune) {
613  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
614  TFile f(file.c_str());
615  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2010"));
617  new GetAmountHisto1DUp(*histo));
618  }
619  else if ("layer1_2010_v5_up" == tune) {
620  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
621  TFile f(file.c_str());
622  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2010"));
625  }
626  else if ("layer1_2010_v5_errdown" == tune) {
627  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
628  TFile f(file.c_str());
629  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2010"));
632  }
633  else if ("layer1_2010_v5_errup" == tune) {
634  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
635  TFile f(file.c_str());
636  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2010"));
639  }
640  else if("layer2_alt_el_mu_comb_r21_v0"==tune) {
641  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v11/egammaLayerRecalibTunes.root");
642  TFile f(file.c_str());
643  TH1D* histo = static_cast<TH1D*>(f.Get("hE1E2_emu_run2_rel21_v0"));
644  assert(histo);
646  new GetAmountHisto1D(*histo));
647  }
648  else if("layer2_alt_run2_r21_v1"==tune) {
649  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v6/egammaLayerRecalibTunes.root");
650  TFile f(file.c_str());
651  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2_mu_run2_rel21_v1"));
653  new GetAmountHisto1D(*histo));
654  }
655  else if("layer2_alt_run2_r21_v0"==tune) {
656  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v5/egammaLayerRecalibTunes.root");
657  TFile f(file.c_str());
658  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2mu_2016_rel21_v1"));
660  new GetAmountHisto1D(*histo));
661  }
662  else if("layer2_alt_run2_v1" == tune) {
663  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v3/egammaLayerRecalibTunes.root");
664  TFile f(file.c_str());
665  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2mu_2016_v1"));
667  new GetAmountHisto1D(*histo));
668  }
669  else if("layer2_alt_2012_v5" == tune) {
670  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
671  TFile f(file.c_str());
672  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_alt_2012"));
674  new GetAmountHisto1D(*histo));
675  }
676  else if("layer2_2012_v5" == tune) {
677  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
678  TFile f(file.c_str());
679  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2012"));
681  new GetAmountHisto1D(*histo));
682  }
683  else if("layer2_2012_v5_down" == tune) {
684  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
685  TFile f(file.c_str());
686  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2012"));
689  }
690  else if("layer2_2012_v5_up" == tune) {
691  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
692  TFile f(file.c_str());
693  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2012"));
695  new GetAmountHisto1DUp(*histo));
696  }
697  else if ("layer2_2012_v5_errdown" == tune) {
698  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
699  TFile f(file.c_str());
700  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2012"));
703  }
704  else if ("layer2_2012_v5_errup" == tune) {
705  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
706  TFile f(file.c_str());
707  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2012"));
710  }
711  else if("layer2_alt_2011_v5" == tune) {
712  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
713  TFile f(file.c_str());
714  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_alt_2011"));
716  new GetAmountHisto1D(*histo));
717  }
718  else if("layer2_2011_v5" == tune) {
719  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
720  TFile f(file.c_str());
721  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2011"));
723  new GetAmountHisto1D(*histo));
724  }
725  else if("layer2_2011_v5_down" == tune) {
726  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
727  TFile f(file.c_str());
728  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2011"));
731  }
732  else if("layer2_2011_v5_up" == tune) {
733  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
734  TFile f(file.c_str());
735  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2011"));
737  new GetAmountHisto1DUp(*histo));
738  }
739  else if ("layer2_2011_v5_errdown" == tune) {
740  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
741  TFile f(file.c_str());
742  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2011"));
745  }
746  else if ("layer2_2011_v5_errup" == tune) {
747  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
748  TFile f(file.c_str());
749  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2011"));
752  }
753  else if("layer2_2010_v5" == tune) {
754  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
755  TFile f(file.c_str());
756  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2010"));
758  new GetAmountHisto1D(*histo));
759  }
760  else if("layer2_2010_v5_down" == tune) {
761  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
762  TFile f(file.c_str());
763  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2010"));
766  }
767  else if("layer2_2010_v5_up" == tune) {
768  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
769  TFile f(file.c_str());
770  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2010"));
772  new GetAmountHisto1DUp(*histo));
773  }
774  else if ("layer2_2010_v5_errdown" == tune) {
775  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
776  TFile f(file.c_str());
777  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2010"));
780  }
781  else if ("layer2_2010_v5_errup" == tune) {
782  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
783  TFile f(file.c_str());
784  TH1* histo = checked_cast<TH1*>(f.Get("hE1E2ave_2010"));
787  }
788  else if ("ps_2016_r21_v0" == tune) {
789  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v5/egammaLayerRecalibTunes.root");
790  TFile f(file.c_str());
791  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2016_rel21"));
793  new GetAmountHisto1D(*histo_ps_tot_error));
794  }
795  else if ("ps_mu_r21_v0" == tune) {
796  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v11/egammaLayerRecalibTunes.root");
797  TFile f(file.c_str());
798  TH1F* histo_ps_tot_error = static_cast<TH1F*>(f.Get("hPS_MuonLowMu_rel21"));
799  assert(histo_ps_tot_error);
801  new GetAmountHisto1D(*histo_ps_tot_error));
802  }
803  else if ("ps_2016_v1" == tune) {
804  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v4/egammaLayerRecalibTunes.root");
805  TFile f(file.c_str());
806  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2016"));
808  new GetAmountHisto1D(*histo_ps_tot_error));
809  }
810  else if ("ps_2012_v3" == tune) {
811  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
812  TFile f(file.c_str());
813  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2012"));
815  new GetAmountHisto1D(*histo_ps_tot_error));
816  }
817  else if ("ps_2012_v3_down" == tune) {
818  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
819  TFile f(file.c_str());
820  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2012"));
822  new GetAmountHisto1DUp(*histo_ps_tot_error));
823  }
824  else if ("ps_2012_v3_up" == tune){
825  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
826  TFile f(file.c_str());
827  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2012"));
829  new GetAmountHisto1DDown(*histo_ps_tot_error));
830  }
831  else if ("ps_2012_v3_errdown" == tune){
832  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
833  TFile f(file.c_str());
834  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2012"));
836  new GetAmountHisto1DErrorUp(*histo_ps_tot_error));
837  }
838  else if ("ps_2012_v3_errup" == tune){
839  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
840  TFile f(file.c_str());
841  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2012"));
843  new GetAmountHisto1DErrorDown(*histo_ps_tot_error));
844  }
845  else if ("ps_2011_v3" == tune) {
846  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
847  TFile f(file.c_str());
848  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2011"));
850  new GetAmountHisto1D(*histo_ps_tot_error));
851  }
852  else if ("ps_2011_v3_down" == tune) {
853  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
854  TFile f(file.c_str());
855  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2011"));
857  new GetAmountHisto1DUp(*histo_ps_tot_error));
858  }
859  else if ("ps_2011_v3_up" == tune){
860  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
861  TFile f(file.c_str());
862  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2011"));
864  new GetAmountHisto1DDown(*histo_ps_tot_error));
865  }
866  else if ("ps_2011_v3_errdown" == tune){
867  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
868  TFile f(file.c_str());
869  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2011"));
871  new GetAmountHisto1DErrorUp(*histo_ps_tot_error));
872  }
873  else if ("ps_2011_v3_errup" == tune){
874  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
875  TFile f(file.c_str());
876  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2011"));
878  new GetAmountHisto1DErrorDown(*histo_ps_tot_error));
879  }
880  // 2010
881  else if ("ps_2010_v3" == tune) {
882  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
883  TFile f(file.c_str());
884  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2010"));
886  new GetAmountHisto1D(*histo_ps_tot_error));
887  }
888  else if ("ps_2010_v3_down" == tune) {
889  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
890  TFile f(file.c_str());
891  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2010"));
893  new GetAmountHisto1DUp(*histo_ps_tot_error));
894  }
895  else if ("ps_2010_v3_up" == tune) {
896  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
897  TFile f(file.c_str());
898  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2010"));
900  new GetAmountHisto1DDown(*histo_ps_tot_error));
901  }
902  else if ("ps_2010_v3_errdown" == tune){
903  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
904  TFile f(file.c_str());
905  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2010"));
907  new GetAmountHisto1DErrorUp(*histo_ps_tot_error));
908  }
909  else if ("ps_2010_v3_errup" == tune){
910  const std::string file = PathResolverFindCalibFile("egammaLayerRecalibTool/v1/egammaLayerRecalibTunes.root");
911  TFile f(file.c_str());
912  TH1* histo_ps_tot_error = checked_cast<TH1*>(f.Get("hPS_2010"));
914  new GetAmountHisto1DErrorDown(*histo_ps_tot_error));
915  }
916  else {
917  throw std::runtime_error(tune+" is not a valid tune");
918  }
919 }

◆ add_scale() [2/2]

void egammaLayerRecalibTool::add_scale ( InputModifier modifier,
GetAmountBase amount 
)

add custom layer scale correction.

Can be called multiple times.

Definition at line 932 of file egammaLayerRecalibTool.cxx.

933 {
934  m_modifiers.emplace_back(modifier, amount);
935 }

◆ applyCorrection()

CP::CorrectionCode egammaLayerRecalibTool::applyCorrection ( xAOD::Egamma particle,
const xAOD::EventInfo event_info 
) const

Definition at line 951 of file egammaLayerRecalibTool.cxx.

952 {
953  const xAOD::CaloCluster* cluster = particle.caloCluster();
954  if (!cluster) {
955  ATH_MSG_ERROR("egamma particle without CaloCluster");
957  }
958 
959  std::string fixT = "";
960  double addE2 = 0, addE3 = 0;
961  if (m_aodFixMissingCells &&
962  event_info.runNumber() > m_Run2Run3runNumberTransition) {
963  fixT = "_egFixForTopoTimingCut";
964  unsigned short stat =
966  if (stat) {
967  ATH_MSG_WARNING("Fix for missing cells required"
968  " but some layer info is not available,"
969  " from L2 : " << stat%2 << " from L3 : " << stat/2);
970  }
971  }
972 
973  double eta_calo;
974  static const SG::AuxElement::Accessor<float> accEtaCalo("etaCalo");
976  eta_calo = cluster->eta();
977  }
978  else if (cluster->retrieveMoment(xAOD::CaloCluster::ETACALOFRAME, eta_calo)){
979 
980  }
981  else if (accEtaCalo.isAvailable(*cluster)) {
982  eta_calo = accEtaCalo(*cluster);
983  }
984  else{
985  ATH_MSG_ERROR("etaCalo not available as auxilliary variable,"
986  " using cluster eta as eta calo!");
987  eta_calo=cluster->eta();
988  }
989 
991  event_info.averageInteractionsPerCrossing(),
992  event_info.runNumber(),
993  cluster->eta(),
994  cluster->phi(),
995  cluster->energyBE(0),
996  cluster->energyBE(1),
997  cluster->energyBE(2) + addE2,
998  cluster->energyBE(3) + addE3,
999  eta_calo };
1000 
1001  bool isData = !event_info.eventType(xAOD::EventInfo::IS_SIMULATION);
1003  if (isData || m_scaleMC)
1005 
1006  static const SG::AuxElement::Decorator<double> deco_E0("correctedcl_Es0");
1007  static const SG::AuxElement::Decorator<double> deco_E1("correctedcl_Es1");
1008  static const SG::AuxElement::Decorator<double> deco_E2("correctedcl_Es2");
1009  static const SG::AuxElement::Decorator<double> deco_E3("correctedcl_Es3");
1011  deco_layer_correction("layer_correction");
1012 
1013  if (status == CP::CorrectionCode::Ok) {
1014  ATH_MSG_DEBUG("decorating cluster with corrected layer energies");
1015  deco_E0(*cluster) = m_doPSCorrections ?
1016  inputs.E0raw : cluster->energyBE(0);
1017  deco_E1(*cluster) = m_doS12Corrections or m_doSaccCorrections ?
1018  inputs.E1raw : cluster->energyBE(1);
1019  deco_E2(*cluster) = m_doS12Corrections or m_doSaccCorrections ?
1020  inputs.E2raw : cluster->energyBE(2) + addE2;
1021  deco_E3(*cluster) = m_doSaccCorrections ?
1022  inputs.E3raw : cluster->energyBE(3) + addE3;
1023  deco_layer_correction(*cluster) = isData ? m_tune+fixT : fixT;
1024  return status;
1025  }
1026 
1027  ATH_MSG_DEBUG("cannot correct layer energies:"
1028  " decorating particle with non-corrected layer energies");
1029  // this is done for safety, since when a particle is decorated
1030  // all the particle in the container are decorated
1031  // it is not possible to distinguish between decorated / non-decorated
1032  // since all are decorated
1033  deco_E0(*cluster) = cluster->energyBE(0);
1034  deco_E1(*cluster) = cluster->energyBE(1);
1035  deco_E2(*cluster) = cluster->energyBE(2) + addE2;
1036  deco_E3(*cluster) = cluster->energyBE(3) + addE3;
1037  deco_layer_correction(*cluster) = isData ? m_tune + "_Err" + fixT : fixT;
1038  return status;
1039 
1040 }

◆ clear_corrections()

void egammaLayerRecalibTool::clear_corrections ( )

remove all the scale corrections

Definition at line 1043 of file egammaLayerRecalibTool.cxx.

1044 {
1045  for (auto modifier : m_modifiers) {
1046  delete modifier.first;
1047  delete modifier.second;
1048  }
1049  m_modifiers.clear();
1050 }

◆ create()

std::pair< std::string, egammaLayerRecalibTool * > egammaLayerRecalibTool::create ( const std::string &  type,
const std::string &  args 
)
static

helper to create a tool from a string (useful for command line arguments)

Definition at line 1088 of file egammaLayerRecalibTool.cxx.

1089 {
1090  std::map<std::string, std::string> args_map = parse(args);
1091  egammaLayerRecalibTool* tool = new egammaLayerRecalibTool("egammaLayerRecalibTool", "");
1092  std::string name = "";
1093  std::string amount_name = "";
1094  std::string type_name = "";
1095 
1096  GetAmountBase* amount_getter = nullptr;
1097  InputModifier* modifier = nullptr;
1098 
1099  if (args_map.find("amount") != args_map.end()) {
1100  std::string amount_str = args_map["amount"];
1101  bool perc = false;
1102  if (amount_str.back()=='%') {
1103  perc = true;
1104  amount_str.pop_back();
1105  }
1106  const float amount = TString(amount_str).Atof() * (perc ? 0.01 : 1);
1107 
1108  amount_getter = new GetAmountFixed(amount);
1109  std::stringstream amount_stream;
1110  amount_stream << amount;
1111  amount_name = amount_stream.str();
1112  std::replace(amount_name.begin(), amount_name.end(), '-', 'n');
1113  std::replace(amount_name.begin(), amount_name.end(), '.', 'p');
1114  }
1115  else if (args_map.find("name") != args_map.end()) {
1116  name = args_map["name"];
1117  }
1118  else if (args_map.find("histo") != args_map.end()) {
1119  int dim = 0;
1120  if (args_map.find("file") == args_map.end()) {
1121  std::cerr << "with histo you must specify file" << std::endl;
1122  assert(false);
1123  }
1124  if (args_map.find("formulax") != args_map.end()) dim = 1;
1125 
1126  if (dim == 0)
1127  {
1128  std::cerr << "with histo you must specify formulax" << std::endl;
1129  assert(false);
1130  }
1131  if (dim == 1) {
1132  TFile f(args_map["file"].c_str());
1133  std::cout << "opening histo " << args_map["histo"] << " from file " << args_map["file"] << std::endl;
1134  TH1F* histo = dynamic_cast<TH1F*>(f.Get(args_map["histo"].c_str()));
1135 
1136  if(histo){
1137  histo->SetDirectory(nullptr);
1138  amount_getter = new GetAmountHisto1D(*histo);
1139  }
1140  else{assert(false); }
1141  }
1142  else { assert(false); }
1143  }
1144  else {
1145  std::cerr << "cannot understand argument " << args << std::endl;
1146  assert(false);
1147  }
1148 
1149  if ("bias-E0" == type) { modifier = new ScaleE0(InputModifier::ZEROBASED); type_name = "E0"; }
1150  else if ("bias-E1" == type) { modifier = new ScaleE1(InputModifier::ZEROBASED); type_name = "E1"; }
1151  else if ("bias-E2" == type) { modifier = new ScaleE2(InputModifier::ZEROBASED); type_name = "E2"; }
1152  else if ("bias-E3" == type) { modifier = new ScaleE3(InputModifier::ZEROBASED); type_name = "E3"; }
1153  else if ("bias-E1overE2" == type) { modifier = new ScaleE1overE2(InputModifier::ZEROBASED); type_name = "E1overE2"; }
1154  else if ("bias-Eaccordion" == type) { modifier = new ScaleEaccordion(InputModifier::ZEROBASED); type_name = "Eaccordion"; }
1155  else if ("bias-Ecalorimeter" == type) { modifier = new ScaleEcalorimeter(InputModifier::ZEROBASED); type_name = "Ecalorimeter"; }
1156 
1157  if (not type_name.empty() and not amount_name.empty()) {
1158  name = type_name + "_" + amount_name;
1159  }
1160 
1161  if (name.empty()) {
1162  std::cerr << "you need to specify a name for the bias with type " << type << std::endl;
1163  }
1164 
1165  if (modifier and amount_getter) {
1166  tool->add_scale(modifier, amount_getter);
1167  }
1168  else{
1169  tool->add_scale(type);
1170  //release resources, if modifier false need to release amount_getter and vice versa
1171  //since they are not passed to the tool
1172  if(modifier) delete modifier;
1173  if(amount_getter) delete amount_getter;
1174  }
1175 
1176  return {name, tool};
1177 }

◆ disable_PSCorrections()

void egammaLayerRecalibTool::disable_PSCorrections ( )
inline

Definition at line 358 of file egammaLayerRecalibTool.h.

358 {m_doPSCorrections=false;}

◆ disable_S12Corrections()

void egammaLayerRecalibTool::disable_S12Corrections ( )
inline

Definition at line 359 of file egammaLayerRecalibTool.h.

359 {m_doS12Corrections=false;}

◆ disable_SaccCorrections()

void egammaLayerRecalibTool::disable_SaccCorrections ( )
inline

Definition at line 360 of file egammaLayerRecalibTool.h.

360 {m_doSaccCorrections=false;}

◆ fixForMissingCells()

void egammaLayerRecalibTool::fixForMissingCells ( bool  fix = true)
inline

Definition at line 356 of file egammaLayerRecalibTool.h.

356 { m_aodFixMissingCells = fix; }

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ msg() [1/2]

MsgStream & asg::AsgMessaging::msg ( ) const
inherited

The standard message stream.

Returns
A reference to the default message stream of this object.

Definition at line 49 of file AsgMessaging.cxx.

49  {
50 #ifndef XAOD_STANDALONE
52 #else // not XAOD_STANDALONE
53  return m_msg;
54 #endif // not XAOD_STANDALONE
55  }

◆ msg() [2/2]

MsgStream & asg::AsgMessaging::msg ( const MSG::Level  lvl) const
inherited

The standard message stream.

Parameters
lvlThe message level to set the stream to
Returns
A reference to the default message stream, set to level "lvl"

Definition at line 57 of file AsgMessaging.cxx.

57  {
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
61  m_msg << lvl;
62  return m_msg;
63 #endif // not XAOD_STANDALONE
64  }

◆ msgLvl()

bool asg::AsgMessaging::msgLvl ( const MSG::Level  lvl) const
inherited

Test the output level of the object.

Parameters
lvlThe message level to test against
Returns
boolean Indicting if messages at given level will be printed
true If messages at level "lvl" will be printed

Definition at line 41 of file AsgMessaging.cxx.

41  {
42 #ifndef XAOD_STANDALONE
43  return ::AthMessaging::msgLvl( lvl );
44 #else // not XAOD_STANDALONE
45  return m_msg.msgLevel( lvl );
46 #endif // not XAOD_STANDALONE
47  }

◆ resolve_alias()

std::string egammaLayerRecalibTool::resolve_alias ( const std::string &  tune)
staticprivate

Definition at line 209 of file egammaLayerRecalibTool.cxx.

209  {
210 
211  if ("layer1_2012" == tune) return "layer1_2012_v5";
212  if ("layer1_alt_2012" == tune) return "layer1_alt_2012_v5";
213  if ("layer1_2011" == tune) return "layer1_2011_v5";
214  if ("layer1_alt_2011" == tune) return "layer1_alt_2011_v5";
215  if ("layer1_2010" == tune) return "layer1_2010_v5";
216  if ("ps_2012" == tune) return "ps_2012_v3";
217  if ("ps_2011" == tune) return "ps_2011_v3";
218  if ("ps_2010" == tune) return "ps_2010_v3";
219  if ("layer1_2012_up" == tune) return "layer1_2012_v5_up";
220  if ("layer1_2012_down" == tune) return "layer1_2012_v5_down";
221  if ("layer1_2012_errup" == tune) return "layer1_2012_v5_errup";
222  if ("layer1_2012_errdown" == tune) return "layer1_2012_v5_errdown";
223  if ("layer1_2011_up" == tune) return "layer1_2011_v5_up";
224  if ("layer1_2011_down" == tune) return "layer1_2011_v5_down";
225  if ("layer1_2011_errup" == tune) return "layer1_2011_v5_errup";
226  if ("layer1_2011_errdown" == tune) return "layer1_2011_v5_errdown";
227  if ("layer1_2010_up" == tune) return "layer1_2010_v5_up";
228  if ("layer1_2010_down" == tune) return "layer1_2010_v5_down";
229  if ("layer1_2010_errup" == tune) return "layer1_2010_v5_errup";
230  if ("layer1_2010_errdown" == tune) return "layer1_2010_v5_errdown";
231  if ("ps_2012_up" == tune) return "ps_2012_v3_up";
232  if ("ps_2012_down" == tune) return "ps_2012_v3_down";
233  if ("ps_2012_errup" == tune) return "ps_2012_v3_errup";
234  if ("ps_2012_errdown" == tune) return "ps_2012_v3_errdown";
235  if ("ps_2011_up" == tune) return "ps_2011_v3_up";
236  if ("ps_2011_down" == tune) return "ps_2011_v3_down";
237  if ("ps_2011_errup" == tune) return "ps_2011_v3_errup";
238  if ("ps_2011_errdown" == tune) return "ps_2011_v3_errdown";
239  if ("ps_2010_up" == tune) return "ps_2010_v3_up";
240  if ("ps_2010_down" == tune) return "ps_2010_v3_down";
241  if ("ps_2010_errup" == tune) return "ps_2010_v3_errup";
242  if ("ps_2010_errdown" == tune) return "ps_2010_v3_errdown";
243 
244  return tune;
245 }

◆ resolve_path()

const std::string egammaLayerRecalibTool::resolve_path ( std::string  filename) const
private

◆ scale_inputs()

CP::CorrectionCode egammaLayerRecalibTool::scale_inputs ( StdCalibrationInputs inputs) const

apply layer calibration to the

Parameters
inputs

Definition at line 937 of file egammaLayerRecalibTool.cxx.

938 {
940  for (const auto& modifier : m_modifiers) {
941  const float amount = (*modifier.second)(inputs);
942  const auto s = (*modifier.first)(inputs, amount);
943  ATH_MSG_DEBUG(" after E0|E1|E2|E3 = " << inputs.E0raw << "|" << inputs.E1raw << "|" << inputs.E2raw << "|" << inputs.E3raw);
944  if (s != CP::CorrectionCode::Ok) {
946  }
947  }
948  return status;
949 }

◆ scaleMC()

void egammaLayerRecalibTool::scaleMC ( bool  scaleMC = true)
inline

Definition at line 357 of file egammaLayerRecalibTool.h.

357 { m_scaleMC = scaleMC; }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_aodFixMissingCells

bool egammaLayerRecalibTool::m_aodFixMissingCells = false
private

Definition at line 376 of file egammaLayerRecalibTool.h.

◆ m_doPSCorrections

bool egammaLayerRecalibTool::m_doPSCorrections = true
private

Definition at line 367 of file egammaLayerRecalibTool.h.

◆ m_doS12Corrections

bool egammaLayerRecalibTool::m_doS12Corrections = true
private

Definition at line 368 of file egammaLayerRecalibTool.h.

◆ m_doSaccCorrections

bool egammaLayerRecalibTool::m_doSaccCorrections = true
private

Definition at line 369 of file egammaLayerRecalibTool.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_modifiers

ModifiersList egammaLayerRecalibTool::m_modifiers
private

Definition at line 372 of file egammaLayerRecalibTool.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

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

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_pileup_tool

corr_pileupShift* egammaLayerRecalibTool::m_pileup_tool = nullptr
private

Definition at line 374 of file egammaLayerRecalibTool.h.

◆ m_Run2Run3runNumberTransition

const unsigned int egammaLayerRecalibTool::m_Run2Run3runNumberTransition = 400000
staticprivate

Definition at line 364 of file egammaLayerRecalibTool.h.

◆ m_scaleMC

bool egammaLayerRecalibTool::m_scaleMC = false
private

Definition at line 377 of file egammaLayerRecalibTool.h.

◆ m_tune

std::string egammaLayerRecalibTool::m_tune
private

Definition at line 366 of file egammaLayerRecalibTool.h.


The documentation for this class was generated from the following files:
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
GetAmountHVPSGuillaume
Definition: egammaLayerRecalibTool.h:71
xAOD::EgammaHelpers::energyInMissingCells
unsigned short energyInMissingCells(const xAOD::Egamma &eg, double &e2, double &e3)
Get the energies in sampling 2 and 3 that are in cells rejected by the topo-cluster timing cut but th...
Definition: EgammaxAODHelpers.cxx:176
GetAmountPileupE3
Definition: egammaLayerRecalibTool.h:114
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
egammaLayerRecalibTool::m_aodFixMissingCells
bool m_aodFixMissingCells
Definition: egammaLayerRecalibTool.h:376
InputModifier::ZEROBASED
@ ZEROBASED
Definition: egammaLayerRecalibTool.h:231
egammaLayerRecalibTool::m_pileup_tool
corr_pileupShift * m_pileup_tool
Definition: egammaLayerRecalibTool.h:374
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
GetAmountBase
Definition: egammaLayerRecalibTool.h:62
NNPDF30NNLO.tune
tune
Definition: GeneratorFilters/share/common/NNPDF30NNLO.py:1
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1054
egammaLayerRecalibTool::scale_inputs
CP::CorrectionCode scale_inputs(StdCalibrationInputs &inputs) const
apply layer calibration to the
Definition: egammaLayerRecalibTool.cxx:937
GetAmountPileupE2
Definition: egammaLayerRecalibTool.h:105
xAOD::EgammaParameters::AuthorFwdElectron
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
Definition: EgammaDefs.h:30
corr_pileupShift
Correction for pileup induced energy shit as function of mu per layer for 2016 data.
Definition: corr_pileupShift.h:13
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
ScaleE3
Definition: egammaLayerRecalibTool.h:277
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
GetAmountHisto2DEtaCaloRunNumber
Definition: egammaLayerRecalibTool.h:196
InputModifier::SUBTRACT
@ SUBTRACT
Definition: egammaLayerRecalibTool.h:231
postInclude.inputs
inputs
Definition: postInclude.SortInput.py:15
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
InputModifier::ONEBASED_ALPHA
@ ONEBASED_ALPHA
Definition: egammaLayerRecalibTool.h:231
GetAmountHisto1DErrorDown
Definition: egammaLayerRecalibTool.h:178
ScaleE0
Definition: egammaLayerRecalibTool.h:247
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
ScaleEcalorimeter
Definition: egammaLayerRecalibTool.h:307
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
egammaLayerRecalibTool::m_modifiers
ModifiersList m_modifiers
Definition: egammaLayerRecalibTool.h:372
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
InputModifier::ONEBASED
@ ONEBASED
Definition: egammaLayerRecalibTool.h:231
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
GetAmountPileupE1
Definition: egammaLayerRecalibTool.h:96
egammaLayerRecalibTool::egammaLayerRecalibTool
egammaLayerRecalibTool(const std::string &name, const std::string &tune, int SaccEnable=1)
Definition: egammaLayerRecalibTool.cxx:921
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
GetAmountFormula
Definition: egammaLayerRecalibTool.h:125
GetAmountFixed
Definition: egammaLayerRecalibTool.h:206
egammaLayerRecalibTool::clear_corrections
void clear_corrections()
remove all the scale corrections
Definition: egammaLayerRecalibTool.cxx:1043
file
TFile * file
Definition: tile_monitor.h:29
hist_file_dump.f
f
Definition: hist_file_dump.py:135
xAOD::CaloCluster_v1::retrieveMoment
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
Definition: CaloCluster_v1.cxx:738
egammaLayerRecalibTool::m_scaleMC
bool m_scaleMC
Definition: egammaLayerRecalibTool.h:377
InputModifier::ZEROBASED_ALPHA
@ ZEROBASED_ALPHA
Definition: egammaLayerRecalibTool.h:231
GetAmountHVEMECPS207
Definition: egammaLayerRecalibTool.h:79
beamspotman.stat
stat
Definition: beamspotman.py:266
ScaleE1
Definition: egammaLayerRecalibTool.h:257
egammaLayerRecalibTool::m_doPSCorrections
bool m_doPSCorrections
Definition: egammaLayerRecalibTool.h:367
egammaLayerRecalibTool::m_doSaccCorrections
bool m_doSaccCorrections
Definition: egammaLayerRecalibTool.h:369
egammaLayerRecalibTool::m_Run2Run3runNumberTransition
static const unsigned int m_Run2Run3runNumberTransition
Definition: egammaLayerRecalibTool.h:364
xAOD::EventInfo_v1::averageInteractionsPerCrossing
float averageInteractionsPerCrossing() const
Average interactions per crossing for all BCIDs - for out-of-time pile-up.
Definition: EventInfo_v1.cxx:397
InputModifier
Definition: egammaLayerRecalibTool.h:230
egammaLayerRecalibTool::add_scale
void add_scale(InputModifier *modifier, GetAmountBase *amount)
add custom layer scale correction.
Definition: egammaLayerRecalibTool.cxx:932
egammaLayerRecalibTool::scaleMC
void scaleMC(bool scaleMC=true)
Definition: egammaLayerRecalibTool.h:357
GetAmountHisto1DErrorUp
Definition: egammaLayerRecalibTool.h:170
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
GetAmountPileupE0
Definition: egammaLayerRecalibTool.h:87
GetAmountHisto1D
Definition: egammaLayerRecalibTool.h:135
make_hlt_rep.modifier
string modifier
Definition: make_hlt_rep.py:14
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
egammaLayerRecalibTool
Definition: egammaLayerRecalibTool.h:317
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
ScaleEaccordion
Definition: egammaLayerRecalibTool.h:297
StdCalibrationInputs
Name : egammaLayerRecalibTool.h Package : egammaLayerRecalibTool Author : R.
Definition: egammaLayerRecalibTool.h:47
ScaleE1overE2
Definition: egammaLayerRecalibTool.h:287
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
egammaLayerRecalibTool::resolve_alias
static std::string resolve_alias(const std::string &tune)
Definition: egammaLayerRecalibTool.cxx:209
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
ScaleE2
Definition: egammaLayerRecalibTool.h:267
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
xAOD::CaloCluster_v1::energyBE
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:630
egammaLayerRecalibTool::m_doS12Corrections
bool m_doS12Corrections
Definition: egammaLayerRecalibTool.h:368
merge.status
status
Definition: merge.py:17
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
GetAmountHisto1DDown
Definition: egammaLayerRecalibTool.h:162
GetAmountHisto1DUp
Definition: egammaLayerRecalibTool.h:154
egammaLayerRecalibTool::m_tune
std::string m_tune
Definition: egammaLayerRecalibTool.h:366
xAOD::CaloCluster_v1::ETACALOFRAME
@ ETACALOFRAME
Eta in the calo frame (for egamma)
Definition: CaloCluster_v1.h:187
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
keylayer_zslicemap.perc
perc
Definition: keylayer_zslicemap.py:62
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.