CMS 3D CMS Logo

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

#include <CSCDbStripConditions.h>

Inheritance diagram for CSCDbStripConditions:
CSCStripConditions

Public Member Functions

void crosstalk (const CSCDetId &detId, int channel, double stripLength, bool leftRight, float &capacitive, float &resistive) const override
 
 CSCDbStripConditions (const edm::ParameterSet &pset, edm::ConsumesCollector cc)
 
float gain (const CSCDetId &detId, int channel) const override
 channels count from 1 More...
 
float gainSigma (const CSCDetId &detId, int channel) const override
 total calibration precision More...
 
void initializeEvent (const edm::EventSetup &es) override
 fetch the maps from the database More...
 
bool isInBadChamber (const CSCDetId &id) const override
 check list of bad chambers from db More...
 
float pedestal (const CSCDetId &detId, int channel) const override
 in ADC counts More...
 
float pedestalSigma (const CSCDetId &detId, int channel) const override
 
 ~CSCDbStripConditions () override
 
- Public Member Functions inherited from CSCStripConditions
float analogNoise (const CSCDetId &detId, int channel) const
 calculated from pedestalSigma & gain More...
 
 CSCStripConditions ()
 
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
 

Private Attributes

bool doCorrelatedNoise_
 
float theCapacitiveCrosstalk
 
CSCConditions theConditions
 
float theGainsConstant
 
float theResistiveCrosstalkScaling
 

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 CSCDbStripConditions.h.

Constructor & Destructor Documentation

◆ CSCDbStripConditions()

CSCDbStripConditions::CSCDbStripConditions ( const edm::ParameterSet pset,
edm::ConsumesCollector  cc 
)
explicit

Definition at line 10 of file CSCDbStripConditions.cc.

13  theCapacitiveCrosstalk(pset.getParameter<double>("capacativeCrosstalk")),
14  theResistiveCrosstalkScaling(pset.getParameter<double>("resistiveCrosstalkScaling")),
15  theGainsConstant(pset.getParameter<double>("gainsConstant")),
16  doCorrelatedNoise_(pset.getParameter<bool>("doCorrelatedNoise")) {
17  // theCapacitiveCrosstalk = = 1/maxslope/maxsignal) = 1/ (0.00231/0.143);
18  // Howoever, need a bit more. Maybe the slope gets smeared?
19 }

◆ ~CSCDbStripConditions()

CSCDbStripConditions::~CSCDbStripConditions ( )
override

Definition at line 21 of file CSCDbStripConditions.cc.

21  {
22  if (theNoisifier != nullptr)
23  delete theNoisifier;
24 }

References CSCStripConditions::theNoisifier.

Member Function Documentation

◆ crosstalk()

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

Implements CSCStripConditions.

Definition at line 40 of file CSCDbStripConditions.cc.

41  {
42  resistive = theConditions.crosstalkIntercept(id, channel, leftRight) * theResistiveCrosstalkScaling;
43  float slope = theConditions.crosstalkSlope(id, channel, leftRight);
44  // ns before the peak where slope is max
45  float maxSlopeTime = 60.;
46  // some confusion about +/-
47  float capacitiveFraction = fabs(slope) * maxSlopeTime;
48  // theCapacitiveCrosstalk is the number needed for 100% xtalk, so
49  capacitive = theCapacitiveCrosstalk * capacitiveFraction;
50 }

References CSCConditions::crosstalkIntercept(), CSCConditions::crosstalkSlope(), slope, theCapacitiveCrosstalk, theConditions, and theResistiveCrosstalkScaling.

◆ fetchNoisifier()

void CSCDbStripConditions::fetchNoisifier ( const CSCDetId detId,
int  istrip 
)
overrideprivatevirtual

Implements CSCStripConditions.

Definition at line 52 of file CSCDbStripConditions.cc.

