Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
c22988df
Commit
c22988df
authored
10 years ago
by
Frank Gaede
Browse files
Options
Downloads
Patches
Plain Diff
- added 'dimension' argument to DD4hep_SiTrackerBarrelSurfacePlugin (FG)
to handle pixel and strip detectors - updated release notes
parent
096194d2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
DDDetectors/src/SiTrackerBarrel_surfaces.cpp
+63
-23
63 additions, 23 deletions
DDDetectors/src/SiTrackerBarrel_surfaces.cpp
ReadMe.txt
+2
-10
2 additions, 10 deletions
ReadMe.txt
doc/release.notes
+14
-1
14 additions, 1 deletion
doc/release.notes
with
79 additions
and
34 deletions
DDDetectors/src/SiTrackerBarrel_surfaces.cpp
+
63
−
23
View file @
c22988df
...
...
@@ -7,33 +7,73 @@
//
//====================================================================
// Framework include files
namespace
{
struct
UserData
{
int
dimension
;
};
}
#define SURFACEINSTALLER_DATA UserData
#define DD4HEP_USE_SURFACEINSTALL_HELPER DD4hep_SiTrackerBarrelSurfacePlugin
#include
"DD4hep/SurfaceInstaller.h"
/// Install measurement surfaces
template
<
typename
UserData
>
void
Installer
<
UserData
>::
install
(
DetElement
component
,
PlacedVolume
pv
)
{
Volume
comp_vol
=
pv
.
volume
();
if
(
comp_vol
.
isSensitive
()
)
{
Volume
mod_vol
=
parentVolume
(
component
);
DD4hep
::
Geometry
::
Box
mod_shape
(
mod_vol
.
solid
()),
comp_shape
(
comp_vol
.
solid
());
namespace
{
template
<
>
void
Installer
<
UserData
>::
handle_arguments
(
int
argc
,
char
**
argv
)
{
for
(
int
i
=
0
;
i
<
argc
;
++
i
)
{
double
value
=
-
1
;
char
*
ptr
=
::
strchr
(
argv
[
i
],
'='
);
if
(
ptr
)
{
std
::
string
name
(
argv
[
i
]
,
ptr
)
;
value
=
DD4hep
::
Geometry
::
_toDouble
(
++
ptr
);
if
(
!
comp_shape
.
isValid
()
||
!
mod_shape
.
isValid
()
)
{
invalidInstaller
(
"Components and/or modules are not boxes -- invalid shapes"
);
if
(
name
==
"dimension"
)
data
.
dimension
=
value
;
std
::
cout
<<
"DD4hep_SiTrackerBarrelSurfacePlugin: argument["
<<
i
<<
"] = "
<<
name
<<
" = "
<<
value
<<
std
::
endl
;
}
}
else
if
(
!
handleUsingCache
(
component
,
comp_vol
)
)
{
const
double
*
trans
=
placementTranslation
(
component
);
double
half_module_thickness
=
mod_shape
->
GetDZ
();
double
sensitive_z_position
=
trans
[
2
];
double
outer_thickness
=
half_module_thickness
+
sensitive_z_position
;
double
inner_thickness
=
half_module_thickness
-
sensitive_z_position
;
//Surface is placed at the center of the volume, no need to shift origin
//Make sure u,v,n form a right-handed coordinate system, v along the final z
Vector3D
u
(
-
1.
,
0.
,
0.
),
v
(
0.
,
-
1.
,
0.
),
n
(
0.
,
0.
,
1.
),
o
(
0.
,
0.
,
0.
);
VolPlane
surf
(
comp_vol
,
Type
(
Type
::
Sensitive
,
Type
::
Measurement1D
),
inner_thickness
,
outer_thickness
,
u
,
v
,
n
,
o
);
addSurface
(
component
,
surf
);
}
/// Install measurement surfaces
template
<
typename
UserData
>
void
Installer
<
UserData
>::
install
(
DetElement
component
,
PlacedVolume
pv
)
{
Volume
comp_vol
=
pv
.
volume
();
if
(
comp_vol
.
isSensitive
()
)
{
Volume
mod_vol
=
parentVolume
(
component
);
DD4hep
::
Geometry
::
Box
mod_shape
(
mod_vol
.
solid
()),
comp_shape
(
comp_vol
.
solid
());
if
(
!
comp_shape
.
isValid
()
||
!
mod_shape
.
isValid
()
)
{
invalidInstaller
(
"Components and/or modules are not boxes -- invalid shapes"
);
}
else
if
(
!
handleUsingCache
(
component
,
comp_vol
)
)
{
const
double
*
trans
=
placementTranslation
(
component
);
double
half_module_thickness
=
mod_shape
->
GetDZ
();
double
sensitive_z_position
=
trans
[
2
];
double
outer_thickness
=
half_module_thickness
+
sensitive_z_position
;
double
inner_thickness
=
half_module_thickness
-
sensitive_z_position
;
//Surface is placed at the center of the volume, no need to shift origin
//Make sure u,v,n form a right-handed coordinate system, v along the final z
Vector3D
u
(
-
1.
,
0.
,
0.
),
v
(
0.
,
-
1.
,
0.
),
n
(
0.
,
0.
,
1.
),
o
(
0.
,
0.
,
0.
);
Type
type
(
Type
::
Sensitive
)
;
if
(
data
.
dimension
==
1
)
{
type
.
setProperty
(
Type
::
Measurement1D
,
true
)
;
}
else
if
(
data
.
dimension
!=
2
)
{
throw
std
::
runtime_error
(
"**** DD4hep_SiTrackerBarrelSurfacePlugin: no or wrong 'dimension' argument given - has to be 1 or 2"
)
;
}
VolPlane
surf
(
comp_vol
,
type
,
inner_thickness
,
outer_thickness
,
u
,
v
,
n
,
o
);
addSurface
(
component
,
surf
);
}
}
}
}
}
// namespace
This diff is collapsed.
Click to expand it.
ReadMe.txt
+
2
−
10
View file @
c22988df
...
...
@@ -30,7 +30,7 @@ to Geant4. The Geant4 installation needs to be located using the variable -DGean
- examples
Contains different detector examples (CLICSiD,
ILDExDet, ILDExSimu
) together with example applications to illustrate
Contains different detector examples (CLICSiD,
AlignDet, ClientTests
) together with example applications to illustrate
the their usage for simulation, reconstruction and visualization with an emphasis to minimize software
dependencies. For instance, the simulation application example will require to compiler and link
against Geant4 but not the reconstruction application.
...
...
@@ -211,14 +211,6 @@ or build all examples in one go:
make install ; make test
or:
ctest -V -R converter
ctest -V -R sim
ctest -V -R noviceN04
...
9) run SLIC simulation on lccd file created with DD4Hep:
# make sure slic is in the path and then:
slic -g ./ILD_toy.lcdd -o ILD_toy.slcio -x -m ../DD4hep/DDExamples/ILDExSimu/run1.mac
This diff is collapsed.
Click to expand it.
doc/release.notes
+
14
−
1
View file @
c22988df
...
...
@@ -12,7 +12,8 @@ DD4hep ---- Release Notes
- DDDetectors
- new Package containing generic DD4hep detector palette (MF)
- added 'dimension' argument to DD4hep_SiTrackerBarrelSurfacePlugin (FG)
to handle pixel and strip detectors
- DDRec (FG)
- added simple data structs in DDRec/DetectorData.h
...
...
@@ -52,6 +53,7 @@ DD4hep ---- Release Notes
- fixed LCDD el-mag. field converter
- add generic surface installers
- allow for string constants in lcdd define section
- added arguments for surface plugins
- DDSegmentation (FG) :
- fixed compiler warning w/ left shift count >= width of type
...
...
@@ -61,6 +63,8 @@ DD4hep ---- Release Notes
- examples
- add new test MiniTel(escope) to ClientTests (MF)
- moved old obsolete examples to attic
- CMake:
- made DD4HEP_USE_BOOST an option flag (FG)
...
...
@@ -77,6 +81,15 @@ DD4hep ---- Release Notes
- fixed code formating with emacs style:
./doc/format_code.sh
- removed subpackages ( moved to https://svnsrv.desy.de/public/aidasoft/DD4hep/attic ):
DDExamples_obs/
DDSense/
examples/ILDExDet/
examples/ILDExSimu/
examples/firstExample/
examples/noviceN04/
- plus many small bug fixes (use svn log for details )
...
...
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