Generate hits.
137 {
140
141
142
143
144 const size_t N = module.size();
145 const size_t M = (N * (N - 1)) / 2;
146
149
150
151
152
153 for (size_t pmt = 0; pmt != N; ++pmt) {
154
156
158
160
161 for (
double t1 = period.getLowerLimit() +
gRandom->Exp(t_ns); t1 < period.getUpperLimit(); t1 +=
gRandom->Exp(t_ns)) {
163 }
164 }
165 }
166
167
168
169
171
172 for (size_t i = 0; i != N; ++i) {
174 }
175
177
179
180 double t1 = period.getLowerLimit() +
gRandom->Exp(t_ns);
181
182 if (t1 < period.getUpperLimit()) {
183
184
185
187
188 size_t i = 0;
189 double P = 0.0;
190
191 for (size_t pmt1 = 0; pmt1 != N; ++pmt1) {
192 for (size_t pmt2 = 0; pmt2 != pmt1; ++pmt2) {
193
196
197 i += 1;
198 P += p;
199
201 }
202 }
203
204 for ( ; t1 < period.getUpperLimit(); t1 +=
gRandom->Exp(t_ns)) {
205
206 try {
207
208
209
211
214
215
216
218
220
222
224
225 for ( ;
M != 0; --
M) {
226
228
229 double P = 0.0;
230
231 for (size_t i = 0; i != N; ++i) {
232
233 if (buffer.count(i) == 0) {
234
236
238
240 }
241
243
244 } else {
245
247 }
248 }
249
250 if (P > 0.0) {
251
252 size_t pmt = 0;
253
255
256 if (pmt != N) {
257
259
260 buffer.insert(pmt);
261 }
262
263 } else {
264
265 break;
266 }
267 }
268 }
269 }
271 }
272 }
273 }
274 }
static double getSigma()
Get intrinsic time smearing of K40 coincidences.
std::vector< double > rateL1_Hz
Multiples rate as a function of the multiplicity.
virtual double getSinglesRate(const JPMTIdentifier &pmt) const =0
Get singles rate as a function of PMT.
virtual double getMultiplesRate(const JModuleIdentifier &module, const int M) const =0
Get multiples rate as a function of optical module.
virtual double getProbability(const double ct) const =0
Get probability of coincidence.
Exception for numerical precision error.
Template definition of a multi-dimensional oscillation probability interpolation table.
JDirection3D getDirection(const Vec &dir)
Get direction.
double getDot(const JFirst_t &first, const JSecond_t &second)
Get dot product of objects.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Data structure for PMT analogue signal.