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 | Protected Member Functions | Protected Attributes
CSCStripConditions Class Referenceabstract

#include <CSCStripConditions.h>

Inheritance diagram for CSCStripConditions:
CSCConfigurableStripConditions CSCDbStripConditions

Public Types

typedef math::ErrorD< 8 >::type CSCCorrelatedNoiseMatrix
 
typedef CorrelatedNoisifier
< CSCCorrelatedNoiseMatrix
CSCCorrelatedNoisifier
 

Public Member Functions

float analogNoise (const CSCDetId &detId, int channel) const
 calculated from pedestalSigma & gain More...
 
virtual void crosstalk (const CSCDetId &detId, int channel, double stripLength, bool leftRight, float &capacitive, float &resistive) const =0
 
 CSCStripConditions ()
 
virtual float gain (const CSCDetId &detId, int channel) const =0
 
virtual float gainSigma (const CSCDetId &detId, int channel) const =0
 
virtual void initializeEvent (const edm::EventSetup &es)
 
virtual bool isInBadChamber (const CSCDetId &id) const
 is supplied layer/chamber flagged as bad? (default impl. is no) More...
 
void noisify (const CSCDetId &detId, CSCAnalogSignal &signal)
 superimposes noise, in fC, on the signal More...
 
virtual float pedestal (const CSCDetId &detId, int channel) const =0
 in ADC counts More...
 
virtual float pedestalSigma (const CSCDetId &detId, int channel) const =0
 
void setRandomEngine (CLHEP::HepRandomEngine &engine)
 
virtual float smearedGain (const CSCDetId &detId, int channel) const
 
virtual ~CSCStripConditions ()
 

Protected Member Functions

virtual void fetchNoisifier (const CSCDetId &detId, int istrip)=0
 

Protected Attributes

CSCCorrelatedNoisifiertheNoisifier
 
CLHEP::RandGaussQ * theRandGaussQ
 

Detailed Description

Definition at line 11 of file CSCStripConditions.h.

Member Typedef Documentation

Definition at line 14 of file CSCStripConditions.h.

Definition at line 15 of file CSCStripConditions.h.

Constructor & Destructor Documentation

CSCStripConditions::CSCStripConditions ( )

Definition at line 14 of file CSCStripConditions.cc.

15  : theNoisifier(0),
16  theRandGaussQ(0)
17  {}
CLHEP::RandGaussQ * theRandGaussQ
CSCCorrelatedNoisifier * theNoisifier
CSCStripConditions::~CSCStripConditions ( )
virtual

Definition at line 20 of file CSCStripConditions.cc.

References theRandGaussQ.

21 {
22  delete theRandGaussQ;
23 }
CLHEP::RandGaussQ * theRandGaussQ

Member Function Documentation

float CSCStripConditions::analogNoise ( const CSCDetId detId,
int  channel 
) const

calculated from pedestalSigma & gain

Definition at line 57 of file CSCStripConditions.cc.

References gain(), pedestalSigma(), and mathSSE::sqrt().

58 {
59  return sqrt(2) * pedestalSigma(detId, channel) / gain(detId, channel);
60 }
virtual float pedestalSigma(const CSCDetId &detId, int channel) const =0
T sqrt(T t)
Definition: SSEVec.h:46
virtual float gain(const CSCDetId &detId, int channel) const =0
virtual void CSCStripConditions::crosstalk ( const CSCDetId detId,
int  channel,
double  stripLength,
bool  leftRight,
float &  capacitive,
float &  resistive 
) const
pure virtual
virtual void CSCStripConditions::fetchNoisifier ( const CSCDetId detId,
int  istrip 
)
protectedpure virtual

Implemented in CSCDbStripConditions, and CSCConfigurableStripConditions.

Referenced by noisify().

virtual float CSCStripConditions::gain ( const CSCDetId detId,
int  channel 
) const
pure virtual

channels count from 1 gain is the ratio that takes us from fC to ADC. Nominally around 2

Implemented in CSCDbStripConditions, and CSCConfigurableStripConditions.

