|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/ITHistSvc.h"
13 m_doHistograms(doHistograms), m_rateVsMu(nullptr), m_rateVsTrain(nullptr),
m_data(nullptr),
14 m_rateVsMuCachedPtr(nullptr), m_rateVsTrainCachedPtr(nullptr), m_dataCachedPtr(nullptr)
17 m_rateVsMu = std::make_unique<TH1D>(
"",TString(
name +
";#mu;Rate / Unit #mu [Hz]"),226,-.5,225.5);
22 m_rateVsTrain = std::make_unique<TH1D>(
"",TString(
name +
";Distance Into Train;Rate / BCID [Hz]"),100,-0.5,99.5);
31 m_data->GetXaxis()->SetBinLabel(1,
"Actve Raw");
32 m_data->GetXaxis()->SetBinLabel(2,
"Active Weighted");
33 m_data->GetXaxis()->SetBinLabel(3,
"Pass Raw");
34 m_data->GetXaxis()->SetBinLabel(4,
"Pass Weighted OR");
35 m_data->GetXaxis()->SetBinLabel(5,
"Pass Weighted AND");
36 m_data->GetXaxis()->SetBinLabel(6,
"Express");
37 m_data->GetXaxis()->SetBinLabel(7,
"Unique");
49 ATH_MSG_ERROR(
"RatesHistoBase::giveMuHist Warning requested histograms when histograming is OFF here.");
50 return StatusCode::FAILURE;
53 return StatusCode::SUCCESS;
59 ATH_MSG_ERROR(
"RatesHistoBase::giveTrainHist Warning requested histograms when histograming is OFF here.");
60 return StatusCode::FAILURE;
63 return StatusCode::SUCCESS;
69 ATH_MSG_ERROR(
"RatesHistoBase::giveDataHist Warning requested histograms when histograming is OFF here.");
70 return StatusCode::FAILURE;
73 return StatusCode::SUCCESS;
89 static const std::vector<std::string>
values{
"LINEAR_L",
"LINEAR_BUNCH_EXPO_MU",
"LINEAR_BUNCHES",
"LINEAR_MU",
"NONE"};
90 return values.at(
static_cast<size_t>(strat));
101 default:
ATH_MSG_ERROR(
"Error in getExtrapolationFactor. Unknown ExtrapStrat_t ENUM supplied " << strat);
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.
@ kMU_SCALING
Scale trigger linearly but only in the change in <mu>
StatusCode giveTrainHist(const ServiceHandle< ITHistSvc > &svc, const std::string &name)
ExtrapStrat_t
Extrapolation strategy to apply to each emulated trigger.
@ kLINEAR
Scale trigger linearly with luminosity.
msgSvc
Provide convenience handles for various services.
virtual ~RatesHistoBase()
double getExtrapolationFactor(const WeightingValuesSummary_t &weights, const ExtrapStrat_t strat) const
std::unique_ptr< TH1 > m_data
Histogram of raw rates quantites, for when we need to normalise offline (e.g.
@ 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.
StatusCode giveMuHist(const ServiceHandle< ITHistSvc > &svc, const std::string &name)
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.
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.
const std::string & getExtrapolationFactorString(ExtrapStrat_t strat) const
@ kNONE
Do not scale this trigger for changes in luminosity.