CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ESRecHitWorker Class Reference

#include <ESRecHitWorker.h>

Inheritance diagram for ESRecHitWorker:
ESRecHitWorkerBaseClass

Public Member Functions

 ESRecHitWorker (const edm::ParameterSet &ps, edm::ConsumesCollector cc)
 
bool run (const ESDigiCollection::const_iterator &digi, ESRecHitCollection &result) override
 
void set (const edm::EventSetup &es) override
 
 ~ESRecHitWorker () override
 
- Public Member Functions inherited from ESRecHitWorkerBaseClass
 ESRecHitWorkerBaseClass (const edm::ParameterSet &)
 
virtual ~ESRecHitWorkerBaseClass ()
 

Private Attributes

ESRecHitAnalyticAlgoalgoA_
 
ESRecHitFitAlgoalgoF_
 
ESRecHitSimAlgoalgoW_
 
edm::ESHandle< ESAngleCorrectionFactorsesAngleCorrFactors_
 
edm::ESGetToken< ESAngleCorrectionFactors, ESAngleCorrectionFactorsRcdesAngleCorrFactorsToken_
 
edm::ESHandle< ESChannelStatusesChannelStatus_
 
edm::ESGetToken< ESChannelStatus, ESChannelStatusRcdesChannelStatusToken_
 
edm::ESHandle< ESGainesgain_
 
edm::ESGetToken< ESGain, ESGainRcdesgainToken_
 
edm::ESHandle< ESIntercalibConstantsesMIPs_
 
edm::ESGetToken< ESIntercalibConstants, ESIntercalibConstantsRcdesMIPsToken_
 
edm::ESHandle< ESMIPToGeVConstantesMIPToGeV_
 
edm::ESGetToken< ESMIPToGeVConstant, ESMIPToGeVConstantRcdesMIPToGeVToken_
 
edm::ESHandle< ESPedestalsesPedestals_
 
edm::ESGetToken< ESPedestals, ESPedestalsRcdesPedestalsToken_
 
edm::ESHandle< ESRecHitRatioCutsesRatioCuts_
 
edm::ESGetToken< ESRecHitRatioCuts, ESRecHitRatioCutsRcdesRatioCutsToken_
 
edm::ESHandle< ESTimeSampleWeightsesWeights_
 
edm::ESGetToken< ESTimeSampleWeights, ESTimeSampleWeightsRcdesWeightsToken_
 
int recoAlgo_
 

Detailed Description

Definition at line 37 of file ESRecHitWorker.h.

Constructor & Destructor Documentation

◆ ESRecHitWorker()

ESRecHitWorker::ESRecHitWorker ( const edm::ParameterSet ps,
edm::ConsumesCollector  cc 
)

◆ ~ESRecHitWorker()

ESRecHitWorker::~ESRecHitWorker ( )
override

Definition at line 32 of file ESRecHitWorker.cc.

32  {
33  if (recoAlgo_ == 0)
34  delete algoW_;
35  else if (recoAlgo_ == 1)
36  delete algoF_;
37  else
38  delete algoA_;
39 }

References algoA_, algoF_, algoW_, and recoAlgo_.

Member Function Documentation

◆ run()

bool ESRecHitWorker::run ( const ESDigiCollection::const_iterator digi,
ESRecHitCollection result 
)
overridevirtual

Implements ESRecHitWorkerBaseClass.

Definition at line 103 of file ESRecHitWorker.cc.

103  {
104  if (recoAlgo_ == 0)
105  result.push_back(algoW_->reconstruct(*itdg));
106  else if (recoAlgo_ == 1)
107  result.push_back(algoF_->reconstruct(*itdg));
108  else
109  result.push_back(algoA_->reconstruct(*itdg));
110  return true;
111 }

References algoA_, algoF_, algoW_, recoAlgo_, ESRecHitSimAlgo::reconstruct(), ESRecHitAnalyticAlgo::reconstruct(), ESRecHitFitAlgo::reconstruct(), and mps_fire::result.

