CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CSCConfigurableStripConditions Class Reference

#include <CSCConfigurableStripConditions.h>

Inheritance diagram for CSCConfigurableStripConditions:
CSCStripConditions

List of all members.

Public Member Functions

virtual void crosstalk (const CSCDetId &detId, int channel, double stripLength, bool leftRight, float &capacitive, float &resistive) const
 CSCConfigurableStripConditions (const edm::ParameterSet &p)
virtual float gain (const CSCDetId &detId, int channel) const
 channels count from 1
virtual float gainSigma (const CSCDetId &detId, int channel) const
virtual float pedestal (const CSCDetId &detId, int channel) const
 in ADC counts
virtual float pedestalSigma (const CSCDetId &detId, int channel) const
virtual ~CSCConfigurableStripConditions ()

Private Member Functions

virtual void fetchNoisifier (const CSCDetId &detId, int istrip)
void makeNoisifier (int chamberType, const std::vector< double > &correlations)

Private Attributes

float theCapacitiveCrosstalk
float theGain
float theGainSigma
float theME11Gain
std::vector
< CSCCorrelatedNoisifier * > 
theNoisifiers
float thePedestal
float thePedestalSigma
float theResistiveCrosstalk

Detailed Description

Definition at line 8 of file CSCConfigurableStripConditions.h.


Constructor & Destructor Documentation

CSCConfigurableStripConditions::CSCConfigurableStripConditions ( const edm::ParameterSet p)

Definition at line 6 of file CSCConfigurableStripConditions.cc.

References edm::ParameterSet::getParameter(), makeNoisifier(), and theNoisifiers.

: theGain( p.getParameter<double>("gain") ),
  theME11Gain( p.getParameter<double>("me11gain") ),
  theGainSigma( p.getParameter<double>("ampGainSigma") ),
  thePedestal( p.getParameter<double>("pedestal") ),
  thePedestalSigma( p.getParameter<double>("pedestalSigma") ),
  theCapacitiveCrosstalk(0.0167),
  theResistiveCrosstalk(0.02)
{
  theNoisifiers.resize(9);
  makeNoisifier(1, p.getParameter<std::vector<double> >("me11a") );
  makeNoisifier(2, p.getParameter<std::vector<double> >("me11") );
  makeNoisifier(3, p.getParameter<std::vector<double> >("me12") );
  makeNoisifier(4, p.getParameter<std::vector<double> >("me13") ); // not sure about this one
  makeNoisifier(5, p.getParameter<std::vector<double> >("me21") );
  makeNoisifier(6, p.getParameter<std::vector<double> >("me22") );
  makeNoisifier(7, p.getParameter<std::vector<double> >("me31") );
  makeNoisifier(8, p.getParameter<std::vector<double> >("me32") );
  makeNoisifier(9, p.getParameter<std::vector<double> >("me31") ); // for lack of a better idea
}
CSCConfigurableStripConditions::~CSCConfigurableStripConditions ( ) [virtual]

Definition at line 28 of file CSCConfigurableStripConditions.cc.

References i, and theNoisifiers.

{
  for(int i = 0; i < 9; ++i)
  {
    delete theNoisifiers[i];
  }
}

Member Function Documentation

void CSCConfigurableStripConditions::crosstalk ( const CSCDetId detId,
int  channel,
double  stripLength,
bool  leftRight,
float &  capacitive,
float &  resistive 
) const [virtual]

Implements CSCStripConditions.

Definition at line 94 of file CSCConfigurableStripConditions.cc.

References theCapacitiveCrosstalk, and theResistiveCrosstalk.

{
  capacitive = theCapacitiveCrosstalk * stripLength;
  resistive = theResistiveCrosstalk;
}
void CSCConfigurableStripConditions::fetchNoisifier ( const CSCDetId detId,
int  istrip 
) [private, virtual]

Implements CSCStripConditions.

Definition at line 50 of file CSCConfigurableStripConditions.cc.

