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