◆ set()

void ESRecHitWorker::set ( const edm::EventSetup es)
overridevirtual

Implements ESRecHitWorkerBaseClass.

Definition at line 41 of file ESRecHitWorker.cc.

41  {
43  const ESGain *gain = esgain_.product();
44 
46  const ESMIPToGeVConstant *mipToGeV = esMIPToGeV_.product();
47 
48  double ESGain = gain->getESGain();
49  double ESMIPToGeV = (ESGain == 1) ? mipToGeV->getESValueLow() : mipToGeV->getESValueHigh();
50 
52  const ESTimeSampleWeights *wgts = esWeights_.product();
53 
54  float w0 = wgts->getWeightForTS0();
55  float w1 = wgts->getWeightForTS1();
56  float w2 = wgts->getWeightForTS2();
57 
59  const ESPedestals *peds = esPedestals_.product();
60 
62  const ESIntercalibConstants *mips = esMIPs_.product();
63 
65  const ESAngleCorrectionFactors *ang = esAngleCorrFactors_.product();
66 
68  const ESChannelStatus *channelStatus = esChannelStatus_.product();
69 
71  const ESRecHitRatioCuts *ratioCuts = esRatioCuts_.product();
72 
73  if (recoAlgo_ == 0) {
75  algoW_->setMIPGeV(ESMIPToGeV);
76  algoW_->setW0(w0);
77  algoW_->setW1(w1);
78  algoW_->setW2(w2);
79  algoW_->setPedestals(peds);
81  algoW_->setChannelStatus(channelStatus);
82  algoW_->setRatioCuts(ratioCuts);
84  } else if (recoAlgo_ == 1) {
86  algoF_->setMIPGeV(ESMIPToGeV);
87  algoF_->setPedestals(peds);
89  algoF_->setChannelStatus(channelStatus);
90  algoF_->setRatioCuts(ratioCuts);
92  } else {
94  algoA_->setMIPGeV(ESMIPToGeV);
95  algoA_->setPedestals(peds);
97  algoA_->setChannelStatus(channelStatus);
98  algoA_->setRatioCuts(ratioCuts);
100  }
101 }

References algoA_, algoF_, algoW_, esAngleCorrFactors_, esAngleCorrFactorsToken_, esChannelStatus_, esChannelStatusToken_, esgain_, esgainToken_, esMIPs_, esMIPsToken_, esMIPToGeV_, esMIPToGeVToken_, esPedestals_, esPedestalsToken_, esRatioCuts_, esRatioCutsToken_, esWeights_, esWeightsToken_, PedestalClient_cfi::gain, ESMIPToGeVConstant::getESValueHigh(), ESMIPToGeVConstant::getESValueLow(), edm::EventSetup::getHandle(), ESTimeSampleWeights::getWeightForTS0(), ESTimeSampleWeights::getWeightForTS1(), ESTimeSampleWeights::getWeightForTS2(), edm::ESHandle< T >::product(), recoAlgo_, ESRecHitSimAlgo::setAngleCorrectionFactors(), ESRecHitAnalyticAlgo::setAngleCorrectionFactors(), ESRecHitFitAlgo::setAngleCorrectionFactors(), ESRecHitSimAlgo::setChannelStatus(), ESRecHitAnalyticAlgo::setChannelStatus(), ESRecHitFitAlgo::setChannelStatus(), ESRecHitSimAlgo::setESGain(), ESRecHitAnalyticAlgo::setESGain(), ESRecHitFitAlgo::setESGain(), ESRecHitSimAlgo::setIntercalibConstants(), ESRecHitAnalyticAlgo::setIntercalibConstants(), ESRecHitFitAlgo::setIntercalibConstants(), ESRecHitSimAlgo::setMIPGeV(), ESRecHitAnalyticAlgo::setMIPGeV(), ESRecHitFitAlgo::setMIPGeV(), ESRecHitSimAlgo::setPedestals(), ESRecHitAnalyticAlgo::setPedestals(), ESRecHitFitAlgo::setPedestals(), ESRecHitSimAlgo::setRatioCuts(), ESRecHitAnalyticAlgo::setRatioCuts(), ESRecHitFitAlgo::setRatioCuts(), ESRecHitSimAlgo::setW0(), ESRecHitSimAlgo::setW1(), ESRecHitSimAlgo::setW2(), and w2.

Member Data Documentation

◆ algoA_

ESRecHitAnalyticAlgo* ESRecHitWorker::algoA_
private

Definition at line 49 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), run(), set(), and ~ESRecHitWorker().

◆ algoF_

ESRecHitFitAlgo* ESRecHitWorker::algoF_
private

Definition at line 48 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), run(), set(), and ~ESRecHitWorker().

◆ algoW_

ESRecHitSimAlgo* ESRecHitWorker::algoW_
private

Definition at line 47 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), run(), set(), and ~ESRecHitWorker().

◆ esAngleCorrFactors_

edm::ESHandle<ESAngleCorrectionFactors> ESRecHitWorker::esAngleCorrFactors_
private

Definition at line 58 of file ESRecHitWorker.h.

Referenced by set().

◆ esAngleCorrFactorsToken_

edm::ESGetToken<ESAngleCorrectionFactors, ESAngleCorrectionFactorsRcd> ESRecHitWorker::esAngleCorrFactorsToken_
private

Definition at line 66 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), and set().

◆ esChannelStatus_

edm::ESHandle<ESChannelStatus> ESRecHitWorker::esChannelStatus_
private

Definition at line 56 of file ESRecHitWorker.h.

Referenced by set().

◆ esChannelStatusToken_

edm::ESGetToken<ESChannelStatus, ESChannelStatusRcd> ESRecHitWorker::esChannelStatusToken_
private

Definition at line 64 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), and set().

◆ esgain_

edm::ESHandle<ESGain> ESRecHitWorker::esgain_
private

Definition at line 51 of file ESRecHitWorker.h.

Referenced by set().

◆ esgainToken_

edm::ESGetToken<ESGain, ESGainRcd> ESRecHitWorker::esgainToken_
private

Definition at line 59 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), and set().

◆ esMIPs_

edm::ESHandle<ESIntercalibConstants> ESRecHitWorker::esMIPs_
private

Definition at line 55 of file ESRecHitWorker.h.

Referenced by set().

◆ esMIPsToken_

edm::ESGetToken<ESIntercalibConstants, ESIntercalibConstantsRcd> ESRecHitWorker::esMIPsToken_
private

Definition at line 63 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), and set().

◆ esMIPToGeV_

edm::ESHandle<ESMIPToGeVConstant> ESRecHitWorker::esMIPToGeV_
private

Definition at line 52 of file ESRecHitWorker.h.

Referenced by set().

◆ esMIPToGeVToken_

edm::ESGetToken<ESMIPToGeVConstant, ESMIPToGeVConstantRcd> ESRecHitWorker::esMIPToGeVToken_
private

Definition at line 60 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), and set().

◆ esPedestals_

edm::ESHandle<ESPedestals> ESRecHitWorker::esPedestals_
private

Definition at line 54 of file ESRecHitWorker.h.

Referenced by set().

◆ esPedestalsToken_

edm::ESGetToken<ESPedestals, ESPedestalsRcd> ESRecHitWorker::esPedestalsToken_
private

Definition at line 62 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), and set().

◆ esRatioCuts_

edm::ESHandle<ESRecHitRatioCuts> ESRecHitWorker::esRatioCuts_
private

Definition at line 57 of file ESRecHitWorker.h.

Referenced by set().

◆ esRatioCutsToken_

edm::ESGetToken<ESRecHitRatioCuts, ESRecHitRatioCutsRcd> ESRecHitWorker::esRatioCutsToken_
private

Definition at line 65 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), and set().

◆ esWeights_

edm::ESHandle<ESTimeSampleWeights> ESRecHitWorker::esWeights_
private

Definition at line 53 of file ESRecHitWorker.h.

Referenced by set().

◆ esWeightsToken_

edm::ESGetToken<ESTimeSampleWeights, ESTimeSampleWeightsRcd> ESRecHitWorker::esWeightsToken_
private

Definition at line 61 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), and set().

◆ recoAlgo_

int ESRecHitWorker::recoAlgo_
private

Definition at line 46 of file ESRecHitWorker.h.

Referenced by ESRecHitWorker(), run(), set(), and ~ESRecHitWorker().

ESRecHitAnalyticAlgo::setChannelStatus
void setChannelStatus(const ESChannelStatus *status)
Definition: ESRecHitAnalyticAlgo.h:21
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
ESPedestalsRcd
Definition: ESPedestalsRcd.h:5
ESGain
Definition: ESGain.h:7
ESRecHitWorker::esMIPsToken_
edm::ESGetToken< ESIntercalibConstants, ESIntercalibConstantsRcd > esMIPsToken_
Definition: ESRecHitWorker.h:63
w2
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
ESRecHitAnalyticAlgo::reconstruct
EcalRecHit reconstruct(const ESDataFrame &digi) const
Definition: ESRecHitAnalyticAlgo.cc:79
ESRecHitSimAlgo::setW1
void setW1(float value)
Definition: ESRecHitSimAlgo.h:22
ESRecHitSimAlgo::setW0
void setW0(float value)
Definition: ESRecHitSimAlgo.h:21
ESRecHitWorker::esMIPs_
edm::ESHandle< ESIntercalibConstants > esMIPs_
Definition: ESRecHitWorker.h:55
ESRecHitFitAlgo::setIntercalibConstants
void setIntercalibConstants(const ESIntercalibConstants *mips)
Definition: ESRecHitFitAlgo.h:22
ESRecHitSimAlgo::setESGain
void setESGain(float value)
Definition: ESRecHitSimAlgo.h:14
ESGainRcd
Definition: ESGainRcd.h:5
ESRecHitWorker::algoF_
ESRecHitFitAlgo * algoF_
Definition: ESRecHitWorker.h:48
ESChannelStatusRcd
Definition: ESChannelStatusRcd.h:5
ESRecHitFitAlgo::setChannelStatus
void setChannelStatus(const ESChannelStatus *status)
Definition: ESRecHitFitAlgo.h:23
ESMIPToGeVConstantRcd
Definition: ESMIPToGeVConstantRcd.h:5
ESTimeSampleWeights::getWeightForTS2
float getWeightForTS2() const
Definition: ESTimeSampleWeights.h:18
ESRecHitWorker::esAngleCorrFactorsToken_
edm::ESGetToken< ESAngleCorrectionFactors, ESAngleCorrectionFactorsRcd > esAngleCorrFactorsToken_
Definition: ESRecHitWorker.h:66
ESRecHitFitAlgo::setPedestals
void setPedestals(const ESPedestals *peds)
Definition: ESRecHitFitAlgo.h:21
ESChannelStatus
ESChannelStatusMap ESChannelStatus
Definition: ESChannelStatus.h:7
ESMIPToGeVConstant::getESValueHigh
float getESValueHigh() const
Definition: ESMIPToGeVConstant.h:15
ESRecHitWorker::esMIPToGeV_
edm::ESHandle< ESMIPToGeVConstant > esMIPToGeV_
Definition: ESRecHitWorker.h:52
ESRecHitRatioCutsRcd
Definition: ESRecHitRatioCutsRcd.h:5
ESRecHitSimAlgo::setChannelStatus
void setChannelStatus(const ESChannelStatus *status)
Definition: ESRecHitSimAlgo.h:18
ESRecHitWorker::esPedestals_
edm::ESHandle< ESPedestals > esPedestals_
Definition: ESRecHitWorker.h:54
ESRecHitWorker::algoW_
ESRecHitSimAlgo * algoW_
Definition: ESRecHitWorker.h:47
ESRecHitWorker::algoA_
ESRecHitAnalyticAlgo * algoA_
Definition: ESRecHitWorker.h:49
ESRecHitSimAlgo::setMIPGeV
void setMIPGeV(float value)
Definition: ESRecHitSimAlgo.h:15
ESRecHitWorker::esAngleCorrFactors_
edm::ESHandle< ESAngleCorrectionFactors > esAngleCorrFactors_
Definition: ESRecHitWorker.h:58
ESRecHitWorker::esWeights_
edm::ESHandle< ESTimeSampleWeights > esWeights_
Definition: ESRecHitWorker.h:53
ESRecHitSimAlgo::setAngleCorrectionFactors
void setAngleCorrectionFactors(const ESAngleCorrectionFactors *ang)
Definition: ESRecHitSimAlgo.h:20
ESRecHitRatioCuts
Definition: ESRecHitRatioCuts.h:7
ESIntercalibConstantsRcd
Definition: ESIntercalibConstantsRcd.h:5
ESRecHitWorker::esRatioCuts_
edm::ESHandle< ESRecHitRatioCuts > esRatioCuts_
Definition: ESRecHitWorker.h:57
ESRecHitSimAlgo::setRatioCuts
void setRatioCuts(const ESRecHitRatioCuts *ratioCuts)
Definition: ESRecHitSimAlgo.h:19
ESRecHitAnalyticAlgo::setAngleCorrectionFactors
void setAngleCorrectionFactors(const ESAngleCorrectionFactors *ang)
Definition: ESRecHitAnalyticAlgo.h:23
ESRecHitAnalyticAlgo::setPedestals
void setPedestals(const ESPedestals *peds)
Definition: ESRecHitAnalyticAlgo.h:19
ESRecHitWorker::esChannelStatus_
edm::ESHandle< ESChannelStatus > esChannelStatus_
Definition: ESRecHitWorker.h:56
ESRecHitWorker::esMIPToGeVToken_
edm::ESGetToken< ESMIPToGeVConstant, ESMIPToGeVConstantRcd > esMIPToGeVToken_
Definition: ESRecHitWorker.h:60
ESTimeSampleWeights
Definition: ESTimeSampleWeights.h:7
ESRecHitFitAlgo
Definition: ESRecHitFitAlgo.h:14
ESRecHitSimAlgo
Definition: ESRecHitSimAlgo.h:12
ESRecHitAnalyticAlgo::setMIPGeV
void setMIPGeV(const double &value)
Definition: ESRecHitAnalyticAlgo.h:18
ESRecHitFitAlgo::reconstruct
EcalRecHit reconstruct(const ESDataFrame &digi) const
Definition: ESRecHitFitAlgo.cc:87
ESRecHitFitAlgo::setMIPGeV
void setMIPGeV(const double &value)
Definition: ESRecHitFitAlgo.h:20
ESRecHitWorkerBaseClass::ESRecHitWorkerBaseClass
ESRecHitWorkerBaseClass(const edm::ParameterSet &)
Definition: ESRecHitWorkerBaseClass.h:14
ESTimeSampleWeights::getWeightForTS1
float getWeightForTS1() const
Definition: ESTimeSampleWeights.h:16
es_dqm_sourceclient-live_cfg.ESGain
ESGain
Definition: es_dqm_sourceclient-live_cfg.py:39
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
ESRecHitWorker::esPedestalsToken_
edm::ESGetToken< ESPedestals, ESPedestalsRcd > esPedestalsToken_
Definition: ESRecHitWorker.h:62
ESRecHitFitAlgo::setAngleCorrectionFactors
void setAngleCorrectionFactors(const ESAngleCorrectionFactors *ang)
Definition: ESRecHitFitAlgo.h:25
ESRecHitSimAlgo::setIntercalibConstants
void setIntercalibConstants(const ESIntercalibConstants *mips)
Definition: ESRecHitSimAlgo.h:17
ESMIPToGeVConstant
Definition: ESMIPToGeVConstant.h:7
ESRecHitFitAlgo::setRatioCuts
void setRatioCuts(const ESRecHitRatioCuts *ratioCuts)
Definition: ESRecHitFitAlgo.h:24
ESRecHitWorker::esChannelStatusToken_
edm::ESGetToken< ESChannelStatus, ESChannelStatusRcd > esChannelStatusToken_
Definition: ESRecHitWorker.h:64
cc
ESCondObjectContainer< ESPedestal >
ESRecHitSimAlgo::setW2
void setW2(float value)
Definition: ESRecHitSimAlgo.h:23
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
ESRecHitAnalyticAlgo::setRatioCuts
void setRatioCuts(const ESRecHitRatioCuts *ratioCuts)
Definition: ESRecHitAnalyticAlgo.h:22
ESTimeSampleWeights::getWeightForTS0
float getWeightForTS0() const
Definition: ESTimeSampleWeights.h:14
ESRecHitWorker::esgain_
edm::ESHandle< ESGain > esgain_
Definition: ESRecHitWorker.h:51
ESMIPToGeVConstant::getESValueLow
float getESValueLow() const
Definition: ESMIPToGeVConstant.h:13
ESAngleCorrectionFactors
ESAngleCorrectionFactorMap ESAngleCorrectionFactors
Definition: ESAngleCorrectionFactors.h:7
ESRecHitWorker::esRatioCutsToken_
edm::ESGetToken< ESRecHitRatioCuts, ESRecHitRatioCutsRcd > esRatioCutsToken_
Definition: ESRecHitWorker.h:65
ESTimeSampleWeightsRcd
Definition: ESTimeSampleWeightsRcd.h:5
ESPedestals
ESPedestalsMap ESPedestals
Definition: ESPedestals.h:29
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ESRecHitWorker::recoAlgo_
int recoAlgo_
Definition: ESRecHitWorker.h:46
mps_fire.result
result
Definition: mps_fire.py:311
ESRecHitWorker::esgainToken_
edm::ESGetToken< ESGain, ESGainRcd > esgainToken_
Definition: ESRecHitWorker.h:59
ESRecHitSimAlgo::reconstruct
EcalRecHit reconstruct(const ESDataFrame &digi) const
Definition: ESRecHitSimAlgo.cc:82
ESAngleCorrectionFactorsRcd
Definition: ESAngleCorrectionFactorsRcd.h:5
ESIntercalibConstants
ESIntercalibConstantMap ESIntercalibConstants
Definition: ESIntercalibConstants.h:7
ESRecHitWorker::esWeightsToken_
edm::ESGetToken< ESTimeSampleWeights, ESTimeSampleWeightsRcd > esWeightsToken_
Definition: ESRecHitWorker.h:61
ESRecHitSimAlgo::setPedestals
void setPedestals(const ESPedestals *peds)
Definition: ESRecHitSimAlgo.h:16
ESRecHitAnalyticAlgo
Definition: ESRecHitAnalyticAlgo.h:12
ESRecHitAnalyticAlgo::setIntercalibConstants
void setIntercalibConstants(const ESIntercalibConstants *mips)
Definition: ESRecHitAnalyticAlgo.h:20
ESRecHitFitAlgo::setESGain
void setESGain(const double &value)
Definition: ESRecHitFitAlgo.h:19
ESRecHitAnalyticAlgo::setESGain
void setESGain(const double &value)
Definition: ESRecHitAnalyticAlgo.h:17