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
 
unsigned int historySizeSC (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 HistorygetSCHistory (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 unsigned int nChannelsSC () 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 94 of file Interface.h.

94 { return *m_accessor; }

◆ addSuffix()

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

Definition at line 382 of file Interface.cxx.

383 {
384  TString rootName = fileName;
385  if (fileName(fileName.Length() - 5, 5) == ".root") rootName = fileName(0, fileName.Length() - 5);
386 
387  return rootName + "_" + suffix + ".root";
388 }

◆ begin()

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

Definition at line 182 of file Interface.cxx.

183 {
184  return HistoryIterator(*this, pos, eMin, adcMaxMin);
185 }

◆ cachePos()

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

Definition at line 48 of file AbsLArCells.h.

48 { return m_pos; }

◆ cellCache()

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

Definition at line 47 of file AbsLArCells.h.

47 { return m_cellCache; }

◆ cellHistory()

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

Reimplemented from LArSamples::AbsLArCells.

Definition at line 125 of file Interface.cxx.

126 {
127  const History* history = accessor().cellHistory(i);
128  if (history) {
130  history->setInterface(this);
131  }
132  return history;
133 }

◆ 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 771 of file Interface.cxx.

772 {
773  if (hashes != m_neighborHistoryPos) {
774  for (const History* history : m_neighborHistories)
775  delete history;
776  m_neighborHistories.clear();
777  m_neighborHistoryPos.clear();
778  for (std::vector<unsigned int>::const_iterator hash = hashes.begin(); hash != hashes.end(); ++hash) {
779  const History* history = AbsLArCells::newCellHistory(*hash);// bypasses history caching in order not to invalidate cell
780  m_neighborHistories.push_back(history);
781  m_neighborHistoryPos.push_back(*hash);
782  }
783  }
784 
785  for (const History* history : m_neighborHistories) {
786  if (!history) continue;
787  const Data* dataForEvent = history->data_for_event(event);
788  if (dataForEvent) data.push_back(new Data(*dataForEvent));
789  }
790  return true;
791 }

◆ digitMonitor()

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

Definition at line 115 of file Interface.h.

115 { 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 463 of file Interface.cxx.

464 {
465  MonitorBase m(*this);
466  FilterParams f;
467  if (!f.set(sel)) return nullptr;
468 
469  std::vector<TString> vars;
470  std::vector<DataFuncSet> funcs;
471  std::vector<DataFuncArgs> args;
472  if (!MonitorBase::parseVariables(var, vars, funcs, args) || funcs.size() != 1) {
473  cout << "Invalid variable specification " << var << endl;
474  return nullptr;
475  }
476 
477  TString title = vars[0];
478  if (TString(sel) != "") title = title + ", " + sel;
479 
480  TH1D* h = m.dist(funcs[0], args[0], vars[0], nBins, xMin, xMax,
481  title, vars[0], "digits", f);
482  if (!h) return nullptr;
483  h->Draw(opt);
484  return h;
485 }

◆ 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 488 of file Interface.cxx.

491 {
492  MonitorBase m(*this);
493  FilterParams f;
494  if (!f.set(sel)) return nullptr;
495 
496  std::vector<TString> vars;
497  std::vector<DataFuncSet> funcs;
498  std::vector<DataFuncArgs> args;
499  if (!MonitorBase::parseVariables(varList, vars, funcs, args) || funcs.size() != 2) {
500  cout << "Invalid variable specification " << varList << endl;
501  return nullptr;
502  }
503 
504  TString title = vars[1] + " vs. " + vars[0];
505 
506  if (TString(sel) != "") title = title + ", " + sel;
507  TH2D* h = m.dist(funcs[0], args[0], funcs[1], args[1], vars[0] + "_" + vars[1],
508  nBinsX, xMin, xMax, nBinsY, yMin, yMax,
509  title, vars[0], vars[1], f);
510  if (!h) return nullptr;
511  h->Draw(opt);
512  return h;
513 }

◆ DrawEtaPhi()

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

Definition at line 543 of file Interface.cxx.

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

◆ DrawPartition()

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

Definition at line 516 of file Interface.cxx.

519 {
520  MonitorBase m(*this);
521  FilterParams f;
522  if (!f.set(sel)) return nullptr;
523 
524  std::vector<TString> vars;
525  std::vector<DataFuncSet> funcs;
526  std::vector<DataFuncArgs> args;
527  if (!MonitorBase::parseVariables(var, vars, funcs, args) || funcs.size() != 1) {
528  cout << "Invalid variable specification " << var << endl;
529  return nullptr;
530  }
531 
532  TString title = var;
533  title = title + ", " + Id::str(partition);
534  if (TString(sel) != "") title = title + ", " + sel;
535 
536  TH2D* h = m.partitionMap(funcs[0], args[0], var, partition, title, comb, f);
537  if (!h) return nullptr;
538  h->Draw(opt);
539  return h;
540 }

◆ dumpEventTuple()

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

Definition at line 794 of file Interface.cxx.

795 {
796  std::vector<float*> floatVars;
797  std::vector<int*> intVars;
798  std::vector<std::vector<float>*> floatVects;
799  std::vector<std::vector<int>*> intVects;
800  std::map<TString, unsigned int> varIndex;
801 
802  std::vector<TString> vars;
803  std::vector<DataFuncSet> funcs;
804  std::vector<DataFuncArgs> args;
805  if (!MonitorBase::parseVariables(variables, vars, funcs, args)) return false;
806 
807  cout << "Making trees..." << endl;
808 
809  TFile* flatFile = TFile::Open(fileName + "_tmpFlatFile.root", "RECREATE");
810  TTree* flatTree = new TTree("flatTree", "Flat tree");
811 
812  TFile* eventFile = TFile::Open(fileName, "RECREATE");
813  TTree* eventTree = new TTree("eventTree", "Event tree");
814 
815  for (unsigned int j = 0; j < vars.size(); j++) {
816  unsigned int index = 0;
817  if (funcs[j].isNull()) return false;
818  if (funcs[j].isInt()) {
819  int* varCont = new int(0);
820  std::vector<int>* vectCont = new std::vector<int>();
821  index = intVars.size();
822  intVars.push_back(varCont);
823  intVects.push_back(vectCont);
824  flatTree->Branch(vars[j], varCont);
825  eventTree->Branch(vars[j], vectCont);
826  }
827  else {
828  float* varCont = new float(0);
829  std::vector<float>* vectCont = new std::vector<float>();
830  index = floatVars.size();
831  floatVars.push_back(varCont);
832  floatVects.push_back(vectCont);
833  flatTree->Branch(vars[j], varCont);
834  eventTree->Branch(vars[j], vectCont);
835  }
836  varIndex[vars[j]] = index;
837  cout << vars[j] << " -> " << index << endl;
838  }
839  std::map< unsigned int, std::map< unsigned int, std::vector<long long> > > runEventIndices;
840  cout << "Making flat ntuple" << endl;
841  unsigned int count = 0;
842  for (HistoryIterator iter = begin(); iter.isValid(); iter.next()) {
843  const History* hist = iter.history();
844  count++;
845  if (count % 100 == 0) cout << "Processing entry " << count << " (hash = " << iter.pos() << "), size = " << hist->nData() << endl;
846  for (unsigned int k = 0; k < hist->nData(); k++) {
847  for (unsigned int j = 0; j < vars.size(); j++) {
848  if (funcs[j].isInt())
849  *intVars[varIndex[vars[j]]] = int(funcs[j].intVal(*hist->data(k), args[j]));
850  else
851  *floatVars[varIndex[vars[j]]] = funcs[j].doubleVal(*hist->data(k), args[j]);
852  }
853  runEventIndices[hist->data(k)->run()][hist->data(k)->event()].push_back(flatTree->GetEntries());
854  flatTree->Fill();
855  }
856  }
857 
858  cout << "Making event tuple" << endl;
859  unsigned int runCount = 0;
860  for (const auto& run : runEventIndices) {
861  runCount++;
862  cout << "Processing run " << run.first << " (" << runCount << " of " << runEventIndices.size() << ")" << endl;
863  unsigned int eventCount = 0;
864  for (const auto& event : run.second) {
865  eventCount++;
866  if (eventCount % 1000 == 0)
867  cout << " processing event " << event.first << " (" << eventCount << " of " << run.second.size() << "), size = " << event.second.size() << endl;
868  for (unsigned int j = 0; j < intVects.size(); j++) intVects[j]->clear();
869  for (unsigned int j = 0; j < floatVects.size(); j++) floatVects[j]->clear();
870  for (long long index : event.second) {
871  flatTree->GetEntry(index);
872  for (unsigned int j = 0; j < vars.size(); j++) {
873  if (funcs[j].isInt())
874  intVects[varIndex[vars[j]]]->push_back(*intVars[varIndex[vars[j]]]);
875  else
876  floatVects[varIndex[vars[j]]]->push_back(*floatVars[varIndex[vars[j]]]);
877  }
878  }
879  eventTree->Fill();
880  }
881  }
882 
883  cout << "Writing data..." << endl;
884  flatFile->cd();
885  flatTree->Write();
886  eventFile->cd();
887  eventTree->Write();
888 
889  cout << "Cleaning up..." << endl;
890  delete eventTree;
891  delete eventFile;
892 
893  delete flatTree;
894  delete flatFile;
895  for (unsigned int j = 0; j < intVects.size(); j++) delete intVects[j];
896  for (unsigned int j = 0; j < floatVects.size(); j++) delete floatVects[j];
897  for (unsigned int j = 0; j < intVars.size(); j++) delete intVars[j];
898  for (unsigned int j = 0; j < floatVars.size(); j++) delete floatVars[j];
899 
900  cout << "Done!" << endl;
901  return true;
902 }

◆ end()

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

Definition at line 61 of file Interface.h.

61 { 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 391 of file Interface.cxx.

392 {
393  TreeAccessor* newAcc = TreeAccessor::filter(accessor(), filterParams, fileName, tweaker);
394  return new Interface(*newAcc);
395 }

◆ filter() [2/2]

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

Definition at line 363 of file Interface.cxx.

364 {
365  FilterParams f;
366  if (!f.set(sel)) return nullptr;
367 
368  DataTweaker tweak;
369  if (!tweak.set(tweaks)) return nullptr;
370 
371  TString thisFN = fileName;
372  if (thisFN.Index(".root") < 0 && dynamic_cast<const TreeAccessor*>(&accessor())) {
373  auto pAccess = dynamic_cast<const TreeAccessor*>(&accessor());
374  if (not pAccess) return nullptr;
375  TString newFN = addSuffix(pAccess->fileName(), fileName);
376  if (newFN != "") thisFN = std::move(newFN);
377  }
378  return filter(f, tweak, thisFN);
379 }

◆ filterAndMerge()

bool Interface::filterAndMerge ( const TString &  listFileName,
const TString &  outFile,
const TString &  filters,
const TString &  tweaks = "" 
)
static

Definition at line 293 of file Interface.cxx.

294 {
295  FilterList filterList;
296 
297  TObjArray* list = filters.Tokenize(",;");
298  if (list->GetEntries() == 0) {
299  cout << "No filtering specified, exiting.";
300  delete list;
301  return 0;
302  }
303 
304  for (int k = 0; k < list->GetEntries(); k++) {
305  TObjString* tobs = (TObjString*)(list->At(k));
306  TObjArray* items = tobs->String().Tokenize(":");
307  if (items->GetEntries() != 2) {
308  cout << "Invalid filter entry " << tobs->String() << ", exiting." << endl;
309  delete list;
310  delete items;
311  return 0;
312  }
313  TString params = ((TObjString*)(items->At(0)))->String();
314  TString suffix = ((TObjString*)(items->At(1)))->String();
315  FilterParams f;
316  if (!f.set(params)) return 0;
317  cout << "---" << endl;
318  filterList.add(f, addSuffix(outFile, suffix));
319  delete items;
320  }
321  delete list;
322 
323 
324  DataTweaker tweak;
325  if (!tweak.set(tweaks)) return 0;
326 
327  Interface* multi = openList(listFileName);
328  if (!multi) return 0;
329  const MultiTreeAccessor* mt = dynamic_cast<const MultiTreeAccessor*>(&multi->accessor());
330  if (!mt){
331  delete multi;
332  return 0;
333  }
334  std::vector<MultiTreeAccessor*> filtered_mts = mt->filterComponents(filterList, tweak);
335  if (filtered_mts.size() != filterList.size()){
336  delete multi;
337  return 0;
338  }
339  delete multi;
340  cout << "Component filtering done!" << endl;
341  // The following line should work, but doesn't... so the block of code below replaces it.
342  //Interface* filtered_multi = new Interface(*filtered_mt);
343  //
344  for (unsigned int f = 0; f < filtered_mts.size(); f++) {
345  std::vector<TString> files;
346  for (unsigned int i = 0; i < filtered_mts[f]->nAccessors(); i++) {
347  files.push_back(((const TreeAccessor*)&filtered_mts[f]->accessor(i))->fileName());
348  cout << "Added " << files.back() << endl;
349  }
350  delete filtered_mts[f];
351  Interface* filtered_multi = open(files);
352  //
353  std::vector<const Interface*> justOne;
354  justOne.push_back(filtered_multi);
355  Interface* interface = merge(justOne, filterList.fileName(f));
356  delete interface;
357  }
358 
359  return true;
360 }

◆ findEtaPhi()

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

Definition at line 415 of file Interface.cxx.

416 {
417  for (unsigned int i = 0; i < nChannels(); i++) {
418  const CellInfo* info = cellInfo(i);
419  if (!info) continue;
420  if (!Id::matchCalo(info->calo(), calo)) continue;
421  if (info->layer() != layer) continue;
422  if (info->iEta() != iEta) continue;
423  if (info->iPhi() != iPhi) continue;
424  if (info->region() != region) continue;
425  return HistoryIterator(*this, i);
426  }
427 
428  return HistoryIterator(*this, end());
429 }

◆ findFebChannel()

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

Definition at line 432 of file Interface.cxx.

433 {
434  for (unsigned int i = 0; i < nChannels(); i++) {
435  const CellInfo* info = cellInfo(i);
436  if (!info) continue;
437  if (!Id::matchCalo(info->calo(), calo)) continue;
438  if (info->feb() != feb) continue;
439  if (info->channel() != channel) continue;
440  return HistoryIterator(*this, i);
441  }
442 
443  return HistoryIterator(*this, end());
444 }

◆ findFTSlotChannel()

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

Definition at line 447 of file Interface.cxx.

448 {
449  for (unsigned int i = 0; i < nChannels(); i++) {
450  const CellInfo* info = cellInfo(i);
451  if (!info) continue;
452  if (!Id::matchCalo(info->calo(), calo)) continue;
453  if (ft >= 0 && info->feedThrough() != ft) continue;
454  if (slot >= 0 && info->slot() != slot) continue;
455  if (channel >= 0 && info->channel() != channel) continue;
456  return HistoryIterator(*this, i);
457  }
458 
459  return HistoryIterator(*this, end());
460 }

◆ firstNeighbors()

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

Definition at line 746 of file Interface.cxx.

747 {
748  const CellInfo* cell = cellInfo(hash);
749  if (!cell) return true;
750  if (!Id::matchCalo(cell->calo(), HEC)) return false; // for now!
751  if (layer < 0) return true;
752  std::vector<unsigned int> allHashes;
753  const std::vector<unsigned int>* cache = m_neighborCache[hash];
754  if (cache)
755  allHashes = *cache;
756  else {
757  if (!neighbors(*cell, 0.15, allHashes)) return false;
758  m_neighborCache[hash] = new std::vector<unsigned int>(allHashes);
759  }
760  if (layer == -2) { hashes = allHashes; return true; }
761  for (unsigned int h : allHashes) {
762  const CellInfo* info = cellInfo(h);
763  if (!info) continue;
764  if (info->layer() == layer) hashes.push_back(h);
765  delete info;
766  }
767  return true;
768 }

◆ fitMonitor()

FitMonitor LArSamples::Interface::fitMonitor ( ) const
inline

Definition at line 116 of file Interface.h.

116 { 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 136 of file Interface.cxx.

137 {
138  return accessor().getCellInfo(i);
139 }

◆ getSCHistory()

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

Implements LArSamples::AbsLArCells.

Definition at line 115 of file Interface.cxx.

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

◆ highEData()

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

Definition at line 188 of file Interface.cxx.

189 {
190  std::vector<unsigned int> hashV, indexV;
191  unsigned int nTot = 0;
192 
193  for (unsigned int i = 0; i < nChannels(); i++) {
194  const History* history = cellHistory(i);
195  if (!history) continue;
196  for (unsigned int j = 0; j < history->nData(); j++) {
197  const Data& data = *history->data(j);
198  nTot++;
199  if (data.isDisconnected()) continue;
200  if (nTot % 10000 == 0) cout << nTot << endl;
201  if (data.energy() > eCut) {
202  cout << "E = " << data.energy() << " " << i << " " << j << endl;
203  hashV.push_back(i);
204  indexV.push_back(j);
205  }
206  }
207  }
208 
209  hashes.Set(hashV.size());
210  indices.Set(indexV.size());
211 
212  for (unsigned int i = 0; i < hashV.size(); i++) {
213  hashes[i] = hashV[i];
214  indices[i] = indexV[i];
215  }
216 
217  cout << hashV.size() << "/" << nTot << endl;
218  return true;
219 }

◆ 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); }

◆ historySizeSC()

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

Implements LArSamples::Accessor.

Definition at line 58 of file Interface.h.

58 { return accessor().historySizeSC(i); }

◆ isValid()

bool Interface::isValid ( ) const

Definition at line 222 of file Interface.cxx.

223 {
224  for (unsigned int i = 0; i < nChannels(); i++) {
225  const History* history = cellHistory(i);
226  if (!history) continue;
227  if (!history->isValid()) {
228  cout << "Invalid LArSamplesHistory at hash = " << i << endl;
229  return false;
230  }
231  }
232 
233  return true;
234 }

◆ makeTemplate()

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

Definition at line 398 of file Interface.cxx.

399 {
401  return new Interface(*newAcc);
402 }

◆ merge() [1/6]

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

Definition at line 237 of file Interface.cxx.

238 {
239  std::vector<const Interface*> interfaces;
240  interfaces.push_back(this);
241  interfaces.push_back(&other);
242  return merge(interfaces, fileName);
243 }

◆ merge() [2/6]

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

Definition at line 255 of file Interface.cxx.

256 {
257  std::vector<const Interface*> interfaces;
258  interfaces.push_back(this);
259  interfaces.push_back(&other);
260  return merge(interfaces, fileName, LBFile);
261 }

◆ merge() [3/6]

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

Definition at line 246 of file Interface.cxx.

247 {
248  std::vector<const Accessor*> accessors;
249  for (unsigned int i = 0; i < interfaces.size(); i++)
250  accessors.push_back(&interfaces[i]->accessor());
252  return new Interface(*newAccessor);
253 }

◆ merge() [4/6]

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

Definition at line 264 of file Interface.cxx.

265 {
266  std::vector<const Accessor*> accessors;
267  for (unsigned int i = 0; i < interfaces.size(); i++)
268  accessors.push_back(&interfaces[i]->accessor());
269  TreeAccessor* newAccessor = TreeAccessor::merge(accessors, fileName, LBFile);
270  return new Interface(*newAccessor);
271 }

◆ merge() [5/6]

Interface * Interface::merge ( const TString &  listFileName,
const TString &  fileName 
)
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);
281 }

◆ merge() [6/6]

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

Definition at line 283 of file Interface.cxx.

284 {
285  Interface* multi = openList(listFileName);
286  if (!multi) return nullptr;
287  std::vector<const Interface*> justOne;
288  justOne.push_back(multi);
289  return merge(justOne, fileName, LBFile);
290 }

◆ 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; }

