ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
LArSamples::Interface Class Reference

#include <Interface.h>

Inheritance diagram for LArSamples::Interface:
Collaboration diagram for LArSamples::Interface:

Public Member Functions

 Interface (const Accessor &accessor)
 Constructor
More...
 
virtual ~Interface ()
 
unsigned int nEvents () const
 
unsigned int nRuns () const
 
const EventDataeventData (unsigned int i) const
 
const RunDatarunData (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
 
Interfacemerge (const Interface &other, const TString &fileName) const
 
Interfacemerge (const Interface &other, const TString &fileName, const TString &LBFile) const
 
Interfacefilter (const TString &sel, const TString &fileName, const TString &tweaks="") const
 
Interfacefilter (const FilterParams &filterParams, const DataTweaker &tweaker, const TString &fileName) const
 
InterfacemakeTemplate (const TString &fileName) const
 
Interfacerefit (const TString &newFileName, Chi2Params pars=DefaultChi2) const
 
const Accessoraccessor () 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 AbsShapeErrorGettershapeErrorGetter () const
 
bool writeToFile (const TString &fileName) const
 
const HistorycellHistory (unsigned int i) const
 
const HistorygetCellHistory (unsigned int i) const
 
const CellInfogetCellInfo (unsigned int i) const
 
virtual const HistorynewCellHistory (unsigned int i) const
 
virtual const CellInfocellInfo (unsigned int i) const
 
virtual unsigned int nChannels () const
 
virtual void resetCache () const
 
const CellInfocellInfoCache (unsigned int i) const
 
const Historypass (unsigned int i, const FilterParams &f) const
 
const HistorycellCache () const
 
unsigned int cachePos () const
 
void resetCellInfoCache ()
 

Static Public Member Functions

static Interfaceopen (const TString &fileName)
 
static Interfaceopen (const std::vector< TString > &fileNames)
 
static InterfaceopenList (const TString &fileList)
 
static InterfaceopenWild (const TString &wcName)
 
static Interfacemerge (const std::vector< const Interface * > &interfaces, const TString &fileName)
 
static Interfacemerge (const std::vector< const Interface * > &interfaces, const TString &fileName, const TString &LBFile)
 
static Interfacemerge (const TString &listFileName, const TString &fileName)
 
static Interfacemerge (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)
 

Private Attributes

const Accessorm_accessor
 
const AbsShapeErrorGetterm_shapeErrorGetter
 
bool m_ownShapeErrorGetter
 
std::vector< std::vector< unsigned int > * > m_neighborCache
 
std::vector< unsigned int > m_neighborHistoryPos
 
std::vector< const History * > m_neighborHistories
 
unsigned int m_pos
 
const Historym_cellCache
 
std::vector< CellInfo * > m_cellInfoCache
 

Detailed Description

Definition at line 36 of file Interface.h.

Constructor & Destructor Documentation

◆ Interface()

LArSamples::Interface::Interface ( const Accessor accessor)
inline

Constructor

Definition at line 41 of file Interface.h.

◆ ~Interface()

Interface::~Interface ( )
virtual

Definition at line 63 of file Interface.cxx.

64 {
66  delete m_accessor;
67 
68  for (std::vector<unsigned int>* neighbors : m_neighborCache)
69  delete neighbors;
70 }

Member Function Documentation

◆ accessor()

const Accessor& LArSamples::Interface::accessor ( ) const
inline

Definition at line 93 of file Interface.h.

93 { return *m_accessor; }

◆ addSuffix()

TString Interface::addSuffix ( const TString &  fileName,
const TString &  suffix 
)
static

Definition at line 373 of file Interface.cxx.

374 {
375  TString rootName = fileName;
376  if (fileName(fileName.Length() - 5, 5) == ".root") rootName = fileName(0, fileName.Length() - 5);
377 
378  return rootName + "_" + suffix + ".root";
379 }

◆ begin()

HistoryIterator Interface::begin ( unsigned int  pos = 0,
double  eMin = -1,
double  adcMaxMin = -1 
) const

Definition at line 173 of file Interface.cxx.

174 {
175  return HistoryIterator(*this, pos, eMin, adcMaxMin);
176 }

◆ cachePos()

unsigned int LArSamples::AbsLArCells::cachePos ( ) const
inlineinherited

Definition at line 45 of file AbsLArCells.h.

45 { return m_pos; }

◆ cellCache()

const History* LArSamples::AbsLArCells::cellCache ( ) const
inlineinherited

Definition at line 44 of file AbsLArCells.h.

44 { return m_cellCache; }

◆ cellHistory()

const History * Interface::cellHistory ( unsigned int  i) const
virtual

Reimplemented from LArSamples::AbsLArCells.

Definition at line 116 of file Interface.cxx.

117 {
118  const History* history = accessor().cellHistory(i);
119  if (history) {
121  history->setInterface(this);
122  }
123  return history;
124 }

◆ cellInfo()

const CellInfo * AbsLArCells::cellInfo ( unsigned int  i) const
virtualinherited

Definition at line 71 of file AbsLArCells.cxx.

72 {
73  const CellInfo* info = cellInfoCache(i);
74  if (info) return (info->isValid() ? new CellInfo(*info) : nullptr);
75  info = getCellInfo(i);
76  if (info) m_cellInfoCache[i] = new CellInfo(*info, false);
77  //m_cellInfoCache[i] = (info ? new CellInfo(*info, false) : new CellInfo());
78  return info;
79 }

◆ cellInfoCache()

const CellInfo * AbsLArCells::cellInfoCache ( unsigned int  i) const
inherited

Definition at line 82 of file AbsLArCells.cxx.

83 {
84  return m_cellInfoCache[i];
85 }

◆ data()

bool Interface::data ( const std::vector< unsigned int > &  hashes,
const EventData event,
std::vector< const Data * > &  data 
) const

Definition at line 762 of file Interface.cxx.

763 {
764  if (hashes != m_neighborHistoryPos) {
765  for (const History* history : m_neighborHistories)
766  delete history;
767  m_neighborHistories.clear();
768  m_neighborHistoryPos.clear();
769  for (std::vector<unsigned int>::const_iterator hash = hashes.begin(); hash != hashes.end(); ++hash) {
770  const History* history = AbsLArCells::newCellHistory(*hash);// bypasses history caching in order not to invalidate cell
771  m_neighborHistories.push_back(history);
772  m_neighborHistoryPos.push_back(*hash);
773  }
774  }
775 
776  for (const History* history : m_neighborHistories) {
777  if (!history) continue;
778  const Data* dataForEvent = history->data_for_event(event);
779  if (dataForEvent) data.push_back(new Data(*dataForEvent));
780  }
781  return true;
782 }

◆ digitMonitor()

DigitMonitor LArSamples::Interface::digitMonitor ( ) const
inline

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.

455 {
456  MonitorBase m(*this);
457  FilterParams f;
458  if (!f.set(sel)) return nullptr;
459 
460  std::vector<TString> vars;
461  std::vector<DataFuncSet> funcs;
462  std::vector<DataFuncArgs> args;
463  if (!MonitorBase::parseVariables(var, vars, funcs, args) || funcs.size() != 1) {
464  cout << "Invalid variable specification " << var << endl;
465  return nullptr;
466  }
467 
468  TString title = vars[0];
469  if (TString(sel) != "") title = title + ", " + sel;
470 
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;
474  h->Draw(opt);
475  return h;
476 }

◆ 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.

482 {
483  MonitorBase m(*this);
484  FilterParams f;
485  if (!f.set(sel)) return nullptr;
486 
487  std::vector<TString> vars;
488  std::vector<DataFuncSet> funcs;
489  std::vector<DataFuncArgs> args;
490  if (!MonitorBase::parseVariables(varList, vars, funcs, args) || funcs.size() != 2) {
491  cout << "Invalid variable specification " << varList << endl;
492  return nullptr;
493  }
494 
495  TString title = vars[1] + " vs. " + vars[0];
496 
497  if (TString(sel) != "") title = title + ", " + sel;
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;
502  h->Draw(opt);
503  return h;
504 }

◆ DrawEtaPhi()

TH2D * Interface::DrawEtaPhi ( CaloId  calo,
short  layer,
const TString &  var,
const TString &  sel = "",
const TString &  opt = "",
CombinationType  comb = TotalValue 
) const

Definition at line 534 of file Interface.cxx.

537 {
538  MonitorBase m(*this);
539  FilterParams f;
540  if (!f.set(sel)) return nullptr;
541 
542  std::vector<TString> vars;
543  std::vector<DataFuncSet> funcs;
544  std::vector<DataFuncArgs> args;
545  if (!MonitorBase::parseVariables(var, vars, funcs, args) || funcs.size() != 1) {
546  cout << "Invalid variable specification " << var << endl;
547  return nullptr;
548  }
549  TString title = var;
550  title += Form(", %s, layer %d", Id::str(calo).Data(), layer);
551  if (TString(sel) != "") title = title + ", " + sel;
552 
553  TH2D* h = m.etaPhiMap(funcs[0], args[0], var, calo, layer, title, comb, f);
554  if (!h) return nullptr;
555  h->Draw(opt);
556  return h;
557 }

◆ DrawPartition()

TH2D * Interface::DrawPartition ( PartitionId  partition,
const TString &  var,
const TString &  sel = "",
const TString &  opt = "",
CombinationType  comb = TotalValue 
) const

Definition at line 507 of file Interface.cxx.

510 {
511  MonitorBase m(*this);
512  FilterParams f;
513  if (!f.set(sel)) return nullptr;
514 
515  std::vector<TString> vars;
516  std::vector<DataFuncSet> funcs;
517  std::vector<DataFuncArgs> args;
518  if (!MonitorBase::parseVariables(var, vars, funcs, args) || funcs.size() != 1) {
519  cout << "Invalid variable specification " << var << endl;
520  return nullptr;
521  }
522 
523  TString title = var;
524  title = title + ", " + Id::str(partition);
525  if (TString(sel) != "") title = title + ", " + sel;
526 
527  TH2D* h = m.partitionMap(funcs[0], args[0], var, partition, title, comb, f);
528  if (!h) return nullptr;
529  h->Draw(opt);
530  return h;
531 }

◆ dumpEventTuple()

bool Interface::dumpEventTuple ( const TString &  variables,
const TString &  fileName 
) const

Definition at line 785 of file Interface.cxx.

786 {
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;
792 
793  std::vector<TString> vars;
794  std::vector<DataFuncSet> funcs;
795  std::vector<DataFuncArgs> args;
796  if (!MonitorBase::parseVariables(variables, vars, funcs, args)) return false;
797 
798  cout << "Making trees..." << endl;
799 
800  TFile* flatFile = TFile::Open(fileName + "_tmpFlatFile.root", "RECREATE");
801  TTree* flatTree = new TTree("flatTree", "Flat tree");
802 
803  TFile* eventFile = TFile::Open(fileName, "RECREATE");
804  TTree* eventTree = new TTree("eventTree", "Event tree");
805 
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);
817  }
818  else {
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);
826  }
827  varIndex[vars[j]] = index;
828  cout << vars[j] << " -> " << index << endl;
829  }
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;
833  for (HistoryIterator iter = begin(); iter.isValid(); iter.next()) {
834  const History* hist = iter.history();
835  count++;
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]));
841  else
842  *floatVars[varIndex[vars[j]]] = funcs[j].doubleVal(*hist->data(k), args[j]);
843  }
844  runEventIndices[hist->data(k)->run()][hist->data(k)->event()].push_back(flatTree->GetEntries());
845  flatTree->Fill();
846  }
847  }
848 
849  cout << "Making event tuple" << endl;
850  unsigned int runCount = 0;
851  for (const auto& run : runEventIndices) {
852  runCount++;
853  cout << "Processing run " << run.first << " (" << runCount << " of " << runEventIndices.size() << ")" << endl;
854  unsigned int eventCount = 0;
855  for (const auto& event : run.second) {
856  eventCount++;
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();
861  for (long long index : event.second) {
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]]]);
866  else
867  floatVects[varIndex[vars[j]]]->push_back(*floatVars[varIndex[vars[j]]]);
868  }
869  }
870  eventTree->Fill();
871  }
872  }
873 
874  cout << "Writing data..." << endl;
875  flatFile->cd();
876  flatTree->Write();
877  eventFile->cd();
878  eventTree->Write();
879 
880  cout << "Cleaning up..." << endl;
881  delete eventTree;
882  delete eventFile;
883 
884  delete flatTree;
885  delete flatFile;
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];
890 
891  cout << "Done!" << endl;
892  return true;
893 }

