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

void crosstalk (const CSCDetId &detId, int channel, double stripLength, bool leftRight, float &capacitive, float &resistive) const override
 
 CSCConfigurableStripConditions (const edm::ParameterSet &p)
 
float gain (const CSCDetId &detId, int channel) const override
 channels count from 1 More...
 
float gainSigma (const CSCDetId &detId, int channel) const override
 
float pedestal (const CSCDetId &detId, int channel) const override
 in ADC counts More...
 
float pedestalSigma (const CSCDetId &detId, int channel) const override
 
 ~CSCConfigurableStripConditions () override
 
- 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

void fetchNoisifier (const CSCDetId &detId, int istrip) override
 
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),
13  theResistiveCrosstalk(0.02) {
14  theNoisifiers.resize(9);
15  makeNoisifier(1, p.getParameter<std::vector<double>>("me11a"));
16  makeNoisifier(2, p.getParameter<std::vector<double>>("me11"));
17  makeNoisifier(3, p.getParameter<std::vector<double>>("me12"));
18  makeNoisifier(4, p.getParameter<std::vector<double>>("me13")); // not sure about this one
19  makeNoisifier(5, p.getParameter<std::vector<double>>("me21"));
20  makeNoisifier(6, p.getParameter<std::vector<double>>("me22"));
21  makeNoisifier(7, p.getParameter<std::vector<double>>("me31"));
22  makeNoisifier(8, p.getParameter<std::vector<double>>("me32"));
23  makeNoisifier(9, p.getParameter<std::vector<double>>("me31")); // for lack of a better idea
24 }
T getParameter(std::string const &) const
void makeNoisifier(int chamberType, const std::vector< double > &correlations)
std::vector< CSCCorrelatedNoisifier * > theNoisifiers
CSCConfigurableStripConditions::~CSCConfigurableStripConditions ( )
override

Definition at line 26 of file CSCConfigurableStripConditions.cc.

References mps_fire::i, and theNoisifiers.

26  {
27  for (int i = 0; i < 9; ++i) {
28  delete theNoisifiers[i];
29  }
30 }
std::vector< CSCCorrelatedNoisifier * > theNoisifiers

Member Function Documentation

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

Implements CSCStripConditions.

Definition at line 77 of file CSCConfigurableStripConditions.cc.

References theCapacitiveCrosstalk, and theResistiveCrosstalk.

Referenced by pedestalSigma().

78  {
79  capacitive = theCapacitiveCrosstalk * stripLength;
80  resistive = theResistiveCrosstalk;
81 }
void CSCConfigurableStripConditions::fetchNoisifier ( const CSCDetId detId,
int  istrip 
)
overrideprivatevirtual

Implements CSCStripConditions.

Definition at line 40 of file CSCConfigurableStripConditions.cc.

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

Referenced by pedestalSigma().

40  {
41  // TODO get this moved toCSCDetId
42  int chamberType = CSCChamberSpecs::whatChamberType(detId.station(), detId.ring());
43  theNoisifier = theNoisifiers[chamberType - 1];
44 }
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
overridevirtual

channels count from 1

Implements CSCStripConditions.

Definition at line 32 of file CSCConfigurableStripConditions.cc.

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

32  {
33  if (detId.station() == 1 && (detId.ring() == 1 || detId.ring() == 4)) {
34  return theME11Gain;
35  } else {
36  return theGain;
37  }
38 }
int ring() const
Definition: CSCDetId.h:75
int station() const
Definition: CSCDetId.h:86
float CSCConfigurableStripConditions::gainSigma ( const CSCDetId detId,
int  channel 
) const
inlineoverridevirtual

Implements CSCStripConditions.

Definition at line 15 of file CSCConfigurableStripConditions.h.

References theGainSigma.

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

Definition at line 46 of file CSCConfigurableStripConditions.cc.

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

Referenced by CSCConfigurableStripConditions(), and pedestalSigma().

46  {
47  // format is 33, 34, 44, 35, 45, 55
48  // 46, 56, 66, 57, 67, 77
49  if (correlations.size() != 12) {
50  throw cms::Exception("CSCConfigurableStripConditions")
51  << "Expect 12 noise correlation coefficients, but got " << correlations.size();
52  }
53 
55  matrix(3, 3) = correlations[0];
56  matrix(3, 4) = correlations[1];
57  matrix(4, 4) = correlations[2];
58  matrix(3, 5) = correlations[3];
59  matrix(4, 5) = correlations[4];
60  matrix(5, 5) = correlations[5];
61  matrix(4, 6) = correlations[6];
62  matrix(5, 6) = correlations[7];
63  matrix(6, 6) = correlations[8];
64  matrix(5, 7) = correlations[9];
65  matrix(6, 7) = correlations[10];
66  matrix(7, 7) = correlations[11];
67 
68  // since I don't know how to correlate the pedestal samples,
69  // take as constant
70  double scaVariance = 2. * thePedestalSigma * thePedestalSigma;
71  matrix(0, 0) = scaVariance;
72  matrix(1, 1) = scaVariance;
73  matrix(2, 2) = scaVariance;
74  theNoisifiers[chamberType - 1] = new CSCCorrelatedNoisifier(matrix);
75 }
math::ErrorD< 8 >::type CSCCorrelatedNoiseMatrix
std::vector< CSCCorrelatedNoisifier * > theNoisifiers
CorrelatedNoisifier< CSCCorrelatedNoiseMatrix > CSCCorrelatedNoisifier
float CSCConfigurableStripConditions::pedestal ( const CSCDetId detId,
int  channel 
) const
inlineoverridevirtual

in ADC counts

Implements CSCStripConditions.

Definition at line 18 of file CSCConfigurableStripConditions.h.

References thePedestal.

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

Member Data Documentation

float CSCConfigurableStripConditions::theCapacitiveCrosstalk
private

Definition at line 39 of file CSCConfigurableStripConditions.h.

Referenced by crosstalk().

float CSCConfigurableStripConditions::theGain
private

Definition at line 33 of file CSCConfigurableStripConditions.h.

Referenced by gain().

float CSCConfigurableStripConditions::theGainSigma
private

Definition at line 35 of file CSCConfigurableStripConditions.h.

Referenced by gainSigma().

float CSCConfigurableStripConditions::theME11Gain
private

Definition at line 34 of file CSCConfigurableStripConditions.h.

Referenced by gain().

std::vector<CSCCorrelatedNoisifier *> CSCConfigurableStripConditions::theNoisifiers
private
float CSCConfigurableStripConditions::thePedestal
private

Definition at line 36 of file CSCConfigurableStripConditions.h.

Referenced by pedestal().

float CSCConfigurableStripConditions::thePedestalSigma
private

Definition at line 37 of file CSCConfigurableStripConditions.h.

Referenced by makeNoisifier(), and pedestalSigma().

float CSCConfigurableStripConditions::theResistiveCrosstalk
private

Definition at line 41 of file CSCConfigurableStripConditions.h.

Referenced by crosstalk().