|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/ITHistSvc.h"
13 m_doHistograms(doHistograms)
16 m_rateVsMu = std::make_unique<TH1D>(
"",TString(
name +
";#mu;Rate / Unit #mu [Hz]"),226,-.5,225.5);
21 m_rateVsTrain = std::make_unique<TH1D>(
"",TString(
name +
";Distance Into Train;Rate / BCID [Hz]"),100,-0.5,99.5);
30 m_data->GetXaxis()->SetBinLabel(1,
"Actve Raw");
31 m_data->GetXaxis()->SetBinLabel(2,
"Active Weighted");
32 m_data->GetXaxis()->SetBinLabel(3,
"Pass Raw");
33 m_data->GetXaxis()->SetBinLabel(4,
"Pass Weighted OR");
34 m_data->GetXaxis()->SetBinLabel(5,
"Pass Weighted AND");
35 m_data->GetXaxis()->SetBinLabel(6,
"Express");
36 m_data->GetXaxis()->SetBinLabel(7,
"Unique");
48 ATH_MSG_ERROR(
"RatesHistoBase::giveMuHist Warning requested histograms when histograming is OFF here.");
49 return StatusCode::FAILURE;
52 return StatusCode::SUCCESS;
58 ATH_MSG_ERROR(
"RatesHistoBase::giveTrainHist Warning requested histograms when histograming is OFF here.");
59 return StatusCode::FAILURE;
62 return StatusCode::SUCCESS;
68 ATH_MSG_ERROR(
"RatesHistoBase::giveDataHist Warning requested histograms when histograming is OFF here.");
69 return StatusCode::FAILURE;
72 return StatusCode::SUCCESS;
88 static const std::vector<std::string>
values{
"LINEAR_L",
"LINEAR_BUNCH_EXPO_MU",
"LINEAR_BUNCHES",
"LINEAR_MU",
"NONE"};
89 return values.at(
static_cast<size_t>(strat));
100 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.