◆ end()

unsigned int LArSamples::Interface::end ( ) const
inline

Definition at line 60 of file Interface.h.

60 { return nChannels(); }

◆ eventData()

const EventData* LArSamples::Interface::eventData ( unsigned int  i) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 54 of file Interface.h.

54 { return accessor().eventData(i); }

◆ filter() [1/2]

Interface * Interface::filter ( const FilterParams filterParams,
const DataTweaker tweaker,
const TString &  fileName 
) const

Definition at line 382 of file Interface.cxx.

383 {
384  TreeAccessor* newAcc = TreeAccessor::filter(accessor(), filterParams, fileName, tweaker);
385  return new Interface(*newAcc);
386 }

◆ filter() [2/2]

Interface * Interface::filter ( const TString &  sel,
const TString &  fileName,
const TString &  tweaks = "" 
) const

Definition at line 354 of file Interface.cxx.

355 {
356  FilterParams f;
357  if (!f.set(sel)) return nullptr;
358 
359  DataTweaker tweak;
360  if (!tweak.set(tweaks)) return nullptr;
361 
362  TString thisFN = fileName;
363  if (thisFN.Index(".root") < 0 && dynamic_cast<const TreeAccessor*>(&accessor())) {
364  auto pAccess = dynamic_cast<const TreeAccessor*>(&accessor());
365  if (not pAccess) return nullptr;
366  TString newFN = addSuffix(pAccess->fileName(), fileName);
367  if (newFN != "") thisFN = std::move(newFN);
368  }
369  return filter(f, tweak, thisFN);
370 }

