LDMX Software
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ldmx::HgcrocEmulator Class Reference

Emulate the digitization procedure performed by the HGCROC. More...

#include <HgcrocEmulator.h>

Classes

class  CompositePulse
 CompositePulse. More...
 

Public Member Functions

 HgcrocEmulator (const framework::config::Parameters &ps)
 Constructor.
 
 ~HgcrocEmulator ()
 Destructor.
 
bool hasSeed () const
 Check if emulator has been seeded.
 
void seedGenerator (uint64_t seed)
 Seed the emulator for random number generation.
 
void condition (const conditions::DoubleTableCondition &table)
 Set Conditions.
 
bool digitize (const int &channelID, std::vector< std::pair< double, double > > &arriving_pulses, std::vector< ldmx::HgcrocDigiCollection::Sample > &digiToAdd) const
 Digitize the signals from the simulated hits.
 
std::vector< ldmx::HgcrocDigiCollection::SamplenoiseDigi (const int &channel, const double &soi_amplitude=0) const
 Generate a digi of pure noise.
 
double noise (const int &channelID) const
 Get random noise amplitdue for input channel [mV].
 
double gain (const int &channelID) const
 Gain for input channel.
 
double pedestal (const int &id) const
 Pedestal [ADC Counts] for input channel.
 
double readoutThreshold (const int &id) const
 Readout Threshold (ADC Counts)
 

Private Member Functions

double getCondition (int id, const std::string &name) const
 Get condition for input chip ID, condition name, and default value.
 

Private Attributes

bool noise_ {true}
 Put noise in channels, only configure to false if testing.
 
int nADCs_
 Depth of ADC buffer.
 
int iSOI_
 Index for the Sample Of Interest in the list of digi samples.
 
double clockCycle_
 Time interval for chip clock [ns].
 
double timingJitter_
 Jitter of timing mechanism in the chip [ns].
 
double ns_
 Conversion from time [ns] to counts.
 
double rateUpSlope_
 Rate of Up Slope in Pulse Shape [1/ns].
 
double timeUpSlope_
 Time of Up Slope relative to Pulse Shape Fit [ns].
 
double rateDnSlope_
 Rate of Down Slope in Pulse Shape [1/ns].
 
double timeDnSlope_
 Time of Down Slope relative to Pulse Shape Fit [ns].
 
double timePeak_
 Time of Peak relative to pulse shape fit [ns].
 
double hit_merge_ns_
 Hit merging time [ns].
 
const conditions::DoubleTableConditionchipConditions_ {nullptr}
 Handle to table of chip-dependent conditions.
 
std::map< std::string, int > conditionNamesToIndex_
 Map of condition names to column numbers.
 
std::unique_ptr< TRandom3 > noiseInjector_
 Generates Gaussian noise on top of real hits.
 
TF1 pulseFunc_
 Functional shape of signal pulse in time.
 

Detailed Description

Emulate the digitization procedure performed by the HGCROC.

This object emulates how the chip converts the analog signal into DIGI samples. With that in mind, the digitize method converts a set of voltages and times into the DIGI.

This object does not do everything related to subsystem information. It does not simulate noise within the empty channels, and it does not convert simulated energy depositions into voltages. These tasks depend on the detector construction, so they are left to the individual subsystem producers.

@TODO time phase setting relative to target t=0ns using electronic IDs

@TODO accurately model recovering from saturation (TOT Mode). Currently, we just have all the samples after the sample triggering TOT mode rail.

Definition at line 39 of file HgcrocEmulator.h.

Constructor & Destructor Documentation

◆ HgcrocEmulator()

ldmx::HgcrocEmulator::HgcrocEmulator ( const framework::config::Parameters ps)

Constructor.

Configures the chip emulator using the passed parameters.

Definition at line 6 of file HgcrocEmulator.cxx.

