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

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

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

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

◆ begin()

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

Definition at line 171 of file Interface.cxx.

172 {
173  return HistoryIterator(*this, pos, eMin, adcMaxMin);
174 }

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

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

◆ cellInfo()

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

Definition at line 69 of file AbsLArCells.cxx.

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

◆ cellInfoCache()

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

Definition at line 80 of file AbsLArCells.cxx.

81 {
82  return m_cellInfoCache[i];
83 }

◆ data()

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

Definition at line 760 of file Interface.cxx.

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

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

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

◆ Draw() [2/2]

TH2D * Interface::Draw ( const TString &  varList,
int  nBinsX,
double  xMin,
double  xMax,
int  nBinsY,
double  yMin,
double  yMax,
const TString &  sel = "",
const TString &  opt = "" 
) const

Definition at line 477 of file Interface.cxx.

480 {
481  MonitorBase m(*this);
482  FilterParams f;
483  if (!f.set(sel)) return nullptr;
484 
485  std::vector<TString> vars;
486  std::vector<DataFuncSet> funcs;
487  std::vector<DataFuncArgs> args;
488  if (!MonitorBase::parseVariables(varList, vars, funcs, args) || funcs.size() != 2) {
489  cout << "Invalid variable specification " << varList << endl;
490  return nullptr;
491  }
492 
493  TString title = vars[1] + " vs. " + vars[0];
494 
495  if (TString(sel) != "") title = title + ", " + sel;
496  TH2D* h = m.dist(funcs[0], args[0], funcs[1], args[1], vars[0] + "_" + vars[1],
497  nBinsX, xMin, xMax, nBinsY, yMin, yMax,
498  title, vars[0], vars[1], f);
499  if (!h) return nullptr;
500  h->Draw(opt);
501  return h;
502 }

◆ DrawEtaPhi()

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

Definition at line 532 of file Interface.cxx.

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

◆ DrawPartition()

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

Definition at line 505 of file Interface.cxx.

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

◆ dumpEventTuple()

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

Definition at line 783 of file Interface.cxx.

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

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

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

◆ filter() [2/2]

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

Definition at line 352 of file Interface.cxx.

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

◆ filterAndMerge()

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

Definition at line 282 of file Interface.cxx.

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

◆ findEtaPhi()

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

Definition at line 404 of file Interface.cxx.

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

◆ findFebChannel()

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

Definition at line 421 of file Interface.cxx.

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

◆ findFTSlotChannel()

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

Definition at line 436 of file Interface.cxx.

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

◆ firstNeighbors()

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

Definition at line 735 of file Interface.cxx.

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

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

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

◆ getCellInfo()

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

Reimplemented from LArSamples::AbsLArCells.

Definition at line 125 of file Interface.cxx.

126 {
127  return accessor().getCellInfo(i);
128 }

◆ highEData()

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

Definition at line 177 of file Interface.cxx.

178 {
179  std::vector<unsigned int> hashV, indexV;
180  unsigned int nTot = 0;
181 
182  for (unsigned int i = 0; i < nChannels(); i++) {
183  const History* history = cellHistory(i);
184  if (!history) continue;
185  for (unsigned int j = 0; j < history->nData(); j++) {
186  const Data& data = *history->data(j);
187  nTot++;
188  if (data.isDisconnected()) continue;
189  if (nTot % 10000 == 0) cout << nTot << endl;
190  if (data.energy() > eCut) {
191  cout << "E = " << data.energy() << " " << i << " " << j << endl;
192  hashV.push_back(i);
193  indexV.push_back(j);
194  }
195  }
196  }
197 
198  hashes.Set(hashV.size());
199  indices.Set(indexV.size());
200 
201  for (unsigned int i = 0; i < hashV.size(); i++) {
202  hashes[i] = hashV[i];
203  indices[i] = indexV[i];
204  }
205 
206  cout << hashV.size() << "/" << nTot << endl;
207  return true;
208 }

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

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

◆ makeTemplate()

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

Definition at line 387 of file Interface.cxx.

388 {
390  return new Interface(*newAcc);
391 }

◆ merge() [1/6]

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

Definition at line 226 of file Interface.cxx.

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

◆ merge() [2/6]

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

Definition at line 244 of file Interface.cxx.

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

◆ merge() [3/6]

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

Definition at line 235 of file Interface.cxx.

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

◆ merge() [4/6]

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

Definition at line 253 of file Interface.cxx.

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

◆ merge() [5/6]

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

Definition at line 263 of file Interface.cxx.

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

◆ merge() [6/6]

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

Definition at line 272 of file Interface.cxx.

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

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

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

◆ 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 42 of file AbsLArCells.cxx.

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

◆ nFilledChannels()

unsigned int Interface::nFilledChannels ( ) const

Definition at line 131 of file Interface.cxx.

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

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

41 {
43  return (accessor ? new Interface(*accessor) : nullptr);
44 }

◆ open() [2/2]

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

Definition at line 33 of file Interface.cxx.