◆ 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.

285 {
286  FilterList filterList;
287 
288  TObjArray* list = filters.Tokenize(",;");
289  if (list->GetEntries() == 0) {
290  cout << "No filtering specified, exiting.";
291  delete list;
292  return 0;
293  }
294 
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;
300  delete list;
301  delete items;
302  return 0;
303  }
304  TString params = ((TObjString*)(items->At(0)))->String();
305  TString suffix = ((TObjString*)(items->At(1)))->String();
306  FilterParams f;
307  if (!f.set(params)) return 0;
308  cout << "---" << endl;
309  filterList.add(f, addSuffix(outFile, suffix));
310  delete items;
311  }
312  delete list;
313 
314 
315  DataTweaker tweak;
316  if (!tweak.set(tweaks)) return 0;
317 
318  Interface* multi = openList(listFileName);
319  if (!multi) return 0;
320  const MultiTreeAccessor* mt = dynamic_cast<const MultiTreeAccessor*>(&multi->accessor());
321  if (!mt){
322  delete multi;
323  return 0;
324  }
325  std::vector<MultiTreeAccessor*> filtered_mts = mt->filterComponents(filterList, tweak);
326  if (filtered_mts.size() != filterList.size()){
327  delete multi;
328  return 0;
329  }
330  delete multi;
331  cout << "Component filtering done!" << endl;
332  // The following line should work, but doesn't... so the block of code below replaces it.
333  //Interface* filtered_multi = new Interface(*filtered_mt);
334  //
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++) {
338  files.push_back(((const TreeAccessor*)&filtered_mts[f]->accessor(i))->fileName());
339  cout << "Added " << files.back() << endl;
340  }
341  delete filtered_mts[f];
342  Interface* filtered_multi = open(files);
343  //
344  std::vector<const Interface*> justOne;
345  justOne.push_back(filtered_multi);
346  Interface* interface = merge(justOne, filterList.fileName(f));
347  delete interface;
348  }
349 
350  return true;
351 }

◆ findEtaPhi()

HistoryIterator Interface::findEtaPhi ( CaloId  calo,
short  layer,
short  iEta,
short  iPhi,
short  region = 0 
) const

Definition at line 406 of file Interface.cxx.

407 {
408  for (unsigned int i = 0; i < nChannels(); i++) {
409  const CellInfo* info = cellInfo(i);
410  if (!info) continue;
411  if (!Id::matchCalo(info->calo(), calo)) continue;
412  if (info->layer() != layer) continue;
413  if (info->iEta() != iEta) continue;
414  if (info->iPhi() != iPhi) continue;
415  if (info->region() != region) continue;
416  return HistoryIterator(*this, i);
417  }
418 
419  return HistoryIterator(*this, end());
420 }

◆ findFebChannel()

HistoryIterator Interface::findFebChannel ( CaloId  calo,
short  feb,
short  channel 
) const

Definition at line 423 of file Interface.cxx.

424 {
425  for (unsigned int i = 0; i < nChannels(); i++) {
426  const CellInfo* info = cellInfo(i);
427  if (!info) continue;
428  if (!Id::matchCalo(info->calo(), calo)) continue;
429  if (info->feb() != feb) continue;
430  if (info->channel() != channel) continue;
431  return HistoryIterator(*this, i);
432  }
433 
434  return HistoryIterator(*this, end());
435 }

◆ findFTSlotChannel()

HistoryIterator Interface::findFTSlotChannel ( CaloId  calo,
short  ft,
short  slot,
short  channel 
) const

Definition at line 438 of file Interface.cxx.

439 {
440  for (unsigned int i = 0; i < nChannels(); i++) {
441  const CellInfo* info = cellInfo(i);
442  if (!info) continue;
443  if (!Id::matchCalo(info->calo(), calo)) continue;
444  if (ft >= 0 && info->feedThrough() != ft) continue;
445  if (slot >= 0 && info->slot() != slot) continue;
446  if (channel >= 0 && info->channel() != channel) continue;
447  return HistoryIterator(*this, i);
448  }
449 
450  return HistoryIterator(*this, end());
451 }

◆ firstNeighbors()

bool Interface::firstNeighbors ( unsigned int  hash,
std::vector< unsigned int > &  hashes,
short  layer = -2 
) const

Definition at line 737 of file Interface.cxx.

738 {
739  const CellInfo* cell = cellInfo(hash);
740  if (!cell) return true;
741  if (!Id::matchCalo(cell->calo(), HEC)) return false; // for now!
742  if (layer < 0) return true;
743  std::vector<unsigned int> allHashes;
744  const std::vector<unsigned int>* cache = m_neighborCache[hash];
745  if (cache)
746  allHashes = *cache;
747  else {
748  if (!neighbors(*cell, 0.15, allHashes)) return false;
749  m_neighborCache[hash] = new std::vector<unsigned int>(allHashes);
750  }
751  if (layer == -2) { hashes = allHashes; return true; }
752  for (unsigned int h : allHashes) {
753  const CellInfo* info = cellInfo(h);
754  if (!info) continue;
755  if (info->layer() == layer) hashes.push_back(h);
756  delete info;
757  }
758  return true;
759 }

◆ 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

Implements LArSamples::AbsLArCells.

Definition at line 105 of file Interface.cxx.

106 {
107  const History* history = accessor().getCellHistory(i);
108  if (history) {
110  history->setInterface(this);
111  }
112  return history;
113 }

◆ getCellInfo()

const CellInfo * Interface::getCellInfo ( unsigned int  i) const
virtual

Reimplemented from LArSamples::AbsLArCells.

Definition at line 127 of file Interface.cxx.

128 {
129  return accessor().getCellInfo(i);
130 }

◆ highEData()

bool Interface::highEData ( double  eCut,
TArrayI &  hashes,
TArrayI &  indices 
) const

Definition at line 179 of file Interface.cxx.

180 {
181  std::vector<unsigned int> hashV, indexV;
182  unsigned int nTot = 0;
183 
184  for (unsigned int i = 0; i < nChannels(); i++) {
185  const History* history = cellHistory(i);
186  if (!history) continue;
187  for (unsigned int j = 0; j < history->nData(); j++) {
188  const Data& data = *history->data(j);
189  nTot++;
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;
194  hashV.push_back(i);
195  indexV.push_back(j);
196  }
197  }
198  }
199 
200  hashes.Set(hashV.size());
201  indices.Set(indexV.size());
202 
203  for (unsigned int i = 0; i < hashV.size(); i++) {
204  hashes[i] = hashV[i];
205  indices[i] = indexV[i];
206  }
207 
208  cout << hashV.size() << "/" << nTot << endl;
209  return true;
210 }

◆ historySize()

unsigned int LArSamples::Interface::historySize ( unsigned int  i) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 57 of file Interface.h.

57 { return accessor().historySize(i); }

◆ isValid()

bool Interface::isValid ( ) const

Definition at line 213 of file Interface.cxx.

214 {
215  for (unsigned int i = 0; i < nChannels(); i++) {
216  const History* history = cellHistory(i);
217  if (!history) continue;
218  if (!history->isValid()) {
219  cout << "Invalid LArSamplesHistory at hash = " << i << endl;
220  return false;
221  }
222  }
223 
224  return true;
225 }

◆ makeTemplate()

Interface * Interface::makeTemplate ( const TString &  fileName) const

Definition at line 389 of file Interface.cxx.

390 {
392  return new Interface(*newAcc);
393 }

◆ merge() [1/6]

Interface * Interface::merge ( const Interface other,
const TString &  fileName 
) const

Definition at line 228 of file Interface.cxx.

229 {
230  std::vector<const Interface*> interfaces;
231  interfaces.push_back(this);
232  interfaces.push_back(&other);
233  return merge(interfaces, fileName);
234 }

◆ merge() [2/6]

Interface * Interface::merge ( const Interface other,
const TString &  fileName,
const TString &  LBFile 
) const

Definition at line 246 of file Interface.cxx.

247 {
248  std::vector<const Interface*> interfaces;
249  interfaces.push_back(this);
250  interfaces.push_back(&other);
251  return merge(interfaces, fileName, LBFile);
252 }

◆ merge() [3/6]

Interface * Interface::merge ( const std::vector< const Interface * > &  interfaces,
const TString &  fileName 
)
static

Definition at line 237 of file Interface.cxx.

238 {
239  std::vector<const Accessor*> accessors;
240  for (unsigned int i = 0; i < interfaces.size(); i++)
241  accessors.push_back(&interfaces[i]->accessor());
243  return new Interface(*newAccessor);
244 }

◆ merge() [4/6]

Interface * Interface::merge ( const std::vector< const Interface * > &  interfaces,
const TString &  fileName,
const TString &  LBFile 
)
static

Definition at line 255 of file Interface.cxx.

256 {
257  std::vector<const Accessor*> accessors;
258  for (unsigned int i = 0; i < interfaces.size(); i++)
259  accessors.push_back(&interfaces[i]->accessor());
260  TreeAccessor* newAccessor = TreeAccessor::merge(accessors, fileName, LBFile);
261  return new Interface(*newAccessor);
262 }

◆ merge() [5/6]

Interface * Interface::merge ( const TString &  listFileName,
const TString &  fileName 
)
static

Definition at line 265 of file Interface.cxx.

266 {
267  Interface* multi = openList(listFileName);
268  if (!multi) return nullptr;
269  std::vector<const Interface*> justOne;
270  justOne.push_back(multi);
271  return merge(justOne, fileName);
272 }

◆ merge() [6/6]

Interface * Interface::merge ( const TString &  listFileName,
const TString &  fileName,
const TString &  LBFile 
)
static

Definition at line 274 of file Interface.cxx.

275 {
276  Interface* multi = openList(listFileName);
277  if (!multi) return nullptr;
278  std::vector<const Interface*> justOne;
279  justOne.push_back(multi);
280  return merge(justOne, fileName, LBFile);
281 }

◆ nChannels()

virtual unsigned int LArSamples::AbsLArCells::nChannels ( ) const
inlinevirtualinherited

Reimplemented in LArSamples::MonitorBase.

Definition at line 34 of file AbsLArCells.h.

34 { return Definitions::nChannels; }

◆ neighbors()

bool Interface::neighbors ( const CellInfo cell,
double  dRCut,
std::vector< unsigned int > &  hashes 
) const

Definition at line 723 of file Interface.cxx.

724 {
725  for (unsigned int i = 0; i < nChannels(); i++) {
726  const CellInfo* otherCell = cellInfo(i);
727  if (!otherCell) continue;
728  if (cell.position().DeltaR(otherCell->position()) > dRCut) { delete otherCell; continue; }
729  //cout << "Adding hash = " << i << " " << otherCell->location(3) << endl;
730  hashes.push_back(i);
731  delete otherCell;
732  }
733  return true;
734 }

◆ nEvents()

unsigned int LArSamples::Interface::nEvents ( ) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 51 of file Interface.h.

51 { return accessor().nEvents(); }

◆ newCellHistory()

const History * AbsLArCells::newCellHistory ( unsigned int  i) const
virtualinherited

Definition at line 44 of file AbsLArCells.cxx.

45 {
46  const History* history = getCellHistory(i);
47  if (!history) return nullptr;
48  if (!m_cellInfoCache[i]) {
49  const CellInfo* ci=history->cellInfo();
50  if (ci) {
51  m_cellInfoCache[i]=new CellInfo(*ci,false);
52  }
53  }
54  // m_cellInfoCache[i] = (history->cellInfo() ? new CellInfo(*history->cellInfo(), false) : new CellInfo());
55  return history;
56 }

◆ nFilledChannels()

