#include <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) |
~ApvAnalysis () | |
Private Attributes | |
int | eventsRequiredToUpdate_ |
int | nEventsForNoiseCalibration_ |
TkApvMask * | theTkApvMask |
TkCommonModeCalculator * | theTkCommonModeCalculator |
TkNoiseCalculator * | theTkNoiseCalculator |
TkPedestalCalculator * | theTkPedestalCalculator |
ApvAnalysis is the base class for the simulation of APV/FED. 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.
{ theTkCommonModeCalculator =0; theTkPedestalCalculator =0; theTkNoiseCalculator =0; theTkApvMask =0; nEventsForNoiseCalibration_ =0; eventsRequiredToUpdate_ = nEvForUpdate; }
ApvAnalysis::~ApvAnalysis | ( | ) | [inline] |
Definition at line 51 of file ApvAnalysis.h.
{;}
TkCommonModeCalculator& ApvAnalysis::commonModeCalculator | ( | ) | [inline] |
Definition at line 62 of file ApvAnalysis.h.
References theTkCommonModeCalculator.
Referenced by ApvAnalysisFactory::deleteApv().
{return *theTkCommonModeCalculator;}
TkApvMask& ApvAnalysis::mask | ( | ) | [inline] |
Definition at line 65 of file ApvAnalysis.h.
References theTkApvMask.
Referenced by ApvAnalysisFactory::deleteApv().
{return *theTkApvMask;}
void ApvAnalysis::newEvent | ( | ) | const |
Definition at line 22 of file ApvAnalysis.cc.
TkNoiseCalculator& ApvAnalysis::noiseCalculator | ( | ) | [inline] |
Definition at line 64 of file ApvAnalysis.h.
References theTkNoiseCalculator.
Referenced by ApvAnalysisFactory::deleteApv().
{return *theTkNoiseCalculator;}
TkPedestalCalculator& ApvAnalysis::pedestalCalculator | ( | ) | [inline] |
Definition at line 63 of file ApvAnalysis.h.
References theTkPedestalCalculator.
Referenced by ApvAnalysisFactory::deleteApv().
{return *theTkPedestalCalculator;}
void ApvAnalysis::setCommonModeCalculator | ( | TkCommonModeCalculator & | in | ) | [inline] |
Definition at line 57 of file ApvAnalysis.h.
References recoMuon::in, and theTkCommonModeCalculator.
Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().
{theTkCommonModeCalculator = ∈}
void ApvAnalysis::setMask | ( | TkApvMask & | in | ) | [inline] |
Definition at line 60 of file ApvAnalysis.h.
References recoMuon::in, and theTkApvMask.
Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().
{theTkApvMask=∈}
void ApvAnalysis::setNoiseCalculator | ( | TkNoiseCalculator & | in | ) | [inline] |
Definition at line 59 of file ApvAnalysis.h.
References recoMuon::in, and theTkNoiseCalculator.
Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().
{theTkNoiseCalculator = ∈}
void ApvAnalysis::setPedestalCalculator | ( | TkPedestalCalculator & | in | ) | [inline] |
Definition at line 58 of file ApvAnalysis.h.
References recoMuon::in, and theTkPedestalCalculator.
Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().
{theTkPedestalCalculator = ∈}
void ApvAnalysis::updateCalibration | ( | edm::DetSet< SiStripRawDigi > & | in | ) |
Update pedestals & noise with current event
Definition at line 28 of file ApvAnalysis.cc.
References edm::DetSet< T >::data, i, and tmp.
{ theTkPedestalCalculator->updatePedestal(in); PedestalType noise; if(theTkPedestalCalculator->status()->isUpdating()){ nEventsForNoiseCalibration_++; if(theTkNoiseCalculator->noise().size() == 0) { noise = theTkPedestalCalculator->rawNoise(); theTkNoiseCalculator->setStripNoise(noise); theTkApvMask->calculateMask(noise); } PedestalType pedestal= theTkPedestalCalculator->pedestal(); PedestalType tmp; tmp.clear(); edm::DetSet<SiStripRawDigi>::const_iterator it = in.data.begin(); int i=0; for(;it!= in.data.end();it++){ tmp.push_back((*it).adc() - pedestal[i]); i++; } PedestalType tmp2 = theTkCommonModeCalculator->doIt(tmp); if(tmp2.size() > 0) { theTkNoiseCalculator->updateNoise(tmp2); } if(nEventsForNoiseCalibration_%eventsRequiredToUpdate_ == 1 && nEventsForNoiseCalibration_ >1) { noise=theTkNoiseCalculator->noise(); theTkApvMask->calculateMask(noise); } } }
int ApvAnalysis::eventsRequiredToUpdate_ [private] |
Definition at line 83 of file ApvAnalysis.h.
int ApvAnalysis::nEventsForNoiseCalibration_ [private] |
Definition at line 82 of file ApvAnalysis.h.
TkApvMask* ApvAnalysis::theTkApvMask [private] |
Definition at line 81 of file ApvAnalysis.h.
Definition at line 78 of file ApvAnalysis.h.
Referenced by commonModeCalculator(), and setCommonModeCalculator().
Definition at line 80 of file ApvAnalysis.h.
Referenced by noiseCalculator(), and setNoiseCalculator().
Definition at line 79 of file ApvAnalysis.h.
Referenced by pedestalCalculator(), and setPedestalCalculator().