6 {
7 // settings of readout chip that are the same for all chips
8 // used in actual digitization
9 noise_ = ps.getParameter<bool>("noise");
10 timingJitter_ = ps.getParameter<double>("timingJitter");
11 rateUpSlope_ = ps.getParameter<double>("rateUpSlope");
12 timeUpSlope_ = ps.getParameter<double>("timeUpSlope");
13 rateDnSlope_ = ps.getParameter<double>("rateDnSlope");
14 timeDnSlope_ = ps.getParameter<double>("timeDnSlope");
15 timePeak_ = ps.getParameter<double>("timePeak");
16 clockCycle_ = ps.getParameter<double>("clockCycle");
17 nADCs_ = ps.getParameter<int>("nADCs");
18 iSOI_ = ps.getParameter<int>("iSOI");
19
20 // Time -> clock counts conversion
21 // time [ns] * ( 2^10 / max time in ns ) = clock counts
22 ns_ = 1024. / clockCycle_;
23
24 hit_merge_ns_ = 0.05; // combine at 50 ps level
25
26 // Configure the pulse shape function
28 TF1("pulseFunc",
29 "[0]*((1.0+exp([1]*(-[2]+[3])))*(1.0+exp([5]*(-[6]+[3]))))/"
30 "((1.0+exp([1]*(x-[2]+[3]-[4])))*(1.0+exp([5]*(x-[6]+[3]-[4]))))",
31 0.0, (double)nADCs_ * clockCycle_);
32 pulseFunc_.FixParameter(0, 1.0); // amplitude is set externally
33 pulseFunc_.FixParameter(1, rateUpSlope_);
34 pulseFunc_.FixParameter(2, timeUpSlope_);
35 pulseFunc_.FixParameter(3, timePeak_);
36 pulseFunc_.FixParameter(4, 0); // not using time offset in this way
37 pulseFunc_.FixParameter(5, rateDnSlope_);
38 pulseFunc_.FixParameter(6, timeDnSlope_);
39}
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
Definition Parameters.h:89
double rateUpSlope_
Rate of Up Slope in Pulse Shape [1/ns].
double hit_merge_ns_
Hit merging time [ns].
double timeUpSlope_
Time of Up Slope relative to Pulse Shape Fit [ns].
double timePeak_
Time of Peak relative to pulse shape fit [ns].
int iSOI_
Index for the Sample Of Interest in the list of digi samples.
double timingJitter_
Jitter of timing mechanism in the chip [ns].
int nADCs_
Depth of ADC buffer.
bool noise_
Put noise in channels, only configure to false if testing.
double timeDnSlope_
Time of Down Slope relative to Pulse Shape Fit [ns].
TF1 pulseFunc_
Functional shape of signal pulse in time.
double clockCycle_
Time interval for chip clock [ns].
double rateDnSlope_
Rate of Down Slope in Pulse Shape [1/ns].
double ns_
Conversion from time [ns] to counts.

References clockCycle_, framework::config::Parameters::getParameter(), hit_merge_ns_, iSOI_, nADCs_, noise_, ns_, pulseFunc_, rateDnSlope_, rateUpSlope_, timeDnSlope_, timePeak_, timeUpSlope_, and timingJitter_.

◆ ~HgcrocEmulator()

ldmx::HgcrocEmulator::~HgcrocEmulator ( )
inline

Destructor.

Definition at line 49 of file HgcrocEmulator.h.

49{}

Member Function Documentation

◆ condition()

void ldmx::HgcrocEmulator::condition ( const conditions::DoubleTableCondition table)
inline

Set Conditions.

Passes the chips conditions to be cached here and used later in digitization.

Parameters
tableconditions::DoubleTableConditions to be used for chip parameters

Definition at line 72 of file HgcrocEmulator.h.

72 {
73 // reset cache of column numbers if table changes
74 if (&table != chipConditions_) conditionNamesToIndex_.clear();
75 chipConditions_ = &table;
76 }
const conditions::DoubleTableCondition * chipConditions_
Handle to table of chip-dependent conditions.
std::map< std::string, int > conditionNamesToIndex_
Map of condition names to column numbers.

References chipConditions_, and conditionNamesToIndex_.

◆ digitize()

bool ldmx::HgcrocEmulator::digitize ( const int &  channelID,
std::vector< std::pair< double, double > > &  arriving_pulses,
std::vector< ldmx::HgcrocDigiCollection::Sample > &  digiToAdd 
) const

Digitize the signals from the simulated hits.

This is where the hefty amount of work is done.

0. Prepare for Emulation

  • Clear input list of digi samples
  • Get conditions for the current chip
  • Sort the input sim voltage hits by amplitude

