ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ALFA_BeamTrack Class Reference

#include <ALFA_BeamTrack.h>

Collaboration diagram for ALFA_BeamTrack:

Public Member Functions

 ALFA_BeamTrack ()
 
 ~ALFA_BeamTrack ()
 
int initialize (const FPConfig &ConfigValues)
 
int CalculatePosRP (FPTracker::Particle particle)
 calculates the particle position and momentum at RP run first CalculatePosRP() then posRP() and momRP() More...
 
const FPTracker::PointPosRP ()
 Gives Back Position. More...
 
const FPTracker::PointMomRP ()
 gives back Momentum More...
 

Private Attributes

std::string m_ConfDir
 
FPTracker::ConfigData m_ConfigData
 
bool m_AlfaTwiss
 
int m_ip
 
int m_Magver
 
FPTracker::Side m_Side
 
std::shared_ptr< std::ifstream > m_Magfile
 
FPTracker::Point m_PosParticleRP
 
FPTracker::Point m_MomParticleRP
 
FPTracker::Beamline m_Beamline_1
 
FPTracker::Beamline m_Beamline_2
 

Detailed Description

Definition at line 28 of file ALFA_BeamTrack.h.

Constructor & Destructor Documentation

◆ ALFA_BeamTrack()

ALFA_BeamTrack::ALFA_BeamTrack ( )

Definition at line 28 of file ALFA_BeamTrack.cxx.

29 {
30 
31  //initialisation with standart values
32 
33  //declareProperty("ConfDir", m_ConfDir= "./config");
34  /*m_ConfDir= ...
35  m_AlfaTwiss = ...*/
36 
37  m_AlfaTwiss=true;
38  m_ip = 1;
39  m_Magver = 3;
41 
42 
43 }

◆ ~ALFA_BeamTrack()

ALFA_BeamTrack::~ALFA_BeamTrack ( )

Definition at line 46 of file ALFA_BeamTrack.cxx.

47 {
48 }

Member Function Documentation

◆ CalculatePosRP()

int ALFA_BeamTrack::CalculatePosRP ( FPTracker::Particle  particle)

calculates the particle position and momentum at RP run first CalculatePosRP() then posRP() and momRP()

Definition at line 139 of file ALFA_BeamTrack.cxx.

139  {
140 
142  FPTracker::Point lost_markerMom(-99,-99,-99);
143 
144 
145  std::cout<<"fpTracker: "<<Particle<<std::endl;
147  std::cout<<"fpTracker: "<<Particle<<std::endl;
148 
149  //m_PosParticleRP=Particle.position(); //old version vith 97mm shift
150  m_PosParticleRP=Particle.positionRelBeam();//version without shift
151 
152  FPTracker::Point momentum( Particle.direction().x()*Particle.momentum(),
153  Particle.direction().y()*Particle.momentum(),
154  Particle.direction().z()*Particle.momentum());
155 
157 
158 
159  if(Particle.isOutOfAperture())
160  {
161  //FPTracker::Point lost_markerPos(-99,-99,Particle.position().z());// old version with shift
162  FPTracker::Point lost_markerPos(-99,-99,Particle.positionRelBeam().z());
163  std::cout<<"Particle got lost"<<std::endl;
164  //m_PosParticleRP=lost_marker;
165  //write lost particle with -99 as maker in x and yposition z position ist the place where particle got lost
166  m_PosParticleRP=lost_markerPos;
167 
168  m_MomParticleRP=lost_markerMom;
169  }
170 
171 
172  return true;
173 }

◆ initialize()

int ALFA_BeamTrack::initialize ( const FPConfig ConfigValues)

Definition at line 50 of file ALFA_BeamTrack.cxx.

