ATLAS Offline Software
Loading...
Searching...
No Matches
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
15 public:
16
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
75 void reset() override { m_thresholdPassed = std::numeric_limits<double>::min(); }
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 void setHistoName(const std::string& newName);
107 private:
108
109 std::unique_ptr<TH1> m_rateScanHist;
113
114};
115
116
117#endif //> !RATESANALYSIS_RATESSCANTRIGGER_H
118
ExtrapStrat_t
Extrapolation strategy to apply to each emulated trigger.
@ kLINEAR
Scale trigger linearly with luminosity.
void setPassedAndExecute(const double t, const WeightingValuesSummary_t &weights)
Set the pass threshold and immediately call execute.
TriggerBehaviour_t
enum to describe if a trigger should activate for values >= or <= than the thresold
@ kTriggerBelowThreshold
Trigger for <= threshold.
@ kTriggerAboveThreshold
Trigger for >= threshold.
TriggerBehaviour_t m_behaviour
If we need to be above or below the threshold to cause the trigger to fire.
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 ...
double m_thresholdPassed
Analogous to m_pass.
const std::string printRate(const double ratesDenominator) const override
Prints the RatesScanTrigger's rate (different output to a regular trigger)
StatusCode giveThresholdHist(const ServiceHandle< ITHistSvc > &svc, const std::string &name)
void passThreshold(const double t, const bool unbiasedEvent=false)
Sets the threshold the event.
void reset() override
If I was used in an event, reset me.
void setHistoName(const std::string &newName)
RatesScanTrigger(const RatesScanTrigger &)=delete
RatesScanTrigger & operator=(const RatesScanTrigger &)=delete
std::unique_ptr< TH1 > m_rateScanHist
Even if we are not exporting it - we still need this histo.
void execute(const WeightingValuesSummary_t &weights) override
Execute trigger rate emulation.
RatesTrigger(const std::string &name, IMessageSvc *log, const double prescale=1., const double expressPrescale=-1, const std::string &seedName="", const double seedPrecale=1., const bool doHistograms=true, const ExtrapStrat_t extrapolation=ExtrapStrat_t::kLINEAR)
Construct new RatesTrigger to enumerate the rate for a single L1 or HLT trigger Provide pass/fail inf...
Structure to hold per-event weights for distribution.