CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTVDriftCalibration::cellInfo Class Reference

Public Member Functions

void add (const std::vector< const TMax * > &tMaxes)
 
 cellInfo (const TString &name)
 
hTMaxCellgetHists ()
 
void update ()
 
 ~cellInfo ()
 

Private Member Functions

 cellInfo ()
 
 cellInfo (const cellInfo &)
 

Private Attributes

std::vector< dttmaxenums::TMaxCellsaddedCells
 
hTMaxCellhistos
 

Detailed Description

Definition at line 58 of file DTVDriftCalibration.h.

Constructor & Destructor Documentation

DTVDriftCalibration::cellInfo::cellInfo ( const TString &  name)
inline

Definition at line 60 of file DTVDriftCalibration.h.

References plotFactory::histos.

60  {
61  histos = new hTMaxCell(name);
62  }
DTVDriftCalibration::cellInfo::~cellInfo ( )
inline

Definition at line 64 of file DTVDriftCalibration.h.

References PVValHelper::add(), and plotFactory::histos.

64  {
65  delete histos;
66  }
DTVDriftCalibration::cellInfo::cellInfo ( )
inlineprivate

Definition at line 73 of file DTVDriftCalibration.h.

73 {};
DTVDriftCalibration::cellInfo::cellInfo ( const cellInfo )
inlineprivate

Definition at line 74 of file DTVDriftCalibration.h.

74 {};

Member Function Documentation

void DTVDriftCalibration::cellInfo::add ( const std::vector< const TMax * > &  tMaxes)

Definition at line 399 of file DTVDriftCalibration.cc.

References dttmaxenums::c123, dttmaxenums::c124, dttmaxenums::c134, dttmaxenums::c234, postprocess-scan-build::cells, gather_cfg::cout, spr::find(), plotFactory::histos, dttmaxenums::noR, dttmaxenums::notInit, and protons_cff::t.

Referenced by DTVDriftCalibration::analyze(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

399  {
400  vector<const TMax*> tMaxes = _tMaxes;
401  float tmax123 = -1.;
402  float tmax124 = -1.;
403  float tmax134 = -1.;
404  float tmax234 = -1.;
405  SigmaFactor s124 = noR;
406  SigmaFactor s134 = noR;
407  unsigned t0_123 = 0;
408  unsigned t0_124 = 0;
409  unsigned t0_134 = 0;
410  unsigned t0_234 = 0;
411  unsigned hSubGroup = 0;
412  for (vector<const TMax*>::const_iterator it=tMaxes.begin(); it!=tMaxes.end();
413  ++it) {
414  if(*it == nullptr) {
415  continue;
416  }
417  else {
418  //FIXME check cached,
419  if (addedCells.size()==4 ||
420  find(addedCells.begin(), addedCells.end(), (*it)->cells)
421  != addedCells.end()) {
422  continue;
423  }
424  addedCells.push_back((*it)->cells);
425  SigmaFactor sigma = (*it)->sigma;
426  float t = (*it)->t;
427  TMaxCells cells = (*it)->cells;
428  unsigned t0Factor = (*it)->t0Factor;
429  hSubGroup = (*it)->hSubGroup;
430  if(t < 0.) continue;
431  switch(cells) {
432  case notInit : cout << "Error: no cell type assigned to TMax" << endl; break;
433  case c123 : tmax123 =t; t0_123 = t0Factor; break;
434  case c124 : tmax124 =t; s124 = sigma; t0_124 = t0Factor; break;
435  case c134 : tmax134 =t; s134 = sigma; t0_134 = t0Factor; break;
436  case c234 : tmax234 =t; t0_234 = t0Factor; break;
437  }
438  }
439  }
440  //add entries to the TMax histograms
441  histos->Fill(tmax123, tmax124, tmax134, tmax234, s124, s134, t0_123,
442  t0_124, t0_134, t0_234, hSubGroup);
443 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
void Fill(float tmax123, float tmax124, float tmax134, float tmax234, dttmaxenums::SigmaFactor s124, dttmaxenums::SigmaFactor s134, unsigned t0_123, unsigned t0_124, unsigned t0_134, unsigned t0_234, unsigned hSubGroup)
Definition: vDriftHistos.h:220
std::vector< dttmaxenums::TMaxCells > addedCells
hTMaxCell* DTVDriftCalibration::cellInfo::getHists ( )
inline

Definition at line 70 of file DTVDriftCalibration.h.

References plotFactory::histos.

Referenced by DTVDriftCalibration::endJob().

70 {return histos;}
void DTVDriftCalibration::cellInfo::update ( )
inline

Definition at line 69 of file DTVDriftCalibration.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), DTVDriftCalibration::analyze(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

69 {addedCells.clear();}
std::vector< dttmaxenums::TMaxCells > addedCells

Member Data Documentation

std::vector<dttmaxenums::TMaxCells> DTVDriftCalibration::cellInfo::addedCells
private

Definition at line 74 of file DTVDriftCalibration.h.

hTMaxCell* DTVDriftCalibration::cellInfo::histos
private

Definition at line 77 of file DTVDriftCalibration.h.

Referenced by DisplayManager.DisplayManager::Draw().