File indexing completed on 2025-01-18 09:14:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #define DD4HEP_USE_SURFACEINSTALL_HELPER Lhe_SiTrackerEndcapSurfacePlugin
0019 #include "DD4hep/SurfaceInstaller.h"
0020
0021
0022 template <typename UserData>
0023 void Installer<UserData>::install(dd4hep::DetElement component, dd4hep::PlacedVolume pv) {
0024 dd4hep::Volume comp_vol = pv.volume();
0025 if ( comp_vol.isSensitive() ) {
0026 dd4hep::Volume mod_vol = parentVolume(component);
0027 dd4hep::Trapezoid comp_shape(comp_vol.solid()), mod_shape(mod_vol.solid());
0028
0029 if ( !comp_shape.isValid() || !mod_shape.isValid() ) {
0030 invalidInstaller("Components and/or modules are not Trapezoid -- invalid shapes");
0031 }
0032 else if ( !handleUsingCache(component,comp_vol) ) {
0033 const double* trans = placementTranslation(component);
0034 double half_mod_thickness = mod_shape->GetDy1();
0035
0036 double si_position = trans[1];
0037 double outer_thickness = half_mod_thickness + si_position;
0038 double inner_thickness = half_mod_thickness - si_position;
0039 Vector3D u(0.,0.,-1.), v(-1.,0.,0.), n(0.,-1.,0.), o(0.,0.,0.);
0040
0041 VolPlane surf(comp_vol,Type(Type::Sensitive,Type::Measurement1D),
0042 inner_thickness, outer_thickness, u, v, n, o);
0043 addSurface(component,surf);
0044 }
0045 }
0046 }