REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Private Member Functions | Private Attributes
TRestAxionGeneratorProcess Class Reference

Detailed Description

A process to initialize the axion event (mainly through TRestAxionSolarFlux)

This generator will produce solar axion events with the Sun at position (0,0,-AU) and detector at position (0,0,0).

The axion generation properties, such as coupling type and intensity, are defined by TRestAxionSolarFlux. That class defines the method TRestAxionSolarFlux::GetRandomEnergyAndRadius that is exploited by this process to define initial conditions for each axion, such as angular direction or energy. The flux intensity and its dependency with the solar radius and spectral energy will be fully coded inside TRestAxionSolarFlux, while this method will be able to play with the Sun-generator position, and the size of the target detector (which is placed at (0,0,0)) to define an initial axion position, direction and energy.

The following metadata members can be tuned in this process:


RESTsoft - Software for Rare Event Searches with TPCs

History of developments:

2022-February: New generator implementation using TRestAxionSolarFlux Javier Galan

Author
Javier Galan

Definition at line 32 of file TRestAxionGeneratorProcess.h.

#include <TRestAxionGeneratorProcess.h>

Inheritance diagram for TRestAxionGeneratorProcess:
TRestEventProcess TRestMetadata

Public Member Functions

 ClassDefOverride (TRestAxionGeneratorProcess, 4)
 
RESTValue GetInputEvent () const override
 Get pointer to input event. Must be implemented in the derived class.
 
RESTValue GetOutputEvent () const override
 Get pointer to output event. Must be implemented in the derived class.
 
const char * GetProcessName () const override
 Returns the name of this process.
 
void InitProcess () override
 Process initialization. Data members that require initialization just before start processing should be initialized here.
 
void PrintMetadata () override
 Prints out relevant metadata members.
 
TRestEventProcessEvent (TRestEvent *eventInput) override
 The main processing event function. More...
 
 TRestAxionGeneratorProcess ()
 Default constructor.
 
 ~TRestAxionGeneratorProcess ()
 Default destructor.
 
- Public Member Functions inherited from TRestEventProcess
virtual Bool_t AddInputFile (const std::string &file)
 
bool ApplyCut ()
 
virtual void BeginOfEventProcess (TRestEvent *inputEvent=nullptr)
 Begin of event process, preparation work. Called right before ProcessEvent()
 
 ClassDefOverride (TRestEventProcess, 3)
 
virtual void EndOfEventProcess (TRestEvent *inputEvent=nullptr)
 End of event process. Nothing to do. Called directly after ProcessEvent()
 
virtual void EndProcess ()
 To be executed at the end of the run (outside event loop)
 
TRestAnalysisTreeGetAnalysisTree () const
 Return the local analysis tree (dummy)
 
TCanvas * GetCanvas () const
 Get canvas.
 
TRestAnalysisTreeGetFullAnalysisTree ()
 
std::vector< std::string > GetListOfAddedObservables ()
 
TRestRunGetRunInfo () const
 Return the pointer of the hosting TRestRun object.
 
virtual Long64_t GetTotalBytes () const
 
virtual Long64_t GetTotalBytesRead () const
 Interface to external file reading, get the read bytes. To be implemented in external processes.
 
virtual void InitFromConfigFile () override
 To make settings from rml file. This method must be implemented in the derived class.
 
Bool_t isExternal () const
 Return whether this process is external process.
 
Int_t LoadSectionMetadata () override
 This method does some preparation of xml section. More...
 
virtual void NotifyAnalysisTreeReset ()
 In case the analysis tree is reset(switched to new file), some process needs to have action.
 
virtual Bool_t OpenInputFiles (const std::vector< std::string > &files)
 
std::vector< std::string > ReadObservables ()
 
void RegisterAllObservables (Bool_t value=true)
 
virtual Bool_t ResetEntry ()
 
void SetAnalysisTree (TRestAnalysisTree *tree)
 Set analysis tree of this process, then add observables to it.
 
void SetCanvasSize (Int_t x, Int_t y)
 Set canvas size.
 
void SetFriendProcess (TRestEventProcess *p)
 Add friendly process to this process.
 
void SetObservableValidation (bool validate)
 
void SetParallelProcess (TRestEventProcess *p)
 Add parallel process to this process.
 
void SetRunInfo (TRestRun *r)
 Set TRestRun for this process.
 
