Skip to content

Commit

Permalink
18 implement detailed geometry for sand ecal endcaps (#40)
Browse files Browse the repository at this point in the history
* Implementation of detailed ECAL geometry

* Wrong subbuilder name corrected

* Corrected wrong Builder name

* tab replaced with space at line 37 to avoid TabError: inconsistent use of tabs and spaces in indentation

* alignment in config SAND_ECAL.cgf

* just code alignment

* aluminum palte put inside mother volume

* ECAL ec module element construction moved to function

* renaming ActiveMat to ScintMat, so that they have the same names in the SANDECALBARRELMOD and SANDECALENDCAP context

* single values
inherited from mother volume for several parameters

* definition of a shape for ECAL endcap module

* The endcap module volume now is filled with the ECAL active/passive layers

* renaming of ec module volume name

* number of barrel modules into config file

* the whole endcap is now constructed and placed on both side of the barrel

* Corrected Al_plate position.

* Added dev option for the drift configuration.

* Slab index starts at 0 at the outer radius.

* Fixed horizontal section IDs and positioning

* Updated but buggy geometry

* Added develop configuration.

* no overlaps; volume for yoke endcaps are removed from ecal endcap volumes. Size of yoke endcaps are decreased a bit

* indentaion fixed

* removed useless commented lines

* tab removed, 4 spaces instead

* removed useless comments

* update of changelog

---------

Co-authored-by: Paolo Gauzzi <gauzzi@neutrino-01.novalocal>
Co-authored-by: alrugger <alrugger@bo.infn.it>
Co-authored-by: Alessandro Ruggeri <90973844+AlessandroRuggeri@users.noreply.github.com>
  • Loading branch information
4 people authored Jan 20, 2025
1 parent 7ed6d8a commit ece36ec
Show file tree
Hide file tree
Showing 8 changed files with 995 additions and 204 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Geometry releases will be tagged as `Descriptive_tag_v_X.Y.Z`.

- Bump gegede to version 0.8.0
- Define default geometries in Makefile instead of bash script
- Implementation of the C-shaped volumes of the SAND ECAL Endcaps

### Removed

Expand Down
46 changes: 33 additions & 13 deletions duneggd/Component/SandECalBarrelMod.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,64 @@
class SandECalBarrelModBuilder(gegede.builder.Builder):
#^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
def configure(self,
trapezoidDim=None,
ScintMat=None,
PasMat=None,
PasSlabThickness=None,
ActiveSlabThickness=None,
nSlabs=None,
**kwds):
trapezoidDim=None,
ScintMat=None,
PasMat=None,
PasSlabThickness=None,
ActiveSlabThickness=None,
nSlabs=None,
BackPlateThick=None,
**kwds):
self.trapezoidDim = trapezoidDim
self.ScintMat = ScintMat
self.PasMat = PasMat
self.PasSlabThickness = PasSlabThickness
self.ActiveSlabThickness = ActiveSlabThickness
self.nSlabs = nSlabs
self.BackPlateThick = BackPlateThick
#^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
def construct(self, geom):

AlPlateThick = self.BackPlateThick

ECAL_shape = geom.shapes.Trapezoid('ECAL_shape',
dx1=self.trapezoidDim[0],
dx2=self.trapezoidDim[1],
dx2=self.trapezoidDim[1]+Q('0.33cm'),
dy1=self.trapezoidDim[2],
dy2=self.trapezoidDim[2],
dz=self.trapezoidDim[3])
dz=self.trapezoidDim[3]+AlPlateThick/2.)

ECAL_lv = geom.structure.Volume('ECAL_lv', material='Air', shape=ECAL_shape)
self.add_volume(ECAL_lv)
# ECAL_position = geom.structure.Position('ECAL_position', Position[0], Position[1], Position[2])
# ECAL_place = geom.structure.Placement('ECAL_place', volume = ECAL_lv, pos=ECAL_position)

######## Aluminum back plate##################

ECAL_Alplate_shape = geom.shapes.Box('ECAL_Alplate_shape',
dx = self.trapezoidDim[1],
dy = self.trapezoidDim[2],
dz = AlPlateThick/2.)

ECAL_Alplate_lv = geom.structure.Volume('ECAL_Alplate_lv', material = 'Aluminum',
shape = ECAL_Alplate_shape)

ECAL_Alplate_pos = geom.structure.Position('ECAL_Alplate_pos', Q('0cm'), Q('0cm'),
self.trapezoidDim[3])

ECAL_Alplate_place = geom.structure.Placement('ECAL_Alplate_place',
volume = ECAL_Alplate_lv, pos = ECAL_Alplate_pos)

ECAL_lv.placements.append(ECAL_Alplate_place.name)

for i in range(self.nSlabs): #nSlabs
#tan = math.tan(math.pi/self.Segmentation)
tan = 0.5*(self.trapezoidDim[1] - self.trapezoidDim[0])/self.trapezoidDim[3]
xposSlab=Q('0cm')
yposSlab=Q('0cm')
zposSlabActive = (-self.trapezoidDim[3] +
zposSlabActive = (-self.trapezoidDim[3]-AlPlateThick/2. +
(i+0.5)*self.ActiveSlabThickness +
i*self.PasSlabThickness)
#print("active slab position= "+ str(zposSlabActive))
zposSlabPassive = (-self.trapezoidDim[3] +
zposSlabPassive = (-self.trapezoidDim[3]-AlPlateThick/2. +
(i+1.)*self.ActiveSlabThickness +
(i+0.5)*self.PasSlabThickness)
#print("passive slab position= "+ str(zposSlabPassive))
Expand Down
Loading

0 comments on commit ece36ec

Please sign in to comment.