Skip to content
Snippets Groups Projects
Commit 671106dc authored by Lukas Chlad's avatar Lukas Chlad
Browse files

Added beampipe v23a, short version of v21h

parent 22d84aaa
Branches add_rich_v23a
No related tags found
No related merge requests found
This diff is collapsed.
using namespace std;
void recalculate_BP(double maxZ)
{
double phi = (1.2-0.435)*TMath::DegToRad(); // this rotation angle stays
double c = cos(phi);
double s = sin(phi);
double orig_half_length = 7230.; // original half length
double orig_T_x = 134.85; // original translation in X when placing psd_tube
double orig_T_z = 10808.8; // original translation in Z when placing psd_tube
// placing psd_tube at origin
double S0_x = 0.;
double S0_z = -1.*orig_half_length;
double F0_x = 0.;
double F0_z = orig_half_length;
// after rotation around Y at origin:
double S1_x = c*S0_x + s*S0_z;
double S1_z = -s*S0_x + c*S0_z;
double F1_x = c*F0_x + s*F0_z;
double F1_z = -s*F0_x + c*F0_z;
// after original translation
double S2_x = S1_x + orig_T_x;
double S2_z = S1_z + orig_T_z;
double F2_x = F1_x + orig_T_x;
double F2_z = F1_z + orig_T_z;
// parameterization of line between S2 and F2: z = k*x + q
double k = (F2_z - S2_z)/(F2_x - S2_x);
double q = S2_z - k*S2_x;
// now using specified max Z of the F3 find its X
double S3_x = S2_x;
double S3_z = S2_z;
double F3_z = maxZ;
double F3_x = (F3_z - q)/k;
// new half-length of tube
double new_half_length = 0.5*sqrt(pow(F3_x-S3_x,2) + pow(F3_z-S3_z,2));
double new_T_x = 0.5*(F3_x + S3_x);
double new_T_z = 0.5*(F3_z + S3_z);
cout << "New half-length: " << new_half_length << endl
<< "New Trans [ " << new_T_x << " , 0., " << new_T_z << " ]" << endl;
}
\ No newline at end of file
Beam pipe design taken from v21h (@ 12 AGeV/c)
only small modification in ctr_psd_tube and psd_tube_s and vacuum_psd_tube_s
to end the beam-pipe at z=9800 (for the middle of beampipe)
this is needed to allow simulation with FSD without any hole
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment