|
ATLAS Offline Software
|
#include <MonitorBase.h>
|
| MonitorBase (const Interface &interface) |
| Constructor
More...
|
|
TH1D * | dist (const DataFuncSet &func, const DataFuncArgs &args, const TString &name, int nBins, double xMin, double xMax, const TString &title="", const TString &xTitle="", const TString &yTitle="", const FilterParams &f=FilterParams()) const |
|
TH2D * | dist (const DataFuncSet &funcX, const DataFuncArgs &argsX, const DataFuncSet &funcY, const DataFuncArgs &argsY, const TString &name, int nBinsX, double xMin, double xMax, int nBinsY, double yMin, double yMax, const TString &title="", const TString &xTitle="", const TString &yTitle="", const FilterParams &f=FilterParams()) const |
|
TH2D * | partitionMap (const DataFuncSet &func, const DataFuncArgs &args, TString name, PartitionId partition, const TString &title="", CombinationType comb=AverageValue, const FilterParams &f=FilterParams()) const |
|
TH2D * | etaPhiMap (const DataFuncSet &func, const DataFuncArgs &args, const TString &name, CaloId calo, short layer, TString title="", CombinationType comb=AverageValue, const FilterParams &f=FilterParams()) const |
|
bool | prepareDumpParams (const TString &vars, int verbosity, std::vector< TString > &variables, std::vector< DataFuncSet > &funcs, std::vector< DataFuncArgs > &args, std::vector< TString > &formats, TString &locFormat, TString &locHeader, TString &varHeader) const |
|
bool | dump (const TString &vars, const FilterParams &f=FilterParams(), unsigned int verbosity=1) const |
|
bool | dump (const TString &vars, CombinationType comb=AverageValue, const FilterParams &f=FilterParams(), const TString &ranges="", unsigned int verbosity=1) const |
|
bool | statParams (const std::vector< DataFuncSet > &funcs, const std::vector< DataFuncArgs > &args, TVectorD &mean, TVectorD &meanErr, TMatrixD &covMatrix, TMatrixD &covMatrixErr, const FilterParams &f=FilterParams()) const |
|
const Interface & | interface () const |
|
unsigned int | nChannels () const |
|
const History * | getCellHistory (unsigned int i) const |
|
const CellInfo * | getCellInfo (unsigned int i) const |
|
virtual const History * | newCellHistory (unsigned int i) const |
|
virtual const History * | cellHistory (unsigned int i) const |
|
virtual const CellInfo * | cellInfo (unsigned int i) const |
|
virtual void | resetCache () const |
|
const CellInfo * | cellInfoCache (unsigned int i) const |
|
const History * | pass (unsigned int i, const FilterParams &f) const |
|
const History * | cellCache () const |
|
unsigned int | cachePos () const |
|
void | resetCellInfoCache () |
|
◆ MonitorBase()
◆ cachePos()
unsigned int LArSamples::AbsLArCells::cachePos |
( |
| ) |
const |
|
inlineinherited |
◆ cellCache()
◆ cellHistory()
const History * AbsLArCells::cellHistory |
( |
unsigned int |
i | ) |
const |
|
virtualinherited |
◆ cellInfo()
◆ cellInfoCache()
const CellInfo * AbsLArCells::cellInfoCache |
( |
unsigned int |
i | ) |
const |
|
inherited |
◆ dist() [1/2]
Definition at line 64 of file LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx.
69 if (xTitle !=
"")
h->GetXaxis()->SetTitle(xTitle);
70 if (yTitle !=
"")
h->GetYaxis()->SetTitle(yTitle);
74 if (!history)
continue;
75 for (
unsigned int j = 0; j < history->
nData(); j++) {
76 if (!
f.passEvent(*history->
data(j)))
continue;
◆ dist() [2/2]
TH2D * MonitorBase::dist |
( |
const DataFuncSet & |
funcX, |
|
|
const DataFuncArgs & |
argsX, |
|
|
const DataFuncSet & |
funcY, |
|
|
const DataFuncArgs & |
argsY, |
|
|
const TString & |
name, |
|
|
int |
nBinsX, |
|
|
double |
xMin, |
|
|
double |
xMax, |
|
|
int |
nBinsY, |
|
|
double |
yMin, |
|
|
double |
yMax, |
|
|
const TString & |
title = "" , |
|
|
const TString & |
xTitle = "" , |
|
|
const TString & |
yTitle = "" , |
|
|
const FilterParams & |
f = FilterParams() |
|
) |
| const |
Definition at line 84 of file LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx.
92 TH2D*
h =
new TH2D(
name,
title, nBinsX, xMin, xMax, nBinsY, yMin, yMax);
93 if (xTitle !=
"")
h->GetXaxis()->SetTitle(xTitle);
94 if (yTitle !=
"")
h->GetYaxis()->SetTitle(yTitle);
98 if (!history)
continue;
99 for (
unsigned int j = 0; j < history->
nData(); j++) {
100 if (!
f.passEvent(*history->
data(j)))
continue;
101 h->Fill(funcX.
val(*history->
data(j), argsX),
102 funcY.
val(*history->
data(j), argsY));
◆ dump() [1/2]
Definition at line 312 of file LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx.
316 std::vector<DataFuncSet> funcs;
317 std::vector<DataFuncArgs>
args;
318 TString locFormat, locHeader, varHeader;
320 formats, locFormat, locHeader, varHeader))
return false;
323 TObjArray* rangeList =
ranges.Tokenize(
":");
325 TString
range = (
k < (
unsigned int)rangeList->GetEntries() ? ((TObjString*)rangeList->At(
k))->String() :
"");
331 TObjArray* minMaxList =
range.Tokenize(
",");
332 if (minMaxList->GetEntries() == 2) {
333 minVals.push_back(((TObjString*)minMaxList->At(0))->String().Atof());
334 maxVals.push_back(((TObjString*)minMaxList->At(1))->String().Atof());
337 cout <<
"Invalid range specification " <<
range << endl;
344 TString
header = locHeader + varHeader;
345 TString separator =
"";
346 for (
int i = 0;
i <
header.Length();
i++) separator +=
"-";
347 cout << separator << endl <<
header << endl << separator << endl;
349 unsigned int nEntries = 0, nValues = 0;
353 if (!history)
continue;
362 cout <<
line << endl;
365 cout <<
nEntries <<
" entries selected" << endl;
◆ dump() [2/2]
Definition at line 279 of file LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx.
282 std::vector<DataFuncSet> funcs;
283 std::vector<DataFuncArgs>
args;
284 TString locFormat, locHeader, varHeader;
286 formats, locFormat, locHeader, varHeader))
return false;
287 TString
header = locHeader +
" idx |" + varHeader;
288 TString separator =
"";
289 for (
int i = 0;
i <
header.Length();
i++) separator +=
"-";
290 cout << separator << endl <<
header << endl << separator << endl;
296 if (!history)
continue;
298 for (
unsigned int j = 0; j < history->
nData(); j++) {
299 if (!
f.passEvent(*history->
data(j)))
continue;
300 TString
line =
part1 + Form(
" %3d |", j);
303 cout <<
line << endl;
307 cout <<
nEntries <<
" entries selected" << endl;
◆ etaPhiMap()
◆ func()
◆ getCellHistory()
const History * MonitorBase::getCellHistory |
( |
unsigned int |
i | ) |
const |
|
virtual |
◆ getCellInfo()
const CellInfo * MonitorBase::getCellInfo |
( |
unsigned int |
i | ) |
const |
|
virtual |
◆ history_value()
Definition at line 399 of file LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx.
402 double val = 0, sum1 = 0, sum2 = 0;
406 for (
unsigned int j = 0; j < history.
nData(); j++) {
407 if (!
f.passEvent(*history.
data(j)))
continue;
415 case RMSValue : sum1 += thisVal; sum2 += thisVal*thisVal;
break;
420 val = (nValues > 0 ? TMath::Sqrt((sum2 - sum1*sum1/nValues)/nValues) : -1);
421 if (TMath::Abs(
val) > 0.9*DBL_MAX)
val = 0;
◆ interface()
◆ nChannels()
unsigned int MonitorBase::nChannels |
( |
| ) |
const |
|
virtual |
◆ newCellHistory()
const History * AbsLArCells::newCellHistory |
( |
unsigned int |
i | ) |
const |
|
virtualinherited |
◆ parseVariables()
bool MonitorBase::parseVariables |
( |
TString |
varStr, |
|
|
std::vector< TString > & |
vars, |
|
|
std::vector< DataFuncSet > & |
funcs, |
|
|
std::vector< DataFuncArgs > & |
args |
|
) |
| |
|
static |
Definition at line 147 of file LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx.
150 varStr.ReplaceAll(
" ",
"");
151 TObjArray*
varList = varStr.Tokenize(
":");
152 for (
int i = 0;
i <
varList->GetEntries();
i++) {
153 TString varAndSample = ((TObjString*)
varList->At(
i))->String();
154 TString
var = varAndSample;
155 short sample1 = -1, sample2 = -1;
158 if (varAndSample.CountChar(
'[') + varAndSample.CountChar(
']') > 0) {
159 if (varAndSample.CountChar(
'[') != 1 || varAndSample.CountChar(
']') != 1 || varAndSample[varAndSample.Length() - 1] !=
']') {
160 cout <<
"Invalid use of [ ] delimiters" << endl;
164 TObjArray* varSampList = varAndSample.Tokenize(
"[,]");
165 if (varSampList->GetEntries() == 2) {
166 var = ((TObjString*)varSampList->At(0))->String();
167 TString sampStr = ((TObjString*)varSampList->At(1))->String();
169 if (!sampStr.IsDigit()) {
170 cout <<
"Sample argument [sample] should be an integer" << endl;
174 sample1 = sampStr.Atoi();
176 else if (varSampList->GetEntries() == 3) {
177 var = ((TObjString*)varSampList->At(0))->String();
178 TString sampStr1 = ((TObjString*)varSampList->At(1))->String();
179 TString sampStr2 = ((TObjString*)varSampList->At(2))->String();
181 if (!sampStr1.IsDigit() || !sampStr2.IsDigit()) {
182 cout <<
"Sample arguments [sample1, sample2] should be an integer" << endl;
186 sample1 = sampStr1.Atoi();
187 sample2 = sampStr2.Atoi();
190 cout <<
"Invalid specification of sample argument (expected var[sample])" << endl;
196 if (varAndSample.CountChar(
'(') + varAndSample.CountChar(
')') > 0) {
197 if (varAndSample.CountChar(
'(') != 1 || varAndSample.CountChar(
')') != 1 || varAndSample[varAndSample.Length() - 1] !=
')') {
198 cout <<
"Invalid use of ( ) delimiters" << endl;
202 TObjArray* varSampList = varAndSample.Tokenize(
"(,)");
203 if (varSampList->GetEntries() == 2) {
204 var = ((TObjString*)varSampList->At(0))->String();
205 TString sampStr = ((TObjString*)varSampList->At(1))->String();
207 if (!sampStr.IsFloat()) {
208 cout <<
"floating-point argument expected between ()" << endl;
212 par = sampStr.Atof();
215 cout <<
"Invalid specification of floating-point argument (expected func(arg))" << endl;
221 if (varAndSample(0, 5) ==
"pass_") {
222 str = varAndSample(5, varAndSample.Length() - 5);
227 cout <<
"Unknown variable " <<
var << endl;
230 vars.push_back(varAndSample);
231 funcs.push_back(fcn);
◆ partitionMap()
◆ pass()
◆ prepareDumpParams()
bool MonitorBase::prepareDumpParams |
( |
const TString & |
vars, |
|
|
int |
verbosity, |
|
|
std::vector< TString > & |
variables, |
|
|
std::vector< DataFuncSet > & |
funcs, |
|
|
std::vector< DataFuncArgs > & |
args, |
|
|
std::vector< TString > & |
formats, |
|
|
TString & |
locFormat, |
|
|
TString & |
locHeader, |
|
|
TString & |
varHeader |
|
) |
| const |
Definition at line 239 of file LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx.
246 cout <<
"Invalid variable specification " << vars << endl;
250 locFormat =
"| %6d | %-";
261 TString locFormatHeader = locFormat; locFormatHeader.ReplaceAll(
"d",
"s");
262 locHeader = Form(locFormatHeader,
"hash",
"location");
265 formats.emplace_back(
" %-9.8g |");
266 TString fH = formats[
i]; fH.ReplaceAll(
"g",
"s");
272 varHeader += Form(fH,
varName.Data());
◆ resetCache()
void AbsLArCells::resetCache |
( |
| ) |
const |
|
virtualinherited |
◆ resetCellInfoCache()
void AbsLArCells::resetCellInfoCache |
( |
| ) |
|
|
inherited |
◆ statParams()
Definition at line 370 of file LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx.
380 if (!history)
continue;
381 for (
unsigned int j = 0; j < history->
nData(); j++) {
382 if (!
f.passEvent(*history->
data(j)))
continue;
383 TVectorD
vals(funcs.size());
384 for (
unsigned int k = 0;
k < funcs.size();
k++)
391 meanErr =
avg.meanErrors();
393 covMatrixErr =
avg.covarianceMatrixErrors();
◆ str()
◆ m_cellCache
◆ m_cellInfoCache
std::vector<CellInfo*> LArSamples::AbsLArCells::m_cellInfoCache |
|
mutableprivateinherited |
◆ m_interface
◆ m_pos
unsigned int LArSamples::AbsLArCells::m_pos |
|
mutableprivateinherited |
◆ printPeriodicity
const int LArSamples::MonitorBase::printPeriodicity = 10000 |
|
static |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
int _layer(const DataFuncArgs &args) const
double _eta(const DataFuncArgs &args) const
static TH2D * etaPhiHist(CaloId calo, short layer, const TString &name, const TString &title)
double _xip(const DataFuncArgs &args) const
double _chi2_noCorr(const DataFuncArgs &args) const
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
static DataFuncSet func(const TString &var)
virtual const History * newCellHistory(unsigned int i) const
double _sample(const DataFuncArgs &args) const
double _adjDeltaT(const DataFuncArgs &args) const
const CellInfo * cellInfo() const
virtual const History * cellHistory(unsigned int i) const
int _region(const DataFuncArgs &args) const
double _pedestalRMS(const DataFuncArgs &) const
double _xi(const DataFuncArgs &args) const
std::vector< CellInfo * > m_cellInfoCache
const Interface & interface() const
double _xiNormRing(const DataFuncArgs &) const
int _ring(const DataFuncArgs &args) const
static TString str(CaloId id)
virtual const CellInfo * cellInfo(unsigned int i) const
int _nData(const DataFuncArgs &args) const
const History * getCellHistory(unsigned int i) const
double _pass(const DataFuncArgs &args) const
double _refitDeltaT(const DataFuncArgs &args) const
static double history_value(const History &history, const DataFuncSet &func, const DataFuncArgs &args, CombinationType comb, const FilterParams &f, unsigned int &nValues)
storage of the time histories of all the cells
double _energySignif(const DataFuncArgs &args) const
int _calo(const DataFuncArgs &args) const
static const int printPeriodicity
double _normResidualOffset(const DataFuncArgs &args) const
double _quality(const DataFuncArgs &) const
double _upstreamE(const DataFuncArgs &) const
double _delta(const DataFuncArgs &args) const
int _iPhi(const DataFuncArgs &args) const
int _gain(const DataFuncArgs &) const
int _hash(const DataFuncArgs &args) const
double _resCorrN(const DataFuncArgs &) const
const Data * data(unsigned int i) const
double _chi2_ringCorr(const DataFuncArgs &args) const
double _ofcSigma(const DataFuncArgs &args) const
double _phi(const DataFuncArgs &args) const
double _adcMax_new(const DataFuncArgs &) const
double _residualOffset(const DataFuncArgs &args) const
static bool parseVariables(TString varStr, std::vector< TString > &vars, std::vector< DataFuncSet > &funcs, std::vector< DataFuncArgs > &args)
int _iEta(const DataFuncArgs &args) const
int _feedThrough(const DataFuncArgs &args) const
double _chi2_k(const DataFuncArgs &args) const
int _maxPosition(const DataFuncArgs &) const
double _adjScale(const DataFuncArgs &args) const
string varName
end cluster ToT and charge
virtual const CellInfo * getCellInfo(unsigned int i) const
double _pedestalSubstractedSample(const DataFuncArgs &args) const
TString location(int verbose=1) const
double _peakSignif(const DataFuncArgs &args) const
double _normResidualError(const DataFuncArgs &args) const
double _timeECorr(const DataFuncArgs &args) const
double _timeForSplash2(const DataFuncArgs &args) const
virtual const History * getCellHistory(unsigned int i) const =0
const Interface * m_interface
unsigned int nData() const
double _xiNormCell(const DataFuncArgs &) const
double _timeForSplash1(const DataFuncArgs &args) const
static TH2D * partitionHist(PartitionId part, const TString &name, const TString &title)
const CellInfo * getCellInfo(unsigned int i) const
double _ofcTime(const DataFuncArgs &) const
const History * pass(unsigned int i, const FilterParams &f) const
double _chi2_cellCorr(const DataFuncArgs &args) const
double _timeNoTOF(const DataFuncArgs &args) const
const CellInfo * cellInfoCache(unsigned int i) const
const History * m_cellCache
double _minValue(const DataFuncArgs &) const
double _upstreamERatio(const DataFuncArgs &args) const
double _maxValue(const DataFuncArgs &) const
double _noise(const DataFuncArgs &) const
int _slot(const DataFuncArgs &args) const
int _run(const DataFuncArgs &) const
double _chi2Anomaly(const DataFuncArgs &args) const
double _energy(const DataFuncArgs &) const
int _goodForShapeCorr(const DataFuncArgs &) const
double _count(const DataFuncArgs &) const
bool prepareDumpParams(const TString &vars, int verbosity, std::vector< TString > &variables, std::vector< DataFuncSet > &funcs, std::vector< DataFuncArgs > &args, std::vector< TString > &formats, TString &locFormat, TString &locHeader, TString &varHeader) const
double val(const Data &data, const DataFuncArgs &args) const
int _index(const DataFuncArgs &) const
static bool isNone(double x)
virtual void resetCache() const
double _residual(const DataFuncArgs &args) const
double _x(const DataFuncArgs &args) const
double _ofcGamma(const DataFuncArgs &args) const
double _residualError(const DataFuncArgs &args) const
int _lumiBlock(const DataFuncArgs &) const
double _rt(const DataFuncArgs &args) const
int _channel(const DataFuncArgs &args) const
double _refitScale(const DataFuncArgs &args) const
double _chi2(const DataFuncArgs &) const
double _adcMax(const DataFuncArgs &) const
double _z(const DataFuncArgs &args) const
double _pedestal(const DataFuncArgs &) const
virtual unsigned int nChannels() const
int _event(const DataFuncArgs &) const
double _y(const DataFuncArgs &args) const
int _bunchId(const DataFuncArgs &) const
double _refitChi2(const DataFuncArgs &args) const
double _xiRing(const DataFuncArgs &args) const
double _xiCell(const DataFuncArgs &args) const