◆ nChannelsSC()

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

Definition at line 35 of file AbsLArCells.h.

35 { return Definitions::nChannelsSC; }

◆ neighbors()

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

Definition at line 732 of file Interface.cxx.

733 {
734  for (unsigned int i = 0; i < nChannels(); i++) {
735  const CellInfo* otherCell = cellInfo(i);
736  if (!otherCell) continue;
737  if (cell.position().DeltaR(otherCell->position()) > dRCut) { delete otherCell; continue; }
738  //cout << "Adding hash = " << i << " " << otherCell->location(3) << endl;
739  hashes.push_back(i);
740  delete otherCell;
741  }
742  return true;
743 }

◆ 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 142 of file Interface.cxx.

143 {
144  unsigned int n = 0;
145  for (unsigned int i = 0; i < nChannels(); i++)
146  n += (accessor().historySize(i) ? 1 : 0);
147  return n;
148 }

◆ 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 114 of file Interface.h.

114 { 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 151 of file Interface.cxx.

152 {
153  int i1 = 0, i2 = 0;
154  unsigned int nNull = 0;
155  unsigned int size = accessor().historySize(0);
156  bool ok = (size > 0);
157  bool inInterval = ok;
158 
159  for (unsigned int i = 0; i < nChannels(); i++) {
160  size = accessor().historySize(i);
161  if (inInterval && nNull == 0) i2 = i;
162  bool ok = (size > 0);
163  if (!ok && inInterval) {
164  nNull++;
165  if (nNull > skip) {
166  nNull = 0;
167  inInterval = false;
168  cout << i1 << "-" << i2 << endl;
169  }
170  }
171  if (ok) nNull = 0;
172  if (ok && !inInterval) {
173  inInterval = true;
174  i1 = i;
175  }
176  }
177 
178  if (inInterval) cout << i1 << "-" << nChannels() << endl;
179 }

◆ refit()

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

Definition at line 405 of file Interface.cxx.

406 {
407  FilterParams f;
408  DataTweaker tw;
409  tw.setRefit(true);
410  tw.setFitParams(pars);
411  return filter(f, tw, newFileName);
412 }

◆ 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 578 of file Interface.cxx.

579 {
580  MonitorBase m(*this);
581  FilterParams f;
582  if (!f.set(sel)) return 0;
583  return m.dump(vars, comb, f, ranges, verbosity);
584 }

◆ Scan() [2/2]

bool Interface::Scan ( const TString &  vars,
const TString &  sel = "",
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, f, verbosity);
575 }

