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

Constructor & Destructor Documentation

◆ cellInfo() [1/3]

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

Definition at line 59 of file DTVDriftCalibration.h.

59 { histos = new hTMaxCell(name); }

References histos, and Skims_PA_cff::name.

◆ ~cellInfo()

DTVDriftCalibration::cellInfo::~cellInfo ( )
inline

Definition at line 61 of file DTVDriftCalibration.h.

61 { delete histos; }

References histos.

◆ cellInfo() [2/3]

DTVDriftCalibration::cellInfo::cellInfo ( )
inlineprivate

Definition at line 68 of file DTVDriftCalibration.h.

68 {};

◆ cellInfo() [3/3]

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

Definition at line 69 of file DTVDriftCalibration.h.

69 {};

Member Function Documentation

◆ add()

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

Definition at line 392 of file DTVDriftCalibration.cc.

392  {
393  vector<const TMax*> tMaxes = _tMaxes;
394  float tmax123 = -1.;
395  float tmax124 = -1.;
396  float tmax134 = -1.;
397  float tmax234 = -1.;
398  SigmaFactor s124 = noR;
399  SigmaFactor s134 = noR;
400  unsigned t0_123 = 0;
401  unsigned t0_124 = 0;
402  unsigned t0_134 = 0;
403  unsigned t0_234 = 0;
404  unsigned hSubGroup = 0;
405  for (vector<const TMax*>::const_iterator it = tMaxes.begin(); it != tMaxes.end(); ++it) {
406  if (*it == nullptr) {
407  continue;
408  } else {
409  //FIXME check cached,
410  if (addedCells.size() == 4 || find(addedCells.begin(), addedCells.end(), (*it)->cells) != addedCells.end()) {
411  continue;
412  }
413  addedCells.push_back((*it)->cells);
414  SigmaFactor sigma = (*it)->sigma;
415  float t = (*it)->t;
416  TMaxCells cells = (*it)->cells;
417  unsigned t0Factor = (*it)->t0Factor;
418  hSubGroup = (*it)->hSubGroup;
419  if (t < 0.)
420  continue;
421  switch (cells) {
422  case notInit:
423  cout << "Error: no cell type assigned to TMax" << endl;
424  break;
425  case c123:
426  tmax123 = t;
427  t0_123 = t0Factor;
428  break;
429  case c124:
430  tmax124 = t;
431  s124 = sigma;
432  t0_124 = t0Factor;
433  break;
434  case c134:
435  tmax134 = t;
436  s134 = sigma;
437  t0_134 = t0Factor;
438  break;
439  case c234:
440  tmax234 = t;
441  t0_234 = t0Factor;
442  break;
443  }
444  }
445  }
446  //add entries to the TMax histograms
447  histos->Fill(tmax123, tmax124, tmax134, tmax234, s124, s134, t0_123, t0_124, t0_134, t0_234, hSubGroup);
448 }

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.Task::remove(), and SequenceTypes.Task::replace().

◆ getHists()

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

Definition at line 65 of file DTVDriftCalibration.h.

65 { return histos; }

References histos.

Referenced by DTVDriftCalibration::endJob().

◆ update()

void DTVDriftCalibration::cellInfo::update ( )
inline

Member Data Documentation

◆ addedCells

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

Definition at line 69 of file DTVDriftCalibration.h.

Referenced by add(), and update().

◆ histos

hTMaxCell* DTVDriftCalibration::cellInfo::histos
private
dttmaxenums::c134
Definition: DTTMax.h:27
hTMaxCell::Fill
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
gather_cfg.cout
cout
Definition: gather_cfg.py:144
dttmaxenums::noR
Definition: DTTMax.h:28
cells
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ cells
Definition: CAHitNtupletGeneratorKernelsImpl.h:33
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
dttmaxenums::TMaxCells
TMaxCells
Definition: DTTMax.h:27
DTVDriftCalibration::cellInfo::addedCells
std::vector< dttmaxenums::TMaxCells > addedCells
Definition: DTVDriftCalibration.h:69
dttmaxenums::SigmaFactor
SigmaFactor
Definition: DTTMax.h:28
dttmaxenums::c123
Definition: DTTMax.h:27
dttmaxenums::notInit
Definition: DTTMax.h:27
DTVDriftCalibration::cellInfo::histos
hTMaxCell * histos
Definition: DTVDriftCalibration.h:72
hTMaxCell
Definition: vDriftHistos.h:111
dttmaxenums::c234
Definition: DTTMax.h:27
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dttmaxenums::c124
Definition: DTTMax.h:27
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644