unsigned int Interface::nFilledChannels ( ) const

Definition at line 133 of file Interface.cxx.

134 {
135  unsigned int n = 0;
136  for (unsigned int i = 0; i < nChannels(); i++)
137  n += (accessor().historySize(i) ? 1 : 0);
138  return n;
139 }

◆ nRuns()

unsigned int LArSamples::Interface::nRuns ( ) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 52 of file Interface.h.

52 { return accessor().nRuns(); }

◆ occupancyMonitor()

OccupancyMonitor LArSamples::Interface::occupancyMonitor ( ) const
inline

Definition at line 113 of file Interface.h.

113 { return OccupancyMonitor(*this); }

◆ open() [1/2]

Interface * Interface::open ( const std::vector< TString > &  fileNames)
static

Definition at line 42 of file Interface.cxx.

43 {
45  return (accessor ? new Interface(*accessor) : nullptr);
46 }

◆ open() [2/2]

Interface * Interface::open ( const TString &  fileName)
static

Definition at line 35 of file Interface.cxx.

36 {
38  return (accessor ? new Interface(*accessor) : nullptr);
39 }

◆ openList()

Interface * Interface::openList ( const TString &  fileList)
static

Definition at line 49 of file Interface.cxx.

50 {
52  return (accessor ? new Interface(*accessor) : nullptr);
53 }

◆ openWild()

Interface * Interface::openWild ( const TString &  wcName)
static

Definition at line 56 of file Interface.cxx.

57 {
59  return (accessor ? new Interface(*accessor) : nullptr);
60 }

◆ pass()

const History * AbsLArCells::pass ( unsigned int  i,
const FilterParams f 
) const
inherited

Definition at line 99 of file AbsLArCells.cxx.

100 {
101  //std::cout << "Called AbsLArCells with hash " << i << std::endl;
102  if (!f.passHash(i)) return nullptr;
103  const CellInfo* info = cellInfo(i);
104  if (!info) {
105  return nullptr;
106  }
107  //std::cout << "Called AbsLArCells::pass on a cell belonging to " << Id::str(info->calo()) << std::endl;
108  bool result = f.passCell(*info);
109  delete info;
110  return result ? cellHistory(i) : nullptr;
111 }

◆ printFilledRanges()

void Interface::printFilledRanges ( unsigned int  skip = 0) const

Definition at line 142 of file Interface.cxx.

143 {
144  int i1 = 0, i2 = 0;
145  unsigned int nNull = 0;
146  unsigned int size = accessor().historySize(0);
147  bool ok = (size > 0);
148  bool inInterval = ok;
149 
150  for (unsigned int i = 0; i < nChannels(); i++) {
151  size = accessor().historySize(i);
152  if (inInterval && nNull == 0) i2 = i;
153  bool ok = (size > 0);
154  if (!ok && inInterval) {
155  nNull++;
156  if (nNull > skip) {
157  nNull = 0;
158  inInterval = false;
159  cout << i1 << "-" << i2 << endl;
160  }
161  }
162  if (ok) nNull = 0;
163  if (ok && !inInterval) {
164  inInterval = true;
165  i1 = i;
166  }
167  }
168 
169  if (inInterval) cout << i1 << "-" << nChannels() << endl;
170 }

◆ refit()

Interface * Interface::refit ( const TString &  newFileName,
Chi2Params  pars = DefaultChi2 
) const

Definition at line 396 of file Interface.cxx.

397 {
398  FilterParams f;
399  DataTweaker tw;
400  tw.setRefit(true);
401  tw.setFitParams(pars);
402  return filter(f, tw, newFileName);
403 }

◆ resetCache()

void AbsLArCells::resetCache ( ) const
virtualinherited

Definition at line 34 of file AbsLArCells.cxx.

35 {
36  if (m_cellCache) {
37  delete m_cellCache;
38  m_cellCache = nullptr;
39  }
40  m_pos = nChannels() + 1;
41 }

◆ resetCellInfoCache()

void AbsLArCells::resetCellInfoCache ( )
inherited

Definition at line 114 of file AbsLArCells.cxx.

115 {
116  unsigned int i = 0;
118  cellInfo != m_cellInfoCache.end(); ++cellInfo, i++)
119  if (*cellInfo) {
120  delete *cellInfo;
121  *cellInfo = 0;
122  }
123 }

◆ runData()

const RunData* LArSamples::Interface::runData ( unsigned int  i) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 55 of file Interface.h.

55 { return accessor().runData(i); }

◆ Scan() [1/2]

bool Interface::Scan ( const TString &  vars,
CombinationType  comb,
const TString &  sel = "",
const TString &  ranges = "",
unsigned int  verbosity = 1 
) const

Definition at line 569 of file Interface.cxx.

570 {
571  MonitorBase m(*this);
572  FilterParams f;
573  if (!f.set(sel)) return 0;
574  return m.dump(vars, comb, f, ranges, verbosity);
575 }

◆ Scan() [2/2]

bool Interface::Scan ( const TString &  vars,
const TString &  sel = "",
unsigned int  verbosity = 1 
) const

Definition at line 560 of file Interface.cxx.

561 {
562  MonitorBase m(*this);
563  FilterParams f;
564  if (!f.set(sel)) return 0;
565  return m.dump(vars, f, verbosity);
566 }

◆ setShapeError() [1/2]

void Interface::setShapeError ( const TString &  fileName)

Definition at line 90 of file Interface.cxx.

◆ setShapeError() [2/2]

void Interface::setShapeError ( double  k)

Definition at line 81 of file Interface.cxx.

82 {
84  if (k == 0) { m_shapeErrorGetter = nullptr; m_ownShapeErrorGetter = false; return; }
86  m_ownShapeErrorGetter = true;
87 }

◆ setShapeErrorGetter()

void Interface::setShapeErrorGetter ( const AbsShapeErrorGetter err)

Definition at line 73 of file Interface.cxx.

74 {
77  m_ownShapeErrorGetter = false;
78 }

◆ shapeErrorGetter()

const AbsShapeErrorGetter* LArSamples::Interface::shapeErrorGetter ( ) const
inline

Definition at line 122 of file Interface.h.

122 { return m_shapeErrorGetter; }

◆ Show() [1/2]

bool Interface::Show ( const TString &  sel = "",
unsigned int  verbosity = 1 
) const

Definition at line 586 of file Interface.cxx.

