CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

CSCStripConditions Class Reference

#include <CSCStripConditions.h>

Inheritance diagram for CSCStripConditions:
CSCConfigurableStripConditions CSCDbStripConditions

List of all members.

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
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)
void noisify (const CSCDetId &detId, CSCAnalogSignal &signal)
 superimposes noise, in fC, on the signal
virtual float pedestal (const CSCDetId &detId, int channel) const =0
 in ADC counts
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.

CSCStripConditions::~CSCStripConditions ( ) [virtual]

Definition at line 20 of file CSCStripConditions.cc.

References theRandGaussQ.

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

{
  return sqrt(2) * pedestalSigma(detId, channel) / gain(detId, channel);
}
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 
) [protected, pure virtual]

Implemented in CSCConfigurableStripConditions, and CSCDbStripConditions.

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 CSCConfigurableStripConditions, and CSCDbStripConditions.

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) [inline, virtual]

Reimplemented in CSCDbStripConditions.

Definition at line 25 of file CSCStripConditions.h.

Referenced by CSCDigiProducer::produce().

{}
virtual bool CSCStripConditions::isInBadChamber ( const CSCDetId id) const [inline, virtual]

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

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

{
  const int nScaBins = 8;
  const float scaBinSize = 50.;
  int channel = signal.getElement();
  std::vector<float> binValues(nScaBins, 0.);
  // use a temporary signal, in case we have to rebin
  CSCAnalogSignal tmpSignal(channel, scaBinSize, binValues,
                            0., signal.getTimeOffset());

  fetchNoisifier(detId, channel );
  theNoisifier->noisify(tmpSignal);
  // noise matrix is in ADC counts. onvert to fC
  tmpSignal *= 1./gain(detId, channel);
  signal.superimpose(tmpSignal);
}
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().

{
  if(theRandGaussQ) delete theRandGaussQ;
  theRandGaussQ = new CLHEP::RandGaussQ(engine);
}
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().

{
  return theRandGaussQ->fire( gain(detId, channel), gainSigma(detId, channel) );
}

Member Data Documentation

CLHEP::RandGaussQ* CSCStripConditions::theRandGaussQ [protected]

Definition at line 51 of file CSCStripConditions.h.

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