◆ 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 123 of file Interface.h.

123 { return m_shapeErrorGetter; }

◆ Show() [1/2]

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

Definition at line 595 of file Interface.cxx.

596 {
597  FilterParams f;
598  if (!f.set(sel)) return false;
599  for (unsigned int i = 0; i < nChannels(); i++) {
600  const History* history = pass(i, f);
601  if (!history) continue;
602  History* filtered = history->filter(sel);
603  TString hDesc = filtered->description(verbosity);
604  delete filtered;
605  if (hDesc == "") continue;
606  cout << Form("Hash = %-5d : ", i) << hDesc
607  << "-----------------------------------------------------------------------------"
608  << endl;
609  }
610  return true;
611 }

◆ Show() [2/2]

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

Definition at line 587 of file Interface.cxx.

588 {
589  const History* history = cellHistory(hash);
590  if (!history) return false;
591  cout << history->description(verbosity) << endl;
592  return true;
593 }

◆ ShowEvents()

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

Definition at line 614 of file Interface.cxx.

615 {
616  FilterParams f;
617  if (!f.set(sel)) return false;
618  std::map< std::pair<unsigned int, unsigned int>, unsigned int > eventCells;
619  std::map< std::pair<unsigned int, unsigned int>, double > eventEnergy;
620 
621  if (verbosity & 8) {
622  for (unsigned int i = 0; i < nChannels(); i++) {
623  if ((i+1) % 50000 == 0) cout << "Cell # " << i+1 << "/" << nChannels() << endl;
624  const History* history = pass(i, f);
625  if (!history) continue;
626  for (unsigned int j = 0; j < history->nData(); j++) {
627  std::pair<unsigned int, unsigned int> ev = std::make_pair(history->data(j)->run(), history->data(j)->event());
628  eventCells[ev]++;
629  eventEnergy[ev] += history->data(j)->energy();
630  }
631  }
632  }
633  for (unsigned int i = 0; i < nEvents(); i++) {
634  const EventData* evtData = eventData(i);
635  std::pair<unsigned int, unsigned int> id(evtData->run(), evtData->event());
636  TString printout = Form("%d : ", i) + evtData->description(verbosity);
637  if (verbosity & 8)
638  printout += Form(" : %6d LAr hits, %7.1f MeV", eventCells[id], eventEnergy[id]);
639  cout << printout << endl;
640  }
641 
642  return true;
643 }

