Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
athena
Manage
Activity
Members
Labels
Plan
Issues
38
Issue boards
Milestones
Wiki
Code
Merge requests
34
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
EIC
detectors
athena
Commits
6e18a867
Commit
6e18a867
authored
3 years ago
by
Shujie Li
Committed by
Sylvester Joosten
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
update beampipe and sensitive material
parent
d958233f
No related branches found
No related tags found
1 merge request
!230
update beampipe and sensitive material
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
compact/definitions.xml
+2
-2
2 additions, 2 deletions
compact/definitions.xml
compact/vertex_tracker.xml
+1
-1
1 addition, 1 deletion
compact/vertex_tracker.xml
scripts/test_matscan.cxx
+183
-0
183 additions, 0 deletions
scripts/test_matscan.cxx
with
186 additions
and
3 deletions
compact/definitions.xml
+
2
−
2
View file @
6e18a867
...
@@ -330,8 +330,8 @@ Examples:
...
@@ -330,8 +330,8 @@ Examples:
<constant
name=
"VertexTrackerEndcapP_rmax"
value=
"VertexTrackerBarrel_rmax"
/>
<constant
name=
"VertexTrackerEndcapP_rmax"
value=
"VertexTrackerBarrel_rmax"
/>
<constant
name=
"VertexTrackerEndcapN_rmax"
value=
"VertexTrackerBarrel_rmax"
/>
<constant
name=
"VertexTrackerEndcapN_rmax"
value=
"VertexTrackerBarrel_rmax"
/>
<constant
name=
"VertexTrackerEndcapP_rmin"
value=
"Beampipe_rmax +
5
.0*mm"
/>
<constant
name=
"VertexTrackerEndcapP_rmin"
value=
"Beampipe_rmax +
1
.0*mm"
/>
<constant
name=
"VertexTrackerEndcapN_rmin"
value=
"Beampipe_rmax +
5
.0*mm"
/>
<constant
name=
"VertexTrackerEndcapN_rmin"
value=
"Beampipe_rmax +
1
.0*mm"
/>
<constant
name=
"VertexTrackerEndcapP_zmax"
value=
"300.0*mm"
/>
<constant
name=
"VertexTrackerEndcapP_zmax"
value=
"300.0*mm"
/>
<constant
name=
"VertexTrackerEndcapN_zmax"
value=
"300.0*mm"
/>
<constant
name=
"VertexTrackerEndcapN_zmax"
value=
"300.0*mm"
/>
...
...
This diff is collapsed.
Click to expand it.
compact/vertex_tracker.xml
+
1
−
1
View file @
6e18a867
...
@@ -130,7 +130,7 @@ Simple carbon fiber support shell.
...
@@ -130,7 +130,7 @@ Simple carbon fiber support shell.
<module
name=
"SupportShell"
vis=
"VertexSupportVis"
>
<module
name=
"SupportShell"
vis=
"VertexSupportVis"
>
<module_component
name=
"CF Shell"
<module_component
name=
"CF Shell"
material=
"CarbonFiber"
material=
"CarbonFiber"
sensitive=
"
tru
e"
sensitive=
"
fals
e"
width=
"VertexBarrelShellStave_width"
width=
"VertexBarrelShellStave_width"
length=
"VertexBarrelShell_length"
length=
"VertexBarrelShell_length"
thickness=
"VertexBarrelShell_thickness"
thickness=
"VertexBarrelShell_thickness"
...
...
This diff is collapsed.
Click to expand it.
scripts/test_matscan.cxx
0 → 100644
+
183
−
0
View file @
6e18a867
R__LOAD_LIBRARY
(
libDDCore
.
so
)
// R__LOAD_LIBRARY(libActsPluginDD4hep.so)
R__LOAD_LIBRARY
(
libDDG4
.
so
)
R__LOAD_LIBRARY
(
libDDG4IO
.
so
)
#include
"DD4hep/Detector.h"
#include
"DD4hep/DetElement.h"
#include
"DD4hep/Objects.h"
#include
"DD4hep/Detector.h"
#include
"DDG4/Geant4Data.h"
#include
"DDRec/CellIDPositionConverter.h"
#include
"DDRec/SurfaceManager.h"
#include
"DDRec/Surface.h"
#include
"TCanvas.h"
#include
"TChain.h"
#include
"TGeoMedium.h"
#include
"TGeoManager.h"
#include
"DDRec/MaterialScan.h"
#include
"DDRec/MaterialManager.h"
#include
"DD4hep/Detector.h"
#include
"DD4hep/Printout.h"
#include
"fmt/core.h"
#include
<iostream>
#include
<fstream>
// #include "Acts/Geometry/TrackingGeometry.hpp"
// #include "Acts/Geometry/TrackingVolume.hpp"
// #include "Acts/Plugins/DD4hep/ConvertDD4hepDetector.hpp"
using
namespace
dd4hep
;
using
namespace
dd4hep
::
rec
;
void
test_matscan
(
const
char
*
compact
=
"athena.xml"
,
TString
face
=
"z"
){
dd4hep
::
Detector
&
detector
=
dd4hep
::
Detector
::
getInstance
();
detector
.
fromCompact
(
compact
);
MaterialScan
matscan
(
detector
);
fmt
::
print
(
"
\n
"
);
fmt
::
print
(
"All detector subsystem names:
\n
"
);
for
(
const
auto
&
d
:
detector
.
detectors
()
)
{
fmt
::
print
(
" {}
\n
"
,
d
.
first
);
}
return
;
TString
det_list
[
14
]
=
{
"TrackerBarrel_Inner"
,
"TrackerBarrel_Outer"
,
"TrackerEndcapN_Inner"
,
"TrackerEndcapN_Outer"
,
"TrackerEndcapP_Inner"
,
"TrackerEndcapP_Outer"
,
"TrackerSubAssembly_Inner"
,
"TrackerSubAssembly_Outer"
,
"VertexBarrel"
,
"VertexBarrelSubAssembly"
,
"VertexEndcapN"
,
"VertexEndcapP"
,
"VertexEndcapSubAssembly"
,
"cb_DIRC"
};
for
(
int
dd
=
0
;
dd
<
14
;
dd
++
){
TString
detname
=
det_list
[
dd
];
matscan
.
setDetector
(
detname
.
Data
());
double
x0
=
0
,
y0
=
0
,
z0
=
0
,
x1
,
y1
,
z1
;
// cm
double
epsilon
=
1e-4
;
// (mm) default 1e-4: Materials with a thickness smaller than epsilon (default 1e-4=1mu
const
char
*
fmt1
=
"%7.2f %7.2f %7.2f %5d %-20s %3.0f %8.3f %8.4f %11.4f %11.4f %10.3f %8.2f %11.6f %11.6f %7.2f %7.2f %7.2f
\n
"
;
const
char
*
fmt2
=
"%7.2f %7.2f %7.2f %5d %-20s %3.0f %8.3f %8.4f %11.6g %11.6g %10.3f %8.2f %11.6f %11.6f %7.2f %7.2f %7.2f
\n
"
;
// x1 = 100; y1 = 100; z1 = 100;
// y1 = 100;
double
a1
,
a2
,
a3
;
for
(
a3
=-
100
;
a3
<
101
;
a3
=
a3
+
200
){
TString
fname
=
Form
(
"/global/u2/s/shujie/eic/output/matscan/%s_%s%g.dat"
,
detname
.
Data
(),
face
.
Data
(),
a3
);
FILE
*
pFile
;
pFile
=
fopen
(
fname
,
"w"
);
for
(
a1
=-
100
;
a1
<
100
;
a1
=
a1
+
1
){
for
(
a2
=-
100
;
a2
<
100
;
a2
=
a2
+
1
){
if
(
face
==
"x"
){
y1
=
a1
;
z1
=
a2
;
x1
=
a3
;
}
else
if
(
face
==
"y"
){
x1
=
a1
;
z1
=
a2
;
y1
=
a3
;
}
else
if
(
face
==
"z"
){
x1
=
a1
;
y1
=
a2
;
z1
=
a3
;
}
Vector3D
p0
(
x0
,
y0
,
z0
),
p1
(
x1
,
y1
,
z1
);
Vector3D
end
,
direction
;
direction
=
(
p1
-
p0
).
unit
();
const
auto
&
placements
=
matscan
.
scan
(
x0
,
y0
,
z0
,
x1
,
y1
,
z1
,
epsilon
);
// matscan.print(x0,y0,z0,x1,y1,z1,epsilon);
// return;
// Vector3D end, direction;
double
sum_x0
=
0
;
double
sum_lambda
=
0
;
double
path_length
=
0
,
total_length
=
0
;
// TString fname = Form("/global/u2/s/shujie/eic_dir/matscan_%g_%g_%g.dat",x1,y1,z1);
for
(
unsigned
i
=
0
;
i
<
placements
.
size
();
i
++
){
TGeoMaterial
*
mat
=
placements
[
i
].
first
->
GetMaterial
();
double
length
=
placements
[
i
].
second
;
double
nx0
=
length
/
mat
->
GetRadLen
();
double
nLambda
=
length
/
mat
->
GetIntLen
();
sum_x0
+=
nx0
;
sum_lambda
+=
nLambda
;
path_length
+=
length
;
total_length
+=
length
;
end
=
p0
+
total_length
*
direction
;
const
char
*
fmt
=
mat
->
GetRadLen
()
>=
1e5
?
fmt2
:
fmt1
;
// fprintf(pFile, "%d\n",i+1);
fprintf
(
pFile
,
fmt
,
x1
,
y1
,
z1
,
i
+
1
,
mat
->
GetName
(),
mat
->
GetZ
(),
mat
->
GetA
(),
mat
->
GetDensity
(),
mat
->
GetRadLen
(),
mat
->
GetIntLen
(),
length
,
path_length
,
sum_x0
,
sum_lambda
,
end
[
0
],
end
[
1
],
end
[
2
]);
// ::printf(fmt, i+1, mat->GetName(), mat->GetZ(), mat->GetA(),
// mat->GetDensity(), mat->GetRadLen(), mat->GetIntLen(),
// length, path_length, sum_x0, sum_lambda, end[0], end[1], end[2]);
// // mat->Print();
}
}
cout
<<
detname
<<
" "
<<
x1
<<
","
<<
y1
<<
","
<<
z1
<<
endl
;
// cout<<x1<<","<<y1<<","<<z1<<": "<<placements.size()<<" "<<sum_x0<<" "<<total_length<<endl;
}
fclose
(
pFile
);
}
}
}
/*
<!-- <include ref="ecal_barrel_hybrid.xml"/> -->
<TGeoManager::CountLevels>: max level = 5, max placements = 2796
Error in <TGeoVoxelFinder::SortAll>: Volume B0Tracker: Cannot make slices on any axis
Error in <TGeoVoxelFinder::SortAll>: Volume ForwardRomanPot_Station_1: Cannot make slices on any axis
{ B0APF_BeamlineMagnet
B0PF_BeamlineMagnet
B0Tracker
B1APF_BeamlineMagnet
B1PF_BeamlineMagnet
B2PF_BeamlineMagnet
BPFR1_BeamlineMagnet
BackwardTOF
BarrelTOF
BeamPipe
EcalEndcapN
EcalEndcapP
ForwardOffMTracker
ForwardRomanPot_Station_1
ForwardTOF
ForwardTRD
GaseousRICH
HcalBarrel
HcalEndcapN
HcalEndcapP
Q1APF_BeamlineMagnet
Q1BPF_BeamlineMagnet
Q2PF_BeamlineMagnet
QPFC1_BeamlineMagnet
QPFC2_BeamlineMagnet
QPFC3_BeamlineMagnet
QPFC4_BeamlineMagnet
QPFR1_BeamlineMagnet
QPFR2_BeamlineMagnet
SolenoidCoilBarrel
SolenoidCoilEndcapN
SolenoidCoilEndcapP
TOFSubAssembly
TrackerBarrel_Inner
TrackerBarrel_Outer
TrackerEndcapN_Inner
TrackerEndcapN_Outer
TrackerEndcapP_Inner
TrackerEndcapP_Outer
TrackerSubAssembly_Inner
TrackerSubAssembly_Outer
VertexBarrel
VertexBarrelSubAssembly
VertexEndcapN
VertexEndcapP
VertexEndcapSubAssembly
cb_DIRC
ce_MRICH
ffi_ZDC_ECAL
ffi_ZDC_HCAL}
*/
This diff is collapsed.
Click to expand it.
Shujie Li
@shujie
mentioned in commit
b556ffdf
·
3 years ago
mentioned in commit
b556ffdf
mentioned in commit b556ffdff590516e9832265ce8b397903bbdef42
Toggle commit list
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