REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestAxionTransportProcess.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_TRestAxionTransportProcess
24#define RestCore_TRestAxionTransportProcess
25
26#include "TRestAxionEvent.h"
27#include "TRestAxionEventProcess.h"
28
31 private:
33 Double_t fZPosition; //<
34
35 void LoadDefaultConfig();
36
37 protected:
38 public:
39 void InitProcess() override;
40
41 void Initialize() override;
42
43 TRestEvent* ProcessEvent(TRestEvent* evInput) override;
44
45 void LoadConfig(std::string cfgFilename, std::string name = "");
46
48 void PrintMetadata() override {
50
51 RESTMetadata << "Moving to Z: " << fZPosition << " mm" << RESTendl;
52
54 }
55
57 const char* GetProcessName() const override { return "axionTransport"; }
58
59 // Constructor
61 TRestAxionTransportProcess(char* cfgFileName);
62
63 // Destructor
65
66 ClassDefOverride(TRestAxionTransportProcess, 1);
67};
68#endif
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 process to transport the axion to a given z-position without changing direction.
void LoadConfig(std::string cfgFilename, std::string name="")
Function to load the configuration from an external configuration file.
~TRestAxionTransportProcess()
Default destructor.
const char * GetProcessName() const override
Returns the name of this process.
void LoadDefaultConfig()
Function to load the default config in absence of RML input.
TRestAxionTransportProcess()
Default constructor.
void Initialize() override
Function to initialize input/output event members and define the section name.
Double_t fZPosition
The Z-position where we will move the particle.
void PrintMetadata() override
It prints out the process parameters stored in the metadata structure.
TRestEvent * ProcessEvent(TRestEvent *evInput) override
The main processing event function.
void InitProcess() override
Process initialization. Data members that require initialization just before start processing should ...
A base class for any REST event.
Definition: TRestEvent.h:38
endl_t RESTendl
Termination flag object for TRestStringOutput.