REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestAxionFieldPropagationProcess.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_TRestAxionFieldPropagationProcess
24 #define RestCore_TRestAxionFieldPropagationProcess
25 
26 #include "TRestAxionEvent.h"
27 #include "TRestAxionEventProcess.h"
28 #include "TRestAxionField.h"
29 #include "TRestAxionMagneticField.h"
30 #include "TRestPhysics.h"
31 #include "TVector3.h"
32 #include "TVectorD.h"
33 
36  private:
38  Double_t fBufferGasAdditionalLength = 0; //<
39 
41  Double_t fAccuracy = 0.1;
42 
44  Int_t fNumIntervals = 100;
45 
47  Int_t fQawoLevels = 20;
48 
50  TVector3 fReMap = TVector3(30, 30, 100);
51 
54 
57 
60 
61  void Initialize() override;
62 
63  public:
64  void InitProcess() override;
65 
66  RESTValue GetInputEvent() const override { return fAxionEvent; }
67  RESTValue GetOutputEvent() const override { return fAxionEvent; }
68 
69  TRestEvent* ProcessEvent(TRestEvent* eventInput) override;
70 
72  void PrintMetadata() override {
74 
75  RESTMetadata << "Integration parameters" << RESTendl;
76  RESTMetadata << "- Integration accuracy/tolerance : " << fAccuracy << RESTendl;
77  RESTMetadata << "- Max number of integration intervals : " << fNumIntervals << RESTendl;
78  RESTMetadata << "- Number of QAWO levels : " << fQawoLevels << RESTendl;
79  RESTMetadata << " " << RESTendl;
80  RESTMetadata << "Field re-mapping size : (" << fReMap.X() << ", " << fReMap.Y() << ", " << fReMap.Z()
81  << ")" << RESTendl;
82  RESTMetadata << " " << RESTendl;
83  RESTMetadata << "Buffer gas additional length : " << fBufferGasAdditionalLength * units("m") << " m"
84  << RESTendl;
85 
87  }
88 
90  const char* GetProcessName() const override { return "axionFieldPropagation"; }
91 
92  // Constructor
94  TRestAxionFieldPropagationProcess(char* cfgFileName);
95 
96  // Destructor
98 
99  ClassDefOverride(TRestAxionFieldPropagationProcess, 2);
100 };
101 #endif
A metadata class to define the gas properties used in axion search calculations.
A base class for any axion event process. Defines position, rotation and component displacement.
void BeginPrintProcess()
Pre-defined printer, can be used at the beginning in the implementation of PrintMetadata()
TRestAxionEvent * fAxionEvent
A pointer to the specific TRestAxionEvent.
void EndPrintProcess()
Adds the footer for PrintMetadata.
A process to introduce the magnetic field profile integration along the track.
Int_t fNumIntervals
Number of intervales used by the GSL integrator.
TRestEvent * ProcessEvent(TRestEvent *eventInput) override
Process one event.
void InitProcess() override
Process initialization. Data members that require initialization just before start processing should ...
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
TRestAxionField * fAxionField
A pointer to TRestAxionField that implements probability calculations.
const char * GetProcessName() const override
Returns the name of this process.
TVector3 fReMap
It will re-size the cells in the magnetic field (affecting the time required for integral computation...
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
TRestAxionBufferGas * fBufferGas
A pointer to TRestBufferGas given to TRestAxionField to perform calculations in a particular gas.
Double_t fAccuracy
The tolerance or accuracy used inside the GSL integrator.
void PrintMetadata() override
It prints out the process parameters stored in the metadata structure.
Int_t fQawoLevels
Number of levels used by the GSL integrator to parameterize the cosine integral.
Double_t fBufferGasAdditionalLength
The additional length in mm that the converted photon propagates without magnetic field.
TRestAxionMagneticField * fMagneticField
A pointer to the magnetic field description stored in TRestRun.
void Initialize() override
Function to initialize input/output event members and define the section name.
A basic class to define analytical axion-photon conversion calculations for axion helioscopes.
A class to load magnetic field maps and evaluate the field on those maps including interpolation.
A base class for any REST event.
Definition: TRestEvent.h:38
endl_t RESTendl
Termination flag object for TRestStringOutput.