![]() |
ATLAS Offline Software
|
Used to calculate a rate scan as a function of some threshold value. More...
#include <RatesScanTrigger.h>
Public Types | |
| enum | TriggerBehaviour_t { kTriggerAboveThreshold , kTriggerBelowThreshold } |
| enum to describe if a trigger should activate for values >= or <= than the thresold More... | |
Public Member Functions | |
| 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 some threshold. | |
| RatesScanTrigger (const std::string &name, IMessageSvc *msgSvc, const std::vector< double > &thresholdBinEdges, 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 some threshold. | |
| virtual | ~RatesScanTrigger () |
| RatesScanTrigger (const RatesScanTrigger &)=delete | |
| RatesScanTrigger & | operator= (const RatesScanTrigger &)=delete |
| void | reset () override |
| If I was used in an event, reset me. | |
| void | passThreshold (const double t, const bool unbiasedEvent=false) |
| Sets the threshold the event. | |
| void | setPassedAndExecute (const double t, const WeightingValuesSummary_t &weights) |
| Set the pass threshold and immediately call execute. | |
| void | execute (const WeightingValuesSummary_t &weights) override |
| Execute trigger rate emulation. | |
| 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 | setHistoName (const std::string &newName) |
| void | setSeedsFromRandom (const bool i) |
| Set if this trigger is to behave as if it seeds from a random L1 item. | |
| void | setPassed (const bool passed=true, const bool active=true, const bool unbiasedEvent=false) |
| Set the pass/fail bool. | |
| void | setPassedAndExecute (const bool passed, const bool active, const WeightingValuesSummary_t &weights) |
| Set the pass/fail bool and immediately call execute. | |
| size_t | getSeedHash () const |
| const std::string & | getSeedName () const |
| Get the name of the seed of this trigger. | |
| double | getSeedPrescale () const |
| Get the prescale of the seed of this trigger. | |
| size_t | getHash () const |
| Get the hash of the name of this trigger. | |
| const std::string & | getName () const |
| Get the name of this trigger. | |
| double | getPrescale (const bool includeExpress=false) const |
| Gets the triggers prescale. | |
| bool | getPassed () const |
| If the trigger passed in the event. | |
| bool | getActive () const |
| If the trigger passed in the event. | |
| bool | getDisabled () const |
| If I or my seed were prescaled out. | |
| void | setUniqueGroup (const RatesGroup *unique) |
| If I have a group which is calculating my unique rate. | |
| void | setCoherentFactor (const double lowestCommonPrescale) |
| If i'm in a CPS group, set the lowest commons PS factor of the group. | |
| void | setCPS (const std::string &group) |
| If I'm in a CPS group, set the group name (I'll keep a copy of the hash) | |
| size_t | getCPSID () const |
| Get the hash of my CPS group name. | |
| double | getCoherentFactor () const |
| Get the lowest common prescale factor of all triggers in my CPS group. | |
| const std::string | printConfig () const |
| Prints the RatesTrigger's configuration. | |
| double | getTotalPrescaleWeight () const |
| const std::string | printExpressRate (const double ratesDenominator) const |
| Prints the RatesTrigger's express rate. | |
| StatusCode | giveMuHist (const ServiceHandle< ITHistSvc > &svc, const std::string &name) |
| StatusCode | giveTrainHist (const ServiceHandle< ITHistSvc > &svc, const std::string &name) |
| StatusCode | giveDataHist (const ServiceHandle< ITHistSvc > &svc, const std::string &name) |
| void | clearTrainHist () |
| In some jobs we don't want to do the rates vs. | |
| TH1 * | getDataHist () |
| bool | doHistograms () const |
| If histogramming was enabled in this rates object. | |
| const std::string & | getExtrapolationFactorString (ExtrapStrat_t strat) const |
| double | getExtrapolationFactor (const WeightingValuesSummary_t &weights, const ExtrapStrat_t strat) const |
| void | setDataName (const std::string &newName) |
| void | setRateVsMuName (const std::string &newName) |
| void | setRateVsTrainName (const std::string &newName) |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Static Public Member Functions | |
| static bool | isZero (double v) |
| static bool | isNotPositive (double v) |
Protected Attributes | |
| bool | m_pass |
| Did the trigger pass or not? | |
| bool | m_active |
| Was the trigger active? | |
| bool | m_seedsFromRandom |
| Does this trigger seed from a random trigger? | |
| double | m_rateAccumulator |
| Weighted events passed. | |
| double | m_rateAccumulator2 |
| Weighted events passed squared. | |
| double | m_rateExpressAccumulator |
| Weighted express stream events. | |
| double | m_rateExpressAccumulator2 |
| Weighted express stream events squared. | |
| double | m_ratesActive |
| double | m_ratesActive2 |
| size_t | m_CPSID |
| If I'm in a coherent prescale group, my group's ID (hash of the group name) | |
| double | m_coherentFactor |
| If I'm in a coherent prescale group, the prescale of the lowest non-disabled chain in the group. | |
| const RatesGroup * | m_uniqueGroup |
| Pointer to the group which is calculating my unique rate. | |
| const std::string | m_name |
| My name. | |
| const std::string | m_seed |
| My seed, "" if no seed. | |
| const size_t | m_nameHash |
| Hash of my name. | |
| const size_t | m_seedHash |
| Has of my seed name. | |
| const double | m_prescale |
| My prescale factor. | |
| const double | m_expressPrescale |
| My express stream prescale factor, gets applied on top of the regular prescale. | |
| const double | m_seedPrescale |
| const double | m_totalPrescaleWeight |
| Equal to 1/m_seedPrescale*m_prescale. | |
| const double | m_totalPrescaleWeightExpress |
| Equal to 1/m_seedPrescale*m_prescale*m_expressPrescale. | |
| const ExtrapStrat_t | m_extrapolationStrategy |
| How this trigger is to scale with luminosity. | |
| bool | m_doHistograms |
| If histogramming is switched on. | |
| std::unique_ptr< TH1 > | m_rateVsMu |
| Histogram of rate as a fn. | |
| std::unique_ptr< TH1 > | m_rateVsTrain |
| Histogram of rate as a fn. | |
| std::unique_ptr< TH1 > | m_data |
| Histogram of raw rates quantites, for when we need to normalise offline (e.g. | |
| TH1 * | m_rateVsMuCachedPtr {} |
| Cached, non-owning pointer. | |
| TH1 * | m_rateVsTrainCachedPtr {} |
| Cached, non-owning pointer. | |
| TH1 * | m_dataCachedPtr {} |
| Cached, non-owning pointer. | |
Private Member Functions | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| std::unique_ptr< TH1 > | m_rateScanHist |
| Even if we are not exporting it - we still need this histo. | |
| TH1 * | m_rateScanHistCachedPtr |
| double | m_thresholdPassed |
| Analogous to m_pass. | |
| TriggerBehaviour_t | m_behaviour |
| If we need to be above or below the threshold to cause the trigger to fire. | |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) | |
Used to calculate a rate scan as a function of some threshold value.
Typically a pT cut
Definition at line 14 of file RatesScanTrigger.h.
enum to describe if a trigger should activate for values >= or <= than the thresold
| Enumerator | |
|---|---|
| kTriggerAboveThreshold | Trigger for >= threshold. |
| kTriggerBelowThreshold | Trigger for <= threshold. |
Definition at line 20 of file RatesScanTrigger.h.
| 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 some threshold.
| name | Name of the trigger |
| msgSvc | Reference to message service |
| thresholdMin | The lower threshold of this trigger, rates will not be available below this threshold |
| thresholdMax | The upper threshold of this trigger, rates will not be available above this threshold |
| thresholdBins | Granularity |
| behaviour | If the trigger should activate above (kTriggerAboveThreshold) or below (kTriggerBelowThreshold) the threshold |
| prescale | The prescale of the trigger. Anything < 1 is considered disabled |
| seedName | The name of any L1 seed the trigger has, leave blank if L1 item / no L1 seed. |
| seedPrescale | The prescale of any L1 seed. Leave = 1 if no L1 seed. |
| extrapolation | The luminosity extrapolation strategy to be applied to this trigger |
Definition at line 10 of file RatesScanTrigger.cxx.
| RatesScanTrigger::RatesScanTrigger | ( | const std::string & | name, |
| IMessageSvc * | msgSvc, | ||
| const std::vector< double > & | thresholdBinEdges, | ||
| 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 some threshold.
| name | Name of the trigger |
| log | Reference to message service |
| thresholdBinEdged | Vector of bin edges to use for quantifying rate as a function of threshold |
| behaviour | If the trigger should activate above (kTriggerAboveThreshold) or below (kTriggerBelowThreshold) the threshold |
| prescale | The prescale of the trigger. Anything < 1 is considered disabled |
| seedName | The name of any L1 seed the trigger has, leave blank if L1 item / no L1 seed. |
| seedPrescale | The prescale of any L1 seed. Leave = 1 if no L1 seed. |
| extrapolation | The luminosity extrapolation strategy to be applied to this trigger |
Definition at line 24 of file RatesScanTrigger.cxx.
|
virtual |
Definition at line 45 of file RatesScanTrigger.cxx.
|
delete |
|
inherited |
In some jobs we don't want to do the rates vs.
position in train
Definition at line 76 of file RatesHistoBase.cxx.
|
inlineinherited |
If histogramming was enabled in this rates object.
Definition at line 99 of file RatesHistoBase.h.
|
overridevirtual |
Execute trigger rate emulation.
If the trigger passed threshold is within the defined range then fill the relevant histogram bins
| weights | Set of weighting values which may be needed. |
Reimplemented from RatesTrigger.
Definition at line 66 of file RatesScanTrigger.cxx.
|
inherited |
|
inherited |
Get the lowest common prescale factor of all triggers in my CPS group.
Definition at line 175 of file RatesTrigger.cxx.
|
inherited |
Get the hash of my CPS group name.
Definition at line 173 of file RatesTrigger.cxx.
|
inherited |
Definition at line 82 of file RatesHistoBase.cxx.
|
inherited |
|
inherited |
Definition at line 96 of file RatesHistoBase.cxx.
|
inherited |
Definition at line 87 of file RatesHistoBase.cxx.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Gets the triggers prescale.
| includeExpress | If true, the items express prescale is added on top of its regular prescale |
Definition at line 99 of file RatesTrigger.cxx.
|
inherited |
Definition at line 151 of file RatesTrigger.cxx.
|
inherited |
|
inherited |
|
inherited |
Definition at line 95 of file RatesTrigger.cxx.
|
inherited |
Definition at line 66 of file RatesHistoBase.cxx.
|
inherited |
Definition at line 46 of file RatesHistoBase.cxx.
| StatusCode RatesScanTrigger::giveThresholdHist | ( | const ServiceHandle< ITHistSvc > & | svc, |
| const std::string & | name ) |
Definition at line 61 of file RatesScanTrigger.cxx.
|
inherited |
Definition at line 56 of file RatesHistoBase.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inlinestaticinherited |
Definition at line 104 of file RatesHistoBase.h.
|
inlinestaticinherited |
Definition at line 103 of file RatesHistoBase.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 163 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 178 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
delete |
| void RatesScanTrigger::passThreshold | ( | const double | t, |
| const bool | unbiasedEvent = false ) |
Sets the threshold the event.
| t | The threshold reached by the event |
| unbiasedEvent | If the event was triggered at random online |
Definition at line 48 of file RatesScanTrigger.cxx.
|
inherited |
Prints the RatesTrigger's configuration.
Definition at line 104 of file RatesTrigger.cxx.
|
inherited |
Prints the RatesTrigger's express rate.
| ratesDenominator | The walltime for the run, needed to normalise from integrated weighted counts to a rate. |
Definition at line 135 of file RatesTrigger.cxx.
|
overridevirtual |
Prints the RatesScanTrigger's rate (different output to a regular trigger)
| ratesDenominator | The walltime for the run, needed to normalise from integrated weighted counts to a rate. |
Reimplemented from RatesTrigger.
Definition at line 97 of file RatesScanTrigger.cxx.
|
inlineoverridevirtual |
If I was used in an event, reset me.
Reimplemented from RatesTrigger.
Definition at line 75 of file RatesScanTrigger.h.
|
inherited |
If i'm in a CPS group, set the lowest commons PS factor of the group.
Definition at line 169 of file RatesTrigger.cxx.
|
inherited |
If I'm in a CPS group, set the group name (I'll keep a copy of the hash)
Definition at line 171 of file RatesTrigger.cxx.
|
inherited |
Definition at line 92 of file RatesHistoBase.cxx.
| void RatesScanTrigger::setHistoName | ( | const std::string & | newName | ) |
Definition at line 92 of file RatesScanTrigger.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
inherited |
Set the pass/fail bool.
Execute needs to be called separately afterwards.
Definition at line 38 of file RatesTrigger.cxx.
| void RatesScanTrigger::setPassedAndExecute | ( | const double | t, |
| const WeightingValuesSummary_t & | weights ) |
Set the pass threshold and immediately call execute.
Should only be done once per event.
| t | The threshold reached by the event |
| weights | Set of weighting values which may be needed. |
Definition at line 53 of file RatesScanTrigger.cxx.
|
inherited |
Set the pass/fail bool and immediately call execute.
Should only be done once per event.
| i | If the trigger passed or failed the event @weights Struct of weighting information for the event |
Definition at line 45 of file RatesTrigger.cxx.
|
inherited |
Definition at line 93 of file RatesHistoBase.cxx.
|
inherited |
Definition at line 94 of file RatesHistoBase.cxx.
|
inherited |
Set if this trigger is to behave as if it seeds from a random L1 item.
Definition at line 149 of file RatesTrigger.cxx.
|
inherited |
If I have a group which is calculating my unique rate.
Definition at line 167 of file RatesTrigger.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
protectedinherited |
|
private |
If we need to be above or below the threshold to cause the trigger to fire.
Definition at line 112 of file RatesScanTrigger.h.
|
protectedinherited |
If I'm in a coherent prescale group, the prescale of the lowest non-disabled chain in the group.
Definition at line 125 of file RatesTrigger.h.
|
protectedinherited |
If I'm in a coherent prescale group, my group's ID (hash of the group name)
Definition at line 124 of file RatesTrigger.h.
|
protectedinherited |
Histogram of raw rates quantites, for when we need to normalise offline (e.g.
grid processing)
Definition at line 115 of file RatesHistoBase.h.
|
protectedinherited |
|
protectedinherited |
If histogramming is switched on.
Definition at line 112 of file RatesHistoBase.h.
|
protectedinherited |
My express stream prescale factor, gets applied on top of the regular prescale.
Definition at line 134 of file RatesTrigger.h.
|
protectedinherited |
How this trigger is to scale with luminosity.
Definition at line 139 of file RatesTrigger.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
protectedinherited |
My name.
Definition at line 129 of file RatesTrigger.h.
|
protectedinherited |
Hash of my name.
Definition at line 131 of file RatesTrigger.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
protectedinherited |
Did the trigger pass or not?
Definition at line 114 of file RatesTrigger.h.
|
protectedinherited |
My prescale factor.
Definition at line 133 of file RatesTrigger.h.
|
protectedinherited |
Weighted events passed.
Definition at line 117 of file RatesTrigger.h.
|
protectedinherited |
Weighted events passed squared.
Definition at line 118 of file RatesTrigger.h.
|
protectedinherited |
Weighted express stream events.
Definition at line 119 of file RatesTrigger.h.
|
protectedinherited |
Weighted express stream events squared.
Definition at line 120 of file RatesTrigger.h.
|
protectedinherited |
Definition at line 121 of file RatesTrigger.h.
|
protectedinherited |
Definition at line 122 of file RatesTrigger.h.
|
private |
Even if we are not exporting it - we still need this histo.
Definition at line 109 of file RatesScanTrigger.h.
|
private |
Definition at line 110 of file RatesScanTrigger.h.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Histogram of rate as a fn.
of position in bunch train
Definition at line 114 of file RatesHistoBase.h.
|
protectedinherited |
|
protectedinherited |
My seed, "" if no seed.
Definition at line 130 of file RatesTrigger.h.
|
protectedinherited |
Has of my seed name.
Definition at line 132 of file RatesTrigger.h.
|
protectedinherited |
Definition at line 135 of file RatesTrigger.h.
|
protectedinherited |
Does this trigger seed from a random trigger?
If so it should only be exposed to unbiased events
Definition at line 116 of file RatesTrigger.h.
|
private |
Analogous to m_pass.
This is the threshold that the trigger passed in the event
Definition at line 111 of file RatesScanTrigger.h.
|
protectedinherited |
Equal to 1/m_seedPrescale*m_prescale.
Definition at line 136 of file RatesTrigger.h.
|
protectedinherited |
Equal to 1/m_seedPrescale*m_prescale*m_expressPrescale.
Definition at line 137 of file RatesTrigger.h.
|
protectedinherited |
Pointer to the group which is calculating my unique rate.
Definition at line 127 of file RatesTrigger.h.