SimMuon
CSCDigitizer
src
CSCCrosstalkGenerator.cc
Go to the documentation of this file.
1
#include "
SimMuon/CSCDigitizer/src/CSCAnalogSignal.h
"
2
#include "
SimMuon/CSCDigitizer/src/CSCCrosstalkGenerator.h
"
3
4
CSCAnalogSignal
CSCCrosstalkGenerator::getCrosstalk
(
const
CSCAnalogSignal
&inputSignal)
const
{
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
}
17
18
float
CSCCrosstalkGenerator::ratio
(
const
CSCAnalogSignal
&crosstalkSignal,
const
CSCAnalogSignal
&signal)
const
{
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
}
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
CSCAnalogSignal.h
CSCCrosstalkGenerator::getCrosstalk
CSCAnalogSignal getCrosstalk(const CSCAnalogSignal &inputSignal) const
Definition:
CSCCrosstalkGenerator.cc:4
CSCCrosstalkGenerator.h
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
slope
static const double slope[3]
Definition:
CastorTimeSlew.cc:6
CSCCrosstalkGenerator::ratio
float ratio(const CSCAnalogSignal &crosstalkSignal, const CSCAnalogSignal &signal) const
analyzes the ratio between two signals.
Definition:
CSCCrosstalkGenerator.cc:18
Generated for CMSSW Reference Manual by
1.8.16