Commit 18125c70 authored by Rishat Sultanov's avatar Rishat Sultanov
Browse files

Merge branch 'master' of...

Merge branch 'master' of https://git.cbm.gsi.de/rishat.sultanov_AT_cern.ch/cbmroot_geometry into ecalsim_geo
parents 509c891c da30000b
......@@ -21,7 +21,7 @@ RebaseCheck:
- ci_scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- hash1=$(git show-ref upstream/master | cut -f1 -d' ')
- hash2=$(git merge-base upstream/master origin/$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME)
- hash2=$(git merge-base upstream/master HEAD)
- echo "${hash1}"
- echo "${hash2}"
- if [ "${hash1}" = "${hash2}" ]; then
......@@ -79,3 +79,21 @@ FileFormatCheck:
- ci_scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- ci_scripts/check-file-format.sh upstream
FileMediaCheck:
stage: checkFormat
image: alpine
tags:
- docker
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "CbmSoft/cbmroot_geometry" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
- apk update && apk add git bash file gawk
- ci_scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- gawk -f ci_scripts/static_check.awk media.geo
1 Hydrogen H 1.00794
2 Helium He 4.0026
3 Lithium Li 6.941
4 Beryllium Be 9.012182
5 Boron B 10.811
6 Carbon C 12.011
7 Nitrogen N 14.00674
8 Oxygen O 15.9994
9 Fluorine F 18.9984032
10 Neon Ne 20.1797
11 Sodium Na 22.989768
12 Magnesium Mg 24.3050
13 Aluminum Al 26.981539
14 Silicon Si 28.0855
15 Phosphorus P 30.973762
16 Sulfur S 32.066
17 Chlorine Cl 35.4527
18 Argon Ar 39.948
19 Potassium K 39.0983
20 Calcium Ca 40.078
21 Scandium Sc 44.955910
22 Titanium Ti 47.867
23 Vanadium V 50.9415
24 Chromium Cr 51.9961
25 Manganese Mn 54.93805
26 Iron Fe 55.845
27 Cobalt Co 58.93320
28 Nickel Ni 58.6934
29 Copper Cu 63.546
30 Zinc Zn 65.39
31 Gallium Ga 69.723
32 Germanium Ge 72.61
33 Arsenic As 74.92159
34 Selenium Se 78.96
35 Bromine Br 79.904
36 Krypton Kr 83.80
37 Rubidium Rb 85.4678
38 Strontium Sr 87.62
39 Yttrium Y 88.90585
40 Zirconium Zr 91.224
41 Niobium Nb 92.90638
42 Molybdenum Mo 95.94
43 Technetium Tc 97.907215
44 Ruthenium Ru 101.07
45 Rhodium Rh 102.90550
46 Palladium Pd 106.42
47 Silver Ag 107.8682
48 Cadmium Cd 112.41
49 Indium In 114.818
50 Tin Sn 118.710
51 Antimony Sb 121.760
52 Tellurium Te 127.60
53 Iodine I 126.90447
54 Xenon Xe 131.29
55 Cesium Cs 132.90543
56 Barium Ba 137.27
57 Lanthanum La 138.9055
58 Cerium Ce 140.115
59 Praeseodymium Pr 140.90765
60 NeoDymium Nd 144.24
61 Promethium Pm 144.912745
62 Samarium Sm 150.36
63 Europium Eu 151.965
64 Gadolinium Gd 157.25
65 Terbium Tb 158.92534
66 Dysprosium Dy 162.50
67 Holmium Ho 164.93032
68 Erbium Er 167.26
69 Thulium Tm 168.93421
70 Ytterbium Yb 173.04
71 Lutetium Lu 174.967
72 Hafnium Hf 178.49
73 Tantalum Ta 180.9479
74 Tungsten W 183.84
75 Rhenium Re 186.207
76 Osmium Os 190.23
77 Iridium Ir 192.217
78 Platinum Pt 195.08
79 Gold Au 196.96654
80 Mercury Hg 200.59
81 Thallium Tl 204.3833
82 Lead Pb 207.2
83 Bismuth Bi 208.98037
84 Polonium Po 208.982415
85 Astatine At 209.987131
86 Radon Rn 222.017570
87 Francium Fr 223.019731
88 Radium Ra 226.025402
89 Actinium Ac 227.027747
90 Thorium Th 232.0381
91 Protactinium Pa 231.03588
92 Uranium U 238.0289
93 Neptunium Np 237.048166
94 Plutonium Pu 244.064197
95 Americium Am 243.061372
96 Curium Cm 247.070346
97 Berkelium Bk 247.070298
98 Californium Cf 251.079579
99 Einsteinium Es 252.08297
100 Fermium Fm 257.095096
101 Mendelevium Md 258.098427
102 Nobelium No 259.1011
103 Lawrencium Lr 262.1098
104 Rutherfordium Rf 261.1089
105 Hahnium Ha 262.1144
106 Seaborgium Sg 263.1186
107 Nielsborium Ns 262.1231
108 Hassium Hs 265.1306
109 Meitnerium Mt 266.1378
#!/usr/bin/gawk -f
#
# Static test to check the atomic number against the atomic mass for inclusions in the geometry media.geo file. Output may be used to spot typos and other human errors.
#
# Author E.Clerkin
# COPYRIGHT: FAIR GMBH 2020
#
#
# Useage: awk -f static_check.awk media.geo
# Must include LIST_ELEMENTS file in same directory.
function abs(x){return (x>=0) ? x : -x}
BEGIN{
ACCEPTABLE_ERROR=0.01 # 1 % ERROR TOLERANCE FOR STATIC CHECK.
FAIL=0; # Flag for determining success. If any check fails then this value is changed.
while(getline < "ci_scripts/LIST_ELEMENTS"){
ELEMENT_NAME[$1]=$2;
ELEMENT_SYMBOL[$1]=$3;
ELEMENT_MASS[$1]=$4;
# Index $1 is the Atomic Number of the Element
};
};
{
delete datum;
FS="[\t ]*"; # Spaces and tags as field seperators in media.geo
for (i = 1; i<=NF; i++)datum[i]=$i; # Loading in a line from media.geo fle to make it easy to work with.
RELATIVE_SUM=0;
content_by="weight"; # The relative content is by number of each atom or by relative weight of each atom.
if($1!="//" && $1!="0" && $1!="1" && $1!="" ){ # Excluding lines that are not first line in definition of medium
print "############################################################################################################";
getline # Obtaining information from subsequent line for additional flags.
sensflag=$2
fldflag=$3
fld=$4
epsil=$5
declare sensor;
if(sensflag==0) # Is the material active?
{
sensor="PASSIVE";
}
else
{
sensor=" ACTIVE";
}
print datum[1], sensor; # Material and Active status.
if(datum[2]<0){
content_by="number" # Relative number
print "Containts by numer";
};
datum[2] = (datum[2]>0)? datum[2] : -1*datum[2]; # Making the NCOMP parameter always positive.
# NCOMP sign controlls the constitutes ratio definitions and is not needed for these tests.
printf "Number of constitutes: %d\n", datum[2]; # Datum[2] has integer value of number of elements.
for(i=1;i<=datum[2];++i){ # Skips throw each of the components.
printf "Atomic Number: %s\tAtomic Mass: %s\n", datum[2+i+datum[2]], datum[2+i]; # See https://fairroot.gsi.de/?q=node/34 for info regarding format ordering.
printf "AN[%d]=> %s : Mass = %s\n", datum[2+i+datum[2]], ELEMENT_NAME[strtonum(datum[2+i+datum[2]])], ELEMENT_MASS[strtonum(datum[2+i+datum[2]])];
# datum[2] is the number of components
# datum[2 + i] is subsequent component's atomic number
# datum[2 + i + datum[2]] is subsequenct component's atomic weight
# datum[2 + 2*datum[2] + 1] is the overall density of the material
# datum[3 + 2*datum[2] + i] is the subsequent relative amount of each compoment.
# printf "PAUSE: %s %s %s", datum[2+i], ELEMENT_MASS[strtonum(datum[2+i+datum[2]])], ERROR;
printf "1 MASS ENTERED %s \n", datum[2+i];
printf "2 ELEMENT MASS %s \n", ELEMENT_MASS[strtonum(datum[2+i+datum[2]])];
if ( length(datum[2+i])!=0 && length(ELEMENT_MASS[strtonum(datum[2+i+datum[2]])])!=0 ){
ERROR = abs( (datum[2+i] - ELEMENT_MASS[strtonum(datum[2+i+datum[2]])] )/datum[2+i])
};
if(datum[2]>1){ # Checks relatavant for more than one component.
if(content_by~"number"){ # When the elements are per their relative number.
printf "%s", ELEMENT_SYMBOL[strtonum(datum[2+i+datum[2]])];
printf "%s\n", datum[3 + 2*datum[2] + i];
CHEMISTRY[ELEMENT_SYMBOL[strtonum(datum[2+i+datum[2]])]]=datum[3 + 2*datum[2] + i];
};
if(content_by~"weight"){ # When the elements are per weight
printf "RELATIVE AMOUNT: %0.2f%% \n", 100*datum[3 + 2*datum[2] + i];
RELATIVE_SUM+=datum[3 + 2*datum[2] + i];
};
};
printf "ERROR IS %f \t", ERROR;
if (ERROR > ACCEPTABLE_ERROR) {
FAIL=1;
printf "CHECK FAILED\n\n"
} else {
printf "CHECK PASSED\n\n"
};
};
# Check if the amount of material adds up to 100%
if(datum[2]>1 && content_by~"weight"){
printf "TOTAL AMOUNT COUNT RELATIVE SUMS: %0.2f%% \t\t\t", 100*RELATIVE_SUM;
if (RELATIVE_SUM<=1+ACCEPTABLE_ERROR && RELATIVE_SUM>=1-ACCEPTABLE_ERROR ){
printf "CHECK PASSED! %s \n\n", RELATIVE_SUM;
}else{
printf "CHECK FAILED! %s \n\n", RELATIVE_SUM;
FAIL=1;
};
};
# Chemical Formula Attempt. For visual inspection by human.
if(datum[2]>1 && content_by~"number"){
printf "Contents by the number of atoms: \n"
for( ele in CHEMISTRY )printf "%s%s", ele, CHEMISTRY[ele];
# ELEMENT_SYMBOL[strtonum(datum[2+i+datum[2]])]
# CHEMISTRY[]
};
print " " # Spacing
delete CHEMISTRY;
};
}
END{
print "------------------------------------------------------------------------------------------------------------"
printf "STATIC TEST: "
if ( ! FAIL ) { printf "PASSED\n" }
if ( FAIL ) { printf "FAILED\n"; exit 1 }
}
......@@ -1213,6 +1213,10 @@ MUCHlead 1 207.1 82. 11.34
0 1 20. .001
0
MUCHironfifth 1 55.847 26. 7.2
0 1 20. .001
0
MUCHwolfram 1 183.84 74. 19.3
0 1 20. .001
0
......@@ -1238,6 +1242,11 @@ MUCHargon 1 39.95 18. 0.00178
1 0 20. .001
0
// Argon CO2 (70/30)
MUCHGEMmixture 3 39.948 12.01 15.9994 18. 6. 8. 0.001843 0.678 0.088 0.234
0 1 20. .001
0
MUCHnoryl -3 12.01 1.01 16.00 6. 1. 8. 1.06 8 8 1
0 1 20. .001
0
......@@ -1266,6 +1275,10 @@ MUCHcopper 1 63.54 29. 8.96
0 0 20. .001
0
MUCHkapton -4 14.006 12.011 1.008 16. 7. 6. 1. 8. 1.42 2 22 10 5
0 0 20. .001
0
Lead 1 207.2 82. 11.35
1 0 20. .001
0
......
MUCH geometry created with create_MUCH_geometry_v21a_lmvm.C
Global Variables:
MuchCave Zin position = 125 cm
Acceptance tangent min = 0.1
Acceptance tangent max = 0.466
Absorbers
-----------
Total No. of Absorbers: 5
First abosrber is divided into two halves.
First half inserted inside the Dipole Magnet.
Second half is made of Low Density Graphite + Concrete.
Total No. of Pieces: 7
AbsPieces Position[cm] Thickness[cm] Material
--------------------------------------------------------------
1 133 16 LD Graphite
2 147 12 LD Graphite
3 168 30 Concrete
4 225 20 Iron
5 275 20 Iron
6 330 30 Iron
7 427 100 Iron_fifth
Shielding
-----------
No. of Shields: 6
Inside the Abs I, Shielding divided into two parts.
Shield No. Z_In[cm] Z_Out[cm] R_In[cm] R_Out[cm] Material
--------------------------------------------------------------
0 125 153 7.375 12.4999 Al
1 153 183 8.579 15.2999 Pb
2 215 235 12.965 21.4999 Al
3 265 285 15.515 26.4999 Al
4 315 345 18.065 31.4999 Al
5 377 477 25.00 25.00 Al
Stations
----------
No. of Stations: 4
First two stations (1,2) are made up of GEM and last two stations (3,4) are made up of RPC.
Passive material implemented in GEM modules. Ar:CO2 (70:30) is used as active gas.
12 mm thick Al plates are used for support and cooling in the GEM modules.
2 mm thick Aluminum plates are used for support in the RPC modules behind the active area. 10 mm thick Aluminium at the boundaries as the frame.
Drift and read-out PCBs (copper coated G10 plates) inserted for realistic material budget for both GEM and RPC modules.
#Station #Layers Z[cm] #Sectors ActiveLz[cm]
--------------------------------------------------------------
1 1 190 16 0.3
1 2 200 16 0.3
1 3 210 16 0.3
2 1 240 20 0.3
2 2 250 20 0.3
2 3 260 20 0.3
3 1 290 18 0.2
3 2 300 18 0.2
3 3 310 18 0.2
4 1 350 20 0.2
4 2 360 20 0.2
4 3 370 20 0.2
MUCH geometry created with create_MUCH_geometry_v21a_lmvm.C
Global Variables:
MuchCave Zin position = 125 cm
Acceptance tangent min = 0.1
Acceptance tangent max = 0.466
Absorbers
-----------
Total No. of Absorbers: 4
First abosrber is divided into two halves.
First half inserted inside the Dipole Magnet.
Second half is made of Low Density Graphite + Concrete.
Total No. of Pieces: 6
AbsPieces Position[cm] Thickness[cm] Material
--------------------------------------------------------------
1 133 16 LD Graphite
2 147 12 LD Graphite
3 168 30 Concrete
4 225 20 Iron
5 275 20 Iron
6 330 30 Iron
Shielding
-----------
No. of Shields: 5
Inside the Abs I, Shielding divided into two parts.
Shield No. Z_In[cm] Z_Out[cm] R_In[cm] R_Out[cm] Material
--------------------------------------------------------------
0 125 153 7.375 12.4999 Al
1 153 183 8.579 15.2999 Pb
2 215 235 12.965 21.4999 Al
3 265 285 15.515 26.4999 Al
4 315 345 18.065 31.4999 Al
Stations
----------
No. of Stations: 4
First two stations (1,2) are made up of GEM and last two stations (3,4) are made up of RPC.
Passive material implemented in GEM modules. Ar:CO2 (70:30) is used as active gas.
12 mm thick Al plates are used for support and cooling in the GEM modules.
2 mm thick Aluminum plates are used for support in the RPC modules behind the active area. 10 mm thick Aluminium at the boundaries as the frame.
Drift and read-out PCBs (copper coated G10 plates) inserted for realistic material budget for both GEM and RPC modules.
#Station #Layers Z[cm] #Sectors ActiveLz[cm]
--------------------------------------------------------------
1 1 190 16 0.3
1 2 200 16 0.3
1 3 210 16 0.3
2 1 240 20 0.3
2 2 250 20 0.3
2 3 260 20 0.3
3 1 290 18 0.2
3 2 300 18 0.2
3 3 310 18 0.2
4 1 350 20 0.2
4 2 360 20 0.2
4 3 370 20 0.2
MUCH geometry created with create_MUCH_geometry_v21a_lmvm.C
Global Variables:
MuchCave Zin position = 125 cm
Acceptance tangent min = 0.1
Acceptance tangent max = 0.466
Absorbers
-----------
Total No. of Absorbers: 3
First abosrber is divided into two halves.
First half inserted inside the Dipole Magnet.
Second half is made of Low Density Graphite + Concrete.
Total No. of Pieces: 5
AbsPieces Position[cm] Thickness[cm] Material
--------------------------------------------------------------
1 133 16 LD Graphite
2 147 12 LD Graphite
3 168 30 Concrete
4 225 20 Iron
5 275 20 Iron
Shielding
-----------
No. of Shields: 4
Inside the Abs I, Shielding divided into two parts.
Shield No. Z_In[cm] Z_Out[cm] R_In[cm] R_Out[cm] Material
--------------------------------------------------------------
0 125 153 7.375 12.4999 Al
1 153 183 8.579 15.2999 Pb
2 215 235 12.965 21.4999 Al
3 265 285 15.515 26.4999 Al
Stations
----------
No. of Stations: 2
First two stations (1,2) are made up of GEM and last two stations (3,4) are made up of RPC.
Passive material implemented in GEM modules. Ar:CO2 (70:30) is used as active gas.
12 mm thick Al plates are used for support and cooling in the GEM modules.
2 mm thick Aluminum plates are used for support in the RPC modules behind the active area. 10 mm thick Aluminium at the boundaries as the frame.
Drift and read-out PCBs (copper coated G10 plates) inserted for realistic material budget for both GEM and RPC modules.
#Station #Layers Z[cm] #Sectors ActiveLz[cm]
--------------------------------------------------------------
1 1 190 16 0.3
1 2 200 16 0.3
1 3 210 16 0.3
2 1 240 20 0.3
2 2 250 20 0.3
2 3 260 20 0.3
/** ROOT macro to define the CBM setup sis18_mcbm
**
** @author Volker Friese <v.friese@gsi.de>
** @author David Emschermann <d.emschermann@gsi.de>
** @date 5 February 2016
**
**/
// 2020-08-17 - DE - add TRD v21a, add TOF v21c, disable MUCH v20a
// 2020-05-26 - DE - use RICH v20d which moved according to TOF v20b
// 2020-05-25 - DE - use TRD v20b with 2 modules and support frame for 2021
// 2020-05-22 - DE - use platform v20a with measured size of support table
// 2020-05-12 - DE - make mRICH v20b (without window) the new default
// 2020-03-11 - DE - prepare setup for mCBM Spring 2021 beamtime
// 2020-03-11 - DE - prepare setup for mCBM May 2020 beamtime
// 2020-03-11 - DE - prepare setup for mCBM March 2020 beamtime
//
// 2019-12-20 - FU - use the new pipe/targetbox geometry which consists of
// root files which are both passed to to CbmSetup
// 2019-11-28 - DE - move mTOF v19b +12 cm in x direction for the Nov 2019 run
// 2019-11-15 - DE - use mSTS v19b with single module in the top left of station 0
// 2019-08-15 - DE - use mCBM targetbox as pipe v19b
// 2019-08-12 - DE - use mSTS v19a
// 2019-08-08 - FU - use mMUCH v19a
// 2019-08-02 - DE - use pipe v19a with flange position at z=610 mm
// 2019-07-31 - DE - add TOF v18m=v19a geometry - provided by the TOF group
// 2019-07-31 - DE - add RICH v19a geometry - provided by the RICH group
// 2019-03-15 - DE - this is supposed to be the start version of mCBM in March 2019
// 2018-08-24 - DE - this is supposed to be the start version of mCBM in 2018
// 2018-06-27 - DE - set flipped mTOF v18j geometry as new default
// 2018-05-24 - DE - place 20deg_long setup back at 25 degrees, see issue #1078
// 2018-02-27 - DE - use mTRD v18o to fix redmine issue #1046 with tracking
// 2017-12-11 - DE - enable mBUCH v18m
// 2017-12-04 - DE - add mPSD to mCBM setup
// 2017-11-22 - DE - use TRD v17n with 22 cm spacing from CAD
// 2017-11-17 - DE - set aerogel mRICH v18d as default
// 2017-11-10 - DE - switch to mMUCH v18e with Mv2 dimensions
// 2017-11-03 - DE - add long setup, (acceptance matching +-12 degrees from mSTS)
// 2017-11-02 - DE - add common support table v18c
// 2017-11-02 - DE - include mBUCH with mTRD v18j
// 2017-10-23 - DE - use mMUCH with vertically aligned left rim
// 2017-10-18 - DE - use mTOF v18h with vertical orientation
// 2017-10-16 - DE - use 20 degree beampipe
// 2017-06-03 - DE - add RICH v18a_mcbm
// 2017-05-02 - DE - switch back to 5x5 RPC TOF
// 2017-05-02 - DE - skip MVD in the initial setup
// 2016-02-05 - VF - Replaces former sis18_mcbm_setup.C,
// now using the CbmSetup class.
// 2015-06-18 - DE - mCBM @ SIS18 setup
void setup_mcbm_beam_2021_07()
{
// ----- Geometry Tags --------------------------------------------------
TString platGeoTag = "v20a_mcbm"; // 2020 // support table
TString pipeGeoTag = "v19f_mcbm"; // pipe after target box
// TString mvdGeoTag = "v18b_mcbm"; // "v18a_mcbm";
TString stsGeoTag = "v20e_mcbm";
// TString muchGeoTag = "v20a_mcbm"; // 2 layers
// TString muchGeoTag = "v19a_mcbm"; // need 3 layers and RPC here
TString trdGeoTag = "v21a_mcbm"; // 2021 // TRD-2D + 2x TRD modules
// TString trdGeoTag = "v20b_mcbm"; // 2021 // 2x TRD modules
TString tofGeoTag = "v21c_mcbm"; // TOF quad + double stacks
// TString tofGeoTag = "v20d_mcbm"; // 2nd layer of 3x M6 modules added
TString richGeoTag = "v20d_mcbm"; // geometry provided by RICH group
TString psdGeoTag = "v20a_mcbm"; // at 25 degree, below the beampipe
// ------------------------------------------------------------------------
// ----- Magnetic field -------------------------------------------------
TString fieldTag = "v18a";
Double_t fieldZ = 40.; // field centre z position
Double_t fieldScale = 0.; // field scaling factor
// ------------------------------------------------------------------------
// ----- Create setup ---------------------------------------------------
CbmSetup* setup = CbmSetup::Instance();
if ( ! setup->IsEmpty() ) {
std::cout << "-W- setup_sis18_mcbm: overwriting existing setup"
<< setup->GetTitle() << std::endl;
setup->Clear();
}
setup->SetTitle("SIS18 - mCBM Setup");
setup->SetModule(ECbmModuleId::kPlatform, platGeoTag);
setup->SetModule(ECbmModuleId::kPipe, pipeGeoTag);
// setup->SetModule(ECbmModuleId::kMvd, mvdGeoTag); // skip mvd
setup->SetModule(ECbmModuleId::kSts, stsGeoTag);
// setup->SetModule(ECbmModuleId::kMuch, muchGeoTag);
setup->SetModule(ECbmModuleId::kTrd, trdGeoTag);
setup->SetModule(ECbmModuleId::kTof, tofGeoTag);
setup->SetModule(ECbmModuleId::kRich, richGeoTag);
setup->SetModule(ECbmModuleId::kPsd, psdGeoTag);
setup->SetField(fieldTag, fieldScale, 0., 0., fieldZ);
// ------------------------------------------------------------------------
// ----- Screen output ------------------------------------------------
setup->Print();
// ------------------------------------------------------------------------
}
......@@ -44,11 +44,11 @@ void setup_sis100_electron()
// ----- Geometry Tags --------------------------------------------------
TString magnetGeoTag = "v20a";
TString pipeGeoTag = "v16b_1e";
TString mvdGeoTag = "v20c_tr";
TString mvdGeoTag = "v20a_tr";
TString stsGeoTag = "v19a";
TString richGeoTag = "v17a_1e";
TString trdGeoTag = "v20b_1e";
TString tofGeoTag = "v20a_1e";
TString tofGeoTag = "v20b_1e";