REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestAxionDeviationProcess.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_TRestAxionDeviationProcess
24#define RestCore_TRestAxionDeviationProcess
25
26#include "TRandom3.h"
27#include "TRestAxionEvent.h"
28#include "TRestAxionEventProcess.h"
29
32 private:
34 Double_t fDevAngle = 0; //<
35
37 Int_t fSeed = 0; //<
38
40 TRandom3* fRandom = nullptr;
41
42 void LoadDefaultConfig();
43
44 protected:
45 public:
46 void InitProcess() override;
47
48 void Initialize() override;
49
50 TRestEvent* ProcessEvent(TRestEvent* evInput) override;
51
52 void LoadConfig(std::string cfgFilename, std::string name = "");
53
55 void PrintMetadata() override {
57
58 RESTMetadata << "Cone directrix angle: " << fDevAngle * units("degrees") << " degrees" << RESTendl;
59
61 }
62
64 const char* GetProcessName() const override { return "axionDeviation"; }
65
66 // Constructor
68 TRestAxionDeviationProcess(char* cfgFileName);
69
70 // Destructor
72
73 ClassDefOverride(TRestAxionDeviationProcess, 1);
74};
75#endif
A process to deviate the axion direction by a given yaw and pitch angle distributions.
const char * GetProcessName() const override
Returns the name of this process.
Int_t fSeed
Seed used in random generator.
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.
void PrintMetadata() override
It prints out the process parameters stored in the metadata structure.
TRandom3 * fRandom
Internal process random generator.
Double_t fDevAngle
The angle that defines the cone directrix that defines the maximum deviation.
TRestAxionDeviationProcess()
Default constructor.
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()
void EndPrintProcess()
Adds the footer for PrintMetadata.
A base class for any REST event.
Definition: TRestEvent.h:38
endl_t RESTendl
Termination flag object for TRestStringOutput.