From 3cbea0377ac81d880446dbcd19a10fa89ebd960a Mon Sep 17 00:00:00 2001
From: Joschka Lingemann <joschka.lingemann@cern.ch>
Date: Wed, 29 Mar 2017 10:02:47 +0200
Subject: [PATCH] Add R-Phi-Eta and Phi-Eta segmentation to lcdd.py

---
 DDCore/python/lcdd.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/DDCore/python/lcdd.py b/DDCore/python/lcdd.py
index 8f09277bd..3dca749e8 100644
--- a/DDCore/python/lcdd.py
+++ b/DDCore/python/lcdd.py
@@ -36,6 +36,8 @@ GridXYZ = DD4hep.Geometry.GridXYZ
 GlobalGridXY = DD4hep.Geometry.GlobalGridXY
 CartesianGridXY = DD4hep.Geometry.CartesianGridXY
 NoSegmentation = DD4hep.Geometry.NoSegmentation
+GridPhiEta = DD4hep.Geometry.GridPhiEta
+GridRPhiEta = DD4hep.Geometry.GridRPhiEta
 ProjectiveCylinder = DD4hep.Geometry.ProjectiveCylinder
 NonProjectiveCylinder = DD4hep.Geometry.NonProjectiveCylinder
 ProjectiveZPlane = DD4hep.Geometry.ProjectiveZPlane
@@ -388,4 +390,17 @@ def create_ProjectiveZPlane(lcdd, elem) :
   if 'thetaBins' in elem.keys() : obj.setThetaBins(elem.getI('thetaBins'))
   return obj
 
+def create_GridPhiEta(lcdd, elem) :
+  obj = GridPhiEta()
+  if 'phiBins' in elem.keys() : obj.setPhiBins(elem.getI('phiBins'))
+  if 'gridSizeEta' in elem.keys() : obj.setGridSizeEta(elem.getI('gridSizeEta'))
+  return obj
+
+def create_GridRPhiEta(lcdd, elem) :
+  obj = GridRPhiEta()
+  if 'phiBins' in elem.keys() : obj.setPhiBins(elem.getI('gridSizeR'))
+  if 'gridSizeEta' in elem.keys() : obj.setGridSizeEta(elem.getI('gridSizeEta'))
+  if 'gridSizeR' in elem.keys() : obj.setGridSizeR(elem.getI('gridSizeR'))
+  return obj
+
 
-- 
GitLab