REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestAxionMCPLOptics.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 _TRestAxionMCPLOptics
24#define _TRestAxionMCPLOptics
25
26#include <TRestAxionOptics.h>
27
28#include <iostream>
29
32 private:
33 void Initialize() override;
34
36 std::string fInputMCPLFilename;
37
40
41 Int_t FirstMirrorReflection(const TVector3& pos, const TVector3& dir) override { return 0; }
42 Int_t SecondMirrorReflection(const TVector3& pos, const TVector3& dir) override { return 0; }
43
44 public:
45 void PrintMetadata() override;
46
47 void InitFromConfigFile() override;
48
50 Double_t GetEntrancePositionZ() override { return 0; }
51
53 Double_t GetExitPositionZ() override { return 0; }
54
56 std::pair<Double_t, Double_t> GetRadialLimits() override {
57 std::pair<Double_t, Double_t> result(0, 0);
58 return result;
59 }
60
61 void SetMirror() override { fCurrentMirror = -1; }
62
63 TPad* DrawMirrors() override;
64
66 TRestAxionMCPLOptics(const char* cfgFileName, std::string name = "");
68
69 ClassDefOverride(TRestAxionMCPLOptics, 1);
70};
71#endif
A class to load optics response using MCPL files.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestAxionMCPLOptics.
Double_t GetExitPositionZ() override
It returns the exit Z-position defined by the optical axis.
std::string fInputMCPLFilename
The file containing the input particle list.
~TRestAxionMCPLOptics()
Default destructor.
void SetMirror() override
It must be implemented at the inherited optics, making use of fEntrancePosition.
std::pair< Double_t, Double_t > GetRadialLimits() override
It returns the radial limits at the entrance of the optics.
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.
Double_t GetEntrancePositionZ() override
It returns the entrance Z-position defined by the optical axis.
Int_t SecondMirrorReflection(const TVector3 &pos, const TVector3 &dir) override
It updates the values fSecondInteractionPosition and fExitDirection. Returns 0 if is not in region.
Int_t FirstMirrorReflection(const TVector3 &pos, const TVector3 &dir) override
It updates the values fFirstInteractionPosition and fMiddleDirection. Returns 0 if is not in region.
An abstract class to define common optics parameters and methods.
Int_t fCurrentMirror
During the photon propagation it keeps track of the active mirror shell.