ACTARSim
ACTAR TPC Simulation Reference Guide
ActarSimBeamInfo.cc
Go to the documentation of this file.
1 // - AUTHOR: Hector Alvarez-Pol 01/2006
2 /******************************************************************
3  * Copyright (C) 2005-2016, Hector Alvarez-Pol *
4  * All rights reserved. *
5  * *
6  * License according to GNU LESSER GPL (see lgpl-3.0.txt). *
7  * For the list of contributors see CREDITS. *
8  ******************************************************************/
9 //////////////////////////////////////////////////////////////////
10 /// \class ActarSimBeamInfo
11 /// The information from the beam parameters at the entrance of
12 /// the gas chamber and at the reaction vertex. All data members
13 /// are accesible in the branch beamInfo of The_Event_Tree,
14 /// except status which is for internal use.
15 //////////////////////////////////////////////////////////////////
16 
17 #include "ActarSimBeamInfo.hh"
18 #include "G4ThreeVector.hh"
19 #include "G4PhysicalConstants.hh"
20 #include "G4SystemOfUnits.hh"
21 
23 
24 //////////////////////////////////////////////////////////////////
25 /// Constructor: initialize all variables
27  energyEntrance = 0.; // Energy at the entrance
28  energyVertex = 0.; // Energy at the vertex
29  thetaEntrance = 0.; // theta emission angle
30  phiEntrance = 0.; // phi emission angle
31  thetaVertex = 0.; // theta vertex angle
32  phiVertex = 0.; // phi vertex angle
33  xEntrance = 0. ; // beam entrance position
34  yEntrance = 0.;
35  zEntrance = 0.;
36  xVertex = 0.; // reaction vertex position
37  yVertex = 0.;
38  zVertex = 0.;
39  timeVertex = 0.; // time at vertex formation
40  mass = 0.0; // mass
41  charge = 0.0; // charge
42  eventID = 0; // eventID
43  runID = 0; // runID
44  status = 0; // status
45 }
46 
47 //////////////////////////////////////////////////////////////////
48 /// Destructor (makes nothing)
50 }
51 
52 //////////////////////////////////////////////////////////////////
53 /// Prints the complete state of the class members
55  G4cout << "-------------------------------------------" << G4endl;
56  G4cout << "------- ActarSimBeamInfo::print() ---------" << G4endl;
57  G4cout << "-------------------------------------------" << G4endl;
58  G4cout << " Energy at the chamber entrance: " << energyEntrance/MeV << " MeV" << G4endl;
59  G4cout << " Energy at the reaction vertex: " << energyVertex/MeV << " MeV" << G4endl;
60  G4cout << " Parameters (emmitance) at the chamber entrance: " << G4endl;
61  G4cout << " xEntrance: " << xEntrance / mm << " mm"
62  << " yEntrance: " << yEntrance / mm << " mm"
63  << " zEntrance: " << zEntrance / mm << " mm"<< G4endl;
64  G4cout << " thetaEntrance: " << thetaEntrance / rad << " rad"
65  << " phiEntrance: " << phiEntrance / rad << " rad"<< G4endl;
66  G4cout << " Position at the reaction vertex: " << G4endl;
67  G4cout << " xVertex: " << xVertex / mm << " mm"
68  << " yVertex: " << yVertex / mm << " mm"
69  << " zVertex: " << zVertex / mm << " mm"<< G4endl;
70  G4cout << " thetaVertex: " << thetaVertex / rad << " rad"
71  << " phiVertex: " << phiVertex / rad << " rad"<< G4endl;
72  G4cout << " Time at the reaction vertex: " << timeVertex/ns << " ns" << G4endl;
73  G4cout << " Mass: " << mass
74  << ", charge: " << charge / eplus << " eplus" << G4endl;
75  G4cout << " Status : " << status << G4endl;
76  G4cout << "-------------------------------------------" << G4endl;
77 }
78 
79 //////////////////////////////////////////////////////////////////
80 /// Sets the position at entrance of the chamber
81 void ActarSimBeamInfo::SetPositionEntrance(Double_t x, Double_t y, Double_t z) {
82  xEntrance = x;
83  yEntrance = y;
84  zEntrance = z;
85 }
86 
87 //////////////////////////////////////////////////////////////////
88 /// Sets the position of the reaction vertex
89 void ActarSimBeamInfo::SetPositionVertex(Double_t x, Double_t y, Double_t z) {
90  xVertex = x;
91  yVertex = y;
92  zVertex = z;
93 }
94 
95 //////////////////////////////////////////////////////////////////
96 /// Sets the angles at entrance
97 void ActarSimBeamInfo::SetAnglesEntrance(Double_t angleTheta, Double_t anglePhi){
98  thetaEntrance = angleTheta;
99  phiEntrance = anglePhi;
100 }
101 
102 //////////////////////////////////////////////////////////////////
103 /// Sets the angles at vertex
104 void ActarSimBeamInfo::SetAnglesVertex(Double_t angleTheta, Double_t anglePhi){
105  thetaEntrance = angleTheta;
106  phiEntrance = anglePhi;
107 }
Double_t energyEntrance
Energy at the gas chamber entrance.
ClassImp(ActarSimBeamInfo) ActarSimBeamInfo
Constructor: initialize all variables.
Double_t xEntrance
X beam at entrance position.
Double_t phiVertex
Phi vertex angle at the reaction vertex.
Double_t thetaEntrance
Theta emission angle at entrance.
~ActarSimBeamInfo()
Destructor (makes nothing)
Double_t thetaVertex
Theta vertex angle at the reaction vertex.
Double_t timeVertex
Time at reaction vertex postion.
Double_t phiEntrance
Phi emission angle at entrance.
void SetAnglesVertex(Double_t, Double_t)
Sets the angles at vertex.
Double_t charge
Charge of beam.
Double_t zEntrance
Z beam at entrance position.
void SetPositionVertex(Double_t, Double_t, Double_t)
Sets the position of the reaction vertex.
void SetAnglesEntrance(Double_t, Double_t)
Sets the angles at entrance.
Double_t yEntrance
Y beam at entrance position.
void SetPositionEntrance(Double_t, Double_t, Double_t)
Sets the position at entrance of the chamber.
Double_t yVertex
Y beam at reaction vertex position.
void print(void)
Prints the complete state of the class members.
Double_t energyVertex
Energy at the reaction vertex.
Double_t zVertex
Z beam at reaction vertex position.
Double_t xVertex
X beam at reaction vertex position.
Double_t mass
Mass of beam.