Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
acts-framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
Gabriel Farrugia
acts-framework
Commits
ca7767dd
Commit
ca7767dd
authored
7 years ago
by
jhrdinka
Browse files
Options
Downloads
Patches
Plain Diff
Implement FCChh custom sorting function & adapt to changes in master
parent
9c0f5956
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Plugins/DD4hep/include/ACTFW/Plugins/DD4hep/DD4hepDetectorOptions.hpp
+40
-1
40 additions, 1 deletion
...ep/include/ACTFW/Plugins/DD4hep/DD4hepDetectorOptions.hpp
with
40 additions
and
1 deletion
Plugins/DD4hep/include/ACTFW/Plugins/DD4hep/DD4hepDetectorOptions.hpp
+
40
−
1
View file @
ca7767dd
...
...
@@ -24,6 +24,33 @@ namespace FW {
namespace
Options
{
void
sortFCChhDetElements
(
std
::
vector
<
dd4hep
::
DetElement
>&
det
)
{
std
::
vector
<
dd4hep
::
DetElement
>
tracker
;
std
::
vector
<
dd4hep
::
DetElement
>
muon
;
for
(
auto
&
detElement
:
det
)
{
std
::
string
detName
=
detElement
.
name
();
if
(
detName
.
find
(
"Muon"
)
!=
std
::
string
::
npos
)
muon
.
push_back
(
detElement
);
else
tracker
.
push_back
(
detElement
);
}
sort
(
muon
.
begin
(),
muon
.
end
(),
[](
const
dd4hep
::
DetElement
&
a
,
const
dd4hep
::
DetElement
&
b
)
{
return
(
a
.
id
()
<
b
.
id
());
});
sort
(
tracker
.
begin
(),
tracker
.
end
(),
[](
const
dd4hep
::
DetElement
&
a
,
const
dd4hep
::
DetElement
&
b
)
{
return
(
a
.
id
()
<
b
.
id
());
});
det
.
clear
();
det
=
tracker
;
det
.
insert
(
det
.
end
(),
muon
.
begin
(),
muon
.
end
());
}
/// the particle gun options, the are prefixes with gp
template
<
class
AOPT
>
void
...
...
@@ -39,7 +66,7 @@ namespace Options {
"The locations of the input DD4hep files, use 'file:foo.xml'. In case "
"you want to read in multiple files, just seperate the strings by "
"space."
)(
"dd4hep-envelopeR"
,
po
::
value
<
double
>
()
->
default_value
(
0.
),
po
::
value
<
double
>
()
->
default_value
(
1.
*
Acts
::
units
::
_mm
),
"The envelop cover in R for DD4hep volumes."
)(
"dd4hep-envelopeR"
,
po
::
value
<
double
>
()
->
default_value
(
1.
*
Acts
::
units
::
_mm
),
...
...
@@ -52,6 +79,14 @@ namespace Options {
"dd4hep-digitizationmodules"
,
po
::
value
<
bool
>
()
->
default_value
(
false
),
"The envelop cover in z for DD4hep volumes."
)(
"dd4hep-layerThickness"
,
po
::
value
<
double
>
()
->
default_value
(
10e-10
),
"In case no surfaces (to be contained by the layer) are handed over, "
"the layer thickness will be set to this value."
)(
"dd4hep-buildFCChh"
,
po
::
value
<
bool
>
()
->
default_value
(
true
),
"If you are not building the FCChh detector please set this flag to "
"false."
)(
"dd4hep-loglevel"
,
po
::
value
<
size_t
>
()
->
default_value
(
2
),
"The output log level of the geometry building. Please set the "
...
...
@@ -80,6 +115,10 @@ namespace Options {
gsConfig
.
envelopeZ
=
vm
[
"dd4hep-envelopeZ"
].
template
as
<
double
>();
gsConfig
.
buildDigitizationModules
=
vm
[
"dd4hep-digitizationmodules"
].
template
as
<
bool
>();
gsConfig
.
defaultLayerThickness
=
vm
[
"dd4hep-layerThickness"
].
template
as
<
double
>();
if
(
vm
[
"dd4hep-buildFCChh"
].
template
as
<
bool
>())
gsConfig
.
sortDetectors
=
sortFCChhDetElements
;
return
gsConfig
;
}
}
...
...
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