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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
EIC
athena
Commits
3efb3867
Commit
3efb3867
authored
3 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "MRICH overlap in master branch"
parent
ddceae92
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/mrich.xml
+8
-7
8 additions, 7 deletions
compact/mrich.xml
src/MRich_geo.cpp
+13
-11
13 additions, 11 deletions
src/MRich_geo.cpp
with
21 additions
and
18 deletions
compact/mrich.xml
+
8
−
7
View file @
3efb3867
...
...
@@ -91,19 +91,20 @@
</photodet>
</module>
<comment>
Modules are only listed here for one quadrant
Modules are only listed here for one quadrant. The modules point back to the
z0 position (should be their actual position, but breaks parametrization).
</comment>
<positions
scale=
"1.03"
>
<positions
scale=
"1.03"
z0=
"157.5*cm"
>
<position
x=
"-41.3250000000"
y=
"178.6750000000"
/>
<position
x=
" 96.0250000001"
y=
"178.6750000000"
/>
</positions>
<positions
scale=
"1.036"
>
<positions
scale=
"1.036"
z0=
"157.5*cm"
>
<position
x=
"-41.3250000000"
y=
"316.0250000001"
/>
<position
x=
" 96.0250000001"
y=
"316.0250000001"
/>
<position
x=
"233.3750000002"
y=
"178.6750000000"
/>
<position
x=
"233.3750000002"
y=
"316.0250000001"
/>
</positions>
<positions
scale=
"1.052"
>
<positions
scale=
"1.052"
z0=
"157.5*cm"
>
<position
x=
"-41.3250000000"
y=
"453.3750000002"
/>
<position
x=
" 96.0250000001"
y=
"453.3750000002"
/>
<position
x=
"233.3750000002"
y=
"453.3750000002"
/>
...
...
@@ -111,7 +112,7 @@
<position
x=
"370.7250000003"
y=
"316.0250000001"
/>
<position
x=
"370.7250000003"
y=
"178.6750000000"
/>
</positions>
<positions
scale=
"1.078"
>
<positions
scale=
"1.078"
z0=
"157.5*cm"
>
<position
x=
"-41.3250000000"
y=
"590.7250000003"
/>
<position
x=
" 96.0250000001"
y=
"590.7250000003"
/>
<position
x=
"233.3750000002"
y=
"590.7250000003"
/>
...
...
@@ -121,7 +122,7 @@
<position
x=
"508.0750000004"
y=
"316.0250000001"
/>
<position
x=
"508.0750000004"
y=
"453.3750000002"
/>
</positions>
<positions
scale=
"1.09"
>
<positions
scale=
"1.09"
z0=
"157.5*cm"
>
<position
x=
"-41.3250000000"
y=
"728.0750000004"
/>
<position
x=
" 96.0250000001"
y=
"728.0750000004"
/>
<!--position x="233.3750000002" y="728.0750000004"/-->
...
...
@@ -132,7 +133,7 @@
<position
x=
"645.4250000005"
y=
"316.0250000001"
/>
<position
x=
"645.4250000005"
y=
"178.6750000000"
/>
</positions>
<positions
scale=
"1.095"
>
<positions
scale=
"1.095"
z0=
"157.5*cm"
>
<!--position x="-41.3250000000" y="865.4250000005"/-->
<!--position x=" 96.0250000001" y="865.4250000005"/-->
<!--position x="233.3750000002" y="865.4250000005"/-->
...
...
This diff is collapsed.
Click to expand it.
src/MRich_geo.cpp
+
13
−
11
View file @
3efb3867
...
...
@@ -33,14 +33,15 @@ static Ref_t createDetector(Detector& description, xml::Handle_t e, SensitiveDet
OpticalSurfaceManager
surfMgr
=
description
.
surfaceManager
();
// read module positions
std
::
vector
<
std
::
pair
<
double
,
double
>>
positions
;
std
::
vector
<
std
::
tuple
<
double
,
double
,
double
>>
positions
;
for
(
xml_coll_t
x_positions_i
(
x_det
,
_Unicode
(
positions
));
x_positions_i
;
++
x_positions_i
)
{
xml_comp_t
x_positions
=
x_positions_i
;
for
(
xml_coll_t
x_position_i
(
x_positions
,
_U
(
position
));
x_position_i
;
++
x_position_i
)
{
xml_comp_t
x_position
=
x_position_i
;
positions
.
push_back
(
std
::
make_pair
(
x_positions
.
scale
()
*
x_position
.
x
()
*
mm
,
x_positions
.
scale
()
*
x_position
.
y
()
*
mm
));
std
::
make_tuple
(
x_positions
.
scale
()
*
x_position
.
x
()
*
mm
,
x_positions
.
scale
()
*
x_position
.
y
()
*
mm
,
-
x_positions
.
z0
()));
}
}
...
...
@@ -303,20 +304,21 @@ static Ref_t createDetector(Detector& description, xml::Handle_t e, SensitiveDet
for
(
auto
&
p
:
positions
)
{
// get positions in one quadrant
double
x
=
p
.
first
;
double
y
=
p
.
second
;
double
z
=
-
zpos
;
double
x
=
std
::
get
<
0
>
(
p
)
;
double
y
=
std
::
get
<
1
>
(
p
)
;
double
z
0
=
std
::
get
<
2
>
(
p
)
;
// and place in all quadrants (intentional shadowing)
for
(
auto
&
p
:
decltype
(
positions
){{
x
,
y
},
{
y
,
-
x
},
{
-
x
,
-
y
},
{
-
y
,
x
}})
{
for
(
auto
&
p
:
decltype
(
positions
){{
x
,
y
,
z0
},
{
y
,
-
x
,
z0
},
{
-
x
,
-
y
,
z0
},
{
-
y
,
x
,
z0
}})
{
// get positions (intentional shadowing)
double
x
=
p
.
first
;
double
y
=
p
.
second
;
double
x
=
std
::
get
<
0
>
(
p
);
double
y
=
std
::
get
<
1
>
(
p
);
double
z0
=
std
::
get
<
2
>
(
p
);
// get angles
double
rotAngX
=
atan
(
y
/
z
);
double
rotAngY
=
-
1.
*
atan
(
x
/
z
);
double
rotAngX
=
atan
(
y
/
z
0
);
double
rotAngY
=
-
1.
*
atan
(
x
/
z
0
);
/*
ROOT::Math::XYZVector x_location(p.x(), p.y(), zmin+std::signbit(zmin)*mod_length/2.0);
...
...
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