CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
ApvAnalysis Class Reference

#include <ApvAnalysis.h>

Public Types

typedef std::vector< float > PedestalType
 
typedef edm::DetSet< SiStripRawDigiRawSignalType
 

Public Member Functions

 ApvAnalysis (int nev)
 
TkCommonModeCalculatorcommonModeCalculator ()
 
TkApvMaskmask ()
 
void newEvent () const
 
TkNoiseCalculatornoiseCalculator ()
 
TkPedestalCalculatorpedestalCalculator ()
 
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_
 
TkApvMasktheTkApvMask
 
TkCommonModeCalculatortheTkCommonModeCalculator
 
TkNoiseCalculatortheTkNoiseCalculator
 
TkPedestalCalculatortheTkPedestalCalculator
 

Detailed Description

ApvAnalysis is the base class for the simulation of APV/FED. Each instance has

Definition at line 37 of file ApvAnalysis.h.

Member Typedef Documentation

◆ PedestalType

typedef std::vector<float> ApvAnalysis::PedestalType

Definition at line 44 of file ApvAnalysis.h.

◆ RawSignalType

Definition at line 43 of file ApvAnalysis.h.

Constructor & Destructor Documentation

◆ ApvAnalysis()

ApvAnalysis::ApvAnalysis ( int  nev)

Definition at line 9 of file ApvAnalysis.cc.

9  {
10  theTkCommonModeCalculator = nullptr;
11  theTkPedestalCalculator = nullptr;
12  theTkNoiseCalculator = nullptr;
13  theTkApvMask = nullptr;
15  eventsRequiredToUpdate_ = nEvForUpdate;
16 }

◆ ~ApvAnalysis()

ApvAnalysis::~ApvAnalysis ( )
inline

Definition at line 47 of file ApvAnalysis.h.

47 { ; }

Member Function Documentation

◆ commonModeCalculator()

TkCommonModeCalculator& ApvAnalysis::commonModeCalculator ( )
inline

Definition at line 58 of file ApvAnalysis.h.

58 { return *theTkCommonModeCalculator; }

References theTkCommonModeCalculator.

Referenced by ApvAnalysisFactory::deleteApv().

◆ mask()

TkApvMask& ApvAnalysis::mask ( )
inline

Definition at line 61 of file ApvAnalysis.h.

61 { return *theTkApvMask; }

References theTkApvMask.

Referenced by ApvAnalysisFactory::deleteApv().

◆ newEvent()

void ApvAnalysis::newEvent ( ) const

Definition at line 17 of file ApvAnalysis.cc.

◆ noiseCalculator()

TkNoiseCalculator& ApvAnalysis::noiseCalculator ( )
inline

Definition at line 60 of file ApvAnalysis.h.

60 { return *theTkNoiseCalculator; }

References theTkNoiseCalculator.

Referenced by ApvAnalysisFactory::deleteApv().

◆ pedestalCalculator()

TkPedestalCalculator& ApvAnalysis::pedestalCalculator ( )
inline

Definition at line 59 of file ApvAnalysis.h.

59 { return *theTkPedestalCalculator; }

References theTkPedestalCalculator.

Referenced by ApvAnalysisFactory::deleteApv().

◆ setCommonModeCalculator()

void ApvAnalysis::setCommonModeCalculator ( TkCommonModeCalculator in)
inline

◆ setMask()

void ApvAnalysis::setMask ( TkApvMask in)
inline

Definition at line 56 of file ApvAnalysis.h.

56 { theTkApvMask = &in; }

References recoMuon::in, and theTkApvMask.

Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().

◆ setNoiseCalculator()

void ApvAnalysis::setNoiseCalculator ( TkNoiseCalculator in)
inline

Definition at line 55 of file ApvAnalysis.h.

References recoMuon::in, and theTkNoiseCalculator.

Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().

◆ setPedestalCalculator()

void ApvAnalysis::setPedestalCalculator ( TkPedestalCalculator in)
inline

◆ updateCalibration()

void ApvAnalysis::updateCalibration ( edm::DetSet< SiStripRawDigi > &  in)

Update pedestals & noise with current event

Definition at line 23 of file ApvAnalysis.cc.

