ATLAS Offline Software
Loading...
Searching...
No Matches
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
18namespace 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::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::ConstAccessor<bool>> m_selectionAccessors;
76 };
77}
78
79#endif
an algorithm for retrieving trigger prescales
std::vector< std::function< float(const xAOD::EventInfo *, const std::string &)> > m_prescaleFunctions
list of helper functions to compute the prescales
StatusCode execute() override
StatusCode initialize() override
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
the (new) base class for EventLoop algorithms
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
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.