#include <TileSampleGenerator.h>
|
| TileSampleGenerator () |
|
| TileSampleGenerator (TilePulseShape *ps, TileSampleBuffer *buf, bool dd_DEBUG=false) |
|
virtual | ~TileSampleGenerator () |
|
void | setPulseShape (TilePulseShape *ps) |
|
void | fillSamples (double t0, double pedestal, double amplitude1, double amplitude2, TF1 *pdf, bool addNoise, double itOffset=0, double otOffset=50) |
|
void | fillNSamples (double t0, double pedestal, double amp_it, const std::vector< float > &_pu, TF1 *pdf, bool addNoise, double itOffset=0, int nSamples=7, int nPul=21) |
|
void | fill7SamplesQIE (float amp_it, float *amp_pu) |
|
Definition at line 16 of file TileSampleGenerator.h.
◆ TileSampleGenerator() [1/2]
TileSampleGenerator::TileSampleGenerator |
( |
| ) |
|
◆ TileSampleGenerator() [2/2]
◆ ~TileSampleGenerator()
TileSampleGenerator::~TileSampleGenerator |
( |
| ) |
|
|
virtual |
◆ fill7SamplesQIE()
void TileSampleGenerator::fill7SamplesQIE |
( |
float |
amp_it, |
|
|
float * |
amp_pu |
|
) |
| |
Definition at line 135 of file TileSampleGenerator.cxx.
144 float amp_total[7] = { 0, 0, 0, 0, 0, 0, 0 };
146 const float Q_1pe = 17.;
147 const float tail_prob = 0.18;
149 for (
int i = 0;
i < 7;
i++) {
155 tail_Q = Q_1pe *
m_rndm->Binomial((
int) (amp_pu[
i] / Q_1pe), tail_prob);
157 amp_total[
i] += amp_pu[
i] - tail_Q;
159 amp_total[
i + 1] += tail_Q;
163 tail_Q = Q_1pe *
m_rndm->Binomial((
int) amp_it / Q_1pe, tail_prob);
165 amp_total[3] += amp_it - tail_Q;
166 amp_total[4] += tail_Q;
181 for (
unsigned int i = 0;
i < 7;
i++) {
◆ fillNSamples()
void TileSampleGenerator::fillNSamples |
( |
double |
t0, |
|
|
double |
pedestal, |
|
|
double |
amp_it, |
|
|
const std::vector< float > & |
amp_pu, |
|
|
TF1 * |
pdf, |
|
|
bool |
addNoise, |
|
|
double |
itOffset = 0 , |
|
|
int |
nSamples = 7 , |
|
|
int |
nPul = 21 |
|
) |
| |
Definition at line 64 of file TileSampleGenerator.cxx.
66 std::unique_ptr<TileSampleBuffer> bufall(
new TileSampleBuffer(nPul, -25*((nPul-1)/2), 25.));
69 cout <<
"Pileup pulses:" << std::endl;
70 for (std::vector<float>::const_iterator
i = amp_pu.begin();
i != amp_pu.end(); ++
i)
71 std::cout << *
i <<
' ';
72 std::cout << std::endl;
77 double tin, amp_it_out;
78 int nPul = amp_pu.size();
80 vector<float> amp_pu_out(nPul);
82 double amp_total = pedestal;
85 cout <<
"sample to compute: " <<
i <<
" " << amp_total << std::endl;
87 for (
int j = 0; j < nPul ; j++) {
89 t[j] = bufall->getTime(
x +
i - j) -
t0;
92 cout <<
"pileupsample to compute " << j << std::endl;
94 cout <<
" time in " <<
i <<
" " << j <<
" " << (
x +
i - j) <<
" " <<
" buf " << bufall->getTime(
x +
i - j) <<
" time_out " <<
t[j] << std::endl;
98 amp_pu_out[j] =
m_ps->
eval(
t[j]) * amp_pu.at(j);
99 amp_total += amp_pu_out[j];
102 cout <<
" amp_pu " << amp_pu.at(j) <<
" ps " <<
m_ps->
eval(
t[j]) <<
" amp_out " << amp_pu_out[j] << std::endl;
104 cout <<
" amp_total " << amp_total << std::endl;
108 amp_it_out =
m_ps->
eval(tin) * amp_it;
109 amp_total += amp_it_out;
112 cout <<
" INTIME amp_it " << amp_it <<
" ps " <<
m_ps->
eval(tin) <<
" amp_it_out " << amp_it_out << std::endl;
114 std::cout <<
" amp_total " << amp_total << std::endl;
122 cout <<
" FINAL " << amp_total << std::endl;
◆ fillSamples()
void TileSampleGenerator::fillSamples |
( |
double |
t0, |
|
|
double |
pedestal, |
|
|
double |
amplitude1, |
|
|
double |
amplitude2, |
|
|
TF1 * |
pdf, |
|
|
bool |
addNoise, |
|
|
double |
itOffset = 0 , |
|
|
double |
otOffset = 50 |
|
) |
| |
◆ setPulseShape()
◆ m_buf
◆ m_DEBUG
bool TileSampleGenerator::m_DEBUG |
|
private |
◆ m_ps
◆ m_rndm
TRandom3* TileSampleGenerator::m_rndm |
|
private |
The documentation for this class was generated from the following files: