CMS 3D CMS Logo

EcalUncalibRecHitWorkerMultiFit.h
Go to the documentation of this file.
1 #ifndef RecoLocalCalo_EcalRecProducers_EcalUncalibRecHitRecWorkerGlobal_hh
2 #define RecoLocalCalo_EcalRecProducers_EcalUncalibRecHitRecWorkerGlobal_hh
3 
44 
45 namespace edm {
46  class Event;
47  class EventSetup;
48  class ParameterSet;
50 } // namespace edm
51 
53 public:
57 
58 private:
59  void set(const edm::EventSetup& es) override;
60  void set(const edm::Event& evt) override;
61  void run(const edm::Event& evt, const EcalDigiCollection& digis, EcalUncalibratedRecHitCollection& result) override;
62 
63 public:
65 
66 private:
77 
78  double timeCorrection(float ampli, const std::vector<float>& amplitudeBins, const std::vector<float>& shiftBins);
79 
80  const SampleMatrix& noisecor(bool barrel, int gain) const { return noisecors_[barrel ? 1 : 0][gain]; }
81  const SampleMatrixGainArray& noisecor(bool barrel) const { return noisecors_[barrel ? 1 : 0]; }
82 
83  // multifit method
84  std::array<SampleMatrixGainArray, 2> noisecors_;
89 
92 
93  // determine which of the samples must actually be used by ECAL local reco
96 
97  // time algorithm to be used to set the jitter and its uncertainty
100 
101  // time weights method
124 
125  // ratio method
126  std::vector<double> EBtimeFitParameters_;
127  std::vector<double> EEtimeFitParameters_;
128  std::vector<double> EBamplitudeFitParameters_;
129  std::vector<double> EEamplitudeFitParameters_;
130  std::pair<double, double> EBtimeFitLimits_;
131  std::pair<double, double> EEtimeFitLimits_;
132 
135 
151 
154 
159  std::vector<double> ebPulseShape_;
160  std::vector<double> eePulseShape_;
161 
162  // chi2 thresholds for flags settings
167 
168  //Timing Cross Correlation Algo
169  std::unique_ptr<EcalUncalibRecHitTimingCCAlgo> computeCC_;
170 };
171 
172 #endif
EcalUncalibRecHitWorkerMultiFit::ampErrorCalculation_
bool ampErrorCalculation_
Definition: EcalUncalibRecHitWorkerMultiFit.h:86
EcalUncalibRecHitWorkerMultiFit::set
void set(const edm::EventSetup &es) override
Definition: EcalUncalibRecHitWorkerMultiFit.cc:114
EcalUncalibRecHitWorkerMultiFit::EEtimeNconst_
double EEtimeNconst_
Definition: EcalUncalibRecHitWorkerMultiFit.h:139
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG12pEE_
double outOfTimeThreshG12pEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:144
EcalUncalibRecHitWorkerMultiFit::amplitudeThreshEB_
double amplitudeThreshEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:148
EcalPedestals.h
EcalUncalibRecHitTimeWeightsAlgo< EBDataFrame >
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG12mEB_
double outOfTimeThreshG12mEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:141
EcalUncalibRecHitWorkerMultiFit::sampleMaskToken_
edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcd > sampleMaskToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:95
EcalUncalibRecHitWorkerMultiFit::pulseShapesToken_
edm::ESGetToken< EcalPulseShapes, EcalPulseShapesRcd > pulseShapesToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:74
EcalUncalibRecHitWorkerBaseClass.h
EcalUncalibRecHitWorkerMultiFit::noisecors_
std::array< SampleMatrixGainArray, 2 > noisecors_
Definition: EcalUncalibRecHitWorkerMultiFit.h:84
ESHandle.h
EcalUncalibRecHitWorkerMultiFit::addPedestalUncertaintyEE_
double addPedestalUncertaintyEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:122
SampleMatrixGainArray
std::array< SampleMatrix, NGains > SampleMatrixGainArray
Definition: EigenMatrixTypes.h:28
EcalPulseCovariances.h
EcalUncalibRecHitWorkerMultiFit::run
void run(const edm::Event &evt, const EcalDigiCollection &digis, EcalUncalibratedRecHitCollection &result) override
Definition: EcalUncalibRecHitWorkerMultiFit.cc:240
EcalUncalibRecHitWorkerMultiFit::timealgo_
TimeAlgo timealgo_
Definition: EcalUncalibRecHitWorkerMultiFit.h:99
EcalUncalibRecHitMultiFitAlgo.h
EcalUncalibRecHitWorkerMultiFit::EBtimeConstantTerm_
double EBtimeConstantTerm_
Definition: EcalUncalibRecHitWorkerMultiFit.h:136
edm::EDGetTokenT< unsigned int >
edm
HLT enums.
Definition: AlignableModifier.h:19
EcalUncalibRecHitWorkerMultiFit::offtimeToken_
edm::ESGetToken< EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd > offtimeToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:158
SampleMatrix
Eigen::Matrix< double, SampleVectorSize, SampleVectorSize > SampleMatrix
Definition: EigenMatrixTypes.h:17
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EcalUncalibRecHitWorkerMultiFit::noiseConvariancesToken_
edm::ESGetToken< EcalSamplesCorrelation, EcalSamplesCorrelationRcd > noiseConvariancesToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:72
EcalUncalibRecHitWorkerMultiFit::pulsecovariances
edm::ESHandle< EcalPulseCovariances > pulsecovariances
Definition: EcalUncalibRecHitWorkerMultiFit.h:75
EcalUncalibRecHitWorkerMultiFit::weightsMethod_endcap_
EcalUncalibRecHitTimeWeightsAlgo< EEDataFrame > weightsMethod_endcap_
Definition: EcalUncalibRecHitWorkerMultiFit.h:108
EcalUncalibRecHitWorkerMultiFit::sampleMaskHand_
edm::ESHandle< EcalSampleMask > sampleMaskHand_
Definition: EcalUncalibRecHitWorkerMultiFit.h:94
edm::SortedCollection
Definition: SortedCollection.h:49
EcalUncalibRecHitWorkerMultiFit::EEtimeConstantTerm_
double EEtimeConstantTerm_
Definition: EcalUncalibRecHitWorkerMultiFit.h:137
EcalUncalibRecHitWorkerMultiFit::prefitMaxChiSqEB_
double prefitMaxChiSqEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:111
EcalUncalibRecHitWorkerMultiFit::multiFitMethod_
EcalUncalibRecHitMultiFitAlgo multiFitMethod_
Definition: EcalUncalibRecHitWorkerMultiFit.h:88
EcalUncalibRecHitWorkerMultiFit::EBtimeFitLimits_
std::pair< double, double > EBtimeFitLimits_
Definition: EcalUncalibRecHitWorkerMultiFit.h:130
EcalUncalibRecHitWorkerMultiFit::EEtimeFitLimits_
std::pair< double, double > EEtimeFitLimits_
Definition: EcalUncalibRecHitWorkerMultiFit.h:131
EcalUncalibRecHitWorkerMultiFit::noisecovariances
edm::ESHandle< EcalSamplesCorrelation > noisecovariances
Definition: EcalUncalibRecHitWorkerMultiFit.h:71
EcalTimeCalibConstants.h
EcalUncalibRecHitWorkerMultiFit::activeBX
BXVector activeBX
Definition: EcalUncalibRecHitWorkerMultiFit.h:85
EcalUncalibRecHitWorkerMultiFit::kPoorRecoFlagEE_
bool kPoorRecoFlagEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:164
EcalUncalibRecHitWorkerMultiFit::doPrefitEB_
bool doPrefitEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:109
EcalUncalibRecHitWorkerMultiFit::gainSwitchUseMaxSampleEE_
bool gainSwitchUseMaxSampleEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:118
EcalUncalibRecHitRatioMethodAlgo.h
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG12pEB_
double outOfTimeThreshG12pEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:140
ESGetToken.h
EcalWeightXtalGroups.h
EcalUncalibRecHitWorkerMultiFit::noMethod
Definition: EcalUncalibRecHitWorkerMultiFit.h:98
EcalUncalibRecHitWorkerMultiFit::offtime
edm::ESHandle< EcalTimeOffsetConstant > offtime
Definition: EcalUncalibRecHitWorkerMultiFit.h:157
EcalUncalibRecHitWorkerMultiFit::grps
edm::ESHandle< EcalWeightXtalGroups > grps
Definition: EcalUncalibRecHitWorkerMultiFit.h:102
EcalUncalibRecHitWorkerMultiFit::mitigateBadSamplesEE_
bool mitigateBadSamplesEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:116
EcalUncalibRecHitWorkerMultiFit::EcalUncalibRecHitWorkerMultiFit
EcalUncalibRecHitWorkerMultiFit()
Definition: EcalUncalibRecHitWorkerMultiFit.h:55
EcalUncalibRecHitWorkerMultiFit::grpsToken_
edm::ESGetToken< EcalWeightXtalGroups, EcalWeightXtalGroupsRcd > grpsToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:103
EcalTBWeights.h
EcalSamplesCorrelationRcd.h
EcalWeightSet::EcalWeightMatrix
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:19
BXVector
Definition: BXVector.h:15
EcalUncalibRecHitWorkerMultiFit::wgtsToken_
edm::ESGetToken< EcalTBWeights, EcalTBWeightsRcd > wgtsToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:105
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG61pEB_
double outOfTimeThreshG61pEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:142
EcalSamplesCorrelation.h
EcalUncalibRecHitWorkerMultiFit::mitigateBadSamplesEB_
bool mitigateBadSamplesEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:115
EcalUncalibRecHitWorkerMultiFit::simplifiedNoiseModelForGainSwitch_
bool simplifiedNoiseModelForGainSwitch_
Definition: EcalUncalibRecHitWorkerMultiFit.h:123
EcalUncalibRecHitWorkerMultiFit::gains
edm::ESHandle< EcalGainRatios > gains
Definition: EcalUncalibRecHitWorkerMultiFit.h:69
EcalUncalibRecHitWorkerMultiFit::doPrefitEE_
bool doPrefitEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:110
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG61mEE_
double outOfTimeThreshG61mEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:147
EcalTimeOffsetConstant.h
EcalUncalibRecHitWorkerMultiFit
Definition: EcalUncalibRecHitWorkerMultiFit.h:52
EcalUncalibRecHitWorkerMultiFit::ratioMethod_barrel_
EcalUncalibRecHitRatioMethodAlgo< EBDataFrame > ratioMethod_barrel_
Definition: EcalUncalibRecHitWorkerMultiFit.h:133
EcalUncalibRecHitWorkerMultiFit::chi2ThreshEE_
double chi2ThreshEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:166
EcalUncalibRecHitWorkerMultiFit::kPoorRecoFlagEB_
bool kPoorRecoFlagEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:163
EcalUncalibRecHitWorkerMultiFit::timeCorrBiasToken_
edm::ESGetToken< EcalTimeBiasCorrections, EcalTimeBiasCorrectionsRcd > timeCorrBiasToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:153
EcalUncalibRecHitWorkerMultiFit::timeCorrection
double timeCorrection(float ampli, const std::vector< float > &amplitudeBins, const std::vector< float > &shiftBins)
Definition: EcalUncalibRecHitWorkerMultiFit.cc:193
EcalTimeOffsetConstantRcd.h
EcalUncalibRecHitWorkerMultiFit::selectiveBadSampleCriteriaEB_
bool selectiveBadSampleCriteriaEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:119
edm::ESHandle
Definition: DTSurvey.h:22
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG12mEE_
double outOfTimeThreshG12mEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:145
Event
EcalUncalibRecHitWorkerMultiFit::gainsToken_
edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > gainsToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:70
EcalUncalibRecHitWorkerMultiFit::TimeAlgo
TimeAlgo
Definition: EcalUncalibRecHitWorkerMultiFit.h:98
EcalUncalibRecHitWorkerMultiFit::addPedestalUncertaintyEB_
double addPedestalUncertaintyEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:121
EcalUncalibRecHitWorkerMultiFit::itime
edm::ESHandle< EcalTimeCalibConstants > itime
Definition: EcalUncalibRecHitWorkerMultiFit.h:155
EcalUncalibRecHitMultiFitAlgo
Definition: EcalUncalibRecHitMultiFitAlgo.h:20
EcalUncalibRecHitWorkerMultiFit::dynamicPedestalsEB_
bool dynamicPedestalsEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:113
EigenMatrixTypes.h
EcalPulseCovariancesRcd.h
EcalUncalibRecHitTimeWeightsAlgo.h
EcalUncalibRecHitRecChi2Algo.h
EcalUncalibRecHitRatioMethodAlgo< EBDataFrame >
EcalPulseShapes.h
EcalSampleMaskRcd.h
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG61pEE_
double outOfTimeThreshG61pEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:146
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
EcalUncalibRecHitWorkerMultiFit::dynamicPedestalsEE_
bool dynamicPedestalsEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:114
EcalUncalibRecHitWorkerMultiFit::ebSpikeThresh_
double ebSpikeThresh_
Definition: EcalUncalibRecHitWorkerMultiFit.h:150
EcalUncalibRecHitWorkerMultiFit::EEamplitudeFitParameters_
std::vector< double > EEamplitudeFitParameters_
Definition: EcalUncalibRecHitWorkerMultiFit.h:129
EcalUncalibRecHitWorkerMultiFit::EBtimeNconst_
double EBtimeNconst_
Definition: EcalUncalibRecHitWorkerMultiFit.h:138
EcalUncalibRecHitWorkerMultiFit::computeCC_
std::unique_ptr< EcalUncalibRecHitTimingCCAlgo > computeCC_
Definition: EcalUncalibRecHitWorkerMultiFit.h:169
EcalUncalibRecHitWorkerMultiFit::bunchSpacing_
edm::EDGetTokenT< unsigned int > bunchSpacing_
Definition: EcalUncalibRecHitWorkerMultiFit.h:91
edm::EventSetup
Definition: EventSetup.h:58
EcalUncalibRecHitWorkerMultiFit::weightsMethod
Definition: EcalUncalibRecHitWorkerMultiFit.h:98
EcalUncalibRecHitWorkerMultiFit::pulseConvariancesToken_
edm::ESGetToken< EcalPulseCovariances, EcalPulseCovariancesRcd > pulseConvariancesToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:76
EcalGainRatiosRcd.h
EcalUncalibRecHitWorkerMultiFit::EBamplitudeFitParameters_
std::vector< double > EBamplitudeFitParameters_
Definition: EcalUncalibRecHitWorkerMultiFit.h:128
EcalUncalibRecHitWorkerMultiFit::noisecor
const SampleMatrix & noisecor(bool barrel, int gain) const
Definition: EcalUncalibRecHitWorkerMultiFit.h:80
EcalUncalibRecHitWorkerMultiFit::noisecor
const SampleMatrixGainArray & noisecor(bool barrel) const
Definition: EcalUncalibRecHitWorkerMultiFit.h:81
edm::ESGetToken
Definition: EventSetup.h:48
EcalGainRatios.h
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
EcalUncalibRecHitWorkerMultiFit::peds
edm::ESHandle< EcalPedestals > peds
Definition: EcalUncalibRecHitWorkerMultiFit.h:67
EcalSampleMask.h
EcalUncalibRecHitWorkerMultiFit::pulseshapes
edm::ESHandle< EcalPulseShapes > pulseshapes
Definition: EcalUncalibRecHitWorkerMultiFit.h:73
EcalUncalibRecHitWorkerMultiFit::prefitMaxChiSqEE_
double prefitMaxChiSqEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:112
EcalDigiCollection
Definition: EcalDigiCollections.h:46
EcalUncalibRecHitWorkerMultiFit::eePulseShape_
std::vector< double > eePulseShape_
Definition: EcalUncalibRecHitWorkerMultiFit.h:160
EcalUncalibRecHitWorkerMultiFit::ratioMethod_endcap_
EcalUncalibRecHitRatioMethodAlgo< EEDataFrame > ratioMethod_endcap_
Definition: EcalUncalibRecHitWorkerMultiFit.h:134
EcalUncalibRecHitWorkerMultiFit::weights
const EcalWeightSet::EcalWeightMatrix * weights[2]
Definition: EcalUncalibRecHitWorkerMultiFit.h:106
EcalUncalibRecHitWorkerMultiFit::EBtimeFitParameters_
std::vector< double > EBtimeFitParameters_
Definition: EcalUncalibRecHitWorkerMultiFit.h:126
EcalUncalibRecHitWorkerMultiFit::itimeToken_
edm::ESGetToken< EcalTimeCalibConstants, EcalTimeCalibConstantsRcd > itimeToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:156
EcalUncalibRecHitTimingCCAlgo.h
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG61mEB_
double outOfTimeThreshG61mEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:143
EcalUncalibRecHitWorkerMultiFit::weightsMethod_barrel_
EcalUncalibRecHitTimeWeightsAlgo< EBDataFrame > weightsMethod_barrel_
Definition: EcalUncalibRecHitWorkerMultiFit.h:107
ParameterSetDescription
EcalUncalibRecHitWorkerMultiFit::selectiveBadSampleCriteriaEE_
bool selectiveBadSampleCriteriaEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:120
EcalUncalibRecHitWorkerMultiFit::EEtimeFitParameters_
std::vector< double > EEtimeFitParameters_
Definition: EcalUncalibRecHitWorkerMultiFit.h:127
EcalUncalibRecHitWorkerMultiFit::pedsToken_
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > pedsToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:68
EcalUncalibRecHitWorkerMultiFit::wgts
edm::ESHandle< EcalTBWeights > wgts
Definition: EcalUncalibRecHitWorkerMultiFit.h:104
EcalPedestalsRcd.h
EcalUncalibRecHitWorkerMultiFit::chi2ThreshEB_
double chi2ThreshEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:165
mps_fire.result
result
Definition: mps_fire.py:311
EcalUncalibRecHitWorkerMultiFit::timeCorrBias_
edm::ESHandle< EcalTimeBiasCorrections > timeCorrBias_
Definition: EcalUncalibRecHitWorkerMultiFit.h:152
EcalUncalibRecHitWorkerMultiFit::ratioMethod
Definition: EcalUncalibRecHitWorkerMultiFit.h:98
EcalUncalibRecHitWorkerMultiFit::crossCorrelationMethod
Definition: EcalUncalibRecHitWorkerMultiFit.h:98
EventSetup
ParameterSet.h
EcalUncalibRecHitWorkerMultiFit::ebPulseShape_
std::vector< double > ebPulseShape_
Definition: EcalUncalibRecHitWorkerMultiFit.h:159
EcalTimeCalibConstantsRcd.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
EcalUncalibRecHitWorkerMultiFit::useLumiInfoRunHeader_
bool useLumiInfoRunHeader_
Definition: EcalUncalibRecHitWorkerMultiFit.h:87
edm::Event
Definition: Event.h:73
EcalTimeBiasCorrectionsRcd.h
EcalUncalibRecHitWorkerMultiFit::gainSwitchUseMaxSampleEB_
bool gainSwitchUseMaxSampleEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:117
EcalUncalibRecHitWorkerMultiFit::getAlgoDescription
edm::ParameterSetDescription getAlgoDescription() override
Definition: EcalUncalibRecHitWorkerMultiFit.cc:508
EcalWeightXtalGroupsRcd.h
EcalTBWeightsRcd.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
EcalTimeBiasCorrections.h
EcalUncalibRecHitWorkerMultiFit::bunchSpacingManual_
int bunchSpacingManual_
Definition: EcalUncalibRecHitWorkerMultiFit.h:90
EcalUncalibRecHitWorkerMultiFit::~EcalUncalibRecHitWorkerMultiFit
~EcalUncalibRecHitWorkerMultiFit() override
Definition: EcalUncalibRecHitWorkerMultiFit.h:56
EcalPulseShapesRcd.h
EcalUncalibRecHitWorkerMultiFit::amplitudeThreshEE_
double amplitudeThreshEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:149
EcalUncalibRecHitWorkerBaseClass
Definition: EcalUncalibRecHitWorkerBaseClass.h:16