Returns the amount of target material penetrated by a particle starting at z_start and interacting or exiting the target at z_end. the upstream edge of the budal monitor must be supplied. All inputs must be in units of cm.
428 const double us_edges[nfins]={25.4484, 42.1683, 44.1983, 46.2283, 48.2583,
429 50.2883, 52.3183, 54.3483, 56.3783,
430 58.4083, 60.4383, 62.4683, 64.4983,
431 66.5283, 68.5583, 70.5883, 72.6183,
432 74.6483, 76.6783, 78.7083, 80.7383,
433 82.7683, 84.7983, 86.8283, 88.8583,
434 90.8883, 92.9183, 94.9483, 96.9783,
435 99.0083, 101.0383, 103.0683, 105.0983,
436 107.1283, 109.1583, 111.1883, 113.2183,
437 115.2483, 117.2783, 119.3083, 121.3383,
438 123.3683, 125.3983, 127.4283, 129.4583,
439 131.4883, 133.5183, 135.5483};
440 const int nfins_ref=49;
442 const double us_edges_ref[nfins_ref]={-64.7002,-46.9176,-44.8909, -42.8609, -40.8309, -38.8009, -36.7709,
443 -34.7409, -32.7109, -30.6809, -28.6509, -26.6209, -24.5909,
444 -22.5609, -20.5309, -18.5009, -16.4709, -14.4409, -12.4109, -10.3809, -8.3509, -6.3209,
445 -4.2909, -2.2609, -0.2309, 1.7991, 3.8291, 5.8591, 7.8891, 9.9191, 11.9491, 13.9791, 16.0091,
446 18.0391, 20.0691, 22.0991, 24.1291, 26.1591, 28.1891, 30.2191,
447 32.2491, 34.2791, 36.3091, 38.3391, 40.3691, 42.3991, 44.4291, 46.4591, 48.4891};
449 const int nfins_opt = 119;
450 const double us_edges_opt[nfins_opt] = {-27.3347,-0.0054, 4.0917, 6.0876, 8.1176, 10.1476, 12.1776, 14.2076, 16.2376, 18.2676, 20.2976, 22.3276, 24.3576, 26.3876, 28.4176, 30.4476, 32.4776, 34.5076, 36.5376, 38.5676, 40.5976,
451 42.6276, 44.6576, 46.6876, 48.7176, 50.7476, 52.7776, 54.8076, 56.8376, 58.8676, 60.8976, 62.9276, 64.9576, 66.9876, 69.0176, 71.0476, 73.0776, 75.1076, 77.1376, 79.1676, 81.1976,
452 83.2276, 85.2576, 87.2876, 89.3176, 91.3476, 93.3776, 95.4076, 97.4376, 99.4676, 101.498, 103.528, 105.558, 107.588, 109.618, 111.648, 113.678, 115.708, 117.738, 119.768, 121.798,
453 123.828, 125.858, 127.888, 129.918, 131.948, 133.978, 136.008, 138.038, 140.068, 142.098, 144.128, 146.158, 148.188, 150.218, 152.248, 154.278, 156.308, 158.338, 160.368, 162.398,
454 164.428, 166.458, 168.488, 170.518, 172.548, 174.578, 176.608, 178.638, 180.668, 182.698, 184.728, 186.758, 188.788, 190.818, 192.848, 194.878, 196.908, 198.938, 200.968, 202.998,
455 205.028, 207.058, 209.088, 211.118, 213.148, 215.178, 217.208, 219.238, 221.268, 223.298, 225.328, 227.358, 229.388,
456 231.418, 233.448, 235.478, 237.508};
462 std::vector<double> vus_edges;
463 for(
int i = 0;i<nfins;i++){
464 vus_edges.push_back(us_edges[i]);
468 for(
int i = 0;i<nfins_ref-1;i++){
469 vus_edges.push_back(us_edges_ref[i]);
474 for(
int i = 0;i<nfins_opt;i++){
475 vus_edges.push_back(us_edges_opt[i]);
479 const double budal_us_edge=vus_edges.at(0);
480 double fin_width=2.0;
482 if(mode==
"OPT")fin_width = 1.95;
483 if(mode==
"REF")fin_width = 2.02;
487 const double z_trans=z0_budal - budal_us_edge;
499 double mat_start=0.0;
500 double mat_end = 0.0;
502 for(
unsigned int ifin=0; ifin<vus_edges.size(); ifin++){
503 const double fin_us_edge=vus_edges.at(ifin)+z_trans;
504 const double fin_ds_edge=fin_us_edge+fin_width;
505 if(z_start<=fin_us_edge)
break;
506 else if(z_start<fin_ds_edge){
507 mat_start+=(z_start-fin_us_edge);
511 mat_start+=fin_width;
517 for(
unsigned int ifin=0; ifin<vus_edges.size(); ifin++){
518 const double fin_us_edge=vus_edges.at(ifin)+z_trans;
519 const double fin_ds_edge=fin_us_edge+fin_width;
520 if(z_end<=fin_us_edge)
break;
521 else if(z_end<fin_ds_edge){
522 mat_end+=(z_end-fin_us_edge);
531 double mat_traversed=mat_end-mat_start;
535 return mat_traversed;
std::string getenv(std::string const &name)