-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevtbuilder.h
766 lines (734 loc) · 32.6 KB
/
evtbuilder.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
#ifndef EVTBUILDER_H
#define EVTBUILDER_H
// Glaobal
#define GLOBALFREQ 125000000.0 // 125 Mhz
/*********************** Types ****************************/
struct DanssEventStruct {
// Common parameters
long long globalTime; // time in terms of 125 MHz
long long number; // event number in the file
int unixTime; // linux time, seconds
float fineTime; // fine time of the event (for hit selection)
// Veto parameters
int VetoHits; // hits in the event record
float VetoEnergy; // Energy Sum of all hits
int VetoCleanHits; // hits above threshold and in time window
float VetoCleanEnergy; // Energy Sum of clean hits
// PMT parameters
int PmtHits; // the same as above for PMT
float PmtEnergy;
int PmtCleanHits;
float PmtCleanEnergy;
// SiPM parameters
int SiPmHits; // the same as above for PMT
float SiPmEnergy;
int SiPmCleanHits;
float SiPmCleanEnergy;
int SiPmEarlyHits; // to understand random background
float SiPmEarlyEnergy;
// "positron cluster" parameters
int PositronHits; // hits in the cluster
float PositronSiPmEnergy; // Energy sum of the cluster (SiPM)
float MaxHitEnergy; // Energy of the maximum hit (SiPM)
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
// "neutron" parameters
int NeutronHits; // number of hits considered as neutron capture gammas
float NeutronSiPmEnergy; // Energy sum of above (SiPM)
float NeutronX[3]; // center of gammas position
float NeutronGammaEnergy[5]; // sorted list of the 5 most energetic gammas
float NeutronGammaDistance[5]; // distances for the gammas above to the "neutron" center
float NeutronRadius; // average distance between hits and the center
};
struct DanssEventStruct2 {
// Common parameters
long long globalTime; // time in terms of 125 MHz
long long number; // event number in the file
int unixTime; // linux time, seconds
float fineTime; // fine time of the event (for hit selection)
// Veto parameters
int VetoHits; // hits in the event record
float VetoEnergy; // Energy Sum of all hits
int VetoCleanHits; // hits above threshold and in time window
float VetoCleanEnergy; // Energy Sum of clean hits
// PMT parameters
int PmtHits; // the same as above for PMT
float PmtEnergy;
int PmtCleanHits;
float PmtCleanEnergy;
// SiPM parameters
int SiPmHits; // the same as above for PMT
float SiPmEnergy;
int SiPmCleanHits;
float SiPmCleanEnergy;
int SiPmEarlyHits; // to understand random background
float SiPmEarlyEnergy;
// "positron cluster" parameters
int PositronHits; // hits in the cluster
float PositronSiPmEnergy; // Energy sum of the cluster, corrected (SiPM)
float PositronPmtEnergy; // Energy sum of the cluster, corrected (PMT)
float MaxHitEnergy; // Energy of the maximum hit (SiPM)
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
// "neutron" parameters
float NeutronX[3]; // center of gammas position
float NeutronRadius; // average distance between hits and the center
};
struct DanssEventStruct3 {
// Common parameters
long long globalTime; // time in terms of 125 MHz
long long number; // event number in the file
int runNumber; // the run number
int unixTime; // linux time, seconds
float fineTime; // fine time of the event (for hit selection)
// Veto parameters
int VetoHits; // hits in the event record
float VetoEnergy; // Energy Sum of all hits
int VetoCleanHits; // hits above threshold and in time window
float VetoCleanEnergy; // Energy Sum of clean hits
// PMT parameters
int PmtHits; // the same as above for PMT
float PmtEnergy;
int PmtCleanHits;
float PmtCleanEnergy;
// SiPM parameters
int SiPmHits; // the same as above for PMT
float SiPmEnergy;
int SiPmCleanHits;
float SiPmCleanEnergy;
int SiPmEarlyHits; // to understand random background
float SiPmEarlyEnergy;
// "positron cluster" parameters
int PositronHits; // hits in the cluster
int PositronFlags; // Positron flags
float PositronMinLen; // Minimum track length to create the cluster
float PositronEnergy; // Energy sum of the cluster, corrected (SiPM+PMT)
float TotalEnergy; // Energy of the maximum hit (SiPM)
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
// "neutron" parameters
float NeutronX[3]; // center of gammas position
float NeutronRadius; // average distance between hits and the center
};
struct DanssEventStruct4 {
// Common parameters
long long globalTime; // time in terms of 125 MHz
long long number; // event number in the file
int runNumber; // the run number
int unixTime; // linux time, seconds
float fineTime; // fine time of the event (for hit selection)
// Veto parameters
int VetoHits; // hits in the event record
float VetoEnergy; // Energy Sum of all hits
int VetoCleanHits; // hits above threshold and in time window
float VetoCleanEnergy; // Energy Sum of clean hits
// PMT parameters
int PmtHits; // the same as above for PMT
float PmtEnergy;
int PmtCleanHits;
float PmtCleanEnergy;
// SiPM parameters
int SiPmHits; // the same as above for PMT
float SiPmEnergy;
int SiPmCleanHits;
float SiPmCleanEnergy;
int SiPmEarlyHits; // to understand random background
float SiPmEarlyEnergy;
// "positron cluster" parameters
int PositronHits; // hits in the cluster
int PositronFlags; // Positron flags
float PositronMinLen; // Minimum track length to create the cluster
float PositronEnergy; // Energy sum of the cluster, corrected (SiPM+PMT)
float TotalEnergy; // Event full energy correctd (SiPM+PMT)
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
float AnnihilationMax; // Energy in the maximum annihilation hit
// "neutron" parameters
float NeutronX[3]; // center of gammas position
// float NeutronRadius; // average distance between hits and the center
int NHits; // Number of hits
};
struct DanssEventStruct5 {
// Common parameters
long long globalTime; // time in terms of 125 MHz
long long number; // event number in the file
int runNumber; // the run number
int unixTime; // linux time, seconds
float fineTime; // fine time of the event (for hit selection)
// Veto parameters
int VetoHits; // hits in the event record
float VetoEnergy; // Energy Sum of all hits
int VetoCleanHits; // hits above threshold and in time window
float VetoCleanEnergy; // Energy Sum of clean hits
// PMT parameters
int PmtHits; // the same as above for PMT
float PmtEnergy;
int PmtCleanHits;
float PmtCleanEnergy;
// SiPM parameters
int SiPmHits; // the same as above for PMT
float SiPmEnergy;
int SiPmCleanHits;
float SiPmCleanEnergy;
int SiPmEarlyHits; // to understand random background
float SiPmEarlyEnergy;
// "positron cluster" parameters
int PositronHits; // hits in the cluster
int PositronFlags; // Positron flags
float PositronMinLen; // Minimum track length to create the cluster
float PositronEnergy; // Energy sum of the cluster, corrected (SiPM+PMT)
float TotalEnergy; // Event full energy correctd (SiPM+PMT)
float PositronSiPmEnergy; // SiPM energy in the cluster, corrected
float PositronPmtEnergy; // PMT energy in the cluster, corrected
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
float AnnihilationMax; // Energy in the maximum annihilation hit
// "neutron" parameters
float NeutronX[3]; // center of gammas position
// float NeutronRadius; // average distance between hits and the center
int NHits; // Number of hits
};
// Positron flag masks
#define PFLAG_MAXENERGY 1 // Too much energy in DANSS
#define PFLAG_NOCLUSTER 2 // No cluster
#define PFLAG_INVCLUSTER 4 // Invalid cluster
#define PFLAG_CHIT 0x3FF0 // Cluster hit in an edge
#define PFLAG_CHIT_U1 0x10 // Cluster hit in Upper edge 1
#define PFLAG_CHIT_U2 0x20 // Cluster hit in Upper edge 2
#define PFLAG_CHIT_U34 0x40 // Cluster hit in Upper edge 34
#define PFLAG_CHIT_D1 0x80 // Cluster hit in Down edge 1
#define PFLAG_CHIT_D2 0x100 // Cluster hit in Down edge 2
#define PFLAG_CHIT_D34 0x200 // Cluster hit in Down edge 34
#define PFLAG_CHIT_E 0x400 // Cluster hit in East edge
#define PFLAG_CHIT_W 0x800 // Cluster hit in West edge
#define PFLAG_CHIT_N 0x1000 // Cluster hit in North edge
#define PFLAG_CHIT_S 0x2000 // Cluster hit in South edge
#define PFLAG_HIT 0x3FF0000 // hit in an edge
#define PFLAG_HIT_U1 0x10000 // hit in Upper edge 1
#define PFLAG_HIT_U2 0x20000 // hit in Upper edge 2
#define PFLAG_HIT_U34 0x40000 // hit in Upper edge 34
#define PFLAG_HIT_D1 0x80000 // hit in Down edge 1
#define PFLAG_HIT_D2 0x100000 // hit in Down edge 2
#define PFLAG_HIT_D34 0x200000 // hit in Down edge 34
#define PFLAG_HIT_E 0x400000 // hit in East edge
#define PFLAG_HIT_W 0x800000 // hit in West edge
#define PFLAG_HIT_N 0x1000000 // hit in North edge
#define PFLAG_HIT_S 0x2000000 // hit in South edge
struct DanssEventStruct6 {
// Common parameters
long long globalTime; // time in terms of 125 MHz
long long number; // event number in the file
int runNumber; // the run number
int unixTime; // linux time, seconds
float fineTime; // fine time of the event (for hit selection)
// Veto parameters
int VetoCleanHits; // hits above threshold and in time window
float VetoCleanEnergy; // Energy Sum of clean hits
// PMT parameters
int PmtCleanHits;
float PmtCleanEnergy;
// SiPM parameters
int SiPmCleanHits;
float SiPmCleanEnergy;
int SiPmEarlyHits; // to understand random background
float SiPmEarlyEnergy;
// "positron cluster" parameters
int PositronHits; // SiPm hits in the cluster
float PositronEnergy; // Energy sum of the cluster, corrected (SiPM+PMT)
float TotalEnergy; // Event full energy correctd (SiPM+PMT)
float PositronSiPmEnergy; // SiPM energy in the cluster, corrected
float PositronPmtEnergy; // PMT energy in the cluster, corrected
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
float AnnihilationMax; // Energy in the maximum annihilation hit
float MinPositron2GammaZ; // Z-distance to the closest gamma
// "neutron" parameters
float NeutronX[3]; // center of gammas position
// float NeutronRadius; // average distance between hits and the center
int NHits; // Number of hits
};
struct DanssEventStruct7 {
// Common parameters
long long globalTime; // time in terms of 125 MHz
long long number; // event number in the file
int unixTime; // linux time, seconds
float fineTime; // fine time of the event (for hit selection)
int trigType; // type of the trigger
// Veto parameters
int VetoCleanHits; // hits above threshold and in time window
float VetoCleanEnergy; // Energy Sum of clean hits
float BottomLayersEnergy; // Energy in the two bottom SiPM layers to be used in Veto
// PMT parameters
int PmtCleanHits;
float PmtCleanEnergy;
// SiPM parameters
int SiPmHits;
float SiPmEnergy;
int SiPmCleanHits;
float SiPmCleanEnergy;
int SiPmEarlyHits; // to understand random background
float SiPmEarlyEnergy;
// "positron cluster" parameters
int PositronHits; // SiPm hits in the cluster
float PositronEnergy; // Energy sum of the cluster, longitudinally corrected (SiPM+PMT)
float TotalEnergy; // Event full energy longitudinally correctd (SiPM+PMT)
float PositronSiPmEnergy; // SiPM energy in the longitudinally cluster, corrected
float PositronPmtEnergy; // PMT energy in the longitudinally cluster, corrected
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
float AnnihilationMax; // Energy in the maximum annihilation hit
float MinPositron2GammaZ; // Z-distance to the closest gamma
// "neutron" parameters
float NeutronX[3]; // center of gammas position
int NHits; // Number of hits
float NeutronEnergy; // Total energy corrected for signal attenuation
int NeutronHits; // Hits SiPm + PMT (where no SiPm)
int NXYSiPmRaw; // number of SiPm raw hits X - Y, raw hits
int NXYSiPmClean; // number of SiPm raw hits X - Y, clean hits
int NXYPmt; // number of Pmt raw hits X - Y
};
struct HitTypeStruct {
char type;
char z;
char xy;
char flag;
};
struct DanssInfoStruct {
long long upTime; // running time in terms of 125 MHz
int startTime; // linux start time, seconds
int stopTime; // linux stop time, seconds
long long events; // number of events
};
struct DanssInfoStruct3 {
long long upTime; // running time in terms of 125 MHz
int runNumber; // the run number
int startTime; // linux start time, seconds
int stopTime; // linux stop time, seconds
int events; // number of events
};
struct DanssInfoStruct4 {
long long upTime; // running time in terms of 125 MHz
int runNumber; // the run number
int startTime; // linux start time, seconds
int stopTime; // linux stop time, seconds
int events; // number of events
int position; // Danss Position type
float height; // Danss average height
long long hits[2]; // Hits: [0 - all in Digi, 1 - good hits]
long long Cuts[20]; // Cut statistics:
// 0 - zero or dead channel
// 1 - small amplitude
// 2 - SiPM <-> PMT mutual confirmation
// 3 - All hits in SiPM confirmation by PMT
// 4 - single pixel SiPM hits confirmation by PMT
// 5 - SiPM time window
// 6 - PMT time window
};
struct DanssPairStruct {
// Common parameters
long long number[2]; // event numbers in the file
int unixTime; // linux time, seconds
float SiPmCleanEnergy[2]; // Full Clean energy SiPm
float PmtCleanEnergy[2]; // Full Clean energy Pmt
// "positron cluster" parameters
int PositronHits; // hits in the cluster
float PositronMinLen; // Minimum track length to create the cluster
float PositronEnergy; // Energy sum of the cluster (SiPM)
float TotalEnergy; // Event full energy correctd (SiPM+PMT)
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
// "neutron" parameters
int NeutronHits; // number of hits considered as neutron capture gammas
float NeutronSiPmEnergy; // Energy sum of above (SiPM)
float NeutronX[3]; // center of gammas position
float NeutronGammaEnergy[5]; // sorted list of the 5 most energetic gammas
float NeutronGammaDistance[5]; // distances for the gammas above to the "neutron" center
float NeutronRadius; // average distance between hits and the center
// Pair parameters
float gtDiff; // time difference in us (from 125 MHz clock)
float Distance; // distance between neutron and positron, cm
float DistanceZ; // in Z, cm
};
struct DanssPairStruct2 {
// Common parameters
long long number[2]; // event numbers in the file
int unixTime; // linux time, seconds
float SiPmCleanEnergy[2]; // Full Clean energy SiPm
float PmtCleanEnergy[2]; // Full Clean energy Pmt
// "positron cluster" parameters
int PositronHits; // hits in the cluster
float PositronEnergy; // Energy sum of the cluster (SiPM)
float MaxHitEnergy; // Energy of the maximum hit (SiPM)
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
// "neutron" parameters
int NeutronHits; // number of hits considered as neutron capture gammas
float NeutronEnergy; // Energy sum of above (SiPM)
float NeutronX[3]; // center of gammas position
float NeutronRadius; // average distance between hits and the center
// Pair parameters
float gtDiff; // time difference in us between positron and neutron
float Distance; // distance between neutron and positron, cm
float DistanceZ; // in Z, cm
// Environment
float gtFromPrevious; // time from the previous hit before positron, us
float gtToNext; // time to the next hit after neutron, counted from positron, us
int EventsBetween; // Events between positron and neutron
// Veto
float gtFromVeto; // time from the last Veto event
int VetoHits; // hits in Veto counters
float VetoEnergy; // Energy in Veto counters
float DanssEnergy; // Veto Energy in Danss (Pmt + SiPm)/2
};
struct DanssPairStruct3 {
// Common parameters
long long number[2]; // event numbers in the file
int unixTime; // linux time, seconds
float SiPmCleanEnergy[2]; // Full Clean energy SiPm
float PmtCleanEnergy[2]; // Full Clean energy Pmt
// "positron cluster" parameters
int PositronHits; // hits in the cluster
float PositronEnergy; // Energy sum of the cluster (SiPM)
float MaxHitEnergy; // Energy of the maximum hit (SiPM)
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
// "neutron" parameters
int NeutronHits; // number of hits considered as neutron capture gammas
float NeutronEnergy; // Energy sum of above (SiPM)
float NeutronX[3]; // center of gammas position
float NeutronRadius; // average distance between hits and the center
// Pair parameters
float gtDiff; // time difference in us between positron and neutron
float Distance; // distance between neutron and positron, cm
float DistanceZ; // in Z, cm
// Environment
float gtFromPrevious; // time from the previous hit before positron, us
float PreviousEnergy; // energy of the previous event
float gtToNext; // time to the next hit after neutron, counted from positron, us
float NextEnergy; // energy of the next event
int EventsBetween; // Events between positron and neutron
// Veto
float gtFromVeto; // time from the last Veto event
int VetoHits; // hits in Veto counters
float VetoEnergy; // Energy in Veto counters
float DanssEnergy; // Veto Energy in Danss (Pmt + SiPm)/2
};
struct DanssPairStruct4 {
// Common parameters
long long number[2]; // event numbers in the file
int unixTime; // linux time, seconds
float SiPmCleanEnergy[2]; // Full Clean energy SiPm
float PmtCleanEnergy[2]; // Full Clean energy Pmt
int PositronFlags[2]; // positron flags for both triggers
// "positron cluster" parameters
int PositronHits; // hits in the cluster
float PositronEnergy; // Energy sum of the cluster (SiPM)
float TotalEnergy; // Energy of the maximum hit (SiPM)
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
// "neutron" parameters
int NeutronHits; // number of hits considered as neutron capture gammas
float NeutronEnergy; // Energy sum of above (SiPM)
float NeutronX[3]; // center of gammas position
float NeutronRadius; // average distance between hits and the center
// Pair parameters
float gtDiff; // time difference in us between positron and neutron
float Distance; // distance between neutron and positron, cm
float DistanceZ; // in Z, cm
// Environment
float gtFromPrevious; // time from the previous hit before positron, us
float PreviousEnergy; // energy of the previous event
float gtToNext; // time to the next hit after neutron, counted from positron, us
float NextEnergy; // energy of the next event
int EventsBetween; // Events between positron and neutron
// Veto
float gtFromVeto; // time from the last Veto event
int VetoHits; // hits in Veto counters
float VetoEnergy; // Energy in Veto counters
float DanssEnergy; // Veto Energy in Danss (Pmt + SiPm)/2
float gtFromShower; // time from large energy shower in DANSS
float ShowerEnergy; // shower event energy in DANSS (Pmt + SiPm)/2
};
struct DanssPairStruct5 {
// Common parameters
long long number[2]; // event numbers in the file
int unixTime; // linux time, seconds
float SiPmCleanEnergy[2]; // Full Clean energy SiPm
float PmtCleanEnergy[2]; // Full Clean energy Pmt
int PositronFlags[2]; // positron flags for both triggers
// "positron cluster" parameters
int PositronHits; // hits in the cluster
float PositronMinLen; // mimimum track length for the cluster
float PositronEnergy; // Energy sum of the cluster (SiPM)
float TotalEnergy; // Energy of the maximum hit (SiPM)
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
float AnnihilationMax; // Energy in the maximum annihilation hit
// "neutron" parameters
int NeutronHits; // number of hits considered as neutron capture gammas
float NeutronEnergy; // Energy sum of above (SiPM)
float NeutronX[3]; // center of gammas position
// Pair parameters
float gtDiff; // time difference in us between positron and neutron
float Distance; // distance between neutron and positron, cm
float DistanceZ; // in Z, cm
// Environment
float gtFromPrevious; // time from the previous hit before positron, us
float PreviousEnergy; // energy of the previous event
float gtToNext; // time to the next hit after neutron, counted from positron, us
float NextEnergy; // energy of the next event
int EventsBetween; // Events between positron and neutron
// Veto
float gtFromVeto; // time from the last Veto event
int VetoHits; // hits in Veto counters
float VetoEnergy; // Energy in Veto counters
float DanssEnergy; // Veto Energy in Danss (Pmt + SiPm)/2
float gtFromShower; // time from large energy shower in DANSS
float ShowerEnergy; // shower event energy in DANSS (Pmt + SiPm)/2
// Hits
int NPHits; // Number of hits in "positron event"
int NNHits; // Number of hits in "neutron event"
};
struct DanssPairStruct6 {
// Common parameters
long long number[2]; // event numbers in the file
int unixTime; // linux time, seconds
float SiPmCleanEnergy[2]; // Full Clean energy SiPm
float PmtCleanEnergy[2]; // Full Clean energy Pmt
int PositronFlags[2]; // positron flags for both triggers
// "positron cluster" parameters
int PositronHits; // hits in the cluster
float PositronMinLen; // mimimum track length for the cluster
float PositronEnergy; // Energy sum of the cluster (SiPM)
float TotalEnergy; // Energy of the maximum hit (SiPM)
float PositronSiPmEnergy; // SiPM energy in the cluster, corrected
float PositronPmtEnergy; // PMT energy in the cluster, corrected
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
float AnnihilationMax; // Energy in the maximum annihilation hit
// "neutron" parameters
int NeutronHits; // number of hits considered as neutron capture gammas
float NeutronEnergy; // Energy sum of above (SiPM)
float NeutronX[3]; // center of gammas position
// Pair parameters
float gtDiff; // time difference in us between positron and neutron
float Distance; // distance between neutron and positron, cm
float DistanceZ; // in Z, cm
// Environment
float gtFromPrevious; // time from the previous hit before positron, us
float PreviousEnergy; // energy of the previous event
float gtToNext; // time to the next hit after neutron, counted from positron, us
float NextEnergy; // energy of the next event
int EventsBetween; // Events between positron and neutron
// Veto
float gtFromVeto; // time from the last Veto event
int VetoHits; // hits in Veto counters
float VetoEnergy; // Energy in Veto counters
float DanssEnergy; // Veto Energy in Danss (Pmt + SiPm)/2
float gtFromShower; // time from large energy shower in DANSS
float ShowerEnergy; // shower event energy in DANSS (Pmt + SiPm)/2
// Hits
int NPHits; // Number of hits in "positron event"
int NNHits; // Number of hits in "neutron event"
};
struct DanssPairStruct7 {
// Common parameters
long long number[2]; // event numbers in the file
long long globalTime[2]; // event times
int unixTime; // linux time, seconds
// int runNumber; // the run number
float SiPmCleanEnergy[2]; // Full Clean energy SiPm
float PmtCleanEnergy[2]; // Full Clean energy Pmt
// "positron cluster" parameters
int PositronHits; // hits in the cluster
float PositronEnergy; // Energy sum of the cluster (SiPM)
float TotalEnergy; // Energy of the maximum hit (SiPM)
float PositronSiPmEnergy; // SiPM energy in the cluster, corrected
float PositronPmtEnergy; // PMT energy in the cluster, corrected
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
float AnnihilationMax; // Energy in the maximum annihilation hit
float MinPositron2GammaZ; // Z-distance to the closest gamma
// "neutron" parameters
int NeutronHits; // number of hits considered as neutron capture gammas
float NeutronEnergy; // Energy sum of above (SiPM)
float NeutronX[3]; // center of gammas position
// Pair parameters
float gtDiff; // time difference in us between positron and neutron
float Distance; // distance between neutron and positron, cm
float DistanceZ; // in Z, cm
// Environment
float gtFromPrevious; // time from the previous hit before positron, us
float PreviousEnergy; // energy of the previous event
float gtToNext; // time to the next hit after neutron, counted from positron, us
float NextEnergy; // energy of the next event
int EventsBetween; // Events between positron and neutron
// Veto
float gtFromVeto; // time from the last Veto event
int VetoHits; // hits in Veto counters
float VetoEnergy; // Energy in Veto counters
float DanssEnergy; // Veto Energy in Danss (Pmt + SiPm)/2
float gtFromShower; // time from large energy shower in DANSS
float ShowerEnergy; // shower event energy in DANSS (Pmt + SiPm)/2
// Hits
int NPHits; // Number of hits in "positron event"
int NNHits; // Number of hits in "neutron event"
};
struct DanssPairStruct8 {
// Common parameters
long long number[2]; // event numbers in the file
long long globalTime[2]; // event times
int unixTime; // linux time, seconds
float SiPmCleanEnergy[2]; // Full Clean energy SiPm
float PmtCleanEnergy[2]; // Full Clean energy Pmt
// "positron cluster" parameters
int PositronHits; // hits in the cluster
float PositronEnergy; // Energy sum of the cluster (SiPM)
float TotalEnergy; // Energy of the maximum hit (SiPM)
float PositronSiPmEnergy; // SiPM energy in the cluster, corrected
float PositronPmtEnergy; // PMT energy in the cluster, corrected
float PositronX[3]; // cluster position
int AnnihilationGammas; // number of possible annihilation gammas
float AnnihilationEnergy; // Energy in annihilation gammas
float AnnihilationMax; // Energy in the maximum annihilation hit
float MinPositron2GammaZ; // Z-distance to the closest gamma
// "neutron" parameters
int NeutronHits; // number of hits considered as neutron capture gammas
float NeutronEnergy; // Energy sum of above (SiPM)
float NeutronX[3]; // center of gammas position
// Pair parameters
float gtDiff; // time difference in us between positron and neutron
float Distance; // distance between neutron and positron, cm
float DistanceZ; // in Z, cm
// Environment
float gtFromPreviousH; // time from the previous Hard event before positron, us
float PreviousEnergyH; // energy of the previous Hard event
float gtFromPreviousS; // time from the previous hit before positron, us
float PreviousEnergyS; // energy of the previous event
float gtToNext; // time to the next hit after neutron, counted from positron, us
float NextEnergy; // energy of the next event
int EventsBetween; // Events between positron and neutron
// Veto
float gtFromVeto; // time from the last Veto event
int VetoHits; // hits in Veto counters
float VetoEnergy; // Energy in Veto counters
float DanssEnergy; // Veto Energy in Danss (Pmt + SiPm)/2
float gtFromShower; // time from large energy shower in DANSS
float ShowerEnergy; // shower event energy in DANSS (Pmt + SiPm)/2
// Hits
int NPHits; // Number of hits in "positron event"
int NNHits; // Number of hits in "neutron event"
};
struct DanssMuonStruct {
// Common parameters
long long number[2]; // event numbers in the file
long long globalTime[2]; // event times
int unixTime; // linux time, seconds
// int runNumber; // the run number
// Hit summs
int SiPmHits[2]; // SiPm clean hits
float SiPmEnergy[2]; // Full Clean energy SiPm
int PmtHits[2]; // Pmt clean hits
float PmtEnergy[2]; // Full Clean energy Pmt
int VetoHits[2]; // hits in Veto counters
float VetoEnergy[2]; // Energy in Veto counters
// "positron cluster" parameters for delayed event
float TotalEnergy; // Total energy, corrected for custer position
int ClusterHits; // hits in the cluster
float ClusterEnergy; // Energy sum of the cluster (SiPM)
float ClusterSiPmEnergy; // SiPM energy in the cluster, corrected
float ClusterPmtEnergy; // PMT energy in the cluster, corrected
float ClusterX[3]; // cluster position
int OffClusterHits; // number of off cluster hits
float OffClusterEnergy; // off cluster energy
// "muon" parameters - prompt event
float MuonEnergy; // Energy sum of prompt event
// Pair parameters
float gtDiff; // time difference in us between positron and neutron
// Hits
int NPHits; // Number of hits in "muon event"
int NDHits; // Number of hits in "decay event"
};
// 248Cm analysis
struct DanssCmStruct {
long long number[10]; // event numbers in the file
int unixTime; // linux time, seconds
int N; // number of neutrons + 1
float SiPmCleanEnergy[10]; // Full Clean energy SiPm
float PmtCleanEnergy[10]; // Full Clean energy Pmt
// "neutron" parameters
int Hits[10];
// int NeutronHits[10]; // number of hits considered as neutron capture gammas
float NeutronEnergy[10]; // Energy sum of above (SiPM + PMT)
float NeutronX[10][3]; // center of gammas position
float PositronX[10][3]; // center of maximum hit cluster
// float NeutronGammaEnergy[10][5]; // sorted list of the 5 most energetic gammas
// float NeutronGammaDistance[10][5]; // distances for the gammas above to the "neutron" center
float PositronEnergy[10]; // maximum hit cluster energy
float NeutronRadius[10]; // average distance between hits and the center
// Pair parameters
float gtDiff[10]; // time difference in us (from 125 MHz clock)
float Distance[10]; // distance between neutron and positron, cm
float DistanceZ[10]; // in Z, cm
};
// MC truth
struct DanssMcStruct {
float Energy;
float X[3];
float DriftTime;
};
// Raw hits information
struct RawHitInfoStruct {
unsigned short PmtCnt;
unsigned short VetoCnt;
unsigned short SiPmCnt;
};
// MC struct DANSSEvent
struct MCEventStruct {
double EventID;
double ParticleEnergy;
double EnergyLoss;
double DetectorEnergyLoss;
double CopperEnergyLoss;
double GdCoverEnergyLoss;
double X;
double Y;
double Z;
double DirX;
double DirY;
double DirZ;
double TimelineShift;
char FluxFlag;
};
// MC tree DANSSParticle: branch ParticleData :
// EventID/D:ID:ParentID:ParticleEnergy:X:Y:Z:DirX:DirY:DirZ:Time:KillingFlag
struct MCParticleStruct {
double EventID;
double ID;
double ParentID;
double ParticleEnergy;
double X, Y, Z;
double DirX, DirY, DirZ;
double Time;
double KillingFlag;
};
struct DanssFromMC {
float MCPositronEnergy; // Positron energy, MeV
float MCPositronX[3]; // Positron x, y, z, cm in analysis frame
float MCNeutronEnergy; // Neutron energy, MeV
};
#endif /* EVTBUILDER_H */