REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
source
libraries
geant4
src
TRestGeant4Particle.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
#include "TRestGeant4Particle.h"
41
42
using namespace
std;
43
44
ClassImp(
TRestGeant4Particle
);
45
46
TRestGeant4Particle::TRestGeant4Particle() {
47
// TRestGeant4Particle default constructor
48
}
49
50
TRestGeant4Particle::~TRestGeant4Particle() {
51
// TRestGeant4Particle destructor
52
}
53
57
void
TRestGeant4Particle::SetParticle
(
TRestGeant4Particle
particle) {
58
fExcitationLevel = particle.GetExcitationLevel();
59
fParticleName = particle.GetParticleName();
60
fEnergy = particle.GetEnergy();
61
fDirection = particle.GetMomentumDirection();
62
fOrigin = particle.fOrigin;
63
}
64
69
void
TRestGeant4Particle::Print
()
const
{
70
std::cout <<
"Particle name : "
<< GetParticleName() << std::endl;
71
std::cout <<
"Charge : "
<< GetParticleCharge() << std::endl;
72
std::cout <<
"Energy : "
<< GetEnergy() <<
" keV"
<< std::endl;
73
std::cout <<
"Excitation level : "
<< GetExcitationLevel() << std::endl;
74
std::cout <<
"X : "
<< GetOrigin().X() <<
"mm Y : "
<< GetOrigin().Y() <<
"mm Z : "
<< GetOrigin().Z()
75
<<
"mm"
<< std::endl;
76
std::cout <<
"Px : "
<< GetMomentumDirection().X() <<
" Py : "
<< GetMomentumDirection().Y()
77
<<
" Pz : "
<< GetMomentumDirection().Z() << std::endl;
78
std::cout <<
" ---------------------- "
<< std::endl;
79
}
TRestGeant4Particle
A class used to store particle properties.
Definition:
TRestGeant4Particle.h:32
TRestGeant4Particle::SetParticle
void SetParticle(TRestGeant4Particle particle)
A copy method.
Definition:
TRestGeant4Particle.cxx:57
TRestGeant4Particle::Print
void Print() const
Prints on screen the details about the Geant4 simulation conditions, stored in TRestGeant4Metadata.
Definition:
TRestGeant4Particle.cxx:69
Generated on Thu Nov 7 2024 11:22:21 for REST-for-Physics by
1.9.1