50  {
51 
52  m_ConfDir= ConfigValues.ConfDir;
53  m_AlfaTwiss = ConfigValues.UseALFA;
54 
55 
56  //initialisation of beampipes
57  if (m_AlfaTwiss) {std::cout<<"Will use alfa twiss files"<<std::endl;}
58 
59 
60  /*
61 
62  boost::shared_ptr< std::ifstream > p_confFile;
63  p_confFile = FPTracker::getConfigFile(m_ConfDir, "FPData.txt") ;
64  m_ConfigData = FPTracker::readConfigData(p_confFile);
65 
66  //SetPosition of RP in meter
67 
68  //m_ConfigData.setPlane(ConfigValues.RPDistance);
69 
70 
71  ConfigData configData;
72  if( !readConfigData(p_confFile, configData) )
73  {
74  std::cout<<"fatal error reading config data\n";
75  return 1;
76  }
77 
78 
79  */
80 
81  //Set Configuration parameters of FPTracker library
82  FPTracker::ConfigData ConfigData;
83 
84 
85  ConfigData.IP=ConfigValues.IP;
86  ConfigData.useaper=ConfigValues.useaper;
87  ConfigData.apermb=ConfigValues.apermb;
88  ConfigData.xcol1=ConfigValues.xcol1;
89  ConfigData.xcol2=ConfigValues.xcol2;
90  ConfigData.absZMagMax=ConfigValues.absZMagMax;
91  ConfigData.endMarker=ConfigValues.RPDistance;
92  ConfigData.setpbeam(ConfigValues.pbeam0);
93 
94  /*
95  std::cout<<ConfigData.IP<<std::endl;
96  std::cout<<ConfigData.useaper<<std::endl;
97  std::cout<<ConfigData.apermb<<std::endl;
98  std::cout<<ConfigData.xcol1<<std::endl;
99  std::cout<<ConfigData.xcol2<<std::endl;
100  std::cout<<ConfigData.absZMagMax<<std::endl;
101  std::cout<<ConfigData.endMarker<<std::endl;
102  std::cout<<ConfigData.pbeam0<<std::endl;
103  std::cout<<ConfigData.brho<<std::endl;*/
104 
105 
106 
107 
108 
109 
110 
111 
112 
113  m_ip = ConfigData.IP;
114  m_Magver = 3;
115 
121  std::cout<<" beamline_1 start "<<'\n';
122  std::cout<<m_Beamline_1;
123  std::cout<<" beamline_1 end "<<"\n\n";
124 
130 
131  std::cout<<" beamline_2 start "<<'\n';
132  std::cout<<m_Beamline_2;
133  std::cout<<" beamline_2 end "<<"\n\n";
134 
135  return true;
136 }

◆ MomRP()

const FPTracker::Point & ALFA_BeamTrack::MomRP ( )

gives back Momentum

Definition at line 181 of file ALFA_BeamTrack.cxx.

181  {
182  return m_MomParticleRP;
183 }

◆ PosRP()

const FPTracker::Point & ALFA_BeamTrack::PosRP ( )

Gives Back Position.

Definition at line 176 of file ALFA_BeamTrack.cxx.

176  {
177  return m_PosParticleRP;
178 }

Member Data Documentation

◆ m_AlfaTwiss

bool ALFA_BeamTrack::m_AlfaTwiss
private

Definition at line 51 of file ALFA_BeamTrack.h.

◆ m_Beamline_1

FPTracker::Beamline ALFA_BeamTrack::m_Beamline_1
private

Definition at line 62 of file ALFA_BeamTrack.h.

◆ m_Beamline_2

FPTracker::Beamline ALFA_BeamTrack::m_Beamline_2
private

Definition at line 63 of file ALFA_BeamTrack.h.

◆ m_ConfDir

std::string ALFA_BeamTrack::m_ConfDir
private

Definition at line 49 of file ALFA_BeamTrack.h.

◆ m_ConfigData

FPTracker::ConfigData ALFA_BeamTrack::m_ConfigData
private

Definition at line 50 of file ALFA_BeamTrack.h.

◆ m_ip

int ALFA_BeamTrack::m_ip
private

Definition at line 52 of file ALFA_BeamTrack.h.

◆ m_Magfile

std::shared_ptr< std::ifstream > ALFA_BeamTrack::m_Magfile
private

Definition at line 56 of file ALFA_BeamTrack.h.

◆ m_Magver

int ALFA_BeamTrack::m_Magver
private

Definition at line 53 of file ALFA_BeamTrack.h.

◆ m_MomParticleRP

FPTracker::Point ALFA_BeamTrack::m_MomParticleRP
private

Definition at line 60 of file ALFA_BeamTrack.h.

◆ m_PosParticleRP

FPTracker::Point ALFA_BeamTrack::m_PosParticleRP
private

Definition at line 59 of file ALFA_BeamTrack.h.

◆ m_Side

FPTracker::Side ALFA_BeamTrack::m_Side
private

Definition at line 55 of file ALFA_BeamTrack.h.


The documentation for this class was generated from the following files:
FPConfig::IP
int IP
Definition: ALFA_FPConfig.h:17
FPConfig::UseALFA
bool UseALFA
Definition: ALFA_FPConfig.h:12
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
ALFA_BeamTrack::m_ip
int m_ip
Definition: ALFA_BeamTrack.h:52
FPTracker::ConfigData::useaper
bool useaper
Definition: FPTracker/FPTracker/ConfigData.h:14
FPConfig::ConfDir
std::string ConfDir
Definition: ALFA_FPConfig.h:13
ALFA_BeamTrack::m_ConfDir
std::string m_ConfDir
Definition: ALFA_BeamTrack.h:49
ALFA_BeamTrack::m_Beamline_1
FPTracker::Beamline m_Beamline_1
Definition: ALFA_BeamTrack.h:62
ALFA_BeamTrack::m_PosParticleRP
FPTracker::Point m_PosParticleRP
Definition: ALFA_BeamTrack.h:59
ALFA_BeamTrack::m_MomParticleRP
FPTracker::Point m_MomParticleRP
Definition: ALFA_BeamTrack.h:60
FPTracker::setupBeamline
Beamline setupBeamline(const ConfigData &, const Side &, int magver, std::shared_ptr< std::ifstream >)
Definition: setupBeamline.cxx:27
xAOD::Particle
Particle_v1 Particle
Define the latest version of the particle class.
Definition: Event/xAOD/xAODParticleEvent/xAODParticleEvent/Particle.h:17
FPTracker::ConfigData::xcol1
double xcol1
Definition: FPTracker/FPTracker/ConfigData.h:16
FPTracker::beam1
@ beam1
Definition: FPTrackerConstants.h:12
FPTracker::ConfigData::xcol2
double xcol2
Definition: FPTracker/FPTracker/ConfigData.h:17
FPConfig::xcol2
double xcol2
Definition: ALFA_FPConfig.h:22
FPTracker::ConfigData::absZMagMax
float absZMagMax
Definition: FPTracker/FPTracker/ConfigData.h:23
ALFA_BeamTrack::m_AlfaTwiss
bool m_AlfaTwiss
Definition: ALFA_BeamTrack.h:51
FPConfig::apermb
double apermb
Definition: ALFA_FPConfig.h:20
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
FPTracker::beam2
@ beam2
Definition: FPTrackerConstants.h:12
FPConfig::xcol1
double xcol1
Definition: ALFA_FPConfig.h:21
FPTracker::Beamline::track
void track(IParticle &) const
Definition: FPTracker/src/Beamline.cxx:94
ALFA_BeamTrack::m_Magfile
std::shared_ptr< std::ifstream > m_Magfile
Definition: ALFA_BeamTrack.h:56
FPConfig::absZMagMax
float absZMagMax
Definition: ALFA_FPConfig.h:28
FPTracker::Particle
Definition: ForwardDetectors/FPTracker/FPTracker/Particle.h:19
FPConfig::RPDistance
float RPDistance
Definition: ALFA_FPConfig.h:25
ALFA_BeamTrack::m_Magver
int m_Magver
Definition: ALFA_BeamTrack.h:53
FPTracker::ConfigData::endMarker
float endMarker
Definition: FPTracker/FPTracker/ConfigData.h:21
FPTracker::Point
Definition: FPTracker/FPTracker/Point.h:14
FPTracker::getMagnetConfigFiles
std::shared_ptr< std::ifstream > getMagnetConfigFiles(const std::string &dir, int IP, int magVer, const Side &side)
Definition: getMagnetConfigFiles.cxx:51
FPTracker::ConfigData::setpbeam
void setpbeam(double)
Definition: FPTracker/src/ConfigData.cxx:37
FPTracker::getAlfaMagnetConfigFiles
std::shared_ptr< std::ifstream > getAlfaMagnetConfigFiles(const std::string &dir, const Side &side)
Definition: getAlfaMagnetConfigFiles.cxx:14
FPConfig::pbeam0
double pbeam0
Definition: ALFA_FPConfig.h:23
FPConfig::useaper
bool useaper
Definition: ALFA_FPConfig.h:19
ALFA_BeamTrack::m_Beamline_2
FPTracker::Beamline m_Beamline_2
Definition: ALFA_BeamTrack.h:63
ALFA_BeamTrack::m_Side
FPTracker::Side m_Side
Definition: ALFA_BeamTrack.h:55
FPTracker::ConfigData
Definition: FPTracker/FPTracker/ConfigData.h:9
FPTracker
Definition: FPTracker/FPTracker/Beamline.h:12
FPTracker::ConfigData::apermb
double apermb
Definition: FPTracker/FPTracker/ConfigData.h:15
FPTracker::ConfigData::IP
int IP
Definition: FPTracker/FPTracker/ConfigData.h:12