Combine input simulated hits into one CompositePulse to digitize.

  • This composite pulse decides whether to merge two simulated hits into one larger pulse depending on how close they are in time.

Add a timing jitter TODO

  1. Go through sampling baskets one-by-one
    • If enter pulse goes above tot threshold, then enter TOT readout mode, digitize, and return true.
    • If pulse never goes above tot threshold, then only return true if the voltage sample taken in the SOI is above the readout threshold.

ADC Mode

Here, we measure the height of the pulse once per clock cycle. This leaves us with nADCs_ samples for each digitized hit. The voltage measurements are converted to ADC counts using the parameter gain_.

The time of arrival (TOA) is zero unless the amplitude is greater than toaThreshold_. Then the TOA is set to the point the pulse crosses the toaThreshold_ with respect to the current clock window. The time measurements are converted to clock counts using 2^10=1024 and clockCycle_.

Both the tot_complete_ and tot_progress_ flags are set to false for all the samples.

TOT Mode

Here, we measure how long the chip is in saturation. This is calculated using the drain rate and assuming a linear drain of the charge off of the chip.

The charge deposited on the chip is converted from the pulse triggering TOT without including the pedestal. The pedestal is included in the pulse when determining if the pulse should enter TOT mode.

Thus, TOT = charge deposited / drain rate and TOA is calculated as before, seeing when the pulse crossed the TOA threshold.

Pulse Measurement

All "measurements" of the pulse use the object CompositePulse. This function incorporates the pedestal_ and linearly adds all the pulses at a variety of times. The pulses at different times are "merged" upon addition to the composite pulse depending on how close they are. This is done in a single pass, so we might end up with pulses closer than the provided separation time.

Note
For more realism, some chip parameters should change depending on the chip they are coming from. This should be modified here, with a package of "HgcrocConditions" passed to this function to configure the emulator before digitizing.
Parameters
[in]channelIDraw integer ID for this readout channel
[in]arriving_pulsespairs of (voltage,time) of hits arriving at the chip
[out]digiToAdddigi that will be filled with the samples from the chip
Returns
true if digis were constructed (false if hit was below readout)

the time here is nominal (zero gives peak if hit.second is zero)

Definition at line 45 of file HgcrocEmulator.cxx.