◆ ShowRuns()

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

Definition at line 646 of file Interface.cxx.

647 {
648  std::map<unsigned int, unsigned int> events;
649 
650  if (verbosity & 8) {
651  for (unsigned int i = 0; i < nEvents(); i++)
652  events[eventData(i)->run()]++;
653  }
654 
655  for (unsigned int i = 0; i < nRuns(); i++) {
656  const RunData* rData = runData(i);
657  TString printout = rData->description(verbosity);
658  if (verbosity & 8)
659  printout += Form(" : %6d events", events[rData->run()]);
660  cout << printout << endl;
661  }
662 
663  return true;
664 }

◆ ShowStats()

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

Definition at line 667 of file Interface.cxx.

668 {
669  MonitorBase m(*this);
670  FilterParams f;
671  if (!f.set(sel)) return 0;
672 
673  std::vector<TString> vars;
674  std::vector<DataFuncSet> funcs;
675  std::vector<DataFuncArgs> args;
676  if (!MonitorBase::parseVariables(varList, vars, funcs, args)) {
677  cout << "Invalid variable specification " << varList << endl;
678  return 0;
679  }
680 
681  TVectorD mean(vars.size()), meanErr(vars.size());
682  TMatrixD covMatrix(vars.size(), vars.size()), covMatrixErr(vars.size(), vars.size());
683  if (!m.statParams(funcs, args, mean, meanErr, covMatrix, covMatrixErr, f)) return false;
684 
685  if (!withErrors) {
686  cout << "---------------------------" << endl;
687  for (unsigned int i = 0; i < vars.size(); i++)
688  cout << Form("| %10s | %-9.4g |", vars[i].Data(), mean(i)) << endl;
689  cout << "---------------------------" << endl << endl;
690 
691  cout << "| |";
692  for (unsigned int i = 0; i < vars.size(); i++) cout << " |";
693  cout << endl << "--------------";
694  for (unsigned int i = 0; i < vars.size(); i++) cout << "-------------";
695  cout << endl;
696  for (unsigned int i1 = 0; i1 < vars.size(); i1++) {
697  cout << Form("| %10s |", vars[i1].Data());
698  for (unsigned int i2 = 0; i2 < vars.size(); i2++)
699  cout << Form(" %-9.4g |", covMatrix(i1, i2));
700  cout << endl;
701  }
702  cout << "--------------";
703  for (unsigned int i = 0; i < vars.size(); i++) cout << "-------------";
704  cout << endl;
705  }
706  else {
707  cout << "---------------------------" << endl;
708  for (unsigned int i = 0; i < vars.size(); i++)
709  cout << Form("| %10s | %-9.4g +/- %-9.4g |", vars[i].Data(), mean(i), meanErr(i)) << endl;
710  cout << "---------------------------" << endl << endl;
711 
712  cout << "| |";
713  for (unsigned int i = 0; i < vars.size(); i++) cout << " |";
714  cout << endl << "--------------";
715  for (unsigned int i = 0; i < vars.size(); i++) cout << "---------------------------";
716  cout << endl;
717  for (unsigned int i1 = 0; i1 < vars.size(); i1++) {
718  cout << Form("| %10s |", vars[i1].Data());
719  for (unsigned int i2 = 0; i2 < vars.size(); i2++)
720  cout << Form(" %-9.4g +/- %-9.4g |", covMatrix(i1, i2), covMatrixErr(i1, i2));
721  cout << endl;
722  }
723  cout << "--------------";
724  for (unsigned int i = 0; i < vars.size(); i++) cout << "---------------------------";
725  cout << endl;
726  }
727 
728  return true;
729 }