23  {
25 
29 
30  if (theTkNoiseCalculator->noise().empty()) {
34  }
35 
38  tmp.clear();
40  int i = 0;
41  for (; it != in.data.end(); it++) {
42  tmp.push_back((*it).adc() - pedestal[i]);
43  i++;
44  }
46  if (!tmp2.empty()) {
48  }
52  }
53  }
54 }

References mps_fire::i, recoMuon::in, gpuVertexFinder::noise, EcalCondDBWriter_cfi::pedestal, and createJobs::tmp.

Member Data Documentation

◆ eventsRequiredToUpdate_

int ApvAnalysis::eventsRequiredToUpdate_
private

Definition at line 78 of file ApvAnalysis.h.

◆ nEventsForNoiseCalibration_

int ApvAnalysis::nEventsForNoiseCalibration_
private

Definition at line 77 of file ApvAnalysis.h.

◆ theTkApvMask

TkApvMask* ApvAnalysis::theTkApvMask
private

Definition at line 76 of file ApvAnalysis.h.

Referenced by mask(), and setMask().

◆ theTkCommonModeCalculator

TkCommonModeCalculator* ApvAnalysis::theTkCommonModeCalculator
private

Definition at line 73 of file ApvAnalysis.h.

Referenced by commonModeCalculator(), and setCommonModeCalculator().

◆ theTkNoiseCalculator

TkNoiseCalculator* ApvAnalysis::theTkNoiseCalculator
private

Definition at line 75 of file ApvAnalysis.h.

Referenced by noiseCalculator(), and setNoiseCalculator().

◆ theTkPedestalCalculator

TkPedestalCalculator* ApvAnalysis::theTkPedestalCalculator
private

Definition at line 74 of file ApvAnalysis.h.

Referenced by pedestalCalculator(), and setPedestalCalculator().

TkNoiseCalculator::newEvent
virtual void newEvent()
Definition: TkNoiseCalculator.h:31
mps_fire.i
i
Definition: mps_fire.py:428
TkCommonModeCalculator::doIt
virtual ApvAnalysis::PedestalType doIt(const ApvAnalysis::PedestalType &)=0
ApvAnalysis::eventsRequiredToUpdate_
int eventsRequiredToUpdate_
Definition: ApvAnalysis.h:78
TkPedestalCalculator::pedestal
virtual ApvAnalysis::PedestalType pedestal() const =0
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
ApvAnalysis::theTkPedestalCalculator
TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:74
TkCommonModeCalculator::newEvent
virtual void newEvent()
Definition: TkCommonModeCalculator.h:19
TkNoiseCalculator::setStripNoise
virtual void setStripNoise(ApvAnalysis::PedestalType &in)=0
TkNoiseCalculator::noise
virtual ApvAnalysis::PedestalType noise() const =0
TkApvMask::calculateMask
virtual void calculateMask(const ApvAnalysis::PedestalType &)=0
recoMuon::in
Definition: RecoMuonEnumerators.h:6
ApvAnalysis::theTkApvMask
TkApvMask * theTkApvMask
Definition: ApvAnalysis.h:76
TkStateMachine::isUpdating
bool isUpdating() const
Definition: TkStateMachine.h:28
EcalCondDBWriter_cfi.pedestal
pedestal
Definition: EcalCondDBWriter_cfi.py:49
gpuVertexFinder::noise
__shared__ int noise
Definition: gpuFitVertices.h:50
TkPedestalCalculator::updatePedestal
virtual void updatePedestal(ApvAnalysis::RawSignalType &in)=0
TkPedestalCalculator::rawNoise
virtual ApvAnalysis::PedestalType rawNoise() const =0
ApvAnalysis::theTkNoiseCalculator
TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:75
TkNoiseCalculator::updateNoise
virtual void updateNoise(ApvAnalysis::PedestalType &)=0
ApvAnalysis::PedestalType
std::vector< float > PedestalType
Definition: ApvAnalysis.h:44
ApvAnalysis::nEventsForNoiseCalibration_
int nEventsForNoiseCalibration_
Definition: ApvAnalysis.h:77
TkPedestalCalculator::status
TkStateMachine * status()
Definition: TkPedestalCalculator.h:18
TkPedestalCalculator::newEvent
virtual void newEvent()
Definition: TkPedestalCalculator.h:38
ApvAnalysis::theTkCommonModeCalculator
TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:73
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSet.h:31