46 #include "TRestAxionDeviationProcess.h"
70 LoadConfig(cfgFileName);
82 SetName(this->ClassName());
83 SetTitle(
"Default config");
97 if (LoadConfigFromFile(cfgFilename, name)) LoadDefaultConfig();
104 SetSectionName(this->ClassName());
105 SetLibraryVersion(LIBRARY_VERSION);
115 RESTDebug <<
"Entering ... TRestAxionGeneratorProcess::InitProcess" << RESTendl;
122 if (fRandom !=
nullptr) {
126 fRandom =
new TRandom3(fSeed);
127 fSeed = fRandom->TRandom::GetSeed();
136 TVector3 inPos = fAxionEvent->GetPosition();
137 TVector3 inDir = fAxionEvent->GetDirection();
139 Double_t theta = fDevAngle * fRandom->Rndm();
140 Double_t phi = TMath::Pi() * fRandom->Rndm();
142 TVector3 ortho = inDir.Orthogonal();
143 TVector3 newDir = inDir;
145 newDir.Rotate(theta, ortho);
146 newDir.Rotate(phi, inDir);
148 fAxionEvent->SetDirection(newDir);
A process to deviate the axion direction by a given yaw and pitch angle distributions.
void InitProcess() override
Process initialization. Data members that require initialization just before start processing should ...
TRestEvent * ProcessEvent(TRestEvent *evInput) override
The main processing event function.
~TRestAxionDeviationProcess()
Default destructor.
void LoadDefaultConfig()
Function to load the default config in absence of RML input.
void Initialize() override
Function to initialize input/output event members and define the section name.
void LoadConfig(std::string cfgFilename, std::string name="")
Function to load the configuration from an external configuration file.
TRestAxionDeviationProcess()
Default constructor.
An event data class to define the parameters related to an axion particle.
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.