587 {
588  FilterParams f;
589  if (!f.set(sel)) return false;
590  for (unsigned int i = 0; i < nChannels(); i++) {
591  const History* history = pass(i, f);
592  if (!history) continue;
593  History* filtered = history->filter(sel);
594  TString hDesc = filtered->description(verbosity);
595  delete filtered;
596  if (hDesc == "") continue;
597  cout << Form("Hash = %-5d : ", i) << hDesc
598  << "-----------------------------------------------------------------------------"
599  << endl;
600  }
601  return true;
602 }

◆ Show() [2/2]

bool Interface::Show ( unsigned int  hash,
unsigned int  verbosity = 1 
) const

Definition at line 578 of file Interface.cxx.

579 {
580  const History* history = cellHistory(hash);
581  if (!history) return false;
582  cout << history->description(verbosity) << endl;
583  return true;
584 }

◆ ShowEvents()

bool Interface::ShowEvents ( const TString &  sel = "",
unsigned int  verbosity = 1 
) const

Definition at line 605 of file Interface.cxx.

606 {
607  FilterParams f;
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;
611 
612  if (verbosity & 8) {
613  for (unsigned int i = 0; i < nChannels(); i++) {
614  if ((i+1) % 50000 == 0) cout << "Cell # " << i+1 << "/" << nChannels() << endl;
615  const History* history = pass(i, f);
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());
619  eventCells[ev]++;
620  eventEnergy[ev] += history->data(j)->energy();
621  }
622  }
623  }
624  for (unsigned int i = 0; i < nEvents(); i++) {
625  const EventData* evtData = eventData(i);
626  std::pair<unsigned int, unsigned int> id(evtData->run(), evtData->event());
627  TString printout = Form("%d : ", i) + evtData->description(verbosity);
628  if (verbosity & 8)
629  printout += Form(" : %6d LAr hits, %7.1f MeV", eventCells[id], eventEnergy[id]);
630  cout << printout << endl;
631  }
632 
633  return true;
634 }

◆ ShowRuns()

bool Interface::ShowRuns ( unsigned int  verbosity = 1) const

Definition at line 637 of file Interface.cxx.

638 {
639  std::map<unsigned int, unsigned int> events;
640 
641  if (verbosity & 8) {
642  for (unsigned int i = 0; i < nEvents(); i++)
643  events[eventData(i)->run()]++;
644  }
645 
646  for (unsigned int i = 0; i < nRuns(); i++) {
647  const RunData* rData = runData(i);
648  TString printout = rData->description(verbosity);
649  if (verbosity & 8)
650  printout += Form(" : %6d events", events[rData->run()]);
651  cout << printout << endl;
652  }
653 
654  return true;
655 }

◆ ShowStats()

bool Interface::ShowStats ( const TString &  varList,
const TString &  sel = "",
bool  withErrors = false 
) const

Definition at line 658 of file Interface.cxx.

659 {
660  MonitorBase m(*this);
661  FilterParams f;
662  if (!f.set(sel)) return 0;
663 
664  std::vector<TString> vars;
665  std::vector<DataFuncSet> funcs;
666  std::vector<DataFuncArgs> args;
667  if (!MonitorBase::parseVariables(varList, vars, funcs, args)) {
668  cout << "Invalid variable specification " << varList << endl;
669  return 0;
670  }
671 
672  TVectorD mean(vars.size()), meanErr(vars.size());
673  TMatrixD covMatrix(vars.size(), vars.size()), covMatrixErr(vars.size(), vars.size());
674  if (!m.statParams(funcs, args, mean, meanErr, covMatrix, covMatrixErr, f)) return false;
675 
676  if (!withErrors) {
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;
681 
682  cout << "| |";
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 << "-------------";
686  cout << endl;
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));
691  cout << endl;
692  }
693  cout << "--------------";
694  for (unsigned int i = 0; i < vars.size(); i++) cout << "-------------";
695  cout << endl;
696  }
697  else {
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;
702 
703  cout << "| |";
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 << "---------------------------";
707  cout << endl;
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));
712  cout << endl;
713  }
714  cout << "--------------";
715  for (unsigned int i = 0; i < vars.size(); i++) cout << "---------------------------";
716  cout << endl;
717  }
718 
719  return true;
720 }

◆ size()

unsigned int Interface::size ( ) const

Definition at line 96 of file Interface.cxx.

97 {
98  unsigned int n = 0;
99  for (unsigned int i = 0; i < nChannels(); i++)
100  n += accessor().historySize(i);
101  return n;
102 }

◆ writeToFile()

bool LArSamples::Interface::writeToFile ( const TString &  fileName) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 124 of file Interface.h.

124 { return accessor().writeToFile(fileName); }

Member Data Documentation

◆ m_accessor

const Accessor* LArSamples::Interface::m_accessor
private

Definition at line 134 of file Interface.h.

◆ m_cellCache

const History* LArSamples::AbsLArCells::m_cellCache
mutableprivateinherited

Definition at line 52 of file AbsLArCells.h.

◆ m_cellInfoCache

std::vector<CellInfo*> LArSamples::AbsLArCells::m_cellInfoCache
mutableprivateinherited

Definition at line 53 of file AbsLArCells.h.

◆ m_neighborCache

std::vector<std::vector<unsigned int>*> LArSamples::Interface::m_neighborCache
mutableprivate

Definition at line 138 of file Interface.h.

◆ m_neighborHistories

std::vector<const History*> LArSamples::Interface::m_neighborHistories
mutableprivate

Definition at line 140 of file Interface.h.

◆ m_neighborHistoryPos

std::vector<unsigned int> LArSamples::Interface::m_neighborHistoryPos
mutableprivate

Definition at line 139 of file Interface.h.

◆ m_ownShapeErrorGetter

bool LArSamples::Interface::m_ownShapeErrorGetter
private

Definition at line 136 of file Interface.h.

◆ m_pos

unsigned int LArSamples::AbsLArCells::m_pos
mutableprivateinherited

Definition at line 51 of file AbsLArCells.h.

◆ m_shapeErrorGetter

const AbsShapeErrorGetter* LArSamples::Interface::m_shapeErrorGetter
private

