ATLAS Offline Software
RatesScanTrigger.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef RATESANALYSIS_RATESSCANTRIGGER_H
6 #define RATESANALYSIS_RATESSCAMTRIGGER_H 1
7 
8 #include "RatesTrigger.h"
9 #include <limits>
10 
14 class RatesScanTrigger : public RatesTrigger {
15  public:
16 
23  };
24 
38  RatesScanTrigger(const std::string& name,
39  IMessageSvc* msgSvc,
40  const double thresholdMin,
41  const double thresholdMax,
42  const uint32_t thresholdBins = 100,
44  const double prescale = 1.,
45  const std::string& seedName = "",
46  const double seedPrecale = 1.,
47  const ExtrapStrat_t extrapolation = ExtrapStrat_t::kLINEAR);
48 
60  RatesScanTrigger(const std::string& name,
61  IMessageSvc* msgSvc,
62  const std::vector<double>& thresholdBinEdges,
64  const double prescale = 1.,
65  const std::string& seedName = "",
66  const double seedPrecale = 1.,
67  const ExtrapStrat_t extrapolation = ExtrapStrat_t::kLINEAR);
68 
69  virtual ~RatesScanTrigger();
70 
72 
74 
76 
82  void passThreshold(const double t, const bool unbiasedEvent = false);
83 
89  void setPassedAndExecute(const double t, const WeightingValuesSummary_t& weights);
90 
97  void execute(const WeightingValuesSummary_t& weights) override;
98 
103  const std::string printRate(const double ratesDenominator) const override;
104 
105  StatusCode giveThresholdHist(const ServiceHandle<ITHistSvc>& svc, const std::string& name);
106 
107  private:
108 
109  std::unique_ptr<TH1> m_rateScanHist;
113 
114 };
115 
116 
117 #endif //> !RATESANALYSIS_RATESSCANTRIGGER_H
118 
RatesScanTrigger::RatesScanTrigger
RatesScanTrigger(const RatesScanTrigger &)=delete
RatesScanTrigger
Used to calculate a rate scan as a function of some threshold value.
Definition: RatesScanTrigger.h:14
RatesScanTrigger::m_rateScanHistCachedPtr
TH1 * m_rateScanHistCachedPtr
Definition: RatesScanTrigger.h:110
RatesScanTrigger::m_rateScanHist
std::unique_ptr< TH1 > m_rateScanHist
Even if we are not exporting it - we still need this histo.
Definition: RatesScanTrigger.h:109
RatesScanTrigger::~RatesScanTrigger
virtual ~RatesScanTrigger()
Definition: RatesScanTrigger.cxx:47
WeightingValuesSummary_t
Structure to hold per-event weights for distribution.
Definition: RatesHistoBase.h:55
RatesTrigger.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
RatesScanTrigger::printRate
const std::string printRate(const double ratesDenominator) const override
Prints the RatesScanTrigger's rate (different output to a regular trigger)
Definition: RatesScanTrigger.cxx:94
RatesScanTrigger::reset
void reset() override
If I was used in an event, reset me.
Definition: RatesScanTrigger.h:75
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
RatesScanTrigger::RatesScanTrigger
RatesScanTrigger(const std::string &name, IMessageSvc *msgSvc, const double thresholdMin, const double thresholdMax, const uint32_t thresholdBins=100, const TriggerBehaviour_t behaviour=kTriggerBelowThreshold, const double prescale=1., const std::string &seedName="", const double seedPrecale=1., const ExtrapStrat_t extrapolation=ExtrapStrat_t::kLINEAR)
Construct new RatesScanTrigger to enumerate the rate for a single L1 or HLT trigger as a function of ...
Definition: RatesScanTrigger.cxx:10
RatesScanTrigger::execute
void execute(const WeightingValuesSummary_t &weights) override
Execute trigger rate emulation.
Definition: RatesScanTrigger.cxx:68
RatesScanTrigger::TriggerBehaviour_t
TriggerBehaviour_t
enum to describe if a trigger should activate for values >= or <= than the thresold
Definition: RatesScanTrigger.h:20
ExtrapStrat_t
ExtrapStrat_t
Extrapolation strategy to apply to each emulated trigger.
Definition: RatesHistoBase.h:30
RatesScanTrigger::kTriggerBelowThreshold
@ kTriggerBelowThreshold
Trigger for <= threshold.
Definition: RatesScanTrigger.h:22
RatesTrigger
Used to calculate the rate for a single trigger at L1 or the HLT.
Definition: RatesTrigger.h:15
RatesScanTrigger::m_thresholdPassed
double m_thresholdPassed
Analogous to m_pass.
Definition: RatesScanTrigger.h:111
kLINEAR
@ kLINEAR
Scale trigger linearly with luminosity.
Definition: RatesHistoBase.h:31
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
RatesScanTrigger::passThreshold
void passThreshold(const double t, const bool unbiasedEvent=false)
Sets the threshold the event.
Definition: RatesScanTrigger.cxx:50
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
min
#define min(a, b)
Definition: cfImp.cxx:40
RatesScanTrigger::operator=
RatesScanTrigger & operator=(const RatesScanTrigger &)=delete
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
RatesScanTrigger::kTriggerAboveThreshold
@ kTriggerAboveThreshold
Trigger for >= threshold.
Definition: RatesScanTrigger.h:21
weights
Definition: herwig7_interface.h:44
RatesScanTrigger::giveThresholdHist
StatusCode giveThresholdHist(const ServiceHandle< ITHistSvc > &svc, const std::string &name)
Definition: RatesScanTrigger.cxx:63
RatesScanTrigger::m_behaviour
TriggerBehaviour_t m_behaviour
If we need to be above or below the threshold to cause the trigger to fire.
Definition: RatesScanTrigger.h:112
ValidateEBMenu.seedName
seedName
Definition: ValidateEBMenu.py:100
RatesScanTrigger::setPassedAndExecute
void setPassedAndExecute(const double t, const WeightingValuesSummary_t &weights)
Set the pass threshold and immediately call execute.
Definition: RatesScanTrigger.cxx:55
ServiceHandle< ITHistSvc >