24 StatusCode TrigPrescalesAlg ::
29 ANA_MSG_ERROR (
"The prescale decoration should not be empty");
30 return StatusCode::FAILURE;
35 ANA_MSG_ERROR (
"Either a list of triggers or trigger formula need to be provided");
36 return StatusCode::FAILURE;
41 ANA_MSG_ERROR (
"Provide either only a list of triggers or only a trigger formula");
42 return StatusCode::FAILURE;
49 std::string chainfix = chain;
50 std::replace(chainfix.begin(), chainfix.end(),
'.',
'p');
51 std::replace(chainfix.begin(), chainfix.end(),
'-',
'_');
67 std::vector<std::string> formulaVector = {
m_trigFormula.value()};
69 return StatusCode::SUCCESS;
79 std::string chainfix = chain;
80 std::replace(chainfix.begin(), chainfix.end(),
'.',
'p');
81 std::replace(chainfix.begin(), chainfix.end(),
'-',
'_');
92 if (!it->second(*evtInfo))
112 return StatusCode::SUCCESS;
117 StatusCode TrigPrescalesAlg ::
128 return StatusCode::SUCCESS;
ServiceHandle< StoreGateSvc > & evtStore()
std::vector< std::function< float(const xAOD::EventInfo *, const std::string &)> > m_prescaleFunctions
list of helper functions to compute the prescales
ToolHandle< IPileupReweightingTool > m_pileupReweightingTool
the pile-up reweighting tool
Gaudi::Property< std::vector< std::string > > m_trigListAll
list of all triggers or trigger chains
Gaudi::Property< std::string > m_trigFormula
list of all triggers or trigger chains
Gaudi::Property< std::vector< std::string > > m_trigList
list of prescaled triggers or trigger chains
Gaudi::Property< bool > m_prescaleMC
whether to prescale MC instead of unprescale dat
Gaudi::Property< std::string > m_prescaleDecoration
the decoration for trigger prescales
std::vector< SG::Decorator< float > > m_prescaleAccessors
the accessors for m_prescaleDecoration and m_trigList combination
Gaudi::Property< std::string > m_selectionDecoration
the decoration for trigger selection
std::unordered_map< std::string, SG::ConstAccessor< bool > > m_selectionAccessors
the accessors for m_selectionDecoration and m_trigList combination
Select isolated Photons, Electrons and Muons.
constexpr float invalidTriggerPrescale()
the decoration value to use if there is no valid trigger prescale information
EventInfo_v1 EventInfo
Definition of the latest event info version.