References CSCDetId::ring(), CSCDetId::station(), CSCStripConditions::theNoisifier, theNoisifiers, and CSCChamberSpecs::whatChamberType().

{
  //TODO get this moved toCSCDetId
  int chamberType = CSCChamberSpecs::whatChamberType(detId.station(), detId.ring());
  theNoisifier = theNoisifiers[chamberType-1];
}
float CSCConfigurableStripConditions::gain ( const CSCDetId detId,
int  channel 
) const [virtual]

channels count from 1

Implements CSCStripConditions.

Definition at line 37 of file CSCConfigurableStripConditions.cc.

References CSCDetId::ring(), CSCDetId::station(), theGain, and theME11Gain.

{
  if(detId.station() == 1 && (detId.ring() == 1 || detId.ring() == 4) )
  {
    return theME11Gain;
  }  
  else
  {
    return theGain;
  }
}
virtual float CSCConfigurableStripConditions::gainSigma ( const CSCDetId detId,
int  channel 
) const [inline, virtual]

Implements CSCStripConditions.

Definition at line 16 of file CSCConfigurableStripConditions.h.

References theGainSigma.

{return theGainSigma;}
void CSCConfigurableStripConditions::makeNoisifier ( int  chamberType,
const std::vector< double > &  correlations 
) [private]

Definition at line 58 of file CSCConfigurableStripConditions.cc.

References Exception, theNoisifiers, and thePedestalSigma.

Referenced by CSCConfigurableStripConditions().

{

  // format is 33, 34, 44, 35, 45, 55
  //           46, 56, 66, 57, 67, 77
  if(correlations.size() != 12)
  {
    throw cms::Exception("CSCConfigurableStripConditions")
      << "Expect 12 noise correlation coefficients, but got "
      << correlations.size();
  }

  CSCCorrelatedNoiseMatrix matrix;
  matrix(3,3) = correlations[0];
  matrix(3,4) = correlations[1];
  matrix(4,4) = correlations[2];
  matrix(3,5) = correlations[3];
  matrix(4,5) = correlations[4];
  matrix(5,5) = correlations[5];
  matrix(4,6) = correlations[6];
  matrix(5,6) = correlations[7];
  matrix(6,6) = correlations[8];
  matrix(5,7) = correlations[9];
  matrix(6,7) = correlations[10];
  matrix(7,7) = correlations[11];

  // since I don't know how to correlate the pedestal samples,
  // take as constant
  double scaVariance = 2. * thePedestalSigma * thePedestalSigma;
  matrix(0,0) = scaVariance;
  matrix(1,1) = scaVariance;
  matrix(2,2) = scaVariance;
  theNoisifiers[chamberType-1] = new CSCCorrelatedNoisifier(matrix);

}
virtual float CSCConfigurableStripConditions::pedestal ( const CSCDetId detId,
int  channel 
) const [inline, virtual]

in ADC counts

Implements CSCStripConditions.

Definition at line 19 of file CSCConfigurableStripConditions.h.

References thePedestal.

{return thePedestal;}
virtual float CSCConfigurableStripConditions::pedestalSigma ( const CSCDetId detId,
int  channel 
) const [inline, virtual]

Implements CSCStripConditions.

Definition at line 20 of file CSCConfigurableStripConditions.h.

References thePedestalSigma.

{return thePedestalSigma;}

Member Data Documentation

Definition at line 37 of file CSCConfigurableStripConditions.h.

Referenced by crosstalk().

Definition at line 31 of file CSCConfigurableStripConditions.h.

Referenced by gain().

Definition at line 33 of file CSCConfigurableStripConditions.h.

Referenced by gainSigma().

Definition at line 32 of file CSCConfigurableStripConditions.h.

Referenced by gain().

Definition at line 34 of file CSCConfigurableStripConditions.h.

Referenced by pedestal().

Definition at line 35 of file CSCConfigurableStripConditions.h.

Referenced by makeNoisifier(), and pedestalSigma().

Definition at line 39 of file CSCConfigurableStripConditions.h.

Referenced by crosstalk().