Definition at line 135 of file Interface.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
python.root_lsr_rank.hashes
hashes
Definition: root_lsr_rank.py:34
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
trigbs_pickEvents.ranges
ranges
Definition: trigbs_pickEvents.py:60
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
LArSamples::RunData::description
TString description(unsigned int verbosity) const
Definition: RunData.cxx:56
LArSamples::AbsLArCells::m_pos
unsigned int m_pos
Definition: AbsLArCells.h:51
LArSamples::Interface::nRuns
unsigned int nRuns() const
Definition: Interface.h:52
LArSamples::History::data_for_event
const Data * data_for_event(int event, int run=-1) const
Definition: History.cxx:98
LArSamples::HEC
@ HEC
Definition: CaloId.h:26
PlotCalibFromCool.ft
ft
Definition: PlotCalibFromCool.py:329
LArSamples::MultiTreeAccessor::openList
static MultiTreeAccessor * openList(const TString &fileList)
Definition: MultiTreeAccessor.cxx:43
mean
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="")
Definition: dependence.cxx:254
get_generator_info.result
result
Definition: get_generator_info.py:21
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
LArSamples::Id::matchCalo
static bool matchCalo(CaloId id, CaloId idSpec)
Definition: CaloId.cxx:188
LArSamples::AbsLArCells::newCellHistory
virtual const History * newCellHistory(unsigned int i) const
Definition: AbsLArCells.cxx:44
checkCoolLatestUpdate.variables
variables
Definition: checkCoolLatestUpdate.py:13
LArSamples::DataTweaker::setRefit
void setRefit(bool refit=true)
Definition: DataTweaker.h:39
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
LArSamples::FilterParams
Definition: FilterParams.h:50
checkxAOD.fileNames
fileNames
Definition: Tools/PyUtils/bin/checkxAOD.py:79
LArSamples::Accessor::writeToFile
virtual bool writeToFile(const TString &fileName) const =0
LArSamples::HistoryIterator::isValid
bool isValid() const
Definition: HistoryIterator.cxx:32
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
make_coralServer_rep.opt
opt
Definition: make_coralServer_rep.py:19
LArSamples::EventData::event
int event() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:44
LArSamples::History::cellInfo
const CellInfo * cellInfo() const
Definition: History.h:56
LArSamples::AbsLArCells::cellHistory
virtual const History * cellHistory(unsigned int i) const
Definition: AbsLArCells.cxx:59
index
Definition: index.py:1
inInterval
bool inInterval(const cool::ValidityKey n, const cool::ValidityKey from, const cool::ValidityKey to)
Definition: openCoraCool.cxx:267
Data
@ Data
Definition: BaseObject.h:11
plotmaker.hist
hist
Definition: plotmaker.py:148
Trk::indices
std::pair< long int, long int > indices
Definition: AlSymMatBase.h:24
LArSamples::History
Definition: History.h:35
LArSamples::MultiTreeAccessor::filterComponents
std::vector< MultiTreeAccessor * > filterComponents(const FilterList &filterList, const DataTweaker &tweaker) const
Definition: MultiTreeAccessor.cxx:216
LArSamples::Interface::nEvents
unsigned int nEvents() const
Definition: Interface.h:51
LArSamples::AbsLArCells::m_cellInfoCache
std::vector< CellInfo * > m_cellInfoCache
Definition: AbsLArCells.h:53
LArSamples::Interface::size
unsigned int size() const
Definition: Interface.cxx:96
LArSamples::Interface::neighbors
bool neighbors(const CellInfo &cell, double dRCut, std::vector< unsigned int > &hashes) const
Definition: Interface.cxx:723
LArSamples::Interface::Interface
Interface(const Accessor &accessor)
Constructor
Definition: Interface.h:41
LArSamples::Data::run
int run() const
Definition: Data.cxx:27
LArSamples::Id::str
static TString str(CaloId id)
Definition: CaloId.cxx:15
LArSamples::Interface::cellHistory
const History * cellHistory(unsigned int i) const
Definition: Interface.cxx:116
LArSamples::AbsLArCells::cellInfo
virtual const CellInfo * cellInfo(unsigned int i) const
Definition: AbsLArCells.cxx:71
CscCalibQuery.fileList
fileList
Definition: CscCalibQuery.py:330
LArSamples::Interface::addSuffix
static TString addSuffix(const TString &fileName, const TString &suffix)
Definition: Interface.cxx:373
LArSamples::Interface::m_ownShapeErrorGetter
bool m_ownShapeErrorGetter
Definition: Interface.h:136
PlotCalibFromCool.multi
multi
Definition: PlotCalibFromCool.py:99
LArSamples::History::filter
History * filter(const TString &cuts) const
Definition: History.cxx:282
LArSamples::Interface::m_neighborCache
std::vector< std::vector< unsigned int > * > m_neighborCache
Definition: Interface.h:138
LArSamples::Accessor::eventData
virtual const EventData * eventData(unsigned int i) const =0
LArSamples::MultiTreeAccessor::open
static MultiTreeAccessor * open(const std::vector< TString > &files)
Definition: MultiTreeAccessor.cxx:26
python.DataFormatRates.events
events
Definition: DataFormatRates.py:105
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
LArSamples::Interface::end
unsigned int end() const
Definition: Interface.h:60
LArSamples::FilterList::add
void add(const FilterParams &params, const TString &fileName)
Definition: FilterList.h:27
LArSamples::Data::event
int event() const
Definition: Data.cxx:28
LArSamples::Accessor::historySize
virtual unsigned int historySize(unsigned int i) const =0
LArSamples::RunData
Definition: RunData.h:21
LArSamples::History::data
const Data * data(unsigned int i) const
Definition: History.cxx:91
LArSamples::History::setInterface
void setInterface(const Interface *interface) const
Definition: History.h:107
LArSamples::Interface::accessor
const Accessor & accessor() const
Definition: Interface.h:93
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
LArSamples::MonitorBase::parseVariables
static bool parseVariables(TString varStr, std::vector< TString > &vars, std::vector< DataFuncSet > &funcs, std::vector< DataFuncArgs > &args)
Definition: LArCalorimeter/LArSamplesMon/src/MonitorBase.cxx:147
ev
int ev
Definition: globals.cxx:25
LArSamples::CellInfo::position
TVector3 position() const
Definition: CellInfo.cxx:204
LArSamples::Definitions::nChannels
static const unsigned int nChannels
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/Definitions.h:14
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
LArSamples::Interface::m_neighborHistories
std::vector< const History * > m_neighborHistories
Definition: Interface.h:140
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArSamples::Accessor::runData
virtual const RunData * runData(unsigned int i) const =0
h
beamspotman.n
n
Definition: beamspotman.py:731
extractSporadic.h
list h
Definition: extractSporadic.py:97
LArSamples::MultiTreeAccessor::openWild
static MultiTreeAccessor * openWild(const TString &wcName)
Definition: MultiTreeAccessor.cxx:71
LArSamples::AbsLArCells::getCellInfo
virtual const CellInfo * getCellInfo(unsigned int i) const
Definition: AbsLArCells.cxx:88
LArSamples::Interface::m_neighborHistoryPos
std::vector< unsigned int > m_neighborHistoryPos
Definition: Interface.h:139
xAOD::covMatrix
covMatrix
Definition: TrackMeasurement_v1.cxx:19
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LArSamples::History::setShapeErrorGetter
void setShapeErrorGetter(const AbsShapeErrorGetter *err) const
Definition: History.h:87
sel
sel
Definition: SUSYToolsTester.cxx:97
covarianceTool.title
title
Definition: covarianceTool.py:542
generateReferenceFile.files
files
Definition: generateReferenceFile.py:12
LArSamples::Interface::eventData
const EventData * eventData(unsigned int i) const
Definition: Interface.h:54
LArSamples::TreeAccessor::makeTemplate
static TreeAccessor * makeTemplate(const Accessor &accessor, const TString &fileName)
Definition: TreeAccessor.cxx:429
LArSamples::EventData::run
int run() const
Definition: EventData.cxx:59
hist_file_dump.f
f
Definition: hist_file_dump.py:135
LArSamples::HistoryIterator
storage of the time histories of all the cells
Definition: HistoryIterator.h:20
run
Definition: run.py:1
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
LArSamples::AbsLArCells::getCellHistory
virtual const History * getCellHistory(unsigned int i) const =0
LArSamples::DataTweaker
Definition: DataTweaker.h:24
LArSamples::History::nData
unsigned int nData() const
Definition: History.h:51
LArSamples::Interface::m_shapeErrorGetter
const AbsShapeErrorGetter * m_shapeErrorGetter
Definition: Interface.h:135
LArSamples::TreeAccessor::merge
static TreeAccessor * merge(const std::vector< const Accessor * > &accessors, const TString &fileName="")
Definition: TreeAccessor.cxx:75
LArSamples::DataTweaker::setFitParams
void setFitParams(Chi2Params params)
Definition: DataTweaker.h:40
DQPostProcessTest.outFile
outFile
Comment Out Those You do not wish to run.
Definition: DQPostProcessTest.py:37
LArSamples::FilterList
Definition: FilterList.h:21
dumpTgcDigiJitter.nBins
list nBins
Definition: dumpTgcDigiJitter.py:29
LArSamples::AbsLArCells::pass
const History * pass(unsigned int i, const FilterParams &f) const
Definition: AbsLArCells.cxx:99
LArSamples::AbsLArCells::cellInfoCache
const CellInfo * cellInfoCache(unsigned int i) const
Definition: AbsLArCells.cxx:82
LArSamples::Interface::open
static Interface * open(const TString &fileName)
Definition: Interface.cxx:35
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
LArSamples::Data
Definition: Data.h:72
LArSamples::MultiTreeAccessor
Definition: MultiTreeAccessor.h:27
LArSamples::AbsLArCells::m_cellCache
const History * m_cellCache
Definition: AbsLArCells.h:52
covarianceTool.verbosity
verbosity
Definition: covarianceTool.py:513
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
LArSamples::TreeShapeErrorGetter
Definition: TreeShapeErrorGetter.h:30
LArSamples::CellInfo
Definition: CellInfo.h:31
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:47
LArSamples::Interface::merge
Interface * merge(const Interface &other, const TString &fileName) const
Definition: Interface.cxx:228
LArSamples::RunData::run
int run() const
Definition: RunData.h:36
LArSamples::TreeAccessor::filter
static TreeAccessor * filter(const Accessor &accessor, const FilterParams &filterParams, const TString &fileName, const DataTweaker &tweaker)
Definition: TreeAccessor.cxx:296
DeMoScan.index
string index
Definition: DeMoScan.py:364
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
LArSamples::Interface::m_accessor
const Accessor * m_accessor
Definition: Interface.h:134
LArSamples::Accessor::nEvents
virtual unsigned int nEvents() const =0
LArSamples::DataTweaker::set
bool set(const TString &tweaks)
Definition: DataTweaker.cxx:23
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
LArSamples::Interface::setShapeErrorGetter
void setShapeErrorGetter(const AbsShapeErrorGetter *err)
Definition: Interface.cxx:73
LArSamples::MonitorBase
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/MonitorBase.h:30
LArSamples::Interface::data
bool data(const std::vector< unsigned int > &hashes, const EventData &event, std::vector< const Data * > &data) const
Definition: Interface.cxx:762
beamspotnt.varList
list varList
Definition: bin/beamspotnt.py:1108
LArSamples::Interface
Definition: Interface.h:36
xAODRootTest.accessors
dictionary accessors
Definition: xAODRootTest.py:73
LArSamples::History::description
TString description(unsigned int verbosity=1) const
Definition: History.cxx:574
skip
bool skip
Definition: TrigGlobEffCorrValidation.cxx:190
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
LArSamples::Interface::openList
static Interface * openList(const TString &fileList)
Definition: Interface.cxx:49
LArSamples::History::isValid
bool isValid() const
Definition: History.cxx:152
LArSamples::TreeAccessor
Definition: TreeAccessor.h:32
LArSamples::Interface::filter
Interface * filter(const TString &sel, const TString &fileName, const TString &tweaks="") const
Definition: Interface.cxx:354
LArSamples::FilterList::size
unsigned int size() const
Definition: FilterList.h:29
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:77
LArSamples::Interface::begin
HistoryIterator begin(unsigned int pos=0, double eMin=-1, double adcMaxMin=-1) const
Definition: Interface.cxx:173
LArSamples::EventData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:29
readCCLHist.float
float
Definition: readCCLHist.py:83
BeamSpotSummary.runCount
string runCount
Definition: BeamSpotSummary.py:50
LArSamples::AbsLArCells::nChannels
virtual unsigned int nChannels() const
Definition: AbsLArCells.h:34
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
merge
Definition: merge.py:1
LArSamples::Data::energy
double energy() const
Definition: Data.h:108
fitman.k
k
Definition: fitman.py:528
LArSamples::Accessor::nRuns
virtual unsigned int nRuns() const =0
LArSamples::EventData::description
TString description(unsigned int verbosity) const
Definition: EventData.cxx:131
LArSamples::TreeAccessor::open
static TreeAccessor * open(const TString &fileName)
Definition: TreeAccessor.cxx:30
LArSamples::Interface::runData
const RunData * runData(unsigned int i) const
Definition: Interface.h:55
LArSamples::UniformShapeErrorGetter
Definition: UniformShapeErrorGetter.h:17