|
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 760 of file Interface.cxx.
775 if (!history)
continue;
777 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 452 of file Interface.cxx.
456 if (!
f.set(
sel))
return nullptr;
458 std::vector<TString> vars;
459 std::vector<DataFuncSet> funcs;
460 std::vector<DataFuncArgs>
args;
462 cout <<
"Invalid variable specification " <<
var << endl;
466 TString
title = vars[0];
469 TH1D*
h =
m.dist(funcs[0],
args[0], vars[0],
nBins, xMin, xMax,
470 title, vars[0],
"digits",
f);
471 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 477 of file Interface.cxx.
483 if (!
f.set(
sel))
return nullptr;
485 std::vector<TString> vars;
486 std::vector<DataFuncSet> funcs;
487 std::vector<DataFuncArgs>
args;
489 cout <<
"Invalid variable specification " <<
varList << endl;
493 TString
title = vars[1] +
" vs. " + vars[0];
496 TH2D*
h =
m.dist(funcs[0],
args[0], funcs[1],
args[1], vars[0] +
"_" + vars[1],
497 nBinsX, xMin, xMax, nBinsY, yMin, yMax,
498 title, vars[0], vars[1],
f);
499 if (!
h)
return nullptr;
◆ DrawEtaPhi()
Definition at line 532 of file Interface.cxx.
538 if (!
f.set(
sel))
return nullptr;
540 std::vector<TString> vars;
541 std::vector<DataFuncSet> funcs;
542 std::vector<DataFuncArgs>
args;
544 cout <<
"Invalid variable specification " <<
var << endl;
552 if (!
h)
return nullptr;
◆ DrawPartition()
Definition at line 505 of file Interface.cxx.
511 if (!
f.set(
sel))
return nullptr;
513 std::vector<TString> vars;
514 std::vector<DataFuncSet> funcs;
515 std::vector<DataFuncArgs>
args;
517 cout <<
"Invalid variable specification " <<
var << endl;
526 if (!
h)
return nullptr;
◆ dumpEventTuple()
bool Interface::dumpEventTuple |
( |
const TString & |
variables, |
|
|
const TString & |
fileName |
|
) |
| const |
Definition at line 783 of file Interface.cxx.
785 std::vector<float*> floatVars;
786 std::vector<int*> intVars;
787 std::vector<std::vector<float>*> floatVects;
788 std::vector<std::vector<int>*> intVects;
789 std::map<TString, unsigned int> varIndex;
791 std::vector<TString> vars;
792 std::vector<DataFuncSet> funcs;
793 std::vector<DataFuncArgs>
args;
796 cout <<
"Making trees..." << endl;
798 TFile* flatFile = TFile::Open(
fileName +
"_tmpFlatFile.root",
"RECREATE");
799 TTree* flatTree =
new TTree(
"flatTree",
"Flat tree");
801 TFile* eventFile = TFile::Open(
fileName,
"RECREATE");
802 TTree* eventTree =
new TTree(
"eventTree",
"Event tree");
804 for (
unsigned int j = 0; j < vars.size(); j++) {
805 unsigned int index = 0;
806 if (funcs[j].isNull())
return false;
807 if (funcs[j].isInt()) {
808 int* varCont =
new int(0);
809 std::vector<int>* vectCont =
new std::vector<int>();
810 index = intVars.size();
811 intVars.push_back(varCont);
812 intVects.push_back(vectCont);
813 flatTree->Branch(vars[j], varCont);
814 eventTree->Branch(vars[j], vectCont);
817 float* varCont =
new float(0);
818 std::vector<float>* vectCont =
new std::vector<float>();
819 index = floatVars.size();
820 floatVars.push_back(varCont);
821 floatVects.push_back(vectCont);
822 flatTree->Branch(vars[j], varCont);
823 eventTree->Branch(vars[j], vectCont);
825 varIndex[vars[j]] =
index;
826 cout << vars[j] <<
" -> " <<
index << endl;
828 std::map< unsigned int, std::map< unsigned int, std::vector<long long> > > runEventIndices;
829 cout <<
"Making flat ntuple" << endl;
830 unsigned int count = 0;
834 if (
count % 100 == 0) cout <<
"Processing entry " <<
count <<
" (hash = " << iter.pos() <<
"), size = " <<
hist->nData() << endl;
835 for (
unsigned int k = 0;
k <
hist->nData();
k++) {
836 for (
unsigned int j = 0; j < vars.size(); j++) {
837 if (funcs[j].isInt())
838 *intVars[varIndex[vars[j]]] =
int(funcs[j].intVal(*
hist->data(
k),
args[j]));
840 *floatVars[varIndex[vars[j]]] = funcs[j].doubleVal(*
hist->data(
k),
args[j]);
842 runEventIndices[
hist->data(
k)->run()][
hist->data(
k)->event()].push_back(flatTree->GetEntries());
847 cout <<
"Making event tuple" << endl;
849 for (
const auto&
run : runEventIndices) {
851 cout <<
"Processing run " <<
run.first <<
" (" <<
runCount <<
" of " << runEventIndices.size() <<
")" << endl;
852 unsigned int eventCount = 0;
853 for (
const auto&
event :
run.second) {
855 if (eventCount % 1000 == 0)
856 cout <<
" processing event " <<
event.first <<
" (" << eventCount <<
" of " <<
run.second.size() <<
"), size = " <<
event.second.size() << endl;
857 for (
unsigned int j = 0; j < intVects.size(); j++) intVects[j]->
clear();
858 for (
unsigned int j = 0; j < floatVects.size(); j++) floatVects[j]->
clear();
860 flatTree->GetEntry(
index);
861 for (
unsigned int j = 0; j < vars.size(); j++) {
862 if (funcs[j].isInt())
863 intVects[varIndex[vars[j]]]->push_back(*intVars[varIndex[vars[j]]]);
865 floatVects[varIndex[vars[j]]]->push_back(*floatVars[varIndex[vars[j]]]);
872 cout <<
"Writing data..." << endl;
878 cout <<
"Cleaning up..." << endl;
884 for (
unsigned int j = 0; j < intVects.size(); j++)
delete intVects[j];
885 for (
unsigned int j = 0; j < floatVects.size(); j++)
delete floatVects[j];
886 for (
unsigned int j = 0; j < intVars.size(); j++)
delete intVars[j];
887 for (
unsigned int j = 0; j < floatVars.size(); j++)
delete floatVars[j];
889 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 352 of file Interface.cxx.
355 if (!
f.set(
sel))
return nullptr;
358 if (!tweak.
set(tweaks))
return nullptr;
363 if (not pAccess)
return nullptr;
365 if (newFN !=
"") thisFN = std::move(newFN);
367 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 282 of file Interface.cxx.
286 TObjArray*
list = filters.Tokenize(
",;");
287 if (
list->GetEntries() == 0) {
288 cout <<
"No filtering specified, exiting.";
293 for (
int k = 0;
k <
list->GetEntries();
k++) {
294 TObjString* tobs = (TObjString*)(
list->At(
k));
295 TObjArray*
items = tobs->String().Tokenize(
":");
296 if (
items->GetEntries() != 2) {
297 cout <<
"Invalid filter entry " << tobs->String() <<
", exiting." << endl;
302 TString
params = ((TObjString*)(
items->At(0)))->String();
303 TString
suffix = ((TObjString*)(
items->At(1)))->String();
306 cout <<
"---" << endl;
314 if (!tweak.
set(tweaks))
return 0;
317 if (!
multi)
return 0;
323 std::vector<MultiTreeAccessor*> filtered_mts = mt->
filterComponents(filterList, tweak);
324 if (filtered_mts.size() != filterList.
size()){
329 cout <<
"Component filtering done!" << endl;
333 for (
unsigned int f = 0;
f < filtered_mts.size();
f++) {
334 std::vector<TString>
files;
335 for (
unsigned int i = 0;
i < filtered_mts[
f]->nAccessors();
i++) {
337 cout <<
"Added " <<
files.back() << endl;
339 delete filtered_mts[
f];
342 std::vector<const Interface*> justOne;
343 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 436 of file Interface.cxx.
442 if (
ft >= 0 &&
info->feedThrough() !=
ft)
continue;
443 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 735 of file Interface.cxx.
738 if (!
cell)
return true;
740 if (
layer < 0)
return true;
741 std::vector<unsigned int> allHashes;
749 if (
layer == -2) {
hashes = allHashes;
return true; }
750 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 177 of file Interface.cxx.
179 std::vector<unsigned int> hashV, indexV;
180 unsigned int nTot = 0;
184 if (!history)
continue;
185 for (
unsigned int j = 0; j < history->
nData(); j++) {
188 if (
data.isDisconnected())
continue;
189 if (nTot % 10000 == 0) cout << nTot << endl;
190 if (
data.energy() > eCut) {
191 cout <<
"E = " <<
data.energy() <<
" " <<
i <<
" " << j << endl;
201 for (
unsigned int i = 0;
i < hashV.size();
i++) {
206 cout << hashV.size() <<
"/" << nTot << endl;
◆ historySize()
unsigned int LArSamples::Interface::historySize |
( |
unsigned int |
i | ) |
const |
|
inlinevirtual |
◆ isValid()
bool Interface::isValid |
( |
| ) |
const |
Definition at line 211 of file Interface.cxx.
215 if (!history)
continue;
217 cout <<
"Invalid LArSamplesHistory at hash = " <<
i << endl;
◆ makeTemplate()
◆ merge() [1/6]
Definition at line 226 of file Interface.cxx.
228 std::vector<const Interface*> interfaces;
229 interfaces.push_back(
this);
230 interfaces.push_back(&
other);
◆ merge() [2/6]
Definition at line 244 of file Interface.cxx.
246 std::vector<const Interface*> interfaces;
247 interfaces.push_back(
this);
248 interfaces.push_back(&
other);
◆ merge() [3/6]
Definition at line 235 of file Interface.cxx.
238 for (
unsigned int i = 0;
i < interfaces.size();
i++)
239 accessors.push_back(&interfaces[
i]->accessor());
◆ merge() [4/6]
Definition at line 253 of file Interface.cxx.
256 for (
unsigned int i = 0;
i < interfaces.size();
i++)
257 accessors.push_back(&interfaces[
i]->accessor());
◆ merge() [5/6]
Definition at line 263 of file Interface.cxx.
266 if (!
multi)
return nullptr;
267 std::vector<const Interface*> justOne;
268 justOne.push_back(
multi);
◆ merge() [6/6]
Definition at line 272 of file Interface.cxx.
275 if (!
multi)
return nullptr;
276 std::vector<const Interface*> justOne;
277 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 721 of file Interface.cxx.
725 if (!otherCell)
continue;
726 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 140 of file Interface.cxx.
143 unsigned int nNull = 0;
145 bool ok = (
size > 0);
151 bool ok = (
size > 0);
157 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 584 of file Interface.cxx.
587 if (!
f.set(
sel))
return false;
590 if (!history)
continue;
594 if (hDesc ==
"")
continue;
595 cout << Form(
"Hash = %-5d : ",
i) << hDesc
596 <<
"-----------------------------------------------------------------------------"
◆ 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 603 of file Interface.cxx.
606 if (!
f.set(
sel))
return false;
607 std::map< std::pair<unsigned int, unsigned int>,
unsigned int > eventCells;
608 std::map< std::pair<unsigned int, unsigned int>,
double > eventEnergy;
612 if ((
i+1) % 50000 == 0) cout <<
"Cell # " <<
i+1 <<
"/" <<
nChannels() << endl;
614 if (!history)
continue;
615 for (
unsigned int j = 0; j < history->
nData(); j++) {
616 std::pair<unsigned int, unsigned int>
ev = std::make_pair(history->
data(j)->
run(), history->
data(j)->
event());
622 for (
unsigned int i = 0;
i <
nEvents();
i++) {
624 std::pair<unsigned int, unsigned int>
id(evtData->
run(), evtData->
event());
627 printout += Form(
" : %6d LAr hits, %7.1f MeV", eventCells[
id], eventEnergy[
id]);
628 cout << printout << endl;
◆ ShowRuns()
bool Interface::ShowRuns |
( |
unsigned int |
verbosity = 1 | ) |
const |
Definition at line 635 of file Interface.cxx.
637 std::map<unsigned int, unsigned int>
events;
644 for (
unsigned int i = 0;
i <
nRuns();
i++) {
648 printout += Form(
" : %6d events",
events[rData->
run()]);
649 cout << printout << endl;
◆ ShowStats()
bool Interface::ShowStats |
( |
const TString & |
varList, |
|
|
const TString & |
sel = "" , |
|
|
bool |
withErrors = false |
|
) |
| const |
Definition at line 656 of file Interface.cxx.
660 if (!
f.set(
sel))
return 0;
662 std::vector<TString> vars;
663 std::vector<DataFuncSet> funcs;
664 std::vector<DataFuncArgs>
args;
666 cout <<
"Invalid variable specification " <<
varList << endl;
670 TVectorD
mean(vars.size()), meanErr(vars.size());
671 TMatrixD
covMatrix(vars.size(), vars.size()), covMatrixErr(vars.size(), vars.size());
675 cout <<
"---------------------------" << endl;
676 for (
unsigned int i = 0;
i < vars.size();
i++)
677 cout << Form(
"| %10s | %-9.4g |", vars[
i].
Data(),
mean(
i)) << endl;
678 cout <<
"---------------------------" << endl << endl;
681 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
" |";
682 cout << endl <<
"--------------";
683 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
"-------------";
685 for (
unsigned int i1 = 0; i1 < vars.size(); i1++) {
686 cout << Form(
"| %10s |", vars[i1].
Data());
687 for (
unsigned int i2 = 0; i2 < vars.size(); i2++)
688 cout << Form(
" %-9.4g |",
covMatrix(i1, i2));
691 cout <<
"--------------";
692 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
"-------------";
696 cout <<
"---------------------------" << endl;
697 for (
unsigned int i = 0;
i < vars.size();
i++)
698 cout << Form(
"| %10s | %-9.4g +/- %-9.4g |", vars[
i].
Data(),
mean(
i), meanErr(
i)) << endl;
699 cout <<
"---------------------------" << endl << endl;
702 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
" |";
703 cout << endl <<
"--------------";
704 for (
unsigned int i = 0;
i < vars.size();
i++) cout <<
"---------------------------";
706 for (
unsigned int i1 = 0; i1 < vars.size(); i1++) {
707 cout << Form(
"| %10s |", vars[i1].
Data());
708 for (
unsigned int i2 = 0; i2 < vars.size(); i2++)
709 cout << Form(
" %-9.4g +/- %-9.4g |",
covMatrix(i1, i2), covMatrixErr(i1, i2));
712 cout <<
"--------------";
713 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