Bool_t singleThreadOnly () const
 Return whether this process is single std::thread only.
 
 TRestEventProcess ()
 
 ~TRestEventProcess ()
 

Private Member Functions

void Initialize () override
 Function to initialize input/output event members and define the section name.
 
void LoadDefaultConfig ()
 

Private Attributes

TRestAxionSolarFluxfAxionFlux
 A pointer to the TRestAxionSolarFlux metadata description.
 
TVector2 fAxionMassRange = TVector2(1.e-6, 1e-2)
 The axion mass range in keV.
 
Int_t fCounter = 0
 Used internally to define the event id.
 
TVector2 fEnergyRange = TVector2(0.05, 10)
 It defines the energy range for the axion event generator. Default between 50eV and 10keV.
 
TString fGeneratorType = "solarFlux"
 The generator type (solarFlux/flat)
 
TRestAxionEventfOutputAxionEvent
 A pointer to the specific TRestAxionEvent output.
 
TRandom3 * fRandom = nullptr
 Internal process random generator.
 
Int_t fSeed = 0
 Seed used in random generator.
 
TVector3 fTargetPosition = TVector3(0, 0, 0)
 The target position in mm with regards to the sun at (0,0,-AU).
 
Double_t fTargetRadius = 800
 The target size in mm (or generator source extension) for the generator.
 
Double_t fTotalFlux = 0
 Absolute solar flux (cm-2 s-1). Required for future calculations.
 

Additional Inherited Members

- Protected Types inherited from TRestEventProcess
enum  REST_Process_Output { No_Output , Observable , Internal_Var , Full_Output }
 
- Protected Member Functions inherited from TRestEventProcess
void BeginPrintProcess ()
 [name, cut range]
 
void CreateCanvas ()
 Create the canvas.
 
void EndPrintProcess ()
 
TRestEventProcessGetFriend (const std::string &nameOrType)
 
TRestEventProcessGetFriendLive (const std::string &nameOrType)
 
template<class T >
T * GetMetadata ()
 Get a metadata object from the host TRestRun. More...
 
TRestMetadataGetMetadata (const std::string &nameOrType)
 
size_t GetNumberOfParallelProcesses () const
 
template<class T >
GetObservableValue (const std::string &name)
 
TRestEventProcessGetParallel (int i)
 
template<class T >
std::vector< T > GetParallelDataMembers (T *member_of_process)
 Get a list of data members from parallel processes which is same to this process's certain data member. More...
 
template<class T >
void SetObservableValue (const std::string &name, const T &value)
 Set observable value for AnalysisTree. More...
 
- Protected Attributes inherited from TRestEventProcess
TRestAnalysisTreefAnalysisTree = nullptr
 
TCanvas * fCanvas = nullptr
 < Canvas for some viewer event
 
TVector2 fCanvasSize
 Canvas size.
 
std::vector< std::pair< std::string, TVector2 > > fCuts
 Stores cut definitions. Any listed observables should be in the range. More...
 
bool fDynamicObs = false
 It defines whether to use added observables only or all the observables appear in the code.
 
bool fIsExternal = false
 It defines if the process reads event data from an external source.
 
std::map< std::string, int > fObservablesDefined
 Stores the list of all the appeared process observables in the code. More...
 
std::map< std::string, int > fObservablesUpdated
 Stores the list of process observables updated when processing this event.
 
bool fReadOnly = false
 not used, keep for compatibility
 
TRestRunfRunInfo = nullptr
 < Pointer to TRestRun object where to find metadata.
 
bool fSingleThreadOnly = false
 
bool fValidateObservables = false
 It defines if observable names should be added to the validation list.
 

Member Function Documentation

◆ ProcessEvent()

TRestEvent * TRestAxionGeneratorProcess::ProcessEvent ( TRestEvent eventInput)
overridevirtual

The main processing event function.

The axion position must be displaced by the target size. We always do this. It is independent of generator The target is virtually placed at the (0,0,0) + TargetPosition since the experiment is not focussed by the bore but by the whole experiment. In my opinion the target should be either the optics, or the magnet end bore. Then one should place the optics or the magnet end bore at the (0,0,0) + TargetPosition. TODO: The target position and the magnetic field have to be in the same spot in x- and y-direction apparently.

Implements TRestEventProcess.

Definition at line 125 of file TRestAxionGeneratorProcess.cxx.


The documentation for this class was generated from the following files: