40 #include "TRestAxionOpticsProcess.h"
64 LoadConfig(cfgFileName);
76 SetName(this->ClassName());
77 SetTitle(
"Default config");
91 if (LoadConfigFromFile(cfgFilename, name)) LoadDefaultConfig();
98 SetSectionName(this->ClassName());
99 SetLibraryVersion(LIBRARY_VERSION);
109 RESTDebug <<
"Entering ... TRestAxionGeneratorProcess::InitProcess" << RESTendl;
111 fOptics = GetMetadata<TRestAxionOptics>();
114 fOptics->PrintMetadata();
116 RESTError <<
"TRestAxionOptics::InitProcess. No sucess instantiating optics." << RESTendl;
126 TVector3 inPos = fAxionEvent->GetPosition();
127 TVector3 inDir = fAxionEvent->GetDirection();
128 Double_t energy = fAxionEvent->GetEnergy();
131 Double_t efficiency = fOptics->PropagatePhoton(inPos, inDir, energy);
133 SetObservableValue(
"efficiency", efficiency);
135 RESTDebug <<
"Optics efficiency: " << efficiency << RESTendl;
138 fAxionEvent->SetPosition(fOptics->GetLastGoodPosition());
139 fAxionEvent->SetDirection(fOptics->GetLastGoodDirection());
144 fAxionEvent->PrintEvent();
An event data class to define the parameters related to an axion particle.
A process to introduce the response from optics in the axion signal generation chain.
void Initialize() override
Function to initialize input/output event members and define the section name.
void LoadDefaultConfig()
Function to load the default config in absence of RML input.
TRestEvent * ProcessEvent(TRestEvent *evInput) override
The main processing event function.
TRestAxionOpticsProcess()
Default constructor.
void InitProcess() override
Process initialization. Data members that require initialization just before start processing should ...
void LoadConfig(std::string cfgFilename, std::string name="")
Function to load the configuration from an external configuration file.
~TRestAxionOpticsProcess()
Default destructor.
A base class for any REST event.
virtual void PrintEvent() const
@ REST_Extreme
show everything
@ REST_Debug
+show the defined debug messages
Int_t GetChar(std::string hint="Press a KEY to continue ...")
Helps to pause the program, printing a message before pausing.