43 #include "TRestAxionEvent.h"
45 #include "TRestTools.h"
48 using namespace TMath;
52 TRestAxionEvent::TRestAxionEvent() {
57 TRestAxionEvent::~TRestAxionEvent() {}
61 TPad* TRestAxionEvent::DrawEvent(TString option) {
64 for (
unsigned int n = 0; n < optList.size(); n++) {
65 if (optList[n] ==
"print") this->PrintEvent();
68 optList.erase(std::remove(optList.begin(), optList.end(),
"print"), optList.end());
70 if (optList.size() == 0) optList.push_back(
"TODO");
77 fPad =
new TPad(this->GetName(),
" ", 0, 0, 1, 1);
92 TVector3 ref = fPosition - center;
97 fPosition = ref + center;
99 fDirection.RotateX(theta);
100 fDirection.RotateZ(phi);
109 TVector3 ref = fPosition - center;
114 fPosition = ref + center;
116 fDirection.RotateZ(phi);
117 fDirection.RotateX(theta);
126 TVector3 ref = fPosition - center;
131 fPosition = ref + center;
133 fDirection.RotateX(pitch);
134 fDirection.RotateY(yaw);
143 TVector3 ref = fPosition - center;
148 fPosition = ref + center;
150 fDirection.RotateY(yaw);
151 fDirection.RotateX(pitch);
159 void TRestAxionEvent::PrintEvent() {
162 cout <<
"Mass : " << GetMass() *
units(
"eV") <<
" eV" << endl;
163 cout <<
"Energy : " << GetEnergy() <<
" keV" << endl;
164 cout <<
"Position : ( " << fPosition.X() <<
", " << fPosition.Y() <<
", " << fPosition.Z() <<
" ) mm"
166 cout <<
"Direction : ( " << fDirection.X() <<
", " << fDirection.Y() <<
", " << fDirection.Z() <<
" )"
An event data class to define the parameters related to an axion particle.
void RotateXY(const TVector3 ¢er, Double_t pitch, Double_t yaw)
This method will produce a rotation respect to a center given by argument. First we rotate the partic...
void RotateYX(const TVector3 ¢er, Double_t yaw, Double_t pitch)
This method will produce a rotation respect to a center given by argument. First we rotate the partic...
void RotateXZ(const TVector3 ¢er, Double_t theta, Double_t phi)
This method will produce a rotation respect to a center given by argument. First we rotate the partic...
virtual void Initialize()
void RotateZX(const TVector3 ¢er, Double_t phi, Double_t theta)
This method will produce a rotation respect to a center given by argument. First we rotate the partic...
void Translate(const TVector3 &delta)
This method will produce a tranlation of the axion position by an amount delta.
virtual void PrintEvent() const
virtual void Initialize()=0