Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zhiwen Zhao
athena
Commits
adfa7bae
Commit
adfa7bae
authored
3 years ago
by
Dmitry Romanov
Browse files
Options
Downloads
Patches
Plain Diff
Works again
parent
f071ed25
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compact/dirc.xml
+14
-13
14 additions, 13 deletions
compact/dirc.xml
src/DIRC_geo.cpp
+17
-6
17 additions, 6 deletions
src/DIRC_geo.cpp
with
31 additions
and
19 deletions
compact/dirc.xml
+
14
−
13
View file @
adfa7bae
...
...
@@ -21,12 +21,13 @@
</comment>
<define>
<constant
name=
"DIRCFake_rmin"
value=
"
BarrelTracking_rmax-11*cm
"
/>
<constant
name=
"DIRCFake_rmin"
value=
"
DIRC_rmin
"
/>
<constant
name=
"DIRC_rotation"
value=
"pi"
comment=
"Allows DIRC flip"
/>
<!-- <constant name="cb_DIRC_length" value="DIRCLength"/> -->
<!-- CLEANUP THIS if not sure. This is from the initial implementation
<constant name="DIRC_length" value="285.500*cm"/>
<constant name="DIRCFake_rmin" value="82.00*cm"/>-->
<constant
name=
"DIRC_verbose"
value=
"1"
comment=
"0-no output, 1-some, 2-verbose"
/>
<!-- Prism -->
<constant
name=
"DIRCPrism_width"
value=
"360*mm"
/>
...
...
@@ -37,8 +38,8 @@
<constant
name=
"DIRCPrism_height"
value=
"DIRCPrism_long_edge"
/>
<!-- DIRC length -->
<constant
name=
"DIRCMain_length"
value=
"DIRC_length"
/>
<constant
name=
"DIRCFake_offset"
value=
"DIRC_offset+15*cm"
/>
<constant
name=
"DIRCMain_length"
value=
"DIRC_length"
/>
<constant
name=
"DIRCFake_offset"
value=
"DIRC_offset+15*cm"
/>
<!-- Box - main DIRC modules -->
<constant
name=
"DIRCBox_count"
value=
"16"
comment=
"Number of DIRC boxes per... DIRC. 16 - default"
/>
...
...
@@ -77,7 +78,7 @@
RMax is calculated according to "rectangle inside ring" problem solution
https://math.stackexchange.com/questions/4222684/calculate-rectangle-inside-ring-parameters/4222691#4222691
</comment>
<constant
name=
"DIRCFake_rmax"
value=
"sqrt( (DIRCFake_rmin+DIRCPrism_height)^2 + 0.25*(DIRCPrism_height)^2 )"
/>
<constant
name=
"DIRCFake_rmax"
value=
"sqrt( (DIRCFake_rmin+DIRCPrism_height)^2 + 0.25*(DIRCPrism_height)^2 )"
/>
</define>
<materials>
...
...
@@ -107,16 +108,16 @@
</regions>
<display>
<vis
name=
"DIRCTube"
ref=
"Anl
Teal
"
alpha=
"0.
1
"
visible=
"true"
showDaughters=
"true"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCTube"
ref=
"Anl
Gold
"
alpha=
"0.
3
"
visible=
"true"
showDaughters=
"true"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCBox"
ref=
"AnlLight_Gray"
alpha=
"0.1"
visible=
"true"
showDaughters=
"true"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCLens1"
ref=
"AnlProcess_Blue"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCLens2"
ref=
"AnlProcess_Blue"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCLens3"
ref=
"AnlTeal"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCBar"
ref=
"AnlTeal"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCGlue"
ref=
"AnlViolet"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCMirror"
ref=
"AnlGray"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCPrism"
ref=
"AnlTeal"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCFd"
ref=
"AnlRed"
visible=
"true"
showDaughters=
"false"
/>
<vis
name=
"DIRCBar"
ref=
"AnlTeal"
alpha=
"0.5"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCGlue"
ref=
"AnlViolet"
alpha=
"0.5"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCMirror"
ref=
"AnlGray"
alpha=
"0.5"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCPrism"
ref=
"AnlTeal"
alpha=
"0.5"
visible=
"true"
showDaughters=
"false"
lineStyle=
"solid"
drawingStyle=
"solid"
/>
<vis
name=
"DIRCFd"
ref=
"AnlRed"
alpha=
"0.5"
visible=
"true"
showDaughters=
"false"
/>
</display>
<detectors>
...
...
@@ -142,11 +143,11 @@
length=
"DIRCBar_length"
repeat=
"DIRCBar_count"
gap=
"DIRCBar_gap"
material=
"Quartz"
material=
"Quartz
Optical
"
vis=
"DIRCBar"
/>
<glue
thickness=
"DIRCGlue_thickness"
material=
"Epotek"
vis=
"DIRCGlue"
/>
<glue
thickness=
"DIRCGlue_thickness"
material=
"Epotek
Optical
"
vis=
"DIRCGlue"
/>
<!-- lens -->
<lens
...
...
@@ -164,7 +165,7 @@
width=
"DIRCFd_width"
thickness=
"DIRCFd_thickness"
vis=
"DIRCFd"
material=
"Quartz"
material=
"Quartz
Optical
"
/>
</module>
</detector>
...
...
This diff is collapsed.
Click to expand it.
src/DIRC_geo.cpp
+
17
−
6
View file @
adfa7bae
...
...
@@ -3,6 +3,7 @@
#include
"DD4hep/Printout.h"
#include
"DDRec/DetectorData.h"
#include
"DDRec/Surface.h"
#include
"fmt/core.h"
#include
<XML/Helper.h>
//////////////////////////////////
...
...
@@ -30,6 +31,14 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
double
det_rin
=
dirc_dim
.
rmin
();
double
det_rout
=
dirc_dim
.
rmax
();
double
SizeZ
=
dirc_dim
.
length
();
int
verbose
=
desc
.
constant
<
int
>
(
"DIRC_verbose"
);
// >oO debug output
if
(
verbose
)
{
fmt
::
print
(
"DIRC: dimensions rin={}[cm] rout={}[cm] len={}[cm]
\n
"
,
det_rin
/
cm
,
det_rout
/
cm
,
SizeZ
/
cm
);
}
// DEBUG
// double mirror_r1 = x_det.attr<double>(_Unicode(r1));
...
...
@@ -39,15 +48,16 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
Material
Vacuum
=
desc
.
material
(
"Vacuum"
);
Material
air
=
desc
.
material
(
"AirOptical"
);
Material
quartz
=
desc
.
material
(
"Quartz"
);
Material
epotek
=
desc
.
material
(
"Epotek"
);
Material
nlak33a
=
desc
.
material
(
"Nlak33a"
);
Material
quartz
=
desc
.
material
(
"Quartz
Optical
"
);
Material
epotek
=
desc
.
material
(
"Epotek
Optical
"
);
Material
nlak33a
=
desc
.
material
(
"Nlak33a
Optical
"
);
auto
&
bar_material
=
quartz
;
auto
mirror_material
=
desc
.
material
(
"Aluminum"
);
// mirror material
Tube
det_geo
(
det_rin
,
det_rout
,
SizeZ
/
2.
,
0.
,
360.0
*
deg
);
//
Volume det_volume("DIRC", det_geo,
Vacuum
);
Assembly
det_volume
(
"DIRC"
);
Volume
det_volume
(
"DIRC"
,
det_geo
,
air
);
//
Assembly det_volume("DIRC");
det_volume
.
setVisAttributes
(
desc
.
visAttributes
(
xml_det
.
visStr
()));
DetElement
det
(
det_name
,
det_id
);
...
...
@@ -284,7 +294,8 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
Position
fPrismShift
(
prism_shift_x
,
0
,
prism_shift_z
);
dirc_module
.
placeVolume
(
lPrizm
,
Transform3D
(
xRot
,
fPrismShift
));
dirc_module
.
placeVolume
(
lFd
,
Position
(
0.5
*
fFd
[
1
]
-
0.5
*
fPrizm
[
3
]
-
evshiftx
,
0
,
evshiftz
));
//dirc_module.placeVolume(lFd, Position(0.5 * fFd[1] - 0.5 * fPrizm[3] - evshiftx, 0, evshiftz));
double
dphi
=
2
*
M_PI
/
(
double
)
fNBoxes
;
for
(
int
i
=
0
;
i
<
fNBoxes
;
i
++
)
{
...
...
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