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 59 of file DTVDriftCalibration.h.

Constructor & Destructor Documentation

◆ cellInfo() [1/3]

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

Definition at line 61 of file DTVDriftCalibration.h.

References histos, and Skims_PA_cff::name.

◆ ~cellInfo()

DTVDriftCalibration::cellInfo::~cellInfo ( )
inline

Definition at line 63 of file DTVDriftCalibration.h.

References histos.

63 { delete histos; }

◆ cellInfo() [2/3]

DTVDriftCalibration::cellInfo::cellInfo ( )
inlineprivate

Definition at line 70 of file DTVDriftCalibration.h.

70 {};

◆ cellInfo() [3/3]

DTVDriftCalibration::cellInfo::cellInfo ( const cellInfo )
inlineprivate

Definition at line 71 of file DTVDriftCalibration.h.

71 {};

Member Function Documentation

◆ add()

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

Definition at line 409 of file DTVDriftCalibration.cc.

References addedCells, dttmaxenums::c123, dttmaxenums::c124, dttmaxenums::c134, dttmaxenums::c234, cells, gather_cfg::cout, hTMaxCell::Fill(), spr::find(), histos, dttmaxenums::noR, dttmaxenums::notInit, and submitPVValidationJobs::t.

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

409  {
410  vector<const TMax*> tMaxes = _tMaxes;
411  float tmax123 = -1.;
412  float tmax124 = -1.;
413  float tmax134 = -1.;
414  float tmax234 = -1.;
415  SigmaFactor s124 = noR;
416  SigmaFactor s134 = noR;
417  unsigned t0_123 = 0;
418  unsigned t0_124 = 0;
419  unsigned t0_134 = 0;
420  unsigned t0_234 = 0;
421  unsigned hSubGroup = 0;
422  for (vector<const TMax*>::const_iterator it = tMaxes.begin(); it != tMaxes.end(); ++it) {
423  if (*it == nullptr) {
424  continue;
425  } else {
426  //FIXME check cached,
427  if (addedCells.size() == 4 || find(addedCells.begin(), addedCells.end(), (*it)->cells) != addedCells.end()) {
428  continue;
429  }
430  addedCells.push_back((*it)->cells);
431  SigmaFactor sigma = (*it)->sigma;
432  float t = (*it)->t;
433  TMaxCells cells = (*it)->cells;
434  unsigned t0Factor = (*it)->t0Factor;
435  hSubGroup = (*it)->hSubGroup;
436  if (t < 0.)
437  continue;
438  switch (cells) {
439  case notInit:
440  cout << "Error: no cell type assigned to TMax" << endl;
441  break;
442  case c123:
443  tmax123 = t;
444  t0_123 = t0Factor;
445  break;
446  case c124:
447  tmax124 = t;
448  s124 = sigma;
449  t0_124 = t0Factor;
450  break;
451  case c134:
452  tmax134 = t;
453  s134 = sigma;
454  t0_134 = t0Factor;
455  break;
456  case c234:
457  tmax234 = t;
458  t0_234 = t0Factor;
459  break;
460  }
461  }
462  }
463  //add entries to the TMax histograms
464  histos->Fill(tmax123, tmax124, tmax134, tmax234, s124, s134, t0_123, t0_124, t0_134, t0_234, hSubGroup);
465 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
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:209
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ cells
std::vector< dttmaxenums::TMaxCells > addedCells

◆ getHists()

hTMaxCell* DTVDriftCalibration::cellInfo::getHists ( )
inline

Definition at line 67 of file DTVDriftCalibration.h.

References histos.

Referenced by DTVDriftCalibration::endJob().

67 { return histos; }

◆ update()

void DTVDriftCalibration::cellInfo::update ( )
inline

Member Data Documentation

◆ addedCells

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

Definition at line 71 of file DTVDriftCalibration.h.

Referenced by add(), and update().

◆ histos

hTMaxCell* DTVDriftCalibration::cellInfo::histos
private