REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestAxionGeneratorProcess.h
1/*************************************************************************
2 * This file is part of the REST software framework. *
3 * *
4 * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5 * For more information see http://gifna.unizar.es/trex *
6 * *
7 * REST is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * REST is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have a copy of the GNU General Public License along with *
18 * REST in $REST_PATH/LICENSE. *
19 * If not, see http://www.gnu.org/licenses/. *
20 * For the list of contributors see $REST_PATH/CREDITS. *
21 *************************************************************************/
22
23#ifndef RestCore_TRestAxionGeneratorProcess
24#define RestCore_TRestAxionGeneratorProcess
25
26#include "TRandom3.h"
27#include "TRestAxionEvent.h"
28#include "TRestAxionSolarFlux.h"
29#include "TRestEventProcess.h"
30
33 private:
36
39
41 Int_t fCounter = 0;
42
44 TRandom3* fRandom = nullptr;
45
47 TVector2 fAxionMassRange = TVector2(1.e-6, 1e-2); //<
48
50 Double_t fTargetRadius = 800; //<
51
53 TVector3 fTargetPosition = TVector3(0, 0, 0); //<
54
56 TString fGeneratorType = "solarFlux"; //<
57
59 Int_t fSeed = 0; //<
60
62 TVector2 fEnergyRange = TVector2(0.05, 10); //<
63
65 Double_t fTotalFlux = 0; //<
66
67 void Initialize() override;
68
69 void LoadDefaultConfig();
70
71 public:
72 RESTValue GetInputEvent() const override { return nullptr; }
73 RESTValue GetOutputEvent() const override { return fOutputAxionEvent; }
74
75 void InitProcess() override;
76 TRestEvent* ProcessEvent(TRestEvent* eventInput) override;
77
78 void PrintMetadata() override;
79
81 const char* GetProcessName() const override { return "axionGenerator"; }
82
83 TRestAxionGeneratorProcess(); // Constructor
84 ~TRestAxionGeneratorProcess(); // Destructor
85
86 ClassDefOverride(TRestAxionGeneratorProcess, 4);
87};
88#endif
An event data class to define the parameters related to an axion particle.
A process to initialize the axion event (mainly through TRestAxionSolarFlux)
TVector3 fTargetPosition
The target position in mm with regards to the sun at (0,0,-AU).
TRestAxionGeneratorProcess()
Default constructor.
TRandom3 * fRandom
Internal process random generator.
Double_t fTotalFlux
Absolute solar flux (cm-2 s-1). Required for future calculations.
TVector2 fAxionMassRange
The axion mass range in keV.
void PrintMetadata() override
Prints out relevant metadata members.
void Initialize() override
Function to initialize input/output event members and define the section name.
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.
Int_t fSeed
Seed used in random generator.
Double_t fTargetRadius
The target size in mm (or generator source extension) for the generator.
void InitProcess() override
Process initialization. Data members that require initialization just before start processing should ...
TVector2 fEnergyRange
It defines the energy range for the axion event generator. Default between 50eV and 10keV.
TRestAxionEvent * fOutputAxionEvent
A pointer to the specific TRestAxionEvent output.
Int_t fCounter
Used internally to define the event id.
const char * GetProcessName() const override
Returns the name of this process.
TString fGeneratorType
The generator type (solarFlux/flat)
TRestAxionSolarFlux * fAxionFlux
A pointer to the TRestAxionSolarFlux metadata description.
TRestEvent * ProcessEvent(TRestEvent *eventInput) override
The main processing event function.
~TRestAxionGeneratorProcess()
Default destructor.
A metadata class to load tabulated solar axion fluxes.
A base class for any REST event process.
A base class for any REST event.
Definition: TRestEvent.h:38