CMS 3D CMS Logo

CSCConfigurableStripConditions Class Reference

#include <SimMuon/CSCDigitizer/src/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.

00007 : theGain( p.getParameter<double>("gain") ),
00008   theME11Gain( p.getParameter<double>("me11gain") ),
00009   theGainSigma( p.getParameter<double>("ampGainSigma") ),
00010   thePedestal( p.getParameter<double>("pedestal") ),
00011   thePedestalSigma( p.getParameter<double>("pedestalSigma") ),
00012   theCapacitiveCrosstalk(0.0167),
00013   theResistiveCrosstalk(0.02)
00014 {
00015   theNoisifiers.resize(9);
00016   makeNoisifier(1, p.getParameter<std::vector<double> >("me11a") );
00017   makeNoisifier(2, p.getParameter<std::vector<double> >("me11") );
00018   makeNoisifier(3, p.getParameter<std::vector<double> >("me12") );
00019   makeNoisifier(4, p.getParameter<std::vector<double> >("me13") ); // not sure about this one
00020   makeNoisifier(5, p.getParameter<std::vector<double> >("me21") );
00021   makeNoisifier(6, p.getParameter<std::vector<double> >("me22") );
00022   makeNoisifier(7, p.getParameter<std::vector<double> >("me31") );
00023   makeNoisifier(8, p.getParameter<std::vector<double> >("me32") );
00024   makeNoisifier(9, p.getParameter<std::vector<double> >("me31") ); // for lack of a better idea
00025 }

CSCConfigurableStripConditions::~CSCConfigurableStripConditions (  )  [virtual]

Definition at line 28 of file CSCConfigurableStripConditions.cc.

References i, and theNoisifiers.

00029 {
00030   for(int i = 0; i < 9; ++i)
00031   {
00032     delete theNoisifiers[i];
00033   }
00034 }


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.

00097 {
00098   capacitive = theCapacitiveCrosstalk * stripLength;
00099   resistive = theResistiveCrosstalk;
00100 }

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

00051 {
00052   //TODO get this moved toCSCDetId
00053   int chamberType = CSCChamberSpecs::whatChamberType(detId.station(), detId.ring());
00054   theNoisifier = theNoisifiers[chamberType-1];
00055 }

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.

00038 {
00039   if(detId.station() == 1 && (detId.ring() == 1 || detId.ring() == 4) )
00040   {
00041     return theME11Gain;
00042   }  
00043   else
00044   {
00045     return theGain;
00046   }
00047 }

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

Implements CSCStripConditions.

Definition at line 16 of file CSCConfigurableStripConditions.h.

References theGainSigma.

00016 {return theGainSigma;}

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

Definition at line 58 of file CSCConfigurableStripConditions.cc.

References Exception, matrix, theNoisifiers, and thePedestalSigma.

Referenced by CSCConfigurableStripConditions().

00059 {
00060 
00061   // format is 33, 34, 44, 35, 45, 55
00062   //           46, 56, 66, 57, 67, 77
00063   if(correlations.size() != 12)
00064   {
00065     throw cms::Exception("CSCConfigurableStripConditions")
00066       << "Expect 12 noise correlation coefficients, but got "
00067       << correlations.size();
00068   }
00069 
00070   CSCCorrelatedNoiseMatrix matrix;
00071   matrix(3,3) = correlations[0];
00072   matrix(3,4) = correlations[1];
00073   matrix(4,4) = correlations[2];
00074   matrix(3,5) = correlations[3];
00075   matrix(4,5) = correlations[4];
00076   matrix(5,5) = correlations[5];
00077   matrix(4,6) = correlations[6];
00078   matrix(5,6) = correlations[7];
00079   matrix(6,6) = correlations[8];
00080   matrix(5,7) = correlations[9];
00081   matrix(6,7) = correlations[10];
00082   matrix(7,7) = correlations[11];
00083 
00084   // since I don't know how to correlate the pedestal samples,
00085   // take as constant
00086   double scaVariance = 2. * thePedestalSigma * thePedestalSigma;
00087   matrix(0,0) = scaVariance;
00088   matrix(1,1) = scaVariance;
00089   matrix(2,2) = scaVariance;
00090   theNoisifiers[chamberType-1] = new CSCCorrelatedNoisifier(matrix);
00091 
00092 }

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.

00019 {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.

00020 {return thePedestalSigma;}


Member Data Documentation

float CSCConfigurableStripConditions::theCapacitiveCrosstalk [private]

Definition at line 37 of file CSCConfigurableStripConditions.h.

Referenced by crosstalk().

float CSCConfigurableStripConditions::theGain [private]

Definition at line 31 of file CSCConfigurableStripConditions.h.

Referenced by gain().

float CSCConfigurableStripConditions::theGainSigma [private]

Definition at line 33 of file CSCConfigurableStripConditions.h.

Referenced by gainSigma().

float CSCConfigurableStripConditions::theME11Gain [private]

Definition at line 32 of file CSCConfigurableStripConditions.h.

Referenced by gain().

std::vector<CSCCorrelatedNoisifier *> CSCConfigurableStripConditions::theNoisifiers [private]

Definition at line 29 of file CSCConfigurableStripConditions.h.

Referenced by CSCConfigurableStripConditions(), fetchNoisifier(), makeNoisifier(), and ~CSCConfigurableStripConditions().

float CSCConfigurableStripConditions::thePedestal [private]

Definition at line 34 of file CSCConfigurableStripConditions.h.

Referenced by pedestal().

float CSCConfigurableStripConditions::thePedestalSigma [private]

Definition at line 35 of file CSCConfigurableStripConditions.h.

Referenced by makeNoisifier(), and pedestalSigma().

float CSCConfigurableStripConditions::theResistiveCrosstalk [private]

Definition at line 39 of file CSCConfigurableStripConditions.h.

Referenced by crosstalk().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:09 2009 for CMSSW by  doxygen 1.5.4