CMS 3D CMS Logo

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

#include <CSCCrosstalkGenerator.h>

Public Member Functions

 CSCCrosstalkGenerator ()
 
CSCAnalogSignal getCrosstalk (const CSCAnalogSignal &inputSignal) const
 
float ratio (const CSCAnalogSignal &crosstalkSignal, const CSCAnalogSignal &signal) const
 analyzes the ratio between two signals. More...
 
void setParameters (float crosstalk, float delay, float resistiveFraction)
 

Private Attributes

float theCrosstalk
 
float theDelay
 
float theResistiveFraction
 

Detailed Description

Cross-talk generator for digitization simulation of Endcap Muon CSCs. We model crosstalk by making the signal on a neighboring strip or wire proportional to the slope of the original signal. The constant should be chosen to give the appropriate level of crosstalk, maybe 10% of the signal. The user is responsible for subtracting the crosstalk from the input signal, and adding the crosstalk signal to the neighbors.

Author
Rick Wilkinson,

Definition at line 19 of file CSCCrosstalkGenerator.h.

Constructor & Destructor Documentation

◆ CSCCrosstalkGenerator()

CSCCrosstalkGenerator::CSCCrosstalkGenerator ( )
inline

Definition at line 21 of file CSCCrosstalkGenerator.h.

Member Function Documentation

◆ getCrosstalk()

CSCAnalogSignal CSCCrosstalkGenerator::getCrosstalk ( const CSCAnalogSignal inputSignal) const

Definition at line 4 of file CSCCrosstalkGenerator.cc.

4  {
5  int nBins = inputSignal.getSize();
6  float binSize = inputSignal.getBinSize();
7  std::vector<float> binValues(nBins);
8 
9  for (int outputBin = 0; outputBin < nBins; ++outputBin) {
10  float aTime = outputBin * binSize - theDelay;
11  float slope = inputSignal.getValue(aTime) - inputSignal.getValue(aTime - 1.);
12  binValues[outputBin] = slope * theCrosstalk + theResistiveFraction * inputSignal.getValue(aTime);
13  }
14 
15  return CSCAnalogSignal(0, binSize, binValues, 0., inputSignal.getTimeOffset());
16 }

References CSCAnalogSignal::getBinSize(), CSCAnalogSignal::getSize(), CSCAnalogSignal::getTimeOffset(), CSCAnalogSignal::getValue(), seedmultiplicitymonitor_newtracking_cfi::nBins, slope, theCrosstalk, theDelay, and theResistiveFraction.

Referenced by CSCStripElectronicsSim::addCrosstalk().

◆ ratio()

float CSCCrosstalkGenerator::ratio ( const CSCAnalogSignal crosstalkSignal,
const CSCAnalogSignal signal 
) const

analyzes the ratio between two signals.

Definition at line 18 of file CSCCrosstalkGenerator.cc.

18  {
19  float maxFirst = 0., maxSecond = 0.;
20  int nbins = signal.getSize();
21  for (int i = 1; i < nbins; ++i) {
22  float v1 = signal.getBinValue(i);
23  float v2 = crosstalkSignal.getBinValue(i);
24 
25  if (v1 > maxFirst)
26  maxFirst = v1;
27  if (v2 > maxSecond)
28  maxSecond = v2;
29  }
30 
31  return maxSecond / maxFirst;
32 }

References CSCAnalogSignal::getBinValue(), CSCAnalogSignal::getSize(), mps_fire::i, and LaserClient_cfi::nbins.

◆ setParameters()

void CSCCrosstalkGenerator::setParameters ( float  crosstalk,
float  delay,
float  resistiveFraction 
)
inline

Definition at line 23 of file CSCCrosstalkGenerator.h.

23  {
24  theCrosstalk = crosstalk;
25  theDelay = delay;
26  theResistiveFraction = resistiveFraction;
27  }

References phase2TrackerDigitizer_cfi::delay, theCrosstalk, theDelay, and theResistiveFraction.

Referenced by CSCStripElectronicsSim::addCrosstalk().

Member Data Documentation

◆ theCrosstalk

float CSCCrosstalkGenerator::theCrosstalk
private

Definition at line 35 of file CSCCrosstalkGenerator.h.

Referenced by getCrosstalk(), and setParameters().

◆ theDelay

float CSCCrosstalkGenerator::theDelay
private

Definition at line 36 of file CSCCrosstalkGenerator.h.

Referenced by getCrosstalk(), and setParameters().

◆ theResistiveFraction

float CSCCrosstalkGenerator::theResistiveFraction
private

Definition at line 38 of file CSCCrosstalkGenerator.h.

Referenced by getCrosstalk(), and setParameters().

mps_fire.i
i
Definition: mps_fire.py:355
CSCCrosstalkGenerator::theResistiveFraction
float theResistiveFraction
Definition: CSCCrosstalkGenerator.h:38
CSCAnalogSignal::getBinValue
float getBinValue(int i) const
Definition: CSCAnalogSignal.h:48
CSCCrosstalkGenerator::theDelay
float theDelay
Definition: CSCCrosstalkGenerator.h:36
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
seedmultiplicitymonitor_newtracking_cfi.nBins
nBins
Definition: seedmultiplicitymonitor_newtracking_cfi.py:8
CSCAnalogSignal::getValue
float getValue(float t) const
Definition: CSCAnalogSignal.h:52
CSCAnalogSignal::getTimeOffset
float getTimeOffset() const
Definition: CSCAnalogSignal.h:72
CSCAnalogSignal::getSize
int getSize() const
Definition: CSCAnalogSignal.h:69
CSCCrosstalkGenerator::theCrosstalk
float theCrosstalk
Definition: CSCCrosstalkGenerator.h:35
CSCAnalogSignal
Definition: CSCAnalogSignal.h:32
CSCAnalogSignal::getBinSize
float getBinSize() const
Definition: CSCAnalogSignal.h:70
phase2TrackerDigitizer_cfi.delay
delay
Definition: phase2TrackerDigitizer_cfi.py:67
slope
static const double slope[3]
Definition: CastorTimeSlew.cc:6