◆ 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 125 of file Interface.h.

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

Member Data Documentation

◆ m_accessor

const Accessor* LArSamples::Interface::m_accessor
private

Definition at line 136 of file Interface.h.

◆ m_cellCache

const History* LArSamples::AbsLArCells::m_cellCache
mutableprivateinherited

Definition at line 55 of file AbsLArCells.h.

◆ m_cellInfoCache

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

Definition at line 56 of file AbsLArCells.h.

◆ m_neighborCache

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

Definition at line 140 of file Interface.h.

◆ m_neighborHistories

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

Definition at line 142 of file Interface.h.

◆ m_neighborHistoryPos

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

Definition at line 141 of file Interface.h.

◆ m_ownShapeErrorGetter

bool LArSamples::Interface::m_ownShapeErrorGetter
private

Definition at line 138 of file Interface.h.

◆ m_pos

unsigned int LArSamples::AbsLArCells::m_pos
mutableprivateinherited

Definition at line 54 of file AbsLArCells.h.

◆ m_shapeErrorGetter

const AbsShapeErrorGetter* LArSamples::Interface::m_shapeErrorGetter
private

Definition at line 137 of file Interface.h.


The documentation for this class was generated from the following files:
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:1393
LArSamples::RunData::description
TString description(unsigned int verbosity) const
Definition: RunData.cxx:56
LArSamples::AbsLArCells::m_pos
unsigned int m_pos
Definition: AbsLArCells.h:54
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
createLinkingScheme.iter
iter
Definition: createLinkingScheme.py:62
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:185
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:12
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
python.ZdcOnlineRecMonitorConfig.partition
partition
Definition: ZdcOnlineRecMonitorConfig.py:328
checkxAOD.fileNames
fileNames
Definition: Tools/PyUtils/bin/checkxAOD.py:79
python.CaloAddPedShiftConfig.args
args
Definition: CaloAddPedShiftConfig.py:47
LArSamples::Accessor::writeToFile
virtual bool writeToFile(const TString &fileName) const =0
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
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:269
LArSamples::Interface::nEvents
unsigned int nEvents() const
Definition: Interface.h:51
LArSamples::AbsLArCells::m_cellInfoCache
std::vector< CellInfo * > m_cellInfoCache
Definition: AbsLArCells.h:56
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:732
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:125
LArSamples::AbsLArCells::cellInfo
virtual const CellInfo * cellInfo(unsigned int i) const
Definition: AbsLArCells.cxx:71
CscCalibQuery.fileList
fileList
Definition: CscCalibQuery.py:329
LArSamples::Interface::addSuffix
static TString addSuffix(const TString &fileName, const TString &suffix)
Definition: Interface.cxx:382
LArSamples::Interface::m_ownShapeErrorGetter
bool m_ownShapeErrorGetter
Definition: Interface.h:138
LArSamples::Accessor::historySizeSC
virtual unsigned int historySizeSC(unsigned int i) const =0
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:140
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:84
LArSamples::Interface::end
unsigned int end() const
Definition: Interface.h:61
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::AbsLArCells::getSCHistory
virtual const History * getSCHistory(unsigned int i) const =0
LArSamples::Interface::accessor
const Accessor & accessor() const
Definition: Interface.h:94
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:152
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:183
LArSamples::Interface::m_neighborHistories
std::vector< const History * > m_neighborHistories
Definition: Interface.h:142
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:729
extractSporadic.h
list h
Definition: extractSporadic.py:96
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:141
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:92
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:484
LArSamples::EventData::run
int run() const
Definition: EventData.cxx:59
hist_file_dump.f
f
Definition: hist_file_dump.py:140
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:137
LArSamples::TreeAccessor::merge
static TreeAccessor * merge(const std::vector< const Accessor * > &accessors, const TString &fileName="")
Definition: TreeAccessor.cxx:92
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:36
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:239
LArSamples::Data
Definition: Data.h:72
LArSamples::MultiTreeAccessor
Definition: MultiTreeAccessor.h:27
LArSamples::AbsLArCells::m_cellCache
const History * m_cellCache
Definition: AbsLArCells.h:55
covarianceTool.verbosity
verbosity
Definition: covarianceTool.py:513
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:71
LArSamples::TreeShapeErrorGetter
Definition: TreeShapeErrorGetter.h:30
LArSamples::CellInfo
Definition: CellInfo.h:31
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:47
LArSamples::Interface::merge
Interface * merge(const Interface &other, const TString &fileName) const
Definition: Interface.cxx:237
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:351
DeMoScan.index
string index
Definition: DeMoScan.py:362
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:108
LArSamples::Interface::m_accessor
const Accessor * m_accessor
Definition: Interface.h:136
LArSamples::Accessor::nEvents
virtual unsigned int nEvents() const =0
LArSamples::Definitions::nChannelsSC
static const unsigned int nChannelsSC
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/Definitions.h:15
LArSamples::DataTweaker::set
bool set(const TString &tweaks)
Definition: DataTweaker.cxx:23
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:771
beamspotnt.varList
list varList
Definition: bin/beamspotnt.py:1107
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
jobOptions.fileName
fileName
Definition: jobOptions.SuperChic_ALP2.py:39
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:363
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:182
LArSamples::EventData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:29
python.ParticleTypeUtil.info
def info
Definition: ParticleTypeUtil.py:87
BeamSpotSummary.runCount
string runCount
Definition: BeamSpotSummary.py:49
LArSamples::AbsLArCells::nChannels
virtual unsigned int nChannels() const
Definition: AbsLArCells.h:34
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
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106
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
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65
LArSamples::Interface::runData
const RunData * runData(unsigned int i) const
Definition: Interface.h:55
LArSamples::UniformShapeErrorGetter
Definition: UniformShapeErrorGetter.h:17