From eb6d7f5e59c7a8a8bc5fcbe8e543bbb7e11d9abc Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Tue, 25 Jul 2017 14:26:23 +0200 Subject: [PATCH 01/15] Import chamber geometry from GDML files --- PadmeMC/gdml/Chamber.gdml | 52 + PadmeMC/gdml/ChamberExternal.gdml | 11562 ++++++++++++++++++++++ PadmeMC/gdml/ChamberInternal.gdml | 10243 +++++++++++++++++++ PadmeMC/include/DetectorConstruction.hh | 3 + PadmeMC/src/DetectorConstruction.cc | 57 +- 5 files changed, 21892 insertions(+), 25 deletions(-) create mode 100644 PadmeMC/gdml/Chamber.gdml create mode 100644 PadmeMC/gdml/ChamberExternal.gdml create mode 100644 PadmeMC/gdml/ChamberInternal.gdml diff --git a/PadmeMC/gdml/Chamber.gdml b/PadmeMC/gdml/Chamber.gdml new file mode 100644 index 00000000..375c31f2 --- /dev/null +++ b/PadmeMC/gdml/Chamber.gdml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PadmeMC/gdml/ChamberExternal.gdml b/PadmeMC/gdml/ChamberExternal.gdml new file mode 100644 index 00000000..9dc0c776 --- /dev/null +++ b/PadmeMC/gdml/ChamberExternal.gdml @@ -0,0 +1,11562 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PadmeMC/gdml/ChamberInternal.gdml b/PadmeMC/gdml/ChamberInternal.gdml new file mode 100644 index 00000000..eb3685db --- /dev/null +++ b/PadmeMC/gdml/ChamberInternal.gdml @@ -0,0 +1,10243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PadmeMC/include/DetectorConstruction.hh b/PadmeMC/include/DetectorConstruction.hh index 8de3b284..508c5d8a 100644 --- a/PadmeMC/include/DetectorConstruction.hh +++ b/PadmeMC/include/DetectorConstruction.hh @@ -6,6 +6,7 @@ #include "G4SubtractionSolid.hh" #include "CLHEP/Units/PhysicalConstants.h" #include "G4PhysicalConstants.hh" +#include "G4GDMLParser.hh" class G4Box; class G4Tubs; @@ -84,6 +85,8 @@ private: void DefineMaterials(); + G4GDMLParser fParser; + ECalDetector* fECalDetector; TargetDetector* fTargetDetector; SACDetector* fSACDetector; diff --git a/PadmeMC/src/DetectorConstruction.cc b/PadmeMC/src/DetectorConstruction.cc index 8db4752e..ffa5d8e4 100644 --- a/PadmeMC/src/DetectorConstruction.cc +++ b/PadmeMC/src/DetectorConstruction.cc @@ -149,12 +149,31 @@ G4VPhysicalVolume* DetectorConstruction::Construct() //------------------------------ // World Volume - //------------------------------ + //------------------------------ + + /* G4Box* solidWorld = new G4Box("World",0.5*fWorldLength,0.5*fWorldLength,0.5*fWorldLength); G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld,G4Material::GetMaterial("G4_AIR"),"World",0,0,0); if (! fWorldIsFilledWithAir) logicWorld->SetMaterial(G4Material::GetMaterial("Vacuum")); logicWorld->SetVisAttributes(G4VisAttributes::Invisible); + //logicWorld->SetVisAttributes(G4VisAttributes(G4Colour::White())); G4PVPlacement* physicWorld = new G4PVPlacement(0,G4ThreeVector(),logicWorld,"World",0,false,0); + */ + + fParser.Read("gdml/Chamber.gdml"); + G4VPhysicalVolume* physicWorld = fParser.GetWorldVolume(); + G4LogicalVolume* logicWorld = physicWorld->GetLogicalVolume(); + logicWorld->SetVisAttributes(G4VisAttributes::Invisible); + //logicWorld->SetVisAttributes(G4VisAttributes(G4Colour::White())); + logicWorld->SetMaterial(G4Material::GetMaterial("Vacuum")); + printf("World %s %s\n",logicWorld->GetName().data(),logicWorld->GetMaterial()->GetName().data()); + G4int nD = logicWorld->GetNoDaughters(); + for(G4int iD = 0; iDGetDaughter(iD); + G4LogicalVolume* Dlog = D->GetLogicalVolume(); + Dlog->SetMaterial(G4Material::GetMaterial("G4_STAINLESS-STEEL")); + printf("Daughter %s %s\n",Dlog->GetName().data(),Dlog->GetMaterial()->GetName().data()); + } /* // Create large magnetic volume which includes target, vacuum chamber, magnet, vetoes and timepix @@ -191,6 +210,7 @@ G4VPhysicalVolume* DetectorConstruction::Construct() new G4PVPlacement(0,magVolPos,logicMagneticVolume,"MagneticVolume",logicWorld,false,0,false); */ + /* // Vacuum chamber structure // Note: vacuum volume is always created, only the physical structure is switched on/off if (fEnableChamber) { @@ -206,7 +226,9 @@ G4VPhysicalVolume* DetectorConstruction::Construct() //fChamberStructure->SetMotherVolume(logicMagneticVolume); fChamberStructure->SetMotherVolume(logicWorld); fChamberStructure->CreateGeometry(); + */ + /* // Create magnetic volume inside vacuum chamber G4double magVolMinX = -geoChamber->GetVCInnerX()+1.*um; @@ -236,7 +258,7 @@ G4VPhysicalVolume* DetectorConstruction::Construct() G4LogicalVolume* logicMagneticVolumeVC = new G4LogicalVolume(solidMagneticVolume,G4Material::GetMaterial("Vacuum"),"MagneticVolumeVC",0,0,0); if (! fMagneticVolumeIsVisible) logicMagneticVolumeVC->SetVisAttributes(G4VisAttributes::Invisible); - new G4PVPlacement(0,magVolPos,logicMagneticVolumeVC,"MagneticVolumeVC",fChamberStructure->GetChamberLogicalVolume(),false,0); + //new G4PVPlacement(0,magVolPos,logicMagneticVolumeVC,"MagneticVolumeVC",fChamberStructure->GetChamberLogicalVolume(),false,0); // Create magnetic volume inside crossed pipes at target @@ -257,7 +279,7 @@ G4VPhysicalVolume* DetectorConstruction::Construct() G4LogicalVolume* logicMagneticVolumeCP = new G4LogicalVolume(solidCP,G4Material::GetMaterial("Vacuum"),"MagneticVolumeCP",0,0,0); if (! fMagneticVolumeIsVisible) logicMagneticVolumeCP->SetVisAttributes(G4VisAttributes::Invisible); - new G4PVPlacement(0,posCPZ,logicMagneticVolumeCP,"MagneticVolumeCP",fChamberStructure->GetChamberLogicalVolume(),false,0); + //new G4PVPlacement(0,posCPZ,logicMagneticVolumeCP,"MagneticVolumeCP",fChamberStructure->GetChamberLogicalVolume(),false,0); // Add magnetic field to volumes if (fEnableMagneticField) { @@ -265,7 +287,9 @@ G4VPhysicalVolume* DetectorConstruction::Construct() logicMagneticVolumeVC->SetFieldManager(fMagneticFieldManager->GetLocalFieldManager(),true); logicMagneticVolumeCP->SetFieldManager(fMagneticFieldManager->GetLocalFieldManager(),true); } + */ + /* // Concrete wall at large Z if (fEnableWall) { fHallStructure->SetMotherVolume(logicWorld); @@ -279,23 +303,6 @@ G4VPhysicalVolume* DetectorConstruction::Construct() fMagnetStructure->CreateGeometry(); } - /* - // Vacuum chamber structure - // Note: vacuum volume is always created, only the physical structure is switched on/off - if (fEnableChamber) { - fChamberStructure->EnableChamber(); - } else { - fChamberStructure->DisableChamber(); - } - if (fChamberIsVisible) { - fChamberStructure->SetChamberVisible(); - } else { - fChamberStructure->SetChamberInvisible(); - } - fChamberStructure->SetMotherVolume(logicMagneticVolume); - fChamberStructure->CreateGeometry(); - */ - // Target if (fEnableTarget) { //fTargetDetector->SetMotherVolume(fChamberStructure->GetChamberLogicalVolume()); @@ -310,10 +317,10 @@ G4VPhysicalVolume* DetectorConstruction::Construct() fSACDetector->CreateGeometry(); } - if (fEnableLAV) { - fLAVDetector->SetMotherVolume(logicWorld); - fLAVDetector->CreateGeometry(); - } + //if (fEnableLAV) { + // fLAVDetector->SetMotherVolume(logicWorld); + // fLAVDetector->CreateGeometry(); + //} // TDump if (fEnableTDump) { @@ -362,7 +369,7 @@ G4VPhysicalVolume* DetectorConstruction::Construct() geoHEPVeto->SetHEPVetoChamberWallCorner(geoChamber->GetVCBackFaceCorner()); fHEPVetoDetector->CreateGeometry(); } - + */ return physicWorld; } From 6f22b8aef92f5eff5b935d078ee6b3ba687ee035 Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Tue, 25 Jul 2017 18:31:26 +0200 Subject: [PATCH 02/15] Re-enabled crossed pipe and magnetic field --- PadmeMC/Chamber/src/ChamberGeometry.cc | 6 ++- PadmeMC/Chamber/src/ChamberStructure.cc | 60 ++++++++++++++++++++----- PadmeMC/gdml/Chamber.gdml | 4 +- PadmeMC/gdml/ChamberExternal.gdml | 12 ++++- PadmeMC/gdml/ChamberInternal.gdml | 12 ++++- PadmeMC/src/DetectorConstruction.cc | 55 +++++++++++++++++------ 6 files changed, 117 insertions(+), 32 deletions(-) diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index 0052c75a..8d6bb8c9 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -502,12 +502,14 @@ ChamberGeometry::ChamberGeometry() fCPZRIn = 5.*cm; fCPZThick = 1.*cm; fCPZLength = 29.*cm; - fCPZPosZ = fVCExtVtx[0][0].z()-0.5*fCPZLength; + //fCPZPosZ = fVCExtVtx[0][0].z()-0.5*fCPZLength; + fCPZPosZ = -1.*m; fCPXRIn = 5.*cm; fCPXThick = 1.*cm; fCPXLength = 25.*cm; - fCPXPosZ = fVCExtVtx[0][0].z()-0.5*fCPZLength; + //fCPXPosZ = fVCExtVtx[0][0].z()-0.5*fCPZLength; + fCPXPosZ = -1.*m; } diff --git a/PadmeMC/Chamber/src/ChamberStructure.cc b/PadmeMC/Chamber/src/ChamberStructure.cc index 0c1466a4..1dd8d60d 100644 --- a/PadmeMC/Chamber/src/ChamberStructure.cc +++ b/PadmeMC/Chamber/src/ChamberStructure.cc @@ -47,12 +47,36 @@ ChamberStructure::~ChamberStructure() void ChamberStructure::CreateGeometry() { - ChamberGeometry* geo = ChamberGeometry::GetInstance(); + /* + std::vector s1_out; + s1_out.push_back(G4TwoVector( 227.50*mm, 0.00*mm)); + s1_out.push_back(G4TwoVector(-227.50*mm, 0.00*mm)); + s1_out.push_back(G4TwoVector(-227.50*mm,1008.28*mm)); + s1_out.push_back(G4TwoVector( 551.23*mm,1008.28*mm)); + s1_out.push_back(G4TwoVector( 227.50*mm, 657.81*mm)); + G4ExtrudedSolid* s1_out_solid = new G4ExtrudedSolid("VC_S1OUT",s1_out,112.5*mm,0.,1.,0.,1.); + G4LogicalVolume* s1_out_logic = new G4LogicalVolume(s1_out_solid,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"VC_S1OUT",0,0,0); + std::vector s1_in; + s1_in.push_back(G4TwoVector( 217.50*mm, 10.00*mm)); + s1_in.push_back(G4TwoVector(-217.50*mm, 10.00*mm)); + s1_in.push_back(G4TwoVector(-217.50*mm,1008.28*mm)); + s1_in.push_back(G4TwoVector( 536.71*mm,1008.28*mm)); + s1_in.push_back(G4TwoVector( 217.50*mm, 661.80*mm)); + G4ExtrudedSolid* s1_in_solid = new G4ExtrudedSolid("VC_S1IN",s1_in,102.5*mm,0.,1.,0.,1.); + G4LogicalVolume* s1_in_logic = new G4LogicalVolume(s1_in_solid,G4Material::GetMaterial("Vacuum"),"VC_S1IN",0,0,0); + //s1_in_logic->SetVisAttributes(G4VisAttributes::Invisible); + new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),s1_in_logic,"VC_S1IN",s1_out_logic,false,0); + + new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),s1_out_logic,"VC_S1OUT",fMotherVolume,false,0); + */ + + //ChamberGeometry* geo = ChamberGeometry::GetInstance(); ///////////////////////// // Main vacuum chamber // ///////////////////////// + /* printf("Creating global VC volume\n"); G4UnionSolid* solidGlobVC = CreateVCFacetGlobalSolid(); fGlobalLogicalVolume = new G4LogicalVolume(solidGlobVC,G4Material::GetMaterial("Vacuum"),"ChamberGlobal",0,0,0); @@ -88,11 +112,14 @@ void ChamberStructure::CreateGeometry() logicalSteelShell->SetVisAttributes(G4VisAttributes::Invisible); } new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),logicalSteelShell,"ChamberShell",fGlobalLogicalVolume,false,0); + */ // Create the thin window membrane in front of ECal with its flange - CreateECalThinWindow(); + //printf("Creating ECal thin window\n"); + //CreateECalThinWindow(); // Create crossed pipes in the target area + printf("Creating Target pipe\n"); CreateTargetPipes(); } @@ -135,7 +162,8 @@ void ChamberStructure::CreateECalThinWindow() G4LogicalVolume* logicalEWLayer1 = new G4LogicalVolume(solidEWLayer1,G4Material::GetMaterial("G4_MYLAR"), "EWMylarExt",0,0,0); //logicalEWLayer1->SetVisAttributes(G4VisAttributes(G4Colour::Green())); logicalEWLayer1->SetVisAttributes(membraneVisAttr); - new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz1),logicalEWLayer1,"EWMylarExt",fGlobalLogicalVolume,false,0); + //new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz1),logicalEWLayer1,"EWMylarExt",fGlobalLogicalVolume,false,0); + new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz1),logicalEWLayer1,"EWMylarExt",fMotherVolume,false,0); // Central kevlar membrane G4double ewr2 = ewr1+ewd1; @@ -149,7 +177,8 @@ void ChamberStructure::CreateECalThinWindow() G4LogicalVolume* logicalEWLayer2 = new G4LogicalVolume(solidEWLayer2,G4Material::GetMaterial("Kevlar"), "EWKevlar",0,0,0); //logicalEWLayer2->SetVisAttributes(G4VisAttributes(G4Colour::Green())); logicalEWLayer2->SetVisAttributes(membraneVisAttr); - new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz2),logicalEWLayer2,"EWKevlar",fGlobalLogicalVolume,false,0); + //new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz2),logicalEWLayer2,"EWKevlar",fGlobalLogicalVolume,false,0); + new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz2),logicalEWLayer2,"EWKevlar",fMotherVolume,false,0); // Internal mylar membrane G4double ewr3 = ewr2+ewd2; @@ -163,28 +192,32 @@ void ChamberStructure::CreateECalThinWindow() G4LogicalVolume* logicalEWLayer3 = new G4LogicalVolume(solidEWLayer3,G4Material::GetMaterial("G4_MYLAR"), "EWMylarInt",0,0,0); //logicalEWLayer3->SetVisAttributes(G4VisAttributes(G4Colour::Green())); logicalEWLayer3->SetVisAttributes(membraneVisAttr); - new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz3),logicalEWLayer3,"EWMylarInt",fGlobalLogicalVolume,false,0); + //new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz3),logicalEWLayer3,"EWMylarInt",fGlobalLogicalVolume,false,0); + new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz3),logicalEWLayer3,"EWMylarInt",fMotherVolume,false,0); // First steel ring (outer) G4Tubs* solidEWIronRing1 = new G4Tubs("EWIronRing1",geo->GetEWF1RIn(),geo->GetEWF1ROut(),0.5*geo->GetEWF1Thick(),0.*deg,360.*deg); G4LogicalVolume* logicalEWIronRing1 = new G4LogicalVolume(solidEWIronRing1,G4Material::GetMaterial("G4_STAINLESS-STEEL"), "EWIronRing1",0,0,0); //logicalEWIronRing1->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); logicalEWIronRing1->SetVisAttributes(steelVisAttr); - new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF1PosZ()),logicalEWIronRing1,"EWIronRing1",fGlobalLogicalVolume,false,0); + //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF1PosZ()),logicalEWIronRing1,"EWIronRing1",fGlobalLogicalVolume,false,0); + new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF1PosZ()),logicalEWIronRing1,"EWIronRing1",fMotherVolume,false,0); // Second steel ring G4Tubs* solidEWIronRing2 = new G4Tubs("EWIronRing2",geo->GetEWF2RIn(),geo->GetEWF2ROut(),0.5*geo->GetEWF2Thick(),0.*deg,360.*deg); G4LogicalVolume* logicalEWIronRing2 = new G4LogicalVolume(solidEWIronRing2,G4Material::GetMaterial("G4_STAINLESS-STEEL"), "EWIronRing2",0,0,0); //logicalEWIronRing2->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); logicalEWIronRing2->SetVisAttributes(steelVisAttr); - new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF2PosZ()),logicalEWIronRing2,"EWIronRing2",fGlobalLogicalVolume,false,0); + //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF2PosZ()),logicalEWIronRing2,"EWIronRing2",fGlobalLogicalVolume,false,0); + new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF2PosZ()),logicalEWIronRing2,"EWIronRing2",fMotherVolume,false,0); // Third steel ring G4Tubs* solidEWIronRing3 = new G4Tubs("EWIronRing3",geo->GetEWF3RIn(),geo->GetEWF3ROut(),0.5*geo->GetEWF3Thick(),0.*deg,360.*deg); G4LogicalVolume* logicalEWIronRing3 = new G4LogicalVolume(solidEWIronRing3,G4Material::GetMaterial("G4_STAINLESS-STEEL"), "EWIronRing3",0,0,0); //logicalEWIronRing3->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); logicalEWIronRing3->SetVisAttributes(steelVisAttr); - new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF3PosZ()),logicalEWIronRing3,"EWIronRing3",fGlobalLogicalVolume,false,0); + //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF3PosZ()),logicalEWIronRing3,"EWIronRing3",fGlobalLogicalVolume,false,0); + new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF3PosZ()),logicalEWIronRing3,"EWIronRing3",fMotherVolume,false,0); } @@ -200,13 +233,17 @@ void ChamberStructure::CreateTargetPipes() G4double cpzRIn = geo->GetCPZRIn(); G4double cpzROut = geo->GetCPZROut(); G4double cpzLen = geo->GetCPZLength(); - G4Tubs* solidCPZe = new G4Tubs("CPZe",0.,cpzROut-1.*um,0.5*cpzLen-1.*um,0.*deg,360.*deg); + //G4Tubs* solidCPZe = new G4Tubs("CPZe",0.,cpzROut-1.*um,0.5*cpzLen-1.*um,0.*deg,360.*deg); + //G4Tubs* solidCPZi = new G4Tubs("CPZi",0.,cpzRIn,0.5*cpzLen+1.*mm,0.*deg,360.*deg); + G4Tubs* solidCPZe = new G4Tubs("CPZe",0.,cpzROut,0.5*cpzLen,0.*deg,360.*deg); G4Tubs* solidCPZi = new G4Tubs("CPZi",0.,cpzRIn,0.5*cpzLen+1.*mm,0.*deg,360.*deg); G4double cpxRIn = geo->GetCPXRIn(); G4double cpxROut = geo->GetCPXROut(); G4double cpxLen = geo->GetCPXLength(); - G4Tubs* solidCPXe = new G4Tubs("CPXe",0.,cpxROut-1.*um,0.5*cpxLen-1.*um,0.*deg,360.*deg); + //G4Tubs* solidCPXe = new G4Tubs("CPXe",0.,cpxROut-1.*um,0.5*cpxLen-1.*um,0.*deg,360.*deg); + //G4Tubs* solidCPXi = new G4Tubs("CPXi",0.,cpxRIn,0.5*cpxLen+1.*mm,0.*deg,360.*deg); + G4Tubs* solidCPXe = new G4Tubs("CPXe",0.,cpxROut,0.5*cpxLen,0.*deg,360.*deg); G4Tubs* solidCPXi = new G4Tubs("CPXi",0.,cpxRIn,0.5*cpxLen+1.*mm,0.*deg,360.*deg); G4RotationMatrix* rotCPX = new G4RotationMatrix; @@ -217,7 +254,8 @@ void ChamberStructure::CreateTargetPipes() G4SubtractionSolid* solidCP3 = new G4SubtractionSolid("VCCP3",solidCP2,solidCPXi,rotCPX,G4ThreeVector(0.,0.,0.)); G4LogicalVolume* logicalCP = new G4LogicalVolume(solidCP3,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"VCCP",0,0,0); logicalCP->SetVisAttributes(steelVisAttr); - new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetCPZPosZ()),logicalCP,"CrossPipeSteel",fGlobalLogicalVolume,false,0); + //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetCPZPosZ()),logicalCP,"CrossPipeSteel",fGlobalLogicalVolume,false,0); + new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetCPZPosZ()),logicalCP,"CrossPipeSteel",fMotherVolume,false,0); } /* diff --git a/PadmeMC/gdml/Chamber.gdml b/PadmeMC/gdml/Chamber.gdml index 375c31f2..6c6eb058 100644 --- a/PadmeMC/gdml/Chamber.gdml +++ b/PadmeMC/gdml/Chamber.gdml @@ -15,7 +15,7 @@ - + @@ -27,7 +27,7 @@ - + diff --git a/PadmeMC/gdml/ChamberExternal.gdml b/PadmeMC/gdml/ChamberExternal.gdml index 9dc0c776..f97ad1b9 100644 --- a/PadmeMC/gdml/ChamberExternal.gdml +++ b/PadmeMC/gdml/ChamberExternal.gdml @@ -3844,6 +3844,14 @@ + + + + + + + + @@ -11551,7 +11559,7 @@ - + @@ -11559,4 +11567,4 @@ - \ No newline at end of file + diff --git a/PadmeMC/gdml/ChamberInternal.gdml b/PadmeMC/gdml/ChamberInternal.gdml index eb3685db..2a9d79a3 100644 --- a/PadmeMC/gdml/ChamberInternal.gdml +++ b/PadmeMC/gdml/ChamberInternal.gdml @@ -3403,6 +3403,14 @@ + + + + + + + + @@ -10232,7 +10240,7 @@ - + @@ -10240,4 +10248,4 @@ - \ No newline at end of file + diff --git a/PadmeMC/src/DetectorConstruction.cc b/PadmeMC/src/DetectorConstruction.cc index ffa5d8e4..1093e733 100644 --- a/PadmeMC/src/DetectorConstruction.cc +++ b/PadmeMC/src/DetectorConstruction.cc @@ -171,7 +171,16 @@ G4VPhysicalVolume* DetectorConstruction::Construct() for(G4int iD = 0; iDGetDaughter(iD); G4LogicalVolume* Dlog = D->GetLogicalVolume(); - Dlog->SetMaterial(G4Material::GetMaterial("G4_STAINLESS-STEEL")); + if (fChamberIsVisible) { + Dlog->SetVisAttributes(G4VisAttributes(G4Colour::Grey())); + } else { + Dlog->SetVisAttributes(G4VisAttributes::Invisible); + } + if (fEnableChamber) { + Dlog->SetMaterial(G4Material::GetMaterial("G4_STAINLESS-STEEL")); + } else { + Dlog->SetMaterial(G4Material::GetMaterial("Vacuum")); + } printf("Daughter %s %s\n",Dlog->GetName().data(),Dlog->GetMaterial()->GetName().data()); } @@ -210,7 +219,6 @@ G4VPhysicalVolume* DetectorConstruction::Construct() new G4PVPlacement(0,magVolPos,logicMagneticVolume,"MagneticVolume",logicWorld,false,0,false); */ - /* // Vacuum chamber structure // Note: vacuum volume is always created, only the physical structure is switched on/off if (fEnableChamber) { @@ -226,18 +234,21 @@ G4VPhysicalVolume* DetectorConstruction::Construct() //fChamberStructure->SetMotherVolume(logicMagneticVolume); fChamberStructure->SetMotherVolume(logicWorld); fChamberStructure->CreateGeometry(); - */ - /* // Create magnetic volume inside vacuum chamber - G4double magVolMinX = -geoChamber->GetVCInnerX()+1.*um; - G4double magVolMinY = -geoChamber->GetVCInnerY()+1.*um; - G4double magVolMinZ = geoChamber->GetVCInnerZ()+1.*um; + //G4double magVolMinX = -geoChamber->GetVCInnerX()+1.*um; + //G4double magVolMinY = -geoChamber->GetVCInnerY()+1.*um; + //G4double magVolMinZ = geoChamber->GetVCInnerZ()+1.*um; + //G4double magVolMinX = -217.5*mm+1.*um; + G4double magVolMinX = -209.9*mm; + G4double magVolMinY = -102.5*mm+1.*um; + G4double magVolMinZ = -490.0*mm; - G4double magVolMaxX = geoChamber->GetVCInnerX()-1.*um; - G4double magVolMaxY = geoChamber->GetVCInnerY()-1.*um; - G4double magVolMaxZ = 100.*cm; // from field map definition + //G4double magVolMaxX = 217.5*mm-1.*um; + G4double magVolMaxX = 209.9*mm; + G4double magVolMaxY = 102.5*mm-1.*um; + G4double magVolMaxZ = 1000.0*mm; // from field map definition G4double magVolPosX = 0.5*(magVolMinX+magVolMaxX); G4double magVolPosY = 0.5*(magVolMinY+magVolMaxY); @@ -259,7 +270,9 @@ G4VPhysicalVolume* DetectorConstruction::Construct() new G4LogicalVolume(solidMagneticVolume,G4Material::GetMaterial("Vacuum"),"MagneticVolumeVC",0,0,0); if (! fMagneticVolumeIsVisible) logicMagneticVolumeVC->SetVisAttributes(G4VisAttributes::Invisible); //new G4PVPlacement(0,magVolPos,logicMagneticVolumeVC,"MagneticVolumeVC",fChamberStructure->GetChamberLogicalVolume(),false,0); + new G4PVPlacement(0,magVolPos,logicMagneticVolumeVC,"MagneticVolumeVC",logicWorld,false,0,true); + /* // Create magnetic volume inside crossed pipes at target G4double cpzRIn = geoChamber->GetCPZRIn(); @@ -280,16 +293,15 @@ G4VPhysicalVolume* DetectorConstruction::Construct() new G4LogicalVolume(solidCP,G4Material::GetMaterial("Vacuum"),"MagneticVolumeCP",0,0,0); if (! fMagneticVolumeIsVisible) logicMagneticVolumeCP->SetVisAttributes(G4VisAttributes::Invisible); //new G4PVPlacement(0,posCPZ,logicMagneticVolumeCP,"MagneticVolumeCP",fChamberStructure->GetChamberLogicalVolume(),false,0); + */ // Add magnetic field to volumes if (fEnableMagneticField) { //MagneticFieldSetup* magField = new MagneticFieldSetup(); logicMagneticVolumeVC->SetFieldManager(fMagneticFieldManager->GetLocalFieldManager(),true); - logicMagneticVolumeCP->SetFieldManager(fMagneticFieldManager->GetLocalFieldManager(),true); + //logicMagneticVolumeCP->SetFieldManager(fMagneticFieldManager->GetLocalFieldManager(),true); } - */ - /* // Concrete wall at large Z if (fEnableWall) { fHallStructure->SetMotherVolume(logicWorld); @@ -303,6 +315,7 @@ G4VPhysicalVolume* DetectorConstruction::Construct() fMagnetStructure->CreateGeometry(); } + /* // Target if (fEnableTarget) { //fTargetDetector->SetMotherVolume(fChamberStructure->GetChamberLogicalVolume()); @@ -370,6 +383,22 @@ G4VPhysicalVolume* DetectorConstruction::Construct() fHEPVetoDetector->CreateGeometry(); } */ + + /* + G4int nD2 = logicWorld->GetNoDaughters(); + for(G4int iD = 0; iDGetDaughter(iD); + G4LogicalVolume* Dlog = D->GetLogicalVolume(); + printf("Daughter %s %s\n",Dlog->GetName().data(),Dlog->GetMaterial()->GetName().data()); + G4int nDD = Dlog->GetNoDaughters(); + for (G4int iDD = 0; iDDGetDaughter(iDD); + G4LogicalVolume* DDlog = DD->GetLogicalVolume(); + printf("GrandDaughter %s %s\n",DDlog->GetName().data(),DDlog->GetMaterial()->GetName().data()); + } + } + */ + return physicWorld; } From 7160eb2b63f2e434e6afb0b5c4631662eeaa857b Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Wed, 26 Jul 2017 18:19:56 +0200 Subject: [PATCH 03/15] Updated chamber gdml with linear corners; added magnetic field to pipe; added aluminum thin window with flange to chamber --- PadmeMC/Chamber/include/ChamberGeometry.hh | 20 + PadmeMC/Chamber/include/ChamberStructure.hh | 1 + PadmeMC/Chamber/src/ChamberGeometry.cc | 15 +- PadmeMC/Chamber/src/ChamberStructure.cc | 57 +- PadmeMC/MagneticField/src/MagneticFieldMap.cc | 2 +- PadmeMC/Target/src/TargetGeometry.cc | 3 +- PadmeMC/gdml/ChamberExternal.gdml | 20969 +++++++--------- PadmeMC/gdml/ChamberInternal.gdml | 17399 ++++++------- PadmeMC/src/DetectorConstruction.cc | 19 +- 9 files changed, 16917 insertions(+), 21568 deletions(-) diff --git a/PadmeMC/Chamber/include/ChamberGeometry.hh b/PadmeMC/Chamber/include/ChamberGeometry.hh index dfd5eea2..24cc1900 100644 --- a/PadmeMC/Chamber/include/ChamberGeometry.hh +++ b/PadmeMC/Chamber/include/ChamberGeometry.hh @@ -140,6 +140,17 @@ public: G4double GetEWF3RIn() { return fEWF3RIn; } G4double GetEWF3ROut() { return fEWF2ROut; } + // Properties of aluminum thin window and its flange + + G4double GetEWAlThick() { return fEWAlThick; } + G4double GetEWAlConvexity() { return fEWAlConvexity; } + G4double GetEWAlRadius() { return fEWAlFlangeRIn; } + G4double GetEWAlFlangeRIn() { return fEWAlFlangeRIn; } + G4double GetEWAlFlangeROut() { return fEWAlFlangeROut; } + G4double GetEWAlFlangeThick() { return fEWAlFlangeThick; } + G4double GetEWAlFrontFacePosZ() { return fEWAlFrontFacePosZ; } + G4double GetEWAlBackFacePosZ() { return fEWAlFrontFacePosZ+fEWAlFlangeThick; } + // Properties of crossed pipes at target position G4double GetCPZRIn() { return fCPZRIn; } G4double GetCPZROut() { return fCPZRIn+fCPZThick; } @@ -211,6 +222,15 @@ private: G4double fEWF2ROut; G4double fEWF3RIn; + // Aluminum thin window and aluminum flange + + G4double fEWAlThick; + G4double fEWAlConvexity; + G4double fEWAlFlangeRIn; + G4double fEWAlFlangeROut; + G4double fEWAlFlangeThick; + G4double fEWAlFrontFacePosZ; + // Crossed pipes (one parallel to Z, one parallel to X) at target position G4double fCPZRIn; diff --git a/PadmeMC/Chamber/include/ChamberStructure.hh b/PadmeMC/Chamber/include/ChamberStructure.hh index 5a8c90e8..bd1ddc8d 100644 --- a/PadmeMC/Chamber/include/ChamberStructure.hh +++ b/PadmeMC/Chamber/include/ChamberStructure.hh @@ -50,6 +50,7 @@ private: G4UnionSolid* CreateVCFacetInternalSolid(); void CreateECalThinWindow(); + void CreateECalAlThinWindow(); void CreateTargetPipes(); G4LogicalVolume* fMotherVolume; diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index 8d6bb8c9..a0f9c4a4 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -65,11 +65,13 @@ ChamberGeometry::ChamberGeometry() //fVCCLength = 140.*cm; // Length of big cylinder fVCCFrontFacePosZ = 89.1*cm; // Z position of front face of big cylinder - fVCBackFacePosZ = 224.9*cm; // Z position of back face of VC flange towards thin window + //fVCBackFacePosZ = 224.9*cm; // Z position of back face of VC flange towards thin window + fVCBackFacePosZ = 2294.8*mm; // Z position of back face of VC flange towards thin window // Thin window in front of ECal (EW) - fEWBackFacePosZ = 227.5*cm; // Z position of window: 2.5cm before front face of ECal + //fEWBackFacePosZ = 227.5*cm; // Z position of window: 2.5cm before front face of ECal + fEWBackFacePosZ = 2325.5*mm; // Z position of window: 2.5cm before front face of ECal fEWRadius = 310.*mm; // Radius of window fEWConvexity = 30.*mm; // Convexity of window at its center @@ -88,6 +90,15 @@ ChamberGeometry::ChamberGeometry() fEWF2ROut = 390.*mm; fEWF3RIn = 325.5*mm; + // Parameters for the aluminum thin window + + fEWAlThick = 4.*mm; // Thickness of aluminum window + fEWAlConvexity = 29.*mm; // Convexity of window at its center + fEWAlFlangeRIn = 326.*mm; // Inner radius of flange (also radius of window) + fEWAlFlangeROut = 375.*mm; // Outer radius of flange + fEWAlFlangeThick = 23.*mm; // Thickness of flange + fEWAlFrontFacePosZ = 2294.8*mm; // Front face of flange holding aluminum thin window + // Vertex coordinates of all sections of the chamber (external shape of the steel shell) // A section is a rectangular shape with fixed Z // Vertices must be ordered as v[0]=(+x,-y); v[1]=(-x,-y);v[2]=(-x,+y);v[3]=(+x,+y) diff --git a/PadmeMC/Chamber/src/ChamberStructure.cc b/PadmeMC/Chamber/src/ChamberStructure.cc index 1dd8d60d..752fa5c4 100644 --- a/PadmeMC/Chamber/src/ChamberStructure.cc +++ b/PadmeMC/Chamber/src/ChamberStructure.cc @@ -117,9 +117,10 @@ void ChamberStructure::CreateGeometry() // Create the thin window membrane in front of ECal with its flange //printf("Creating ECal thin window\n"); //CreateECalThinWindow(); + CreateECalAlThinWindow(); // Create crossed pipes in the target area - printf("Creating Target pipe\n"); + //printf("Creating Target pipe\n"); CreateTargetPipes(); } @@ -198,29 +199,71 @@ void ChamberStructure::CreateECalThinWindow() // First steel ring (outer) G4Tubs* solidEWIronRing1 = new G4Tubs("EWIronRing1",geo->GetEWF1RIn(),geo->GetEWF1ROut(),0.5*geo->GetEWF1Thick(),0.*deg,360.*deg); G4LogicalVolume* logicalEWIronRing1 = new G4LogicalVolume(solidEWIronRing1,G4Material::GetMaterial("G4_STAINLESS-STEEL"), "EWIronRing1",0,0,0); - //logicalEWIronRing1->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); - logicalEWIronRing1->SetVisAttributes(steelVisAttr); + logicalEWIronRing1->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); + //logicalEWIronRing1->SetVisAttributes(steelVisAttr); //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF1PosZ()),logicalEWIronRing1,"EWIronRing1",fGlobalLogicalVolume,false,0); new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF1PosZ()),logicalEWIronRing1,"EWIronRing1",fMotherVolume,false,0); // Second steel ring G4Tubs* solidEWIronRing2 = new G4Tubs("EWIronRing2",geo->GetEWF2RIn(),geo->GetEWF2ROut(),0.5*geo->GetEWF2Thick(),0.*deg,360.*deg); G4LogicalVolume* logicalEWIronRing2 = new G4LogicalVolume(solidEWIronRing2,G4Material::GetMaterial("G4_STAINLESS-STEEL"), "EWIronRing2",0,0,0); - //logicalEWIronRing2->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); - logicalEWIronRing2->SetVisAttributes(steelVisAttr); + logicalEWIronRing2->SetVisAttributes(G4VisAttributes(G4Colour::Red())); + //logicalEWIronRing2->SetVisAttributes(steelVisAttr); //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF2PosZ()),logicalEWIronRing2,"EWIronRing2",fGlobalLogicalVolume,false,0); new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF2PosZ()),logicalEWIronRing2,"EWIronRing2",fMotherVolume,false,0); // Third steel ring G4Tubs* solidEWIronRing3 = new G4Tubs("EWIronRing3",geo->GetEWF3RIn(),geo->GetEWF3ROut(),0.5*geo->GetEWF3Thick(),0.*deg,360.*deg); G4LogicalVolume* logicalEWIronRing3 = new G4LogicalVolume(solidEWIronRing3,G4Material::GetMaterial("G4_STAINLESS-STEEL"), "EWIronRing3",0,0,0); - //logicalEWIronRing3->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); - logicalEWIronRing3->SetVisAttributes(steelVisAttr); + logicalEWIronRing3->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); + //logicalEWIronRing3->SetVisAttributes(steelVisAttr); //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF3PosZ()),logicalEWIronRing3,"EWIronRing3",fGlobalLogicalVolume,false,0); new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF3PosZ()),logicalEWIronRing3,"EWIronRing3",fMotherVolume,false,0); } +void ChamberStructure::CreateECalAlThinWindow() +{ + + ///////////////////////////////////////// + // Thin Al window flange in front of ECal // + ///////////////////////////////////////// + + ChamberGeometry* geo = ChamberGeometry::GetInstance(); + + // Get properties of thin window + G4double ewR = geo->GetEWAlRadius(); // Radius of window + G4double ewT = geo->GetEWAlThick(); // Thickness of window + G4double ewC = geo->GetEWAlConvexity(); // Convexity at window center + + // Get properties of flange + G4double ewFRIn = geo->GetEWAlFlangeRIn(); + G4double ewFROut = geo->GetEWAlFlangeROut(); + G4double ewFThick = geo->GetEWAlFlangeThick(); + + // Get Z coordinate of front and back face of flange + //G4double efFFrontZ = geo->GetEWAlFrontFacePosZ(); + G4double efFBackZ = geo->GetEWAlBackFacePosZ(); + + G4VisAttributes alVisAttr = G4VisAttributes(G4Colour::Blue()); + if ( ! fChamberIsVisible ) alVisAttr = G4VisAttributes::Invisible; + + // Aluminum thin windowExternal mylar membrane + G4double ewr1 = (ewR*ewR+ewC*ewC)/(2.*ewC); + G4double ewz1 = efFBackZ+(ewr1-ewC); + G4double ewth1 = asin(ewR/ewr1); + //printf("ewr1 %f ewz1 %f ewth1 %11.9f pi-ewth1 %11.9f\n",ewr1,ewz1,ewth1,180.*deg-ewth1); + G4Sphere* solidEWSphere = new G4Sphere("EWSphere",ewr1,ewr1+ewT,0.*deg,360.*deg,180.*deg-ewth1,ewth1); + G4Tubs* solidEWFlange = new G4Tubs("EWFlange",ewFRIn,ewFROut,0.5*ewFThick,0.*deg,360.*deg); + G4ThreeVector flangePos = G4ThreeVector(0.,0.,-sqrt(ewr1*ewr1-ewR*ewR)-0.5*ewT); + G4UnionSolid* solidEWindow = new G4UnionSolid("EAlWindow",solidEWSphere,solidEWFlange,0,flangePos); + G4LogicalVolume* logicalEWindow = new G4LogicalVolume(solidEWindow,G4Material::GetMaterial("G4_Al"), "EAlWindow",0,0,0); + //logicalEWLayer1->SetVisAttributes(G4VisAttributes(G4Colour::Green())); + logicalEWindow->SetVisAttributes(alVisAttr); + new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz1),logicalEWindow,"EAlWindow",fMotherVolume,false,0,true); + +} + void ChamberStructure::CreateTargetPipes() { diff --git a/PadmeMC/MagneticField/src/MagneticFieldMap.cc b/PadmeMC/MagneticField/src/MagneticFieldMap.cc index 5b2ae000..c563c69e 100644 --- a/PadmeMC/MagneticField/src/MagneticFieldMap.cc +++ b/PadmeMC/MagneticField/src/MagneticFieldMap.cc @@ -8,7 +8,7 @@ MagneticFieldMap::MagneticFieldMap() { // Default value: can be changed with set method - fConstantMagneticField = -0.55*tesla; + fConstantMagneticField = 0.55*tesla; //fConstantMagneticField = 0.; fConstantMagneticFieldXmin = -26.0*cm; diff --git a/PadmeMC/Target/src/TargetGeometry.cc b/PadmeMC/Target/src/TargetGeometry.cc index f557aad9..bac08bd5 100644 --- a/PadmeMC/Target/src/TargetGeometry.cc +++ b/PadmeMC/Target/src/TargetGeometry.cc @@ -24,7 +24,8 @@ TargetGeometry::TargetGeometry() fTargetSizeY = 2.*cm; fTargetSizeZ = 100.*um; - fTargetFrontFacePosZ = -70.*cm; // Relative to center of magnet + //fTargetFrontFacePosZ = -70.*cm; // Relative to center of magnet + fTargetFrontFacePosZ = -100.*cm; // Relative to center of magnet fTargetFastDigitization = true; // Use fast digitization diff --git a/PadmeMC/gdml/ChamberExternal.gdml b/PadmeMC/gdml/ChamberExternal.gdml index f97ad1b9..597fd7d5 100644 --- a/PadmeMC/gdml/ChamberExternal.gdml +++ b/PadmeMC/gdml/ChamberExternal.gdml @@ -2,3846 +2,3241 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3855,1132 +3250,1164 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - + + + + + + + + + - - - - + + + + - - + + + + @@ -5007,375 +4434,217 @@ - - + + - - - - + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + - - + + + + @@ -5384,1609 +4653,1831 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + + + + + - - - - - - - - - + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7000,4560 +6491,3254 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PadmeMC/gdml/ChamberInternal.gdml b/PadmeMC/gdml/ChamberInternal.gdml index 2a9d79a3..e93e2723 100644 --- a/PadmeMC/gdml/ChamberInternal.gdml +++ b/PadmeMC/gdml/ChamberInternal.gdml @@ -2,3405 +2,2432 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3414,6827 +2441,4881 @@ - - - - - + - - - - - - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - - - - - - + - - - - - - + - - - - - - - - - - - - + + - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PadmeMC/src/DetectorConstruction.cc b/PadmeMC/src/DetectorConstruction.cc index 1093e733..a53aa68e 100644 --- a/PadmeMC/src/DetectorConstruction.cc +++ b/PadmeMC/src/DetectorConstruction.cc @@ -240,13 +240,11 @@ G4VPhysicalVolume* DetectorConstruction::Construct() //G4double magVolMinX = -geoChamber->GetVCInnerX()+1.*um; //G4double magVolMinY = -geoChamber->GetVCInnerY()+1.*um; //G4double magVolMinZ = geoChamber->GetVCInnerZ()+1.*um; - //G4double magVolMinX = -217.5*mm+1.*um; - G4double magVolMinX = -209.9*mm; + G4double magVolMinX = -217.5*mm+1.*um; G4double magVolMinY = -102.5*mm+1.*um; G4double magVolMinZ = -490.0*mm; - //G4double magVolMaxX = 217.5*mm-1.*um; - G4double magVolMaxX = 209.9*mm; + G4double magVolMaxX = 217.5*mm-1.*um; G4double magVolMaxY = 102.5*mm-1.*um; G4double magVolMaxZ = 1000.0*mm; // from field map definition @@ -295,6 +293,15 @@ G4VPhysicalVolume* DetectorConstruction::Construct() //new G4PVPlacement(0,posCPZ,logicMagneticVolumeCP,"MagneticVolumeCP",fChamberStructure->GetChamberLogicalVolume(),false,0); */ + G4double cpzRIn = 5.*cm; + G4double cpzLen = 41.*cm; + G4Tubs* cpzSolid = new G4Tubs("CPZ",0.,cpzRIn-1.*um,0.5*cpzLen,0.*deg,360.*deg); + G4ThreeVector cpzPos(0.,0.,-49.0*cm-0.5*cpzLen); + G4LogicalVolume* logicMagneticVolumeCP = + new G4LogicalVolume(cpzSolid,G4Material::GetMaterial("Vacuum"),"MagneticVolumeCP",0,0,0); + if (! fMagneticVolumeIsVisible) logicMagneticVolumeCP->SetVisAttributes(G4VisAttributes::Invisible); + new G4PVPlacement(0,cpzPos,logicMagneticVolumeCP,"MagneticVolumeCP",logicWorld,false,0,true); + // Add magnetic field to volumes if (fEnableMagneticField) { //MagneticFieldSetup* magField = new MagneticFieldSetup(); @@ -579,8 +586,8 @@ G4double DetectorConstruction::GetTargetFrontFaceZ() { if (fEnableTarget) return fTargetDetector->GetTargetFrontFaceZ(); - // Target is disabled (?): return a position 20cm before the front face of the magnet yoke - return -70.*cm; + // Target is disabled (?): return a position 50cm before the front face of the magnet yoke + return -100.*cm; } G4double DetectorConstruction::GetTargetThickness() From 60f23cd8f5728c4cea8485b27122fcb00564c069 Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Thu, 27 Jul 2017 13:09:23 +0200 Subject: [PATCH 04/15] Fixed thin window position; fixed tpix position --- PadmeMC/Chamber/include/ChamberGeometry.hh | 176 +------ PadmeMC/Chamber/src/ChamberGeometry.cc | 508 +-------------------- PadmeMC/Chamber/src/ChamberStructure.cc | 493 +------------------- PadmeMC/ECal/src/ECalDetector.cc | 2 +- PadmeMC/ECal/src/ECalGeometry.cc | 3 +- PadmeMC/TPix/src/TPixGeometry.cc | 28 +- PadmeMC/Target/src/TargetDetector.cc | 4 + PadmeMC/src/DetectorConstruction.cc | 11 +- 8 files changed, 71 insertions(+), 1154 deletions(-) diff --git a/PadmeMC/Chamber/include/ChamberGeometry.hh b/PadmeMC/Chamber/include/ChamberGeometry.hh index 24cc1900..a808396f 100644 --- a/PadmeMC/Chamber/include/ChamberGeometry.hh +++ b/PadmeMC/Chamber/include/ChamberGeometry.hh @@ -8,23 +8,10 @@ #ifndef ChamberGeometry_H #define ChamberGeometry_H 1 -#define CHAMBERGEOMETRY_VCINMAGWALL_NVERTICES 14 -#define CHAMBERGEOMETRY_VCINMAGPLATE_NVERTICES 6 -#define CHAMBERGEOMETRY_VCOUTMAGWALL_NVERTICES 6 - -#define CHAMBERGEOMETRY_VC_NSECTIONS 12 -#define CHAMBERGEOMETRY_VC_REFSECTION 1 - -#define CHAMBERGEOMETRY_VC_NFACETS 41 - #include "globals.hh" -#include "G4TwoVector.hh" #include "G4ThreeVector.hh" #include "G4SystemOfUnits.hh" -class G4UnionSolid; -class G4VSolid; - class ChamberGeometry { @@ -43,102 +30,12 @@ protected: public: - // These are the maximum X/Z coordinates reached by the whole VC structure - // Needed to define the main magnetic volume - G4double GetVCMostExternalX() { return fVCMostExternalX; } - G4double GetVCMostAdvancedZ() { return fEWBackFacePosZ+fEWF1Thick; } - - G4double GetVCInMagThick() { return fVCInMagThick; } - - G4double GetVCInMagWallSizeY() { return fVCInMagWallSizeY; } - G4int GetVCInMagWallNVertices() { return CHAMBERGEOMETRY_VCINMAGWALL_NVERTICES; } - G4TwoVector GetVCInMagWallVertex(G4int p) { return fVCInMagWallVertex[p]; } - - G4double GetVCInMagWallHoleRadius() { return fVCInMagWallHoleRadius; } - G4double GetVCInMagWallHolePosZ() { return fVCInMagWallHolePosZ; } - - G4int GetVCInMagPlateNVertices() { return CHAMBERGEOMETRY_VCINMAGPLATE_NVERTICES; } - G4TwoVector GetVCInMagPlateVertex(G4int p) { return fVCInMagPlateVertex[p]; } - - G4double GetVCOutMagWallSizeY() { return fVCInMagWallSizeY; } - G4int GetVCOutMagWallNVertices() { return CHAMBERGEOMETRY_VCOUTMAGWALL_NVERTICES; } - G4TwoVector GetVCOutMagWallVertex(G4int p) { return fVCOutMagWallVertex[p]; } - - // Get internal size of chamber in the magnet region - // Needed to create the internal magnetic volume - G4double GetVCInnerX() { return fVCIntVtx[0][3].x(); } - G4double GetVCInnerY() { return fVCIntVtx[0][3].y(); } - G4double GetVCInnerZ() { return fVCIntVtx[0][3].z(); } - // Info on the back face of the chamber // Needed to correctly position exit hole, HEPVeto and TimePix G4double GetVCBackFacePosZ() { return fVCBackFacePosZ; } - G4double GetVCBackFaceAngle(); - G4double GetVCBackFaceThickness(); - G4ThreeVector GetVCBackFaceCorner(); - - // Properties of the big vacuum chamber - - // Vertices of the chamber sections - G4int GetVCNSections() { return CHAMBERGEOMETRY_VC_NSECTIONS; } - //G4int GetVCNSections() { return 7; } - G4int GetVCRefSection() { return CHAMBERGEOMETRY_VC_REFSECTION; } - G4ThreeVector GetVCExtVtx(G4int s, G4int v) { return fVCExtVtx[s][v]; } - G4ThreeVector GetVCIntVtx(G4int s, G4int v) { return fVCIntVtx[s][v]; } - - // Facets of the chamber main structure - G4int GetVCNFacets() { return CHAMBERGEOMETRY_VC_NFACETS; } - G4int GetVCFacetVtx(G4int f, G4int v) { return fVCFacetVtx[f][v]; } - - // Flange to connect ECal thin window - G4double GetVCCFPosZ() { return fVCBackFacePosZ-0.5*fVCCFThick; } - G4double GetVCCFThick() { return fVCCFThick; } - G4double GetVCCFRIn() { return fEWF3RIn; } - G4double GetVCCFROut() { return fEWF2ROut; } - - // Big cylinder - G4double GetVCCPosZ() { return 0.5*(fVCCFrontFacePosZ+(fVCBackFacePosZ-fVCCFThick)); } - G4double GetVCCLength() { return (fVCBackFacePosZ-fVCCFThick)-fVCCFrontFacePosZ; } - G4double GetVCCThick() { return fVCCThick; } - G4double GetVCCRIn() { return fVCCRIn; } - G4double GetVCCROut() { return fVCCRIn+fVCCThick; } - - // Beam entrance hole - G4double GetVCInHoleRadius() { return fVCInHoleRadius; } - G4double GetVCInHoleThick() { return fVCInHoleThick; } - G4double GetVCInHolePosZ() { return fVCInHolePosZ; } - - // Beam exit hole - G4double GetVCOutHoleRadius() { return fVCOutHoleRadius; } - G4double GetVCOutHoleLength() { return fVCOutHoleLength; } - G4double GetVCOutHoleThick() { return fVCOutHoleThick; } - G4double GetVCOutHoleDistToEdge() { return fVCOutHoleDistToEdge; } - - // Properties of thin window - - G4double GetEWBackFacePosZ() { return fEWBackFacePosZ; } - G4double GetEWRadius() { return fEWRadius; } - G4double GetEWConvexity() { return fEWConvexity; } - G4double GetEWFrontMylarThick() { return fEWFrontMylarThick; } - G4double GetEWKevlarThick() { return fEWKevlarThick; } - G4double GetEWBackMylarThick() { return fEWBackMylarThick; } - - // Properties of thin window flange - - G4double GetEWF1PosZ() { return fEWBackFacePosZ+0.5*fEWF1Thick; } - G4double GetEWF1Thick() { return fEWF1Thick; } - G4double GetEWF1RIn() { return fEWRadius; } - G4double GetEWF1ROut() { return fEWF1ROut; } - - G4double GetEWF2PosZ() { return fEWBackFacePosZ-fEWFrontMylarThick-fEWKevlarThick-fEWBackMylarThick-0.5*fEWF2Thick; } - G4double GetEWF2Thick() { return fEWF2Thick; } - G4double GetEWF2RIn() { return fEWRadius; } - G4double GetEWF2ROut() { return fEWF2ROut; } - - G4double GetEWF3PosZ() { return fEWBackFacePosZ-fEWFrontMylarThick-fEWKevlarThick-fEWBackMylarThick-fEWF2Thick-0.5*fEWF3Thick; } - G4double GetEWF3Thick() { return fEWF3Thick; } - G4double GetEWF3RIn() { return fEWF3RIn; } - G4double GetEWF3ROut() { return fEWF2ROut; } + G4double GetVCBackFaceAngle() { return fVCBackFaceAngle; } + G4double GetVCBackFaceThickness() { return fVCBackFaceThick; } + G4ThreeVector GetVCBackFaceCorner() { return G4ThreeVector(fVCBackFaceCornerX,0.,fVCBackFaceCornerZ); } // Properties of aluminum thin window and its flange @@ -149,9 +46,9 @@ public: G4double GetEWAlFlangeROut() { return fEWAlFlangeROut; } G4double GetEWAlFlangeThick() { return fEWAlFlangeThick; } G4double GetEWAlFrontFacePosZ() { return fEWAlFrontFacePosZ; } - G4double GetEWAlBackFacePosZ() { return fEWAlFrontFacePosZ+fEWAlFlangeThick; } // Properties of crossed pipes at target position + G4double GetCPZRIn() { return fCPZRIn; } G4double GetCPZROut() { return fCPZRIn+fCPZThick; } G4double GetCPZThick() { return fCPZThick; } @@ -166,61 +63,11 @@ public: private: - G4double fVCInMagThick; - - G4double fVCInMagWallSizeY; - G4TwoVector fVCInMagWallVertex[CHAMBERGEOMETRY_VCINMAGWALL_NVERTICES]; - G4double fVCInMagWallHoleRadius; - G4double fVCInMagWallHolePosZ; - - G4TwoVector fVCInMagPlateVertex[CHAMBERGEOMETRY_VCINMAGPLATE_NVERTICES]; - - G4TwoVector fVCOutMagWallVertex[CHAMBERGEOMETRY_VCOUTMAGWALL_NVERTICES]; - - G4double fVCMostExternalX; // Absolute value of largest X coordinate of the chamber - - G4double fVCCFThick; // Thickness of the VC flange toward thin window flange - - G4double fVCCThick; // Thickness of the big cylinder - G4double fVCCRIn; // Inner radius of the big cylinder - //G4double fVCCLength; // Length of the big cylinder - G4double fVCCFrontFacePosZ; // Z position of front face of big cylinder - G4double fVCBackFacePosZ; // Z position of the VC flange face towards the thin window - - // Beam entrance hole characteristics - G4double fVCInHoleRadius; - G4double fVCInHoleThick; - G4double fVCInHolePosZ; - - // Beam exit Hole characteristics - G4double fVCOutHoleRadius; - G4double fVCOutHoleLength; - G4double fVCOutHoleThick; - G4double fVCOutHoleDistToEdge; - - //G4double fVCEWGap; // Gap for o-ring between main VC body and thin window flange - - // Thin window in front of ECal (EW) - - G4double fEWBackFacePosZ; // Z position of the external thin window face - - G4double fEWRadius; // Radius of window - G4double fEWConvexity; // Convexity of window at its center - - G4double fEWFrontMylarThick; // Thickness of mylar layer inside VC - G4double fEWKevlarThick; // Thickness of kevlar layer between mylar layers - G4double fEWBackMylarThick; // Thickness of mylar layer outside VC - - // Steel flange around thin window (three steel rings) - - G4double fEWF1Thick; - G4double fEWF2Thick; - G4double fEWF3Thick; - - G4double fEWF1ROut; - G4double fEWF2ROut; - G4double fEWF3RIn; + G4double fVCBackFaceAngle; // Angle of TPix/HEPVeto face of chamber + G4double fVCBackFaceThick; // Thickness of back faces + G4double fVCBackFaceCornerX; // X coordinate of the corner at the back face + G4double fVCBackFaceCornerZ; // Z coordinate of the corner at the back face // Aluminum thin window and aluminum flange @@ -243,13 +90,6 @@ private: G4double fCPXLength; G4double fCPXPosZ; - // Vectors to hold coordinates of the vertices of all sections of the chamber - G4ThreeVector fVCExtVtx[CHAMBERGEOMETRY_VC_NSECTIONS][4]; - G4ThreeVector fVCIntVtx[CHAMBERGEOMETRY_VC_NSECTIONS][4]; - - // Vectors to hold vertices of all facets of the chamber - G4int fVCFacetVtx[CHAMBERGEOMETRY_VC_NFACETS][4]; - }; #endif diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index a0f9c4a4..9516db93 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -20,75 +20,14 @@ ChamberGeometry* ChamberGeometry::GetInstance() ChamberGeometry::ChamberGeometry() { - fVCInMagThick = 1.*cm; + // Some basic chamber quantities from Cesidio's CAD drawings - fVCInMagWallSizeY = 23.*cm-2.*fVCInMagThick; - //fVCInMagWallVertex[ 0] = G4TwoVector(-54.4*cm, 52.4*cm); - fVCInMagWallVertex[ 0] = G4TwoVector(-54.4*cm, 51.6*cm); - fVCInMagWallVertex[ 1] = G4TwoVector(-54.4*cm, 37.3*cm); - fVCInMagWallVertex[ 2] = G4TwoVector(-24.2*cm, 5.2*cm); - fVCInMagWallVertex[ 3] = G4TwoVector(-24.2*cm,-56.2*cm); - fVCInMagWallVertex[ 4] = G4TwoVector( 24.2*cm,-56.2*cm); - fVCInMagWallVertex[ 5] = G4TwoVector( 24.2*cm, 52.0*cm); - fVCInMagWallVertex[ 6] = G4TwoVector( 23.4*cm, 52.0*cm); - fVCInMagWallVertex[ 7] = G4TwoVector( 23.4*cm,-55.4*cm); - fVCInMagWallVertex[ 8] = G4TwoVector(-23.4*cm,-55.4*cm); - fVCInMagWallVertex[ 9] = G4TwoVector(-23.4*cm, 5.5*cm); - fVCInMagWallVertex[10] = G4TwoVector(-53.6*cm, 37.6*cm); - fVCInMagWallVertex[11] = G4TwoVector(-53.6*cm, 52.4*cm); - fVCInMagWallVertex[12] = G4TwoVector(-56.0*cm, 52.4*cm); - fVCInMagWallVertex[13] = G4TwoVector(-56.0*cm, 51.6*cm); - - fVCInMagWallHoleRadius = 5.*cm; - fVCInMagWallHolePosZ = 0.5*(fVCInMagWallVertex[3].y()+fVCInMagWallVertex[8].y()); - - fVCInMagPlateVertex[0] = G4TwoVector(-54.4*cm, 52.0*cm); - fVCInMagPlateVertex[1] = G4TwoVector(-54.4*cm, 37.3*cm); - fVCInMagPlateVertex[2] = G4TwoVector(-24.2*cm, 5.2*cm); - fVCInMagPlateVertex[3] = G4TwoVector(-24.2*cm,-56.2*cm); - fVCInMagPlateVertex[4] = G4TwoVector( 24.2*cm,-56.2*cm); - fVCInMagPlateVertex[5] = G4TwoVector( 24.2*cm, 52.0*cm); - - fVCOutMagWallVertex[ 0] = G4TwoVector( -56.0*cm, 51.6*cm); - fVCOutMagWallVertex[ 1] = G4TwoVector( -68.2*cm, 51.6*cm); - fVCOutMagWallVertex[ 2] = G4TwoVector(-156.6*cm,143.1*cm); - fVCOutMagWallVertex[ 3] = G4TwoVector(-156.0*cm,143.6*cm); - fVCOutMagWallVertex[ 4] = G4TwoVector( -67.9*cm, 52.4*cm); - fVCOutMagWallVertex[ 5] = G4TwoVector( -56.0*cm, 52.4*cm); - - //fVCEWGap = 5.9*mm; // Gap for o-ring between main VC body and thin window flange - - fVCCFThick = 20.*mm; // Thickness of VC flange toward thin window flange - - fVCCThick = 10.*mm; // Thickness of big cylinder - fVCCRIn = 335.*mm; // Inner radius of big cylinder - //fVCCLength = 140.*cm; // Length of big cylinder - fVCCFrontFacePosZ = 89.1*cm; // Z position of front face of big cylinder - - //fVCBackFacePosZ = 224.9*cm; // Z position of back face of VC flange towards thin window - fVCBackFacePosZ = 2294.8*mm; // Z position of back face of VC flange towards thin window - - // Thin window in front of ECal (EW) - - //fEWBackFacePosZ = 227.5*cm; // Z position of window: 2.5cm before front face of ECal - fEWBackFacePosZ = 2325.5*mm; // Z position of window: 2.5cm before front face of ECal - - fEWRadius = 310.*mm; // Radius of window - fEWConvexity = 30.*mm; // Convexity of window at its center - - fEWFrontMylarThick = 0.1*mm; // Thickness of mylar layer inside VC - fEWKevlarThick = 0.6*mm; // Thickness of kevlar layer between mylar layers - fEWBackMylarThick = 0.1*mm; // Thickness of mylar layer outside VC - - // Steel flange around thin window (three steel rings) - - fEWF1Thick = 15.*mm; - fEWF2Thick = 15.*mm; - fEWF3Thick = 9.*mm; - - fEWF1ROut = 360.*mm; - fEWF2ROut = 390.*mm; - fEWF3RIn = 325.5*mm; + fVCBackFacePosZ = 2300.0*mm; // Z position of back face of VC flange towards thin window + fVCBackFaceAngle = atan2( (2769.8-2481.85) , (1290.0-403.78) ); // Angle of TPix/HEPVeto face of chamber + printf("Chamber angle %f\n",fVCBackFaceAngle); + fVCBackFaceThick = fVCBackFacePosZ-2769.8*mm; // Thickness of back faces + fVCBackFaceCornerX = 403.78*mm; + fVCBackFaceCornerZ = fVCBackFacePosZ; // Parameters for the aluminum thin window @@ -97,450 +36,21 @@ ChamberGeometry::ChamberGeometry() fEWAlFlangeRIn = 326.*mm; // Inner radius of flange (also radius of window) fEWAlFlangeROut = 375.*mm; // Outer radius of flange fEWAlFlangeThick = 23.*mm; // Thickness of flange - fEWAlFrontFacePosZ = 2294.8*mm; // Front face of flange holding aluminum thin window - - // Vertex coordinates of all sections of the chamber (external shape of the steel shell) - // A section is a rectangular shape with fixed Z - // Vertices must be ordered as v[0]=(+x,-y); v[1]=(-x,-y);v[2]=(-x,+y);v[3]=(+x,+y) - // This corresponds to an anti-clockwise order when looking at the section from -z (i.e. as seen from the incoming beam) - // N.B. section 1 was used in an old model of the chamber and is not needed anymore - - fVCExtVtx[0][0] = G4ThreeVector( 234.00*mm,-112.5*mm,-555.*mm); - fVCExtVtx[0][1] = G4ThreeVector(-234.00*mm,-112.5*mm,-555.*mm); - fVCExtVtx[0][2] = G4ThreeVector(-234.00*mm, 112.5*mm,-555.*mm); - fVCExtVtx[0][3] = G4ThreeVector( 234.00*mm, 112.5*mm,-555.*mm); - - fVCExtVtx[1][0] = G4ThreeVector( 234.00*mm,-112.5*mm, -52.38*mm); - fVCExtVtx[1][1] = G4ThreeVector(-234.00*mm,-112.5*mm, -52.38*mm); - fVCExtVtx[1][2] = G4ThreeVector(-234.00*mm, 112.5*mm, -52.38*mm); - fVCExtVtx[1][3] = G4ThreeVector( 234.00*mm, 112.5*mm, -52.38*mm); - - fVCExtVtx[2][0] = G4ThreeVector( 234.00*mm,-112.5*mm, 52.38*mm); - fVCExtVtx[2][1] = G4ThreeVector(-234.00*mm,-112.5*mm, 52.38*mm); - fVCExtVtx[2][2] = G4ThreeVector(-234.00*mm, 112.5*mm, 52.38*mm); - fVCExtVtx[2][3] = G4ThreeVector( 234.00*mm, 112.5*mm, 52.38*mm); - - fVCExtVtx[3][0] = G4ThreeVector( 234.00*mm,-112.5*mm, 369.26*mm); - fVCExtVtx[3][1] = G4ThreeVector(-540.00*mm,-112.5*mm, 369.26*mm); - fVCExtVtx[3][2] = G4ThreeVector(-540.00*mm, 112.5*mm, 369.26*mm); - fVCExtVtx[3][3] = G4ThreeVector( 234.00*mm, 112.5*mm, 369.26*mm); - - fVCExtVtx[4][0] = G4ThreeVector( 234.00*mm,-112.5*mm, 509.*mm); - fVCExtVtx[4][1] = G4ThreeVector(-540.00*mm,-112.5*mm, 509.*mm); - fVCExtVtx[4][2] = G4ThreeVector(-540.00*mm, 112.5*mm, 509.*mm); - fVCExtVtx[4][3] = G4ThreeVector( 234.00*mm, 112.5*mm, 509.*mm); - - fVCExtVtx[5][0] = G4ThreeVector( 234.00*mm,-112.5*mm, 509.*mm); - fVCExtVtx[5][1] = G4ThreeVector(-663.83*mm,-112.5*mm, 509.*mm); - fVCExtVtx[5][2] = G4ThreeVector(-663.83*mm, 112.5*mm, 509.*mm); - fVCExtVtx[5][3] = G4ThreeVector( 234.00*mm, 112.5*mm, 509.*mm); - - fVCExtVtx[6][0] = G4ThreeVector( 234.00*mm,-137.5*mm, 552.*mm); - fVCExtVtx[6][1] = G4ThreeVector(-706.09*mm,-137.5*mm, 552.*mm); - fVCExtVtx[6][2] = G4ThreeVector(-706.09*mm, 137.5*mm, 552.*mm); - fVCExtVtx[6][3] = G4ThreeVector( 234.00*mm, 137.5*mm, 552.*mm); - - fVCExtVtx[7][0] = G4ThreeVector( 234.00*mm,-137.5*mm, 799.*mm); - fVCExtVtx[7][1] = G4ThreeVector(-948.83*mm,-137.5*mm, 799.*mm); - fVCExtVtx[7][2] = G4ThreeVector(-948.83*mm, 137.5*mm, 799.*mm); - fVCExtVtx[7][3] = G4ThreeVector( 234.00*mm, 137.5*mm, 799.*mm); - - fVCExtVtx[8][0] = G4ThreeVector( 234.00*mm,-175.*mm, 864.*mm); - fVCExtVtx[8][1] = G4ThreeVector(-1012.71*mm,-175.*mm, 864.*mm); - fVCExtVtx[8][2] = G4ThreeVector(-1012.71*mm, 175.*mm, 864.*mm); - fVCExtVtx[8][3] = G4ThreeVector( 234.00*mm, 175.*mm, 864.*mm); - - fVCExtVtx[9][0] = G4ThreeVector( 234.00*mm,-175.*mm,1160.4*mm); - fVCExtVtx[9][1] = G4ThreeVector(-1304.00*mm,-175.*mm,1160.4*mm); - fVCExtVtx[9][2] = G4ThreeVector(-1304.00*mm, 175.*mm,1160.4*mm); - fVCExtVtx[9][3] = G4ThreeVector( 234.00*mm, 175.*mm,1160.4*mm); - - fVCExtVtx[10][0] = G4ThreeVector( 234.00*mm,-175.*mm,1947.53*mm); - fVCExtVtx[10][1] = G4ThreeVector(-1304.00*mm,-175.*mm,1947.53*mm); - fVCExtVtx[10][2] = G4ThreeVector(-1304.00*mm, 175.*mm,1947.53*mm); - fVCExtVtx[10][3] = G4ThreeVector( 234.00*mm, 175.*mm,1947.53*mm); - - fVCExtVtx[11][0] = G4ThreeVector( 234.00*mm,-175.*mm,2249.*mm); - fVCExtVtx[11][1] = G4ThreeVector(-422.77*mm,-175.*mm,2249.*mm); - fVCExtVtx[11][2] = G4ThreeVector(-422.77*mm, 175.*mm,2249.*mm); - fVCExtVtx[11][3] = G4ThreeVector( 234.00*mm, 175.*mm,2249.*mm); - - // Vertex coordinates of all sections of the chamber (internal shape of the steel shell) - - fVCIntVtx[0][0] = G4ThreeVector( 224.00*mm,-102.5*mm,-545.*mm); // Z ok - fVCIntVtx[0][1] = G4ThreeVector(-224.00*mm,-102.5*mm,-545.*mm); // X ok - fVCIntVtx[0][2] = G4ThreeVector(-224.00*mm, 102.5*mm,-545.*mm); // Y ok - fVCIntVtx[0][3] = G4ThreeVector( 224.00*mm, 102.5*mm,-545.*mm); - - fVCIntVtx[1][0] = G4ThreeVector( 224.00*mm,-102.5*mm, -56.42*mm); // X ok - fVCIntVtx[1][1] = G4ThreeVector(-224.00*mm,-102.5*mm, -56.42*mm); // Y ok - fVCIntVtx[1][2] = G4ThreeVector(-224.00*mm, 102.5*mm, -56.42*mm); // Z ok - fVCIntVtx[1][3] = G4ThreeVector( 224.00*mm, 102.5*mm, -56.42*mm); - - fVCIntVtx[2][0] = G4ThreeVector( 224.00*mm,-102.5*mm, 56.42*mm); // X ok - fVCIntVtx[2][1] = G4ThreeVector(-224.00*mm,-102.5*mm, 56.42*mm); // Y ok - fVCIntVtx[2][2] = G4ThreeVector(-224.00*mm, 102.5*mm, 56.42*mm); // Z ok - fVCIntVtx[2][3] = G4ThreeVector( 224.00*mm, 102.5*mm, 56.42*mm); - - fVCIntVtx[3][0] = G4ThreeVector( 224.00*mm,-102.5*mm, 373.30*mm); // Y ok - fVCIntVtx[3][1] = G4ThreeVector(-530.00*mm,-102.5*mm, 373.30*mm); // X ok - fVCIntVtx[3][2] = G4ThreeVector(-530.00*mm, 102.5*mm, 373.30*mm); // Z ok - fVCIntVtx[3][3] = G4ThreeVector( 224.00*mm, 102.5*mm, 373.30*mm); - - fVCIntVtx[4][0] = G4ThreeVector( 224.00*mm,-102.5*mm, 519.*mm); // Z ok - fVCIntVtx[4][1] = G4ThreeVector(-530.00*mm,-102.5*mm, 519.*mm); // Y ok - fVCIntVtx[4][2] = G4ThreeVector(-530.00*mm, 102.5*mm, 519.*mm); // X ok - fVCIntVtx[4][3] = G4ThreeVector( 224.00*mm, 102.5*mm, 519.*mm); - - fVCIntVtx[5][0] = G4ThreeVector( 224.00*mm,-102.5*mm, 519.*mm); // Z ok - fVCIntVtx[5][1] = G4ThreeVector(-659.79*mm,-102.5*mm, 519.*mm); // Y ok - fVCIntVtx[5][2] = G4ThreeVector(-659.79*mm, 102.5*mm, 519.*mm); // X ok - fVCIntVtx[5][3] = G4ThreeVector( 224.00*mm, 102.5*mm, 519.*mm); - - fVCIntVtx[6][0] = G4ThreeVector( 224.00*mm,-127.5*mm, 552.*mm); // Z ok ? - fVCIntVtx[6][1] = G4ThreeVector(-692.22*mm,-127.5*mm, 552.*mm); // Y ok - fVCIntVtx[6][2] = G4ThreeVector(-692.22*mm, 127.5*mm, 552.*mm); // X ok ? - fVCIntVtx[6][3] = G4ThreeVector( 224.00*mm, 127.5*mm, 552.*mm); - - fVCIntVtx[7][0] = G4ThreeVector( 224.00*mm,-127.5*mm, 799.*mm); - fVCIntVtx[7][1] = G4ThreeVector(-934.92*mm,-127.5*mm, 799.*mm); // Z ok ? - fVCIntVtx[7][2] = G4ThreeVector(-934.92*mm, 127.5*mm, 799.*mm); // Y ok - fVCIntVtx[7][3] = G4ThreeVector( 224.00*mm, 127.5*mm, 799.*mm); // X ok ? - - fVCIntVtx[8][0] = G4ThreeVector( 224.00*mm,-165.*mm, 864.*mm); // Z ok ? - fVCIntVtx[8][1] = G4ThreeVector(-998.79*mm,-165.*mm, 864.*mm); // Y ok - fVCIntVtx[8][2] = G4ThreeVector(-998.79*mm, 165.*mm, 864.*mm); // X ok ? - fVCIntVtx[8][3] = G4ThreeVector( 224.00*mm, 165.*mm, 864.*mm); - - fVCIntVtx[9][0] = G4ThreeVector( 224.00*mm,-165.*mm,1164.44*mm); // Y ok - fVCIntVtx[9][1] = G4ThreeVector(-1294.00*mm,-165.*mm,1164.44*mm); // X ok - fVCIntVtx[9][2] = G4ThreeVector(-1294.00*mm, 165.*mm,1164.44*mm); // Z ok - fVCIntVtx[9][3] = G4ThreeVector( 224.00*mm, 165.*mm,1164.44*mm); - - fVCIntVtx[10][0] = G4ThreeVector( 224.00*mm,-165.*mm,1940.382*mm); // X ok - fVCIntVtx[10][1] = G4ThreeVector(-1294.00*mm,-165.*mm,1940.382*mm); // Y ok - fVCIntVtx[10][2] = G4ThreeVector(-1294.00*mm, 165.*mm,1940.382*mm); // Z ok - fVCIntVtx[10][3] = G4ThreeVector( 224.00*mm, 165.*mm,1940.382*mm); - - fVCIntVtx[11][0] = G4ThreeVector( 224.000*mm,-165.*mm,2239.*mm); // Z ok - fVCIntVtx[11][1] = G4ThreeVector(-421.107*mm,-165.*mm,2239.*mm); // Y ok - fVCIntVtx[11][2] = G4ThreeVector(-421.107*mm, 165.*mm,2239.*mm); // X ok - fVCIntVtx[11][3] = G4ThreeVector( 224.000*mm, 165.*mm,2239.*mm); - - // Define facets used to create the chamber as a tesselated solid - // Each facet is defined by 3 or 4 (see below) vertices encoded as an integer number in the form ssv - // where ss is the section (0-11) and v is the section's vertex (0-3) taken from - // one of the two lists above - // Vertices must follow an anti-clockwise order when the facet is seen from outside the solid - // If v[3] >= 0 then the facet is quadrangular - // If v[3] = -1 then the facet is triangular and v[3] is not used - // Note that each side of a facet must be shared with exactly one single side - // of another facet: if this is not the case then the facet must be split. - // - // +-----------+ +-----------+ - // | | |\ | - // | | | \ | - // | | ----> | \ | - // +---+-------+ +---+-------+ - // | | | | | | - // +---+-------+ +---+-------+ - // WRONG CORRECT - - // S 0 -Z - fVCFacetVtx[0][0] = 0; - fVCFacetVtx[0][1] = 1; - fVCFacetVtx[0][2] = 2; - fVCFacetVtx[0][3] = 3; - - // S 0-2 +X - fVCFacetVtx[1][0] = 0; - fVCFacetVtx[1][1] = 3; - fVCFacetVtx[1][2] = 23; - fVCFacetVtx[1][3] = 20; - - // S 0-2 +Y - fVCFacetVtx[2][0] = 3; - fVCFacetVtx[2][1] = 2; - fVCFacetVtx[2][2] = 22; - fVCFacetVtx[2][3] = 23; - - // S 0-2 -X - fVCFacetVtx[3][0] = 2; - fVCFacetVtx[3][1] = 1; - fVCFacetVtx[3][2] = 21; - fVCFacetVtx[3][3] = 22; - - // S 0-2 -Y - fVCFacetVtx[4][0] = 1; - fVCFacetVtx[4][1] = 0; - fVCFacetVtx[4][2] = 20; - fVCFacetVtx[4][3] = 21; - - // S 2-3 +X - fVCFacetVtx[5][0] = 20; - fVCFacetVtx[5][1] = 23; - fVCFacetVtx[5][2] = 33; - fVCFacetVtx[5][3] = 30; - - // S 2-3 +Y - fVCFacetVtx[6][0] = 23; - fVCFacetVtx[6][1] = 22; - fVCFacetVtx[6][2] = 32; - fVCFacetVtx[6][3] = 33; - - // S 2-3 -X - fVCFacetVtx[7][0] = 22; - fVCFacetVtx[7][1] = 21; - fVCFacetVtx[7][2] = 31; - fVCFacetVtx[7][3] = 32; - - // S 2-3 -Y - fVCFacetVtx[8][0] = 21; - fVCFacetVtx[8][1] = 20; - fVCFacetVtx[8][2] = 30; - fVCFacetVtx[8][3] = 31; - - // S 3-4 +X - fVCFacetVtx[9][0] = 30; - fVCFacetVtx[9][1] = 33; - fVCFacetVtx[9][2] = 43; - fVCFacetVtx[9][3] = 40; - - // S 3-4 +Y - fVCFacetVtx[10][0] = 33; - fVCFacetVtx[10][1] = 32; - fVCFacetVtx[10][2] = 42; - fVCFacetVtx[10][3] = 43; - - // S 3-4 -X - fVCFacetVtx[11][0] = 32; - fVCFacetVtx[11][1] = 31; - fVCFacetVtx[11][2] = 41; - fVCFacetVtx[11][3] = 42; - - // S 3-4 -Y - fVCFacetVtx[12][0] = 31; - fVCFacetVtx[12][1] = 30; - fVCFacetVtx[12][2] = 40; - fVCFacetVtx[12][3] = 41; - - // S 4-5, -Z - fVCFacetVtx[13][0] = 42; - fVCFacetVtx[13][1] = 41; - fVCFacetVtx[13][2] = 51; - fVCFacetVtx[13][3] = 52; - - // S 4-6 +X - fVCFacetVtx[14][0] = 40; - fVCFacetVtx[14][1] = 43; - fVCFacetVtx[14][2] = 63; - fVCFacetVtx[14][3] = 60; - - // S 4-6 +Y - fVCFacetVtx[15][0] = 43; - fVCFacetVtx[15][1] = 42; - fVCFacetVtx[15][2] = 62; - fVCFacetVtx[15][3] = 63; - - // S 5-6 -X - fVCFacetVtx[16][0] = 52; - fVCFacetVtx[16][1] = 51; - fVCFacetVtx[16][2] = 61; - fVCFacetVtx[16][3] = 62; - - // S 4-6 -Y - fVCFacetVtx[17][0] = 41; - fVCFacetVtx[17][1] = 40; - fVCFacetVtx[17][2] = 60; - fVCFacetVtx[17][3] = 61; - - // S 6-7 +X - fVCFacetVtx[18][0] = 60; - fVCFacetVtx[18][1] = 63; - fVCFacetVtx[18][2] = 73; - fVCFacetVtx[18][3] = 70; - - // S 6-7 +Y - fVCFacetVtx[19][0] = 63; - fVCFacetVtx[19][1] = 62; - fVCFacetVtx[19][2] = 72; - fVCFacetVtx[19][3] = 73; - - // S 6-7 -X - fVCFacetVtx[20][0] = 62; - fVCFacetVtx[20][1] = 61; - fVCFacetVtx[20][2] = 71; - fVCFacetVtx[20][3] = 72; - - // S 6-7 -Y - fVCFacetVtx[21][0] = 61; - fVCFacetVtx[21][1] = 60; - fVCFacetVtx[21][2] = 70; - fVCFacetVtx[21][3] = 71; - - // S 7-8 +X - fVCFacetVtx[22][0] = 70; - fVCFacetVtx[22][1] = 73; - fVCFacetVtx[22][2] = 83; - fVCFacetVtx[22][3] = 80; - - // S 7-8 +Y - fVCFacetVtx[23][0] = 73; - fVCFacetVtx[23][1] = 72; - fVCFacetVtx[23][2] = 82; - fVCFacetVtx[23][3] = 83; - - // S 7-8 -X - fVCFacetVtx[24][0] = 72; - fVCFacetVtx[24][1] = 71; - fVCFacetVtx[24][2] = 81; - fVCFacetVtx[24][3] = 82; - - // S 7-8 -Y - fVCFacetVtx[25][0] = 71; - fVCFacetVtx[25][1] = 70; - fVCFacetVtx[25][2] = 80; - fVCFacetVtx[25][3] = 81; - - // S 8-9 +X - fVCFacetVtx[26][0] = 80; - fVCFacetVtx[26][1] = 83; - fVCFacetVtx[26][2] = 93; - fVCFacetVtx[26][3] = 90; - - // S 8-9 +Y - fVCFacetVtx[27][0] = 83; - fVCFacetVtx[27][1] = 82; - fVCFacetVtx[27][2] = 92; - fVCFacetVtx[27][3] = 93; - - // S 8-9 -X - fVCFacetVtx[28][0] = 82; - fVCFacetVtx[28][1] = 81; - fVCFacetVtx[28][2] = 91; - fVCFacetVtx[28][3] = 92; - - // S 8-9 -Y - fVCFacetVtx[29][0] = 81; - fVCFacetVtx[29][1] = 80; - fVCFacetVtx[29][2] = 90; - fVCFacetVtx[29][3] = 91; - - // S 9-10 +X - fVCFacetVtx[30][0] = 90; - fVCFacetVtx[30][1] = 93; - fVCFacetVtx[30][2] = 103; - fVCFacetVtx[30][3] = 100; - - // S 9-10 +Y - fVCFacetVtx[31][0] = 93; - fVCFacetVtx[31][1] = 92; - fVCFacetVtx[31][2] = 102; - fVCFacetVtx[31][3] = 103; - - // S 9-10 -X - fVCFacetVtx[32][0] = 92; - fVCFacetVtx[32][1] = 91; - fVCFacetVtx[32][2] = 101; - fVCFacetVtx[32][3] = 102; - - // S 9-10 -Y - fVCFacetVtx[33][0] = 91; - fVCFacetVtx[33][1] = 90; - fVCFacetVtx[33][2] = 100; - fVCFacetVtx[33][3] = 101; - - // S 10-11 +X - fVCFacetVtx[34][0] = 100; - fVCFacetVtx[34][1] = 103; - fVCFacetVtx[34][2] = 113; - fVCFacetVtx[34][3] = 110; - - // S 10-11 +Y - fVCFacetVtx[35][0] = 103; - fVCFacetVtx[35][1] = 102; - fVCFacetVtx[35][2] = 112; - fVCFacetVtx[35][3] = 113; - - // S 10-11 -X - fVCFacetVtx[36][0] = 102; - fVCFacetVtx[36][1] = 101; - fVCFacetVtx[36][2] = 111; - fVCFacetVtx[36][3] = 112; - - // S 10-11 -Y - fVCFacetVtx[37][0] = 101; - fVCFacetVtx[37][1] = 100; - fVCFacetVtx[37][2] = 110; - fVCFacetVtx[37][3] = 111; - - // S 11 +Z - fVCFacetVtx[38][0] = 113; - fVCFacetVtx[38][1] = 112; - fVCFacetVtx[38][2] = 111; - fVCFacetVtx[38][3] = 110; - - // S 4-(5)-6 +Y - fVCFacetVtx[39][0] = 42; - fVCFacetVtx[39][1] = 52; - fVCFacetVtx[39][2] = 62; - fVCFacetVtx[39][3] = -1; - - // S 4-(5)-6 -Y - fVCFacetVtx[40][0] = 51; - fVCFacetVtx[40][1] = 41; - fVCFacetVtx[40][2] = 61; - fVCFacetVtx[40][3] = -1; - - //printf("In geo %f %f %f\n",fVCExtVtx[1][0].x(),fVCExtVtx[1][0].y(),fVCExtVtx[1][0].z()); - - // Quantities derived from the vertices positions - fVCMostExternalX = -fVCExtVtx[9][1].x(); // Absolute value of largest X coordinate of the chamber - - // Properties of the beam entrance hole - fVCInHoleRadius = 5.*cm; - fVCInHoleThick = fVCIntVtx[0][0].z()-fVCExtVtx[0][0].z(); - fVCInHolePosZ = 0.5*(fVCExtVtx[0][0].z()+fVCIntVtx[0][0].z()); - - // Properties of the beam exit hole - fVCOutHoleRadius = 25.*mm; // Radius of the two circles - fVCOutHoleLength = 100.*mm; // Distance between circle centers - fVCOutHoleThick = 10.*mm; // Should be computed from distance between chamber faces - // Distance of center of hole from edge on the VC back face - fVCOutHoleDistToEdge = 35.*cm; // To verify with Cesidio + fEWAlFrontFacePosZ = fVCBackFacePosZ; // Front face of flange holding aluminum thin window // Properties of crossed pipes at target position + fCPZRIn = 5.*cm; fCPZThick = 1.*cm; fCPZLength = 29.*cm; - //fCPZPosZ = fVCExtVtx[0][0].z()-0.5*fCPZLength; fCPZPosZ = -1.*m; fCPXRIn = 5.*cm; fCPXThick = 1.*cm; fCPXLength = 25.*cm; - //fCPXPosZ = fVCExtVtx[0][0].z()-0.5*fCPZLength; fCPXPosZ = -1.*m; } ChamberGeometry::~ChamberGeometry() {} - -G4double ChamberGeometry::GetVCBackFaceAngle() -{ - G4double angle = atan2(fVCExtVtx[11][1].z()-fVCExtVtx[10][1].z(), - fVCExtVtx[11][1].x()-fVCExtVtx[10][1].x()); - return angle; -} - -G4ThreeVector ChamberGeometry::GetVCBackFaceCorner() -{ - return G4ThreeVector(fVCExtVtx[11][1].x(),0.,fVCExtVtx[11][1].z()); -} - -G4double ChamberGeometry::GetVCBackFaceThickness() -{ - G4double thick = fVCExtVtx[11][0].z()-fVCIntVtx[11][0].z(); - return thick; -} diff --git a/PadmeMC/Chamber/src/ChamberStructure.cc b/PadmeMC/Chamber/src/ChamberStructure.cc index 752fa5c4..0c85b290 100644 --- a/PadmeMC/Chamber/src/ChamberStructure.cc +++ b/PadmeMC/Chamber/src/ChamberStructure.cc @@ -47,181 +47,17 @@ ChamberStructure::~ChamberStructure() void ChamberStructure::CreateGeometry() { - /* - std::vector s1_out; - s1_out.push_back(G4TwoVector( 227.50*mm, 0.00*mm)); - s1_out.push_back(G4TwoVector(-227.50*mm, 0.00*mm)); - s1_out.push_back(G4TwoVector(-227.50*mm,1008.28*mm)); - s1_out.push_back(G4TwoVector( 551.23*mm,1008.28*mm)); - s1_out.push_back(G4TwoVector( 227.50*mm, 657.81*mm)); - G4ExtrudedSolid* s1_out_solid = new G4ExtrudedSolid("VC_S1OUT",s1_out,112.5*mm,0.,1.,0.,1.); - G4LogicalVolume* s1_out_logic = new G4LogicalVolume(s1_out_solid,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"VC_S1OUT",0,0,0); - std::vector s1_in; - s1_in.push_back(G4TwoVector( 217.50*mm, 10.00*mm)); - s1_in.push_back(G4TwoVector(-217.50*mm, 10.00*mm)); - s1_in.push_back(G4TwoVector(-217.50*mm,1008.28*mm)); - s1_in.push_back(G4TwoVector( 536.71*mm,1008.28*mm)); - s1_in.push_back(G4TwoVector( 217.50*mm, 661.80*mm)); - G4ExtrudedSolid* s1_in_solid = new G4ExtrudedSolid("VC_S1IN",s1_in,102.5*mm,0.,1.,0.,1.); - G4LogicalVolume* s1_in_logic = new G4LogicalVolume(s1_in_solid,G4Material::GetMaterial("Vacuum"),"VC_S1IN",0,0,0); - //s1_in_logic->SetVisAttributes(G4VisAttributes::Invisible); - new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),s1_in_logic,"VC_S1IN",s1_out_logic,false,0); - - new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),s1_out_logic,"VC_S1OUT",fMotherVolume,false,0); - */ - - //ChamberGeometry* geo = ChamberGeometry::GetInstance(); - - ///////////////////////// - // Main vacuum chamber // - ///////////////////////// - - /* - printf("Creating global VC volume\n"); - G4UnionSolid* solidGlobVC = CreateVCFacetGlobalSolid(); - fGlobalLogicalVolume = new G4LogicalVolume(solidGlobVC,G4Material::GetMaterial("Vacuum"),"ChamberGlobal",0,0,0); - if ( fChamberIsVisible && ! fChamberExists ) { // Used for vacuum chamber visual debug - fGlobalLogicalVolume->SetVisAttributes(G4VisAttributes(G4Colour::White())); - } else { - fGlobalLogicalVolume->SetVisAttributes(G4VisAttributes::Invisible); - } - new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),fGlobalLogicalVolume,"VacuumChamber",fMotherVolume,false,0); - - if ( ! fChamberExists ) return; - - printf("Creating external VC volume\n"); - G4UnionSolid* solidExtVC = CreateVCFacetExternalSolid(); - //externalLogicalVolume = new G4LogicalVolume(solidExtVC,G4Material::GetMaterial("G4_STAINLESS-STEEL"), - // "VCExternal",0,0,0); - //externalLogicalVolume->SetVisAttributes(G4VisAttributes(G4Colour::Grey())); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),externalLogicalVolume,"ChamberExternal",fGlobalLogicalVolume,false,0); - - printf("Creating internal VC volume\n"); - G4UnionSolid* solidIntVC = CreateVCFacetInternalSolid(); - //G4LogicalVolume* internalLogicalVolume = new G4LogicalVolume(solidIntVC,G4Material::GetMaterial("Vacuum"), "VCInternal",0,0,0); - //internalLogicalVolume->SetVisAttributes(G4VisAttributes::Invisible); - //internalLogicalVolume->SetVisAttributes(G4VisAttributes(G4Colour::White())); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),internalLogicalVolume,"ChamberInternal",fMotherVolume,false,0); - - G4SubtractionSolid* solidSteelShell = new G4SubtractionSolid("ChamberSteelShell",solidExtVC,solidIntVC,0,G4ThreeVector(0.,0.,0.)); - G4LogicalVolume* logicalSteelShell = new G4LogicalVolume(solidSteelShell,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"ChamberShell",0,0,0); - if ( fChamberIsVisible ) { - //logicalSteelShell->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); - logicalSteelShell->SetVisAttributes(G4VisAttributes(G4Colour::Grey())); - } else { - logicalSteelShell->SetVisAttributes(G4VisAttributes::Invisible); - } - new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),logicalSteelShell,"ChamberShell",fGlobalLogicalVolume,false,0); - */ + // The main parts of the Vacuum Chamber are imported in DetectorConstruction.cc from GDML files + // Here we only define flanges, portholes and other components of the chamber // Create the thin window membrane in front of ECal with its flange - //printf("Creating ECal thin window\n"); - //CreateECalThinWindow(); CreateECalAlThinWindow(); // Create crossed pipes in the target area - //printf("Creating Target pipe\n"); CreateTargetPipes(); } -void ChamberStructure::CreateECalThinWindow() -{ - - ///////////////////////////////////////// - // Thin window flange in front of ECal // - ///////////////////////////////////////// - - ChamberGeometry* geo = ChamberGeometry::GetInstance(); - - G4double ewR = geo->GetEWRadius(); // Radius of the membrane - G4double ewC = geo->GetEWConvexity(); // Convexity at membrane center - - G4double ewd1 = geo->GetEWBackMylarThick(); // Thickness of mylar (layer 1) on external face of chamber - G4double ewd2 = geo->GetEWKevlarThick(); // Thickness of kevlar (layer 2) between mylar layers - G4double ewd3 = geo->GetEWFrontMylarThick(); // Thickness of mylar (layer 3) on internal face of chamber - - //printf("Vacuum chamber window\n"); - //printf("ewR %f ewC %f ewd1 %f ewd2 %f ewd3 %f\n",ewR,ewC,ewd1,ewd2,ewd3); - - //G4VisAttributes steelVisAttr = G4VisAttributes(G4Colour::Blue()); - G4VisAttributes steelVisAttr = G4VisAttributes(G4Colour::Grey()); - G4VisAttributes membraneVisAttr = G4VisAttributes(G4Colour::Green()); - if ( ! fChamberIsVisible ) { - steelVisAttr = G4VisAttributes::Invisible; - membraneVisAttr = G4VisAttributes::Invisible; - } - // External mylar membrane - G4double ewr1 = (ewR*ewR+ewC*ewC)/(2.*ewC); - G4double ewz1 = geo->GetEWBackFacePosZ()+(ewr1-ewC); - G4double ewth1 = asin(ewR/ewr1); - //printf("ewr1 %f ewz1 %f ewth1 %11.9f pi-ewth1 %11.9f\n",ewr1,ewz1,ewth1,180.*deg-ewth1); - G4Sphere* solidEWSphere1 = new G4Sphere("EWSphere1",ewr1,ewr1+ewd1,0.*deg,360.*deg,180.*deg-ewth1,ewth1); - G4Tubs* solidEWRing1 = new G4Tubs("EWRing1",ewR-10.*um,ewR+10.*mm,0.7*ewd1,0.*deg,360.*deg); - G4ThreeVector ring1Pos = G4ThreeVector(0.,0.,-sqrt(ewr1*ewr1-ewR*ewR)-0.5*ewd1); - G4SubtractionSolid* solidEWLayer1 = new G4SubtractionSolid("EWMylarExt",solidEWSphere1,solidEWRing1,0,ring1Pos); - G4LogicalVolume* logicalEWLayer1 = new G4LogicalVolume(solidEWLayer1,G4Material::GetMaterial("G4_MYLAR"), "EWMylarExt",0,0,0); - //logicalEWLayer1->SetVisAttributes(G4VisAttributes(G4Colour::Green())); - logicalEWLayer1->SetVisAttributes(membraneVisAttr); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz1),logicalEWLayer1,"EWMylarExt",fGlobalLogicalVolume,false,0); - new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz1),logicalEWLayer1,"EWMylarExt",fMotherVolume,false,0); - - // Central kevlar membrane - G4double ewr2 = ewr1+ewd1; - G4double ewz2 = ewz1; - G4double ewth2 = asin(ewR/ewr2); - //printf("ewr2 %f ewz2 %f ewth2 %11.9f\n",ewr2,ewz2,ewth2); - G4Sphere* solidEWSphere2 = new G4Sphere("EWSphere2",ewr2,ewr2+ewd2,0.*deg,360.*deg,180.*deg-ewth2,ewth2); - G4Tubs* solidEWRing2 = new G4Tubs("EWRing2",ewR-10.*um,ewR+10.*mm,0.7*ewd2,0.*deg,360.*deg); - G4ThreeVector ring2Pos = G4ThreeVector(0.,0.,-sqrt(ewr2*ewr2-ewR*ewR)-0.5*ewd2); - G4SubtractionSolid* solidEWLayer2 = new G4SubtractionSolid("EWKevlar",solidEWSphere2,solidEWRing2,0,ring2Pos); - G4LogicalVolume* logicalEWLayer2 = new G4LogicalVolume(solidEWLayer2,G4Material::GetMaterial("Kevlar"), "EWKevlar",0,0,0); - //logicalEWLayer2->SetVisAttributes(G4VisAttributes(G4Colour::Green())); - logicalEWLayer2->SetVisAttributes(membraneVisAttr); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz2),logicalEWLayer2,"EWKevlar",fGlobalLogicalVolume,false,0); - new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz2),logicalEWLayer2,"EWKevlar",fMotherVolume,false,0); - - // Internal mylar membrane - G4double ewr3 = ewr2+ewd2; - G4double ewz3 = ewz1; - G4double ewth3 = asin(ewR/ewr3); - //printf("ewr3 %f ewz3 %f ewth3 %11.9f\n",ewr3,ewz3,ewth3); - G4Sphere* solidEWSphere3 = new G4Sphere("EWSphere3",ewr3,ewr3+ewd3,0.*deg,360.*deg,180.*deg-ewth3,ewth3); - G4Tubs* solidEWRing3 = new G4Tubs("EWRing3",ewR-10.*um,ewR+10.*mm,0.7*ewd3,0.*deg,360.*deg); - G4ThreeVector ring3Pos = G4ThreeVector(0.,0.,-sqrt(ewr3*ewr3-ewR*ewR)-0.5*ewd3); - G4SubtractionSolid* solidEWLayer3 = new G4SubtractionSolid("EWMylarInt",solidEWSphere3,solidEWRing3,0,ring3Pos); - G4LogicalVolume* logicalEWLayer3 = new G4LogicalVolume(solidEWLayer3,G4Material::GetMaterial("G4_MYLAR"), "EWMylarInt",0,0,0); - //logicalEWLayer3->SetVisAttributes(G4VisAttributes(G4Colour::Green())); - logicalEWLayer3->SetVisAttributes(membraneVisAttr); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz3),logicalEWLayer3,"EWMylarInt",fGlobalLogicalVolume,false,0); - new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz3),logicalEWLayer3,"EWMylarInt",fMotherVolume,false,0); - - // First steel ring (outer) - G4Tubs* solidEWIronRing1 = new G4Tubs("EWIronRing1",geo->GetEWF1RIn(),geo->GetEWF1ROut(),0.5*geo->GetEWF1Thick(),0.*deg,360.*deg); - G4LogicalVolume* logicalEWIronRing1 = new G4LogicalVolume(solidEWIronRing1,G4Material::GetMaterial("G4_STAINLESS-STEEL"), "EWIronRing1",0,0,0); - logicalEWIronRing1->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); - //logicalEWIronRing1->SetVisAttributes(steelVisAttr); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF1PosZ()),logicalEWIronRing1,"EWIronRing1",fGlobalLogicalVolume,false,0); - new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF1PosZ()),logicalEWIronRing1,"EWIronRing1",fMotherVolume,false,0); - - // Second steel ring - G4Tubs* solidEWIronRing2 = new G4Tubs("EWIronRing2",geo->GetEWF2RIn(),geo->GetEWF2ROut(),0.5*geo->GetEWF2Thick(),0.*deg,360.*deg); - G4LogicalVolume* logicalEWIronRing2 = new G4LogicalVolume(solidEWIronRing2,G4Material::GetMaterial("G4_STAINLESS-STEEL"), "EWIronRing2",0,0,0); - logicalEWIronRing2->SetVisAttributes(G4VisAttributes(G4Colour::Red())); - //logicalEWIronRing2->SetVisAttributes(steelVisAttr); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF2PosZ()),logicalEWIronRing2,"EWIronRing2",fGlobalLogicalVolume,false,0); - new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF2PosZ()),logicalEWIronRing2,"EWIronRing2",fMotherVolume,false,0); - - // Third steel ring - G4Tubs* solidEWIronRing3 = new G4Tubs("EWIronRing3",geo->GetEWF3RIn(),geo->GetEWF3ROut(),0.5*geo->GetEWF3Thick(),0.*deg,360.*deg); - G4LogicalVolume* logicalEWIronRing3 = new G4LogicalVolume(solidEWIronRing3,G4Material::GetMaterial("G4_STAINLESS-STEEL"), "EWIronRing3",0,0,0); - logicalEWIronRing3->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); - //logicalEWIronRing3->SetVisAttributes(steelVisAttr); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF3PosZ()),logicalEWIronRing3,"EWIronRing3",fGlobalLogicalVolume,false,0); - new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetEWF3PosZ()),logicalEWIronRing3,"EWIronRing3",fMotherVolume,false,0); - -} - void ChamberStructure::CreateECalAlThinWindow() { @@ -242,25 +78,32 @@ void ChamberStructure::CreateECalAlThinWindow() G4double ewFThick = geo->GetEWAlFlangeThick(); // Get Z coordinate of front and back face of flange - //G4double efFFrontZ = geo->GetEWAlFrontFacePosZ(); - G4double efFBackZ = geo->GetEWAlBackFacePosZ(); + G4double efFFrontZ = geo->GetEWAlFrontFacePosZ(); + //G4double efFBackZ = geo->GetEWAlBackFacePosZ(); G4VisAttributes alVisAttr = G4VisAttributes(G4Colour::Blue()); if ( ! fChamberIsVisible ) alVisAttr = G4VisAttributes::Invisible; - // Aluminum thin windowExternal mylar membrane + // Compute thin window sphere's radius and z position of center G4double ewr1 = (ewR*ewR+ewC*ewC)/(2.*ewC); - G4double ewz1 = efFBackZ+(ewr1-ewC); + //G4double ewz1 = efFBackZ+(ewr1-ewC); G4double ewth1 = asin(ewR/ewr1); - //printf("ewr1 %f ewz1 %f ewth1 %11.9f pi-ewth1 %11.9f\n",ewr1,ewz1,ewth1,180.*deg-ewth1); - G4Sphere* solidEWSphere = new G4Sphere("EWSphere",ewr1,ewr1+ewT,0.*deg,360.*deg,180.*deg-ewth1,ewth1); + + // Create flange around thin window G4Tubs* solidEWFlange = new G4Tubs("EWFlange",ewFRIn,ewFROut,0.5*ewFThick,0.*deg,360.*deg); - G4ThreeVector flangePos = G4ThreeVector(0.,0.,-sqrt(ewr1*ewr1-ewR*ewR)-0.5*ewT); - G4UnionSolid* solidEWindow = new G4UnionSolid("EAlWindow",solidEWSphere,solidEWFlange,0,flangePos); - G4LogicalVolume* logicalEWindow = new G4LogicalVolume(solidEWindow,G4Material::GetMaterial("G4_Al"), "EAlWindow",0,0,0); - //logicalEWLayer1->SetVisAttributes(G4VisAttributes(G4Colour::Green())); + + // Create the thin window spherical cap + G4Sphere* solidEWSphere = new G4Sphere("EWSphere",ewr1,ewr1+ewT,0.*deg,360.*deg,180.*deg-ewth1,ewth1); + + // Cretae the final structure by joining the two volumes + //G4ThreeVector ewspherePos = G4ThreeVector(0.,0.,-sqrt(ewr1*ewr1-ewR*ewR)-0.5*ewT); + //G4UnionSolid* solidEWindow = new G4UnionSolid("EAlWindow",solidEWSphere,solidEWFlange,0,flangePos); + G4ThreeVector spherePos = G4ThreeVector(0.,0.,0.5*ewFThick+ewr1-ewC); + G4UnionSolid* solidEWindow = new G4UnionSolid("ChamberAlWindow",solidEWFlange,solidEWSphere,0,spherePos); + G4LogicalVolume* logicalEWindow = new G4LogicalVolume(solidEWindow,G4Material::GetMaterial("G4_Al"), "ChamberAlWindow",0,0,0); logicalEWindow->SetVisAttributes(alVisAttr); - new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz1),logicalEWindow,"EAlWindow",fMotherVolume,false,0,true); + //new G4PVPlacement(0,G4ThreeVector(0.,0.,ewz1),logicalEWindow,"ChamberAlWindow",fMotherVolume,false,0,true); + new G4PVPlacement(0,G4ThreeVector(0.,0.,efFFrontZ+0.5*ewFThick),logicalEWindow,"ChamberAlWindow",fMotherVolume,false,0,true); } @@ -342,299 +185,3 @@ G4double ChamberStructure::GetChamberInnerZ() return ChamberGeometry::GetInstance()->GetVCInnerZ(); } */ -G4UnionSolid* ChamberStructure::CreateVCFacetGlobalSolid() -{ - - // Create the main volume of the vacuum chamber - - ChamberGeometry* geo = ChamberGeometry::GetInstance(); - - // Create main VC volume as a tessellated solid - G4TessellatedSolid* solidMain = new G4TessellatedSolid("VCGlobMain"); - - G4int nFacets = geo->GetVCNFacets(); - for(G4int f=0; fGetVCFacetVtx(f,v); - if (ivtx != -1) { - G4int is = ivtx/10; // Section id (0-11) - G4int iv = ivtx%10; // Vertex id (0-3) - vtx[v] = geo->GetVCExtVtx(is,iv); - } else { - quadFacet = 0; - } - } - if (quadFacet) { - G4QuadrangularFacet* facet = new G4QuadrangularFacet(vtx[0],vtx[1],vtx[2],vtx[3],ABSOLUTE); - solidMain->AddFacet((G4VFacet*)facet); - } else { - G4TriangularFacet* facet = new G4TriangularFacet(vtx[0],vtx[1],vtx[2],ABSOLUTE); - solidMain->AddFacet((G4VFacet*)facet); - } - } - solidMain->SetSolidClosed(true); - - // In depth debug of tesselated solid - //G4cout << "Dump of solid:\n" << solidMain << G4endl; - //G4Polyhedron* polyhedron = solidMain->GetPolyhedron(); - //G4cout << "\nLocal polyhedron coordinates:\n" << *polyhedron << G4endl; - - //G4LogicalVolume* logicalMain = new G4LogicalVolume(solidMain,G4Material::GetMaterial("Vacuum"),"VCGlobMain",0,0,0); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),logicalMain,"VCGlobMain",fMotherVolume,false,0); - - // Big cylinder - G4double cyLen = geo->GetVCCLength(); - G4double cyROut = geo->GetVCCROut(); - G4double cyPosZ = geo->GetVCCPosZ(); - //printf("Cylinder %f %f %f %f %f\n",cyLen,cyThick,cyRIn,cyROut,cyPosZ); - G4Tubs* solidCyl = new G4Tubs("VCCylGlob",0.,cyROut,0.5*cyLen,0.*deg,360.*deg); - - // Flange towards ECal thin window (includes thin window and its flange) - G4double flaLen = geo->GetVCMostAdvancedZ()-(cyPosZ+0.5*cyLen); - G4double flaROut = geo->GetVCCFROut(); - G4double flaPosZ = cyPosZ+0.5*cyLen+0.5*flaLen; - G4Tubs* solidFla = new G4Tubs("VCFlaGlob",0.,flaROut,0.5*flaLen,0.*deg,360.*deg); - - // Crossed pipes at target position - G4double cpzR = geo->GetCPZROut(); - G4double cpzLen = geo->GetCPZLength(); - G4double cpzPosZ = geo->GetCPZPosZ(); - G4Tubs* solidCPZ = new G4Tubs("CPZGlob",0.,cpzR,0.5*cpzLen,0.*deg,360.*deg); - G4ThreeVector posCPZ = G4ThreeVector(0.,0.,cpzPosZ); - - G4double cpxR = geo->GetCPXROut(); - G4double cpxLen = geo->GetCPXLength(); - G4double cpxPosZ = geo->GetCPXPosZ(); - G4Tubs* solidCPX = new G4Tubs("CPXGlob",0.,cpxR,0.5*cpxLen,0.*deg,360.*deg); - G4ThreeVector posCPX = G4ThreeVector(0.,0.,cpxPosZ); - G4RotationMatrix* rotCPX = new G4RotationMatrix; - rotCPX->rotateY(90.*deg); - - // Attach cylinder, flange, and pipes to vacuum chamber - G4UnionSolid* solid0 = new G4UnionSolid("VCGlobal0",solidMain,solidCyl,0,G4ThreeVector(0.,0.,cyPosZ)); - G4UnionSolid* solid1 = new G4UnionSolid("VCGlobal1",solid0,solidFla,0,G4ThreeVector(0.,0.,flaPosZ)); - G4UnionSolid* solid2 = new G4UnionSolid("VCGlobal2",solid1,solidCPZ,0,posCPZ); - G4UnionSolid* solid3 = new G4UnionSolid("ChamberGlobal",solid2,solidCPX,rotCPX,posCPX); - - return solid3; - -} - -G4UnionSolid* ChamberStructure::CreateVCFacetExternalSolid() -{ - - // Create the main volume of the vacuum chamber - - ChamberGeometry* geo = ChamberGeometry::GetInstance(); - - // Shrinking factor - G4ThreeVector vShrink[4]; - vShrink[0] = G4ThreeVector(-1.*um, 1.*um,0.); - vShrink[1] = G4ThreeVector( 1.*um, 1.*um,0.); - vShrink[2] = G4ThreeVector( 1.*um,-1.*um,0.); - vShrink[3] = G4ThreeVector(-1.*um,-1.*um,0.); - - // Create main VC volume as a tassellated solid - G4TessellatedSolid* solidMain = new G4TessellatedSolid("VCExtMain"); - - G4int nFacets = geo->GetVCNFacets(); - for(G4int f=0; fGetVCFacetVtx(f,v); - if (ivtx != -1) { - G4int is = ivtx/10; // Section id - G4int iv = ivtx%10; // Vertex id - // Shrink the whole structure by 1um to avoid syrface overlap with VC global container - vtx[v] = geo->GetVCExtVtx(is,iv)+vShrink[iv]; - if (is==0 || is == 4 || is == 5) { vtx[v] += G4ThreeVector(0.,0.,1.*um); } - if (is==11) { vtx[v] += G4ThreeVector(0.,0.,-1.*um); } - } else { - vtx[v] = G4ThreeVector(0.,0.,0.); // The vacuum chamber structure cannot go through the origin - } - } - if ( (vtx[3].x() == 0.) && (vtx[3].x() == 0.) && (vtx[3].x() == 0.) ) { - G4TriangularFacet* facet = new G4TriangularFacet(vtx[0],vtx[1],vtx[2],ABSOLUTE); - solidMain->AddFacet((G4VFacet*)facet); - } else { - G4QuadrangularFacet* facet = new G4QuadrangularFacet(vtx[0],vtx[1],vtx[2],vtx[3],ABSOLUTE); - solidMain->AddFacet((G4VFacet*)facet); - } - } - solidMain->SetSolidClosed(true); - - //G4cout << "Dump of solid:\n" << solidMain << G4endl; - //G4Polyhedron* polyhedron = solidMain->GetPolyhedron(); - //G4cout << "\nLocal polyhedron coordinates:\n" << *polyhedron << G4endl; - - //G4LogicalVolume* logicalMain = new G4LogicalVolume(solidMain,G4Material::GetMaterial("Vacuum"),"VCGlobMain",0,0,0); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),logicalMain,"VCGlobMain",fMotherVolume,false,0); - - // Big cylinder - G4double cyLen = geo->GetVCCLength(); - //G4double cyThick = geo->GetVCCThick(); - //G4double cyRIn = geo->GetVCCRIn(); - G4double cyROut = geo->GetVCCROut()-1.*um; - G4double cyPosZ = geo->GetVCCPosZ()+1.*um; - //printf("Cylinder %f %f %f %f %f\n",cyLen,cyThick,cyRIn,cyROut,cyPosZ); - G4Tubs* solidCyl = new G4Tubs("VCCylExt",0.,cyROut,0.5*cyLen,0.*deg,360.*deg); - - //G4LogicalVolume* logicalCyl = new G4LogicalVolume(solidCyl,G4Material::GetMaterial("Vacuum"),"Cyl",0,0,0); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,cyPosZ),logicalCyl,"Cyl",fMotherVolume,false,0); - - // Flange towards ECal thin window - G4double flaLen = geo->GetVCCFThick()-2.*um; - //G4double flaRIn = geo->GetVCCFRIn(); - G4double flaROut = geo->GetVCCFROut()-1.*um; - //G4double flaPosZ = geo->GetVCCFPosZ(); - G4double flaPosZ = geo->GetVCCFPosZ(); - G4Tubs* solidFla = new G4Tubs("VCFlaExt",0.,flaROut,0.5*flaLen,0.*deg,360.*deg); - - /* - // Crossed pipes at target position - G4double cpzR = geo->GetCPZROut(); - G4double cpzLen = geo->GetCPZLength(); - G4double cpzPosZ = geo->GetCPZPosZ(); - G4Tubs* solidCPZ = new G4Tubs("CPZExt",0.,cpzR-1.*um,0.5*cpzLen-1.*um,0.*deg,360.*deg); - G4ThreeVector posCPZ = G4ThreeVector(0.,0.,cpzPosZ); - - G4double cpxR = geo->GetCPXROut(); - G4double cpxLen = geo->GetCPXLength(); - G4double cpxPosZ = geo->GetCPXPosZ(); - G4Tubs* solidCPX = new G4Tubs("CPXExt",0.,cpxR-1.*um,0.5*cpxLen-1.*um,0.*deg,360.*deg); - G4ThreeVector posCPX = G4ThreeVector(0.,0.,cpxPosZ); - G4RotationMatrix* rotCPX = new G4RotationMatrix; - rotCPX->rotateY(90.*deg); - */ - - // Attach cylinder and flange to vacuum chamber - G4UnionSolid* solid0 = new G4UnionSolid("VCExt0",solidMain,solidCyl,0,G4ThreeVector(0.,0.,cyPosZ)); - G4UnionSolid* solid1 = new G4UnionSolid("VCExt1",solid0,solidFla,0,G4ThreeVector(0.,0.,flaPosZ)); - //G4UnionSolid* solid2 = new G4UnionSolid("VCExt2",solid1,solidCPZ,0,posCPZ); - //G4UnionSolid* solid3 = new G4UnionSolid("ChamberExternal",solid2,solidCPX,rotCPX,posCPX); - - return solid1; - //return solid3; - -} - -G4UnionSolid* ChamberStructure::CreateVCFacetInternalSolid() -{ - - // Create the main volume of the vacuum chamber - - ChamberGeometry* geo = ChamberGeometry::GetInstance(); - - // Create main VC volume as a tassellated solid - G4TessellatedSolid* solidMain = new G4TessellatedSolid("VCIntMain"); - - G4int nFacets = geo->GetVCNFacets(); - for(G4int f=0; fGetVCFacetVtx(f,v); - if (ivtx != -1) { - G4int is = ivtx/10; // Section id - G4int iv = ivtx%10; // Vertex id - vtx[v] = geo->GetVCIntVtx(is,iv); - } else { - vtx[v] = G4ThreeVector(0.,0.,0.); // The vacuum chamber structure cannot go through the origin - } - } - if ( (vtx[3].x() == 0.) && (vtx[3].x() == 0.) && (vtx[3].x() == 0.) ) { - G4TriangularFacet* facet = new G4TriangularFacet(vtx[0],vtx[1],vtx[2],ABSOLUTE); - solidMain->AddFacet((G4VFacet*)facet); - } else { - G4QuadrangularFacet* facet = new G4QuadrangularFacet(vtx[0],vtx[1],vtx[2],vtx[3],ABSOLUTE); - solidMain->AddFacet((G4VFacet*)facet); - } - } - solidMain->SetSolidClosed(true); - - //G4cout << "Dump of solid:\n" << solidMain << G4endl; - //G4Polyhedron* polyhedron = solidMain->GetPolyhedron(); - //G4cout << "\nLocal polyhedron coordinates:\n" << *polyhedron << G4endl; - - //G4LogicalVolume* logicalMain = new G4LogicalVolume(solidMain,G4Material::GetMaterial("Vacuum"),"VCGlobMain",0,0,0); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),logicalMain,"VCGlobMain",fMotherVolume,false,0); - - // Big cylinder - G4double cyLen = geo->GetVCCLength()-geo->GetVCCThick(); - //G4double cyThick = geo->GetVCCThick(); - //G4double cyRIn = geo->GetVCCRIn(); - G4double cyROut = geo->GetVCCROut()-geo->GetVCCThick(); - G4double cyPosZ = geo->GetVCCPosZ()+0.5*geo->GetVCCThick(); - //printf("Cylinder %f %f %f %f %f\n",cyLen,cyThick,cyRIn,cyROut,cyPosZ); - G4Tubs* solidCyl = new G4Tubs("VCCylExt",0.,cyROut,0.5*cyLen,0.*deg,360.*deg); - - //G4LogicalVolume* logicalCyl = new G4LogicalVolume(solidCyl,G4Material::GetMaterial("Vacuum"),"Cyl",0,0,0); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,cyPosZ),logicalCyl,"Cyl",fMotherVolume,false,0); - - // Flange towards ECal thin window - G4double flaLen = geo->GetVCCFThick()+1.*cm; - //G4double flaThick = geo->GetVCCFThick(); - G4double flaRIn = geo->GetVCCFRIn(); - //G4double flaROut = geo->GetVCCFROut(); - G4double flaPosZ = geo->GetVCCFPosZ(); - //G4Tubs* solidFla = new G4Tubs("VCFlaGlob",0.,flaROut,0.5*flaThick,0.*deg,360.*deg); - G4Tubs* solidFla = new G4Tubs("VCFlaGlob",0.,flaRIn,0.5*flaLen,0.*deg,360.*deg); - printf("Flange hole %f %f %f\n",flaLen,flaRIn,flaPosZ); - - // Create hole at beam entrance (will need flange to connect to target structure) - G4double holeThick = geo->GetVCInHoleThick()+1.*mm; - G4double holeRadius = geo->GetVCInHoleRadius(); - G4double holePosZ = geo->GetVCInHolePosZ(); - G4Tubs* solidInHole = new G4Tubs("VCInHole",0.,holeRadius,0.5*holeThick,0.*deg,360.*deg); - - // Create hole at beam exit (will need flange to connect to thin TPix window) - // Add some O(1mm) tolerances to avoid boolean solids bugs in GEANT4 - G4double hoT = geo->GetVCOutHoleThick(); - G4double hoR = geo->GetVCOutHoleRadius(); - G4double hoL = geo->GetVCOutHoleLength(); - G4double hoD = geo->GetVCOutHoleDistToEdge(); - G4double hoA = geo->GetVCBackFaceAngle(); - G4Box* solidHO0 = new G4Box("VCHOut0",0.5*hoL,hoR,0.5*hoT+1.*mm); - G4Tubs* solidHO1 = new G4Tubs("VCHOut1",0.,hoR,0.5*hoT+1.*mm,0.*deg,360.*deg); - G4UnionSolid* solidHO2 = new G4UnionSolid("VCHOut2",solidHO0,solidHO1,0,G4ThreeVector(-0.5*hoL-0.5*mm,0.,0.)); - G4UnionSolid* solidOutHole = new G4UnionSolid("VCHOut3",solidHO2,solidHO1,0,G4ThreeVector(0.5*hoL+0.5*mm,0.,0.)); - G4RotationMatrix* rotHOut = new G4RotationMatrix; - rotHOut->rotateY(hoA); - G4ThreeVector hoEdge = geo->GetVCExtVtx(11,1); - G4double hoCX = hoEdge.x()-hoD*cos(hoA)+0.5*hoT*sin(hoA); - G4double hoCZ = hoEdge.z()-hoD*sin(hoA)-0.5*hoT*cos(hoA); - G4ThreeVector posHOut = G4ThreeVector(hoCX,0.,hoCZ); - printf("Exit hole %f %f %f %f %f %f %f\n",hoT,hoR,hoL,hoD,hoA,hoCX,hoCZ); - - /* - // Crossed pipes at target position - G4double cpzR = geo->GetCPZRIn(); - G4double cpzLen = geo->GetCPZLength(); - G4double cpzPosZ = geo->GetCPZPosZ(); - G4Tubs* solidCPZ = new G4Tubs("CPZGlob",0.,cpzR,0.5*cpzLen+2.*cm,0.*deg,360.*deg); - G4ThreeVector posCPZ = G4ThreeVector(0.,0.,cpzPosZ); - - G4double cpxR = geo->GetCPXRIn(); - G4double cpxLen = geo->GetCPXLength(); - G4double cpxPosZ = geo->GetCPXPosZ(); - G4Tubs* solidCPX = new G4Tubs("CPXGlob",0.,cpxR,0.5*cpxLen+1.*cm,0.*deg,360.*deg); - G4ThreeVector posCPX = G4ThreeVector(0.,0.,cpxPosZ); - G4RotationMatrix* rotCPX = new G4RotationMatrix; - rotCPX->rotateY(90.*deg); - */ - - // Attach cylinder, flange, hole, and pipes to vacuum chamber - G4UnionSolid* solid0 = new G4UnionSolid("VCInt0",solidMain,solidCyl,0,G4ThreeVector(0.,0.,cyPosZ)); - G4UnionSolid* solid1 = new G4UnionSolid("VCInt1",solid0,solidFla,0,G4ThreeVector(0.,0.,flaPosZ)); - G4UnionSolid* solid2 = new G4UnionSolid("VCInt2",solid1,solidInHole,0,G4ThreeVector(0.,0.,holePosZ)); - G4UnionSolid* solid3 = new G4UnionSolid("VCInt3",solid2,solidOutHole,rotHOut,posHOut); - //G4UnionSolid* solid3 = new G4UnionSolid("VCInt3",solid2,solidHO0,rotHOut,posHOut); - //G4UnionSolid* solid4 = new G4UnionSolid("VCInt4",solid3,solidCPZ,0,posCPZ); - //G4UnionSolid* solid5 = new G4UnionSolid("ChamberInternal",solid4,solidCPX,rotCPX,posCPX); - - return solid3; - //return solid4; // Use this for visualization - //return solid5; // Use this for simulation - -} diff --git a/PadmeMC/ECal/src/ECalDetector.cc b/PadmeMC/ECal/src/ECalDetector.cc index 33ea840e..b2353a90 100644 --- a/PadmeMC/ECal/src/ECalDetector.cc +++ b/PadmeMC/ECal/src/ECalDetector.cc @@ -49,7 +49,7 @@ void ECalDetector::CreateGeometry() G4Box* solidEcal = new G4Box("ECal",0.5*ecalSizeX,0.5*ecalSizeY,0.5*ecalSizeZ); fECalVolume = new G4LogicalVolume(solidEcal,G4Material::GetMaterial("Vacuum"),"ECal",0,0,0); fECalVolume->SetVisAttributes(G4VisAttributes::Invisible); - new G4PVPlacement(0,ecalPos,fECalVolume,"ECal",fMotherVolume,false,0,false); + new G4PVPlacement(0,ecalPos,fECalVolume,"ECal",fMotherVolume,false,0,true); // Show size of gap between crystals printf("Gap between crystals is %f\n",geo->GetCrystalGap()); diff --git a/PadmeMC/ECal/src/ECalGeometry.cc b/PadmeMC/ECal/src/ECalGeometry.cc index 0faf10cf..533f0c3d 100644 --- a/PadmeMC/ECal/src/ECalGeometry.cc +++ b/PadmeMC/ECal/src/ECalGeometry.cc @@ -31,7 +31,8 @@ ECalGeometry::ECalGeometry() fCrystalCoating = 100.*um; - fECalFrontFacePosZ = 230.*cm; // From center of magnet yoke, i.e. 3m to target + //fECalFrontFacePosZ = 230.*cm; // From center of magnet yoke, i.e. 3m to target + fECalFrontFacePosZ = 233.*cm; // From center of magnet yoke, i.e. 3.32m to target fTedlarThickness = 50.*um; // Thickness of Tedlar slips diff --git a/PadmeMC/TPix/src/TPixGeometry.cc b/PadmeMC/TPix/src/TPixGeometry.cc index 20ae81c3..4101eddb 100644 --- a/PadmeMC/TPix/src/TPixGeometry.cc +++ b/PadmeMC/TPix/src/TPixGeometry.cc @@ -40,11 +40,13 @@ TPixGeometry::TPixGeometry() // Angle of vacuum chamber wall behind HEPVeto wrt X axis // This value will be modified by main program according to actual chamber measures - fTPixChamberWallAngle = 0.32962*rad; + //fTPixChamberWallAngle = 0.32962*rad; + fTPixChamberWallAngle = 0.; // Coordinates of the corner on the back face of the vacuum chamber // These values will be modified by main program according to actual chamber measures - fTPixChamberWallCorner = G4ThreeVector(-422.77*mm,0.,2249.*mm); + //fTPixChamberWallCorner = G4ThreeVector(-422.77*mm,0.,2249.*mm); + fTPixChamberWallCorner = G4ThreeVector(0.,0.,0.); fTPixSensitiveDetectorName = "TPixSD"; @@ -64,16 +66,24 @@ void TPixGeometry::UpdateDerivedMeasures() fTPixSizeZ = fChipSizeZ+1.*um; // Small tolerance to avoid surface overlaps // Angle of the rotation of TPix around the Y axis - fTPixRotY = fTPixChamberWallAngle; + fTPixRotY = -fTPixChamberWallAngle; // Position of center of TPix box - fTPixPosX = fTPixChamberWallCorner.x()-fTPixDistanceToCorner*cos(fTPixChamberWallAngle) - -(fTPixSupportThickness+0.5*fTPixSizeZ)*sin(fTPixChamberWallAngle) - -0.5*fTPixSizeX*cos(fTPixChamberWallAngle); + //fTPixPosX = fTPixChamberWallCorner.x()-fTPixDistanceToCorner*cos(fTPixChamberWallAngle) + // -(fTPixSupportThickness+0.5*fTPixSizeZ)*sin(fTPixChamberWallAngle) + // -0.5*fTPixSizeX*cos(fTPixChamberWallAngle); + fTPixPosX = fTPixChamberWallCorner.x() + +(fTPixDistanceToCorner+0.5*fTPixSizeX)*cos(fTPixChamberWallAngle) + +(fTPixSupportThickness+0.5*fTPixSizeZ)*sin(fTPixChamberWallAngle); fTPixPosY = 0.; - fTPixPosZ = fTPixChamberWallCorner.z()-fTPixDistanceToCorner*sin(fTPixChamberWallAngle) - +(fTPixSupportThickness+0.5*fTPixSizeZ)*cos(fTPixChamberWallAngle) - -0.5*fTPixSizeX*sin(fTPixChamberWallAngle); + fTPixPosZ = fTPixChamberWallCorner.z() + -(fTPixDistanceToCorner+0.5*fTPixSizeX)*sin(fTPixChamberWallAngle) + +(fTPixSupportThickness+0.5*fTPixSizeZ)*cos(fTPixChamberWallAngle); + + printf("TPix size %f %f %f\n",fTPixSizeX,fTPixSizeY,fTPixSizeZ); + printf("TPix corner %f %f %f\n",fTPixChamberWallCorner.x(),fTPixChamberWallCorner.y(),fTPixChamberWallCorner.z()); + printf("TPix angle %f\n",fTPixChamberWallAngle); + printf("TPix distance %f support %f\n",fTPixDistanceToCorner,fTPixSupportThickness); } diff --git a/PadmeMC/Target/src/TargetDetector.cc b/PadmeMC/Target/src/TargetDetector.cc index c3775b03..7f697378 100644 --- a/PadmeMC/Target/src/TargetDetector.cc +++ b/PadmeMC/Target/src/TargetDetector.cc @@ -17,6 +17,9 @@ #include "G4Element.hh" #include "G4Material.hh" +#include "G4VisAttributes.hh" +#include "G4Colour.hh" + #include "TargetGeometry.hh" #include "TargetSD.hh" @@ -54,6 +57,7 @@ void TargetDetector::CreateGeometry() // Do not forget to take into account mother volume Z displacement G4Box* solidTarget = new G4Box("Target",targetSizeX*0.5,targetSizeY*0.5,targetSizeZ*0.5); fTargetVolume = new G4LogicalVolume(solidTarget,G4Material::GetMaterial("Diamond"),"Target",0,0,0); + fTargetVolume->SetVisAttributes(G4VisAttributes(G4Colour::Red())); new G4PVPlacement(0,targetPos-G4ThreeVector(0.,0.,fTargetDisplacePosZ),fTargetVolume,"Target",fMotherVolume,false,0,false); // The whole target is a sensitive detector diff --git a/PadmeMC/src/DetectorConstruction.cc b/PadmeMC/src/DetectorConstruction.cc index a53aa68e..e5c3c803 100644 --- a/PadmeMC/src/DetectorConstruction.cc +++ b/PadmeMC/src/DetectorConstruction.cc @@ -322,12 +322,16 @@ G4VPhysicalVolume* DetectorConstruction::Construct() fMagnetStructure->CreateGeometry(); } - /* // Target if (fEnableTarget) { //fTargetDetector->SetMotherVolume(fChamberStructure->GetChamberLogicalVolume()); - fTargetDetector->SetMotherVolume(logicMagneticVolumeCP); - fTargetDetector->SetTargetDisplacePosZ(posCPZ.z()); + + // If target is in magnetic volume, take into account its displacement + //fTargetDetector->SetMotherVolume(logicMagneticVolumeCP); + //fTargetDetector->SetTargetDisplacePosZ(cpzPos.z()); + fTargetDetector->SetMotherVolume(logicWorld); + fTargetDetector->SetTargetDisplacePosZ(0.); + fTargetDetector->CreateGeometry(); } @@ -364,6 +368,7 @@ G4VPhysicalVolume* DetectorConstruction::Construct() fECalDetector->CreateGeometry(); } + /* // PVeto if (fEnablePVeto) { fPVetoDetector->SetMotherVolume(logicMagneticVolumeVC); From ae8aca7ae97c2fe0c426c52bef14914e8372cd8b Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Fri, 28 Jul 2017 12:33:05 +0200 Subject: [PATCH 05/15] Fixed positions of vetoes; rely on ChamberGeometry to get info on vacuum chamber --- PadmeMC/Chamber/include/ChamberGeometry.hh | 10 ++ PadmeMC/Chamber/src/ChamberGeometry.cc | 9 +- PadmeMC/EVeto/src/EVetoGeometry.cc | 6 +- PadmeMC/HEPVeto/src/HEPVetoGeometry.cc | 20 +-- PadmeMC/PVeto/src/PVetoGeometry.cc | 6 +- PadmeMC/include/DetectorConstruction.hh | 5 +- PadmeMC/src/DetectorConstruction.cc | 199 ++++++++------------- PadmeMC/vis.mac | 25 ++- 8 files changed, 126 insertions(+), 154 deletions(-) diff --git a/PadmeMC/Chamber/include/ChamberGeometry.hh b/PadmeMC/Chamber/include/ChamberGeometry.hh index a808396f..987cd923 100644 --- a/PadmeMC/Chamber/include/ChamberGeometry.hh +++ b/PadmeMC/Chamber/include/ChamberGeometry.hh @@ -37,6 +37,12 @@ public: G4double GetVCBackFaceThickness() { return fVCBackFaceThick; } G4ThreeVector GetVCBackFaceCorner() { return G4ThreeVector(fVCBackFaceCornerX,0.,fVCBackFaceCornerZ); } + // Info on section of the vacuum chamber inside magnet + // Used to define the magnetic volume + G4double GetVCInnerSizeX() { return fVCInnerSizeX; } + G4double GetVCInnerSizeY() { return fVCInnerSizeY; } + G4double GetVCInnerFacePosZ() { return fVCInnerFacePosZ; } + // Properties of aluminum thin window and its flange G4double GetEWAlThick() { return fEWAlThick; } @@ -69,6 +75,10 @@ private: G4double fVCBackFaceCornerX; // X coordinate of the corner at the back face G4double fVCBackFaceCornerZ; // Z coordinate of the corner at the back face + G4double fVCInnerSizeX; // Internal size along X of the rectangular section inside the magnet + G4double fVCInnerSizeY; // Internal size along Y of the rectangular section inside the magnet + G4double fVCInnerFacePosZ; // Position along Z of the internal face of the rectangular section inside the magnet + // Aluminum thin window and aluminum flange G4double fEWAlThick; diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index 9516db93..a61bc3b8 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -23,12 +23,17 @@ ChamberGeometry::ChamberGeometry() // Some basic chamber quantities from Cesidio's CAD drawings fVCBackFacePosZ = 2300.0*mm; // Z position of back face of VC flange towards thin window - fVCBackFaceAngle = atan2( (2769.8-2481.85) , (1290.0-403.78) ); // Angle of TPix/HEPVeto face of chamber + //fVCBackFaceAngle = atan2( (2269.8-1981.85) , (1290.0-403.78) ); // Angle of TPix/HEPVeto face of chamber + fVCBackFaceAngle = 18.*deg; // Angle of TPix/HEPVeto face of chamber printf("Chamber angle %f\n",fVCBackFaceAngle); - fVCBackFaceThick = fVCBackFacePosZ-2769.8*mm; // Thickness of back faces + fVCBackFaceThick = fVCBackFacePosZ-2269.8*mm; // Thickness of back faces fVCBackFaceCornerX = 403.78*mm; fVCBackFaceCornerZ = fVCBackFacePosZ; + fVCInnerSizeX = 435.0*mm; // Internal size along X of the rectangular section inside the magnet + fVCInnerSizeY = 205.0*mm; // Internal size along Y of the rectangular section inside the magnet + fVCInnerFacePosZ = -490.0*mm; // Position along Z of the internal face of the rectangular section inside the magnet + // Parameters for the aluminum thin window fEWAlThick = 4.*mm; // Thickness of aluminum window diff --git a/PadmeMC/EVeto/src/EVetoGeometry.cc b/PadmeMC/EVeto/src/EVetoGeometry.cc index af5a5835..432caa0d 100644 --- a/PadmeMC/EVeto/src/EVetoGeometry.cc +++ b/PadmeMC/EVeto/src/EVetoGeometry.cc @@ -30,7 +30,7 @@ EVetoGeometry::EVetoGeometry() fFingerNominalSizeZ = 1.0*cm; //fFingerRotX = 0.*deg; - fFingerRotY = -10.*deg; + fFingerRotY = 10.*deg; //fFingerRotZ = 0.*deg; fSupportGap = 0.1*mm; @@ -39,9 +39,9 @@ EVetoGeometry::EVetoGeometry() fSupportNominalSizeY = 0.5*cm; fSupportNominalSizeZ = 100.0*cm; - fEVetoInnerFacePosX = 20.*cm; + fEVetoInnerFacePosX = -20.*cm; - fEVetoFrontFacePosZ = -50.*cm; // Start at front face of yoke + fEVetoFrontFacePosZ = -49.*cm; // Start at inner face of vacuum chamber fEVetoSensitiveDetectorName = "EVetoSD"; diff --git a/PadmeMC/HEPVeto/src/HEPVetoGeometry.cc b/PadmeMC/HEPVeto/src/HEPVetoGeometry.cc index 380ca691..6bbca5e8 100644 --- a/PadmeMC/HEPVeto/src/HEPVetoGeometry.cc +++ b/PadmeMC/HEPVeto/src/HEPVetoGeometry.cc @@ -40,15 +40,15 @@ HEPVetoGeometry::HEPVetoGeometry() // Angle of vacuum chamber wall behind HEPVeto wrt X axis // This value will be modified by main program according to actual chamber measures - fHEPVetoChamberWallAngle = 0.32962*rad; + fHEPVetoChamberWallAngle = 0.; // Thickness of the vacuum chamber wall behind HEPVeto // This value will be modified by main program according to actual chamber measures - fHEPVetoChamberWallThickness = 1.*cm; + fHEPVetoChamberWallThickness = 0.; // Coordinates of the corner on the back face of the vacuum chamber // These values will be modified by main program according to actual chamber measures - fHEPVetoChamberWallCorner = G4ThreeVector(-422.77*mm,0.,2249.*mm); + fHEPVetoChamberWallCorner = G4ThreeVector(0.,0.,0.); fHEPVetoSensitiveDetectorName = "HEPVetoSD"; @@ -68,16 +68,16 @@ void HEPVetoGeometry::UpdateDerivedMeasures() fHEPVetoSizeZ = fFingerStep*fHEPVetoNFingers; // Angle of the rotation of HEPVeto around the Y axis - fHEPVetoRotY = -90.*deg+fHEPVetoChamberWallAngle; + fHEPVetoRotY = 90.*deg-fHEPVetoChamberWallAngle; // Position of center of HEPVeto box - fHEPVetoPosX = fHEPVetoChamberWallCorner.x()-fHEPVetoDistanceToCorner*cos(fHEPVetoChamberWallAngle) - +(fHEPVetoChamberWallThickness+fHEPVetoSupportThickness+0.5*fHEPVetoSizeX)*sin(fHEPVetoChamberWallAngle) - -0.5*fHEPVetoSizeZ*cos(fHEPVetoChamberWallAngle); + fHEPVetoPosX = fHEPVetoChamberWallCorner.x() + +(fHEPVetoDistanceToCorner+0.5*fHEPVetoSizeZ)*cos(fHEPVetoChamberWallAngle) + -(fHEPVetoChamberWallThickness+fHEPVetoSupportThickness+0.5*fHEPVetoSizeX)*sin(fHEPVetoChamberWallAngle); fHEPVetoPosY = 0.; - fHEPVetoPosZ = fHEPVetoChamberWallCorner.z()-fHEPVetoDistanceToCorner*sin(fHEPVetoChamberWallAngle) - -(fHEPVetoChamberWallThickness+fHEPVetoSupportThickness+0.5*fHEPVetoSizeX)*cos(fHEPVetoChamberWallAngle) - -0.5*fHEPVetoSizeZ*sin(fHEPVetoChamberWallAngle); + fHEPVetoPosZ = fHEPVetoChamberWallCorner.z() + -(fHEPVetoDistanceToCorner+0.5*fHEPVetoSizeZ)*sin(fHEPVetoChamberWallAngle) + -(fHEPVetoChamberWallThickness+fHEPVetoSupportThickness+0.5*fHEPVetoSizeX)*cos(fHEPVetoChamberWallAngle); } diff --git a/PadmeMC/PVeto/src/PVetoGeometry.cc b/PadmeMC/PVeto/src/PVetoGeometry.cc index 45ada5ca..a59a30fd 100644 --- a/PadmeMC/PVeto/src/PVetoGeometry.cc +++ b/PadmeMC/PVeto/src/PVetoGeometry.cc @@ -30,7 +30,7 @@ PVetoGeometry::PVetoGeometry() fFingerNominalSizeZ = 1.0*cm; //fFingerRotX = 0.*deg; - fFingerRotY = 10.*deg; + fFingerRotY = -10.*deg; //fFingerRotZ = 0.*deg; fSupportGap = 0.1*mm; @@ -39,9 +39,9 @@ PVetoGeometry::PVetoGeometry() fSupportNominalSizeY = 0.5*cm; fSupportNominalSizeZ = 100.0*cm; - fPVetoInnerFacePosX = -20.*cm; + fPVetoInnerFacePosX = 20.*cm; - fPVetoFrontFacePosZ = -50.*cm; // Start at front face of yoke + fPVetoFrontFacePosZ = -49.*cm; // Start at inner face of vacuum chamber fPVetoSensitiveDetectorName = "PVetoSD"; diff --git a/PadmeMC/include/DetectorConstruction.hh b/PadmeMC/include/DetectorConstruction.hh index 508c5d8a..284665ca 100644 --- a/PadmeMC/include/DetectorConstruction.hh +++ b/PadmeMC/include/DetectorConstruction.hh @@ -64,7 +64,7 @@ public: void MagneticVolumeIsVisible(); void MagneticVolumeIsInvisible(); - void SetMagFieldValue(G4double v); + void SetMagFieldValue(G4double); G4double GetMagFieldValue(); void ChamberIsVisible(); @@ -81,6 +81,9 @@ public: G4double GetTargetFrontFaceZ(); G4double GetTargetThickness(); + // Recursive method to check full geometry + void CheckDaughters(G4LogicalVolume*,G4int); + private: void DefineMaterials(); diff --git a/PadmeMC/src/DetectorConstruction.cc b/PadmeMC/src/DetectorConstruction.cc index e5c3c803..ff7ed628 100644 --- a/PadmeMC/src/DetectorConstruction.cc +++ b/PadmeMC/src/DetectorConstruction.cc @@ -151,76 +151,54 @@ G4VPhysicalVolume* DetectorConstruction::Construct() // World Volume //------------------------------ - /* - G4Box* solidWorld = new G4Box("World",0.5*fWorldLength,0.5*fWorldLength,0.5*fWorldLength); - G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld,G4Material::GetMaterial("G4_AIR"),"World",0,0,0); - if (! fWorldIsFilledWithAir) logicWorld->SetMaterial(G4Material::GetMaterial("Vacuum")); - logicWorld->SetVisAttributes(G4VisAttributes::Invisible); - //logicWorld->SetVisAttributes(G4VisAttributes(G4Colour::White())); - G4PVPlacement* physicWorld = new G4PVPlacement(0,G4ThreeVector(),logicWorld,"World",0,false,0); - */ - - fParser.Read("gdml/Chamber.gdml"); - G4VPhysicalVolume* physicWorld = fParser.GetWorldVolume(); - G4LogicalVolume* logicWorld = physicWorld->GetLogicalVolume(); - logicWorld->SetVisAttributes(G4VisAttributes::Invisible); - //logicWorld->SetVisAttributes(G4VisAttributes(G4Colour::White())); - logicWorld->SetMaterial(G4Material::GetMaterial("Vacuum")); - printf("World %s %s\n",logicWorld->GetName().data(),logicWorld->GetMaterial()->GetName().data()); - G4int nD = logicWorld->GetNoDaughters(); - for(G4int iD = 0; iDGetDaughter(iD); - G4LogicalVolume* Dlog = D->GetLogicalVolume(); - if (fChamberIsVisible) { - Dlog->SetVisAttributes(G4VisAttributes(G4Colour::Grey())); - } else { - Dlog->SetVisAttributes(G4VisAttributes::Invisible); - } - if (fEnableChamber) { - Dlog->SetMaterial(G4Material::GetMaterial("G4_STAINLESS-STEEL")); - } else { - Dlog->SetMaterial(G4Material::GetMaterial("Vacuum")); - } - printf("Daughter %s %s\n",Dlog->GetName().data(),Dlog->GetMaterial()->GetName().data()); - } - /* - // Create large magnetic volume which includes target, vacuum chamber, magnet, vetoes and timepix - // but excludes calorimeters + G4VPhysicalVolume* physicWorld = 0; + G4LogicalVolume* logicWorld = 0; - G4double magVolMinX = -fChamberStructure->GetChamberMostExternalX()-1.*cm; - G4double magVolMaxX = fChamberStructure->GetChamberMostExternalX()+1.*cm; - - G4double magVolMinY = -100.*cm; - G4double magVolMaxY = 100.*cm; - - G4double magVolMinZ = -fChamberStructure->GetChamberMostAdvancedZ()-0.1*mm; - G4double magVolMaxZ = fChamberStructure->GetChamberMostAdvancedZ()+0.1*mm; // Right after the thin window flange + if (fEnableChamber) { - G4double magVolPosX = 0.5*(magVolMinX+magVolMaxX); - G4double magVolPosY = 0.5*(magVolMinY+magVolMaxY); - G4double magVolPosZ = 0.5*(magVolMinZ+magVolMaxZ); - G4ThreeVector magVolPos = G4ThreeVector(magVolPosX,magVolPosY,magVolPosZ); + // The world volume is defined inside the GDML file which also contains the geometry + // of the Vacuum Chamber internal and external shells. + fParser.Read("gdml/Chamber.gdml"); + physicWorld = fParser.GetWorldVolume(); // Recover physical world volume + logicWorld = physicWorld->GetLogicalVolume(); // Recover logical world volume + + // Set world characteristics + logicWorld->SetVisAttributes(G4VisAttributes::Invisible); + //logicWorld->SetVisAttributes(G4VisAttributes(G4Colour::White())); + logicWorld->SetMaterial(G4Material::GetMaterial("Vacuum")); + printf("World %s %s\n",logicWorld->GetName().data(),logicWorld->GetMaterial()->GetName().data()); + + // Set color and material of the Vacuum Chamber shells + G4int nD = logicWorld->GetNoDaughters(); + for(G4int iD = 0; iDGetDaughter(iD); + G4LogicalVolume* Dlog = D->GetLogicalVolume(); + if (fChamberIsVisible) { + Dlog->SetVisAttributes(G4VisAttributes(G4Colour::Grey())); + } else { + Dlog->SetVisAttributes(G4VisAttributes::Invisible); + } + Dlog->SetMaterial(G4Material::GetMaterial("G4_STAINLESS-STEEL")); + if (D->CheckOverlaps()) { + printf("DetectorConstruction - WARNING - overlaps found in %s\n",Dlog->GetName().data()); + } + printf("Vacuum Chamber %s %s\n",Dlog->GetName().data(),Dlog->GetMaterial()->GetName().data()); + } - G4double magVolHLX = 0.5*(magVolMaxX-magVolMinX); - G4double magVolHLY = 0.5*(magVolMaxY-magVolMinY); - G4double magVolHLZ = 0.5*(magVolMaxZ-magVolMinZ); + } else { - //printf ("--- Magnetic Volume ---\n"); - //printf ("%f %f %f %f %f %f\n",magVolMinX,magVolMaxX,magVolMinY,magVolMaxY,magVolMinZ,magVolMaxZ); - //printf ("%f %f %f\n",magVolPosX,magVolPosY,magVolPosZ); - //printf ("%f %f %f\n",magVolHLX,magVolHLY,magVolHLZ); + // When the vacuum chamber is not required, just create the standard World volume + G4Box* solidWorld = new G4Box("World",0.5*fWorldLength,0.5*fWorldLength,0.5*fWorldLength); + logicWorld = new G4LogicalVolume(solidWorld,G4Material::GetMaterial("G4_AIR"),"World",0,0,0); + if (! fWorldIsFilledWithAir) logicWorld->SetMaterial(G4Material::GetMaterial("Vacuum")); + logicWorld->SetVisAttributes(G4VisAttributes::Invisible); + //logicWorld->SetVisAttributes(G4VisAttributes(G4Colour::White())); + G4PVPlacement* physicWorld = new G4PVPlacement(0,G4ThreeVector(),logicWorld,"World",0,false,0); - G4Box* solidMagneticVolume = new G4Box("MagneticVolume",magVolHLX,magVolHLY,magVolHLZ); - G4LogicalVolume* logicMagneticVolume = - new G4LogicalVolume(solidMagneticVolume,G4Material::GetMaterial("G4_AIR"),"MagneticVolume",0,0,0); - if (! fWorldIsFilledWithAir) logicMagneticVolume->SetMaterial(G4Material::GetMaterial("Vacuum")); - if (! fMagneticVolumeIsVisible) logicMagneticVolume->SetVisAttributes(G4VisAttributes::Invisible); - new G4PVPlacement(0,magVolPos,logicMagneticVolume,"MagneticVolume",logicWorld,false,0,false); - */ + } // Vacuum chamber structure - // Note: vacuum volume is always created, only the physical structure is switched on/off if (fEnableChamber) { fChamberStructure->EnableChamber(); } else { @@ -231,22 +209,18 @@ G4VPhysicalVolume* DetectorConstruction::Construct() } else { fChamberStructure->SetChamberInvisible(); } - //fChamberStructure->SetMotherVolume(logicMagneticVolume); fChamberStructure->SetMotherVolume(logicWorld); fChamberStructure->CreateGeometry(); // Create magnetic volume inside vacuum chamber - //G4double magVolMinX = -geoChamber->GetVCInnerX()+1.*um; - //G4double magVolMinY = -geoChamber->GetVCInnerY()+1.*um; - //G4double magVolMinZ = geoChamber->GetVCInnerZ()+1.*um; - G4double magVolMinX = -217.5*mm+1.*um; - G4double magVolMinY = -102.5*mm+1.*um; - G4double magVolMinZ = -490.0*mm; + G4double magVolMinX = -0.5*geoChamber->GetVCInnerSizeX()+1.*um; + G4double magVolMinY = -0.5*geoChamber->GetVCInnerSizeY()+1.*um; + G4double magVolMinZ = geoChamber->GetVCInnerFacePosZ(); - G4double magVolMaxX = 217.5*mm-1.*um; - G4double magVolMaxY = 102.5*mm-1.*um; - G4double magVolMaxZ = 1000.0*mm; // from field map definition + G4double magVolMaxX = 0.5*geoChamber->GetVCInnerSizeX()-1.*um; + G4double magVolMaxY = 0.5*geoChamber->GetVCInnerSizeY()-1.*um; + G4double magVolMaxZ = 1000.0*mm; // Magnetic field map extends up to +/-1m from magnet center G4double magVolPosX = 0.5*(magVolMinX+magVolMaxX); G4double magVolPosY = 0.5*(magVolMinY+magVolMaxY); @@ -270,33 +244,12 @@ G4VPhysicalVolume* DetectorConstruction::Construct() //new G4PVPlacement(0,magVolPos,logicMagneticVolumeVC,"MagneticVolumeVC",fChamberStructure->GetChamberLogicalVolume(),false,0); new G4PVPlacement(0,magVolPos,logicMagneticVolumeVC,"MagneticVolumeVC",logicWorld,false,0,true); - /* - // Create magnetic volume inside crossed pipes at target + // Create magnetic volume inside beam entrance pipe G4double cpzRIn = geoChamber->GetCPZRIn(); - G4double cpzLen = geoChamber->GetCPZLength()+geoChamber->GetVCInHoleThick(); - G4Tubs* solidCPZ = new G4Tubs("CPZ",0.,cpzRIn-1.*um,0.5*cpzLen,0.*deg,360.*deg); - G4ThreeVector posCPZ(0.,0.,geoChamber->GetCPZPosZ()+0.5*geoChamber->GetVCInHoleThick()); - - G4double cpxRIn = geoChamber->GetCPXRIn(); - G4double cpxLen = geoChamber->GetCPXLength(); - G4Tubs* solidCPX = new G4Tubs("CPX",0.,cpxRIn-1.*um,0.5*cpxLen,0.*deg,360.*deg); - - G4ThreeVector posCPX(0.,0.,-0.5*geoChamber->GetVCInHoleThick()); - G4RotationMatrix* rotCPX = new G4RotationMatrix; - rotCPX->rotateY(90.*deg); - G4UnionSolid* solidCP = new G4UnionSolid("MVCP",solidCPZ,solidCPX,rotCPX,posCPX); - - G4LogicalVolume* logicMagneticVolumeCP = - new G4LogicalVolume(solidCP,G4Material::GetMaterial("Vacuum"),"MagneticVolumeCP",0,0,0); - if (! fMagneticVolumeIsVisible) logicMagneticVolumeCP->SetVisAttributes(G4VisAttributes::Invisible); - //new G4PVPlacement(0,posCPZ,logicMagneticVolumeCP,"MagneticVolumeCP",fChamberStructure->GetChamberLogicalVolume(),false,0); - */ - - G4double cpzRIn = 5.*cm; - G4double cpzLen = 41.*cm; + G4double cpzLen = 46.*cm; // Length is set to not include the instrumented section of the target G4Tubs* cpzSolid = new G4Tubs("CPZ",0.,cpzRIn-1.*um,0.5*cpzLen,0.*deg,360.*deg); - G4ThreeVector cpzPos(0.,0.,-49.0*cm-0.5*cpzLen); + G4ThreeVector cpzPos(0.,0.,geoChamber->GetVCInnerFacePosZ()-0.5*cpzLen); G4LogicalVolume* logicMagneticVolumeCP = new G4LogicalVolume(cpzSolid,G4Material::GetMaterial("Vacuum"),"MagneticVolumeCP",0,0,0); if (! fMagneticVolumeIsVisible) logicMagneticVolumeCP->SetVisAttributes(G4VisAttributes::Invisible); @@ -306,7 +259,7 @@ G4VPhysicalVolume* DetectorConstruction::Construct() if (fEnableMagneticField) { //MagneticFieldSetup* magField = new MagneticFieldSetup(); logicMagneticVolumeVC->SetFieldManager(fMagneticFieldManager->GetLocalFieldManager(),true); - //logicMagneticVolumeCP->SetFieldManager(fMagneticFieldManager->GetLocalFieldManager(),true); + logicMagneticVolumeCP->SetFieldManager(fMagneticFieldManager->GetLocalFieldManager(),true); } // Concrete wall at large Z @@ -324,11 +277,11 @@ G4VPhysicalVolume* DetectorConstruction::Construct() // Target if (fEnableTarget) { - //fTargetDetector->SetMotherVolume(fChamberStructure->GetChamberLogicalVolume()); - // If target is in magnetic volume, take into account its displacement + // Should target be included in the magnetic volume, do not forget to take into account its displacement //fTargetDetector->SetMotherVolume(logicMagneticVolumeCP); //fTargetDetector->SetTargetDisplacePosZ(cpzPos.z()); + fTargetDetector->SetMotherVolume(logicWorld); fTargetDetector->SetTargetDisplacePosZ(0.); @@ -354,7 +307,6 @@ G4VPhysicalVolume* DetectorConstruction::Construct() // TPix if (fEnableTPix) { - //fTPixDetector->SetMotherVolume(logicMagneticVolume); fTPixDetector->SetMotherVolume(logicWorld); // Position of TPix depends on shape of vacuum chamber geoTPix->SetTPixChamberWallAngle(geoChamber->GetVCBackFaceAngle()); @@ -368,12 +320,10 @@ G4VPhysicalVolume* DetectorConstruction::Construct() fECalDetector->CreateGeometry(); } - /* // PVeto if (fEnablePVeto) { fPVetoDetector->SetMotherVolume(logicMagneticVolumeVC); fPVetoDetector->SetPVetoDisplacePosZ(magVolPosZ); - //fPVetoDetector->SetMotherVolume(fChamberStructure->GetChamberLogicalVolume()); fPVetoDetector->CreateGeometry(); } @@ -381,35 +331,22 @@ G4VPhysicalVolume* DetectorConstruction::Construct() if (fEnableEVeto) { fEVetoDetector->SetMotherVolume(logicMagneticVolumeVC); fEVetoDetector->SetEVetoDisplacePosZ(magVolPosZ); - //fEVetoDetector->SetMotherVolume(fChamberStructure->GetChamberLogicalVolume()); fEVetoDetector->CreateGeometry(); } // HEPVeto if (fEnableHEPVeto) { - fHEPVetoDetector->SetMotherVolume(fChamberStructure->GetChamberLogicalVolume()); + fHEPVetoDetector->SetMotherVolume(logicWorld); // Position of HEPVeto depends on shape of vacuum chamber geoHEPVeto->SetHEPVetoChamberWallThickness(geoChamber->GetVCBackFaceThickness()); geoHEPVeto->SetHEPVetoChamberWallAngle(geoChamber->GetVCBackFaceAngle()); geoHEPVeto->SetHEPVetoChamberWallCorner(geoChamber->GetVCBackFaceCorner()); fHEPVetoDetector->CreateGeometry(); } - */ - - /* - G4int nD2 = logicWorld->GetNoDaughters(); - for(G4int iD = 0; iDGetDaughter(iD); - G4LogicalVolume* Dlog = D->GetLogicalVolume(); - printf("Daughter %s %s\n",Dlog->GetName().data(),Dlog->GetMaterial()->GetName().data()); - G4int nDD = Dlog->GetNoDaughters(); - for (G4int iDD = 0; iDDGetDaughter(iDD); - G4LogicalVolume* DDlog = DD->GetLogicalVolume(); - printf("GrandDaughter %s %s\n",DDlog->GetName().data(),DDlog->GetMaterial()->GetName().data()); - } - } - */ + + // This code makes a full debug dump of the geometry, looking for overlaps + // HUGE amount of output: enable at your own risk ;) + //CheckDaughters(logicWorld,0); return physicWorld; @@ -704,3 +641,25 @@ void DetectorConstruction::WorldIsVacuum() printf("World and magnetic volume are filled with vacuum (low pressure air)\n"); fWorldIsFilledWithAir = 0; } + +void DetectorConstruction::CheckDaughters(G4LogicalVolume* mother,G4int lvl) +{ + + // This code makes a full debug of the geometry, looking for overlaps + + G4String indent = ""; + for(G4int l=0;lGetNoDaughters(); + for(G4int iD = 0; iDGetDaughter(iD); + G4LogicalVolume* daughter_log = daughter->GetLogicalVolume(); + printf("%s%s %s\n",indent.data(),daughter_log->GetName().data(),daughter_log->GetMaterial()->GetName().data()); + if (daughter->CheckOverlaps(1000,0.,false)) { + printf("%s - WARNING - overlaps found in %s\n",indent.data(),daughter_log->GetName().data()); + } + CheckDaughters(daughter_log,lvl); + } + +} diff --git a/PadmeMC/vis.mac b/PadmeMC/vis.mac index 6b82ad6e..08fcd13a 100644 --- a/PadmeMC/vis.mac +++ b/PadmeMC/vis.mac @@ -239,18 +239,17 @@ #/geometry/test/grid_test true # #/vis/viewer/set/viewpointVector 0. 10. 0. + +# Choos viewpoint # Side view -#/vis/viewer/set/viewpointThetaPhi 90. 0. deg +/vis/viewer/set/viewpointThetaPhi -90. 0. deg # Top view #/vis/viewer/set/viewpointThetaPhi 90. 90. deg # Front view #/vis/viewer/set/viewpointThetaPhi 0. 0. deg # Back view -/vis/viewer/set/viewpointThetaPhi 180. 0. deg +#/vis/viewer/set/viewpointThetaPhi 180. 0. deg -# Specify view angle: -#/vis/viewer/set/viewpointThetaPhi 90. 180. -# # Specify zoom value: /vis/viewer/zoom 1.4 # @@ -291,17 +290,12 @@ # Re-establish auto refreshing and verbosity: /vis/viewer/set/autoRefresh true /vis/verbose warnings -# -# For file-based drivers, use this to create an empty detector view: -# -#/vis/viewer/panTo 0.5 0. + +# Fix problem in visualizing some circular parts +/vis/viewer/set/lineSegmentsPerCircle 24 + /vis/scene/endOfEventAction accumulate 10000 -#/vis/viewer/set/viewpointThetaPhi 90. 180. -#/vis/viewer/set/viewpointThetaPhi 180. 0. -#/vis/viewer/set/viewpointThetaPhi 90. 90. -#/vis/viewer/zoom 1.5 -#/vis/viewer/zoom 0.5 -#/vis/scene/add/axes 0 -50. -50. 30. cm + /vis/viewer/flush # Calo picture @@ -313,4 +307,5 @@ #/vis/viewer/panTo -0.5 0. #/vis/viewer/set/viewpointThetaPhi 0. 0. #/vis/viewer/zoom 50 + #/run/beamOn 1 From 8ab18311fc0b9125673721802b7d15303a7b1bfa Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Fri, 28 Jul 2017 17:08:17 +0200 Subject: [PATCH 06/15] Added caps to vacuum chamber portholes --- PadmeMC/Chamber/include/ChamberGeometry.hh | 16 ++++++ PadmeMC/Chamber/include/ChamberStructure.hh | 2 +- PadmeMC/Chamber/src/ChamberGeometry.cc | 43 +++++++++++++++ PadmeMC/Chamber/src/ChamberStructure.cc | 58 +++++++++------------ 4 files changed, 84 insertions(+), 35 deletions(-) diff --git a/PadmeMC/Chamber/include/ChamberGeometry.hh b/PadmeMC/Chamber/include/ChamberGeometry.hh index 987cd923..c822a922 100644 --- a/PadmeMC/Chamber/include/ChamberGeometry.hh +++ b/PadmeMC/Chamber/include/ChamberGeometry.hh @@ -12,6 +12,8 @@ #include "G4ThreeVector.hh" #include "G4SystemOfUnits.hh" +#define CHAMBERGEOMETRY_N_PORTHOLES 8 + class ChamberGeometry { @@ -67,6 +69,14 @@ public: G4double GetCPXLength() { return fCPXLength; } G4double GetCPXPosZ() { return fCPXPosZ; } + // Properties of porthole caps + + G4int GetPHCapNumber() { return CHAMBERGEOMETRY_N_PORTHOLES; } + G4double GetPHCapRadius(G4int c) { return fPHCapRadius[c]; } + G4double GetPHCapThick(G4int c) { return fPHCapThick[c]; } + G4double GetPHCapFlangeThick(G4int c) { return fPHCapFlangeThick[c]; } + G4ThreeVector GetPHCapPos(G4int c) { return fPHCapPos[c]; } + private: G4double fVCBackFacePosZ; // Z position of the VC flange face towards the thin window @@ -100,6 +110,12 @@ private: G4double fCPXLength; G4double fCPXPosZ; + // Porthole caps + G4double fPHCapRadius[CHAMBERGEOMETRY_N_PORTHOLES]; + G4double fPHCapThick[CHAMBERGEOMETRY_N_PORTHOLES]; + G4double fPHCapFlangeThick[CHAMBERGEOMETRY_N_PORTHOLES]; + G4ThreeVector fPHCapPos[CHAMBERGEOMETRY_N_PORTHOLES]; + }; #endif diff --git a/PadmeMC/Chamber/include/ChamberStructure.hh b/PadmeMC/Chamber/include/ChamberStructure.hh index bd1ddc8d..c5995cf8 100644 --- a/PadmeMC/Chamber/include/ChamberStructure.hh +++ b/PadmeMC/Chamber/include/ChamberStructure.hh @@ -49,9 +49,9 @@ private: G4UnionSolid* CreateVCFacetExternalSolid(); G4UnionSolid* CreateVCFacetInternalSolid(); - void CreateECalThinWindow(); void CreateECalAlThinWindow(); void CreateTargetPipes(); + void CreatePortholeCaps(); G4LogicalVolume* fMotherVolume; G4LogicalVolume* fGlobalLogicalVolume; diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index a61bc3b8..771a14ae 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -55,6 +55,49 @@ ChamberGeometry::ChamberGeometry() fCPXLength = 25.*cm; fCPXPosZ = -1.*m; + // Properties of porthole caps + + fPHCapRadius[0] = 112.5*mm; + fPHCapThick[0] = 16.0*mm; + fPHCapFlangeThick[0] = 29.0*mm; + fPHCapPos[0] = G4ThreeVector(-0.5*fVCInnerSizeX-fPHCapFlangeThick[0]-0.5*fPHCapThick[0],0.,-350.*mm); + + fPHCapRadius[1] = 112.5*mm; + fPHCapThick[1] = 16.0*mm; + fPHCapFlangeThick[1] = 29.0*mm; + fPHCapPos[1] = G4ThreeVector(-0.5*fVCInnerSizeX-fPHCapFlangeThick[1]-0.5*fPHCapThick[1],0.,350.*mm); + + fPHCapRadius[2] = 112.5*mm; + fPHCapThick[2] = 16.0*mm; + fPHCapFlangeThick[2] = 29.0*mm; + fPHCapPos[2] = G4ThreeVector(0.5*fVCInnerSizeX+fPHCapFlangeThick[2]+0.5*fPHCapThick[2],0.,-350.*mm); + + fPHCapRadius[3] = 112.5*mm; + fPHCapThick[3] = 16.0*mm; + fPHCapFlangeThick[3] = 29.0*mm; + fPHCapPos[3] = G4ThreeVector(0.5*fVCInnerSizeX+fPHCapFlangeThick[3]+0.5*fPHCapThick[3],0.,30.*mm); + + fPHCapRadius[4] = 112.5*mm; + fPHCapThick[4] = 16.0*mm; + fPHCapFlangeThick[4] = 25.1*mm; + fPHCapPos[4] = G4ThreeVector(-375.07*mm-fPHCapFlangeThick[4]-0.5*fPHCapThick[4],0.,790.*mm); + + fPHCapRadius[5] = 112.5*mm; + fPHCapThick[5] = 16.0*mm; + fPHCapFlangeThick[5] = 25.1*mm; + fPHCapPos[5] = G4ThreeVector(1020.0*mm+fPHCapFlangeThick[5]+0.5*fPHCapThick[5],0.,790.*mm); + + fPHCapRadius[6] = 142.5*mm; + fPHCapThick[6] = 16.0*mm; + fPHCapFlangeThick[6] = 75.17*mm; + fPHCapPos[6] = G4ThreeVector(-324.83*mm-fPHCapFlangeThick[6]-0.5*fPHCapThick[6],0.,1400.*mm); + + fPHCapRadius[7] = 167.5*mm; + fPHCapThick[7] = 16.0*mm; + fPHCapFlangeThick[7] = 35.0*mm; + fPHCapPos[7] = G4ThreeVector(1290.0*mm+fPHCapFlangeThick[7]+0.5*fPHCapThick[7],0.,1750.*mm); + + } ChamberGeometry::~ChamberGeometry() diff --git a/PadmeMC/Chamber/src/ChamberStructure.cc b/PadmeMC/Chamber/src/ChamberStructure.cc index 0c85b290..db1b4d85 100644 --- a/PadmeMC/Chamber/src/ChamberStructure.cc +++ b/PadmeMC/Chamber/src/ChamberStructure.cc @@ -56,6 +56,9 @@ void ChamberStructure::CreateGeometry() // Create crossed pipes in the target area CreateTargetPipes(); + // Create porthole caps for both section of the chamber + CreatePortholeCaps(); + } void ChamberStructure::CreateECalAlThinWindow() @@ -140,48 +143,35 @@ void ChamberStructure::CreateTargetPipes() G4SubtractionSolid* solidCP3 = new G4SubtractionSolid("VCCP3",solidCP2,solidCPXi,rotCPX,G4ThreeVector(0.,0.,0.)); G4LogicalVolume* logicalCP = new G4LogicalVolume(solidCP3,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"VCCP",0,0,0); logicalCP->SetVisAttributes(steelVisAttr); - //new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetCPZPosZ()),logicalCP,"CrossPipeSteel",fGlobalLogicalVolume,false,0); - new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetCPZPosZ()),logicalCP,"CrossPipeSteel",fMotherVolume,false,0); + new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetCPZPosZ()),logicalCP,"CrossPipeSteel",fMotherVolume,false,0,true); } -/* -G4double ChamberStructure::GetChamberMostExternalX() -{ - return ChamberGeometry::GetInstance()->GetVCMostExternalX(); -} -G4double ChamberStructure::GetChamberMostAdvancedZ() +void ChamberStructure::CreatePortholeCaps() { - return ChamberGeometry::GetInstance()->GetVCMostAdvancedZ(); -} -G4ThreeVector ChamberStructure::GetChamberBackFaceCorner() -{ - return ChamberGeometry::GetInstance()->GetVCBackFaceCorner(); -} + ChamberGeometry* geo = ChamberGeometry::GetInstance(); -G4double ChamberStructure::GetChamberBackFaceAngle() -{ - return ChamberGeometry::GetInstance()->GetVCBackFaceAngle(); -} + G4VisAttributes steelVisAttr = G4VisAttributes(G4Colour(0.4,0.4,0.4)); // Dark gray + if ( ! fChamberIsVisible ) steelVisAttr = G4VisAttributes::Invisible; -G4double ChamberStructure::GetChamberBackFaceThickness() -{ - return ChamberGeometry::GetInstance()->GetVCBackFaceThickness(); -} + G4int nPH = geo->GetPHCapNumber(); + for (G4int iPH=0; iPHGetPHCapRadius(iPH); + G4double phcT = geo->GetPHCapThick(iPH); + G4Tubs* solidPHC = new G4Tubs(phcN,0.,phcR,0.5*phcT,0.*deg,360.*deg); + G4LogicalVolume* logicalPHC = new G4LogicalVolume(solidPHC,G4Material::GetMaterial("G4_STAINLESS-STEEL"),phcN,0,0,0); + logicalPHC->SetVisAttributes(steelVisAttr); -G4double ChamberStructure::GetChamberInnerX() -{ - return ChamberGeometry::GetInstance()->GetVCInnerX(); -} + G4ThreeVector posPHC = geo->GetPHCapPos(iPH); + G4RotationMatrix* rotPHC = new G4RotationMatrix; + rotPHC->rotateY(90.*deg); + new G4PVPlacement(rotPHC,posPHC,logicalPHC,phcN,fMotherVolume,false,0,true); -G4double ChamberStructure::GetChamberInnerY() -{ - return ChamberGeometry::GetInstance()->GetVCInnerY(); -} + printf("Porthole cap %d (%s) radius %f thick %f position %f %f %f\n",iPH,phcN,phcR,phcT,posPHC.x(),posPHC.y(),posPHC.z()); + + } -G4double ChamberStructure::GetChamberInnerZ() -{ - return ChamberGeometry::GetInstance()->GetVCInnerZ(); } -*/ From e974b5fbe0c8c4806155563263b7c5ebae1c4f28 Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Fri, 28 Jul 2017 17:43:51 +0200 Subject: [PATCH 07/15] Added big porthole cap in front of TPix --- PadmeMC/Chamber/include/ChamberGeometry.hh | 10 +++++++ PadmeMC/Chamber/include/ChamberStructure.hh | 1 + PadmeMC/Chamber/src/ChamberGeometry.cc | 5 ++++ PadmeMC/Chamber/src/ChamberStructure.cc | 30 +++++++++++++++++++++ 4 files changed, 46 insertions(+) diff --git a/PadmeMC/Chamber/include/ChamberGeometry.hh b/PadmeMC/Chamber/include/ChamberGeometry.hh index c822a922..ee88dfcb 100644 --- a/PadmeMC/Chamber/include/ChamberGeometry.hh +++ b/PadmeMC/Chamber/include/ChamberGeometry.hh @@ -77,6 +77,11 @@ public: G4double GetPHCapFlangeThick(G4int c) { return fPHCapFlangeThick[c]; } G4ThreeVector GetPHCapPos(G4int c) { return fPHCapPos[c]; } + // Properties of large TPix porthole + G4double GetTPPHCapThick() { return fTPPHCapThick; } + G4double GetTPPHCapWidth() { return fTPPHCapWidth; } + G4double GetTPPHCapHeight() { return fTPPHCapHeight; } + private: G4double fVCBackFacePosZ; // Z position of the VC flange face towards the thin window @@ -116,6 +121,11 @@ private: G4double fPHCapFlangeThick[CHAMBERGEOMETRY_N_PORTHOLES]; G4ThreeVector fPHCapPos[CHAMBERGEOMETRY_N_PORTHOLES]; + // TPix porthole cap + G4double fTPPHCapThick; + G4double fTPPHCapWidth; + G4double fTPPHCapHeight; + }; #endif diff --git a/PadmeMC/Chamber/include/ChamberStructure.hh b/PadmeMC/Chamber/include/ChamberStructure.hh index c5995cf8..c1979b8b 100644 --- a/PadmeMC/Chamber/include/ChamberStructure.hh +++ b/PadmeMC/Chamber/include/ChamberStructure.hh @@ -52,6 +52,7 @@ private: void CreateECalAlThinWindow(); void CreateTargetPipes(); void CreatePortholeCaps(); + void CreateTPixPortholeCap(); G4LogicalVolume* fMotherVolume; G4LogicalVolume* fGlobalLogicalVolume; diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index 771a14ae..508b5bfa 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -97,6 +97,11 @@ ChamberGeometry::ChamberGeometry() fPHCapFlangeThick[7] = 35.0*mm; fPHCapPos[7] = G4ThreeVector(1290.0*mm+fPHCapFlangeThick[7]+0.5*fPHCapThick[7],0.,1750.*mm); + // Properties of large TPix porthole + + fTPPHCapThick = 25.*mm; + fTPPHCapWidth = 996.*mm; + fTPPHCapHeight = 600.*mm; } diff --git a/PadmeMC/Chamber/src/ChamberStructure.cc b/PadmeMC/Chamber/src/ChamberStructure.cc index db1b4d85..316231ee 100644 --- a/PadmeMC/Chamber/src/ChamberStructure.cc +++ b/PadmeMC/Chamber/src/ChamberStructure.cc @@ -59,6 +59,10 @@ void ChamberStructure::CreateGeometry() // Create porthole caps for both section of the chamber CreatePortholeCaps(); + // Create cap for large porthole iin front of TimePix + // Includes round cap with thin Mylar window + //CreateTPixPortholeCap(); + } void ChamberStructure::CreateECalAlThinWindow() @@ -175,3 +179,29 @@ void ChamberStructure::CreatePortholeCaps() } } +void ChamberStructure::CreateTPixPortholeCap() +{ + + ChamberGeometry* geo = ChamberGeometry::GetInstance(); + + G4VisAttributes steelVisAttr = G4VisAttributes(G4Colour(0.4,0.4,0.4)); // Dark gray + if ( ! fChamberIsVisible ) steelVisAttr = G4VisAttributes::Invisible; + + G4double phcW = geo->GetTPPHCapWidth(); + G4double phcH = geo->GetTPPHCapHeight(); + G4double phcT = geo->GetTPPHCapThick(); + G4Box* solidPHC = new G4Box("TPPHCap",0.5*phcW,0.5*phcH,0.5*phcT); + G4LogicalVolume* logicalPHC = new G4LogicalVolume(solidPHC,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"TPPHCap",0,0,0); + logicalPHC->SetVisAttributes(steelVisAttr); + + G4ThreeVector corner = geo->GetVCBackFaceCorner(); + G4double angle = geo->GetVCBackFaceAngle(); + G4double phcPosX = corner.x()+0.5*phcW*cos(angle)+(0.5*phcT+1.5*mm)*sin(angle); + G4double phcPosY = 0.; + G4double phcPosZ = corner.z()-0.5*phcW*sin(angle)+(0.5*phcT+1.5*mm)*cos(angle); + G4ThreeVector posPHC = G4ThreeVector(phcPosX,phcPosY,phcPosZ); + G4RotationMatrix* rotPHC = new G4RotationMatrix; + rotPHC->rotateY(-angle); + new G4PVPlacement(rotPHC,posPHC,logicalPHC,"TPPHCap",fMotherVolume,false,0,true); + +} From a7b90a051cdd5cdffb467cb2710a8af532764181 Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Mon, 31 Jul 2017 13:00:14 +0200 Subject: [PATCH 08/15] Added Mylar window and its support flanges --- PadmeMC/Chamber/include/ChamberGeometry.hh | 34 ++++++- PadmeMC/Chamber/src/ChamberGeometry.cc | 16 +++- PadmeMC/Chamber/src/ChamberStructure.cc | 106 ++++++++++++++++++++- PadmeMC/TPix/src/TPixGeometry.cc | 2 +- 4 files changed, 151 insertions(+), 7 deletions(-) diff --git a/PadmeMC/Chamber/include/ChamberGeometry.hh b/PadmeMC/Chamber/include/ChamberGeometry.hh index ee88dfcb..adac981c 100644 --- a/PadmeMC/Chamber/include/ChamberGeometry.hh +++ b/PadmeMC/Chamber/include/ChamberGeometry.hh @@ -82,6 +82,20 @@ public: G4double GetTPPHCapWidth() { return fTPPHCapWidth; } G4double GetTPPHCapHeight() { return fTPPHCapHeight; } + G4double GetTPPHHoleRadius() { return fTPPHHoleRadius; } + G4double GetTPPHHoleDist() { return fTPPHHoleDist; } + + G4double GetTPPHCircRadius() { return fTPPHCircRadius; } + G4double GetTPPHCircThick() { return fTPPHCircThick; } + + G4double GetTPPHWindRadius() { return fTPPHWindRadius; } + G4double GetTPPHWindWidth() { return fTPPHWindWidth; } + G4double GetTPPHWindThick() { return fTPPHWindThick; } + + G4double GetTPPHStopRadius() { return fTPPHStopRadius; } + G4double GetTPPHStopWidth() { return fTPPHStopWidth; } + G4double GetTPPHStopThick() { return fTPPHStopThick; } + private: G4double fVCBackFacePosZ; // Z position of the VC flange face towards the thin window @@ -122,9 +136,23 @@ private: G4ThreeVector fPHCapPos[CHAMBERGEOMETRY_N_PORTHOLES]; // TPix porthole cap - G4double fTPPHCapThick; - G4double fTPPHCapWidth; - G4double fTPPHCapHeight; + G4double fTPPHCapThick; // Thickness of rectangular porthole cap + G4double fTPPHCapWidth; // Width of rectangular porthole cap + G4double fTPPHCapHeight; // Height of rectangular porthole cap + + G4double fTPPHHoleRadius; // Radius of TPix hole in cap + G4double fTPPHHoleDist; // Distance of center of hole from border of cap + + G4double fTPPHCircRadius; // Radius of circular cap in front of hole + G4double fTPPHCircThick; // Thickness of circular cap in front of hole + + G4double fTPPHWindRadius; // Radius of Mylar window + G4double fTPPHWindWidth; // Width of Mylar window + G4double fTPPHWindThick; // Thickness of Mylar window + + G4double fTPPHStopRadius; // Radius of stop flange for Mylar window + G4double fTPPHStopWidth; // Width of stop flange for Mylar window + G4double fTPPHStopThick; // Thickness of stop flange for Mylar window }; diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index 508b5bfa..62313de7 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -25,7 +25,7 @@ ChamberGeometry::ChamberGeometry() fVCBackFacePosZ = 2300.0*mm; // Z position of back face of VC flange towards thin window //fVCBackFaceAngle = atan2( (2269.8-1981.85) , (1290.0-403.78) ); // Angle of TPix/HEPVeto face of chamber fVCBackFaceAngle = 18.*deg; // Angle of TPix/HEPVeto face of chamber - printf("Chamber angle %f\n",fVCBackFaceAngle); + //printf("Chamber angle %f\n",fVCBackFaceAngle); fVCBackFaceThick = fVCBackFacePosZ-2269.8*mm; // Thickness of back faces fVCBackFaceCornerX = 403.78*mm; fVCBackFaceCornerZ = fVCBackFacePosZ; @@ -103,6 +103,20 @@ ChamberGeometry::ChamberGeometry() fTPPHCapWidth = 996.*mm; fTPPHCapHeight = 600.*mm; + fTPPHHoleRadius = 106.5*mm; + fTPPHHoleDist = (624.38*mm-fVCBackFaceCornerX)/cos(fVCBackFaceAngle); + + fTPPHCircRadius = 142.5*mm; + fTPPHCircThick = 12.0*mm; + + fTPPHWindRadius = 25.0*mm; + fTPPHWindWidth = 100.0*mm; + fTPPHWindThick = 100.0*um; + + fTPPHStopRadius = 55.0*mm; + fTPPHStopWidth = fTPPHWindWidth; + fTPPHStopThick = 12.0*mm; + } ChamberGeometry::~ChamberGeometry() diff --git a/PadmeMC/Chamber/src/ChamberStructure.cc b/PadmeMC/Chamber/src/ChamberStructure.cc index 316231ee..2b626b64 100644 --- a/PadmeMC/Chamber/src/ChamberStructure.cc +++ b/PadmeMC/Chamber/src/ChamberStructure.cc @@ -61,7 +61,7 @@ void ChamberStructure::CreateGeometry() // Create cap for large porthole iin front of TimePix // Includes round cap with thin Mylar window - //CreateTPixPortholeCap(); + CreateTPixPortholeCap(); } @@ -187,21 +187,123 @@ void ChamberStructure::CreateTPixPortholeCap() G4VisAttributes steelVisAttr = G4VisAttributes(G4Colour(0.4,0.4,0.4)); // Dark gray if ( ! fChamberIsVisible ) steelVisAttr = G4VisAttributes::Invisible; + // Create rectangular cap G4double phcW = geo->GetTPPHCapWidth(); G4double phcH = geo->GetTPPHCapHeight(); G4double phcT = geo->GetTPPHCapThick(); - G4Box* solidPHC = new G4Box("TPPHCap",0.5*phcW,0.5*phcH,0.5*phcT); + G4Box* solidPHB = new G4Box("TPPHBox",0.5*phcW,0.5*phcH,0.5*phcT); + + // Carve hole in cap + G4double phhR = geo->GetTPPHHoleRadius(); + G4double phhD = geo->GetTPPHHoleDist(); + G4Tubs* solidPHH = new G4Tubs("TPPHHole",0.,phhR,0.5*phcT+1.*mm,0.*deg,360.*deg); + G4ThreeVector posPHH = G4ThreeVector(-0.5*phcW+phhD,0.,0.); + G4SubtractionSolid* solidPHC = new G4SubtractionSolid("TPPHCap",solidPHB,solidPHH,0,posPHH); + G4LogicalVolume* logicalPHC = new G4LogicalVolume(solidPHC,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"TPPHCap",0,0,0); logicalPHC->SetVisAttributes(steelVisAttr); G4ThreeVector corner = geo->GetVCBackFaceCorner(); G4double angle = geo->GetVCBackFaceAngle(); + G4double phcPosX = corner.x()+0.5*phcW*cos(angle)+(0.5*phcT+1.5*mm)*sin(angle); G4double phcPosY = 0.; G4double phcPosZ = corner.z()-0.5*phcW*sin(angle)+(0.5*phcT+1.5*mm)*cos(angle); G4ThreeVector posPHC = G4ThreeVector(phcPosX,phcPosY,phcPosZ); + G4RotationMatrix* rotPHC = new G4RotationMatrix; rotPHC->rotateY(-angle); + new G4PVPlacement(rotPHC,posPHC,logicalPHC,"TPPHCap",fMotherVolume,false,0,true); + // Create circular cap + G4double circR = geo->GetTPPHCircRadius(); + G4double circT = geo->GetTPPHCircThick(); + G4Tubs* solidCirc = new G4Tubs("TPPHCirc",0.,circR,0.5*circT,0.*deg,360.*deg); + + // Carve hole for Mylar window in cricular cap + G4double windR = geo->GetTPPHWindRadius(); + G4double windW = geo->GetTPPHWindWidth(); + G4Tubs* solidWindT = new G4Tubs("WindT",0.,windR,0.5*circT+1.*mm,0.*deg,360.*deg); + G4Box* solidWindB = new G4Box("WindB",0.5*windW,windR,0.5*circT+1.*mm); + G4ThreeVector posWindT1 = G4ThreeVector(-0.5*windW,0.,0.); + G4ThreeVector posWindT2 = G4ThreeVector(+0.5*windW,0.,0.); + G4ThreeVector posWindB = G4ThreeVector(0.,0.,0.); + G4SubtractionSolid* solidCirc1 = new G4SubtractionSolid("TPPHCirc1",solidCirc,solidWindT,0,posWindT1); + G4SubtractionSolid* solidCirc2 = new G4SubtractionSolid("TPPHCirc2",solidCirc1,solidWindT,0,posWindT2); + G4SubtractionSolid* solidCirc3 = new G4SubtractionSolid("TPPHCirc3",solidCirc2,solidWindB,0,posWindB); + + G4LogicalVolume* logicalCirc = new G4LogicalVolume(solidCirc3,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"TPPHCirc",0,0,0); + logicalCirc->SetVisAttributes(G4VisAttributes(G4Colour::Blue())); + + G4double circPosX = corner.x()+phhD*cos(angle)+(1.5*mm+phcT+0.5*circT)*sin(angle); + G4double circPosY = 0.; + G4double circPosZ = corner.z()-phhD*sin(angle)+(1.5*mm+phcT+0.5*circT)*cos(angle); + G4ThreeVector posCirc = G4ThreeVector(circPosX,circPosY,circPosZ); + + G4RotationMatrix* rotCirc = new G4RotationMatrix; + rotCirc->rotateY(-angle); + + new G4PVPlacement(rotCirc,posCirc,logicalCirc,"TPPHCirc",fMotherVolume,false,0,true); + + // Create Mylar window + G4double windT = geo->GetTPPHWindThick(); + G4Box* solidMylarB = new G4Box("MylarB",0.5*windW,windR,0.5*windT); + G4Tubs* solidMylarT1 = new G4Tubs("MylarT1",0.,windR,0.5*windT, 90.*deg,180.*deg); + G4Tubs* solidMylarT2 = new G4Tubs("MylarT2",0.,windR,0.5*windT,-90.*deg,180.*deg); + //G4ThreeVector posMylarT1 = G4ThreeVector(-0.5*windW-1.*mm,0.,0.); + //G4ThreeVector posMylarT2 = G4ThreeVector(+0.5*windW+1.*mm,0.,0.); + G4ThreeVector posMylarT1 = G4ThreeVector(-0.5*windW,0.,0.); + G4ThreeVector posMylarT2 = G4ThreeVector(+0.5*windW,0.,0.); + G4UnionSolid* solidMylar1 = new G4UnionSolid("Mylar1",solidMylarB,solidMylarT1,0,posMylarT1); + G4UnionSolid* solidMylar2 = new G4UnionSolid("Mylar2",solidMylar1,solidMylarT2,0,posMylarT2); + + G4LogicalVolume* logicalMylar = new G4LogicalVolume(solidMylar2,G4Material::GetMaterial("G4_MYLAR"),"TPPHMylar",0,0,0); + logicalMylar->SetVisAttributes(G4VisAttributes(G4Colour::Yellow())); + + G4double mylarPosX = corner.x()+phhD*cos(angle)+(1.5*mm+phcT+circT+0.5*windT)*sin(angle); + G4double mylarPosY = 0.; + G4double mylarPosZ = corner.z()-phhD*sin(angle)+(1.5*mm+phcT+circT+0.5*windT)*cos(angle); + G4ThreeVector posMylar = G4ThreeVector(mylarPosX,mylarPosY,mylarPosZ); + + G4RotationMatrix* rotMylar = new G4RotationMatrix; + rotMylar->rotateY(-angle); + + new G4PVPlacement(rotMylar,posMylar,logicalMylar,"TPPHMylar",fMotherVolume,false,0,true); + + // Create stop flange for Mylar window + G4double stopR = geo->GetTPPHStopRadius(); + G4double stopW = geo->GetTPPHStopWidth(); + G4double stopT = geo->GetTPPHStopThick(); + + G4ThreeVector posStopT1 = G4ThreeVector(-0.5*stopW,0.,0.); + G4ThreeVector posStopT2 = G4ThreeVector(+0.5*stopW,0.,0.); + + G4Box* solidStopBL = new G4Box("StopBL",0.5*stopW,stopR,0.5*stopT); + G4Tubs* solidStopTL1 = new G4Tubs("StopTL1",0.,stopR,0.5*stopT, 90.*deg,180.*deg); + G4Tubs* solidStopTL2 = new G4Tubs("StopTL2",0.,stopR,0.5*stopT,-90.*deg,180.*deg); + G4UnionSolid* solidStopL1 = new G4UnionSolid("StopL1",solidStopBL,solidStopTL1,0,posStopT1); + G4UnionSolid* solidStopL2 = new G4UnionSolid("StopL2",solidStopL1,solidStopTL2,0,posStopT2); + + G4Box* solidStopBS = new G4Box("StopBS",0.5*stopW,windR,0.5*stopT+1.*mm); + G4Tubs* solidStopTS1 = new G4Tubs("StopTS1",0.,windR,0.5*stopT+1.*mm, 89.*deg,182.*deg); + G4Tubs* solidStopTS2 = new G4Tubs("StopTS2",0.,windR,0.5*stopT+1.*mm,-91.*deg,182.*deg); + G4UnionSolid* solidStopS1 = new G4UnionSolid("StopS1",solidStopBS,solidStopTS1,0,posStopT1); + G4UnionSolid* solidStopS2 = new G4UnionSolid("StopS2",solidStopS1,solidStopTS2,0,posStopT2); + + G4SubtractionSolid* solidStop = new G4SubtractionSolid("TPPHStopFlange",solidStopL2,solidStopS2,0,G4ThreeVector(0.,0.,0.)); + + G4LogicalVolume* logicalStop = new G4LogicalVolume(solidStop,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"TPPHStopFlange",0,0,0); + logicalStop->SetVisAttributes(G4VisAttributes(G4Colour::Green())); + + G4double stopPosX = corner.x()+phhD*cos(angle)+(1.5*mm+phcT+circT+windT+0.5*stopT)*sin(angle); + G4double stopPosY = 0.; + G4double stopPosZ = corner.z()-phhD*sin(angle)+(1.5*mm+phcT+circT+windT+0.5*stopT)*cos(angle); + G4ThreeVector posStop = G4ThreeVector(stopPosX,stopPosY,stopPosZ); + + G4RotationMatrix* rotStop = new G4RotationMatrix; + rotStop->rotateY(-angle); + + new G4PVPlacement(rotStop,posStop,logicalStop,"TPPHStopFlange",fMotherVolume,false,0,true); + } diff --git a/PadmeMC/TPix/src/TPixGeometry.cc b/PadmeMC/TPix/src/TPixGeometry.cc index 4101eddb..7d29fa26 100644 --- a/PadmeMC/TPix/src/TPixGeometry.cc +++ b/PadmeMC/TPix/src/TPixGeometry.cc @@ -36,7 +36,7 @@ TPixGeometry::TPixGeometry() fTPixDistanceToCorner = 30.*cm; // Thickness of the support structure between HEPVeto and diagonal wall of the vacuum chamber - fTPixSupportThickness = 1.*cm; // Check with final design + fTPixSupportThickness = 6.*cm; // Check with final design // Angle of vacuum chamber wall behind HEPVeto wrt X axis // This value will be modified by main program according to actual chamber measures From 0f77b3c20a0b5c620404eac620dc4cdc38533294 Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Thu, 28 Sep 2017 12:11:34 +0200 Subject: [PATCH 09/15] SAC now made of PbF2 with 14cm crystals Cleaned up materials definition Added command to make magnet (in)visible Cleaned up several warning messages --- PadmeMC/Beam/src/BeamParameters.cc | 4 +- PadmeMC/ECal/src/ECalDigitizer.cc | 6 +- PadmeMC/ECal/src/ECalGeometry.cc | 6 +- PadmeMC/Magnet/include/MagnetMessenger.hh | 3 + PadmeMC/Magnet/include/MagnetStructure.hh | 5 ++ PadmeMC/Magnet/src/MagnetMessenger.cc | 21 +++++++ PadmeMC/Magnet/src/MagnetStructure.cc | 9 +++ PadmeMC/SAC/src/SACDetector.cc | 9 +-- PadmeMC/SAC/src/SACDigitizer.cc | 2 +- PadmeMC/SAC/src/SACGeometry.cc | 4 +- PadmeMC/SAC/src/SACSD.cc | 2 +- PadmeMC/TPix/src/TPixDigitizer.cc | 4 +- PadmeMC/Target/src/TargetDigitizer.cc | 4 +- PadmeMC/src/DetectorConstruction.cc | 70 +++++++++++++++++++++-- PadmeMC/src/EventAction.cc | 16 +++--- PadmeMC/vis.mac | 3 + 16 files changed, 135 insertions(+), 33 deletions(-) diff --git a/PadmeMC/Beam/src/BeamParameters.cc b/PadmeMC/Beam/src/BeamParameters.cc index 1bb9b8b0..89fc277e 100644 --- a/PadmeMC/Beam/src/BeamParameters.cc +++ b/PadmeMC/Beam/src/BeamParameters.cc @@ -60,8 +60,8 @@ BeamParameters::BeamParameters() fNThreePhotonDecaysPerBunch = 0; fThreePhotonDecaysFilename = "ThreePhotonDecays.list"; - // Generic beam position at t=0 - fBeamOriginPosZ = -70.*cm; + // Generic beam position at t=0. Will be modified according to detector geometry + fBeamOriginPosZ = -100.*cm; } diff --git a/PadmeMC/ECal/src/ECalDigitizer.cc b/PadmeMC/ECal/src/ECalDigitizer.cc index 3873fe46..01056f5d 100644 --- a/PadmeMC/ECal/src/ECalDigitizer.cc +++ b/PadmeMC/ECal/src/ECalDigitizer.cc @@ -46,7 +46,7 @@ ECalDigitizer::ECalDigitizer(G4String name) G4cout << "Contribution of 1 p.e. to integral ADC signal: " << fPEtoSConversion << G4endl; G4cout << "Collection probability along Z: " << fCollMapNBins << " bins of " << G4BestUnit(fCollMapBinLen,"Length") << " - Map:"; - for(G4int i=0;i0 - for (G4int i=0; i < fDChannel.size(); i++) { + for (G4int i=0; i < (G4int)fDChannel.size(); i++) { if (fDSignal[i]>0.) { ECalDigi* digi = new ECalDigi(); digi->SetChannelId(fDChannel[i]); diff --git a/PadmeMC/ECal/src/ECalGeometry.cc b/PadmeMC/ECal/src/ECalGeometry.cc index 533f0c3d..fa32bce3 100644 --- a/PadmeMC/ECal/src/ECalGeometry.cc +++ b/PadmeMC/ECal/src/ECalGeometry.cc @@ -32,11 +32,11 @@ ECalGeometry::ECalGeometry() fCrystalCoating = 100.*um; //fECalFrontFacePosZ = 230.*cm; // From center of magnet yoke, i.e. 3m to target - fECalFrontFacePosZ = 233.*cm; // From center of magnet yoke, i.e. 3.32m to target + fECalFrontFacePosZ = 233.*cm; // From center of magnet yoke, i.e. 3.33m to target fTedlarThickness = 50.*um; // Thickness of Tedlar slips - // Geometry parameters for plastic panel in front of ECal + // Geometry parameters for plastic panel in front of ECal (not used) fECalPanelEnable = false; fECalPanelThickness = 0.5*cm; fECalPanelSizeX = 62.*cm; // Slightly larger than ECal (61.625cm) @@ -395,7 +395,7 @@ std::vector ECalGeometry::GetHashTable() buffer.str(""); buffer << "fDigiPECollectionMap"; - for(G4int i=0;iSetGuidance("UI commands to control Magnet geometry"); + fSetMagnetVisibleCmd = new G4UIcmdWithoutParameter("/Detector/Magnet/SetMagnetVisible",this); + fSetMagnetVisibleCmd->SetGuidance("Show magnet structure."); + fSetMagnetVisibleCmd->AvailableForStates(G4State_PreInit,G4State_Idle); + + fSetMagnetInvisibleCmd = new G4UIcmdWithoutParameter("/Detector/Magnet/SetMagnetInvisible",this); + fSetMagnetInvisibleCmd->SetGuidance("Hide magnet structure."); + fSetMagnetInvisibleCmd->AvailableForStates(G4State_PreInit,G4State_Idle); + //fEnableMagneticFieldCmd = new G4UIcmdWithoutParameter("/Detector/Magnet/EnableMagneticField",this); //fEnableMagneticFieldCmd->SetGuidance("Enable magnetic field."); //fEnableMagneticFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle); @@ -63,6 +71,9 @@ MagnetMessenger::~MagnetMessenger() delete fMagnetDetectorDir; + delete fSetMagnetVisibleCmd; + delete fSetMagnetInvisibleCmd; + //delete fEnableMagneticFieldCmd; //delete fDisableMagneticFieldCmd; @@ -78,6 +89,16 @@ MagnetMessenger::~MagnetMessenger() void MagnetMessenger::SetNewValue(G4UIcommand* cmd, G4String par) { + if ( cmd == fSetMagnetVisibleCmd ) { + printf("Magnet is Visible\n"); + fMagnetStructure->SetMagnetVisible(); + } + + if ( cmd == fSetMagnetInvisibleCmd ) { + printf("Magnet is Invisible\n"); + fMagnetStructure->SetMagnetInvisible(); + } + //if ( cmd == fEnableMagneticFieldCmd ) { // printf("Enabling Magnetic Field\n"); // fMagnetStructure->EnableMagneticField(); diff --git a/PadmeMC/Magnet/src/MagnetStructure.cc b/PadmeMC/Magnet/src/MagnetStructure.cc index 7e5b9811..f9b0575f 100644 --- a/PadmeMC/Magnet/src/MagnetStructure.cc +++ b/PadmeMC/Magnet/src/MagnetStructure.cc @@ -34,6 +34,9 @@ MagnetStructure::MagnetStructure(G4LogicalVolume* motherVolume) // Magnetic volume is invisible by default //fMagneticVolumeIsVisible = 0; + // Magnet is visible by default + fMagnetIsVisible = true; + } MagnetStructure::~MagnetStructure() @@ -51,6 +54,12 @@ void MagnetStructure::CreateGeometry() G4VisAttributes coilVisAttr = G4VisAttributes(G4Colour::Red()); G4VisAttributes slabVisAttr = G4VisAttributes(G4Colour::Green()); G4VisAttributes neopreneVisAttr = G4VisAttributes(G4Colour::White()); + if (!fMagnetIsVisible) { + yokeVisAttr = G4VisAttributes::Invisible; + coilVisAttr = G4VisAttributes::Invisible; + slabVisAttr = G4VisAttributes::Invisible; + neopreneVisAttr = G4VisAttributes::Invisible; + } // Small gap between magnet yoke's sections G4double magGap = geo->GetMagnetGap(); diff --git a/PadmeMC/SAC/src/SACDetector.cc b/PadmeMC/SAC/src/SACDetector.cc index 6ef41160..82c2a77d 100644 --- a/PadmeMC/SAC/src/SACDetector.cc +++ b/PadmeMC/SAC/src/SACDetector.cc @@ -56,14 +56,15 @@ void SACDetector::CreateGeometry() // Show thickness of coating around crystals printf("Coating around SAC crystals is %f\n",geo->GetCrystalCoating()); - // Create standard SF57 crystal + // Create standard PbF2 crystal G4double crySizeX = geo->GetCrystalSizeX(); G4double crySizeY = geo->GetCrystalSizeY(); G4double crySizeZ = geo->GetCrystalSizeZ(); printf("SAC Crystal size is %f %f %f\n",crySizeX,crySizeY,crySizeZ); G4Box* solidCry = new G4Box("SACCry",0.5*crySizeX,0.5*crySizeY,0.5*crySizeZ); - // fCrystalVolume = new G4LogicalVolume(solidCry,G4Material::GetMaterial("G4_BARIUM_FLUORIDE"),"SACCry",0,0,0); - fCrystalVolume = new G4LogicalVolume(solidCry,G4Material::GetMaterial("PbGl_SF57"),"SACCry",0,0,0); + //fCrystalVolume = new G4LogicalVolume(solidCry,G4Material::GetMaterial("G4_BARIUM_FLUORIDE"),"SACCry",0,0,0); + //fCrystalVolume = new G4LogicalVolume(solidCry,G4Material::GetMaterial("PbGl_SF57"),"SACCry",0,0,0); + fCrystalVolume = new G4LogicalVolume(solidCry,G4Material::GetMaterial("PbF2"),"SACCry",0,0,0); fCrystalVolume->SetVisAttributes(G4VisAttributes(G4Colour::Magenta())); // Make crystal a sensitive detector @@ -74,7 +75,7 @@ void SACDetector::CreateGeometry() sdMan->AddNewDetector(sacSD); fCrystalVolume->SetSensitiveDetector(sacSD); - // Create ECal cell (BGO crystal+coating) + // Create SAC cell (PbF2 crystal+coating) G4double cellSizeX = geo->GetCellSizeX(); G4double cellSizeY = geo->GetCellSizeY(); G4double cellSizeZ = geo->GetCellSizeZ(); diff --git a/PadmeMC/SAC/src/SACDigitizer.cc b/PadmeMC/SAC/src/SACDigitizer.cc index 9210ccba..1bfdf7c9 100644 --- a/PadmeMC/SAC/src/SACDigitizer.cc +++ b/PadmeMC/SAC/src/SACDigitizer.cc @@ -49,7 +49,7 @@ SACDigitizer::SACDigitizer(G4String name) G4cout << "Contribution of 1 p.e. to integral ADC signal: " << fPEtoSConversion << G4endl; G4cout << "Collection probability along Z: " << fCollMapNBins << " bins of " << G4BestUnit(fCollMapBinLen,"Length") << " - Map:"; - for(G4int i=0;i SACGeometry::GetHashTable() buffer.str(""); buffer << "fDigiPECollectionMap"; - for(G4int i=0;iGetTotalEnergyDeposit(); if (edep == 0.) return false; G4StepPoint* preStepPoint = aStep->GetPreStepPoint(); - G4StepPoint* postStepPoint = aStep->GetPostStepPoint(); + //G4StepPoint* postStepPoint = aStep->GetPostStepPoint(); G4TouchableHandle touchHPre = aStep->GetPreStepPoint()->GetTouchableHandle(); SACHit* newHit = new SACHit(); diff --git a/PadmeMC/TPix/src/TPixDigitizer.cc b/PadmeMC/TPix/src/TPixDigitizer.cc index 7930e753..7ac69dd9 100644 --- a/PadmeMC/TPix/src/TPixDigitizer.cc +++ b/PadmeMC/TPix/src/TPixDigitizer.cc @@ -58,7 +58,7 @@ void TPixDigitizer::Digitize() // Loop over used channels G4int found = 0; - for (G4int i=0; i < dChannel.size(); i++) { + for (G4int i=0; i < (G4int)dChannel.size(); i++) { if (dChannel[i] == hChannel) { dEnergy[i] += hEnergy; if (hTime < dTime[i]) dTime[i] = hTime; @@ -75,7 +75,7 @@ void TPixDigitizer::Digitize() } // Create digis for active channels - for (G4int i=0; i < dChannel.size(); i++) { + for (G4int i=0; i < (G4int)dChannel.size(); i++) { TPixDigi* digi = new TPixDigi(); digi->SetChannelId(dChannel[i]); digi->SetTime(dTime[i]); diff --git a/PadmeMC/Target/src/TargetDigitizer.cc b/PadmeMC/Target/src/TargetDigitizer.cc index c038e348..c1554098 100644 --- a/PadmeMC/Target/src/TargetDigitizer.cc +++ b/PadmeMC/Target/src/TargetDigitizer.cc @@ -59,7 +59,7 @@ void TargetDigitizer::Digitize() // Loop over used channels G4int found = 0; - for (G4int i=0; i < dChannel.size(); i++) { + for (G4int i=0; i < (G4int)dChannel.size(); i++) { if (dChannel[i] == hChannel) { dEnergy[i] += hEnergy; if (hTime < dTime[i]) dTime[i] = hTime; @@ -76,7 +76,7 @@ void TargetDigitizer::Digitize() } // Create digis for active channels - for (G4int i=0; i < dChannel.size(); i++) { + for (G4int i=0; i < (G4int)dChannel.size(); i++) { TargetDigi* digi = new TargetDigi(); digi->SetChannelId(dChannel[i]); digi->SetTime(dTime[i]); diff --git a/PadmeMC/src/DetectorConstruction.cc b/PadmeMC/src/DetectorConstruction.cc index ff7ed628..adee392c 100644 --- a/PadmeMC/src/DetectorConstruction.cc +++ b/PadmeMC/src/DetectorConstruction.cc @@ -194,7 +194,7 @@ G4VPhysicalVolume* DetectorConstruction::Construct() if (! fWorldIsFilledWithAir) logicWorld->SetMaterial(G4Material::GetMaterial("Vacuum")); logicWorld->SetVisAttributes(G4VisAttributes::Invisible); //logicWorld->SetVisAttributes(G4VisAttributes(G4Colour::White())); - G4PVPlacement* physicWorld = new G4PVPlacement(0,G4ThreeVector(),logicWorld,"World",0,false,0); + physicWorld = new G4PVPlacement(0,G4ThreeVector(),logicWorld,"World",0,false,0); } @@ -360,6 +360,57 @@ void DetectorConstruction::SetupDetectors() void DetectorConstruction::DefineMaterials() { + // Use NIST database to create all needed materials + G4NistManager* man = G4NistManager::Instance(); + man->SetVerbose(1); + + // Define materials already in the NIST database + man->FindOrBuildMaterial("G4_Al"); // Aluminum (Chamber, Veto) + man->FindOrBuildMaterial("G4_Fe"); // Iron (Magnet) + man->FindOrBuildMaterial("G4_Cu"); // Copper (Magnet) + man->FindOrBuildMaterial("G4_Si"); // Silicon (TPix) + man->FindOrBuildMaterial("G4_AIR"); // Air (World) + man->FindOrBuildMaterial("G4_BGO"); // BGO (ECal) + man->FindOrBuildMaterial("G4_CONCRETE"); // Concrete (Hall) + man->FindOrBuildMaterial("G4_MYLAR"); // Mylar (Chamber) + man->FindOrBuildMaterial("G4_STAINLESS-STEEL"); // Stainless steel (Chamber) + man->FindOrBuildMaterial("G4_POLYVINYLIDENE_FLUORIDE"); // Tedlar (ECal) + man->FindOrBuildMaterial("G4_NEOPRENE"); // Neoprene (Magnet) + man->FindOrBuildMaterial("G4_PLEXIGLASS"); // Plexiglass (ECal) + man->FindOrBuildMaterial("G4_PLASTIC_SC_VINYLTOLUENE"); // Plastic scintillator (Veto) + + // Define all elements needed to define materials not in the NIST DB + man->FindOrBuildElement("H"); // Hydrogen + man->FindOrBuildElement("O"); // Oxygen + man->FindOrBuildElement("N"); // Nitrogen + man->FindOrBuildElement("C"); // Carbon + man->FindOrBuildElement("F"); // Fluoride + man->FindOrBuildElement("Pb"); // Lead + man->FindOrBuildElement("Al"); // Aluminum + man->FindOrBuildElement("Ti"); // Titanium + + // Vacuum: leave some residual air with low density (Chamber, World) + G4Material* Vacuum = new G4Material("Vacuum",(1.290*0.000001)*mg/cm3,2); // 1mbar + Vacuum->AddElement(G4Element::GetElement("N"),70.*perCent); + Vacuum->AddElement(G4Element::GetElement("O"),30.*perCent); + + // Diamond (Target) + G4Material* Diamond = new G4Material("Diamond",3.515*g/cm3,1); + Diamond->AddElement(G4Element::GetElement("C"),1); + + // Lead fluoride PbF2 (SAC) + G4Material* PbF2 = new G4Material("PbF2",7.77*g/cm3,2); + PbF2->AddElement(G4Element::GetElement("Pb"),1); + PbF2->AddElement(G4Element::GetElement("F"),2); + + // EJ510 reflective paint (ECal, SAC) + G4Material* EJ510Paint = new G4Material("EJ510Paint",1.182*g/cm3,4); + EJ510Paint->AddElement(G4Element::GetElement("Ti"),41.053*perCent); + EJ510Paint->AddElement(G4Element::GetElement("C"), 17.194*perCent); + EJ510Paint->AddElement(G4Element::GetElement("H"), 2.899*perCent); + EJ510Paint->AddElement(G4Element::GetElement("O"), 38.854*perCent); + + /* //--------- Materials definition --------- G4double a, z, density; G4int ncomponents, natoms; @@ -444,6 +495,13 @@ void DetectorConstruction::DefineMaterials() K2OEl[1] = "O"; K2ONA[1] = 1; man->ConstructNewMaterial("K2O",K2OEl,K2ONA,2.32,true); + // Lead fluoride PbF2 + man->FindOrBuildElement("Pb"); + man->FindOrBuildElement("F"); + G4Material* PbF2 = new G4Material("PbF2",7.77*g/cm3,2); + PbF2->AddElement(G4Element::GetElement("Pb"),84.5*perCent); + PbF2->AddElement(G4Element::GetElement("F"), 15.5*perCent); + // Lead Glass (PbGl) G4Material* PbGl = new G4Material("PbGl_SF57",5.57*g/cm3,4); PbGl->AddMaterial(G4Material::GetMaterial("SAC_SiO2"), 24.0*perCent); // 22-26% @@ -486,11 +544,13 @@ void DetectorConstruction::DefineMaterials() EJ510Paint->AddElement(G4Element::GetElement("H"), 2.88*perCent); EJ510Paint->AddElement(G4Element::GetElement("O"), 38.86*perCent); + */ + //Print all the materials defined. - //G4cout << G4endl << "The elements defined are : " << G4endl << G4endl; - //G4cout << *(G4Element::GetElementTable()) << G4endl; - //G4cout << G4endl << "The materials defined are : " << G4endl << G4endl; - //G4cout << *(G4Material::GetMaterialTable()) << G4endl; + G4cout << G4endl << "The elements defined are : " << G4endl << G4endl; + G4cout << *(G4Element::GetElementTable()) << G4endl; + G4cout << G4endl << "The materials defined are : " << G4endl << G4endl; + G4cout << *(G4Material::GetMaterialTable()) << G4endl; } diff --git a/PadmeMC/src/EventAction.cc b/PadmeMC/src/EventAction.cc index 1728d0e2..dd4e5561 100644 --- a/PadmeMC/src/EventAction.cc +++ b/PadmeMC/src/EventAction.cc @@ -181,13 +181,13 @@ void EventAction::EndOfEventAction(const G4Event* evt) AddLAVHits((LAVHitsCollection*)(LHC->GetHC(iHC))); } } - int Ncells=0; + //int Ncells=0; //Retrieve beam Infos! G4double BeamE = myStepping->GetPositronE(); G4double BeamX = myStepping->GetPositronX(); G4double BeamY = myStepping->GetPositronY(); - G4double BeamZ = myStepping->GetPositronZ(); + //G4double BeamZ = myStepping->GetPositronZ(); G4double PrimE = myStepping->GetPrimE(); @@ -203,7 +203,7 @@ void EventAction::EndOfEventAction(const G4Event* evt) ProcID = myStepping->GetPhysProc(); fHistoManager->FillHisto(1,ETotCal); fHistoManager->FillHisto(14,ProcID); - // fHistoManager->FillHisto(15,BeamZ); + //fHistoManager->FillHisto(15,BeamZ); fHistoManager->FillHisto2(30,myStepping->GetGammaEnergy(),myStepping->GetGammaAngle(),1.); @@ -363,7 +363,7 @@ void EventAction::EndOfEventAction(const G4Event* evt) void EventAction::AddECryHits(ECalHitsCollection* hcont) { - G4double ETotEvt=0; + //G4double ETotEvt=0; G4int nHits = hcont->entries(); G4double NRows= Egeom->GetECalNRows(); // righe sulla y @@ -543,7 +543,7 @@ void EventAction::AddTargetHits(TargetHitsCollection* hcont) //Target readout m void EventAction::AddHEPVetoHits(HEPVetoHitsCollection* hcont) { - G4double ETotHEPVetoEvt=0.; + //G4double ETotHEPVetoEvt=0.; G4int LastID=-1; for(G4int jj=0;jjentries(); for (G4int h=0; hGetHitE(); //old style variable deprected. - puppo= hit->GetEdep(); + //puppo= hit->GetEdep(); if(hit->GetTrackID()!=0 && hit->GetTrackID()!=LastID && NPVetoTracks < MaxTracks && hit->GetTrackEnergy() > 0.1*MeV) { PVetoTrackCh[NPVetoTracks] = hit->GetPVetoNb(); //bugs gives crazy numbers PVetoEtrack[NPVetoTracks] = hit->GetTrackEnergy(); @@ -689,7 +689,7 @@ void EventAction::AddPVetoHits(PVetoHitsCollection* hcont){ void EventAction::AddEVetoHits(EVetoHitsCollection* hcont){ // G4cout<<"vaffanculo "< Date: Mon, 2 Oct 2017 10:08:34 +0200 Subject: [PATCH 10/15] Fixed positions of beam exit hole, TPix and HEPVeto --- PadmeMC/Chamber/src/ChamberGeometry.cc | 4 +++- PadmeMC/Chamber/src/ChamberStructure.cc | 4 +++- PadmeMC/HEPVeto/src/HEPVetoGeometry.cc | 2 +- PadmeMC/TPix/src/TPixGeometry.cc | 4 ++-- PadmeMC/TPix/src/TPixMessenger.cc | 9 ++++++++- PadmeMC/vis.mac | 20 ++++---------------- 6 files changed, 21 insertions(+), 22 deletions(-) diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index 62313de7..453147f5 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -104,7 +104,9 @@ ChamberGeometry::ChamberGeometry() fTPPHCapHeight = 600.*mm; fTPPHHoleRadius = 106.5*mm; - fTPPHHoleDist = (624.38*mm-fVCBackFaceCornerX)/cos(fVCBackFaceAngle); + // From Cesidio's drawings for 1GeV/.8Tesla configuration + //fTPPHHoleDist = (624.38*mm-fVCBackFaceCornerX)/cos(fVCBackFaceAngle); + fTPPHHoleDist = 400.*mm; // Will be changed to final position fTPPHCircRadius = 142.5*mm; fTPPHCircThick = 12.0*mm; diff --git a/PadmeMC/Chamber/src/ChamberStructure.cc b/PadmeMC/Chamber/src/ChamberStructure.cc index 2b626b64..1b717b5e 100644 --- a/PadmeMC/Chamber/src/ChamberStructure.cc +++ b/PadmeMC/Chamber/src/ChamberStructure.cc @@ -192,6 +192,7 @@ void ChamberStructure::CreateTPixPortholeCap() G4double phcH = geo->GetTPPHCapHeight(); G4double phcT = geo->GetTPPHCapThick(); G4Box* solidPHB = new G4Box("TPPHBox",0.5*phcW,0.5*phcH,0.5*phcT); + printf("Rectangular flange size %f x %f mm2 thick %f mm\n",phcW/mm,phcH/mm,phcT/mm); // Carve hole in cap G4double phhR = geo->GetTPPHHoleRadius(); @@ -199,6 +200,7 @@ void ChamberStructure::CreateTPixPortholeCap() G4Tubs* solidPHH = new G4Tubs("TPPHHole",0.,phhR,0.5*phcT+1.*mm,0.*deg,360.*deg); G4ThreeVector posPHH = G4ThreeVector(-0.5*phcW+phhD,0.,0.); G4SubtractionSolid* solidPHC = new G4SubtractionSolid("TPPHCap",solidPHB,solidPHH,0,posPHH); + printf("Center of beam exit (TPix) porthole cap at %f mm from flange border\n",phhD/mm); G4LogicalVolume* logicalPHC = new G4LogicalVolume(solidPHC,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"TPPHCap",0,0,0); logicalPHC->SetVisAttributes(steelVisAttr); @@ -221,7 +223,7 @@ void ChamberStructure::CreateTPixPortholeCap() G4double circT = geo->GetTPPHCircThick(); G4Tubs* solidCirc = new G4Tubs("TPPHCirc",0.,circR,0.5*circT,0.*deg,360.*deg); - // Carve hole for Mylar window in cricular cap + // Carve hole for Mylar window in circular cap G4double windR = geo->GetTPPHWindRadius(); G4double windW = geo->GetTPPHWindWidth(); G4Tubs* solidWindT = new G4Tubs("WindT",0.,windR,0.5*circT+1.*mm,0.*deg,360.*deg); diff --git a/PadmeMC/HEPVeto/src/HEPVetoGeometry.cc b/PadmeMC/HEPVeto/src/HEPVetoGeometry.cc index 6bbca5e8..0019471f 100644 --- a/PadmeMC/HEPVeto/src/HEPVetoGeometry.cc +++ b/PadmeMC/HEPVeto/src/HEPVetoGeometry.cc @@ -33,7 +33,7 @@ HEPVetoGeometry::HEPVetoGeometry() // the projection of the center of the external face of the first finger // of HEPVeto on the external surface of the diagonal wall of the vacuum chamber. // Tune this to move HEPVeto along the diagonal wall of the vacuum chamber - fHEPVetoDistanceToCorner = 38.*cm; + fHEPVetoDistanceToCorner = 43.*cm; // Thickness of the support structure between HEPVeto and diagonal wall of the vacuum chamber fHEPVetoSupportThickness = 1.*cm; // Check with final design diff --git a/PadmeMC/TPix/src/TPixGeometry.cc b/PadmeMC/TPix/src/TPixGeometry.cc index 7d29fa26..06aea400 100644 --- a/PadmeMC/TPix/src/TPixGeometry.cc +++ b/PadmeMC/TPix/src/TPixGeometry.cc @@ -21,7 +21,7 @@ TPixGeometry::TPixGeometry() // Inizialize default parameters fTPixNRows = 2; - fTPixNCols = 8; + fTPixNCols = 6; fChipSizeX = 14.08*mm; // 256 pixels of 55um each fChipSizeY = 14.08*mm; // 256 pixels of 55um each @@ -33,7 +33,7 @@ TPixGeometry::TPixGeometry() // the projection of the center of the external side of the TPix on the // external surface of the diagonal wall of the vacuum chamber. // Tune this to move TPix along the diagonal wall of the vacuum chamber - fTPixDistanceToCorner = 30.*cm; + fTPixDistanceToCorner = 35.8*cm; // Thickness of the support structure between HEPVeto and diagonal wall of the vacuum chamber fTPixSupportThickness = 6.*cm; // Check with final design diff --git a/PadmeMC/TPix/src/TPixMessenger.cc b/PadmeMC/TPix/src/TPixMessenger.cc index 0a5fa340..bf653282 100644 --- a/PadmeMC/TPix/src/TPixMessenger.cc +++ b/PadmeMC/TPix/src/TPixMessenger.cc @@ -24,12 +24,19 @@ TPixMessenger::TPixMessenger(TPixDetector* det) fTPixDetectorDir = new G4UIdirectory("/Detector/TPix/"); fTPixDetectorDir->SetGuidance("UI commands to control TPix detector geometry"); - fSetNColumnsCmd = new G4UIcmdWithAnInteger("/Detector/TPix/Columns",this); + fSetNColumnsCmd = new G4UIcmdWithAnInteger("/Detector/TPix/NColumns",this); fSetNColumnsCmd->SetGuidance("Set number of TPix columns."); fSetNColumnsCmd->SetParameterName("NC",false); fSetNColumnsCmd->SetRange("NF >= 1 && NF <= 10"); fSetNColumnsCmd->AvailableForStates(G4State_PreInit,G4State_Idle); + fSetDistToCornerCmd = new G4UIcmdWithADoubleAndUnit("/Detector/TPix/DistanceToCorner",this); + fSetDistToCornerCmd->SetGuidance("Set distance of TPix to corner of vacuum chamber back wall."); + fSetDistToCornerCmd->SetParameterName("DTC",false); + fSetDistToCornerCmd->SetDefaultUnit("cm"); + fSetDistToCornerCmd->SetRange("DTC > 0. && DTC <= 100."); + fSetDistToCornerCmd->AvailableForStates(G4State_PreInit,G4State_Idle); + } TPixMessenger::~TPixMessenger() diff --git a/PadmeMC/vis.mac b/PadmeMC/vis.mac index 6e51d105..39b99636 100644 --- a/PadmeMC/vis.mac +++ b/PadmeMC/vis.mac @@ -130,28 +130,16 @@ #/Detector/HEPVeto/FingerStep 1.1 cm #/Detector/HEPVeto/FingerSize 1. cm #/Detector/HEPVeto/FingerLength 20. cm -#/Detector/HEPVeto/DistanceToCorner 40. cm +#/Detector/HEPVeto/DistanceToCorner 43. cm + +#/Detector/TPix/NColumns 6 +#/Detector/TPix/DistanceToCorner 35.8 cm #/Detector/TDump/TargetRadius 3.5 #/Detector/TDump/TargetLength 6.0 #/Detector/TDump/TargetFrontFaceZ 10. #/Detector/TDump/FrontFaceZ -180. -#/Detector/TPix/NColumns 5 -#/Detector/TPix/PositionX -92. -#/Detector/TPix/PositionY 0. # Disabled -#/Detector/TPix/PositionZ 256. -#/Detector/TPix/RotationX 0. # Disabled -#/Detector/TPix/RotationY -0.977 -#/Detector/TPix/RotationZ 0. # Disabled - -### Setup for beam deflection tests -#/Detector/EnableSubDetector TPix -#/Detector/TPix/NColumns 20 -#/Detector/TPix/PositionX 70. -#/Detector/TPix/PositionZ 230. -#/Detector/TPix/RotationY 1.570796 - #/beam/n_e+_per_bunch 1 #/beam/n_e+_poisson_on false #/beam/bunch_structure_on false From f9d4a4b85974831ccb44623499e67356b1055368 Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Tue, 3 Oct 2017 08:27:59 +0200 Subject: [PATCH 11/15] Replaced Aluminum thin window with Carbon thin window Added track filtering to visualization --- PadmeMC/Chamber/include/ChamberGeometry.hh | 13 +++++- PadmeMC/Chamber/include/ChamberStructure.hh | 1 + PadmeMC/Chamber/src/ChamberGeometry.cc | 8 +++- PadmeMC/Chamber/src/ChamberStructure.cc | 52 ++++++++++++++++++++- PadmeMC/src/DetectorConstruction.cc | 1 + PadmeMC/vis.mac | 7 ++- 6 files changed, 76 insertions(+), 6 deletions(-) diff --git a/PadmeMC/Chamber/include/ChamberGeometry.hh b/PadmeMC/Chamber/include/ChamberGeometry.hh index adac981c..24f916f8 100644 --- a/PadmeMC/Chamber/include/ChamberGeometry.hh +++ b/PadmeMC/Chamber/include/ChamberGeometry.hh @@ -45,11 +45,16 @@ public: G4double GetVCInnerSizeY() { return fVCInnerSizeY; } G4double GetVCInnerFacePosZ() { return fVCInnerFacePosZ; } - // Properties of aluminum thin window and its flange + // Properties of aluminum|carbon thin window and its flange G4double GetEWAlThick() { return fEWAlThick; } G4double GetEWAlConvexity() { return fEWAlConvexity; } G4double GetEWAlRadius() { return fEWAlFlangeRIn; } + + G4double GetEWCarbonThick() { return fEWCarbonThick; } + G4double GetEWCarbonConvexity() { return fEWCarbonConvexity; } + G4double GetEWCarbonRadius() { return fEWAlFlangeRIn; } + G4double GetEWAlFlangeRIn() { return fEWAlFlangeRIn; } G4double GetEWAlFlangeROut() { return fEWAlFlangeROut; } G4double GetEWAlFlangeThick() { return fEWAlFlangeThick; } @@ -108,10 +113,14 @@ private: G4double fVCInnerSizeY; // Internal size along Y of the rectangular section inside the magnet G4double fVCInnerFacePosZ; // Position along Z of the internal face of the rectangular section inside the magnet - // Aluminum thin window and aluminum flange + // Aluminum|Carbon thin window and aluminum flange G4double fEWAlThick; G4double fEWAlConvexity; + + G4double fEWCarbonThick; + G4double fEWCarbonConvexity; + G4double fEWAlFlangeRIn; G4double fEWAlFlangeROut; G4double fEWAlFlangeThick; diff --git a/PadmeMC/Chamber/include/ChamberStructure.hh b/PadmeMC/Chamber/include/ChamberStructure.hh index c1979b8b..21217044 100644 --- a/PadmeMC/Chamber/include/ChamberStructure.hh +++ b/PadmeMC/Chamber/include/ChamberStructure.hh @@ -50,6 +50,7 @@ private: G4UnionSolid* CreateVCFacetInternalSolid(); void CreateECalAlThinWindow(); + void CreateECalCarbonThinWindow(); void CreateTargetPipes(); void CreatePortholeCaps(); void CreateTPixPortholeCap(); diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index 453147f5..25c530b0 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -34,10 +34,14 @@ ChamberGeometry::ChamberGeometry() fVCInnerSizeY = 205.0*mm; // Internal size along Y of the rectangular section inside the magnet fVCInnerFacePosZ = -490.0*mm; // Position along Z of the internal face of the rectangular section inside the magnet - // Parameters for the aluminum thin window + // Parameters for the aluminum|carbon thin window fEWAlThick = 4.*mm; // Thickness of aluminum window - fEWAlConvexity = 29.*mm; // Convexity of window at its center + fEWAlConvexity = 29.*mm; // Convexity of aluminum window at its center + + fEWCarbonThick = 2.*mm; // Thickness of carbon window + fEWCarbonConvexity = 29.*mm; // Convexity of carbon window at its center + fEWAlFlangeRIn = 326.*mm; // Inner radius of flange (also radius of window) fEWAlFlangeROut = 375.*mm; // Outer radius of flange fEWAlFlangeThick = 23.*mm; // Thickness of flange diff --git a/PadmeMC/Chamber/src/ChamberStructure.cc b/PadmeMC/Chamber/src/ChamberStructure.cc index 1b717b5e..2b9b91bb 100644 --- a/PadmeMC/Chamber/src/ChamberStructure.cc +++ b/PadmeMC/Chamber/src/ChamberStructure.cc @@ -51,7 +51,8 @@ void ChamberStructure::CreateGeometry() // Here we only define flanges, portholes and other components of the chamber // Create the thin window membrane in front of ECal with its flange - CreateECalAlThinWindow(); + //CreateECalAlThinWindow(); + CreateECalCarbonThinWindow(); // Create crossed pipes in the target area CreateTargetPipes(); @@ -114,6 +115,55 @@ void ChamberStructure::CreateECalAlThinWindow() } +void ChamberStructure::CreateECalCarbonThinWindow() +{ + + /////////////////////////////////////////////////////// + // Thin Carbon window and Al flange in front of ECal // + /////////////////////////////////////////////////////// + + ChamberGeometry* geo = ChamberGeometry::GetInstance(); + + // Get properties of thin window + G4double ewR = geo->GetEWCarbonRadius(); // Radius of window + G4double ewT = geo->GetEWCarbonThick(); // Thickness of window + G4double ewC = geo->GetEWCarbonConvexity(); // Convexity at window center + + // Get properties of flange + G4double ewFRIn = geo->GetEWAlFlangeRIn(); + G4double ewFROut = geo->GetEWAlFlangeROut(); + G4double ewFThick = geo->GetEWAlFlangeThick(); + + // Get Z coordinate of front face of flange + G4double efFFrontZ = geo->GetEWAlFrontFacePosZ(); + + G4VisAttributes alVisAttr = G4VisAttributes(G4Colour::Blue()); + //if ( ! fChamberIsVisible ) alVisAttr = G4VisAttributes::Invisible; + + G4VisAttributes cVisAttr = G4VisAttributes(G4Colour::Yellow()); + //if ( ! fChamberIsVisible ) cVisAttr = G4VisAttributes::Invisible; + + // Compute thin window sphere's radius and z position of center + G4double ewr1 = (ewR*ewR+ewC*ewC)/(2.*ewC); + //G4double ewz1 = efFBackZ+(ewr1-ewC); + G4double ewth1 = asin(ewR/ewr1); + + // Create flange around thin window + G4Tubs* solidEWFlange = new G4Tubs("EWFlange",ewFRIn,ewFROut,0.5*ewFThick,0.*deg,360.*deg); + G4LogicalVolume* logicalEWFlange = new G4LogicalVolume(solidEWFlange,G4Material::GetMaterial("G4_Al"), "ChamberECalWindowFlange",0,0,0); + logicalEWFlange->SetVisAttributes(alVisAttr); + new G4PVPlacement(0,G4ThreeVector(0.,0.,efFFrontZ+0.5*ewFThick),logicalEWFlange,"ChamberECalWindowFlange",fMotherVolume,false,0,true); + + // Create the thin window spherical cap and subtract flange to smooth its edge + G4Sphere* solidEWSphere = new G4Sphere("EWSphere",ewr1,ewr1+ewT,0.*deg,360.*deg,180.*deg-ewth1,ewth1); + G4ThreeVector spherePos = G4ThreeVector(0.,0.,0.5*ewFThick+ewr1-ewC); + G4SubtractionSolid* solidEWindow = new G4SubtractionSolid("ChamberECalWindow",solidEWSphere,solidEWFlange,0,G4ThreeVector(0.,0.,-0.5*ewFThick-ewr1+ewC)); + G4LogicalVolume* logicalEWindow = new G4LogicalVolume(solidEWindow,G4Material::GetMaterial("G4_C"), "ChamberECalWindow",0,0,0); + logicalEWindow->SetVisAttributes(cVisAttr); + new G4PVPlacement(0,G4ThreeVector(0.,0.,efFFrontZ+ewFThick+ewr1-ewC),logicalEWindow,"ChamberECalWindow",fMotherVolume,false,0,true); + +} + void ChamberStructure::CreateTargetPipes() { diff --git a/PadmeMC/src/DetectorConstruction.cc b/PadmeMC/src/DetectorConstruction.cc index adee392c..3478537a 100644 --- a/PadmeMC/src/DetectorConstruction.cc +++ b/PadmeMC/src/DetectorConstruction.cc @@ -365,6 +365,7 @@ void DetectorConstruction::DefineMaterials() man->SetVerbose(1); // Define materials already in the NIST database + man->FindOrBuildMaterial("G4_C"); // Carbon (Chamber) man->FindOrBuildMaterial("G4_Al"); // Aluminum (Chamber, Veto) man->FindOrBuildMaterial("G4_Fe"); // Iron (Magnet) man->FindOrBuildMaterial("G4_Cu"); // Copper (Magnet) diff --git a/PadmeMC/vis.mac b/PadmeMC/vis.mac index 39b99636..829947bc 100644 --- a/PadmeMC/vis.mac +++ b/PadmeMC/vis.mac @@ -69,7 +69,7 @@ #/Detector/EnableMagneticField #/Detector/DisableMagneticField -#/Detector/SetMagneticFieldValue -0.55 tesla +#/Detector/SetMagneticFieldValue 0.55 tesla #/Detector/SetMagneticVolumeVisible #/Detector/SetMagneticVolumeInvisible @@ -299,4 +299,9 @@ #/vis/viewer/set/viewpointThetaPhi 0. 0. #/vis/viewer/zoom 50 +# Only show tracks with p>1MeV +/vis/filtering/trajectories/create/attributeFilter +/vis/filtering/trajectories/attributeFilter-0/setAttribute IMag +/vis/filtering/trajectories/attributeFilter-0/addInterval 1. MeV 1000. MeV + #/run/beamOn 1 From 282d4efa7cb13fcab192db9b76a538beecfb4f72 Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Tue, 3 Oct 2017 10:50:20 +0200 Subject: [PATCH 12/15] Added junction pipe between target cross and vacuum chamber Added Tungsten detector for PADMEdump experiment --- PadmeMC/Chamber/include/ChamberGeometry.hh | 20 ++++++ PadmeMC/Chamber/include/ChamberStructure.hh | 1 + PadmeMC/Chamber/src/ChamberGeometry.cc | 9 +++ PadmeMC/Chamber/src/ChamberStructure.cc | 27 ++++++++ PadmeMC/GNUmakefile | 2 +- PadmeMC/Tungsten/GNUmakefile | 19 ++++++ PadmeMC/Tungsten/include/TungstenDetector.hh | 45 +++++++++++++ PadmeMC/Tungsten/include/TungstenGeometry.hh | 57 ++++++++++++++++ PadmeMC/Tungsten/include/TungstenMessenger.hh | 42 ++++++++++++ PadmeMC/Tungsten/src/TungstenDetector.cc | 61 +++++++++++++++++ PadmeMC/Tungsten/src/TungstenGeometry.cc | 55 ++++++++++++++++ PadmeMC/Tungsten/src/TungstenMessenger.cc | 62 ++++++++++++++++++ PadmeMC/include/DetectorConstruction.hh | 21 +++--- PadmeMC/src/DetectorConstruction.cc | 65 +++++++++++-------- PadmeMC/vis.mac | 4 +- 15 files changed, 453 insertions(+), 37 deletions(-) create mode 100644 PadmeMC/Tungsten/GNUmakefile create mode 100644 PadmeMC/Tungsten/include/TungstenDetector.hh create mode 100644 PadmeMC/Tungsten/include/TungstenGeometry.hh create mode 100644 PadmeMC/Tungsten/include/TungstenMessenger.hh create mode 100644 PadmeMC/Tungsten/src/TungstenDetector.cc create mode 100644 PadmeMC/Tungsten/src/TungstenGeometry.cc create mode 100644 PadmeMC/Tungsten/src/TungstenMessenger.cc diff --git a/PadmeMC/Chamber/include/ChamberGeometry.hh b/PadmeMC/Chamber/include/ChamberGeometry.hh index 24f916f8..389eeef6 100644 --- a/PadmeMC/Chamber/include/ChamberGeometry.hh +++ b/PadmeMC/Chamber/include/ChamberGeometry.hh @@ -74,6 +74,14 @@ public: G4double GetCPXLength() { return fCPXLength; } G4double GetCPXPosZ() { return fCPXPosZ; } + // Properties of junction pipe between cross and chamber + + G4double GetJunRIn() { return fJunRIn; } + G4double GetJunROut() { return fJunRIn+fJunThick; } + G4double GetJunThick() { return fJunThick; } + G4double GetJunLength() { return fJunLength; } + G4double GetJunPosZ() { return fJunPosZ; } + // Properties of porthole caps G4int GetPHCapNumber() { return CHAMBERGEOMETRY_N_PORTHOLES; } @@ -83,6 +91,7 @@ public: G4ThreeVector GetPHCapPos(G4int c) { return fPHCapPos[c]; } // Properties of large TPix porthole + G4double GetTPPHCapThick() { return fTPPHCapThick; } G4double GetTPPHCapWidth() { return fTPPHCapWidth; } G4double GetTPPHCapHeight() { return fTPPHCapHeight; } @@ -138,13 +147,24 @@ private: G4double fCPXLength; G4double fCPXPosZ; + // Junction pipe + + G4double fJunRIn; + G4double fJunThick; + G4double fJunFrontFacePosZ; + G4double fJunBackFacePosZ; + G4double fJunLength; + G4double fJunPosZ; + // Porthole caps + G4double fPHCapRadius[CHAMBERGEOMETRY_N_PORTHOLES]; G4double fPHCapThick[CHAMBERGEOMETRY_N_PORTHOLES]; G4double fPHCapFlangeThick[CHAMBERGEOMETRY_N_PORTHOLES]; G4ThreeVector fPHCapPos[CHAMBERGEOMETRY_N_PORTHOLES]; // TPix porthole cap + G4double fTPPHCapThick; // Thickness of rectangular porthole cap G4double fTPPHCapWidth; // Width of rectangular porthole cap G4double fTPPHCapHeight; // Height of rectangular porthole cap diff --git a/PadmeMC/Chamber/include/ChamberStructure.hh b/PadmeMC/Chamber/include/ChamberStructure.hh index 21217044..5d5785be 100644 --- a/PadmeMC/Chamber/include/ChamberStructure.hh +++ b/PadmeMC/Chamber/include/ChamberStructure.hh @@ -52,6 +52,7 @@ private: void CreateECalAlThinWindow(); void CreateECalCarbonThinWindow(); void CreateTargetPipes(); + void CreateJunctionPipe(); void CreatePortholeCaps(); void CreateTPixPortholeCap(); diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index 25c530b0..b29ae8c5 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -59,6 +59,15 @@ ChamberGeometry::ChamberGeometry() fCPXLength = 25.*cm; fCPXPosZ = -1.*m; + // Properties of junction pipe between cross and chamber + + fJunRIn = 5.*cm; + fJunThick = 1.*cm; + fJunFrontFacePosZ = fCPZPosZ+0.5*fCPZLength; + fJunBackFacePosZ = -56.2*cm; // From vacuum chamber technical drawing + fJunLength = fJunBackFacePosZ-fJunFrontFacePosZ; + fJunPosZ = 0.5*(fJunBackFacePosZ+fJunFrontFacePosZ); + // Properties of porthole caps fPHCapRadius[0] = 112.5*mm; diff --git a/PadmeMC/Chamber/src/ChamberStructure.cc b/PadmeMC/Chamber/src/ChamberStructure.cc index 2b9b91bb..33b35e07 100644 --- a/PadmeMC/Chamber/src/ChamberStructure.cc +++ b/PadmeMC/Chamber/src/ChamberStructure.cc @@ -57,6 +57,9 @@ void ChamberStructure::CreateGeometry() // Create crossed pipes in the target area CreateTargetPipes(); + // Create junction pipe between cross and vacuum chamber + CreateJunctionPipe(); + // Create porthole caps for both section of the chamber CreatePortholeCaps(); @@ -201,6 +204,30 @@ void ChamberStructure::CreateTargetPipes() } +void ChamberStructure::CreateJunctionPipe() +{ + + ChamberGeometry* geo = ChamberGeometry::GetInstance(); + + G4VisAttributes steelVisAttr = G4VisAttributes(G4Colour::Grey()); + if ( ! fChamberIsVisible ) steelVisAttr = G4VisAttributes::Invisible; + + // Junction pipe + + G4double junRIn = geo->GetJunRIn(); + G4double junROut = geo->GetJunROut(); + G4double junLen = geo->GetJunLength(); + G4double junPosZ = geo->GetJunPosZ(); + + G4Tubs* solidJun = new G4Tubs("JunPipe",junRIn,junROut,0.5*junLen,0.*deg,360.*deg); + G4LogicalVolume* logicalJun = new G4LogicalVolume(solidJun,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"JunPipe",0,0,0); + logicalJun->SetVisAttributes(steelVisAttr); + new G4PVPlacement(0,G4ThreeVector(0.,0.,junPosZ),logicalJun,"JunctionPipe",fMotherVolume,false,0,true); + + printf("Junction pipe RIn %.1fmm Rout %.1fmm Zlen %.3fmm Zpos %.3fmm\n",junRIn/mm,junROut/mm,junLen/mm,junPosZ/mm); + +} + void ChamberStructure::CreatePortholeCaps() { diff --git a/PadmeMC/GNUmakefile b/PadmeMC/GNUmakefile index ab23fbb5..76074412 100644 --- a/PadmeMC/GNUmakefile +++ b/PadmeMC/GNUmakefile @@ -11,7 +11,7 @@ name := PADMEMC G4TARGET := $(name) G4EXLIB := true -SUBDIRS := Beam ECal Target SAC LAV PVeto EVeto HEPVeto Magnet TDump TPix Chamber Hall MagneticField +SUBDIRS := Beam ECal Target SAC LAV PVeto EVeto HEPVeto Magnet TDump TPix Tungsten Chamber Hall MagneticField ALLTARGETDIRS := $(SUBDIRS) LOCALDIR := ${PWD} diff --git a/PadmeMC/Tungsten/GNUmakefile b/PadmeMC/Tungsten/GNUmakefile new file mode 100644 index 00000000..850a6bfe --- /dev/null +++ b/PadmeMC/Tungsten/GNUmakefile @@ -0,0 +1,19 @@ +# -------------------------------------------------------------- +# GNUmakefile for Tungsten library +# -------------------------------------------------------------- +# -------------------------------------------------------------- +# History: +# +# Created by Emanuele Leonardi (emanuele.leonardi@roma1.infn.it) 2015-12-14 +# +# -------------------------------------------------------------- + +name := Tungsten +G4TARGET := PADMEMC +G4EXLIB := true + +ifndef PADMEMC + PADMEMC = ../ +endif + +include $(PADMEMC)/config/SubDetector.gmk diff --git a/PadmeMC/Tungsten/include/TungstenDetector.hh b/PadmeMC/Tungsten/include/TungstenDetector.hh new file mode 100644 index 00000000..1a791544 --- /dev/null +++ b/PadmeMC/Tungsten/include/TungstenDetector.hh @@ -0,0 +1,45 @@ +// TungstenDetector.hh +// -------------------------------------------------------------- +// History: +// +// 2017-10-03 Created by Emanuele Leonardi (emanuele.leonardi@roma1.infn.it) 2105-12-11 +// -------------------------------------------------------------- + +#ifndef TungstenDetector_H +#define TungstenDetector_H 1 + +#include "globals.hh" +#include "G4LogicalVolume.hh" + +#include "TungstenGeometry.hh" + +class TungstenMessenger; + +class TungstenDetector +{ + +public: + + ~TungstenDetector(); + TungstenDetector(G4LogicalVolume*); + + void SetMotherVolume(G4LogicalVolume* v) { fMotherVolume = v; } + void CreateGeometry(); + + G4double GetTungstenFrontFaceZ() { return TungstenGeometry::GetInstance()->GetTungstenFrontFacePosZ(); } + G4double GetTungstenLength() { return TungstenGeometry::GetInstance()->GetTungstenSizeZ(); } + + // Define displacement of Tungsten along Z due to position of magnetic volume + void SetTungstenDisplacePosZ(G4double z) { fTungstenDisplacePosZ = z; } + +private: + + G4LogicalVolume* fMotherVolume; + + TungstenMessenger* fTungstenMessenger; + + G4double fTungstenDisplacePosZ; // Displacement of Tungsten along Z due to positioning inside magnetic volume + +}; + +#endif diff --git a/PadmeMC/Tungsten/include/TungstenGeometry.hh b/PadmeMC/Tungsten/include/TungstenGeometry.hh new file mode 100644 index 00000000..a3d44523 --- /dev/null +++ b/PadmeMC/Tungsten/include/TungstenGeometry.hh @@ -0,0 +1,57 @@ +// TungstenGeometry.hh +// -------------------------------------------------------------- +// History: +// +// 2107-10-03 Created by Emanuele Leonardi (emanuele.leonardi@roma1.infn.it) +// -------------------------------------------------------------- + +#ifndef TungstenGeometry_H +#define TungstenGeometry_H 1 + +#include "globals.hh" + +class G4LogicalVolume; + +class TungstenGeometry +{ + +public: + + ~TungstenGeometry(); + static TungstenGeometry* GetInstance(); + std::vector GetHashTable(); + +private: + + static TungstenGeometry* fInstance; + +protected: + + TungstenGeometry(); + +public: + + // Position of center of Tungsten cylinder + G4double GetTungstenPosX() { return 0.; } + G4double GetTungstenPosY() { return 0.; } + G4double GetTungstenPosZ() { return fTungstenFrontFacePosZ+fTungstenSizeZ*0.5; } + + // Size of Tungsten cylinder + G4double GetTungstenRadius() { return fTungstenRadius; } + G4double GetTungstenSizeZ() { return fTungstenSizeZ; } + void SetTungstenSizeZ(G4double s) { fTungstenSizeZ = s; } + + // Set position along Z of Tungsten front face + G4double GetTungstenFrontFacePosZ() { return fTungstenFrontFacePosZ; } + void SetTungstenFrontFacePosZ(G4double z) { fTungstenFrontFacePosZ = z; } + +private: + + G4double fTungstenRadius; + G4double fTungstenSizeZ; + + G4double fTungstenFrontFacePosZ; // Position along Z axis of Tungsten front face + +}; + +#endif diff --git a/PadmeMC/Tungsten/include/TungstenMessenger.hh b/PadmeMC/Tungsten/include/TungstenMessenger.hh new file mode 100644 index 00000000..6ad834d3 --- /dev/null +++ b/PadmeMC/Tungsten/include/TungstenMessenger.hh @@ -0,0 +1,42 @@ +// TungstenMessenger.hh +// -------------------------------------------------------------- +// History: +// +// 2017-10-03 Created by Emanuele Leonardi (emanuele.leonardi@roma1.infn.it) +// +// -------------------------------------------------------------- + +#ifndef TungstenMessenger_h +#define TungstenMessenger_h 1 + +#include "globals.hh" +#include "G4UImessenger.hh" + +class TungstenDetector; +class TungstenGeometry; + +class G4UIdirectory; +class G4UIcmdWithADoubleAndUnit; +class G4UIcmdWithoutParameter; + +class TungstenMessenger: public G4UImessenger +{ +public: + + TungstenMessenger(TungstenDetector* ); + ~TungstenMessenger(); + + void SetNewValue(G4UIcommand*, G4String); + +private: + + TungstenDetector* fTungstenDetector; + TungstenGeometry* fTungstenGeometry; + + G4UIdirectory* fTungstenDetectorDir; + + G4UIcmdWithADoubleAndUnit* fSetTungstenFrontFaceZCmd; + G4UIcmdWithADoubleAndUnit* fSetTungstenLengthCmd; + +}; +#endif diff --git a/PadmeMC/Tungsten/src/TungstenDetector.cc b/PadmeMC/Tungsten/src/TungstenDetector.cc new file mode 100644 index 00000000..c97bffde --- /dev/null +++ b/PadmeMC/Tungsten/src/TungstenDetector.cc @@ -0,0 +1,61 @@ +// TungstenDetector.cc +// -------------------------------------------------------------- +// History: +// +// Created by Emanuele Leonardi (emanuele.leonardi@roma1.infn.it) 2105-12-11 +// -------------------------------------------------------------- + +#include "TungstenDetector.hh" + +#include "G4PVPlacement.hh" +#include "G4ThreeVector.hh" +#include "G4Tubs.hh" + +#include "G4Element.hh" +#include "G4Material.hh" + +#include "G4VisAttributes.hh" +#include "G4Colour.hh" + +#include "G4SystemOfUnits.hh" + +#include "TungstenGeometry.hh" +#include "TungstenMessenger.hh" + +TungstenDetector::TungstenDetector(G4LogicalVolume* motherVolume):fMotherVolume(motherVolume) +{ + + // Connect to TungstenDetectorMessenger to enable datacard configuration + fTungstenMessenger = new TungstenMessenger(this); + + fTungstenDisplacePosZ = 0.; // No default displacement + +} + +TungstenDetector::~TungstenDetector() +{ + delete fTungstenMessenger; +} + +void TungstenDetector::CreateGeometry() +{ + + TungstenGeometry* geo = TungstenGeometry::GetInstance(); + + // Get Tungsten target dump position and dimensions + + G4ThreeVector tungPos = G4ThreeVector(geo->GetTungstenPosX(),geo->GetTungstenPosY(),geo->GetTungstenPosZ()); + printf("Tungsten will be placed at %.3fmm %.3fmm %.3fmm\n",tungPos.x()/mm,tungPos.y()/mm,tungPos.z()/mm); + + G4double tungLength = geo->GetTungstenSizeZ(); + G4double tungRadius = geo->GetTungstenRadius(); + printf("Tungsten length %.3fmm radius %.3fmm\n",tungLength/mm,tungRadius/mm); + + // Create main Tungsten cylinder and position it + // Do not forget to take into account mother volume Z displacement + G4Tubs* tungSolid = new G4Tubs("Tungsten",0.,tungRadius,0.5*tungLength,0.*deg,360.*deg); + G4LogicalVolume* tungLogical = new G4LogicalVolume(tungSolid,G4Material::GetMaterial("G4_W"),"Tungsten",0,0,0); + tungLogical->SetVisAttributes(G4VisAttributes(G4Colour::Red())); + new G4PVPlacement(0,tungPos-G4ThreeVector(0.,0.,fTungstenDisplacePosZ),tungLogical,"Tungsten",fMotherVolume,false,0,true); + +} diff --git a/PadmeMC/Tungsten/src/TungstenGeometry.cc b/PadmeMC/Tungsten/src/TungstenGeometry.cc new file mode 100644 index 00000000..3160ffd2 --- /dev/null +++ b/PadmeMC/Tungsten/src/TungstenGeometry.cc @@ -0,0 +1,55 @@ +// TungstenGeometry.cc +// -------------------------------------------------------------- +// History: +// +// 2017-10-03 Created by Emanuele Leonardi (emanuele.leonardi@roma1.infn.it) +// -------------------------------------------------------------- + +#include "TungstenGeometry.hh" + +#include "G4SystemOfUnits.hh" + +TungstenGeometry* TungstenGeometry::fInstance = 0; + +TungstenGeometry* TungstenGeometry::GetInstance() +{ + if ( fInstance == 0 ) { fInstance = new TungstenGeometry(); } + return fInstance; +} + +TungstenGeometry::TungstenGeometry() +{ + + // Inizialize default parameters + + fTungstenRadius = 5.*cm-2.*um; // Fill junction pipe taking into account magnetic volume tolerances + fTungstenSizeZ = 10.*cm; + + fTungstenFrontFacePosZ = -80.*cm; // Relative to center of magnet + +} + +TungstenGeometry::~TungstenGeometry() +{} + +std::vector TungstenGeometry::GetHashTable() +{ + + std::vector hash; + std::ostringstream buffer; + + buffer << "fTungstenRadius " << fTungstenRadius; + hash.push_back(buffer.str()); + buffer.str(""); + + buffer << "fTungstenSizeZ " << fTungstenSizeZ; + hash.push_back(buffer.str()); + buffer.str(""); + + buffer << "fTungstenFrontFacePosZ " << fTungstenFrontFacePosZ; + hash.push_back(buffer.str()); + buffer.str(""); + + return hash; + +} diff --git a/PadmeMC/Tungsten/src/TungstenMessenger.cc b/PadmeMC/Tungsten/src/TungstenMessenger.cc new file mode 100644 index 00000000..3e9a6167 --- /dev/null +++ b/PadmeMC/Tungsten/src/TungstenMessenger.cc @@ -0,0 +1,62 @@ +// TungstenMessenger.cc +// -------------------------------------------------------------- +// History: +// +// 2017-10-03 Created by Emanuele Leonardi (emanuele.leonardi@roma1.infn.it) +// +// -------------------------------------------------------------- + +#include "TungstenMessenger.hh" + +#include "G4UIdirectory.hh" +#include "G4UIcmdWithADoubleAndUnit.hh" + +#include "TungstenDetector.hh" +#include "TungstenGeometry.hh" + +TungstenMessenger::TungstenMessenger(TungstenDetector* det) +:fTungstenDetector(det) +{ + + fTungstenGeometry = TungstenGeometry::GetInstance(); + + fTungstenDetectorDir = new G4UIdirectory("/Detector/Tungsten/"); + fTungstenDetectorDir->SetGuidance("UI commands to control Tungsten target dump geometry"); + + fSetTungstenLengthCmd = new G4UIcmdWithADoubleAndUnit("/Detector/Tungsten/Lenght",this); + fSetTungstenLengthCmd->SetGuidance("Set length of Tungsten target dump."); + fSetTungstenLengthCmd->SetParameterName("Len",false); + fSetTungstenLengthCmd->SetDefaultUnit("cm"); + fSetTungstenLengthCmd->SetRange("Len > 0. && Len <= 20."); + fSetTungstenLengthCmd->AvailableForStates(G4State_PreInit,G4State_Idle); + + fSetTungstenFrontFaceZCmd = new G4UIcmdWithADoubleAndUnit("/Detector/Tungsten/FrontFaceZ",this); + fSetTungstenFrontFaceZCmd->SetGuidance("Set position along Z of Tungsten target dump front face."); + fSetTungstenFrontFaceZCmd->SetGuidance("Reference: center of magnet."); + fSetTungstenFrontFaceZCmd->SetParameterName("PosZ",false); + fSetTungstenFrontFaceZCmd->SetDefaultUnit("cm"); + fSetTungstenFrontFaceZCmd->SetRange("PosZ >= -85.5 && PosZ <= -57."); + fSetTungstenFrontFaceZCmd->AvailableForStates(G4State_PreInit,G4State_Idle); + +} + +TungstenMessenger::~TungstenMessenger() +{ + + delete fTungstenDetectorDir; + + delete fSetTungstenLengthCmd; + delete fSetTungstenFrontFaceZCmd; + +} + +void TungstenMessenger::SetNewValue(G4UIcommand* cmd, G4String par) +{ + + if ( cmd == fSetTungstenLengthCmd ) + fTungstenGeometry->SetTungstenSizeZ(fSetTungstenLengthCmd->GetNewDoubleValue(par)); + + if ( cmd == fSetTungstenFrontFaceZCmd ) + fTungstenGeometry->SetTungstenFrontFacePosZ(fSetTungstenFrontFaceZCmd->GetNewDoubleValue(par)); + +} diff --git a/PadmeMC/include/DetectorConstruction.hh b/PadmeMC/include/DetectorConstruction.hh index 284665ca..42a71267 100644 --- a/PadmeMC/include/DetectorConstruction.hh +++ b/PadmeMC/include/DetectorConstruction.hh @@ -27,6 +27,7 @@ class EVetoDetector; class HEPVetoDetector; class TDumpDetector; class TPixDetector; +class TungstenDetector; class MagnetStructure; class ChamberStructure; class HallStructure; @@ -90,15 +91,16 @@ private: G4GDMLParser fParser; - ECalDetector* fECalDetector; - TargetDetector* fTargetDetector; - SACDetector* fSACDetector; - PVetoDetector* fPVetoDetector; - EVetoDetector* fEVetoDetector; - HEPVetoDetector* fHEPVetoDetector; - TDumpDetector* fTDumpDetector; - TPixDetector* fTPixDetector; - LAVDetector* fLAVDetector; + ECalDetector* fECalDetector; + TargetDetector* fTargetDetector; + SACDetector* fSACDetector; + PVetoDetector* fPVetoDetector; + EVetoDetector* fEVetoDetector; + HEPVetoDetector* fHEPVetoDetector; + TDumpDetector* fTDumpDetector; + TPixDetector* fTPixDetector; + LAVDetector* fLAVDetector; + TungstenDetector* fTungstenDetector; MagnetStructure* fMagnetStructure; ChamberStructure* fChamberStructure; @@ -115,6 +117,7 @@ private: G4int fEnableHEPVeto; G4int fEnableTDump; G4int fEnableTPix; + G4int fEnableTungsten; G4int fEnableWall; G4int fEnableChamber; diff --git a/PadmeMC/src/DetectorConstruction.cc b/PadmeMC/src/DetectorConstruction.cc index 3478537a..8d4a9241 100644 --- a/PadmeMC/src/DetectorConstruction.cc +++ b/PadmeMC/src/DetectorConstruction.cc @@ -14,6 +14,7 @@ #include "TDumpDetector.hh" #include "TPixDetector.hh" #include "LAVDetector.hh" +#include "TungstenDetector.hh" #include "MagnetStructure.hh" #include "ChamberStructure.hh" @@ -73,31 +74,32 @@ DetectorConstruction::DetectorConstruction() fDetectorMessenger = new DetectorMessenger(this); - fECalDetector = new ECalDetector(0); - fTargetDetector = new TargetDetector(0); - fSACDetector = new SACDetector(0); - fLAVDetector = new LAVDetector(0); - fPVetoDetector = new PVetoDetector(0); - fEVetoDetector = new EVetoDetector(0); - fHEPVetoDetector = new HEPVetoDetector(0); - fTDumpDetector = new TDumpDetector(0); - fTPixDetector = new TPixDetector(0); - + fECalDetector = new ECalDetector(0); + fTargetDetector = new TargetDetector(0); + fSACDetector = new SACDetector(0); + fLAVDetector = new LAVDetector(0); + fPVetoDetector = new PVetoDetector(0); + fEVetoDetector = new EVetoDetector(0); + fHEPVetoDetector = new HEPVetoDetector(0); + fTDumpDetector = new TDumpDetector(0); + fTPixDetector = new TPixDetector(0); + fTungstenDetector = new TungstenDetector(0); fMagnetStructure = new MagnetStructure(0); fChamberStructure = new ChamberStructure(0); fHallStructure = new HallStructure(0); fMagneticFieldManager = new MagneticFieldSetup(); - fEnableECal = 1; - fEnableTarget = 1; - fEnableSAC = 1; - fEnableLAV = 1; - fEnablePVeto = 1; - fEnableEVeto = 1; - fEnableHEPVeto = 1; - fEnableTDump = 0; - fEnableTPix = 1; + fEnableECal = 1; + fEnableTarget = 1; + fEnableSAC = 1; + fEnableLAV = 1; + fEnablePVeto = 1; + fEnableEVeto = 1; + fEnableHEPVeto = 1; + fEnableTDump = 0; + fEnableTPix = 1; + fEnableTungsten = 0; fEnableWall = 0; fEnableMagnet = 1; @@ -132,6 +134,7 @@ DetectorConstruction::~DetectorConstruction() delete fHEPVetoDetector; delete fTDumpDetector; delete fTPixDetector; + delete fTungstenDetector; delete fMagnetStructure; delete fChamberStructure; delete fHallStructure; @@ -262,6 +265,13 @@ G4VPhysicalVolume* DetectorConstruction::Construct() logicMagneticVolumeCP->SetFieldManager(fMagneticFieldManager->GetLocalFieldManager(),true); } + // Tungsten target dump + if (fEnableTungsten) { + fTungstenDetector->SetMotherVolume(logicMagneticVolumeCP); + fTungstenDetector->SetTungstenDisplacePosZ(cpzPos.z()); // Take into account magnetic volume displacement + fTungstenDetector->CreateGeometry(); + } + // Concrete wall at large Z if (fEnableWall) { fHallStructure->SetMotherVolume(logicWorld); @@ -366,6 +376,7 @@ void DetectorConstruction::DefineMaterials() // Define materials already in the NIST database man->FindOrBuildMaterial("G4_C"); // Carbon (Chamber) + man->FindOrBuildMaterial("G4_W"); // Tungsten (Chamber) man->FindOrBuildMaterial("G4_Al"); // Aluminum (Chamber, Veto) man->FindOrBuildMaterial("G4_Fe"); // Iron (Magnet) man->FindOrBuildMaterial("G4_Cu"); // Copper (Magnet) @@ -407,9 +418,9 @@ void DetectorConstruction::DefineMaterials() // EJ510 reflective paint (ECal, SAC) G4Material* EJ510Paint = new G4Material("EJ510Paint",1.182*g/cm3,4); EJ510Paint->AddElement(G4Element::GetElement("Ti"),41.053*perCent); - EJ510Paint->AddElement(G4Element::GetElement("C"), 17.194*perCent); - EJ510Paint->AddElement(G4Element::GetElement("H"), 2.899*perCent); - EJ510Paint->AddElement(G4Element::GetElement("O"), 38.854*perCent); + EJ510Paint->AddElement(G4Element::GetElement("C"),17.194*perCent); + EJ510Paint->AddElement(G4Element::GetElement("H"),2.899*perCent); + EJ510Paint->AddElement(G4Element::GetElement("O"),38.854*perCent); /* //--------- Materials definition --------- @@ -613,6 +624,7 @@ void DetectorConstruction::EnableSubDetector(G4String det) else if (det=="HEPVeto") { fEnableHEPVeto = 1; } else if (det=="TDump") { fEnableTDump = 1; } else if (det=="TPix") { fEnableTPix = 1; } + else if (det=="Tungsten"){ fEnableTungsten= 1; } else { printf("WARNING: request to enable unknown subdetector %s\n",det.data()); } } @@ -628,24 +640,25 @@ void DetectorConstruction::DisableSubDetector(G4String det) else if (det=="HEPVeto") { fEnableHEPVeto = 0; } else if (det=="TDump") { fEnableTDump = 0; } else if (det=="TPix") { fEnableTPix = 0; } + else if (det=="Tungsten"){ fEnableTungsten= 0; } else { printf("WARNING: request to disable unknown subdetector %s\n",det.data()); } } void DetectorConstruction::EnableStructure(G4String str) { printf("Enabling structure %s\n",str.data()); - if (str=="Wall") { fEnableWall = 1; } + if (str=="Wall") { fEnableWall = 1; } else if (str=="Chamber") { fEnableChamber = 1; } - else if (str=="Magnet") { fEnableMagnet = 1; } + else if (str=="Magnet") { fEnableMagnet = 1; } else { printf("WARNING: request to enable unknown structure %s\n",str.data()); } } void DetectorConstruction::DisableStructure(G4String str) { printf("Disabling structure %s\n",str.data()); - if (str=="Wall") { fEnableWall = 0; } + if (str=="Wall") { fEnableWall = 0; } else if (str=="Chamber") { fEnableChamber = 0; } - else if (str=="Magnet") { fEnableMagnet = 0; } + else if (str=="Magnet") { fEnableMagnet = 0; } else { printf("WARNING: request to disable unknown structure %s\n",str.data()); } } diff --git a/PadmeMC/vis.mac b/PadmeMC/vis.mac index 829947bc..fa51fed2 100644 --- a/PadmeMC/vis.mac +++ b/PadmeMC/vis.mac @@ -46,6 +46,7 @@ #/Detector/EnableSubDetector HEPVeto #/Detector/EnableSubDetector TDump #/Detector/EnableSubDetector TPix +#/Detector/EnableSubDetector Tungsten #/Detector/EnableStructure Wall #/Detector/EnableStructure Magnet @@ -58,7 +59,8 @@ #/Detector/DisableSubDetector EVeto #/Detector/DisableSubDetector HEPVeto #/Detector/DisableSubDetector TDump -#/Detector/DisableSubDetector TPix +#/Detector/DisableSubDetector TPix +#/Detector/DisableSubDetector Tungsten #/Detector/DisableStructure Wall #/Detector/DisableStructure Magnet From e2f700d159a6d842e3d5fb273624b373827ee881 Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Wed, 4 Oct 2017 11:03:43 +0200 Subject: [PATCH 13/15] Added flanges to cross and junction pipes --- PadmeMC/Chamber/include/ChamberGeometry.hh | 15 +++++++ PadmeMC/Chamber/src/ChamberGeometry.cc | 7 ++++ PadmeMC/Chamber/src/ChamberStructure.cc | 48 +++++++++++++++++++--- PadmeMC/vis.mac | 2 +- 4 files changed, 66 insertions(+), 6 deletions(-) diff --git a/PadmeMC/Chamber/include/ChamberGeometry.hh b/PadmeMC/Chamber/include/ChamberGeometry.hh index 389eeef6..95ed5554 100644 --- a/PadmeMC/Chamber/include/ChamberGeometry.hh +++ b/PadmeMC/Chamber/include/ChamberGeometry.hh @@ -67,12 +67,18 @@ public: G4double GetCPZThick() { return fCPZThick; } G4double GetCPZLength() { return fCPZLength; } G4double GetCPZPosZ() { return fCPZPosZ; } + G4double GetCPZFlangeRIn() { return GetCPZROut(); } + G4double GetCPZFlangeROut() { return fCPZFlangeR; } + G4double GetCPZFlangeThick() { return fCPZFlangeThick; } G4double GetCPXRIn() { return fCPXRIn; } G4double GetCPXROut() { return fCPXRIn+fCPXThick; } G4double GetCPXThick() { return fCPXThick; } G4double GetCPXLength() { return fCPXLength; } G4double GetCPXPosZ() { return fCPXPosZ; } + G4double GetCPXFlangeRIn() { return GetCPXROut(); } + G4double GetCPXFlangeROut() { return fCPXFlangeR; } + G4double GetCPXFlangeThick() { return fCPXFlangeThick; } // Properties of junction pipe between cross and chamber @@ -81,6 +87,9 @@ public: G4double GetJunThick() { return fJunThick; } G4double GetJunLength() { return fJunLength; } G4double GetJunPosZ() { return fJunPosZ; } + G4double GetJunFlangeRIn() { return GetJunROut(); } + G4double GetJunFlangeROut() { return fJunFlangeR; } + G4double GetJunFlangeThick() { return fJunFlangeThick; } // Properties of porthole caps @@ -141,11 +150,15 @@ private: G4double fCPZThick; G4double fCPZLength; G4double fCPZPosZ; + G4double fCPZFlangeR; + G4double fCPZFlangeThick; G4double fCPXRIn; G4double fCPXThick; G4double fCPXLength; G4double fCPXPosZ; + G4double fCPXFlangeR; + G4double fCPXFlangeThick; // Junction pipe @@ -155,6 +168,8 @@ private: G4double fJunBackFacePosZ; G4double fJunLength; G4double fJunPosZ; + G4double fJunFlangeR; + G4double fJunFlangeThick; // Porthole caps diff --git a/PadmeMC/Chamber/src/ChamberGeometry.cc b/PadmeMC/Chamber/src/ChamberGeometry.cc index b29ae8c5..6cdca1a5 100644 --- a/PadmeMC/Chamber/src/ChamberGeometry.cc +++ b/PadmeMC/Chamber/src/ChamberGeometry.cc @@ -53,11 +53,16 @@ ChamberGeometry::ChamberGeometry() fCPZThick = 1.*cm; fCPZLength = 29.*cm; fCPZPosZ = -1.*m; + fCPZFlangeR = 76.*mm; + fCPZFlangeThick = 20.*mm; + fCPXRIn = 5.*cm; fCPXThick = 1.*cm; fCPXLength = 25.*cm; fCPXPosZ = -1.*m; + fCPXFlangeR = 76.*mm; + fCPXFlangeThick = 20.*mm; // Properties of junction pipe between cross and chamber @@ -67,6 +72,8 @@ ChamberGeometry::ChamberGeometry() fJunBackFacePosZ = -56.2*cm; // From vacuum chamber technical drawing fJunLength = fJunBackFacePosZ-fJunFrontFacePosZ; fJunPosZ = 0.5*(fJunBackFacePosZ+fJunFrontFacePosZ); + fJunFlangeR = 76.*mm; + fJunFlangeThick = 20.*mm; // Properties of porthole caps diff --git a/PadmeMC/Chamber/src/ChamberStructure.cc b/PadmeMC/Chamber/src/ChamberStructure.cc index 33b35e07..a4487bfe 100644 --- a/PadmeMC/Chamber/src/ChamberStructure.cc +++ b/PadmeMC/Chamber/src/ChamberStructure.cc @@ -179,16 +179,15 @@ void ChamberStructure::CreateTargetPipes() G4double cpzRIn = geo->GetCPZRIn(); G4double cpzROut = geo->GetCPZROut(); G4double cpzLen = geo->GetCPZLength(); - //G4Tubs* solidCPZe = new G4Tubs("CPZe",0.,cpzROut-1.*um,0.5*cpzLen-1.*um,0.*deg,360.*deg); - //G4Tubs* solidCPZi = new G4Tubs("CPZi",0.,cpzRIn,0.5*cpzLen+1.*mm,0.*deg,360.*deg); + G4double cpzPosZ = geo->GetCPZPosZ(); + G4Tubs* solidCPZe = new G4Tubs("CPZe",0.,cpzROut,0.5*cpzLen,0.*deg,360.*deg); G4Tubs* solidCPZi = new G4Tubs("CPZi",0.,cpzRIn,0.5*cpzLen+1.*mm,0.*deg,360.*deg); G4double cpxRIn = geo->GetCPXRIn(); G4double cpxROut = geo->GetCPXROut(); G4double cpxLen = geo->GetCPXLength(); - //G4Tubs* solidCPXe = new G4Tubs("CPXe",0.,cpxROut-1.*um,0.5*cpxLen-1.*um,0.*deg,360.*deg); - //G4Tubs* solidCPXi = new G4Tubs("CPXi",0.,cpxRIn,0.5*cpxLen+1.*mm,0.*deg,360.*deg); + G4Tubs* solidCPXe = new G4Tubs("CPXe",0.,cpxROut,0.5*cpxLen,0.*deg,360.*deg); G4Tubs* solidCPXi = new G4Tubs("CPXi",0.,cpxRIn,0.5*cpxLen+1.*mm,0.*deg,360.*deg); @@ -200,7 +199,34 @@ void ChamberStructure::CreateTargetPipes() G4SubtractionSolid* solidCP3 = new G4SubtractionSolid("VCCP3",solidCP2,solidCPXi,rotCPX,G4ThreeVector(0.,0.,0.)); G4LogicalVolume* logicalCP = new G4LogicalVolume(solidCP3,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"VCCP",0,0,0); logicalCP->SetVisAttributes(steelVisAttr); - new G4PVPlacement(0,G4ThreeVector(0.,0.,geo->GetCPZPosZ()),logicalCP,"CrossPipeSteel",fMotherVolume,false,0,true); + new G4PVPlacement(0,G4ThreeVector(0.,0.,cpzPosZ),logicalCP,"CrossPipeSteel",fMotherVolume,false,0,true); + + + // Create flanges for crossed pipe + + G4double flangezRIn = geo->GetCPZFlangeRIn(); + G4double flangezROut = geo->GetCPZFlangeROut(); + G4double flangezThick = geo->GetCPZFlangeThick(); + G4Tubs* solidFlangeZ = new G4Tubs("JunFlangeZ",flangezRIn,flangezROut,0.5*flangezThick,0.*deg,360.*deg); + G4LogicalVolume* logicalFlangeZ = new G4LogicalVolume(solidFlangeZ,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"JunFlangeZ",0,0,0); + logicalFlangeZ->SetVisAttributes(steelVisAttr); + G4double flangez0PosZ = cpzPosZ-0.5*cpzLen+0.5*flangezThick; + new G4PVPlacement(0,G4ThreeVector(0.,0.,flangez0PosZ),logicalFlangeZ,"CPZFlange",fMotherVolume,false,0,true); + G4double flangez1PosZ = cpzPosZ+0.5*cpzLen-0.5*flangezThick; + new G4PVPlacement(0,G4ThreeVector(0.,0.,flangez1PosZ),logicalFlangeZ,"CPZFlange",fMotherVolume,false,1,true); + + G4double flangexRIn = geo->GetCPXFlangeRIn(); + G4double flangexROut = geo->GetCPXFlangeROut(); + G4double flangexThick = geo->GetCPXFlangeThick(); + G4Tubs* solidFlangeX = new G4Tubs("JunFlangeX",flangexRIn,flangexROut,0.5*flangexThick,0.*deg,360.*deg); + G4LogicalVolume* logicalFlangeX = new G4LogicalVolume(solidFlangeX,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"JunFlangeX",0,0,0); + logicalFlangeX->SetVisAttributes(steelVisAttr); + G4double flangex0PosX = -0.5*cpxLen+0.5*flangexThick; + G4double flangex0PosZ = cpzPosZ; + new G4PVPlacement(rotCPX,G4ThreeVector(flangex0PosX,0.,flangex0PosZ),logicalFlangeX,"CPXFlange",fMotherVolume,false,0,true); + G4double flangex1PosX = +0.5*cpxLen-0.5*flangexThick; + G4double flangex1PosZ = cpzPosZ; + new G4PVPlacement(rotCPX,G4ThreeVector(flangex1PosX,0.,flangex1PosZ),logicalFlangeX,"CPXFlange",fMotherVolume,false,1,true); } @@ -226,6 +252,18 @@ void ChamberStructure::CreateJunctionPipe() printf("Junction pipe RIn %.1fmm Rout %.1fmm Zlen %.3fmm Zpos %.3fmm\n",junRIn/mm,junROut/mm,junLen/mm,junPosZ/mm); + // Add flanges + G4double flangeRIn = geo->GetJunFlangeRIn(); + G4double flangeROut = geo->GetJunFlangeROut(); + G4double flangeThick = geo->GetJunFlangeThick(); + G4Tubs* solidFlange = new G4Tubs("JunFlange",flangeRIn,flangeROut,0.5*flangeThick,0.*deg,360.*deg); + G4LogicalVolume* logicalFlange = new G4LogicalVolume(solidFlange,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"JunFlange",0,0,0); + logicalFlange->SetVisAttributes(steelVisAttr); + G4double flange0PosZ = junPosZ-0.5*junLen+0.5*flangeThick; + new G4PVPlacement(0,G4ThreeVector(0.,0.,flange0PosZ),logicalFlange,"JunctionFlange",fMotherVolume,false,0,true); + G4double flange1PosZ = junPosZ+0.5*junLen-0.5*flangeThick; + new G4PVPlacement(0,G4ThreeVector(0.,0.,flange1PosZ),logicalFlange,"JunctionFlange",fMotherVolume,false,1,true); + } void ChamberStructure::CreatePortholeCaps() diff --git a/PadmeMC/vis.mac b/PadmeMC/vis.mac index fa51fed2..c4d351e9 100644 --- a/PadmeMC/vis.mac +++ b/PadmeMC/vis.mac @@ -144,6 +144,7 @@ #/beam/n_e+_per_bunch 1 #/beam/n_e+_poisson_on false +#/beam/momentum 280. MeV #/beam/bunch_structure_on false #/beam/position_spread_on false #/beam/momentum_spread_on false @@ -152,7 +153,6 @@ #/Detector/DisableSubDetector Target ### Test for high energy/high field setup #/Detector/Magnet/MagneticFieldConstantValue -0.8 -#/beam/momentum 1. GeV # Beam setup From 8c42c0e67c07f3c319cf8a43c12578b5b60fda30 Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Tue, 10 Oct 2017 09:21:04 +0200 Subject: [PATCH 14/15] Changed name of cvmfs configuration file --- Configure/{padme_init_grid.sh => padme_init_cvmfs.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Configure/{padme_init_grid.sh => padme_init_cvmfs.sh} (100%) diff --git a/Configure/padme_init_grid.sh b/Configure/padme_init_cvmfs.sh similarity index 100% rename from Configure/padme_init_grid.sh rename to Configure/padme_init_cvmfs.sh From af196eb05fba42ab41a39f5ce7308ddf6b7c00a7 Mon Sep 17 00:00:00 2001 From: Emanuele Leonardi Date: Tue, 10 Oct 2017 09:40:32 +0200 Subject: [PATCH 15/15] Added decorations to vis.mac --- PadmeMC/vis.mac | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PadmeMC/vis.mac b/PadmeMC/vis.mac index c4d351e9..ddf3dfc7 100644 --- a/PadmeMC/vis.mac +++ b/PadmeMC/vis.mac @@ -252,7 +252,16 @@ # # Draw coordinate axes: /vis/scene/add/axes 0 0 0 1 m -# + +# Decorations +/vis/set/textColour green +/vis/set/textLayout right +/vis/scene/add/text2D 0.9 -.9 24 ! ! PadmeMC +/vis/set/textLayout # Revert to normal (left adjusted) layout +/vis/set/textColour # Revert to default text colour (blue) +/vis/scene/add/eventID # Drawn at end of event +/vis/scene/add/date # Date stamp + # Draw smooth trajectories at end of event, showing trajectory points # as markers 2 pixels wide: /vis/scene/add/trajectories smooth