FairShip
Loading...
Searching...
No Matches
MeanMaterialBudget.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2// SPDX-FileCopyrightText: ALICE Experiment at CERN, All rights reserved
3
4#ifndef SHIPGEN_MEANMATERIALBUDGET_H_
5#define SHIPGEN_MEANMATERIALBUDGET_H_
6
7#include <span>
8
9//
10// Calculate mean material budget and material properties between two points
11// in the geometry using TGeoManager navigation.
12//
13// Origin: AliTrackerBase::MeanMaterialBudget from ALICE AliRoot
14// Author: The ALICE Off-line Project
15//
16// Original ALICE contributors:
17// Marian Ivanov, Marian.Ivanov@cern.ch (original implementation)
18// Andrea Dainese, Andrea.Dainese@lnl.infn.it (improvements)
19// Andrei Gheata, Andrei.Gheata@cern.ch (improvements)
20//
21// SHiP enhancements:
22// Thomas Ruf, Thomas.Ruf@cern.ch (added interaction length and cross section
23// calculations for hadronic physics, Dec
24// 2016)
25// Anupama Reghunath, anupama.reghunath@cern.ch (improved error logging, Nov
26// 2024)
27//
28
29namespace shipgen {
30
31//
32// Calculate mean material budget and material properties between
33// the points "start" and "end".
34//
35// Parameters:
36// start - starting point coordinates [x, y, z] in cm
37// end - ending point coordinates [x, y, z] in cm
38// mparam - output array with material parameters (10 elements):
39//
40// mparam[0] - mean density: sum(x_i*rho_i)/sum(x_i) [g/cm3]
41// mparam[1] - equivalent rad length fraction: sum(x_i/X0_i) [dimensionless]
42// mparam[2] - mean A: sum(x_i*A_i)/sum(x_i) [dimensionless]
43// mparam[3] - mean Z: sum(x_i*Z_i)/sum(x_i) [dimensionless]
44// mparam[4] - length: sum(x_i) [cm]
45// mparam[5] - Z/A mean: sum(x_i*Z_i/A_i)/sum(x_i) [dimensionless]
46// mparam[6] - number of boundary crosses
47// mparam[7] - maximum density encountered (g/cm^3)
48// mparam[8] - equivalent interaction length fraction: sum(x_i/I0_i)
49// [dimensionless] mparam[9] - maximum cross section encountered (mbarn)
50//
51// Returns: mean density along the path
52//
53double MeanMaterialBudget(std::span<const double, 3> start,
54 std::span<const double, 3> end,
55 std::span<double, 10> mparam);
56
57} // namespace shipgen
58
59#endif // SHIPGEN_MEANMATERIALBUDGET_H_
double MeanMaterialBudget(std::span< const double, 3 > start, std::span< const double, 3 > end, std::span< double, 10 > mparam)