52  {
53  std::vector<float> me(12); // buffer for matrix elements
54  theConditions.noiseMatrixElements(id, istrip, me); // fill it
55 
57  // TODO get the pedestals right
58  matrix(2, 2) = me[0]; // item.elem33;
59  matrix(3, 3) = me[3]; // item.elem44;
60  matrix(4, 4) = me[6]; // item.elem55;
61  matrix(5, 5) = me[9]; // item.elem66;
62  matrix(6, 6) = me[11]; // item.elem77;
63 
64  if (doCorrelatedNoise_) {
65  matrix(2, 3) = me[1]; // item.elem34;
66  matrix(2, 4) = me[2]; // item.elem35;
67  matrix(3, 4) = me[4]; // item.elem45;
68  matrix(3, 5) = me[5]; // item.elem46;
69  matrix(4, 5) = me[7]; // item.elem56;
70  matrix(4, 6) = me[8]; // item.elem57;
71  matrix(5, 6) = me[10]; // item.elem67;
72  }
73 
74  // the other diagonal elements can just come from the pedestal sigma
75  float sigma = pedestalSigma(id, istrip);
76  //@@ float scaVariance = 2 * sigma * sigma;
77  //@@ The '2 *' IS strictly correct, but currently the value in the cond db is
78  // 2x too large since
79  //@@ it is the rms of the distribution of pedestals of all 8 time samples
80  // rather than the rms of
81  //@@ the average of the first two time samples
82  float scaVariance = sigma * sigma;
83  matrix(0, 0) = matrix(1, 1) = matrix(7, 7) = scaVariance;
84 
85  // unknown neighbors can be the average of the known neighbors
86  // float avgNeighbor = (matrix(2,3)+matrix(3,4)+matrix(4,5)+matrix(5,6))/4.;
87  // float avg2away = (matrix(2,4)+matrix(3,5)+matrix(4,6))/3.;
88  // matrix(0,1) = matrix(1,2) = matrix(6,7) = avgNeighbor;
89  // matrix(0,2) = matrix(1,3) = matrix(5,7) = avg2away;
90 
91  if (theNoisifier != nullptr)
92  delete theNoisifier;
94 }

References doCorrelatedNoise_, makeMuonMisalignmentScenario::matrix, hlt_dqm_clientPB-live_cfg::me, CSCConditions::noiseMatrixElements(), pedestalSigma(), theConditions, and CSCStripConditions::theNoisifier.

◆ gain()

float CSCDbStripConditions::gain ( const CSCDetId detId,
int  channel 
) const
overridevirtual

channels count from 1

Implements CSCStripConditions.

Definition at line 28 of file CSCDbStripConditions.cc.

28  {
29  return theConditions.gain(id, channel) * theGainsConstant;
30 }

References CSCConditions::gain(), theConditions, and theGainsConstant.

◆ gainSigma()

float CSCDbStripConditions::gainSigma ( const CSCDetId detId,
int  channel 
) const
inlineoverridevirtual

total calibration precision

Implements CSCStripConditions.

Definition at line 19 of file CSCDbStripConditions.h.

19 { return 0.005; }

◆ initializeEvent()

void CSCDbStripConditions::initializeEvent ( const edm::EventSetup es)
overridevirtual

fetch the maps from the database

Reimplemented from CSCStripConditions.

Definition at line 26 of file CSCDbStripConditions.cc.

References CSCConditions::initializeEvent(), and theConditions.

◆ isInBadChamber()

bool CSCDbStripConditions::isInBadChamber ( const CSCDetId id) const
overridevirtual

check list of bad chambers from db

Reimplemented from CSCStripConditions.

Definition at line 96 of file CSCDbStripConditions.cc.

96 { return theConditions.isInBadChamber(id); }

References CSCConditions::isInBadChamber(), and theConditions.

◆ pedestal()

float CSCDbStripConditions::pedestal ( const CSCDetId detId,
int  channel 
) const
overridevirtual

in ADC counts

Implements CSCStripConditions.

Definition at line 32 of file CSCDbStripConditions.cc.

32  {
33  return theConditions.pedestal(id, channel);
34 }

References CSCConditions::pedestal(), and theConditions.

◆ pedestalSigma()

float CSCDbStripConditions::pedestalSigma ( const CSCDetId detId,
int  channel 
) const
overridevirtual

Implements CSCStripConditions.

Definition at line 36 of file CSCDbStripConditions.cc.

