CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< SiStripRawDigi
RawSignalType
 

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 41 of file ApvAnalysis.h.

Member Typedef Documentation

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

Definition at line 48 of file ApvAnalysis.h.

Definition at line 47 of file ApvAnalysis.h.

Constructor & Destructor Documentation

ApvAnalysis::ApvAnalysis ( int  nev)

Definition at line 9 of file ApvAnalysis.cc.

10 {
11 
15  theTkApvMask =0;
17  eventsRequiredToUpdate_ = nEvForUpdate;
18 
19 
20 
21 }
TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:78
int eventsRequiredToUpdate_
Definition: ApvAnalysis.h:83
TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:79
TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:80
TkApvMask * theTkApvMask
Definition: ApvAnalysis.h:81
int nEventsForNoiseCalibration_
Definition: ApvAnalysis.h:82
ApvAnalysis::~ApvAnalysis ( )
inline

Definition at line 51 of file ApvAnalysis.h.

51 {;}

Member Function Documentation

TkCommonModeCalculator& ApvAnalysis::commonModeCalculator ( )
inline

Definition at line 62 of file ApvAnalysis.h.

References theTkCommonModeCalculator.

Referenced by ApvAnalysisFactory::deleteApv().

TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:78
TkApvMask& ApvAnalysis::mask ( )
inline

Definition at line 65 of file ApvAnalysis.h.

References theTkApvMask.

Referenced by ApvAnalysisFactory::deleteApv().

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

Definition at line 22 of file ApvAnalysis.cc.

22  {
26 }
TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:78
TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:79
TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:80
virtual void newEvent()
TkNoiseCalculator& ApvAnalysis::noiseCalculator ( )
inline

Definition at line 64 of file ApvAnalysis.h.

References theTkNoiseCalculator.

Referenced by ApvAnalysisFactory::deleteApv().

64 {return *theTkNoiseCalculator;}
TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:80
TkPedestalCalculator& ApvAnalysis::pedestalCalculator ( )
inline

Definition at line 63 of file ApvAnalysis.h.

References theTkPedestalCalculator.

Referenced by ApvAnalysisFactory::deleteApv().

63 {return *theTkPedestalCalculator;}
TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:79
void ApvAnalysis::setCommonModeCalculator ( TkCommonModeCalculator in)
inline

Definition at line 57 of file ApvAnalysis.h.

References recoMuon::in, and theTkCommonModeCalculator.

Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().

TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:78
void ApvAnalysis::setMask ( TkApvMask in)
inline

Definition at line 60 of file ApvAnalysis.h.

References recoMuon::in, and theTkApvMask.

Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().

60 {theTkApvMask=&in;}
TkApvMask * theTkApvMask
Definition: ApvAnalysis.h:81
void ApvAnalysis::setNoiseCalculator ( TkNoiseCalculator in)
inline

Definition at line 59 of file ApvAnalysis.h.

References recoMuon::in, and theTkNoiseCalculator.

Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().

TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:80
void ApvAnalysis::setPedestalCalculator ( TkPedestalCalculator in)
inline

Definition at line 58 of file ApvAnalysis.h.

References recoMuon::in, and theTkPedestalCalculator.

Referenced by ApvAnalysisFactory::constructAuxiliaryApvClasses().

TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:79
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.

28  {
30 
31  PedestalType noise;
34 
35  if(theTkNoiseCalculator->noise().size() == 0) {
39  }
40 
43  tmp.clear();
45  int i=0;
46  for(;it!= in.data.end();it++){
47  tmp.push_back((*it).adc() - pedestal[i]);
48  i++;
49  }
51  if(tmp2.size() > 0) {
53  }
55  {
56 
57  noise=theTkNoiseCalculator->noise();
59 
60  }
61  }
62 
63 
64 }
int i
Definition: DBlmapReader.cc:9
std::vector< float > PedestalType
Definition: ApvAnalysis.h:48
TkCommonModeCalculator * theTkCommonModeCalculator
Definition: ApvAnalysis.h:78
virtual void calculateMask(ApvAnalysis::PedestalType)=0
int eventsRequiredToUpdate_
Definition: ApvAnalysis.h:83
TkPedestalCalculator * theTkPedestalCalculator
Definition: ApvAnalysis.h:79
virtual ApvAnalysis::PedestalType pedestal() const =0
virtual void setStripNoise(ApvAnalysis::PedestalType &in)=0
virtual ApvAnalysis::PedestalType noise() const =0
virtual ApvAnalysis::PedestalType doIt(ApvAnalysis::PedestalType)=0
bool isUpdating() const
TkNoiseCalculator * theTkNoiseCalculator
Definition: ApvAnalysis.h:80
virtual void updatePedestal(ApvAnalysis::RawSignalType &in)=0
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
collection_type data
Definition: DetSet.h:79
TkApvMask * theTkApvMask
Definition: ApvAnalysis.h:81
TkStateMachine * status()
virtual ApvAnalysis::PedestalType rawNoise() const =0
int nEventsForNoiseCalibration_
Definition: ApvAnalysis.h:82
collection_type::const_iterator const_iterator
Definition: DetSet.h:34
virtual void updateNoise(ApvAnalysis::PedestalType &)=0

Member Data Documentation

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.

Referenced by mask(), and setMask().

TkCommonModeCalculator* ApvAnalysis::theTkCommonModeCalculator
private

Definition at line 78 of file ApvAnalysis.h.

Referenced by commonModeCalculator(), and setCommonModeCalculator().

TkNoiseCalculator* ApvAnalysis::theTkNoiseCalculator
private

Definition at line 80 of file ApvAnalysis.h.

Referenced by noiseCalculator(), and setNoiseCalculator().

TkPedestalCalculator* ApvAnalysis::theTkPedestalCalculator
private

Definition at line 79 of file ApvAnalysis.h.

Referenced by pedestalCalculator(), and setPedestalCalculator().