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
a963a4ab
Commit
a963a4ab
authored
9 years ago
by
Nikiforos Nikiforou
Browse files
Options
Downloads
Patches
Plain Diff
Changes to ConvertCLICtoGear plugin so it gives a basic gear file
parent
ecc6d72e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDRec/src/gear/createGearForCLIC.cpp
+25
-25
25 additions, 25 deletions
DDRec/src/gear/createGearForCLIC.cpp
with
25 additions
and
25 deletions
DDRec/src/gear/createGearForCLIC.cpp
+
25
−
25
View file @
a963a4ab
...
@@ -70,29 +70,29 @@ namespace DD4hep{
...
@@ -70,29 +70,29 @@ namespace DD4hep{
GearHandle
*
handle
=
new
GearHandle
(
gearVXD
,
"VXDParameters"
)
;
GearHandle
*
handle
=
new
GearHandle
(
gearVXD
,
"VXDParameters"
)
;
// quick hack for now: add the one material that is needed by KalDet :
// quick hack for now: add the one material that is needed by KalDet :
//
handle->addMaterial( "VXDSupportMaterial", 2.075865162e+01, 1.039383117e+01, 2.765900000e+02, 1.014262421e+03, 3.341388059e+03) ;
handle
->
addMaterial
(
"VXDSupportMaterial"
,
2.075865162e+01
,
1.039383117e+01
,
2.765900000e+02
,
1.014262421e+03
,
3.341388059e+03
)
;
// -------- better: get right averaged material from first ladder: ------------------
// -------- better: get right averaged material from first ladder: ------------------
MaterialManager
matMgr
;
//
MaterialManager matMgr ;
//
const
DDRec
::
ZPlanarData
::
LayerLayout
&
l
=
vxd
->
layers
[
0
]
;
//
const DDRec::ZPlanarData::LayerLayout& l = vxd->layers[0] ;
//
Vector3D
a
(
l
.
distanceSupport
,
l
.
phi0
,
0.
,
Vector3D
::
cylindrical
)
;
//
Vector3D a( l.distanceSupport , l.phi0 , 0. , Vector3D::cylindrical ) ;
Vector3D
b
(
l
.
distanceSupport
+
l
.
thicknessSupport
,
l
.
phi0
,
0.
,
Vector3D
::
cylindrical
)
;
//
Vector3D b( l.distanceSupport + l.thicknessSupport , l.phi0 , 0. , Vector3D::cylindrical ) ;
//
const
MaterialVec
&
materials
=
matMgr
.
materialsBetween
(
a
,
b
)
;
//
const MaterialVec& materials = matMgr.materialsBetween( a , b ) ;
//
std
::
cout
<<
"Calculating material average."
<<
std
::
endl
;
//
std::cout<<"Calculating material average."<<std::endl;
MaterialData
mat
=
(
materials
.
size
()
>
1
?
matMgr
.
createAveragedMaterial
(
materials
)
:
materials
[
0
].
first
)
;
//
MaterialData mat = ( materials.size() > 1 ? matMgr.createAveragedMaterial( materials ) : materials[0].first ) ;
//
std
::
cout
<<
" ####### found materials between points : "
<<
a
<<
" and "
<<
b
<<
" : "
;
//
std::cout << " ####### found materials between points : " << a << " and " << b << " : " ;
for
(
unsigned
i
=
0
,
n
=
materials
.
size
();
i
<
n
;
++
i
){
//
for( unsigned i=0,n=materials.size();i<n;++i){
std
::
cout
<<
materials
[
i
].
first
.
name
()
<<
"["
<<
materials
[
i
].
second
<<
"], "
;
//
std::cout << materials[i].first.name() << "[" << materials[i].second << "], " ;
}
//
}
std
::
cout
<<
std
::
endl
;
//
std::cout << std::endl ;
std
::
cout
<<
" averaged material : "
<<
mat
<<
std
::
endl
;
//
std::cout << " averaged material : " << mat << std::endl ;
//
handle
->
addMaterial
(
"VXDSupportMaterial"
,
mat
.
A
(),
mat
.
Z
()
,
mat
.
density
()
/
(
dd4hep
::
kg
/
(
dd4hep
::
g
*
dd4hep
::
m3
))
,
mat
.
radiationLength
()
/
dd4hep
::
mm
,
mat
.
interactionLength
()
/
dd4hep
::
mm
)
;
//
handle->addMaterial( "VXDSupportMaterial", mat.A(), mat.Z() , mat.density()/(dd4hep::kg/(dd4hep::g*dd4hep::m3)) , mat.radiationLength()/dd4hep::mm , mat.interactionLength()/dd4hep::mm ) ;
vxdDE
.
addExtension
<
GearHandle
>
(
handle
)
;
vxdDE
.
addExtension
<
GearHandle
>
(
handle
)
;
...
@@ -102,10 +102,10 @@ namespace DD4hep{
...
@@ -102,10 +102,10 @@ namespace DD4hep{
}
}
//========= SIT ==============================================================================
//========= SIT ==============================================================================
/*
try
{
try
{
DetElement sitDE = lcdd.detector("
SIT
") ;
DetElement
sitDE
=
lcdd
.
detector
(
"
InnerTrackerBarrel
"
)
;
ZPlanarData
*
sit
=
sitDE
.
extension
<
ZPlanarData
>
()
;
ZPlanarData
*
sit
=
sitDE
.
extension
<
ZPlanarData
>
()
;
...
@@ -146,7 +146,7 @@ namespace DD4hep{
...
@@ -146,7 +146,7 @@ namespace DD4hep{
try
{
try
{
DetElement setDE = lcdd.detector("
Inn
erTracker") ;
DetElement
setDE
=
lcdd
.
detector
(
"
Out
erTracker
Barrel
"
)
;
ZPlanarData
*
set
=
setDE
.
extension
<
ZPlanarData
>
()
;
ZPlanarData
*
set
=
setDE
.
extension
<
ZPlanarData
>
()
;
...
@@ -277,7 +277,7 @@ namespace DD4hep{
...
@@ -277,7 +277,7 @@ namespace DD4hep{
}
catch
(
std
::
runtime_error
&
e
){
}
catch
(
std
::
runtime_error
&
e
){
std
::
cerr
<<
" >>>> "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cerr
<<
" >>>> "
<<
e
.
what
()
<<
std
::
endl
;
}
*/
}
//========= CALO ==============================================================================
//========= CALO ==============================================================================
...
...
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