REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestAxionEventProcess.cxx
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
40
41#include "TRestAxionEventProcess.h"
42
43using namespace std;
44
46
51
56
66
68 RESTDebug << "BoEP: Initial Position. X: " << fAxionEvent->GetPosition().X()
69 << " Y: " << fAxionEvent->GetPosition().Y() << " Z: " << fAxionEvent->GetPosition().Z()
70 << RESTendl;
71 RESTDebug << "BoEP: Initial Direction. X: " << fAxionEvent->GetDirection().X()
72 << " Y: " << fAxionEvent->GetDirection().Y() << " Z: " << fAxionEvent->GetDirection().Z()
73 << RESTendl;
76 fAxionEvent->Translate(TVector3(-fPosition.X(), -fPosition.Y(), -fPosition.Z()));
77 RESTDebug << " ---- " << RESTendl;
78 RESTDebug << "BoEP: Final Position. X: " << fAxionEvent->GetPosition().X()
79 << " Y: " << fAxionEvent->GetPosition().Y() << " Z: " << fAxionEvent->GetPosition().Z()
80 << RESTendl;
81 RESTDebug << "BoEP: Final Direction. X: " << fAxionEvent->GetDirection().X()
82 << " Y: " << fAxionEvent->GetDirection().Y() << " Z: " << fAxionEvent->GetDirection().Z()
83 << RESTendl;
84 RESTDebug << " ++++ " << RESTendl;
85}
86
93
94 RESTDebug << "EoEP: Initial Position. X: " << fAxionEvent->GetPosition().X()
95 << " Y: " << fAxionEvent->GetPosition().Y() << " Z: " << fAxionEvent->GetPosition().Z()
96 << RESTendl;
97 RESTDebug << "EoEP: Initial Direction. X: " << fAxionEvent->GetDirection().X()
98 << " Y: " << fAxionEvent->GetDirection().Y() << " Z: " << fAxionEvent->GetDirection().Z()
99 << RESTendl;
100 RESTDebug << " ---- " << RESTendl;
101 fAxionEvent->Translate(TVector3(fPosition.X(), fPosition.Y(), fPosition.Z()));
102 if (fLocalAxis) {
105 }
106 RESTDebug << "EoEP: Final Position. X: " << fAxionEvent->GetPosition().X()
107 << " Y: " << fAxionEvent->GetPosition().Y() << " Z: " << fAxionEvent->GetPosition().Z()
108 << RESTendl;
109 RESTDebug << "EoEP: Final Direction. X: " << fAxionEvent->GetDirection().X()
110 << " Y: " << fAxionEvent->GetDirection().Y() << " Z: " << fAxionEvent->GetDirection().Z()
111 << RESTendl;
112 RESTDebug << " ++++ " << RESTendl;
113}
114
123
124 RESTMetadata << "Position: (" << fPosition.X() << ", " << fPosition.Y() << ", " << fPosition.Z() << ") mm"
125 << RESTendl;
126 RESTMetadata << " " << RESTendl;
127 RESTMetadata << "Internal Yaw angle (Y-axis): " << fInternalYaw * units("degrees") << " degrees"
128 << RESTendl;
129 RESTMetadata << "Internal Pitch angle (X-axis): " << fInternalPitch * units("degrees") << " degrees"
130 << RESTendl;
131 RESTMetadata << " " << RESTendl;
132 RESTMetadata << "External rotation center: (" << fExternalRotationCenter.X() << ", "
133 << fExternalRotationCenter.Y() << ", " << fExternalRotationCenter.Z() << ") mm" << RESTendl;
134 RESTMetadata << "External Yaw angle (Y-axis): " << fExternalYaw * units("degrees") << " degrees"
135 << RESTendl;
136 RESTMetadata << "External Pitch angle (X-axis): " << fExternalPitch * units("degrees") << " degrees"
137 << RESTendl;
138 RESTMetadata << " " << RESTendl;
139 if (fLocalAxis)
140 RESTMetadata << "Local axis is true " << RESTendl;
141 else
142 RESTMetadata << "Universal axis is true " << RESTendl;
143 RESTMetadata << " --------------------------- " << RESTendl;
144 RESTMetadata << " " << RESTendl;
145}
146
150void TRestAxionEventProcess::EndPrintProcess() { TRestEventProcess::EndPrintProcess(); }
A base class for any axion event process. Defines position, rotation and component displacement.
Bool_t fLocalAxis
If enabled it skips the end rotation that recovers the original axion trajectory direction.
Double_t fInternalYaw
The rotation angle with respect to the Y-axis.
TVector3 fExternalRotationCenter
The position (different than the center of the object) around which the rotation will be applied.
Double_t fInternalPitch
The rotation angle with respect to X-axis.
Double_t fExternalPitch
The rotation angle around CenterSetup with respect to X-axis.
void BeginPrintProcess()
Pre-defined printer, can be used at the beginning in the implementation of PrintMetadata()
TRestAxionEvent * fAxionEvent
A pointer to the specific TRestAxionEvent.
Double_t fExternalYaw
The rotation angle around CenterSetup with respect to the Y-axis.
virtual void EndOfEventProcess(TRestEvent *evInput=nullptr) override
End of event process. Called directly after ProcessEvent()
TVector3 fPosition
The position of the component around which the rotation will be applied.
virtual void BeginOfEventProcess(TRestEvent *evInput=nullptr) override
Begin of event process, preparation work. Called right before ProcessEvent()
void EndPrintProcess()
Adds the footer for PrintMetadata.
An event data class to define the parameters related to an axion particle.
void RotateXY(const TVector3 &center, Double_t pitch, Double_t yaw)
This method will produce a rotation respect to a center given by argument. First we rotate the partic...
void RotateYX(const TVector3 &center, Double_t yaw, Double_t pitch)
This method will produce a rotation respect to a center given by argument. First we rotate the partic...
TVector3 GetPosition()
It keeps track of efficiency introduced at different helioscope components.
void Translate(const TVector3 &delta)
This method will produce a tranlation of the axion position by an amount delta.
virtual void EndOfEventProcess(TRestEvent *inputEvent=nullptr)
End of event process. Nothing to do. Called directly after ProcessEvent()
void BeginPrintProcess()
[name, cut range]
virtual void BeginOfEventProcess(TRestEvent *inputEvent=nullptr)
Begin of event process, preparation work. Called right before ProcessEvent()
A base class for any REST event.
Definition: TRestEvent.h:38
endl_t RESTendl
Termination flag object for TRestStringOutput.