48 {
49 // step 0: prepare ourselves for emulation
50
51 digiToAdd.clear(); // make sure it is clean
52
53 // Configure chip settings based off of table (that may have been passed)
54 double totMax = getCondition(channelID, "TOT_MAX");
55 double padCapacitance = getCondition(channelID, "PAD_CAPACITANCE");
56 double gain = this->gain(channelID);
57 double pedestal = this->pedestal(channelID);
58 double toaThreshold = getCondition(channelID, "TOA_THRESHOLD");
59 double totThreshold = getCondition(channelID, "TOT_THRESHOLD");
60 // measTime defines the point in the BX where an in-time
61 // (time=0 in times vector) hit would arrive.
62 // Used to determine BX boundaries and TOA behavior.
63 double measTime = getCondition(channelID, "MEAS_TIME");
64 double drainRate = getCondition(channelID, "DRAIN_RATE");
65 double readoutThresholdFloat = this->readoutThreshold(channelID);
66 int readoutThreshold = int(readoutThresholdFloat);
67
68 // sort by amplitude
69 // ==> makes sure that puleses are merged towards higher ones
70 std::sort(
71 arriving_pulses.begin(), arriving_pulses.end(),
72 [](const std::pair<double, double> &a,
73 const std::pair<double, double> &b) { return a.first > b.first; });
74
75 // step 1: gather voltages into groups separated by (programmable) ns, single
76 // pass
77 CompositePulse pulse(pulseFunc_, gain, pedestal);
78
79 for (auto hit : arriving_pulses) pulse.addOrMerge(hit, hit_merge_ns_);
80
81 // TODO step 2: add timing jitter
82 // if (noise_) pulse.jitter();
83
85
86 // step 3: go through each BX sample one by one
87 bool wasTOA = false;
88 for (int iADC = 0; iADC < nADCs_; iADC++) {
89 double startBX = (iADC - iSOI_) * clockCycle_ - measTime;
90
91 // step 3b: check each merged hit to see if it peaks in this BX. If so,
92 // check its peak time to see if it's over TOT or TOA.
93 bool startTOT = false;
94 bool overTOA = false;
95 double toverTOA = -1;
96 double toverTOT = -1;
97 for (auto hit : pulse.hits()) {
98 int hitBX = int((hit.second + measTime) / clockCycle_ + iSOI_);
99 if (hitBX != iADC)
100 continue; // if this hit wasn't in the current BX, continue...
101
102 double vpeak = pulse(hit.second);
103
104 if (vpeak > totThreshold) {
105 startTOT = true;
106 if (toverTOT < hit.second)
107 toverTOT = hit.second; // use the latest time in the window
108 }
109
110 if (vpeak > toaThreshold) {
111 if (!overTOA || hit.second < toverTOA) toverTOA = hit.second;
112 overTOA = true;
113 }
114
115 } // loop over sim hits
116
117 // check for the case of a TOA even though the peak is in the next BX
118 if (!overTOA && pulse(startBX + clockCycle_) > toaThreshold) {
119 if (pulse(startBX) < toaThreshold) {
120 // pulse crossed TOA threshold somewhere between the start of this
121 // basket and the end
122 overTOA = true;
123 toverTOA = startBX + clockCycle_;
124 }
125 }
126
127 if (startTOT) {
128 // above TOT threshold -> do TOT readout mode
129
130 // @TODO NO NOISE
131 // CompositePulse includes pedestal, we need to remove it
132 // when calculating the charge deposited.
133 double charge_deposited =
134 (pulse(toverTOT) - gain * pedestal) * padCapacitance;
135
136 // Measure Time Over Threshold (TOT) by using the drain rate.
137 // 1. Use drain rate to see how long it takes for the charge to drain off
138 // 2. Translate this into DIGI samples
139
140 // Assume linear drain with slope drain rate:
141 // y-intercept = pulse amplitude
142 // slope = drain rate
143 // ==> x-intercept = amplitude / rate
144 // actual time over threshold using the real signal voltage amplitude
145 double tot = charge_deposited / drainRate;
146
147 // calculate the TDC counts for this tot measurement
148 // internally, the chip uses 12 bits (2^12 = 4096)
149 // to measure a maximum of tot Max [ns]
150 int tdc_counts = int(tot * 4096 / totMax) + pedestal;
151
152 // were we already over TOA? TOT is reported in BX where TOA went over
153 // threshold...
154 int toa{0};
155 if (wasTOA) {
156 // TOA was in the past
157 toa = digiToAdd.back().toa();
158 } else {
159 // TOA is here and we need to find it
160 double timecross = pulse.findCrossing(startBX, toverTOT, toaThreshold);
161 toa = int((timecross - startBX) * ns_);
162 // keep inside valid limits
163 if (toa == 0) toa = 1;
164 if (toa > 1023) toa = 1023;
165 }
166
167 digiToAdd.emplace_back(
168 false, true, // mark as a TOT measurement
169 (iADC > 0) ? digiToAdd.at(iADC - 1).adc_t()
170 : pedestal, // ADC t-1 is first measurement
171 tdc_counts, // TOT
172 toa // TOA is third measurement
173 );
174
175 // TODO: properly handle saturation and recovery, eventually.
176 // Now just kill everything...
177 while (digiToAdd.size() < nADCs_) {
178 digiToAdd.emplace_back(true, false, // flags to mark type of sample
179 0x3FF, 0x3FF, 0);
180 }
181
182 return true; // always readout
183 } else {
184 // determine the voltage at the sampling time
185 double bxvolts = pulse((iADC - iSOI_) * clockCycle_);
186 // add noise if requested
187 if (noise_) bxvolts += noise(channelID);
188 // convert to integer and keep in range (handle low and high saturation)
189 int adc = bxvolts / gain;
190 if (adc < 0) adc = 0;
191 if (adc > 1023) adc = 1023;
192
193 // check for TOA
194 int toa(0);
195 if (pulse(startBX) < toaThreshold && overTOA) {
196 double timecross = pulse.findCrossing(startBX, toverTOA, toaThreshold);
197 toa = int((timecross - startBX) * ns_);
198 // keep inside valid limits
199 if (toa == 0) toa = 1;
200 if (toa > 1023) toa = 1023;
201 wasTOA = true;
202 } else {
203 wasTOA = false;
204 }
205
206 digiToAdd.emplace_back(
207 false, false, // use flags to mark this sample as an ADC measurement
208 (iADC > 0) ? digiToAdd.at(iADC - 1).adc_t()
209 : pedestal, // ADC t-1 is first measurement
210 adc, // ADC[t] is the second field
211 toa // TOA is third measurement
212 );
213 } // TOT or ADC Mode
214 } // sampling baskets
215
216 // we only get here if we never went into TOT mode
217 // check the SOI to see if we should read out
218 return digiToAdd.at(iSOI_).adc_t() >= readoutThreshold;
219} // HgcrocEmulator::digitize
double readoutThreshold(const int &id) const
Readout Threshold (ADC Counts)
double noise(const int &channelID) const
Get random noise amplitdue for input channel [mV].
double pedestal(const int &id) const
Pedestal [ADC Counts] for input channel.
double getCondition(int id, const std::string &name) const
Get condition for input chip ID, condition name, and default value.
double gain(const int &channelID) const
Gain for input channel.

