|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef RATESANALYSIS_RATESHISTOBASE_H
6 #define RATESANALYSIS_RATESHISTOBASE_H 1
11 #include "GaudiKernel/ServiceHandle.h"
16 #include <unordered_map>
103 static bool isZero(
double v) {
return fabs(
v) < 1
e-10; }
118 #endif //> !RATESANALYSIS_RATESHISTOBASE_H
double m_eventLiveTime
How much wall-time at P1 did this event represent.
@ kACTIVE_RAW_BIN
Bin used to store the raw total events in which the trigger was active.
@ kUNIQUE_BIN
Bin used to store data needed to get the unique rate.
TH1 * m_dataCachedPtr
Cached, non-owning pointer.
void clearTrainHist()
In some jobs we don't want to do the rates vs.
Structure to hold per-event weights for distribution.
bool m_isUnbiased
If the event was taken online with a RD trigger.
double m_eventLumi
The instantaneous lumi in cm-2s-1.
const std::string print()
double m_linearLumiFactor
What weight needs to be applied to extrapolate rates linear in mu and bunches.
uint32_t m_distanceInTrain
How far into the bunch train the event was, in bunch crossings.
@ kMU_SCALING
Scale trigger linearly but only in the change in <mu>
StatusCode giveTrainHist(const ServiceHandle< ITHistSvc > &svc, const std::string &name)
bool m_doHistograms
If histogramming is switched on.
RatesHistoBase & operator=(const RatesHistoBase &)=delete
static bool isNotPositive(double v)
ExtrapStrat_t
Extrapolation strategy to apply to each emulated trigger.
@ kPASS_WEIGHTED_OR_BIN
Bin used to store the total rate (OR)
double m_enhancedBiasWeight
A property of the event derived from online enhanced bias prescales.
@ kLINEAR
Scale trigger linearly with luminosity.
RatesHistoBase(const RatesHistoBase &)=delete
msgSvc
Provide convenience handles for various services.
virtual ~RatesHistoBase()
std::unique_ptr< TH1 > m_data
Histogram of raw rates quantites, for when we need to normalise offline (e.g.
double getExtrapolationFactor(const WeightingValuesSummary_t &weights, const ExtrapStrat_t strat) const
@ kEXPO_MU
Scale trigger linearly in bunches and exponentially in mu.
std::unique_ptr< TH1 > m_rateVsMu
Histogram of rate as a fn.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::unique_ptr< TH1 > m_rateVsTrain
Histogram of rate as a fn.
@ kBUNCH_SCALING
Scale trigger linearly but only in the number of bunches.
Class to provide easy MsgStream access and capabilities.
double m_expoMuFactor
What weight needs to be applied to extrapolate rates linear in bunches and exponential in mu.
StatusCode giveMuHist(const ServiceHandle< ITHistSvc > &svc, const std::string &name)
@ kEXPRESS_BIN
Bin used to store the express rate.
AthROOTErrorHandlerSvc * svc
TH1 * m_rateVsTrainCachedPtr
Cached, non-owning pointer.
RatesHistoBase(const std::string &name, IMessageSvc *msgSvc, const bool doHistograms=true)
TH1 * m_rateVsMuCachedPtr
Cached, non-owning pointer.
double m_bunchFactor
What weight needs to be applied to extrapolate rates linear in number of bunches.
@ kPASS_WEIGHTED_AND_BIN
Bin used to store the total rate (AND)
Basic base class for any common functionality between RatesTrigger and RatesGroup This means that eve...
std::string m_name
My name.
static bool isZero(double v)
StatusCode giveDataHist(const ServiceHandle< ITHistSvc > &svc, const std::string &name)
bool doHistograms() const
If histogramming was enabled in this rates object.
@ kNRATES_BINS
Must always come last.
@ kPASS_RAW_BIN
Bin used to store the raw total events in which the trigger passed.
double m_muFactor
What weight needs to be applied to extrapolate rates linear in mu.
@ kACTIVE_WEIGHTED_BIN
Bin used to store the weighted events in which the trigger was active.
RatesBinIdentifier_t
Lables a bin in a histogram.
const std::string & getExtrapolationFactorString(ExtrapStrat_t strat) const
@ kNONE
Do not scale this trigger for changes in luminosity.
const double m_noScaling
Weight for no scaling.
double m_eventMu
The actual number of interactions in the event.