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
 
TH1DDraw (const TString &var, int nBins, double xMin, double xMax, const TString &sel="", const TString &opt="") const
 
TH2DDraw (const TString &varList, int nBinsX, double xMin, double xMax, int nBinsY, double yMin, double yMax, const TString &sel="", const TString &opt="") const
 
TH2DDrawPartition (PartitionId partition, const TString &var, const TString &sel="", const TString &opt="", CombinationType comb=TotalValue) const
 
TH2DDrawEtaPhi (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 363 of file Interface.cxx.

364 {
365  TString rootName = fileName;
366  if (fileName(fileName.Length() - 5, 5) == ".root") rootName = fileName(0, fileName.Length() - 5);
367 
368  return rootName + "_" + suffix + ".root";
369 }

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

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

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

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

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

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

◆ DrawEtaPhi()

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

Definition at line 524 of file Interface.cxx.

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

◆ DrawPartition()

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

Definition at line 497 of file Interface.cxx.

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

◆ dumpEventTuple()

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

Definition at line 775 of file Interface.cxx.

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

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

373 {
374  TreeAccessor* newAcc = TreeAccessor::filter(accessor(), filterParams, fileName, tweaker);
375  return new Interface(*newAcc);
376 }

◆ filter() [2/2]

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

Definition at line 346 of file Interface.cxx.

347 {
348  FilterParams f;
349  if (!f.set(sel)) return nullptr;
350 
351  DataTweaker tweak;
352  if (!tweak.set(tweaks)) return nullptr;
353 
354  TString thisFN = fileName;
355  if (thisFN.Index(".root") < 0 && dynamic_cast<const TreeAccessor*>(&accessor())) {
356  TString newFN = addSuffix(dynamic_cast<const TreeAccessor*>(&accessor())->fileName(), fileName);
357  if (newFN != "") thisFN = newFN;
358  }
359  return filter(f, tweak, thisFN);
360 }

◆ 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) return 0;
320  std::vector<MultiTreeAccessor*> filtered_mts = mt->filterComponents(filterList, tweak);
321  if (filtered_mts.size() != filterList.size()) return 0;
322  delete multi;
323  cout << "Component filtering done!" << endl;
324  // The following line should work, but doesn't... so the block of code below replaces it.
325  //Interface* filtered_multi = new Interface(*filtered_mt);
326  //
327  for (unsigned int f = 0; f < filtered_mts.size(); f++) {
328  std::vector<TString> files;
329  for (unsigned int i = 0; i < filtered_mts[f]->nAccessors(); i++) {
330  files.push_back(((const TreeAccessor*)&filtered_mts[f]->accessor(i))->fileName());
331  cout << "Added " << files.back() << endl;
332  }
333  delete filtered_mts[f];
334  Interface* filtered_multi = open(files);
335  //
336  std::vector<const Interface*> justOne;
337  justOne.push_back(filtered_multi);
338  Interface* interface = merge(justOne, filterList.fileName(f));
339  delete interface;
340  }
341 
342  return true;
343 }

◆ findEtaPhi()

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

Definition at line 396 of file Interface.cxx.

397 {
398  for (unsigned int i = 0; i < nChannels(); i++) {
399  const CellInfo* info = cellInfo(i);
400  if (!info) continue;
401  if (!Id::matchCalo(info->calo(), calo)) continue;
402  if (info->layer() != layer) continue;
403  if (info->iEta() != iEta) continue;
404  if (info->iPhi() != iPhi) continue;
405  if (info->region() != region) continue;
406  return HistoryIterator(*this, i);
407  }
408 
409  return HistoryIterator(*this, end());
410 }

◆ findFebChannel()

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

Definition at line 413 of file Interface.cxx.

414 {
415  for (unsigned int i = 0; i < nChannels(); i++) {
416  const CellInfo* info = cellInfo(i);
417  if (!info) continue;
418  if (!Id::matchCalo(info->calo(), calo)) continue;
419  if (info->feb() != feb) continue;
420  if (info->channel() != channel) continue;
421  return HistoryIterator(*this, i);
422  }
423 
424  return HistoryIterator(*this, end());
425 }

◆ findFTSlotChannel()

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

Definition at line 428 of file Interface.cxx.

429 {
430  for (unsigned int i = 0; i < nChannels(); i++) {
431  const CellInfo* info = cellInfo(i);
432  if (!info) continue;
433  if (!Id::matchCalo(info->calo(), calo)) continue;
434  if (ft >= 0 && info->feedThrough() != ft) continue;
435  if (slot >= 0 && info->slot() != slot) continue;
436  if (channel >= 0 && info->channel() != channel) continue;
437  return HistoryIterator(*this, i);
438  }
439 
440  return HistoryIterator(*this, end());
441 }

◆ firstNeighbors()

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

Definition at line 727 of file Interface.cxx.

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

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

380 {
382  return new Interface(*newAcc);
383 }

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

714 {
715  for (unsigned int i = 0; i < nChannels(); i++) {
716  const CellInfo* otherCell = cellInfo(i);
717  if (!otherCell) continue;
718  if (cell.position().DeltaR(otherCell->position()) > dRCut) { delete otherCell; continue; }
719  //cout << "Adding hash = " << i << " " << otherCell->location(3) << endl;
720  hashes.push_back(i);
721  delete otherCell;
722  }
723  return true;
724 }

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