References ldmx::HgcrocEmulator::CompositePulse::addOrMerge(), clockCycle_, ldmx::HgcrocEmulator::CompositePulse::findCrossing(), gain(), getCondition(), hit_merge_ns_, ldmx::HgcrocEmulator::CompositePulse::hits(), iSOI_, nADCs_, noise(), noise_, ns_, pedestal(), pulseFunc_, and readoutThreshold().

◆ gain()

double ldmx::HgcrocEmulator::gain ( const int &  channelID) const
inline

Gain for input channel.

Definition at line 191 of file HgcrocEmulator.h.

191 {
192 return getCondition(channelID, "GAIN");
193 }

References getCondition().

Referenced by digitize(), noise(), noiseDigi(), and ldmx::HgcrocEmulator::CompositePulse::setGainPedestal().

◆ getCondition()

double ldmx::HgcrocEmulator::getCondition ( int  id,
const std::string &  name 
) const
inlineprivate

Get condition for input chip ID, condition name, and default value.

Parameters
[in]idchip global integer ID used in condition table
[in]namestd::string name of chip parameter in table
[in]defdefault value for parameter if not found in table (or table not set)
Returns
value of chip parameter

Definition at line 213 of file HgcrocEmulator.h.

213 {
214 // check if emulator has been passed a table of conditions
215 if (!chipConditions_) {
216 EXCEPTION_RAISE("HgcrocCond",
217 "HGC ROC Emulator was not given a conditions table.");
218 }
219
220 // cache column index for the input name
221 if (conditionNamesToIndex_.count(name) == 0)
223
224 // get condition
225 return chipConditions_->get(id, conditionNamesToIndex_.at(name));
226 }
unsigned int getColumnNumber(const std::string &colname) const
Get a the column number for the given column name.
T get(unsigned int id, unsigned int col) const
Get an entry by DetectorId and number.

References chipConditions_, conditionNamesToIndex_, conditions::HomogenousTableCondition< T >::get(), and conditions::BaseTableCondition::getColumnNumber().

Referenced by digitize(), gain(), noise(), pedestal(), and readoutThreshold().

◆ hasSeed()

bool ldmx::HgcrocEmulator::hasSeed ( ) const
inline

Check if emulator has been seeded.

Returns
true if random generator has been seeded

Definition at line 55 of file HgcrocEmulator.h.

55{ return noiseInjector_.get() != nullptr; }
std::unique_ptr< TRandom3 > noiseInjector_
Generates Gaussian noise on top of real hits.

References noiseInjector_.

◆ noise()

double ldmx::HgcrocEmulator::noise ( const int &  channelID) const
inline

Get random noise amplitdue for input channel [mV].

Parameters
[in]channelID
Returns
electronic noise amplitude [mV] above pedestal

Definition at line 185 of file HgcrocEmulator.h.

185 {
186 return noiseInjector_->Gaus(
187 0, getCondition(channelID, "NOISE") * gain(channelID));
188 };

References gain(), getCondition(), and noiseInjector_.

Referenced by digitize(), and noiseDigi().

