#include <CalibTracker/SiStripAPVAnalysis/interface/ApvAnalysis.h>
Public Types | |
typedef std::vector< float > | PedestalType |
typedef edm::DetSet < SiStripRawDigi > | RawSignalType |
Public Member Functions | |
ApvAnalysis (int nev) | |
TkCommonModeCalculator & | commonModeCalculator () |
TkApvMask & | mask () |
void | newEvent () const |
TkNoiseCalculator & | noiseCalculator () |
TkPedestalCalculator & | pedestalCalculator () |
void | setCommonModeCalculator (TkCommonModeCalculator &in) |
void | setMask (TkApvMask &in) |
void | setNoiseCalculator (TkNoiseCalculator &in) |
void | setPedestalCalculator (TkPedestalCalculator &in) |
void | updateCalibration (edm::DetSet< SiStripRawDigi > &in) |
Update pedestals & noise with current event. | |
~ApvAnalysis () | |
Private Attributes | |
int | eventsRequiredToUpdate_ |
int | nEventsForNoiseCalibration_ |
TkApvMask * | theTkApvMask |
TkCommonModeCalculator * | theTkCommonModeCalculator |
TkNoiseCalculator * | theTkNoiseCalculator |
TkPedestalCalculator * | theTkPedestalCalculator |
Each instance has
Definition at line 41 of file ApvAnalysis.h.
typedef std::vector<float> ApvAnalysis::PedestalType |
Definition at line 48 of file ApvAnalysis.h.
Definition at line 47 of file ApvAnalysis.h.
ApvAnalysis::ApvAnalysis | ( | int | nev | ) |
Definition at line 9 of file ApvAnalysis.cc.
References eventsRequiredToUpdate_, nEventsForNoiseCalibration_, theTkApvMask, theTkCommonModeCalculator, theTkNoiseCalculator, and theTkPedestalCalculator.
00010 { 00011 00012 theTkCommonModeCalculator =0; 00013 theTkPedestalCalculator =0; 00014 theTkNoiseCalculator =0; 00015 theTkApvMask =0; 00016 nEventsForNoiseCalibration_ =0; 00017 eventsRequiredToUpdate_ = nEvForUpdate; 00018 00019 00020 00021 }
ApvAnalysis::~ApvAnalysis | ( | ) | [inline] |
TkCommonModeCalculator& ApvAnalysis::commonModeCalculator | ( | ) | [inline] |
Definition at line 62 of file ApvAnalysis.h.
References theTkCommonModeCalculator.
Referenced by ApvAnalysisFactory::deleteApv().
00062 {return *theTkCommonModeCalculator;}
TkApvMask& ApvAnalysis::mask | ( | ) | [inline] |
Definition at line 65 of file ApvAnalysis.h.
References theTkApvMask.
Referenced by ApvAnalysisFactory::deleteApv().
00065 {return *theTkApvMask;}
void ApvAnalysis::newEvent | ( | ) | const |
Definition at line 22 of file ApvAnalysis.cc.
References TkPedestalCalculator::newEvent(), TkCommonModeCalculator::newEvent(), TkNoiseCalculator::newEvent(), theTkCommonModeCalculator, theTkNoiseCalculator, and theTkPedestalCalculator.
00022 { 00023 theTkPedestalCalculator->newEvent(); 00024 theTkNoiseCalculator->newEvent(); 00025 theTkCommonModeCalculator->newEvent(); 00026 }
TkNoiseCalculator& ApvAnalysis::noiseCalculator | ( | ) | [inline] |
Definition at line 64 of file ApvAnalysis.h.
References theTkNoiseCalculator.
Referenced by ApvAnalysisFactory::deleteApv().
00064 {return *theTkNoiseCalculator;}
TkPedestalCalculator& ApvAnalysis::pedestalCalculator | ( | ) | [inline] |
Definition at line 63 of file ApvAnalysis.h.
References theTkPedestalCalculator.
Referenced by ApvAnalysisFactory::deleteApv().
00063 {return *theTkPedestalCalculator;}
void ApvAnalysis::setCommonModeCalculator | ( | TkCommonModeCalculator & | in | ) | [inline] |
Definition at line 57 of file ApvAnalysis.h.
References theTkCommonModeCalculator.
Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().
00057 {theTkCommonModeCalculator = ∈}
Definition at line 60 of file ApvAnalysis.h.
References theTkApvMask.
Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().
00060 {theTkApvMask=∈}
void ApvAnalysis::setNoiseCalculator | ( | TkNoiseCalculator & | in | ) | [inline] |
Definition at line 59 of file ApvAnalysis.h.
References theTkNoiseCalculator.
Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().
00059 {theTkNoiseCalculator = ∈}
void ApvAnalysis::setPedestalCalculator | ( | TkPedestalCalculator & | in | ) | [inline] |
Definition at line 58 of file ApvAnalysis.h.
References theTkPedestalCalculator.
Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().
00058 {theTkPedestalCalculator = ∈}
void ApvAnalysis::updateCalibration | ( | edm::DetSet< SiStripRawDigi > & | in | ) |
Update pedestals & noise with current event.
Definition at line 28 of file ApvAnalysis.cc.
References TkApvMask::calculateMask(), edm::DetSet< T >::data, TkCommonModeCalculator::doIt(), eventsRequiredToUpdate_, i, TkStateMachine::isUpdating(), it, nEventsForNoiseCalibration_, TkNoiseCalculator::noise(), pedestal, TkPedestalCalculator::pedestal(), TkPedestalCalculator::rawNoise(), TkNoiseCalculator::setStripNoise(), TkPedestalCalculator::status(), theTkApvMask, theTkCommonModeCalculator, theTkNoiseCalculator, theTkPedestalCalculator, tmp, tmp2, TkNoiseCalculator::updateNoise(), and TkPedestalCalculator::updatePedestal().
00028 { 00029 theTkPedestalCalculator->updatePedestal(in); 00030 00031 PedestalType noise; 00032 if(theTkPedestalCalculator->status()->isUpdating()){ 00033 nEventsForNoiseCalibration_++; 00034 00035 if(theTkNoiseCalculator->noise().size() == 0) { 00036 noise = theTkPedestalCalculator->rawNoise(); 00037 theTkNoiseCalculator->setStripNoise(noise); 00038 theTkApvMask->calculateMask(noise); 00039 } 00040 00041 PedestalType pedestal= theTkPedestalCalculator->pedestal(); 00042 PedestalType tmp; 00043 tmp.clear(); 00044 edm::DetSet<SiStripRawDigi>::const_iterator it = in.data.begin(); 00045 int i=0; 00046 for(;it!= in.data.end();it++){ 00047 tmp.push_back((*it).adc() - pedestal[i]); 00048 i++; 00049 } 00050 PedestalType tmp2 = theTkCommonModeCalculator->doIt(tmp); 00051 if(tmp2.size() > 0) { 00052 theTkNoiseCalculator->updateNoise(tmp2); 00053 } 00054 if(nEventsForNoiseCalibration_%eventsRequiredToUpdate_ == 1 && nEventsForNoiseCalibration_ >1) 00055 { 00056 00057 noise=theTkNoiseCalculator->noise(); 00058 theTkApvMask->calculateMask(noise); 00059 00060 } 00061 } 00062 00063 00064 }
int ApvAnalysis::eventsRequiredToUpdate_ [private] |
int ApvAnalysis::nEventsForNoiseCalibration_ [private] |
TkApvMask* ApvAnalysis::theTkApvMask [private] |
Definition at line 81 of file ApvAnalysis.h.
Referenced by ApvAnalysis(), mask(), setMask(), and updateCalibration().
Definition at line 78 of file ApvAnalysis.h.
Referenced by ApvAnalysis(), commonModeCalculator(), newEvent(), setCommonModeCalculator(), and updateCalibration().
Definition at line 80 of file ApvAnalysis.h.
Referenced by ApvAnalysis(), newEvent(), noiseCalculator(), setNoiseCalculator(), and updateCalibration().
Definition at line 79 of file ApvAnalysis.h.
Referenced by ApvAnalysis(), newEvent(), pedestalCalculator(), setPedestalCalculator(), and updateCalibration().