387 {
388  FilterParams f;
389  DataTweaker tw;
390  tw.setRefit(true);
391  tw.setFitParams(pars);
392  return filter(f, tw, newFileName);
393 }

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

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

◆ Scan() [2/2]

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

Definition at line 550 of file Interface.cxx.

551 {
552  MonitorBase m(*this);
553  FilterParams f;
554  if (!f.set(sel)) return 0;
555  return m.dump(vars, f, verbosity);
556 }

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

577 {
578  FilterParams f;
579  if (!f.set(sel)) return false;
580  for (unsigned int i = 0; i < nChannels(); i++) {
581  const History* history = pass(i, f);
582  if (!history) continue;
583  History* filtered = history->filter(sel);
584  TString hDesc = filtered->description(verbosity);
585  delete filtered;
586  if (hDesc == "") continue;
587  cout << Form("Hash = %-5d : ", i) << hDesc
588  << "-----------------------------------------------------------------------------"
589  << endl;
590  }
591  return true;
592 }

◆ Show() [2/2]

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

Definition at line 568 of file Interface.cxx.

569 {
570  const History* history = cellHistory(hash);
571  if (!history) return false;
572  cout << history->description(verbosity) << endl;
573  return true;
574 }

◆ ShowEvents()

bool Interface::ShowEvents ( 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  std::map< std::pair<unsigned int, unsigned int>, unsigned int > eventCells;
600  std::map< std::pair<unsigned int, unsigned int>, double > eventEnergy;
601 
602  if (verbosity & 8) {
603  for (unsigned int i = 0; i < nChannels(); i++) {
604  if ((i+1) % 50000 == 0) cout << "Cell # " << i+1 << "/" << nChannels() << endl;
605  const History* history = pass(i, f);
606  if (!history) continue;
607  for (unsigned int j = 0; j < history->nData(); j++) {
608  std::pair<unsigned int, unsigned int> ev = std::make_pair(history->data(j)->run(), history->data(j)->event());
609  eventCells[ev]++;
610  eventEnergy[ev] += history->data(j)->energy();
611  }
612  }
613  }
614  for (unsigned int i = 0; i < nEvents(); i++) {
615  const EventData* evtData = eventData(i);
616  std::pair<unsigned int, unsigned int> id(evtData->run(), evtData->event());
617  TString printout = Form("%d : ", i) + evtData->description(verbosity);
618  if (verbosity & 8)
619  printout += Form(" : %6d LAr hits, %7.1f MeV", eventCells[id], eventEnergy[id]);
620  cout << printout << endl;
621  }
622 
623  return true;
624 }

◆ ShowRuns()

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

Definition at line 627 of file Interface.cxx.

628 {
629  std::map<unsigned int, unsigned int> events;
630 
631  if (verbosity & 8) {
632  for (unsigned int i = 0; i < nEvents(); i++)
633  events[eventData(i)->run()]++;
634  }
635 
636  for (unsigned int i = 0; i < nRuns(); i++) {
637  const RunData* rData = runData(i);
638  TString printout = rData->description(verbosity);
639  if (verbosity & 8)
640  printout += Form(" : %6d events", events[rData->run()]);
641  cout << printout << endl;
642  }
643 
644  return true;
645 }

◆ ShowStats()

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

Definition at line 648 of file Interface.cxx.

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

◆ 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:95
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
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:40
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
LArSamples::FilterParams
Definition: FilterParams.h:50
checkxAOD.fileNames
fileNames
Definition: Tools/PyUtils/bin/checkxAOD.py:73
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
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:223
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:713
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:363
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:279
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:88
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: Definitions.h:14
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:193
LArSamples::Interface::m_neighborHistories
std::vector< const History * > m_neighborHistories
Definition: Interface.h:140
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArSamples::Accessor::runData
virtual const RunData * runData(unsigned int i) const =0
h
beamspotman.n
n
Definition: beamspotman.py:731
extractSporadic.h
list h
Definition: extractSporadic.py:97
LArSamples::MultiTreeAccessor::openWild
static MultiTreeAccessor * openWild(const TString &wcName)
Definition: MultiTreeAccessor.cxx:71
LArSamples::AbsLArCells::getCellInfo
virtual const CellInfo * getCellInfo(unsigned int i) const
Definition: AbsLArCells.cxx: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: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:425
LArSamples::EventData::run
int run() const
Definition: EventData.cxx:59
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:41
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:191
LArSamples::Data
Definition: Data.h:77
LArSamples::MultiTreeAccessor
Definition: MultiTreeAccessor.h:27
pmontree.opt
opt
Definition: pmontree.py:16
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:53
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:292
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
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:752
beamspotnt.varList
list varList
Definition: bin/beamspotnt.py:1108
LArSamples::Interface
Definition: Interface.h:36
xAODRootTest.accessors
dictionary accessors
Definition: xAODRootTest.py:67
LArSamples::History::description
TString description(unsigned int verbosity=1) const
Definition: History.cxx:573
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:149
LArSamples::TreeAccessor
Definition: TreeAccessor.h:32
LArSamples::Interface::filter
Interface * filter(const TString &sel, const TString &fileName, const TString &tweaks="") const
Definition: Interface.cxx:346
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