CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTVDriftCalibration::cellInfo Class Reference

Public Member Functions

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

Private Member Functions

 cellInfo ()
 
 cellInfo (const cellInfo &)
 

Private Attributes

std::vector
< dttmaxenums::TMaxCells
addedCells
 
hTMaxCellhistos
 

Detailed Description

Definition at line 56 of file DTVDriftCalibration.h.

Constructor & Destructor Documentation

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

Definition at line 58 of file DTVDriftCalibration.h.

References histos.

DTVDriftCalibration::cellInfo::~cellInfo ( )
inline

Definition at line 62 of file DTVDriftCalibration.h.

References histos.

62  {
63  delete histos;
64  }
DTVDriftCalibration::cellInfo::cellInfo ( )
inlineprivate

Definition at line 71 of file DTVDriftCalibration.h.

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

Definition at line 72 of file DTVDriftCalibration.h.

72 {};

Member Function Documentation

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

Definition at line 470 of file DTVDriftCalibration.cc.

References dttmaxenums::c123, dttmaxenums::c124, dttmaxenums::c134, dttmaxenums::c234, gather_cfg::cout, spr::find(), combine::histos, dttmaxenums::noR, dttmaxenums::notInit, ExpressReco_HICollisions_FallBack::sigma, and matplotRender::t.

Referenced by DTVDriftCalibration::analyze().

470  {
471  float tmax123 = -1.;
472  float tmax124 = -1.;
473  float tmax134 = -1.;
474  float tmax234 = -1.;
475  SigmaFactor s124 = noR;
476  SigmaFactor s134 = noR;
477  unsigned t0_123 = 0;
478  unsigned t0_124 = 0;
479  unsigned t0_134 = 0;
480  unsigned t0_234 = 0;
481  unsigned hSubGroup = 0;
482  for (vector<const TMax*>::const_iterator it=tMaxes.begin(); it!=tMaxes.end();
483  ++it) {
484  if(*it == 0) {
485  continue;
486  }
487  else {
488  //FIXME check cached,
489  if (addedCells.size()==4 ||
490  find(addedCells.begin(), addedCells.end(), (*it)->cells)
491  != addedCells.end()) {
492  continue;
493  }
494  addedCells.push_back((*it)->cells);
495  SigmaFactor sigma = (*it)->sigma;
496  float t = (*it)->t;
497  TMaxCells cells = (*it)->cells;
498  unsigned t0Factor = (*it)->t0Factor;
499  hSubGroup = (*it)->hSubGroup;
500  if(t < 0.) continue;
501  switch(cells) {
502  case notInit : cout << "Error: no cell type assigned to TMax" << endl; break;
503  case c123 : tmax123 =t; t0_123 = t0Factor; break;
504  case c124 : tmax124 =t; s124 = sigma; t0_124 = t0Factor; break;
505  case c134 : tmax134 =t; s134 = sigma; t0_134 = t0Factor; break;
506  case c234 : tmax234 =t; t0_234 = t0Factor; break;
507  }
508  }
509  }
510  //add entries to the TMax histograms
511  histos->Fill(tmax123, tmax124, tmax134, tmax234, s124, s134, t0_123,
512  t0_124, t0_134, t0_234, hSubGroup);
513 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
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
tuple cout
Definition: gather_cfg.py:41
std::vector< dttmaxenums::TMaxCells > addedCells
hTMaxCell* DTVDriftCalibration::cellInfo::getHists ( )
inline

Definition at line 68 of file DTVDriftCalibration.h.

References histos.

Referenced by DTVDriftCalibration::endJob().

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

Definition at line 67 of file DTVDriftCalibration.h.

References addedCells.

Referenced by python.seqvaluedict.seqdict::__setslice__(), DTVDriftCalibration::analyze(), python.Vispa.Gui.VispaWidget.VispaWidget::autosize(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), python.Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.seqvaluedict.seqdict::extend(), python.Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), python.Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), python.Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), python.Vispa.Gui.FindDialog.FindDialog::reset(), python.Vispa.Gui.PortConnection.PointToPointConnection::select(), python.Vispa.Gui.VispaWidget.VispaWidget::select(), python.Vispa.Views.LineDecayView.LineDecayContainer::select(), python.Vispa.Gui.VispaWidget.VispaWidget::setText(), python.Vispa.Gui.VispaWidget.VispaWidget::setTitle(), python.Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), python.Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and python.Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

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

Member Data Documentation

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

Definition at line 72 of file DTVDriftCalibration.h.

Referenced by update().

hTMaxCell* DTVDriftCalibration::cellInfo::histos
private

Definition at line 75 of file DTVDriftCalibration.h.

Referenced by cellInfo(), getHists(), and ~cellInfo().