CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
CSCConfigurableStripConditions Class Reference

#include <CSCConfigurableStripConditions.h>

Inheritance diagram for CSCConfigurableStripConditions:
CSCStripConditions

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 More...
 
virtual float gainSigma (const CSCDetId &detId, int channel) const
 
virtual float pedestal (const CSCDetId &detId, int channel) const
 in ADC counts More...
 
virtual float pedestalSigma (const CSCDetId &detId, int channel) const
 
virtual ~CSCConfigurableStripConditions ()
 
- Public Member Functions inherited from CSCStripConditions
float analogNoise (const CSCDetId &detId, int channel) const
 calculated from pedestalSigma & gain More...
 
 CSCStripConditions ()
 
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, CLHEP::HepRandomEngine *)
 superimposes noise, in fC, on the signal More...
 
virtual float smearedGain (const CSCDetId &detId, int channel, CLHEP::HepRandomEngine *) const
 
virtual ~CSCStripConditions ()
 

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
 

Additional Inherited Members

- Public Types inherited from CSCStripConditions
typedef math::ErrorD< 8 >::type CSCCorrelatedNoiseMatrix
 
typedef CorrelatedNoisifier< CSCCorrelatedNoiseMatrixCSCCorrelatedNoisifier
 
- Protected Attributes inherited from CSCStripConditions
CSCCorrelatedNoisifiertheNoisifier
 

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.

7 : theGain( p.getParameter<double>("gain") ),
8  theME11Gain( p.getParameter<double>("me11gain") ),
9  theGainSigma( p.getParameter<double>("ampGainSigma") ),
10  thePedestal( p.getParameter<double>("pedestal") ),
11  thePedestalSigma( p.getParameter<double>("pedestalSigma") ),
12  theCapacitiveCrosstalk(0.0167),
14 {
15  theNoisifiers.resize(9);
16  makeNoisifier(1, p.getParameter<std::vector<double> >("me11a") );
17  makeNoisifier(2, p.getParameter<std::vector<double> >("me11") );
18  makeNoisifier(3, p.getParameter<std::vector<double> >("me12") );
19  makeNoisifier(4, p.getParameter<std::vector<double> >("me13") ); // not sure about this one
20  makeNoisifier(5, p.getParameter<std::vector<double> >("me21") );
21  makeNoisifier(6, p.getParameter<std::vector<double> >("me22") );
22  makeNoisifier(7, p.getParameter<std::vector<double> >("me31") );
23  makeNoisifier(8, p.getParameter<std::vector<double> >("me32") );
24  makeNoisifier(9, p.getParameter<std::vector<double> >("me31") ); // for lack of a better idea
25 }
T getParameter(std::string const &) const
void makeNoisifier(int chamberType, const std::vector< double > &correlations)
std::vector< CSCCorrelatedNoisifier * > theNoisifiers
CSCConfigurableStripConditions::~CSCConfigurableStripConditions ( )
virtual

Definition at line 28 of file CSCConfigurableStripConditions.cc.

References mps_fire::i, and theNoisifiers.

29 {
30  for(int i = 0; i < 9; ++i)
31  {
32  delete theNoisifiers[i];
33  }
34 }
std::vector< CSCCorrelatedNoisifier * > theNoisifiers

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.

Referenced by pedestalSigma().

97 {
98  capacitive = theCapacitiveCrosstalk * stripLength;
99  resistive = theResistiveCrosstalk;
100 }
void CSCConfigurableStripConditions::fetchNoisifier ( const CSCDetId detId,
int  istrip 
)
privatevirtual

Implements CSCStripConditions.

Definition at line 50 of file CSCConfigurableStripConditions.cc.

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

Referenced by pedestalSigma().

51 {
52  //TODO get this moved toCSCDetId
53  int chamberType = CSCChamberSpecs::whatChamberType(detId.station(), detId.ring());
54  theNoisifier = theNoisifiers[chamberType-1];
55 }
static int whatChamberType(int istation, int iring)
std::vector< CSCCorrelatedNoisifier * > theNoisifiers
int ring() const
Definition: CSCDetId.h:75
CSCCorrelatedNoisifier * theNoisifier
int station() const
Definition: CSCDetId.h:86
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.

38 {
39  if(detId.station() == 1 && (detId.ring() == 1 || detId.ring() == 4) )
40  {
41  return theME11Gain;
42  }
43  else
44  {
45  return theGain;
46  }
47 }
int ring() const
Definition: CSCDetId.h:75
int station() const
Definition: CSCDetId.h:86
virtual float CSCConfigurableStripConditions::gainSigma ( const CSCDetId detId,
int  channel 
) const
inlinevirtual
void CSCConfigurableStripConditions::makeNoisifier ( int  chamberType,
const std::vector< double > &  correlations 
)
private

Definition at line 58 of file CSCConfigurableStripConditions.cc.

References Exception, makeMuonMisalignmentScenario::matrix, theNoisifiers, and thePedestalSigma.

Referenced by CSCConfigurableStripConditions(), and pedestalSigma().

59 {
60 
61  // format is 33, 34, 44, 35, 45, 55
62  // 46, 56, 66, 57, 67, 77
63  if(correlations.size() != 12)
64  {
65  throw cms::Exception("CSCConfigurableStripConditions")
66  << "Expect 12 noise correlation coefficients, but got "
67  << correlations.size();
68  }
69 
71  matrix(3,3) = correlations[0];
72  matrix(3,4) = correlations[1];
73  matrix(4,4) = correlations[2];
74  matrix(3,5) = correlations[3];
75  matrix(4,5) = correlations[4];
76  matrix(5,5) = correlations[5];
77  matrix(4,6) = correlations[6];
78  matrix(5,6) = correlations[7];
79  matrix(6,6) = correlations[8];
80  matrix(5,7) = correlations[9];
81  matrix(6,7) = correlations[10];
82  matrix(7,7) = correlations[11];
83 
84  // since I don't know how to correlate the pedestal samples,
85  // take as constant
86  double scaVariance = 2. * thePedestalSigma * thePedestalSigma;
87  matrix(0,0) = scaVariance;
88  matrix(1,1) = scaVariance;
89  matrix(2,2) = scaVariance;
90  theNoisifiers[chamberType-1] = new CSCCorrelatedNoisifier(matrix);
91 
92 }
math::ErrorD< 8 >::type CSCCorrelatedNoiseMatrix
std::vector< CSCCorrelatedNoisifier * > theNoisifiers
CorrelatedNoisifier< CSCCorrelatedNoiseMatrix > CSCCorrelatedNoisifier
virtual float CSCConfigurableStripConditions::pedestal ( const CSCDetId detId,
int  channel 
) const
inlinevirtual

in ADC counts

Implements CSCStripConditions.

Definition at line 19 of file CSCConfigurableStripConditions.h.

References thePedestal.

virtual float CSCConfigurableStripConditions::pedestalSigma ( const CSCDetId detId,
int  channel 
) const
inlinevirtual

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