12 theTkCommonModeCalculator =
nullptr;
13 theTkPedestalCalculator =
nullptr;
14 theTkNoiseCalculator =
nullptr;
15 theTkApvMask =
nullptr;
16 nEventsForNoiseCalibration_ =0;
17 eventsRequiredToUpdate_ = nEvForUpdate;
23 theTkPedestalCalculator->newEvent();
24 theTkNoiseCalculator->newEvent();
25 theTkCommonModeCalculator->newEvent();
29 theTkPedestalCalculator->updatePedestal(in);
32 if(theTkPedestalCalculator->status()->isUpdating()){
33 nEventsForNoiseCalibration_++;
35 if(theTkNoiseCalculator->noise().empty()) {
36 noise = theTkPedestalCalculator->rawNoise();
37 theTkNoiseCalculator->setStripNoise(noise);
38 theTkApvMask->calculateMask(noise);
46 for(;it!= in.
data.end();it++){
47 tmp.push_back((*it).adc() - pedestal[
i]);
50 PedestalType tmp2 = theTkCommonModeCalculator->doIt(tmp);
52 theTkNoiseCalculator->updateNoise(tmp2);
54 if(nEventsForNoiseCalibration_%eventsRequiredToUpdate_ == 1 && nEventsForNoiseCalibration_ >1)
57 noise=theTkNoiseCalculator->noise();
58 theTkApvMask->calculateMask(noise);
std::vector< float > PedestalType
void updateCalibration(edm::DetSet< SiStripRawDigi > &in)
std::vector< std::vector< double > > tmp
collection_type::const_iterator const_iterator