R3BROOT
R3B analysis software
Toggle main menu visibility
Loading...
Searching...
No Matches
helper_neuland_geometry.C
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) 2023 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3
* Copyright (C) 2023 Members of R3B Collaboration *
4
* *
5
* This software is distributed under the terms of the *
6
* GNU General Public Licence (GPL) version 3, *
7
* copied verbatim in the file "LICENSE". *
8
* *
9
* In applying this license GSI does not waive the privileges and immunities *
10
* granted to it by virtue of its status as an Intergovernmental Organization *
11
* or submit itself to any jurisdiction. *
12
******************************************************************************/
13
14
const
Int_t
gPaddlesPerPlane
= 50;
15
16
const
Double_t
gPaddleDistance
= 2.5;
17
const
Double_t
gPaddleBaseLength
= 125.0;
18
const
Double_t
gPaddleConeLength
= 5.;
19
20
const
Double_t
gBC408ConeRadius
= 1.2;
21
const
Double_t
gBC408Thickness
= 2.4;
22
const
Double_t
gAlThickness
= 0.02;
23
const
Double_t
gTapeThickness
= 0.05;
24
25
TGeoMedium*
BuildMaterial
(
const
TString material, FairGeoMedia* geoMedia, FairGeoBuilder* geoBuild)
26
{
27
FairGeoMedium* fairMedium = geoMedia->getMedium(material);
28
if
(!fairMedium)
29
{
30
std::cout <<
"FairGeoMedium "
<< material <<
" not found"
<< std::endl;
31
}
32
33
geoBuild->createMedium(fairMedium);
34
TGeoMedium* med = gGeoManager->GetMedium(material);
35
if
(!med)
36
{
37
std::cout <<
"TGeoMedium "
<< material <<
" not found"
<< std::endl;
38
}
39
return
med;
40
}
41
46
TGeoShape*
BuildPaddleShape
(
const
TString& name,
47
const
Double_t length,
48
const
Double_t width,
49
const
Double_t coneRadius,
50
const
Double_t coneLength)
51
{
52
new
TGeoBBox(name +
"Box"
, length, width, width);
53
new
TGeoCone(name +
"Cone"
, coneLength + 0.001, 0., coneRadius, 0., width * TMath::Sqrt(2.));
54
new
TGeoBBox(name +
"Conebox"
, width, width, coneLength);
55
TGeoShape* shape =
new
TGeoCompositeShape(
56
name,
57
name +
"Box + (("
+ name +
"Conebox*"
+ name +
"Cone):trc1) + (("
+ name +
"Conebox*"
+ name +
"Cone):trc2)"
);
58
return
shape;
59
}
60
64
TGeoVolume*
BuildPaddleVolume
()
65
{
66
// Load Interfaces to build materials
67
FairGeoLoader* geoLoad = FairGeoLoader::Instance();
68
FairGeoInterface* geoFace = geoLoad->getGeoInterface();
69
geoFace->setMediaFile(TString(gSystem->Getenv(
"VMCWORKDIR"
)) +
"/geometry/media_r3b.geo"
);
70
geoFace->readMedia();
71
FairGeoBuilder* geoBuild = geoLoad->getGeoBuilder();
72
FairGeoMedia* geoMedia = geoFace->getMedia();
73
const
TGeoMedium* medBC408 =
BuildMaterial
(
"BC408"
, geoMedia, geoBuild);
74
const
TGeoMedium* medCH2 =
BuildMaterial
(
"polyethylene"
, geoMedia, geoBuild);
75
const
TGeoMedium* medAl =
BuildMaterial
(
"aluminium"
, geoMedia, geoBuild);
76
77
// Prepare Transformations for cones
78
TGeoRotation* r1 =
new
TGeoRotation();
79
r1->RotateY(90);
80
TGeoCombiTrans* trc1 =
new
TGeoCombiTrans(TGeoTranslation(-(
gPaddleBaseLength
+
gPaddleConeLength
), 0., 0.), *r1);
81
trc1->SetName(
"trc1"
);
82
trc1->RegisterYourself();
83
84
TGeoRotation* r2 =
new
TGeoRotation();
85
r2->RotateY(-90);
86
TGeoCombiTrans* trc2 =
new
TGeoCombiTrans(TGeoTranslation(+(
gPaddleBaseLength
+
gPaddleConeLength
), 0., 0.), *r2);
87
trc2->SetName(
"trc2"
);
88
trc2->RegisterYourself();
89
90
// Build shapes
91
const
TGeoShape* shapeBC408 =
92
BuildPaddleShape
(
"shapeBC408"
,
gPaddleBaseLength
,
gBC408Thickness
,
gBC408ConeRadius
,
gPaddleConeLength
);
93
94
BuildPaddleShape
(
"shapeAlWrappingSolid"
,
95
gPaddleBaseLength
,
96
gBC408Thickness
+
gAlThickness
,
97
gBC408ConeRadius
+
gAlThickness
,
98
gPaddleConeLength
);
99
const
TGeoShape* shapeAlWrapping =
new
TGeoCompositeShape(
"shapeAlWrapping"
,
"shapeAlWrappingSolid - shapeBC408"
);
100
101
BuildPaddleShape
(
"shapeTapeWrappingSolid"
,
102
gPaddleBaseLength
,
103
gBC408Thickness
+
gAlThickness
+
gTapeThickness
,
104
gBC408ConeRadius
+
gAlThickness
+
gTapeThickness
,
105
gPaddleConeLength
);
106
const
TGeoShape* shapeTapeWrapping =
107
new
TGeoCompositeShape(
"shapeTapeWrapping"
,
"shapeTapeWrappingSolid - shapeAlWrappingSolid"
);
108
109
// Build Volumes. Note that the volume names are important and reappear in
110
// R3BNeuland()
111
TGeoVolume* volBC408 =
new
TGeoVolume(
"volBC408"
, shapeBC408, medBC408);
112
volBC408->SetLineColor(33);
// greyish plue
113
volBC408->SetTransparency(30);
114
TGeoVolume* volAlWrapping =
new
TGeoVolume(
"volAlWrapping"
, shapeAlWrapping, medAl);
115
volAlWrapping->SetLineColor(17);
// grey/silver
116
TGeoVolume* volTapeWrapping =
new
TGeoVolume(
"volTapeWrapping"
, shapeTapeWrapping, medCH2);
117
volTapeWrapping->SetLineColor(1);
// black
118
119
// Make the elementary assembly
120
TGeoVolume* volPaddle =
new
TGeoVolumeAssembly(
"volPaddle"
);
121
volPaddle->AddNode(volBC408, 1);
122
volPaddle->AddNode(volAlWrapping, 1);
123
volPaddle->AddNode(volTapeWrapping, 1);
124
125
return
volPaddle;
126
}
gPaddlesPerPlane
const Int_t gPaddlesPerPlane
Definition
helper_neuland_geometry.C:14
gPaddleConeLength
const Double_t gPaddleConeLength
Definition
helper_neuland_geometry.C:18
BuildPaddleShape
TGeoShape * BuildPaddleShape(const TString &name, const Double_t length, const Double_t width, const Double_t coneRadius, const Double_t coneLength)
Building the shape of a paddle The paddle end cones are created by intersection ("*") of a small box ...
Definition
helper_neuland_geometry.C:46
gBC408Thickness
const Double_t gBC408Thickness
Definition
helper_neuland_geometry.C:21
gPaddleBaseLength
const Double_t gPaddleBaseLength
Definition
helper_neuland_geometry.C:17
gPaddleDistance
const Double_t gPaddleDistance
Definition
helper_neuland_geometry.C:16
gAlThickness
const Double_t gAlThickness
Definition
helper_neuland_geometry.C:22
BuildMaterial
TGeoMedium * BuildMaterial(const TString material, FairGeoMedia *geoMedia, FairGeoBuilder *geoBuild)
Definition
helper_neuland_geometry.C:25
BuildPaddleVolume
TGeoVolume * BuildPaddleVolume()
A paddle consists of the scintillator volume, wrapped with Al and Tape.
Definition
helper_neuland_geometry.C:64
gBC408ConeRadius
const Double_t gBC408ConeRadius
Definition
helper_neuland_geometry.C:20
gTapeThickness
const Double_t gTapeThickness
Definition
helper_neuland_geometry.C:23
neuland
geobase
helper_neuland_geometry.C
Generated by
1.18.0