Referenced by analogNoise(), noisify(), and smearedGain().

virtual float CSCStripConditions::gainSigma ( const CSCDetId detId,
int  channel 
) const
pure virtual
virtual void CSCStripConditions::initializeEvent ( const edm::EventSetup es)
inlinevirtual

Reimplemented in CSCDbStripConditions.

Definition at line 25 of file CSCStripConditions.h.

Referenced by CSCDigiProducer::produce().

25 {}
virtual bool CSCStripConditions::isInBadChamber ( const CSCDetId id) const
inlinevirtual

is supplied layer/chamber flagged as bad? (default impl. is no)

Reimplemented in CSCDbStripConditions.

Definition at line 45 of file CSCStripConditions.h.

Referenced by CSCDigitizer::doAction().

45 { return false; }
void CSCStripConditions::noisify ( const CSCDetId detId,
CSCAnalogSignal signal 
)

superimposes noise, in fC, on the signal

Definition at line 39 of file CSCStripConditions.cc.

References fetchNoisifier(), gain(), CSCAnalogSignal::getElement(), CSCAnalogSignal::getTimeOffset(), CorrelatedNoisifier< M >::noisify(), CSCAnalogSignal::superimpose(), and theNoisifier.

Referenced by CSCStripElectronicsSim::makeNoiseSignal().

40 {
41  const int nScaBins = 8;
42  const float scaBinSize = 50.;
43  int channel = signal.getElement();
44  std::vector<float> binValues(nScaBins, 0.);
45  // use a temporary signal, in case we have to rebin
46  CSCAnalogSignal tmpSignal(channel, scaBinSize, binValues,
47  0., signal.getTimeOffset());
48 
49  fetchNoisifier(detId, channel );
50  theNoisifier->noisify(tmpSignal);
51  // noise matrix is in ADC counts. onvert to fC
52  tmpSignal *= 1./gain(detId, channel);
53  signal.superimpose(tmpSignal);
54 }
virtual void fetchNoisifier(const CSCDetId &detId, int istrip)=0
int getElement() const
constructor from time and amp shape
float getTimeOffset() const
void superimpose(const CSCAnalogSignal &signal2)
virtual float gain(const CSCDetId &detId, int channel) const =0
CSCCorrelatedNoisifier * theNoisifier
void noisify(T &frame, const VecDou *rangau=0) const
virtual float CSCStripConditions::pedestal ( const CSCDetId detId,
int  channel 
) const
pure virtual
virtual float CSCStripConditions::pedestalSigma ( const CSCDetId detId,
int  channel 
) const
pure virtual
void CSCStripConditions::setRandomEngine ( CLHEP::HepRandomEngine &  engine)

Definition at line 26 of file CSCStripConditions.cc.

References theRandGaussQ.

Referenced by CSCDigiProducer::CSCDigiProducer().

27 {
28  if(theRandGaussQ) delete theRandGaussQ;
29  theRandGaussQ = new CLHEP::RandGaussQ(engine);
30 }
CLHEP::RandGaussQ * theRandGaussQ
float CSCStripConditions::smearedGain ( const CSCDetId detId,
int  channel 
) const
virtual

Definition at line 33 of file CSCStripConditions.cc.

References gain(), gainSigma(), and theRandGaussQ.

Referenced by CSCStripElectronicsSim::createDigi().

34 {
35  return theRandGaussQ->fire( gain(detId, channel), gainSigma(detId, channel) );
36 }
virtual float gain(const CSCDetId &detId, int channel) const =0
virtual float gainSigma(const CSCDetId &detId, int channel) const =0
CLHEP::RandGaussQ * theRandGaussQ

Member Data Documentation

CSCCorrelatedNoisifier* CSCStripConditions::theNoisifier
protected
CLHEP::RandGaussQ* CSCStripConditions::theRandGaussQ
protected

Definition at line 51 of file CSCStripConditions.h.

Referenced by setRandomEngine(), smearedGain(), and ~CSCStripConditions().