34 {
36  return (accessor ? new Interface(*accessor) : nullptr);
37 }

◆ openList()

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

Definition at line 47 of file Interface.cxx.

48 {
50  return (accessor ? new Interface(*accessor) : nullptr);
51 }

◆ openWild()

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

Definition at line 54 of file Interface.cxx.

55 {
57  return (accessor ? new Interface(*accessor) : nullptr);
58 }

◆ pass()

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

Definition at line 97 of file AbsLArCells.cxx.

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

◆ printFilledRanges()

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

Definition at line 140 of file Interface.cxx.

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

◆ refit()

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

Definition at line 394 of file Interface.cxx.

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

◆ resetCache()

void AbsLArCells::resetCache ( ) const
virtualinherited

Definition at line 32 of file AbsLArCells.cxx.

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

◆ resetCellInfoCache()

void AbsLArCells::resetCellInfoCache ( )
inherited

Definition at line 112 of file AbsLArCells.cxx.

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

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

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

◆ Scan() [2/2]

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

Definition at line 558 of file Interface.cxx.

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

◆ setShapeError() [1/2]

void Interface::setShapeError ( const TString &  fileName)

Definition at line 88 of file Interface.cxx.

◆ setShapeError() [2/2]

void Interface::setShapeError ( double  k)

Definition at line 79 of file Interface.cxx.

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

◆ setShapeErrorGetter()

void Interface::setShapeErrorGetter ( const AbsShapeErrorGetter err)

Definition at line 71 of file Interface.cxx.

72 {
75  m_ownShapeErrorGetter = false;
76 }

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

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

◆ Show() [2/2]

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

Definition at line 576 of file Interface.cxx.

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

◆ ShowEvents()

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

Definition at line 603 of file Interface.cxx.

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

◆ ShowRuns()

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

Definition at line 635 of file Interface.cxx.

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

◆ ShowStats()

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

Definition at line 656 of file Interface.cxx.

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

◆ size()

unsigned int Interface::size ( ) const

Definition at line 94 of file Interface.cxx.

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

◆ 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:96
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:42
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:42
checkCoolLatestUpdate.variables
variables
Definition: checkCoolLatestUpdate.py:13
LArSamples::DataTweaker::setRefit
void setRefit(bool refit=true)
Definition: DataTweaker.h:38
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:74
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:61
LArSamples::AbsLArCells::cellHistory
virtual const History * cellHistory(unsigned int i) const
Definition: AbsLArCells.cxx:57
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:40
LArSamples::MultiTreeAccessor::filterComponents
std::vector< MultiTreeAccessor * > filterComponents(const FilterList &filterList, const DataTweaker &tweaker) const
Definition: MultiTreeAccessor.cxx:215
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:94
LArSamples::Interface::neighbors
bool neighbors(const CellInfo &cell, double dRCut, std::vector< unsigned int > &hashes) const
Definition: Interface.cxx:721
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:114
LArSamples::AbsLArCells::cellInfo
virtual const CellInfo * cellInfo(unsigned int i) const
Definition: AbsLArCells.cxx:69
CscCalibQuery.fileList
fileList
Definition: CscCalibQuery.py:330
LArSamples::Interface::addSuffix
static TString addSuffix(const TString &fileName, const TString &suffix)
Definition: Interface.cxx:371
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:280
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:25
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:89
LArSamples::History::setInterface
void setInterface(const Interface *interface) const
Definition: History.h:112
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:70
LArSamples::AbsLArCells::getCellInfo
virtual const CellInfo * getCellInfo(unsigned int i) const
Definition: AbsLArCells.cxx:86
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:92
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:427
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:23
LArSamples::History::nData
unsigned int nData() const
Definition: History.h:56
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:73
LArSamples::DataTweaker::setFitParams
void setFitParams(Chi2Params params)
Definition: DataTweaker.h:39
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:97
LArSamples::AbsLArCells::cellInfoCache
const CellInfo * cellInfoCache(unsigned int i) const
Definition: AbsLArCells.cxx:80
LArSamples::Interface::open
static Interface * open(const TString &fileName)
Definition: Interface.cxx:33
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
LArSamples::Data
Definition: Data.h:77
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:31
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:226
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:294
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:71
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:760
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:572
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:47
LArSamples::History::isValid
bool isValid() const
Definition: History.cxx:150
LArSamples::TreeAccessor
Definition: TreeAccessor.h:32
LArSamples::Interface::filter
Interface * filter(const TString &sel, const TString &fileName, const TString &tweaks="") const
Definition: Interface.cxx:352
LArSamples::FilterList::size
unsigned int size() const
Definition: FilterList.h:29
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:74
LArSamples::Interface::begin
HistoryIterator begin(unsigned int pos=0, double eMin=-1, double adcMaxMin=-1) const
Definition: Interface.cxx:171
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:113
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:28
LArSamples::Interface::runData
const RunData * runData(unsigned int i) const
Definition: Interface.h:55
LArSamples::UniformShapeErrorGetter
Definition: UniformShapeErrorGetter.h:17