REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestAxionMCPLOptics.cxx
1/******************** REST disclaimer ***********************************
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
64
65#include "TRestAxionMCPLOptics.h"
66
67using namespace std;
68
69#include "TRestPhysics.h"
70using namespace REST_Physics;
71
72ClassImp(TRestAxionMCPLOptics);
73
78
93TRestAxionMCPLOptics::TRestAxionMCPLOptics(const char* cfgFileName, string name)
94 : TRestAxionOptics(cfgFileName) {
95 RESTDebug << "Entering TRestAxionMCPLOptics constructor( cfgFileName, name )" << RESTendl;
96
97 Initialize();
98
100
102}
103
108
114
115 SetSectionName(this->ClassName());
116 SetLibraryVersion(LIBRARY_VERSION);
117}
118
124
125 fInputMCPLFilename = GetParameter("inputMCPLFilename", "none");
126 fOutputMCPLFilename = GetParameter("outputMCPLFilename", "none");
127
128 // If we recover the metadata class from ROOT file we will need to call Initialize ourselves
129 this->Initialize();
130}
131
137
138 RESTMetadata << "---------" << RESTendl;
139 RESTMetadata << "Input MCPL file: " << fInputMCPLFilename << RESTendl;
140 RESTMetadata << "Output MCPL file: " << fOutputMCPLFilename << RESTendl;
141 RESTMetadata << "+++++++++++++++++++++++++++++++++++++++++++++++++" << RESTendl;
142}
143
148 // TO BE implemented. If not, it just creates an empty drawing pad
149
151}
A class to load optics response using MCPL files.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestAxionMCPLOptics.
std::string fInputMCPLFilename
The file containing the input particle list.
~TRestAxionMCPLOptics()
Default destructor.
void Initialize() override
Initialization of TRestAxionMCPLOptics members.
TRestAxionMCPLOptics()
Default constructor.
TPad * DrawMirrors() override
A method to draw the mirrors.
void InitFromConfigFile() override
Initialization of TRestAxionMCPLOptics field members through a RML file.
std::string fOutputMCPLFilename
The file containing the output particle list.
An abstract class to define common optics parameters and methods.
virtual void Initialize()
Initialization of TRestAxionOptics members.
TPad * CreatePad(Int_t nx=1, Int_t ny=1)
A prototype method to be implemented by specific optics to draw an schematic including the mirrors ge...
void InitFromConfigFile()
Initialization of TRestAxionOptics field members through a RML file.
void PrintMetadata()
Prints on screen the information about the metadata members of TRestAxionOptics.
endl_t RESTendl
Termination flag object for TRestStringOutput.
Int_t LoadConfigFromFile(const std::string &configFilename, const std::string &sectionName="")
Give the file name, find out the corresponding section. Then call the main starter.
void SetLibraryVersion(TString version)
Set the library version of this metadata class.
TRestStringOutput::REST_Verbose_Level GetVerboseLevel()
returns the verboselevel in type of REST_Verbose_Level enumerator
void SetSectionName(std::string sName)
set the section name, clear the section content
std::string fConfigFileName
Full name of the rml file.
std::string GetParameter(std::string parName, TiXmlElement *e, TString defaultValue=PARAMETER_NOT_FOUND_STR)
Returns the value for the parameter named parName in the given section.
@ REST_Info
+show most of the information for each steps
This namespace serves to define physics constants and other basic physical operations.
Definition: TRestPhysics.h:34