Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computing
cbmroot
Commits
3029e9f4
Commit
3029e9f4
authored
3 years ago
by
Oleg Golosov
Committed by
Florian Uhlig
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
update PSD macros to suit DEC21 setup
parent
1709cd11
No related branches found
No related tags found
1 merge request
!727
update PSD macros to suit DEC21 setup
Pipeline
#16268
passed
3 years ago
Stage: build
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
macro/psd/create_psdgeo_ideal.C
+83
-11
83 additions, 11 deletions
macro/psd/create_psdgeo_ideal.C
macro/psd/create_psdgeo_with_hole.C
+20
-3
20 additions, 3 deletions
macro/psd/create_psdgeo_with_hole.C
with
103 additions
and
14 deletions
macro/psd/create_psdgeo_ideal.C
+
83
−
11
View file @
3029e9f4
...
...
@@ -34,21 +34,92 @@ TGeoVolume* ConstructIdealPsd(const char* name, Double_t sizeX, Double_t sizeY,
// ====== Main function =====
// ============================================================================
void
create_psdgeo_ideal
()
void
create_psdgeo_ideal
(
TString
geoTag
=
"v22a"
)
{
// ----- Steering variables ---------------------------------------------
const
Double_t
psdX
=
9
.
65
;
// x position of PSD in cave (front plane center)
const
Double_t
psdY
=
0
.;
// y position of PSD in cave (front plane center)
const
Double_t
psdZ
=
800
.;
// z position of PSD in cave (front plane center)
const
Double_t
psdRotY
=
0
.
01321
;
// Rotation of PSD around y axis [rad]
const
Double_t
holeSize
=
20
.;
// diagonal size of the square shaped hole
Double_t
psdX
;
// x position (cm) of PSD in cave (front plane center)
Double_t
psdY
;
// y position (cm) of PSD in cave (front plane center)
Double_t
psdZ
;
// z position (cm) of PSD in cave (front plane center)
Double_t
psdRotY
;
// Rotation of PSD around y axis (rad)
Double_t
holeSize
;
// side length of the square shaped hole (cm)
TString
comment
;
// short description
if
(
geoTag
==
"v22a"
)
{
psdX
=
13
.
1
;
psdY
=
0
.;
psdZ
=
1010
;
psdRotY
=
0
.
01335
;
holeSize
=
0
.;
comment
=
"Position for Au beam at 12A GeV/c and 100% magnetic field strength"
;
}
else
if
(
geoTag
==
"v22b"
)
{
psdX
=
28
.
56
;
psdY
=
0
.;
psdZ
=
1010
;
psdRotY
=
0
.
02
906
;
holeSize
=
0
.;
comment
=
"Position for Au beam at 3.3A GeV/c and 60% magnetic field strength (to fit beam dump)"
;
}
else
if
(
geoTag
==
"v20c"
)
{
psdX
=
12
.
95
;
psdY
=
0
.;
psdZ
=
1010
;
psdRotY
=
0
.
0132
;
holeSize
=
20
.;
}
else
if
(
geoTag
==
"v20a"
)
{
psdX
=
12
.
95
;
psdY
=
0
.;
psdZ
=
1050
;
psdRotY
=
0
.
0132
;
holeSize
=
20
.;
}
else
if
(
geoTag
==
"v20b"
)
{
psdX
=
13
.
75
;
psdY
=
0
.;
psdZ
=
1100
;
psdRotY
=
0
.
0132
;
holeSize
=
20
.;
}
else
if
(
geoTag
==
"v18e"
)
{
psdX
=
9
.
65
;
psdY
=
0
.;
psdZ
=
800
.;
psdRotY
=
0
.
01321
;
holeSize
=
20
.;
}
else
if
(
geoTag
==
"v18f"
)
{
psdX
=
9
.
65
;
psdY
=
0
.;
psdZ
=
800
.;
psdRotY
=
0
.
01321
;
holeSize
=
6
.;
}
else
if
(
geoTag
==
"v18g"
)
{
psdX
=
9
.
65
;
psdY
=
0
.;
psdZ
=
800
.;
psdRotY
=
0
.
01321
;
holeSize
=
0
.;
}
else
if
(
geoTag
==
"v18m"
)
{
psdX
=
8
.
9
;
psdY
=
0
.;
psdZ
=
1500
.;
psdRotY
=
0
.
01321
;
holeSize
=
20
.;
}
else
{
cout
<<
"
\n\n\n
ERROR: Unrecognized geoTag! Exiting!
\n\n\n
"
;
return
;
}
geoTag
+=
"_ideal"
;
const
Double_t
bigModuleSize
=
20
.;
// Module size [cm]
const
Int_t
nModulesX
=
8
;
// Number of modules in a row (x direction)
const
Int_t
nModulesY
=
6
;
// Number of modules in a row (x direction)
TString
geoTag
=
Form
(
"1mod_hole%icm_xshift%4.2fcm"
,
(
int
)
holeSize
,
psdX
);
// Geometry tag
// --------------------------------------------------------------------------
cout
<<
"Number of modules per row and column = "
<<
nModulesX
<<
" "
<<
nModulesY
<<
endl
;
...
...
@@ -57,15 +128,16 @@ void create_psdgeo_ideal()
infoFileName
=
infoFileName
+
geoTag
+
".geo.info"
;
fstream
infoFile
;
infoFile
.
open
(
infoFileName
.
Data
(),
fstream
::
out
);
infoFile
<<
"PSD geometry "
<<
geoTag
<<
" created with create_psdgeo_
with_hole
.C"
<<
endl
<<
endl
;
infoFile
<<
"PSD geometry "
<<
geoTag
<<
" created with create_psdgeo_
ideal
.C"
<<
endl
<<
endl
;
infoFile
<<
"Ideal PSD geometry for performance studies - whole volume as a "
"single module"
<<
endl
;
infoFile
<<
comment
<<
endl
<<
endl
;
infoFile
<<
"Number of modules: "
<<
nModulesX
<<
" x "
<<
nModulesY
<<
endl
;
infoFile
<<
"Big module size: "
<<
bigModuleSize
<<
" cm x "
<<
bigModuleSize
<<
" cm"
<<
endl
;
infoFile
<<
"PSD front plane center coordinates: ("
<<
psdX
<<
", "
<<
psdY
<<
", "
<<
psdZ
<<
") cm"
<<
endl
;
infoFile
<<
"PSD rotation around y axis: "
<<
psdRotY
*
TMath
::
RadToDeg
()
<<
" degrees"
<<
endl
;
infoFile
<<
"
Diagonal size
of the square shaped hole in PSD center: "
<<
holeSize
<<
" cm"
<<
endl
<<
endl
;
infoFile
<<
"
Side length
of the square shaped hole in PSD center: "
<<
holeSize
<<
" cm"
<<
endl
<<
endl
;
// --------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
macro/psd/create_psdgeo_with_hole.C
+
20
−
3
View file @
3029e9f4
...
...
@@ -37,9 +37,8 @@ TGeoVolume* ConstructShield(const char* name, Double_t sizeXY, Double_t holesize
// ====== Main function =====
// ============================================================================
void
create_psdgeo_with_hole
()
void
create_psdgeo_with_hole
(
TString
geoTag
=
"v22a"
)
{
TString
geoTag
=
"v20c"
;
// Geometry tag
// ----- Steering variables ---------------------------------------------
Double_t
psdX
;
// x position (cm) of PSD in cave (front plane center)
...
...
@@ -47,8 +46,25 @@ void create_psdgeo_with_hole()
Double_t
psdZ
;
// z position (cm) of PSD in cave (front plane center)
Double_t
psdRotY
;
// Rotation of PSD around y axis (rad)
Double_t
holeSize
;
// side length of the square shaped hole (cm)
TString
comment
;
// short description
if
(
geoTag
==
"v20c"
)
{
if
(
geoTag
==
"v22a"
)
{
psdX
=
13
.
1
;
psdY
=
0
.;
psdZ
=
1010
;
psdRotY
=
0
.
01335
;
holeSize
=
20
.;
comment
=
"Position for Au beam at 12A GeV/c and 100% magnetic field strength"
;
}
else
if
(
geoTag
==
"v22b"
)
{
psdX
=
28
.
56
;
psdY
=
0
.;
psdZ
=
1010
;
psdRotY
=
0
.
02
906
;
holeSize
=
20
.;
comment
=
"Position for Au beam at 3.3A GeV/c and 60% magnetic field strength (to fit beam dump)"
;
}
else
if
(
geoTag
==
"v20c"
)
{
psdX
=
12
.
95
;
psdY
=
0
.;
psdZ
=
1010
;
...
...
@@ -125,6 +141,7 @@ void create_psdgeo_with_hole()
fstream
infoFile
;
infoFile
.
open
(
infoFileName
.
Data
(),
fstream
::
out
);
infoFile
<<
"PSD geometry "
<<
geoTag
<<
" created with create_psdgeo_with_hole.C"
<<
endl
<<
endl
;
infoFile
<<
comment
<<
endl
<<
endl
;
infoFile
<<
"Number of modules: "
<<
nModulesX
<<
" x "
<<
nModulesY
<<
endl
;
infoFile
<<
"Big module size: "
<<
bigModuleSize
<<
" cm x "
<<
bigModuleSize
<<
" cm"
<<
endl
;
infoFile
<<
"PSD front plane center coordinates: ("
<<
psdX
<<
", "
<<
psdY
<<
", "
<<
psdZ
<<
") cm"
<<
endl
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment