|
ATLAS Offline Software
|
#include <Interface.h>
|
| Interface (const Accessor &accessor) |
| Constructor
More...
|
|
virtual | ~Interface () |
|
unsigned int | nEvents () const |
|
unsigned int | nRuns () const |
|
const EventData * | eventData (unsigned int i) const |
|
const RunData * | runData (unsigned int i) const |
|
unsigned int | historySize (unsigned int i) const |
|
HistoryIterator | begin (unsigned int pos=0, double eMin=-1, double adcMaxMin=-1) const |
|
unsigned int | end () const |
|
unsigned int | size () const |
|
unsigned int | nFilledChannels () const |
|
void | printFilledRanges (unsigned int skip=0) const |
|
bool | highEData (double eCut, TArrayI &hashes, TArrayI &indices) const |
|
HistoryIterator | findEtaPhi (CaloId calo, short layer, short iEta, short iPhi, short region=0) const |
|
HistoryIterator | findFebChannel (CaloId calo, short feb, short channel) const |
|
HistoryIterator | findFTSlotChannel (CaloId calo, short ft, short slot, short channel) const |
|
bool | neighbors (const CellInfo &cell, double dRCut, std::vector< unsigned int > &hashes) const |
|
bool | firstNeighbors (unsigned int hash, std::vector< unsigned int > &hashes, short layer=-2) const |
|
bool | data (const std::vector< unsigned int > &hashes, const EventData &event, std::vector< const Data * > &data) const |
|
Interface * | merge (const Interface &other, const TString &fileName) const |
|
Interface * | merge (const Interface &other, const TString &fileName, const TString &LBFile) const |
|
Interface * | filter (const TString &sel, const TString &fileName, const TString &tweaks="") const |
|
Interface * | filter (const FilterParams &filterParams, const DataTweaker &tweaker, const TString &fileName) const |
|
Interface * | makeTemplate (const TString &fileName) const |
|
Interface * | refit (const TString &newFileName, Chi2Params pars=DefaultChi2) const |
|
const Accessor & | accessor () const |
|
bool | isValid () const |
|
TH1D * | Draw (const TString &var, int nBins, double xMin, double xMax, const TString &sel="", const TString &opt="") const |
|
TH2D * | Draw (const TString &varList, int nBinsX, double xMin, double xMax, int nBinsY, double yMin, double yMax, const TString &sel="", const TString &opt="") const |
|
TH2D * | DrawPartition (PartitionId partition, const TString &var, const TString &sel="", const TString &opt="", CombinationType comb=TotalValue) const |
|
TH2D * | DrawEtaPhi (CaloId calo, short layer, const TString &var, const TString &sel="", const TString &opt="", CombinationType comb=TotalValue) const |
|
bool | Scan (const TString &vars, const TString &sel="", unsigned int verbosity=1) const |
|
bool | Scan (const TString &vars, CombinationType comb, const TString &sel="", const TString &ranges="", unsigned int verbosity=1) const |
|
bool | Show (unsigned int hash, unsigned int verbosity=1) const |
|
bool | Show (const TString &sel="", unsigned int verbosity=1) const |
|
bool | ShowEvents (const TString &sel="", unsigned int verbosity=1) const |
|
bool | ShowRuns (unsigned int verbosity=1) const |
|
bool | ShowStats (const TString &varList, const TString &sel="", bool withErrors=false) const |
|
OccupancyMonitor | occupancyMonitor () const |
|
DigitMonitor | digitMonitor () const |
|
FitMonitor | fitMonitor () const |
|
bool | dumpEventTuple (const TString &variables, const TString &fileName) const |
|
void | setShapeErrorGetter (const AbsShapeErrorGetter *err) |
|
void | setShapeError (double k) |
|
void | setShapeError (const TString &fileName) |
|
const AbsShapeErrorGetter * | shapeErrorGetter () const |
|
bool | writeToFile (const TString &fileName) const |
|
const History * | cellHistory (unsigned int i) 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 CellInfo * | cellInfo (unsigned int i) const |
|
virtual unsigned int | nChannels () 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 () |
|
|
static Interface * | open (const TString &fileName) |
|
static Interface * | open (const std::vector< TString > &fileNames) |
|
static Interface * | openList (const TString &fileList) |
|
static Interface * | openWild (const TString &wcName) |
|
static Interface * | merge (const std::vector< const Interface * > &interfaces, const TString &fileName) |
|
static Interface * | merge (const std::vector< const Interface * > &interfaces, const TString &fileName, const TString &LBFile) |
|
static Interface * | merge (const TString &listFileName, const TString &fileName) |
|
static Interface * | merge (const TString &listFileName, const TString &fileName, const TString &LBFile) |
|
static bool | filterAndMerge (const TString &listFileName, const TString &outFile, const TString &filters, const TString &tweaks="") |
|
static TString | addSuffix (const TString &fileName, const TString &suffix) |
|
Definition at line 36 of file Interface.h.
◆ Interface()
◆ ~Interface()
Interface::~Interface |
( |
| ) |
|
|
virtual |
◆ accessor()
◆ addSuffix()
TString Interface::addSuffix |
( |
const TString & |
fileName, |
|
|
const TString & |
suffix |
|
) |
| |
|
static |
◆ begin()
HistoryIterator Interface::begin |
( |
unsigned int |
pos = 0 , |
|
|
double |
eMin = -1 , |
|
|
double |
adcMaxMin = -1 |
|
) |
| const |
◆ cachePos()
unsigned int LArSamples::AbsLArCells::cachePos |
( |
| ) |
const |
|
inlineinherited |
◆ cellCache()
◆ cellHistory()
const History * Interface::cellHistory |
( |
unsigned int |
i | ) |
const |
|
virtual |
◆ cellInfo()
◆ cellInfoCache()
const CellInfo * AbsLArCells::cellInfoCache |
( |
unsigned int |
i | ) |
const |
|
inherited |
◆ data()
Definition at line 762 of file Interface.cxx.
777 if (!history)
continue;
779 if (dataForEvent)
data.push_back(
new Data(*dataForEvent));
◆ digitMonitor()
Definition at line 114 of file Interface.h.
114 {
return DigitMonitor(*
this); }
◆ Draw() [1/2]
TH1D * Interface::Draw |
( |
const TString & |
var, |
|
|
int |
nBins, |
|
|
double |
xMin, |
|
|
double |
xMax, |
|
|
const TString & |
sel = "" , |
|
|
const TString & |
opt = "" |
|
) |
| const |
Definition at line 454 of file Interface.cxx.
458 if (!
f.set(
sel))
return nullptr;
460 std::vector<TString> vars;
461 std::vector<DataFuncSet> funcs;
462 std::vector<DataFuncArgs>
args;
464 cout <<
"Invalid variable specification " <<
var << endl;
468 TString
title = vars[0];
471 TH1D*
h =
m.dist(funcs[0],
args[0], vars[0],
nBins, xMin, xMax,
472 title, vars[0],
"digits",
f);
473 if (!
h)
return nullptr;
◆ Draw() [2/2]
TH2D * Interface::Draw |
( |
const TString & |
varList, |
|
|
int |
nBinsX, |
|
|
double |
xMin, |
|
|
double |
xMax, |
|
|
int |
nBinsY, |
|
|
double |
yMin, |
|
|
double |
yMax, |
|
|
const TString & |
sel = "" , |
|
|
const TString & |
opt = "" |
|
) |
| const |
Definition at line 479 of file Interface.cxx.
485 if (!
f.set(
sel))
return nullptr;
487 std::vector<TString> vars;
488 std::vector<DataFuncSet> funcs;
489 std::vector<DataFuncArgs>
args;
491 cout <<
"Invalid variable specification " <<
varList << endl;
495 TString
title = vars[1] +
" vs. " + vars[0];
498 TH2D*
h =
m.dist(funcs[0],
args[0], funcs[1],
args[1], vars[0] +
"_" + vars[1],
499 nBinsX, xMin, xMax, nBinsY, yMin, yMax,
500 title, vars[0], vars[1],
f);
501 if (!
h)
return nullptr;
◆ DrawEtaPhi()
Definition at line 534 of file Interface.cxx.
540 if (!
f.set(
sel))
return nullptr;
542 std::vector<TString> vars;
543 std::vector<DataFuncSet> funcs;
544 std::vector<DataFuncArgs>
args;
546 cout <<
"Invalid variable specification " <<
var << endl;
554 if (!
h)
return nullptr;
◆ DrawPartition()
Definition at line 507 of file Interface.cxx.
513 if (!
f.set(
sel))
return nullptr;
515 std::vector<TString> vars;
516 std::vector<DataFuncSet> funcs;
517 std::vector<DataFuncArgs>
args;
519 cout <<
"Invalid variable specification " <<
var << endl;
528 if (!
h)
return nullptr;
◆ dumpEventTuple()
bool Interface::dumpEventTuple |
( |
const TString & |
variables, |
|
|
const TString & |
fileName |
|
) |
| const |
Definition at line 785 of file Interface.cxx.
787 std::vector<float*> floatVars;
788 std::vector<int*> intVars;
789 std::vector<std::vector<float>*> floatVects;
790 std::vector<std::vector<int>*> intVects;
791 std::map<TString, unsigned int> varIndex;
793 std::vector<TString> vars;
794 std::vector<DataFuncSet> funcs;
795 std::vector<DataFuncArgs>
args;
798 cout <<
"Making trees..." << endl;
800 TFile* flatFile = TFile::Open(
fileName +
"_tmpFlatFile.root",
"RECREATE");
801 TTree* flatTree =
new TTree(
"flatTree",
"Flat tree");
803 TFile* eventFile = TFile::Open(
fileName,
"RECREATE");
804 TTree* eventTree =
new TTree(
"eventTree",
"Event tree");
806 for (
unsigned int j = 0; j < vars.size(); j++) {
807 unsigned int index = 0;
808 if (funcs[j].isNull())
return false;
809 if (funcs[j].isInt()) {
810 int* varCont =
new int(0);
811 std::vector<int>* vectCont =
new std::vector<int>();
812 index = intVars.size();
813 intVars.push_back(varCont);
814 intVects.push_back(vectCont);
815 flatTree->Branch(vars[j], varCont);
816 eventTree->Branch(vars[j], vectCont);
819 float* varCont =
new float(0);
820 std::vector<float>* vectCont =
new std::vector<float>();
821 index = floatVars.size();
822 floatVars.push_back(varCont);
823 floatVects.push_back(vectCont);
824 flatTree->Branch(vars[j], varCont);
825 eventTree->Branch(vars[j], vectCont);
827 varIndex[vars[j]] =
index;
828 cout << vars[j] <<
" -> " <<
index << endl;
830 std::map< unsigned int, std::map< unsigned int, std::vector<long long> > > runEventIndices;
831 cout <<
"Making flat ntuple" << endl;
832 unsigned int count = 0;
836 if (
count % 100 == 0) cout <<
"Processing entry " <<
count <<
" (hash = " << iter.pos() <<
"), size = " <<
hist->nData() << endl;
837 for (
unsigned int k = 0;
k <
hist->nData();
k++) {
838 for (
unsigned int j = 0; j < vars.size(); j++) {
839 if (funcs[j].isInt())
840 *intVars[varIndex[vars[j]]] =
int(funcs[j].intVal(*
hist->data(
k),
args[j]));
842 *floatVars[varIndex[vars[j]]] = funcs[j].doubleVal(*
hist->data(
k),
args[j]);
844 runEventIndices[
hist->data(
k)->run()][
hist->data(
k)->event()].push_back(flatTree->GetEntries());
849 cout <<
"Making event tuple" << endl;
851 for (
const auto&
run : runEventIndices) {
853 cout <<
"Processing run " <<
run.first <<
" (" <<
runCount <<
" of " << runEventIndices.size() <<
")" << endl;
854 unsigned int eventCount = 0;
855 for (
const auto&
event :
run.second) {
857 if (eventCount % 1000 == 0)
858 cout <<
" processing event " <<
event.first <<
" (" << eventCount <<
" of " <<
run.second.size() <<
"), size = " <<
event.second.size() << endl;
859 for (
unsigned int j = 0; j < intVects.size(); j++) intVects[j]->
clear();
860 for (
unsigned int j = 0; j < floatVects.size(); j++) floatVects[j]->
clear();
862 flatTree->GetEntry(
index);
863 for (
unsigned int j = 0; j < vars.size(); j++) {
864 if (funcs[j].isInt())
865 intVects[varIndex[vars[j]]]->push_back(*intVars[varIndex[vars[j]]]);
867 floatVects[varIndex[vars[j]]]->push_back(*floatVars[varIndex[vars[j]]]);
874 cout <<
"Writing data..." << endl;
880 cout <<
"Cleaning up..." << endl;
886 for (
unsigned int j = 0; j < intVects.size(); j++)
delete intVects[j];
887 for (
unsigned int j = 0; j < floatVects.size(); j++)
delete floatVects[j];
888 for (
unsigned int j = 0; j < intVars.size(); j++)
delete intVars[j];
889 for (
unsigned int j = 0; j < floatVars.size(); j++)
delete floatVars[j];
891 cout <<
"Done!" << endl;
◆ end()
unsigned int LArSamples::Interface::end |
( |
| ) |
const |
|
inline |
◆ eventData()
const EventData* LArSamples::Interface::eventData |
( |
unsigned int |
i | ) |
const |
|
inlinevirtual |
◆ filter() [1/2]
◆ filter() [2/2]
Definition at line 354 of file Interface.cxx.
357 if (!
f.set(
sel))
return nullptr;
360 if (!tweak.
set(tweaks))
return nullptr;
365 if (not pAccess)
return nullptr;
367 if (newFN !=
"") thisFN = std::move(newFN);
369 return filter(
f, tweak, thisFN);
◆ filterAndMerge()
bool Interface::filterAndMerge |
( |
const TString & |
listFileName, |
|
|
const TString & |
outFile, |
|
|
const TString & |
filters, |
|
|
const TString & |
tweaks = "" |
|
) |
| |
|
static |
Definition at line 284 of file Interface.cxx.
288 TObjArray*
list = filters.Tokenize(
",;");
289 if (
list->GetEntries() == 0) {
290 cout <<
"No filtering specified, exiting.";
295 for (
int k = 0;
k <
list->GetEntries();
k++) {
296 TObjString* tobs = (TObjString*)(
list->At(
k));
297 TObjArray*
items = tobs->String().Tokenize(
":");
298 if (
items->GetEntries() != 2) {
299 cout <<
"Invalid filter entry " << tobs->String() <<
", exiting." << endl;
304 TString
params = ((TObjString*)(
items->At(0)))->String();
305 TString
suffix = ((TObjString*)(
items->At(1)))->String();
308 cout <<
"---" << endl;
316 if (!tweak.
set(tweaks))
return 0;
319 if (!
multi)
return 0;
325 std::vector<MultiTreeAccessor*> filtered_mts = mt->
filterComponents(filterList, tweak);
326 if (filtered_mts.size() != filterList.
size()){
331 cout <<
"Component filtering done!" << endl;
335 for (
unsigned int f = 0;
f < filtered_mts.size();
f++) {
336 std::vector<TString>
files;
337 for (
unsigned int i = 0;
i < filtered_mts[
f]->nAccessors();
i++) {
339 cout <<
"Added " <<
files.back() << endl;
341 delete filtered_mts[
f];
344 std::vector<const Interface*> justOne;
345 justOne.push_back(filtered_multi);
◆ findEtaPhi()
HistoryIterator Interface::findEtaPhi |
( |
CaloId |
calo, |
|
|
short |
layer, |
|
|
short |
iEta, |
|
|
short |
iPhi, |
|
|
short |
region = 0 |
|
) |
| const |
◆ findFebChannel()
◆ findFTSlotChannel()
Definition at line 438 of file Interface.cxx.
444 if (
ft >= 0 &&
info->feedThrough() !=
ft)
continue;
445 if (slot >= 0 &&
info->slot() != slot)
continue;
◆ firstNeighbors()
bool Interface::firstNeighbors |
( |
unsigned int |
hash, |
|
|
std::vector< unsigned int > & |
hashes, |
|
|
short |
layer = -2 |
|
) |
| const |
Definition at line 737 of file Interface.cxx.
740 if (!
cell)
return true;
742 if (
layer < 0)
return true;
743 std::vector<unsigned int> allHashes;
751 if (
layer == -2) {
hashes = allHashes;
return true; }
752 for (
unsigned int h : allHashes) {
◆ fitMonitor()
FitMonitor LArSamples::Interface::fitMonitor |
( |
| ) |
const |
|
inline |
Definition at line 115 of file Interface.h.
115 {
return FitMonitor(*
this); }
◆ getCellHistory()
const History * Interface::getCellHistory |
( |
unsigned int |
i | ) |
const |
|
virtual |
◆ getCellInfo()
◆ highEData()
bool Interface::highEData |
( |
double |
eCut, |
|
|
TArrayI & |
hashes, |
|
|
TArrayI & |
indices |
|
) |
| const |
Definition at line 179 of file Interface.cxx.
181 std::vector<unsigned int> hashV, indexV;
182 unsigned int nTot = 0;
186 if (!history)
continue;
187 for (
unsigned int j = 0; j < history->
nData(); j++) {
190 if (
data.isDisconnected())
continue;
191 if (nTot % 10000 == 0) cout << nTot << endl;
192 if (
data.energy() > eCut) {
193 cout <<
"E = " <<
data.energy() <<
" " <<
i <<
" " << j << endl;
203 for (
unsigned int i = 0;
i < hashV.size();
i++) {
208 cout << hashV.size() <<
"/" << nTot << endl;
◆ historySize()
unsigned int LArSamples::Interface::historySize |
( |
unsigned int |
i | ) |
const |
|
inlinevirtual |
◆ isValid()
bool Interface::isValid |
( |
| ) |
const |
Definition at line 213 of file Interface.cxx.
217 if (!history)
continue;
219 cout <<
"Invalid LArSamplesHistory at hash = " <<
i << endl;
◆ makeTemplate()
◆ merge() [1/6]
Definition at line 228 of file Interface.cxx.
230 std::vector<const Interface*> interfaces;
231 interfaces.push_back(
this);
232 interfaces.push_back(&
other);
◆ merge() [2/6]
Definition at line 246 of file Interface.cxx.
248 std::vector<const Interface*> interfaces;
249 interfaces.push_back(
this);
250 interfaces.push_back(&
other);
◆ merge() [3/6]
Definition at line 237 of file Interface.cxx.
240 for (
unsigned int i = 0;
i < interfaces.size();
i++)
241 accessors.push_back(&interfaces[
i]->accessor());
◆ merge() [4/6]
Definition at line 255 of file Interface.cxx.
258 for (
unsigned int i = 0;
i < interfaces.size();
i++)
259 accessors.push_back(&interfaces[
i]->accessor());
◆ merge() [5/6]
Definition at line 265 of file Interface.cxx.
268 if (!
multi)
return nullptr;
269 std::vector<const Interface*> justOne;
270 justOne.push_back(
multi);
◆ merge() [6/6]
Definition at line 274 of file Interface.cxx.
277 if (!
multi)
return nullptr;
278 std::vector<const Interface*> justOne;
279 justOne.push_back(
multi);
◆ nChannels()
virtual unsigned int LArSamples::AbsLArCells::nChannels |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ neighbors()
bool Interface::neighbors |
( |
const CellInfo & |
cell, |
|
|
double |
dRCut, |
|
|
std::vector< unsigned int > & |
hashes |
|
) |
| const |
Definition at line 723 of file Interface.cxx.
727 if (!otherCell)
continue;
728 if (
cell.position().DeltaR(otherCell->
position()) > dRCut) {
delete otherCell;
continue; }
◆ nEvents()
unsigned int LArSamples::Interface::nEvents |
( |
| ) |
const |
|
inlinevirtual |
◆ newCellHistory()
const History * AbsLArCells::newCellHistory |
( |
unsigned int |
i | ) |
const |
|
virtualinherited |
◆ nFilledChannels()
unsigned int Interface::nFilledChannels |
( |
| ) |
const |
◆ nRuns()
unsigned int LArSamples::Interface::nRuns |
( |
| ) |
const |
|
inlinevirtual |
◆ occupancyMonitor()
Definition at line 113 of file Interface.h.
113 {
return OccupancyMonitor(*
this); }
◆ open() [1/2]
Interface * Interface::open |
( |
const std::vector< TString > & |
fileNames | ) |
|
|
static |
◆ open() [2/2]
◆ openList()
◆ openWild()
◆ pass()
◆ printFilledRanges()
void Interface::printFilledRanges |
( |
unsigned int |
skip = 0 | ) |
const |
Definition at line 142 of file Interface.cxx.
145 unsigned int nNull = 0;
147 bool ok = (
size > 0);
153 bool ok = (
size > 0);
159 cout << i1 <<
"-" << i2 << endl;
◆ refit()
◆ resetCache()
void AbsLArCells::resetCache |
( |
| ) |
const |
|
virtualinherited |
◆ resetCellInfoCache()
void AbsLArCells::resetCellInfoCache |
( |
| ) |
|
|
inherited |
◆ runData()
const RunData* LArSamples::Interface::runData |
( |
unsigned int |
i | ) |
const |
|
inlinevirtual |
◆ Scan() [1/2]
bool Interface::Scan |
( |
const TString & |
vars, |
|
|
CombinationType |
comb, |
|
|
const TString & |
sel = "" , |
|
|
const TString & |
ranges = "" , |
|
|
unsigned int |
verbosity = 1 |
|
) |
| const |
◆ Scan() [2/2]
bool Interface::Scan |
( |
const TString & |
vars, |
|
|
const TString & |
sel = "" , |
|
|
unsigned int |
verbosity = 1 |
|
) |
| const |
◆ setShapeError() [1/2]
void Interface::setShapeError |
( |
const TString & |
fileName | ) |
|
◆ setShapeError() [2/2]
void Interface::setShapeError |
( |
double |
k | ) |
|
◆ setShapeErrorGetter()
◆ shapeErrorGetter()
◆ Show() [1/2]
bool Interface::Show |
( |
const TString & |
sel = "" , |
|
|
unsigned int |
verbosity = 1 |
|
) |
| const |
Definition at line 586 of file Interface.cxx.
589 if (!
f.set(
sel))
return false;
592 if (!history)
continue;
596 if (hDesc ==
"")
continue;
597 cout << Form(
"Hash = %-5d : ",
i) << hDesc
598 <<
"-----------------------------------------------------------------------------"
◆ Show() [2/2]
bool Interface::Show |
( |
unsigned int |
hash, |
|
|
unsigned int |
verbosity = 1 |
|
) |
| const |
◆ ShowEvents()
bool Interface::ShowEvents |
( |
const TString & |
sel = "" , |
|
|
unsigned int |
verbosity = 1 |
|
) |
| const |
Definition at line 605 of file Interface.cxx.
608 if (!
f.set(
sel))
return false;
609 std::map< std::pair<unsigned int, unsigned int>,
unsigned int > eventCells;
610 std::map< std::pair<unsigned int, unsigned int>,
double > eventEnergy;
614 if ((
i+1) % 50000 == 0) cout <<
"Cell # " <<
i+1 <<
"/" <<
nChannels() << endl;
616 if (!history)
continue;
617 for (
unsigned int j = 0; j < history->
nData(); j++) {
618 std::pair<unsigned int, unsigned int>
ev = std::make_pair(history->
data(j)->
run(), history->
data(j)->
event());
624 for (
unsigned int i = 0;
i <
nEvents();
i++) {
626 std::pair<unsigned int, unsigned int>
id(evtData->
run(), evtData->
event());
629 printout += Form(
" : %6d LAr hits, %7.1f MeV", eventCells[
id], eventEnergy[
id]);
630 cout << printout << endl;
◆ ShowRuns()
bool Interface::ShowRuns |
( |
unsigned int |
verbosity = 1 | ) |
const |
Definition at line 637 of file Interface.cxx.
639 std::map<unsigned int, unsigned int>
events;
646 for (
unsigned int i = 0;
i <
nRuns();
i++) {
650 printout += Form(
" : %6d events",
events[rData->
run()]);
651 cout << printout << endl;
◆ ShowStats()
bool Interface::ShowStats |
( |
const TString & |
varList, |
|
|
const TString & |
sel = "" , |
|
|
bool |
withErrors = false |
|
) |
| const |
Definition at line 658 of file Interface.cxx.
662 if (!
f.set(
sel))
return 0;
664 std::vector<TString> vars;
665 std::vector<DataFuncSet> funcs;
666 std::vector<DataFuncArgs>
args;
668 cout <<
"Invalid variable specification " <<
varList << endl;
672 TVectorD
mean(vars.size()), meanErr(vars.size());
673 TMatrixD
covMatrix(vars.size(), vars.size()), covMatrixErr(vars.size(), vars.size());
677 cout <<
"---------------------------" << endl;
678 for (
unsigned int i = 0;
i < vars.size();
i++)
679 cout << Form(
"| %10s | %-9.4g |", vars[
i].
Data(),
mean(
i)) << endl;
680 cout <<
"---------------------------" << endl << endl;
683 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
" |";
684 cout << endl <<
"--------------";
685 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
"-------------";
687 for (
unsigned int i1 = 0; i1 < vars.size(); i1++) {
688 cout << Form(
"| %10s |", vars[i1].
Data());
689 for (
unsigned int i2 = 0; i2 < vars.size(); i2++)
690 cout << Form(
" %-9.4g |",
covMatrix(i1, i2));
693 cout <<
"--------------";
694 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
"-------------";
698 cout <<
"---------------------------" << endl;
699 for (
unsigned int i = 0;
i < vars.size();
i++)
700 cout << Form(
"| %10s | %-9.4g +/- %-9.4g |", vars[
i].
Data(),
mean(
i), meanErr(
i)) << endl;
701 cout <<
"---------------------------" << endl << endl;
704 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
" |";
705 cout << endl <<
"--------------";
706 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
"---------------------------";
708 for (
unsigned int i1 = 0; i1 < vars.size(); i1++) {
709 cout << Form(
"| %10s |", vars[i1].
Data());
710 for (
unsigned int i2 = 0; i2 < vars.size(); i2++)
711 cout << Form(
" %-9.4g +/- %-9.4g |",
covMatrix(i1, i2), covMatrixErr(i1, i2));
714 cout <<
"--------------";
715 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
"---------------------------";
◆ size()
unsigned int Interface::size |
( |
| ) |
const |
◆ writeToFile()
bool LArSamples::Interface::writeToFile |
( |
const TString & |
fileName | ) |
const |
|
inlinevirtual |
◆ m_accessor
◆ m_cellCache
◆ m_cellInfoCache
std::vector<CellInfo*> LArSamples::AbsLArCells::m_cellInfoCache |
|
mutableprivateinherited |
◆ m_neighborCache
std::vector<std::vector<unsigned int>*> LArSamples::Interface::m_neighborCache |
|
mutableprivate |
◆ m_neighborHistories
std::vector<const History*> LArSamples::Interface::m_neighborHistories |
|
mutableprivate |
◆ m_neighborHistoryPos
std::vector<unsigned int> LArSamples::Interface::m_neighborHistoryPos |
|
mutableprivate |
◆ m_ownShapeErrorGetter
bool LArSamples::Interface::m_ownShapeErrorGetter |
|
private |
◆ m_pos
unsigned int LArSamples::AbsLArCells::m_pos |
|
mutableprivateinherited |
◆ m_shapeErrorGetter
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
TString description(unsigned int verbosity) const
unsigned int nRuns() const
const Data * data_for_event(int event, int run=-1) const
static MultiTreeAccessor * openList(const TString &fileList)
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 bool matchCalo(CaloId id, CaloId idSpec)
virtual const History * newCellHistory(unsigned int i) const
void setRefit(bool refit=true)
virtual bool writeToFile(const TString &fileName) const =0
const CellInfo * cellInfo() const
virtual const History * cellHistory(unsigned int i) const
bool inInterval(const cool::ValidityKey n, const cool::ValidityKey from, const cool::ValidityKey to)
std::pair< long int, long int > indices
std::vector< MultiTreeAccessor * > filterComponents(const FilterList &filterList, const DataTweaker &tweaker) const
unsigned int nEvents() const
std::vector< CellInfo * > m_cellInfoCache
unsigned int size() const
bool neighbors(const CellInfo &cell, double dRCut, std::vector< unsigned int > &hashes) const
Interface(const Accessor &accessor)
Constructor
static TString str(CaloId id)
const History * cellHistory(unsigned int i) const
virtual const CellInfo * cellInfo(unsigned int i) const
static TString addSuffix(const TString &fileName, const TString &suffix)
bool m_ownShapeErrorGetter
History * filter(const TString &cuts) const
std::vector< std::vector< unsigned int > * > m_neighborCache
virtual const EventData * eventData(unsigned int i) const =0
static MultiTreeAccessor * open(const std::vector< TString > &files)
void add(const FilterParams ¶ms, const TString &fileName)
virtual unsigned int historySize(unsigned int i) const =0
const Data * data(unsigned int i) const
void setInterface(const Interface *interface) const
const Accessor & accessor() const
static bool parseVariables(TString varStr, std::vector< TString > &vars, std::vector< DataFuncSet > &funcs, std::vector< DataFuncArgs > &args)
TVector3 position() const
static const unsigned int nChannels
POOL::TEvent event(POOL::TEvent::kClassAccess)
std::vector< const History * > m_neighborHistories
virtual const RunData * runData(unsigned int i) const =0
static MultiTreeAccessor * openWild(const TString &wcName)
virtual const CellInfo * getCellInfo(unsigned int i) const
std::vector< unsigned int > m_neighborHistoryPos
void setShapeErrorGetter(const AbsShapeErrorGetter *err) const
const EventData * eventData(unsigned int i) const
static TreeAccessor * makeTemplate(const Accessor &accessor, const TString &fileName)
storage of the time histories of all the cells
virtual const History * getCellHistory(unsigned int i) const =0
unsigned int nData() const
const AbsShapeErrorGetter * m_shapeErrorGetter
static TreeAccessor * merge(const std::vector< const Accessor * > &accessors, const TString &fileName="")
void setFitParams(Chi2Params params)
outFile
Comment Out Those You do not wish to run.
const History * pass(unsigned int i, const FilterParams &f) const
const CellInfo * cellInfoCache(unsigned int i) const
static Interface * open(const TString &fileName)
const History * m_cellCache
Interface * merge(const Interface &other, const TString &fileName) const
static TreeAccessor * filter(const Accessor &accessor, const FilterParams &filterParams, const TString &fileName, const DataTweaker &tweaker)
const Accessor * m_accessor
virtual unsigned int nEvents() const =0
bool set(const TString &tweaks)
void setShapeErrorGetter(const AbsShapeErrorGetter *err)
bool data(const std::vector< unsigned int > &hashes, const EventData &event, std::vector< const Data * > &data) const
TString description(unsigned int verbosity=1) const
static Interface * openList(const TString &fileList)
Interface * filter(const TString &sel, const TString &fileName, const TString &tweaks="") const
unsigned int size() const
setScale setgFexType iEta
HistoryIterator begin(unsigned int pos=0, double eMin=-1, double adcMaxMin=-1) const
virtual unsigned int nChannels() const
virtual unsigned int nRuns() const =0
TString description(unsigned int verbosity) const
static TreeAccessor * open(const TString &fileName)
const RunData * runData(unsigned int i) const