Pottu
jyfl_nucspec_detectors.hpp
Go to the documentation of this file.
1 
6 #ifndef H_POTTU_JYFL_NUCSPEC_DETECTORS
7 #define H_POTTU_JYFL_NUCSPEC_DETECTORS
8 
9 
10 #include "DetectorEvent.hpp"
11 
12 
13 #include <cstdint>
14 #include <limits>
15 
16 
17 namespace pottu {
18 
23  namespace jyfl_nucspec_std_detectors_2023_03 {
24 
25 
27  extern const uint8_t fpBegeRing[3];
29  extern const float fpBegeTheta[3];
31  extern const float fpBegePhi[3];
32 
34  extern const uint8_t fpCloverRing[4];
36  extern const float fpCloverTheta[3];
38  extern const float fpCloverPhi[3];
39 
40 
42  extern const uint32_t jytubeRing[92];
43 
44 
46  extern const uint8_t jg1Ph1Ring[45];
48  extern const float jg1Ph1Theta[45];
50  extern const float jg1Ph1Phi[45];
51 
53  extern const uint8_t jgPh1Ring[15];
55  extern const float jgPh1Theta[15];
57  extern const float jgPh1Phi[15];
58 
60  extern const uint8_t jgCloverRing[96];
62  extern const float jgCloverTheta[96];
64  extern const float jgCloverPhi[96];
65 
66 
67 
68 
87  struct TACSInfo {
88  pottu::DetectorEvent detTof;
89  void clear() noexcept {
90  detTof.markInvalid();
91  };
92  };
93 
94 
95 
96 
109  class DSSDInfo
110  {
111  public:
112  // Position of highest x energy seen
113  int16_t x{-1};
114  // Position of highest y energy seen
115  int16_t y{-1};
116  // Highest x energy
117  float xe{0};
118  // Highest y energy
119  float ye{0};
120 
123 
124  // Multiplicities
125  uint8_t xmulti{0};
126  uint8_t ymulti{0};
127 
128  std::vector<pottu::DetectorEvent> strips;
129 
130  void clear() noexcept {
131  x=-1;
132  y=-1;
133  xe=0;
134  ye=0;
135  xmulti=0;
136  ymulti=0;
137  strips.clear();
138  detX.markInvalid();
139  detY.markInvalid();
140  }
141  };
142 
143 
158  struct MWPCInfo {
161  pottu::DetectorEvent detLogic;
162 
163  void clear() noexcept {
164  detX.markInvalid();
165  detY.markInvalid();
166  detLogic.markInvalid();
167  }
168  };
169 
170 
185  struct GreatMWPCInfo {
186  pottu::DetectorEvent detX1;
187  pottu::DetectorEvent detX2;
188  pottu::DetectorEvent detY1;
189  pottu::DetectorEvent detY2;
190  pottu::DetectorEvent detDE;
191 
192  void clear() noexcept {
193  detX1.markInvalid();
194  detX2.markInvalid();
195  detY1.markInvalid();
196  detY2.markInvalid();
197  detDE.markInvalid();
198  }
199  };
200 
201 
219  struct MWPCInfo_V2305 {
220  pottu::DetectorEvent detX1;
221  pottu::DetectorEvent detX2;
223  pottu::DetectorEvent detLogic;
224 
225  // Position in mm in x direction
226  float x{ std::numeric_limits<float>::quiet_NaN() };
227  // Position in mm in y direction
228  float y{ std::numeric_limits<float>::quiet_NaN() };
229 
230  void clear() noexcept {
231  detX1.markInvalid();
232  detX2.markInvalid();
233  detY.markInvalid();
234  detLogic.markInvalid();
235  x = std::numeric_limits<float>::quiet_NaN();
236  y = std::numeric_limits<float>::quiet_NaN();
237  }
238  };
239 
240 
250  struct GeEvent {
251  int64_t time{0};
252  float e{0};
253  float theta{0};
254  float phi{0};
255 
256  // Same as pottu::DetectorEvent.group
257  uint16_t group{0};
258 
259  // Same as pottu::DetectorEvent.coord if addback isn't done
260  // If addback is done:
261  // Ph1 0-14, clovers 0-23 (Q01, Q02..., Q24)
262  // for BEGe: 0-2, fp Clover 0 (w/out addback 0-3)
263  uint16_t number{0};
264  uint16_t ring{0};
265  uint16_t multi{0}; // multiplicity
266  };
267 
268 
282  struct FPGeInfo {
283  std::vector<pottu::DetectorEvent> beges;
284  std::vector<pottu::DetectorEvent> clovers;
285  std::vector<GeEvent> gammas;
286 
287  void clear() noexcept {
288  beges.clear();
289  clovers.clear();
290  gammas.clear();
291  };
292 
299  void fillGammas( bool doCloverAddback = true, int64_t cloverAddbackDuration = 10 ) noexcept;
300  };
301 
302 
316  struct GreatFPGeInfo {
317  std::vector<pottu::DetectorEvent> planarx;
318  std::vector<pottu::DetectorEvent> planary;
319  std::vector<pottu::DetectorEvent> clovers;
320  std::vector<GeEvent> gammas;
321 
322  void clear() noexcept {
323  planarx.clear();
324  planary.clear();
325  clovers.clear();
326  gammas.clear();
327  };
328 
335  void fillGammas( bool doCloverAddback = true, int64_t cloverAddbackDuration = 10 ) noexcept;
336  };
337 
338 
339 
350  std::vector<pottu::DetectorEvent> events;
351 
352  void clear() noexcept {
353  events.clear();
354  }
355  };
356 
357 
363  struct TuikeInfo {
364  int64_t xtime{0};
365  // Position of highest x energy seen
366  int16_t x{-1};
367  // Position of highest y energy seen
368  int16_t y{-1};
369  // Summed x energy
370  float xe{0};
371  // Summed y energy
372  float ye{0};
373  // Sum of sums
374  float sume{0};
375 
376  std::vector<pottu::DetectorEvent> xbars;
377  std::vector<pottu::DetectorEvent> ybars;
378 
379  void clear() noexcept {
380  xtime = 0;
381  x=-1;
382  y=-1;
383  xe=0;
384  ye=0;
385  sume=0;
386  xbars.clear();
387  ybars.clear();
388  }
389 
394  void fillFields() noexcept;
395  };
396 
397 
398 
407  struct BoxInfo {
408  std::vector<pottu::DetectorEvent> events;
409 
410  void clear() noexcept {
411  events.clear();
412  }
413 
414  };
415 
416 
422  struct Jurogam3Info {
423  std::vector<pottu::DetectorEvent> ph1s; // Raw
424  std::vector<pottu::DetectorEvent> clovers; // Raw
425  std::vector<GeEvent> gammas; // Addbacked (or not)
426 
427  void clear() noexcept {
428  ph1s.clear();
429  clovers.clear();
430  gammas.clear();
431  };
432 
442  void fillGammas( int64_t cloverAddbackDuration, double beta ) noexcept;
443 
444  };
445 
446 
452  struct Jurogam1Info {
453  std::vector<pottu::DetectorEvent> ph1s; // Raw
454  std::vector<GeEvent> gammas; // Addbacked (or not)
455 
456  void clear() noexcept {
457  ph1s.clear();
458  gammas.clear();
459  };
460 
469  void fillGammas( double beta ) noexcept;
470 
471  };
472 
473 
480  struct JYTubeInfo {
481  uint16_t fold{0}; // multiplicity
482 
483  // tube elements
484  std::vector<pottu::DetectorEvent> elements;
485 
486  void clear() noexcept {
487  fold = 0;
488  elements.clear();
489  }
490 
497  static int8_t getRing(const DetectorEvent &det ) noexcept {
498  return det.coord<92 ? jytubeRing[det.coord] : -1;
499  }
500  };
501 
502 
503  }
504 
505 
506 
507 }
508 
509 
510 
511 #endif
Event containing event information of one daq channel.
Definition: DetectorEvent.hpp:47
DSSD information of the logical event.
Definition: jyfl_nucspec_detectors.hpp:110
const float jg1Ph1Theta[45]
Jurogam1 Phase 1 theta angles in degrees.
Definition: jyfl_nucspec_detectors.cpp:56
const uint8_t jg1Ph1Ring[45]
Jurogam1 Phase 1 ring numbers (values 1 and 2). Ring 1 is the most backward ring.
Definition: jyfl_nucspec_detectors.cpp:48
const float jgCloverTheta[96]
Jurogam3 Clover theta angles in degrees.
Definition: jyfl_nucspec_detectors.cpp:86
const float fpBegeTheta[3]
Focal plane BEGe theta angles. CURRENTLY JUST ZEROS!
Definition: jyfl_nucspec_detectors.cpp:17
const float fpBegePhi[3]
Focal plane BEGe phi angles. CURRENTLY JUST ZEROS!
Definition: jyfl_nucspec_detectors.cpp:18
const float fpCloverPhi[3]
Focal plane Clover phi angles. CURRENTLY JUST ZEROS!
Definition: jyfl_nucspec_detectors.cpp:22
const float jgPh1Theta[15]
Jurogam3 Phase 1 theta angles in degrees.
Definition: jyfl_nucspec_detectors.cpp:42
const float jg1Ph1Phi[45]
Jurogam1 Phase 1 phi angles in degrees.
Definition: jyfl_nucspec_detectors.cpp:64
const uint8_t jgCloverRing[96]
Jurogam3 Clover ring numbers (values 3,...,6). Ring 6 is the most forward ring.
Definition: jyfl_nucspec_detectors.cpp:75
const uint8_t jgPh1Ring[15]
Jurogam3 Phase 1 ring numbers (values 1 and 2). Ring 1 is the most backward ring.
Definition: jyfl_nucspec_detectors.cpp:38
const uint8_t fpCloverRing[4]
Focal plane clover ring number. All values are zero.
Definition: jyfl_nucspec_detectors.cpp:20
const uint8_t fpBegeRing[3]
Focal plane BEGe ring number. All values are zero.
Definition: jyfl_nucspec_detectors.cpp:16
const float jgCloverPhi[96]
Jurogam3 clover phi angles in degrees. CURRENTLY JUST ZEROS!
Definition: jyfl_nucspec_detectors.cpp:97
const uint32_t jytubeRing[92]
TODO.
Definition: jyfl_nucspec_detectors.cpp:25
const float fpCloverTheta[3]
Focal plane Clover theta angles. CURRENTLY JUST ZEROS!
Definition: jyfl_nucspec_detectors.cpp:21
const float jgPh1Phi[15]
Jurogam3 Phase 1 phi angles in degrees. CURRENTLY JUST ZEROS!
Definition: jyfl_nucspec_detectors.cpp:45
Definition: mainpage.dox:6
Box detector information.
Definition: jyfl_nucspec_detectors.hpp:407
Class to hold gamma events seen at the focal plane.
Definition: jyfl_nucspec_detectors.hpp:282
void fillGammas(bool doCloverAddback=true, int64_t cloverAddbackDuration=10) noexcept
Generates gammas from beges and clovers.
Definition: jyfl_nucspec_detectors.cpp:102
Germanium event used for all germaniums (Jurogam and focal plane).
Definition: jyfl_nucspec_detectors.hpp:250
Class to hold gamma events seen at the focal plane.
Definition: jyfl_nucspec_detectors.hpp:316
void fillGammas(bool doCloverAddback=true, int64_t cloverAddbackDuration=10) noexcept
Generates gammas from beges and clovers.
Definition: jyfl_nucspec_detectors.cpp:183
MWPC information of the logical event.
Definition: jyfl_nucspec_detectors.hpp:185
JYTube information.
Definition: jyfl_nucspec_detectors.hpp:480
static int8_t getRing(const DetectorEvent &det) noexcept
Returns ring number for JYTube element.
Definition: jyfl_nucspec_detectors.hpp:497
Jurogam1Info.
Definition: jyfl_nucspec_detectors.hpp:452
void fillGammas(double beta) noexcept
Generates gammas from ph1 events.
Definition: jyfl_nucspec_detectors.cpp:396
Jurogam3Info.
Definition: jyfl_nucspec_detectors.hpp:422
void fillGammas(int64_t cloverAddbackDuration, double beta) noexcept
Generates gammas from ph1 and clover detector events.
Definition: jyfl_nucspec_detectors.cpp:317
MWPC information of the logical event V2305.
Definition: jyfl_nucspec_detectors.hpp:219
MWPC information of the logical event.
Definition: jyfl_nucspec_detectors.hpp:158
Punch Through information of the logical event.
Definition: jyfl_nucspec_detectors.hpp:349
Information about TAC events.
Definition: jyfl_nucspec_detectors.hpp:87
Tuike information.
Definition: jyfl_nucspec_detectors.hpp:363
void fillFields() noexcept
Fills the values to all other fields based on events in xbars and ybars.
Definition: jyfl_nucspec_detectors.cpp:265