Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TrigPrescalesAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 #ifndef TRIGGER_ANALYSIS_ALGORITHMS__TRIG_PRESCALES_ALG_H
9 #define TRIGGER_ANALYSIS_ALGORITHMS__TRIG_PRESCALES_ALG_H
10 
11 #include <functional>
12 #include <unordered_map>
13 
17 
18 namespace CP
19 {
22  constexpr float invalidTriggerPrescale () {return -1;}
23 
24 
25 
27 
29  {
31  public:
33  StatusCode initialize () override;
34  StatusCode execute () override;
35 
36 
38  private:
39  ToolHandle<IPileupReweightingTool> m_pileupReweightingTool {this, "pileupReweightingTool", "PileupReweightingTool", "the pileup reweighting tool to be used"};
40 
42  private:
43  Gaudi::Property<std::vector<std::string>> m_trigList {this, "triggers", {}, "trigger list"};
44 
46  private:
47  Gaudi::Property<std::vector<std::string>> m_trigListAll {this, "triggersAll", {}, "all trigger list"};
48 
50  private:
51  Gaudi::Property<std::string> m_trigFormula {this, "triggersFormula", "", "produce prescale based on formula instead of per trigger, e.g. (trigA||trigB)"};
52 
54  private:
55  std::vector<std::function<float(const xAOD::EventInfo *, const std::string &)>> m_prescaleFunctions;
56 
58  private:
59  Gaudi::Property<std::string> m_prescaleDecoration {this, "prescaleDecoration", "", "decoration to store prescales"};
60 
62  private:
63  Gaudi::Property<bool> m_prescaleMC {this, "prescaleMC", false, "whether to do prescaling of MC instead of unprescaling of data"};
64 
66  private:
67  std::vector<SG::AuxElement::Decorator<float>> m_prescaleAccessors;
68 
70  private:
71  Gaudi::Property<std::string> m_selectionDecoration {this, "selectionDecoration", "", "the decoration the trigger pass status"};
72 
74  private:
75  std::unordered_map<std::string, SG::AuxElement::ConstAccessor<bool>> m_selectionAccessors;
76  };
77 }
78 
79 #endif
PropertyWrapper.h
CP::invalidTriggerPrescale
constexpr float invalidTriggerPrescale()
the decoration value to use if there is no valid trigger prescale information
Definition: TrigPrescalesAlg.h:22
CP::TrigPrescalesAlg::m_prescaleDecoration
Gaudi::Property< std::string > m_prescaleDecoration
the decoration for trigger prescales
Definition: TrigPrescalesAlg.h:59
CP::TrigPrescalesAlg::m_prescaleAccessors
std::vector< SG::AuxElement::Decorator< float > > m_prescaleAccessors
the accessors for m_prescaleDecoration and m_trigList combination
Definition: TrigPrescalesAlg.h:67
CP::TrigPrescalesAlg::m_trigListAll
Gaudi::Property< std::vector< std::string > > m_trigListAll
list of all triggers or trigger chains
Definition: TrigPrescalesAlg.h:47
CP::TrigPrescalesAlg::m_prescaleMC
Gaudi::Property< bool > m_prescaleMC
whether to prescale MC instead of unprescale dat
Definition: TrigPrescalesAlg.h:63
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
EL::AnaAlgorithm::AnaAlgorithm
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Definition: AnaAlgorithm.cxx:40
CP::TrigPrescalesAlg::m_selectionDecoration
Gaudi::Property< std::string > m_selectionDecoration
the decoration for trigger selection
Definition: TrigPrescalesAlg.h:71
AnaAlgorithm.h
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
IPileupReweightingTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::TrigPrescalesAlg::m_pileupReweightingTool
ToolHandle< IPileupReweightingTool > m_pileupReweightingTool
the pile-up reweighting tool
Definition: TrigPrescalesAlg.h:39
CP::TrigPrescalesAlg::m_prescaleFunctions
std::vector< std::function< float(const xAOD::EventInfo *, const std::string &)> > m_prescaleFunctions
list of helper functions to compute the prescales
Definition: TrigPrescalesAlg.h:55
columnar::final
CM final
Definition: ColumnAccessor.h:106
CP::TrigPrescalesAlg::initialize
StatusCode initialize() override
Definition: TrigPrescalesAlg.cxx:25
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
CP::TrigPrescalesAlg::m_trigList
Gaudi::Property< std::vector< std::string > > m_trigList
list of prescaled triggers or trigger chains
Definition: TrigPrescalesAlg.h:43
CP::TrigPrescalesAlg::execute
StatusCode execute() override
Definition: TrigPrescalesAlg.cxx:112
CP::TrigPrescalesAlg
an algorithm for retrieving trigger prescales
Definition: TrigPrescalesAlg.h:29
CP::TrigPrescalesAlg::m_selectionAccessors
std::unordered_map< std::string, SG::AuxElement::ConstAccessor< bool > > m_selectionAccessors
the accessors for m_selectionDecoration and m_trigList combination
Definition: TrigPrescalesAlg.h:75
CP::TrigPrescalesAlg::m_trigFormula
Gaudi::Property< std::string > m_trigFormula
list of all triggers or trigger chains
Definition: TrigPrescalesAlg.h:51
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65