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 ()=default
 
 ~ALFA_BeamTrack ()=default
 
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 {true}
 
int m_ip {1}
 
int m_Magver {3}
 
FPTracker::Side m_Side {FPTracker::beam1}
 
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 ( )
default

◆ ~ALFA_BeamTrack()

ALFA_BeamTrack::~ALFA_BeamTrack ( )
default

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 117 of file ALFA_BeamTrack.cxx.

117  {
118 
120  FPTracker::Point lost_markerMom(-99,-99,-99);
121 
122 
123  std::cout<<"fpTracker: "<<Particle<<std::endl;
125  std::cout<<"fpTracker: "<<Particle<<std::endl;
126 
127  //m_PosParticleRP=Particle.position(); //old version vith 97mm shift
128  m_PosParticleRP=Particle.positionRelBeam();//version without shift
129 
130  FPTracker::Point momentum( Particle.direction().x()*Particle.momentum(),
131  Particle.direction().y()*Particle.momentum(),
132  Particle.direction().z()*Particle.momentum());
133 
135 
136 
137  if(Particle.isOutOfAperture())
138  {
139  //FPTracker::Point lost_markerPos(-99,-99,Particle.position().z());// old version with shift
140  FPTracker::Point lost_markerPos(-99,-99,Particle.positionRelBeam().z());
141  std::cout<<"Particle got lost"<<std::endl;
142  //m_PosParticleRP=lost_marker;
143  //write lost particle with -99 as maker in x and yposition z position ist the place where particle got lost
144  m_PosParticleRP=lost_markerPos;
145 
146  m_MomParticleRP=lost_markerMom;
147  }
148 
149 
150  return true;
151 }

◆ initialize()

int ALFA_BeamTrack::initialize ( const FPConfig ConfigValues)

Definition at line 28 of file ALFA_BeamTrack.cxx.

28  {
29 
30  m_ConfDir= ConfigValues.ConfDir;
31  m_AlfaTwiss = ConfigValues.UseALFA;
32 
33 
34  //initialisation of beampipes
35  if (m_AlfaTwiss) {std::cout<<"Will use alfa twiss files"<<std::endl;}
36 
37 
38  /*
39 
40  boost::shared_ptr< std::ifstream > p_confFile;
41  p_confFile = FPTracker::getConfigFile(m_ConfDir, "FPData.txt") ;
42  m_ConfigData = FPTracker::readConfigData(p_confFile);
43 
44  //SetPosition of RP in meter
45 
46  //m_ConfigData.setPlane(ConfigValues.RPDistance);
47 
48 
49  ConfigData configData;
50  if( !readConfigData(p_confFile, configData) )
51  {
52  std::cout<<"fatal error reading config data\n";
53  return 1;
54  }
55 
56 
57  */
58 
59  //Set Configuration parameters of FPTracker library
60  FPTracker::ConfigData ConfigData;
61 
62 
63  ConfigData.IP=ConfigValues.IP;
64  ConfigData.useaper=ConfigValues.useaper;
65  ConfigData.apermb=ConfigValues.apermb;
66  ConfigData.xcol1=ConfigValues.xcol1;
67  ConfigData.xcol2=ConfigValues.xcol2;
68  ConfigData.absZMagMax=ConfigValues.absZMagMax;
69  ConfigData.endMarker=ConfigValues.RPDistance;
70  ConfigData.setpbeam(ConfigValues.pbeam0);
71 
72  /*
73  std::cout<<ConfigData.IP<<std::endl;
74  std::cout<<ConfigData.useaper<<std::endl;
75  std::cout<<ConfigData.apermb<<std::endl;
76  std::cout<<ConfigData.xcol1<<std::endl;
77  std::cout<<ConfigData.xcol2<<std::endl;
78  std::cout<<ConfigData.absZMagMax<<std::endl;
79  std::cout<<ConfigData.endMarker<<std::endl;
80  std::cout<<ConfigData.pbeam0<<std::endl;
81  std::cout<<ConfigData.brho<<std::endl;*/
82 
83 
84 
85 
86 
87 
88 
89 
90 
91  m_ip = ConfigData.IP;
92  m_Magver = 3;
93 
99  std::cout<<" beamline_1 start "<<'\n';
100  std::cout<<m_Beamline_1;
101  std::cout<<" beamline_1 end "<<"\n\n";
102 
108 
109  std::cout<<" beamline_2 start "<<'\n';
110  std::cout<<m_Beamline_2;
111  std::cout<<" beamline_2 end "<<"\n\n";
112 
113  return true;
114 }

◆ MomRP()

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

gives back Momentum

Definition at line 159 of file ALFA_BeamTrack.cxx.

159  {
160  return m_MomParticleRP;
161 }

◆ PosRP()

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

Gives Back Position.

Definition at line 154 of file ALFA_BeamTrack.cxx.

154  {
155  return m_PosParticleRP;
156 }

Member Data Documentation

◆ m_AlfaTwiss

bool ALFA_BeamTrack::m_AlfaTwiss {true}
private

Definition at line 49 of file ALFA_BeamTrack.h.

◆ m_Beamline_1

FPTracker::Beamline ALFA_BeamTrack::m_Beamline_1
private

Definition at line 60 of file ALFA_BeamTrack.h.

◆ m_Beamline_2

FPTracker::Beamline ALFA_BeamTrack::m_Beamline_2
private

Definition at line 61 of file ALFA_BeamTrack.h.

◆ m_ConfDir

std::string ALFA_BeamTrack::m_ConfDir
private

Definition at line 47 of file ALFA_BeamTrack.h.

◆ m_ConfigData

FPTracker::ConfigData ALFA_BeamTrack::m_ConfigData
private

Definition at line 48 of file ALFA_BeamTrack.h.

◆ m_ip

int ALFA_BeamTrack::m_ip {1}
private

Definition at line 50 of file ALFA_BeamTrack.h.

◆ m_Magfile

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

Definition at line 54 of file ALFA_BeamTrack.h.

◆ m_Magver

int ALFA_BeamTrack::m_Magver {3}
private

Definition at line 51 of file ALFA_BeamTrack.h.

◆ m_MomParticleRP

FPTracker::Point ALFA_BeamTrack::m_MomParticleRP
private

Definition at line 58 of file ALFA_BeamTrack.h.

◆ m_PosParticleRP

FPTracker::Point ALFA_BeamTrack::m_PosParticleRP
private

Definition at line 57 of file ALFA_BeamTrack.h.

◆ m_Side

FPTracker::Side ALFA_BeamTrack::m_Side {FPTracker::beam1}
private

Definition at line 53 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:50
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:47
ALFA_BeamTrack::m_Beamline_1
FPTracker::Beamline m_Beamline_1
Definition: ALFA_BeamTrack.h:60
ALFA_BeamTrack::m_PosParticleRP
FPTracker::Point m_PosParticleRP
Definition: ALFA_BeamTrack.h:57
ALFA_BeamTrack::m_MomParticleRP
FPTracker::Point m_MomParticleRP
Definition: ALFA_BeamTrack.h:58
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:49
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:54
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:51
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:61
ALFA_BeamTrack::m_Side
FPTracker::Side m_Side
Definition: ALFA_BeamTrack.h:53
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