12 theTkCommonModeCalculator =0;
13 theTkPedestalCalculator =0;
14 theTkNoiseCalculator =0;
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().size() == 0) {
36 noise = theTkPedestalCalculator->rawNoise();
37 theTkNoiseCalculator->setStripNoise(noise);
38 theTkApvMask->calculateMask(noise);
41 PedestalType pedestal= theTkPedestalCalculator->pedestal();
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