63{
64
67
69 JLimit_t& numberOfEvents = inputFile.getLimit();
72 double TMax_ns;
80
81
82
83 try {
84
85 JParser<> zap(
"Example application to study supernova detection background");
86
98
100 }
101 catch(const exception &error) {
103 }
104
105
107
108 try {
110 }
113 }
114
115
116
117
118
119
120
122
124
126
127 pts->configure(inputFile);
128
129
130
131
132 int fEnd =
pts->rbegin()->getFrameIndex();
133 int fStart =
pts->begin( )->getFrameIndex();
134
135
136
137 if (
fEnd > inputFile.getUpperLimit()) {
139 }
140
142
144
145
147 FATAL(
"FATAL: inconsistent TTree indexing" <<
endl);
148 }
149
150
151
153
155
156
157
159 const double xmin =
fStart;
160 const double xmax =
fEnd + 1;
161
162 const int ny = NUMBER_OF_PMTS + 1;
163 const double ymin = -0.5;
165
168
171
172
173
174
175
176 int runNumber = 0;
177
178 TH1D*
h_vtr =
new TH1D(
"VetoTimeRange",
"VetoTimeRange", 10000, 0, 10000);
179
181
183
184 for (;
evIn.hasNext(); ) {
185
187
189
190 if (!runNumber) { runNumber = event->getRunNumber(); }
191
193
195
197
198 }
199
201
203
204
205
206
207
208
210
211 for ( ;
pts->hasNext() && counter != inputFile.getLimit(); ++counter) {
212
214
216
218
219 if (counter == 0) {
221 }
222
224
227 }
228
229
230
232
234
236
238
240
241 int nDOMs = timeslice->size();
242
243 for (JDAQTimeslice::const_iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
244
245 int moduleID = frame->getModuleID();
246
248
249 JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*frame,
250 moduleRouter.getModule(moduleID));
251
252
254
255 JSuperFrame1D_t&
data = JSuperFrame1D_t::multiplex(buffer);
256
257
258
259
260
261 TH1D*
h2dt =
new TH1D(
"H2DT",
"H2DT", 100, -TMax_ns, +TMax_ns);
262
264
266
267 while (++q !=
data.end() && q->getT() - p->getT() <= TMax_ns) {}
268
270
271
272
274
275
276
283 }
284 }
285 }
286
287
288
289 p = q;
290
291 }
292
293 if (
h2dt->GetEntries() > 0) {
294
295 TF1 f("f", "[0]*exp(-0.5*(x-[1])*(x-[1])/([2]*[2]))/(TMath::Sqrt(2*TMath::Pi())*[2]) + [3]");
296
297 f.SetParameter(0,
h2dt->GetMaximum());
298 f.SetParameter(1,
h2dt->GetMean());
299 f.SetParameter(2,
h2dt->GetRMS() * 0.25);
300 f.SetParameter(3,
h2dt->GetMinimum());
301
302 h2dt->Fit(&f,
"Q",
"same");
303
304 double nb =
h2dt->GetNbinsX();
305 double bg_v = f.GetParameter(3) * nb;
307
308
309
311
312 }
313
315
316 }
317
318
319
321
323
324
325
327
329
331
333
334
335
336
337
339
340
342
343
345
347
350 }
351
353
356 }
357
358 }
359
360
361
362
363
365
367
369
371
372
374
377
378 out.Close();
379
380 }
381
382}
static const char *const status_p
static const char *const mul_p
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
Router for direct addressing of module data in detector data structure.
Template definition of a multi-dimensional oscillation probability interpolation table.
Auxiliary class to build the supernova trigger dataset.
SN filter based on veto window.
SN filter based on multiplicity selection optional suppression of multi-module coincidences WARNING: ...
Auxiliary class to apply the supernova trigger to SN data.
Auxiliary class to manage a set of vetoes.
Auxiliary class to define a veto time window on a set of optical modules.
Reduced data structure for L0 hit.
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
int getFrameIndex() const
Get frame index.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
long long int factorial(const long long int n)
Determine factorial.
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory.
Type definition of range.
Transmission with position.
Auxiliary class to select ROOT class based on class name.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary class to select DAQ hits based on time-over-treshold value.
@ join_t
join consecutive hits according match criterion