6 #include "gearcga/CGAGearDistanceProperties.h"
7 #include "gearcga/CGAGeometryInitializer.h"
11 CGAGearDistanceProperties::CGAGearDistanceProperties(std::string steer,
12 std::string model, std::string setup, std::string host,
13 std::string user, std::string password) {
15 CGAGeometryInitializer::GetCGAGeometryInitializer(steer, model,
16 setup, host, user, password);
20 void CGAGearDistanceProperties::beamOn(
const Vector3D & p0,
const Vector3D & p1)
const{
22 double initial[3],
final[3], direction[3];
24 for(
unsigned int i=0; i<3; i++) {
25 initial[i] = (p0[i])*0.1;
26 final[i] = (p1[i])*0.1;
27 direction[i] =
final[i] - initial[i];
30 char particle[]=
"geantino";
31 CGABeamOn(initial,
final, direction, particle, 20, 1);
38 std::vector<std::string> volNames;
39 static std::vector<std::string> matNames;
40 std::vector<double> distance;
41 std::vector<double> x;
42 std::vector<double> y;
43 std::vector<double> z;
44 std::vector<double> nbX0;
45 std::vector<double> nInterLen;
49 CGAGetStepsForJava(volNames,matNames,distance,x,y,z,nbX0,nInterLen);
59 std::vector<std::string> volNames;
60 std::vector<std::string> matNames;
61 static std::vector<double> distance;
62 std::vector<double> x;
63 std::vector<double> y;
64 std::vector<double> z;
65 std::vector<double> nbX0;
66 std::vector<double> nInterLen;
70 CGAGetStepsForJava(volNames,matNames,distance,x,y,z,nbX0,nInterLen);
79 std::vector<std::string> volNames;
80 std::vector<std::string> matNames;
81 std::vector<double> distance;
82 std::vector<double> x;
83 std::vector<double> y;
84 std::vector<double> z;
85 std::vector<double> nbX0;
86 std::vector<double> nInterLen;
90 CGAGetStepsForJava(volNames,matNames,distance,x,y,z,nbX0,nInterLen);
93 for(
unsigned int i=0; i < nbX0.size(); i++)
104 std::vector<std::string> volNames;
105 std::vector<std::string> matNames;
106 std::vector<double> distance;
107 std::vector<double> x;
108 std::vector<double> y;
109 std::vector<double> z;
110 std::vector<double> nbX0;
111 std::vector<double> nbIL;
115 CGAGetStepsForJava(volNames,matNames,distance,x,y,z,nbX0,nbIL);
117 double nInterLen = 0;
118 for(
unsigned int i=0; i<nbIL.size(); i++)
119 nInterLen += nbIL[i];
129 double start[3], end[3];
130 for(
int i=0; i<3; i++) {
135 return CGAGetBdl(start, end);
142 double start[3], end[3];
143 for(
int i=0; i<3; i++) {
148 return CGAGetEdl(start, end);
NotImplementedException used for features that are not implemented.
virtual double getNIntlen(const Vector3D &p0, const Vector3D &p1) const
The number of interaction lengths along the distance between [p0,p1] .
Simple three dimensional vector providing the components for cartesian, cylindrical and spherical coo...
virtual const std::vector< std::string > & getMaterialNames(const Vector3D &p0, const Vector3D &p1) const
List of matrial names along the distance between [p0,p1] .
virtual const std::vector< double > & getMaterialThicknesses(const Vector3D &p0, const Vector3D &p1) const
List of matrial thicknesses in mm along the distance between [p0,p1] - runs parallel to the array ret...
virtual double getBdL(const Vector3D &p0, const Vector3D &p1) const
The integrated magnetic field along the distance between [p0,p1] in Tesla*mm.
virtual double getNRadlen(const Vector3D &p0, const Vector3D &p1) const
The number of radiation lengths along the distance between [p0,p1] .
virtual double getEdL(const Vector3D &p0, const Vector3D &p1) const
The integrated electric field along the distance between [p0,p1] in mVolt.