Project
Loading...
Searching...
No Matches
Materials.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
17#include "Materials.h"
18
19#include "DetectorsBase/Detector.h" // for the magnetic field
21
22using namespace std;
23
24namespace o2
25{
26namespace mch
27{
28
32
33// Hydrogen
34const float kZHydrogen = 1.;
35const float kAHydrogen = 1.00794;
36
37// Carbon
38const float kZCarbon = 6.;
39const float kACarbon = 12.0107;
40const float kDensCarbon = 2.265;
41
42// Nitrogen
43const float kZNitrogen = 7.;
44const float kANitrogen = 14.0067;
45
46// Oxygen
47const float kZOxygen = 8.;
48const float kAOxygen = 15.9994;
49
50// Aluminium
51const float kZAluminium = 13.;
52const float kAAluminium = 26.9815385;
53const float kDensAluminium = 2.699;
54
55// Silicon
56const float kZSilicon = 14.;
57const float kASilicon = 28.0855;
58
59// Argon
60const float kZArgon = 18.;
61const float kAArgon = 39.948;
62
63// Chromium
64const float kZChromium = 24.;
65const float kAChromium = 51.9961;
66
67// Iron
68const float kZIron = 26.;
69const float kAIron = 55.845;
70
71// Nickel
72const float kZNickel = 28.;
73const float kANickel = 58.6934;
74
75// Copper
76const float kZCopper = 29.;
77const float kACopper = 63.546;
78const float kDensCopper = 8.96;
79
81const float kEpsil = 0.001; // Tracking precision [cm]
82
83// negative values below means "let the MC transport code compute the values"
84const float kMaxfd = -20.; // Maximum deflection angle due to magnetic field
85const float kStemax = -1.; // Maximum displacement for multiple scattering [cm]
86const float kDeemax = -0.3; // Maximum fractional energy loss, DLS
87const float kStmin = -0.8; // Minimum step due to continuous processes [cm]
88
89const char* kModuleName = "MCH";
90
92{
93
95
96 int imat = 0; // counter of material ID
97 const bool kIsSens = true, kIsUnsens = false; // (un)sensitive medium
98 int fieldType; // magnetic field type
99 float maxField; // maximum magnetic field value
100
101 // get the magnetic field parameters
102 base::Detector::initFieldTrackingParams(fieldType, maxField);
103
105
107 const int nGas = 3;
108 float aGas[nGas] = {kAArgon, kACarbon, kAOxygen};
109 float zGas[nGas] = {kZArgon, kZCarbon, kZOxygen};
110 float wGas[nGas] = {0.8, 1. / 15, 2. / 15}; // Relative weight of each atom in the gas
111 float dGas = 0.001821; // according to AliMUONCommonGeometryBuilder
112
113 mgr.Mixture(kModuleName, ++imat, "Ar 80% + CO2 20%", aGas, zGas, dGas, nGas, wGas);
114 mgr.Medium(kModuleName, Medium::Gas, "Tracking gas", imat, kIsSens, fieldType, maxField, kMaxfd, kStemax, kDeemax,
115 kEpsil, kStmin);
116
118 mgr.Material(kModuleName, ++imat, "Carbon", kACarbon, kZCarbon, kDensCarbon, 0., 0.);
119 mgr.Medium(kModuleName, Medium::Carbon, "Carbon", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax, kDeemax, kEpsil,
120 kStmin);
121
123 const int nNomex = 4;
124 float aNomex[nNomex] = {kACarbon, kAHydrogen, kANitrogen, kAOxygen};
125 float zNomex[nNomex] = {kZCarbon, kZHydrogen, kZNitrogen, kZOxygen};
126 float wNomex[nNomex] = {14., 10., 2., 2.};
127 // honey comb
128 float dHoneyNomex = 0.024; // according to AliMUONCommonGeometryBuilder
129 mgr.Mixture(kModuleName, ++imat, "Nomex (honey comb)", aNomex, zNomex, dHoneyNomex, -nNomex, wNomex);
130 mgr.Medium(kModuleName, Medium::HoneyNomex, "Nomex (honey comb)", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax,
132 // bulk
133 float dBulkNomex = 1.43; // according to AliMUONCommonGeometryBuilder
134 mgr.Mixture(kModuleName, ++imat, "Nomex (bulk)", aNomex, zNomex, dBulkNomex, -nNomex, wNomex);
135 mgr.Medium(kModuleName, Medium::BulkNomex, "Nomex (bulk)", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax, kDeemax,
136 kEpsil, kStmin);
137
139 const int nNoryl = 3;
140 float aNoryl[nNoryl] = {kACarbon, kAHydrogen, kAOxygen};
141 float zNoryl[nNoryl] = {kZCarbon, kZHydrogen, kZOxygen};
142 float wNoryl[nNoryl] = {8., 8., 1.};
143 float dNoryl = 1.06;
144 mgr.Mixture(kModuleName, ++imat, "Noryl", aNoryl, zNoryl, dNoryl, -nNoryl, wNoryl);
145 mgr.Medium(kModuleName, Medium::Noryl, "Noryl", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax, kDeemax, kEpsil,
146 kStmin);
147
149 mgr.Material(kModuleName, ++imat, "Copper", kACopper, kZCopper, kDensCopper, 0., 0.);
150 mgr.Medium(kModuleName, Medium::Copper, "Copper", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax, kDeemax, kEpsil,
151 kStmin);
152
154 const int nFR4 = 4;
155 float aFR4[nFR4] = {kAOxygen, kASilicon, kACarbon, kAHydrogen};
156 float zFR4[nFR4] = {kZOxygen, kZSilicon, kZCarbon, kZHydrogen};
157 float wFR4[nFR4] = {292, 68, 462, 736}; // Relative weight of each atom
158 float dFR4 = 1.8; // changed w.r.t AliRoot after investigation
159 mgr.Mixture(kModuleName, ++imat, "FR4", aFR4, zFR4, dFR4, -nFR4, wFR4);
160 mgr.Medium(kModuleName, Medium::FR4, "FR4", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax, kDeemax, kEpsil, kStmin);
161
163 const int nRoha = 4;
164 float aRoha[nRoha] = {kACarbon, kAHydrogen, kANitrogen, kAOxygen};
165 float zRoha[nRoha] = {kZCarbon, kZHydrogen, kZNitrogen, kZOxygen};
166 float wRoha[nRoha] = {9., 13., 1., 2.};
167
168 float dRoha = 0.03; // from AliMUONCommonGeometryBuilder
169 mgr.Mixture(kModuleName, ++imat, "Rohacell", aRoha, zRoha, dRoha, -nRoha, wRoha);
170 mgr.Medium(kModuleName, Medium::Rohacell, "Rohacell", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax,
172 // for station 1
173 float dSt1Roha = 0.053; // from AliMUONCommonGeometryBuilder
174 mgr.Mixture(kModuleName, ++imat, "Rohacell (st 1)", aRoha, zRoha, dSt1Roha, -nRoha, wRoha);
175 mgr.Medium(kModuleName, Medium::St1Rohacell, "Rohacell (st 1)", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax,
177
179 const int nGlue = 3;
180 float aGlue[nGlue] = {kACarbon, kAHydrogen, kANitrogen};
181 float zGlue[nGlue] = {kZCarbon, kZHydrogen, kZNitrogen};
182 float wGlue[nGlue] = {10., 25., 3.};
183 float dGlue = 1.066;
184 mgr.Mixture(kModuleName, ++imat, "Glue", aGlue, zGlue, dGlue, -nGlue, wGlue);
185 mgr.Medium(kModuleName, Medium::Glue, "Glue", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax, kDeemax, kEpsil, kStmin);
186
188 const int nPlastic = 2;
189 float aPlastic[nPlastic] = {kACarbon, kAHydrogen};
190 float zPlastic[nPlastic] = {kZCarbon, kZHydrogen};
191 float wPlastic[nPlastic] = {1, 1};
192 float dPlastic = 1.107;
193 mgr.Mixture(kModuleName, ++imat, "Plastic", aPlastic, zPlastic, dPlastic, -nPlastic, wPlastic);
194 mgr.Medium(kModuleName, Medium::Plastic, "Plastic", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax, kDeemax, kEpsil,
195 kStmin);
196
198 const int nEpoxy = 3;
199 float aEpoxy[nEpoxy] = {kACarbon, kAHydrogen, kAOxygen};
200 float zEpoxy[nEpoxy] = {kZCarbon, kZHydrogen, kZOxygen};
201 float wEpoxy[nEpoxy] = {18, 19, 3};
202 float dEpoxy = 1.23; // from MFT, to be confirmed
203 mgr.Mixture(kModuleName, ++imat, "Epoxy", aEpoxy, zEpoxy, dEpoxy, -nEpoxy, wEpoxy);
204 mgr.Medium(kModuleName, Medium::Epoxy, "Epoxy", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax, kDeemax, kEpsil,
205 kStmin);
206
208 const int nInox = 3;
209 float aInox[nInox] = {kAIron, kAChromium, kANickel};
210 float zInox[nInox] = {kZIron, kZChromium, kZNickel};
211 float wInox[nInox] = {73., 18., 9.};
212 float dInox = 7.93; // from AliMUONSt1GeometryBuilder
213 mgr.Mixture(kModuleName, ++imat, "Inox", aInox, zInox, dInox, -nInox, wInox);
214 mgr.Medium(kModuleName, Medium::Inox, "Inox", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax, kDeemax, kEpsil, kStmin);
215
217 mgr.Material(kModuleName, ++imat, "Aluminium", kAAluminium, kZAluminium, kDensAluminium, 0., 0.);
218 mgr.Medium(kModuleName, Medium::Aluminium, "Aluminium", imat, kIsUnsens, fieldType, maxField, kMaxfd, kStemax, kDeemax,
219 kEpsil, kStmin);
220}
221
222TGeoMedium* assertMedium(int imed)
223{
225 auto med = mgr.getTGeoMedium(kModuleName, imed);
226 if (med == nullptr) {
227 throw runtime_error("Could not retrieve medium " + to_string(imed) + " for " + kModuleName);
228 }
229 return med;
230}
231
232} // namespace mch
233} // namespace o2
Definition of the Detector class.
Implementation of the MID materials definitions.
static void initFieldTrackingParams(int &mode, float &maxfield)
Definition Detector.cxx:143
static MaterialManager & Instance()
RuntimeErrorRef runtime_error(const char *)
const float kAChromium
Definition Materials.cxx:65
const float kZAluminium
Definition Materials.cxx:51
const float kAHydrogen
Definition Materials.cxx:35
const float kZChromium
Definition Materials.cxx:64
const float kDensCopper
Definition Materials.cxx:78
const float kZOxygen
Definition Materials.cxx:47
const float kASilicon
Definition Materials.cxx:57
TGeoMedium * assertMedium(int imed)
const float kZCarbon
Definition Materials.cxx:38
const float kANickel
Definition Materials.cxx:73
const float kZArgon
Definition Materials.cxx:60
const float kANitrogen
Definition Materials.cxx:44
const float kDensCarbon
Definition Materials.cxx:40
const char * kModuleName
Definition Materials.cxx:89
void createMaterials()
Definition Materials.cxx:91
const float kMaxfd
Definition Materials.cxx:84
const float kDensAluminium
Definition Materials.cxx:53
const float kZNickel
Definition Materials.cxx:72
const float kAAluminium
Definition Materials.cxx:52
const float kZHydrogen
Definition Materials.cxx:34
const float kZCopper
Definition Materials.cxx:76
const float kAArgon
Definition Materials.cxx:61
const float kZSilicon
Definition Materials.cxx:56
@ HoneyNomex
Definition Materials.h:28
@ Aluminium
Definition Materials.h:39
@ Plastic
Definition Materials.h:35
@ Rohacell
Definition Materials.h:33
@ St1Rohacell
Definition Materials.h:38
@ BulkNomex
Definition Materials.h:29
const float kZIron
Definition Materials.cxx:68
const float kACopper
Definition Materials.cxx:77
const float kStmin
Definition Materials.cxx:87
const float kDeemax
Definition Materials.cxx:86
const float kAOxygen
Definition Materials.cxx:48
const float kAIron
Definition Materials.cxx:69
const float kZNitrogen
Definition Materials.cxx:43
const float kACarbon
Definition Materials.cxx:39
const float kEpsil
Tracking parameters (values taken from AliMUONCommonGeometryBuilder)
Definition Materials.cxx:81
const float kStemax
Definition Materials.cxx:85
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
std::string to_string(gsl::span< T, Size > span)
Definition common.h:52