36  {
37  return theConditions.pedestalSigma(id, channel);
38 }

References CSCConditions::pedestalSigma(), and theConditions.

Referenced by fetchNoisifier().

Member Data Documentation

◆ doCorrelatedNoise_

bool CSCDbStripConditions::doCorrelatedNoise_
private

Definition at line 47 of file CSCDbStripConditions.h.

Referenced by fetchNoisifier().

◆ theCapacitiveCrosstalk

float CSCDbStripConditions::theCapacitiveCrosstalk
private

Definition at line 41 of file CSCDbStripConditions.h.

Referenced by crosstalk().

◆ theConditions

CSCConditions CSCDbStripConditions::theConditions
private

◆ theGainsConstant

float CSCDbStripConditions::theGainsConstant
private

Definition at line 46 of file CSCDbStripConditions.h.

Referenced by gain().

◆ theResistiveCrosstalkScaling

float CSCDbStripConditions::theResistiveCrosstalkScaling
private

Definition at line 44 of file CSCDbStripConditions.h.

Referenced by crosstalk().

makeMuonMisalignmentScenario.matrix
list matrix
Definition: makeMuonMisalignmentScenario.py:141
CSCStripConditions::CSCCorrelatedNoiseMatrix
math::ErrorD< 8 >::type CSCCorrelatedNoiseMatrix
Definition: CSCStripConditions.h:15
CSCConditions::pedestal
float pedestal(const CSCDetId &detId, int channel) const
static ped in ADC counts
Definition: CSCConditions.cc:245
CSCStripConditions::CSCStripConditions
CSCStripConditions()
Definition: CSCStripConditions.cc:12
CSCDbStripConditions::theResistiveCrosstalkScaling
float theResistiveCrosstalkScaling
Definition: CSCDbStripConditions.h:44
CSCConditions::isInBadChamber
bool isInBadChamber(const CSCDetId &id) const
Is the gven chamber flagged as bad?
Definition: CSCConditions.cc:223
CSCDbStripConditions::doCorrelatedNoise_
bool doCorrelatedNoise_
Definition: CSCDbStripConditions.h:47
CSCConditions::gain
float gain(const CSCDetId &detId, int channel) const
gain per channel
Definition: CSCConditions.cc:237
CSCConditions::noiseMatrixElements
void noiseMatrixElements(const CSCDetId &id, int channel, std::vector< float > &me) const
Definition: CSCConditions.cc:293
CSCConditions::crosstalkIntercept
float crosstalkIntercept(const CSCDetId &detId, int channel, bool leftRight) const
crosstalk intercept for left and right
Definition: CSCConditions.cc:261
CSCStripConditions::CSCCorrelatedNoisifier
CorrelatedNoisifier< CSCCorrelatedNoiseMatrix > CSCCorrelatedNoisifier
Definition: CSCStripConditions.h:16
CSCStripConditions::theNoisifier
CSCCorrelatedNoisifier * theNoisifier
Definition: CSCStripConditions.h:52
CSCConditions::initializeEvent
void initializeEvent(const edm::EventSetup &es)
fetch database content via EventSetup
Definition: CSCConditions.cc:74
CSCDbStripConditions::pedestalSigma
float pedestalSigma(const CSCDetId &detId, int channel) const override
Definition: CSCDbStripConditions.cc:36
cc
CSCConditions::pedestalSigma
float pedestalSigma(const CSCDetId &detId, int channel) const
static ped rms in ADC counts
Definition: CSCConditions.cc:253
CSCConditions::crosstalkSlope
float crosstalkSlope(const CSCDetId &detId, int channel, bool leftRight) const
crosstalk slope for left and right
Definition: CSCConditions.cc:271
CSCDbStripConditions::theGainsConstant
float theGainsConstant
Definition: CSCDbStripConditions.h:46
CSCDbStripConditions::theConditions
CSCConditions theConditions
Definition: CSCDbStripConditions.h:38
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
slope
static const double slope[3]
Definition: CastorTimeSlew.cc:6
CSCDbStripConditions::theCapacitiveCrosstalk
float theCapacitiveCrosstalk
Definition: CSCDbStripConditions.h:41
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27