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 }
TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:73
int eventsRequiredToUpdate_
Definition: ApvAnalysis.h:78
TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:74
TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:75
TkApvMask * theTkApvMask
Definition: ApvAnalysis.h:76
int nEventsForNoiseCalibration_
Definition: ApvAnalysis.h:77

◆ ~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.

References theTkCommonModeCalculator.

Referenced by ApvAnalysisFactory::deleteApv().

58 { return *theTkCommonModeCalculator; }
TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:73

◆ mask()

TkApvMask& ApvAnalysis::mask ( )
inline

Definition at line 61 of file ApvAnalysis.h.

References theTkApvMask.

Referenced by ApvAnalysisFactory::deleteApv().

61 { return *theTkApvMask; }
TkApvMask * theTkApvMask
Definition: ApvAnalysis.h:76

◆ newEvent()

void ApvAnalysis::newEvent ( ) const

Definition at line 17 of file ApvAnalysis.cc.

17  {
21 }
TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:73
TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:74
TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:75
virtual void newEvent()

◆ noiseCalculator()

TkNoiseCalculator& ApvAnalysis::noiseCalculator ( )
inline

Definition at line 60 of file ApvAnalysis.h.

References theTkNoiseCalculator.

Referenced by ApvAnalysisFactory::deleteApv().

60 { return *theTkNoiseCalculator; }
TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:75

◆ pedestalCalculator()

TkPedestalCalculator& ApvAnalysis::pedestalCalculator ( )
inline

Definition at line 59 of file ApvAnalysis.h.

References theTkPedestalCalculator.

Referenced by ApvAnalysisFactory::deleteApv().

59 { return *theTkPedestalCalculator; }
TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:74

◆ setCommonModeCalculator()

void ApvAnalysis::setCommonModeCalculator ( TkCommonModeCalculator in)
inline

Definition at line 53 of file ApvAnalysis.h.

References recoMuon::in, and theTkCommonModeCalculator.

Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().

TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:73

◆ setMask()

void ApvAnalysis::setMask ( TkApvMask in)
inline

Definition at line 56 of file ApvAnalysis.h.

References recoMuon::in, and theTkApvMask.

Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().

56 { theTkApvMask = &in; }
TkApvMask * theTkApvMask
Definition: ApvAnalysis.h:76

◆ setNoiseCalculator()

void ApvAnalysis::setNoiseCalculator ( TkNoiseCalculator in)
inline

Definition at line 55 of file ApvAnalysis.h.

References recoMuon::in, and theTkNoiseCalculator.

Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().

TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:75

◆ setPedestalCalculator()

void ApvAnalysis::setPedestalCalculator ( TkPedestalCalculator in)
inline

Definition at line 54 of file ApvAnalysis.h.

References recoMuon::in, and theTkPedestalCalculator.

Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().

TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:74

◆ updateCalibration()

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

Update pedestals & noise with current event

Definition at line 23 of file ApvAnalysis.cc.

References mps_fire::i, recoMuon::in, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, hgchebackDigitizer_cfi::noise, EcalCondDBWriter_cfi::pedestal, and createJobs::tmp.

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 }
std::vector< float > PedestalType
Definition: ApvAnalysis.h:44
bool isUpdating() const
TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:73
int eventsRequiredToUpdate_
Definition: ApvAnalysis.h:78
TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:74
virtual ApvAnalysis::PedestalType pedestal() const =0
virtual void setStripNoise(ApvAnalysis::PedestalType &in)=0
virtual ApvAnalysis::PedestalType noise() const =0
virtual void calculateMask(const ApvAnalysis::PedestalType &)=0
virtual ApvAnalysis::PedestalType doIt(const ApvAnalysis::PedestalType &)=0
TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:75
virtual void updatePedestal(ApvAnalysis::RawSignalType &in)=0
TkApvMask * theTkApvMask
Definition: ApvAnalysis.h:76
TkStateMachine * status()
virtual ApvAnalysis::PedestalType rawNoise() const =0
int nEventsForNoiseCalibration_
Definition: ApvAnalysis.h:77
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
tmp
align.sh
Definition: createJobs.py:716
virtual void updateNoise(ApvAnalysis::PedestalType &)=0

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().