Berkeley Nuclear Data Software
NSDPhysicsEvents.h
Go to the documentation of this file.
1 #ifndef _NSD_PHYICS_EVENTS_
2 #define _NSD_PHYICS_EVENTS_
3 //project includes
4 #include "ConfigClasses.h"
5 
6 //c++ includes
7 #include <vector>
8 #include <cstdint>
9 
11 {
15 {
16 public:
20  DetectedEvent();
21  //setters
23  void setEvInfo(uint32_t a_evInfo);
25  void setEnDep(float a_enDep);
27  void setTheta(float a_theta);
29  void setPhi(float a_phi);
31  void setEnNTOF(const std::vector<float>& a_EnNTOF);
33  void setDetType(DetType a_detType);
35  void setDetID(uint8_t a_detectorID);
36  //getters
38  uint32_t getEvInfo() const;
40  float getEnDep() const;
42  float getTheta() const;
44  float getPhi() const;
46  std::vector<float> getEnNTOF() const;
47 
50  DetType getDetType() const;
51 
54  int getDetID() const;
55 protected:
59  uint32_t m_evInfo;
61  float m_enDep;
63  float m_theta;
65  float m_phi;
67  std::vector<float> m_EnNTOF;
68 };
69 
71 class GammaEvent : public DetectedEvent
72 {
73 public:
77  GammaEvent();
78 };
79 
83 {
84 public:
88  OrgScintEvent();
90  void setEnTOF(float a_EnTOF);
92  void setShapeMetric(float a_shapeMetric);
94  float getEnTOF();
96  float getShapeMetric();
97 
98 
99 private:
101  float m_EnTOF;
103  float m_shapeMetric;
104 };
105 
109 class CloverEvent : public GammaEvent
110 {
111 public:
112  CloverEvent();
113 
115  void setRejectBGO(bool a_cond);
116 
118  bool getRejectBGO();
119 
122  void setMultiplicity(int a_multiplicity);
125  int getMultplicity();
126 
127 };
128 
132 {
133 public:
136 
137 
138 
140  void addHPGEEvent(const NSDPhysicsEvents::GammaEvent a_hit);
143 
144  //need getters
145  double getCloverEgamma();
146  double getCloverEgamma(int a_cloverID);
147  double getInorgEgamma();
148  std::vector<int> getCloverID();
149  std::vector<int> getOrgScintID();
150  std::vector<float> getEnNTOFs();
151  std::vector<float> getEnNTOFs(int a_clID);
152  std::vector<float> getEnNTOFsOrgScint();
154  bool hasNeutron();
156  bool hasNeutron(double a_threshold);
157  bool hasClover();
158  bool hasInorgScint();
161  double getOrgScintLight();
163  double getOrgScintLight(int a_detID);
165  double getNeutronEnTOF();
166  double getNeutronEnTOF(int a_detID);
168  double getOrgScintAngle();
170  bool populated();
171  std::map<int,float> getOrgScintShapeMetrics();
172 
174  void clearEvent();
175 protected:
176  std::vector<NSDPhysicsEvents::CloverEvent> m_clovers;
177  std::vector<NSDPhysicsEvents::GammaEvent> m_hpgeEvents;
178  std::vector<NSDPhysicsEvents::GammaEvent> m_inorgScintEvents;
179  std::vector<NSDPhysicsEvents::OrgScintEvent> m_orgScintEvents;
180 };
181 
182 
183 }
184 #endif
DetType
Definition: ConfigClasses.h:20
Definition: NSDPhysicsEvents.h:132
std::vector< float > getEnNTOFsOrgScint()
Definition: NSDPhysicsEvents.cpp:399
std::vector< int > getCloverID()
Definition: NSDPhysicsEvents.cpp:360
bool hasInorgScint()
Definition: NSDPhysicsEvents.cpp:302
double getCloverEgamma()
Definition: NSDPhysicsEvents.cpp:219
CalibratedCoinEvent()
default constructor puts the class into an empty but working state
Definition: NSDPhysicsEvents.cpp:195
double getNeutronEnTOF()
return neutron scatter TOF
Definition: NSDPhysicsEvents.cpp:324
std::vector< NSDPhysicsEvents::OrgScintEvent > m_orgScintEvents
Definition: NSDPhysicsEvents.h:179
void addOrgScintEvent(const NSDPhysicsEvents::OrgScintEvent a_hit)
Definition: NSDPhysicsEvents.cpp:215
bool populated()
returns true if there is more than one event
Definition: NSDPhysicsEvents.cpp:249
std::vector< NSDPhysicsEvents::GammaEvent > m_inorgScintEvents
Definition: NSDPhysicsEvents.h:178
bool hasClover()
Definition: NSDPhysicsEvents.cpp:293
void addCloverEvent(const NSDPhysicsEvents::CloverEvent a_hit)
Definition: NSDPhysicsEvents.cpp:200
std::vector< int > getOrgScintID()
Definition: NSDPhysicsEvents.cpp:369
void addHPGEEvent(const NSDPhysicsEvents::GammaEvent a_hit)
Definition: NSDPhysicsEvents.cpp:205
double getOrgScintAngle()
returns polar angle of org scint [radians]
Definition: NSDPhysicsEvents.cpp:348
void addInorgScintEvent(const NSDPhysicsEvents::GammaEvent a_hit)
Definition: NSDPhysicsEvents.cpp:210
std::vector< float > getEnNTOFs()
Definition: NSDPhysicsEvents.cpp:378
std::vector< NSDPhysicsEvents::CloverEvent > m_clovers
Definition: NSDPhysicsEvents.h:176
double getOrgScintLight()
Definition: NSDPhysicsEvents.cpp:311
std::map< int, float > getOrgScintShapeMetrics()
Definition: NSDPhysicsEvents.cpp:412
double getInorgEgamma()
Definition: NSDPhysicsEvents.cpp:240
std::vector< NSDPhysicsEvents::GammaEvent > m_hpgeEvents
Definition: NSDPhysicsEvents.h:177
void clearEvent()
resets the event to an empty state without giving up any memory
Definition: NSDPhysicsEvents.cpp:262
bool hasNeutron()
returns true if orgScint has shapeMetric>0 (default false)
Definition: NSDPhysicsEvents.cpp:269
Definition: NSDPhysicsEvents.h:110
void setRejectBGO(bool a_cond)
this function sets a bit in the event info if the BGO has fired
Definition: NSDPhysicsEvents.cpp:145
bool getRejectBGO()
this function returns true in the event info if the BGO has fired
Definition: NSDPhysicsEvents.cpp:163
CloverEvent()
Definition: NSDPhysicsEvents.cpp:138
int getMultplicity()
Definition: NSDPhysicsEvents.cpp:189
void setMultiplicity(int a_multiplicity)
Definition: NSDPhysicsEvents.cpp:171
Definition: NSDPhysicsEvents.h:15
DetectedEvent()
Definition: NSDPhysicsEvents.cpp:6
DetType getDetType() const
Definition: NSDPhysicsEvents.cpp:91
int getDetID() const
Definition: NSDPhysicsEvents.cpp:98
uint32_t getEvInfo() const
get encoded specific information about the event
Definition: NSDPhysicsEvents.cpp:65
float m_enDep
the energy observation in MeV
Definition: NSDPhysicsEvents.h:61
float getEnDep() const
get the energy observation in MeV
Definition: NSDPhysicsEvents.cpp:71
float m_phi
azimuthal angle with respect to the incoming beam in radians
Definition: NSDPhysicsEvents.h:65
void setPhi(float a_phi)
azimuthal angle with respect to the incoming beam in radians
Definition: NSDPhysicsEvents.cpp:32
float m_theta
polar angle with respect to the incoming beam in radians
Definition: NSDPhysicsEvents.h:63
void setDetType(DetType a_detType)
encodes the detector type into the m_evInfo
Definition: NSDPhysicsEvents.cpp:42
float getTheta() const
get polar angle with respect to the incoming beam in radians
Definition: NSDPhysicsEvents.cpp:76
std::vector< float > getEnNTOF() const
get either NTOF in ns or energies calculated from them in MeV
Definition: NSDPhysicsEvents.cpp:86
void setEnDep(float a_enDep)
the energy observation in MeV
Definition: NSDPhysicsEvents.cpp:22
void setEvInfo(uint32_t a_evInfo)
used to encode specific information about the event
Definition: NSDPhysicsEvents.cpp:17
void setTheta(float a_theta)
polar angle with respect to the incoming beam in radians
Definition: NSDPhysicsEvents.cpp:27
void setEnNTOF(const std::vector< float > &a_EnNTOF)
used to store either NTOF in ns or energies calculated from them in MeV
Definition: NSDPhysicsEvents.cpp:37
std::vector< float > m_EnNTOF
used to store either NTOF in ns or energies calculated from them in MeV
Definition: NSDPhysicsEvents.h:67
uint32_t m_evInfo
Definition: NSDPhysicsEvents.h:59
void setDetID(uint8_t a_detectorID)
encodes the detector type into the m_evInfo
Definition: NSDPhysicsEvents.cpp:51
float getPhi() const
get azimuthal angle with respect to the incoming beam in radians
Definition: NSDPhysicsEvents.cpp:81
specialization of the Detected event class for gamma rays
Definition: NSDPhysicsEvents.h:72
GammaEvent()
Definition: NSDPhysicsEvents.cpp:103
Definition: NSDPhysicsEvents.h:83
float getEnTOF()
used to store a determined time of flight
Definition: NSDPhysicsEvents.cpp:128
void setEnTOF(float a_EnTOF)
used to store a determined time of flight
Definition: NSDPhysicsEvents.cpp:118
float getShapeMetric()
used to store a shape metric
Definition: NSDPhysicsEvents.cpp:133
void setShapeMetric(float a_shapeMetric)
used to store a shape metric
Definition: NSDPhysicsEvents.cpp:123
OrgScintEvent()
Definition: NSDPhysicsEvents.cpp:109
Definition: NSDPhysicsEvents.h:11