Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
ChanEvent.hpp
Go to the documentation of this file.
1 
4 #ifndef __CHANEVENT_HPP
5 #define __CHANEVENT_HPP
6 
7 #include <vector>
8 #include "DetectorLibrary.hpp"
9 #include "pixie16app_defs.h"
10 #include "Identifier.hpp"
11 #include "Globals.hpp"
12 #include "Trace.hpp"
13 
23 class ChanEvent {
24 public:
27 
31  void SetEnergy(double a) {energy = a;}
34  void SetCalEnergy(double a) {calEnergy = a;}
37  void SetTime(double a) {time = a;}
40  void SetCorrectedTime(double a) { correctedTime = a;}
43  void SetCalTime(double a) {calTime = a;}
46  void SetHighResTime(double a) {highResTime =a;}
47 
48  double GetEnergy() const {
49  return energy;
50  }
51  double GetCalEnergy() const {
52  return calEnergy;
53  }
54  double GetCorrectedTime() const {
55  return correctedTime;
56  }
57  double GetTime() const {
58  return time;
59  }
60  double GetCalTime() const {
61  return calTime;
62  }
63  double GetHighResTime() const {
64  return highResTime;
65  }
66  double GetEventTime() const {
67  return eventTime;
68  }
69  const Trace& GetTrace() const {
70  return trace;
71  }
73  return trace;
74  }
75  unsigned long GetTrigTime() const {
76  return trigTime;
77  }
78  unsigned long GetEventTimeLo() const {
79  return eventTimeLo;
80  }
81  unsigned long GetEventTimeHi() const {
82  return eventTimeHi;
83  }
84  unsigned long GetRunTime0() const {
85  return runTime0;
86  }
87  unsigned long GetRunTime1() const {
88  return runTime1;
89  }
90  unsigned long GetRunTime2() const {
91  return runTime2;
92  }
93  bool IsPileup() const {
94  return pileupBit;
95  }
96  bool IsSaturated() const {
97  return saturatedBit;
98  }
99 
101  const Identifier& GetChanID() const;
103  int GetID() const;
106  unsigned long GetQdcValue(int i) const;
107 
113  void ZeroVar();
114 private:
115  double energy;
116  double calEnergy;
119  double calTime;
120  double correctedTime;
121  double highResTime;
132  static const int numQdcs = 8;
135  double time;
136  double eventTime;
137  int modNum;
138  int chanNum;
141  bool pileupBit;
144  void ZeroNums(void);
148  friend int ReadBuffDataA(pixie::word_t *, unsigned long *, std::vector<ChanEvent *> &);
151  friend int ReadBuffDataDF(pixie::word_t *, unsigned long *, std::vector<ChanEvent *> &);
152 };
153 
158 bool CompareCorrectedTime(const ChanEvent *a, const ChanEvent *b);
163 bool CompareTime(const ChanEvent *a, const ChanEvent *b);
164 #endif
unsigned long GetEventTimeLo() const
Definition: ChanEvent.hpp:78
void ZeroNums(void)
double correctedTime
Definition: ChanEvent.hpp:120
double calEnergy
Definition: ChanEvent.hpp:116
void SetCalEnergy(double a)
Definition: ChanEvent.hpp:34
A channel event.
Definition: ChanEvent.hpp:23
double GetEnergy() const
Definition: ChanEvent.hpp:48
int modNum
Definition: ChanEvent.hpp:137
unsigned long GetRunTime1() const
Definition: ChanEvent.hpp:87
pixie::word_t trigTime
Definition: ChanEvent.hpp:123
unsigned long GetEventTimeHi() const
Definition: ChanEvent.hpp:81
double GetTime() const
Definition: ChanEvent.hpp:57
double calTime
Definition: ChanEvent.hpp:119
pixie::word_t runTime2
Definition: ChanEvent.hpp:131
unsigned long GetTrigTime() const
Definition: ChanEvent.hpp:75
void ZeroVar()
bool saturatedBit
Definition: ChanEvent.hpp:142
pixie::word_t cfdTime
Definition: ChanEvent.hpp:126
double highResTime
Definition: ChanEvent.hpp:121
double GetCorrectedTime() const
Definition: ChanEvent.hpp:54
int GetID() const
pixie::word_t eventTimeHi
Definition: ChanEvent.hpp:128
double time
Definition: ChanEvent.hpp:135
friend int ReadBuffDataDF(pixie::word_t *, unsigned long *, std::vector< ChanEvent * > &)
ChanEvent()
Definition: ChanEvent.hpp:26
Defines identifying information for channels.
double GetHighResTime() const
Definition: ChanEvent.hpp:63
double eventTime
Definition: ChanEvent.hpp:136
constant parameters used in pixie16 analysis
bool CompareCorrectedTime(const ChanEvent *a, const ChanEvent *b)
Trace trace
Definition: ChanEvent.hpp:122
unsigned long GetRunTime2() const
Definition: ChanEvent.hpp:90
int chanNum
Definition: ChanEvent.hpp:138
const Identifier & GetChanID() const
bool IsSaturated() const
Definition: ChanEvent.hpp:96
double GetCalEnergy() const
Definition: ChanEvent.hpp:51
pixie::word_t eventTimeLo
Definition: ChanEvent.hpp:127
Store the information for a trace.
Definition: Trace.hpp:34
pixie::word_t qdcValue[numQdcs]
Definition: ChanEvent.hpp:133
const Trace & GetTrace() const
Definition: ChanEvent.hpp:69
A simple class to store the traces.
bool pileupBit
Definition: ChanEvent.hpp:141
void SetEnergy(double a)
Definition: ChanEvent.hpp:31
pixie::word_t runTime1
Definition: ChanEvent.hpp:130
bool CompareTime(const ChanEvent *a, const ChanEvent *b)
double GetEventTime() const
Definition: ChanEvent.hpp:66
void SetCorrectedTime(double a)
Definition: ChanEvent.hpp:40
Trace & GetTrace()
Definition: ChanEvent.hpp:72
bool virtualChannel
Definition: ChanEvent.hpp:140
bool IsPileup() const
Definition: ChanEvent.hpp:93
void SetHighResTime(double a)
Definition: ChanEvent.hpp:46
uint32_t word_t
a pixie word
Definition: Globals.hpp:31
pixie::word_t runTime0
Definition: ChanEvent.hpp:129
double energy
Definition: ChanEvent.hpp:115
static const int numQdcs
Definition: ChanEvent.hpp:132
unsigned long GetQdcValue(int i) const
This is an extension of the vector of the identifiers that was previously used.
Channel identification.
Definition: Identifier.hpp:23
unsigned long GetRunTime0() const
Definition: ChanEvent.hpp:84
void SetTime(double a)
Definition: ChanEvent.hpp:37
double GetCalTime() const
Definition: ChanEvent.hpp:60
void SetCalTime(double a)
Definition: ChanEvent.hpp:43
friend int ReadBuffDataA(pixie::word_t *, unsigned long *, std::vector< ChanEvent * > &)