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

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

Definition at line 44 of file ApvAnalysis.h.

Definition at line 43 of file ApvAnalysis.h.

Constructor & Destructor Documentation

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

Definition at line 47 of file ApvAnalysis.h.

47 { ; }

Member Function Documentation

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
TkApvMask& ApvAnalysis::mask ( )
inline

Definition at line 61 of file ApvAnalysis.h.

References recoMuon::in, newEvent(), theTkApvMask, and updateCalibration().

Referenced by ApvAnalysisFactory::deleteApv().

61 { return *theTkApvMask; }
TkApvMask * theTkApvMask
Definition: ApvAnalysis.h:76
void ApvAnalysis::newEvent ( ) const

Definition at line 17 of file ApvAnalysis.cc.

Referenced by mask().

17  {
21 }
TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:73
TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:74
TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:75
virtual void newEvent()
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
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
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
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
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
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
void ApvAnalysis::updateCalibration ( edm::DetSet< SiStripRawDigi > &  in)

Update pedestals & noise with current event

Definition at line 23 of file ApvAnalysis.cc.

References edm::DetSet< T >::data, mps_fire::i, hgcalDigitizer_cfi::noise, EcalCondDBWriter_cfi::pedestal, and createJobs::tmp.

Referenced by mask().

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

Member Data Documentation

int ApvAnalysis::eventsRequiredToUpdate_
private

Definition at line 78 of file ApvAnalysis.h.

int ApvAnalysis::nEventsForNoiseCalibration_
private

Definition at line 77 of file ApvAnalysis.h.

TkApvMask* ApvAnalysis::theTkApvMask
private

Definition at line 76 of file ApvAnalysis.h.

Referenced by mask(), and setMask().

TkCommonModeCalculator* ApvAnalysis::theTkCommonModeCalculator
private

Definition at line 73 of file ApvAnalysis.h.

Referenced by commonModeCalculator(), and setCommonModeCalculator().

TkNoiseCalculator* ApvAnalysis::theTkNoiseCalculator
private

Definition at line 75 of file ApvAnalysis.h.

Referenced by noiseCalculator(), and setNoiseCalculator().

TkPedestalCalculator* ApvAnalysis::theTkPedestalCalculator
private

Definition at line 74 of file ApvAnalysis.h.

Referenced by pedestalCalculator(), and setPedestalCalculator().