◆ noiseDigi()

std::vector< ldmx::HgcrocDigiCollection::Sample > ldmx::HgcrocEmulator::noiseDigi ( const int &  channel,
const double &  soi_amplitude = 0 
) const

Generate a digi of pure noise.

The (optional) input soi amplitude is added on-top of pedestal in the SOI after being divided by the gain. This is designed to be close to the output amplitudes generated by the noise generator.

Note
We don't go into TOT mode. We simply fill a DIGI with ADC samples with noise on top of the pedestal, including the SOI amplitude if provided.

We set the TOA for each of the samples created to 0 (or "not found"), so this also indirectly assumes we are below the TOA threshold as well as below the TOT threshold.

Parameters
[in]channelraw integer ID for this readout channel
[in]soi_amplitudeamplitude of noise "pulse" in mV
Returns
DIGI of pure noise

Definition at line 221 of file HgcrocEmulator.cxx.

222 {
223 // get chip conditions from emulator
224 double pedestal{this->pedestal(channel)};
225 double gain{this->gain(channel)};
226 // fill a digi with noise samples
227 std::vector<ldmx::HgcrocDigiCollection::Sample> noise_digi;
228 for (int iADC{0}; iADC < nADCs_; iADC++) {
229 // gen noise for ADC samples
230 int adc_tm1{static_cast<int>(pedestal)};
231 if (iADC > 0)
232 adc_tm1 = noise_digi.at(iADC - 1).adc_t();
233 else
234 adc_tm1 += noise(channel) / gain;
235 int adc_t{static_cast<int>(pedestal + noise(channel) / gain)};
236
237 if (iADC == iSOI_) adc_t += soi_amplitude / gain;
238
239 // set toa to 0 (not determined)
240 // put new sample into noise digi
241 noise_digi.emplace_back(false, false, adc_tm1, adc_t, 0);
242 } // samples in noise digi
243 return noise_digi;
244}

References gain(), iSOI_, nADCs_, noise(), and pedestal().

◆ pedestal()

double ldmx::HgcrocEmulator::pedestal ( const int &  id) const
inline

Pedestal [ADC Counts] for input channel.

Definition at line 196 of file HgcrocEmulator.h.

196{ return getCondition(id, "PEDESTAL"); }

References getCondition().

Referenced by digitize(), noiseDigi(), and ldmx::HgcrocEmulator::CompositePulse::setGainPedestal().

◆ readoutThreshold()

double ldmx::HgcrocEmulator::readoutThreshold ( const int &  id) const
inline

Readout Threshold (ADC Counts)

Definition at line 199 of file HgcrocEmulator.h.

199 {
200 return getCondition(id, "READOUT_THRESHOLD");
201 }

References getCondition().

Referenced by digitize().

◆ seedGenerator()

void ldmx::HgcrocEmulator::seedGenerator ( uint64_t  seed)

Seed the emulator for random number generation.

Parameters
[in]seedinteger to use as random seed

Definition at line 41 of file HgcrocEmulator.cxx.

41 {
42 noiseInjector_ = std::make_unique<TRandom3>(seed);
43}

References noiseInjector_.

Member Data Documentation

◆ chipConditions_

const conditions::DoubleTableCondition* ldmx::HgcrocEmulator::chipConditions_ {nullptr}
private

Handle to table of chip-dependent conditions.

The defaults are listed below and are separate parameters passed through the python configuration.

Definition at line 405 of file HgcrocEmulator.h.

405{nullptr};

Referenced by condition(), and getCondition().

◆ clockCycle_

double ldmx::HgcrocEmulator::clockCycle_
private

Time interval for chip clock [ns].

Definition at line 369 of file HgcrocEmulator.h.

Referenced by digitize(), and HgcrocEmulator().

◆ conditionNamesToIndex_

std::map<std::string, int> ldmx::HgcrocEmulator::conditionNamesToIndex_
mutableprivate

Map of condition names to column numbers.

mutable so that we can update the cached column values in getCondition during processing.

Definition at line 413 of file HgcrocEmulator.h.

Referenced by condition(), and getCondition().

◆ hit_merge_ns_

double ldmx::HgcrocEmulator::hit_merge_ns_
private

Hit merging time [ns].

Definition at line 393 of file HgcrocEmulator.h.

Referenced by digitize(), and HgcrocEmulator().

◆ iSOI_

int ldmx::HgcrocEmulator::iSOI_
private

Index for the Sample Of Interest in the list of digi samples.

Definition at line 366 of file HgcrocEmulator.h.

Referenced by digitize(), HgcrocEmulator(), and noiseDigi().

◆ nADCs_

int ldmx::HgcrocEmulator::nADCs_
private

Depth of ADC buffer.

Definition at line 363 of file HgcrocEmulator.h.

Referenced by digitize(), HgcrocEmulator(), and noiseDigi().

◆ noise_

bool ldmx::HgcrocEmulator::noise_ {true}
private

Put noise in channels, only configure to false if testing.

Definition at line 360 of file HgcrocEmulator.h.

360{true};

Referenced by digitize(), and HgcrocEmulator().

◆ noiseInjector_

std::unique_ptr<TRandom3> ldmx::HgcrocEmulator::noiseInjector_
private

Generates Gaussian noise on top of real hits.

Definition at line 420 of file HgcrocEmulator.h.

Referenced by hasSeed(), noise(), and seedGenerator().

◆ ns_

double ldmx::HgcrocEmulator::ns_
private

Conversion from time [ns] to counts.

Definition at line 375 of file HgcrocEmulator.h.

Referenced by digitize(), and HgcrocEmulator().

◆ pulseFunc_

TF1 ldmx::HgcrocEmulator::pulseFunc_
mutableprivate

Functional shape of signal pulse in time.

Shape parameters are hardcoded into the function currently. Pulse Shape: [0]*((1.0+exp([1]*(-[2]+[3])))*(1.0+exp([5]*(-[6]+[3]))))/((1.0+exp([1]*(x-[2]+[3]-[4])))*(1.0+exp([5]*(x-[6]+[3]-[4])))) p[0] = amplitude (height of peak in mV) p[1] = rate of up slope - rateUpSlope_ p[2] = time of up slope relative to shape fit - timeUpSlope_ p[3] = time of peak relative to shape fit - timePeak_ p[4] = peak time (related to time of hit [ns]) p[5] = rate of down slope - rateDnSlope_ p[6] = time of down slope relative to shape fit - timeDnSlope_

\[
 V(t) =
 p_0\frac{(1+\exp(p_1(-p_2+p_3)))(1+\exp(p_5*(-p_6+p_3)))}
         {(1+\exp(p_1(t-p_2+p_3-p_4)))(1+\exp(p_5*(t-p_6+p_3-p_4)))}
\]

Definition at line 442 of file HgcrocEmulator.h.

Referenced by digitize(), and HgcrocEmulator().

◆ rateDnSlope_

double ldmx::HgcrocEmulator::rateDnSlope_
private

Rate of Down Slope in Pulse Shape [1/ns].

Definition at line 384 of file HgcrocEmulator.h.

Referenced by HgcrocEmulator().

◆ rateUpSlope_

double ldmx::HgcrocEmulator::rateUpSlope_
private

Rate of Up Slope in Pulse Shape [1/ns].

Definition at line 378 of file HgcrocEmulator.h.

Referenced by HgcrocEmulator().

◆ timeDnSlope_

double ldmx::HgcrocEmulator::timeDnSlope_
private

Time of Down Slope relative to Pulse Shape Fit [ns].

Definition at line 387 of file HgcrocEmulator.h.

Referenced by HgcrocEmulator().

◆ timePeak_

double ldmx::HgcrocEmulator::timePeak_
private

Time of Peak relative to pulse shape fit [ns].

Definition at line 390 of file HgcrocEmulator.h.

Referenced by HgcrocEmulator().

◆ timeUpSlope_

double ldmx::HgcrocEmulator::timeUpSlope_
private

Time of Up Slope relative to Pulse Shape Fit [ns].

Definition at line 381 of file HgcrocEmulator.h.

Referenced by HgcrocEmulator().

◆ timingJitter_

double ldmx::HgcrocEmulator::timingJitter_
private

Jitter of timing mechanism in the chip [ns].

Definition at line 372 of file HgcrocEmulator.h.

Referenced by HgcrocEmulator().


The documentation for this class was generated from the following files: