LDMX Software
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 40 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}
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_, hit_merge_ns_, iSOI_, nADCs_, noise_, ns_, pulseFunc_, rateDnSlope_, rateUpSlope_, timeDnSlope_, timePeak_, timeUpSlope_, and timingJitter_.

◆ ~HgcrocEmulator()

ldmx::HgcrocEmulator::~HgcrocEmulator ( )
inline

Destructor.

Definition at line 50 of file HgcrocEmulator.h.

50{}

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 73 of file HgcrocEmulator.h.

73 {
74 // reset cache of column numbers if table changes
75 if (&table != chipConditions_) conditionNamesToIndex_.clear();
76 chipConditions_ = &table;
77 }
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.

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

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

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 214 of file HgcrocEmulator.h.

214 {
215 // check if emulator has been passed a table of conditions
216 if (!chipConditions_) {
217 EXCEPTION_RAISE("HgcrocCond",
218 "HGC ROC Emulator was not given a conditions table.");
219 }
220
221 // cache column index for the input name
222 if (conditionNamesToIndex_.count(name) == 0)
224
225 // get condition
226 return chipConditions_->get(id, conditionNamesToIndex_.at(name));
227 }
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 56 of file HgcrocEmulator.h.

56{ 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 186 of file HgcrocEmulator.h.

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

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 232 of file HgcrocEmulator.cxx.

233 {
234 // get chip conditions from emulator
235 double pedestal{this->pedestal(channel)};
236 double gain{this->gain(channel)};
237 // fill a digi with noise samples
238 std::vector<ldmx::HgcrocDigiCollection::Sample> noise_digi;
239 for (int iADC{0}; iADC < nADCs_; iADC++) {
240 // gen noise for ADC samples
241 // ADC at t-1
242 int adc_tm1{static_cast<int>(pedestal)};
243 if (iADC > 0) {
244 adc_tm1 = noise_digi.at(iADC - 1).adc_t();
245 } else {
246 adc_tm1 += noise(channel) / gain;
247 }
248 // ADC at t
249 int adc_t{static_cast<int>(pedestal + noise(channel) / gain)};
250
251 if (iADC == iSOI_) adc_t += soi_amplitude / gain;
252
253 // set toa to 0 (not determined)
254 // put new sample into noise digi
255 noise_digi.emplace_back(false, false, adc_tm1, adc_t, 0);
256 } // samples in noise digi
257 return noise_digi;
258}

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 197 of file HgcrocEmulator.h.

197{ 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 200 of file HgcrocEmulator.h.

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

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 406 of file HgcrocEmulator.h.

406{nullptr};

Referenced by condition(), and getCondition().

◆ clockCycle_

double ldmx::HgcrocEmulator::clockCycle_
private

Time interval for chip clock [ns].

Definition at line 370 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 414 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 394 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 367 of file HgcrocEmulator.h.

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

◆ nADCs_

int ldmx::HgcrocEmulator::nADCs_
private

Depth of ADC buffer.

Definition at line 364 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 361 of file HgcrocEmulator.h.

361{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 421 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 376 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 443 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 385 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 379 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 388 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 391 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 382 of file HgcrocEmulator.h.

Referenced by HgcrocEmulator().

◆ timingJitter_

double ldmx::HgcrocEmulator::timingJitter_
private

Jitter of timing mechanism in the chip [ns].

Definition at line 373 of file HgcrocEmulator.h.

Referenced by HgcrocEmulator().


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