@@ -17,11 +17,8 @@ double EcalUncalibRecHitTimingCCAlgo::computeTimeCC(const EcalDataFrame& dataFra
1717 double maxamplitude = -std::numeric_limits<double >::max ();
1818 float pulsenorm = 0 .;
1919
20- bool doOOTAmpCorrection (correctForOOT);
2120 std::vector<float > pedSubSamples (nsample);
2221 std::vector<float > weights (nsample,1 .f );
23- float minADC = (dataFrame.sample (0 )).adc ();
24- for (unsigned int iSample = 1 ; iSample < nsample; iSample++) { if ( (dataFrame.sample (iSample)).adc () < minADC ) minADC = (dataFrame.sample (iSample)).adc (); }
2522 for (unsigned int iSample = 0 ; iSample < nsample; iSample++) {
2623 const EcalMGPASample& sample = dataFrame.sample (iSample);
2724
@@ -51,6 +48,8 @@ double EcalUncalibRecHitTimingCCAlgo::computeTimeCC(const EcalDataFrame& dataFra
5148
5249 pedSubSamples[iSample] = amplitude;
5350
51+ pulsenorm += fullpulse (iSample);
52+
5453 if (amplitude > maxamplitude) {
5554 maxamplitude = amplitude;
5655 }
@@ -64,7 +63,7 @@ double EcalUncalibRecHitTimingCCAlgo::computeTimeCC(const EcalDataFrame& dataFra
6463
6564 }
6665
67- if ( doOOTAmpCorrection ){
66+ if ( correctForOOT ){
6867 int ipulse = -1 ;
6968 for (auto const & amplit : amplitudes) {
7069 ipulse++;
@@ -112,8 +111,7 @@ double EcalUncalibRecHitTimingCCAlgo::computeTimeCC(const EcalDataFrame& dataFra
112111
113112 float tM = (t3 + t0) / 2 - GLOBAL_TIME_SHIFT;
114113 if (counter < MIN_NUM_OF_ITERATIONS || counter > MAX_NUM_OF_ITERATIONS - 1 ) { tM = TIME_WHEN_NOT_CONVERGING * ecalPh1::Samp_Period; }
115- float cct = -tM / ecalPh1::Samp_Period;
116- return cct;
114+ return -tM / ecalPh1::Samp_Period;
117115}
118116
119117FullSampleVector EcalUncalibRecHitTimingCCAlgo::interpolatePulse (const FullSampleVector& fullpulse,
0 commit comments