CMS 3D CMS Logo

CSCConfigurableStripConditions.cc
Go to the documentation of this file.
5 
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 }
25 
27  for (int i = 0; i < 9; ++i) {
28  delete theNoisifiers[i];
29  }
30 }
31 
32 float CSCConfigurableStripConditions::gain(const CSCDetId &detId, int channel) const {
33  if (detId.station() == 1 && (detId.ring() == 1 || detId.ring() == 4)) {
34  return theME11Gain;
35  } else {
36  return theGain;
37  }
38 }
39 
41  // TODO get this moved toCSCDetId
42  int chamberType = CSCChamberSpecs::whatChamberType(detId.station(), detId.ring());
43  theNoisifier = theNoisifiers[chamberType - 1];
44 }
45 
46 void CSCConfigurableStripConditions::makeNoisifier(int chamberType, const std::vector<double> &correlations) {
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 }
76 
78  const CSCDetId &detId, int channel, double stripLength, bool leftRight, float &capacitive, float &resistive) const {
79  capacitive = theCapacitiveCrosstalk * stripLength;
80  resistive = theResistiveCrosstalk;
81 }
mps_fire.i
i
Definition: mps_fire.py:428
makeMuonMisalignmentScenario.matrix
list matrix
Definition: makeMuonMisalignmentScenario.py:141
CSCDetId::ring
int ring() const
Definition: CSCDetId.h:68
CSCStripConditions::CSCCorrelatedNoiseMatrix
math::ErrorD< 8 >::type CSCCorrelatedNoiseMatrix
Definition: CSCStripConditions.h:15
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CSCConfigurableStripConditions::~CSCConfigurableStripConditions
~CSCConfigurableStripConditions() override
Definition: CSCConfigurableStripConditions.cc:26
CSCConfigurableStripConditions::CSCConfigurableStripConditions
CSCConfigurableStripConditions(const edm::ParameterSet &p)
Definition: CSCConfigurableStripConditions.cc:6
CSCDetId.h
CSCConfigurableStripConditions::thePedestalSigma
float thePedestalSigma
Definition: CSCConfigurableStripConditions.h:37
CSCConfigurableStripConditions.h
CSCStripConditions::CSCCorrelatedNoisifier
CorrelatedNoisifier< CSCCorrelatedNoiseMatrix > CSCCorrelatedNoisifier
Definition: CSCStripConditions.h:16
CSCStripConditions::theNoisifier
CSCCorrelatedNoisifier * theNoisifier
Definition: CSCStripConditions.h:52
CSCConfigurableStripConditions::theCapacitiveCrosstalk
float theCapacitiveCrosstalk
Definition: CSCConfigurableStripConditions.h:39
edm::ParameterSet
Definition: ParameterSet.h:47
CSCConfigurableStripConditions::theME11Gain
float theME11Gain
Definition: CSCConfigurableStripConditions.h:34
CSCConfigurableStripConditions::makeNoisifier
void makeNoisifier(int chamberType, const std::vector< double > &correlations)
Definition: CSCConfigurableStripConditions.cc:46
CSCDetId
Definition: CSCDetId.h:26
CSCChamberSpecs::whatChamberType
static int whatChamberType(int istation, int iring)
Definition: CSCChamberSpecs.cc:164
CSCConfigurableStripConditions::theNoisifiers
std::vector< CSCCorrelatedNoisifier * > theNoisifiers
Definition: CSCConfigurableStripConditions.h:31
CSCConfigurableStripConditions::theResistiveCrosstalk
float theResistiveCrosstalk
Definition: CSCConfigurableStripConditions.h:41
CSCConfigurableStripConditions::theGain
float theGain
Definition: CSCConfigurableStripConditions.h:33
Exception
Definition: hltDiff.cc:246
CSCConfigurableStripConditions::crosstalk
void crosstalk(const CSCDetId &detId, int channel, double stripLength, bool leftRight, float &capacitive, float &resistive) const override
Definition: CSCConfigurableStripConditions.cc:77
Exception.h
CSCChamberSpecs.h
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
CSCConfigurableStripConditions::gain
float gain(const CSCDetId &detId, int channel) const override
channels count from 1
Definition: CSCConfigurableStripConditions.cc:32
CSCConfigurableStripConditions::fetchNoisifier
void fetchNoisifier(const CSCDetId &detId, int istrip) override
Definition: CSCConfigurableStripConditions.cc:40