52 #include "TRestAxionAnalysisProcess.h"
76 LoadConfig(cfgFileName);
88 SetName(this->ClassName());
89 SetTitle(
"Default config");
103 if (LoadConfigFromFile(cfgFilename, name)) LoadDefaultConfig();
110 SetSectionName(this->ClassName());
111 SetLibraryVersion(LIBRARY_VERSION);
115 fAxionEvent->Initialize();
124 RESTDebug <<
"TRestAxionAnalysisProcess::ProcessEvent : " << fAxionEvent->GetID() << RESTendl;
126 SetObservableValue(
"energy", fAxionEvent->GetEnergy());
127 SetObservableValue(
"mass", fAxionEvent->GetMass() *
units(
"eV"));
129 Double_t x = fAxionEvent->GetPosition().X() - fAnalysisPosition.X();
130 Double_t y = fAxionEvent->GetPosition().Y() - fAnalysisPosition.Y();
131 SetObservableValue(
"posX", x);
132 SetObservableValue(
"posY", y);
133 SetObservableValue(
"posZ", fAxionEvent->GetPosition().Z());
136 Double_t r = TMath::Sqrt(x * x + y * y);
137 SetObservableValue(
"R", r);
139 SetObservableValue(
"thetaAngle", fAxionEvent->GetDirection().Theta());
140 SetObservableValue(
"phiAngle", fAxionEvent->GetDirection().Phi());
An analyis process to add TRestAxionEvent observables to the analysis tree.
TRestEvent * ProcessEvent(TRestEvent *evInput) override
The main processing event function.
void LoadDefaultConfig()
Function to load the default config in absence of RML input.
~TRestAxionAnalysisProcess()
Default destructor.
void LoadConfig(std::string cfgFilename, std::string name="")
Function to load the configuration from an external configuration file.
void Initialize() override
Function to initialize input/output event members and define the section name.
TRestAxionAnalysisProcess()
Default constructor.
An event data class to define the parameters related to an axion particle.
A base class for any REST event.
@ REST_Debug
+show the defined debug messages