diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 34c38be187bfccbf3bfcde5cd11c003a05763076..d53606322f5b8e39b1e418b25727468fc0a7747a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ build_image: - mkdir build - cd build - set +e && source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh; set -e - - set +e && asetup --input=../../calypso/asetup.faser Athena,22.0.19; set -e + - set +e && asetup --input=../../calypso/asetup.faser Athena,22.0.29; set -e - cmake ../../calypso - make -j 3 artifacts: @@ -41,7 +41,7 @@ test_unittest: - yum -y install man - cd build - set +e && source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh; set -e - - set +e && asetup --input=../../calypso/asetup.faser Athena,22.0.19; set -e + - set +e && asetup --input=../../calypso/asetup.faser Athena,22.0.29; set -e - set +e && source `find . -name 'setup.sh'`; set -e - ctest -j12 dependencies: diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000000000000000000000000000000000000..0653a28ac6ecf2e00d3ae1d0f2f95b5c55013ebe --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [], + "compilerPath": "/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/gcc", + "cStandard": "c99", + "cppStandard": "c++17", + "intelliSenseMode": "clang-x64", + "compileCommands": "${workspaceFolder}/build/compile_commands.json" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CMakeLists.txt b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..e26cd740995590e3dc3fc5594376f03992cab430 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CMakeLists.txt @@ -0,0 +1,22 @@ +################################################################################ +# Package: CaloGeoModelUtils +################################################################################ + +# Declare the package name: +atlas_subdir( CaloGeoModelUtils ) + +# External dependencies: +find_package( Boost COMPONENTS filesystem thread system ) +find_package( CLHEP ) +find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( GeoModel ) + +# Component(s) in the package: +atlas_add_library( CaloGeoModelUtils + src/*.cxx + PUBLIC_HEADERS CaloGeoModelUtils + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + DEFINITIONS ${CLHEP_DEFINITIONS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GaudiKernel RDBAccessSvcLib StoreGateLib SGtests GeoModelFaserUtilities GeoModelInterfaces GeoPrimitives GeometryDBSvcLib + PRIVATE_LINK_LIBRARIES GeoModelFaserUtilities ) + diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/CaloDDAthenaComps.h b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/CaloDDAthenaComps.h new file mode 100644 index 0000000000000000000000000000000000000000..c77e23c9e0b55c3ca99c5e8a832d456860da8873 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/CaloDDAthenaComps.h @@ -0,0 +1,76 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CaloGeoModelUtils_CaloDDAthenaComps_H +#define CaloGeoModelUtils_CaloDDAthenaComps_H + +// Message Stream Member +#include "AthenaKernel/MsgStreamMember.h" +class StoreGateSvc; +class IGeoDbTagSvc; +class IRDBAccessSvc; +class IGeometryDBSvc; + +#include <string> +namespace CaloDD { + +/// Class to hold various Athena components. +class AthenaComps { + +public: + + AthenaComps(const std::string & msgStreamName); + + //Declaring the Message method for further use + MsgStream& msg (MSG::Level lvl) const { return m_msg << lvl; } + + //Declaring the Method providing Verbosity Level + bool msgLvl (MSG::Level lvl) const { return m_msg.get().level() <= lvl; } + + void setDetStore(StoreGateSvc *); + void setGeoDbTagSvc(IGeoDbTagSvc *); + void setRDBAccessSvc(IRDBAccessSvc *); + void setGeometryDBSvc(IGeometryDBSvc *); + + StoreGateSvc * detStore() const; + IGeoDbTagSvc * geoDbTagSvc() const; + IRDBAccessSvc * rdbAccessSvc() const; + IGeometryDBSvc * geomDB() const; + +private: + //Declaring private message stream member. + mutable Athena::MsgStreamMember m_msg; + + StoreGateSvc * m_detStore; + IGeoDbTagSvc * m_geoDbTagSvc; + IRDBAccessSvc * m_rdbAccessSvc; + IGeometryDBSvc * m_geometryDBSvc; + +}; + +inline StoreGateSvc * AthenaComps::detStore() const +{ + return m_detStore; +} + +inline IGeoDbTagSvc * AthenaComps::geoDbTagSvc() const +{ + return m_geoDbTagSvc; +} + +inline IRDBAccessSvc * AthenaComps::rdbAccessSvc() const +{ + return m_rdbAccessSvc; +} + +inline IGeometryDBSvc * AthenaComps::geomDB() const +{ + return m_geometryDBSvc; +} + +} // endnamespace + +#endif // CaloGeoModelUtils_CaloDDAthenaComps_H + + diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/CaloMaterialManager.h b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/CaloMaterialManager.h new file mode 100644 index 0000000000000000000000000000000000000000..687c22bad9af1785b3d382c5acd76e174c2137cf --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/CaloMaterialManager.h @@ -0,0 +1,244 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOMATERIALMANAGER_H +#define CALOMATERIALMANAGER_H + +// Message Stream Member +#include "AthenaKernel/MsgStreamMember.h" +#include "RDBAccessSvc/IRDBAccessSvc.h" + +class GeoMaterial; +class GeoElement; +class AbsMaterialManager; +class StoreGateSvc; +class IGeometryDBSvc; + +namespace CaloDD +{ + class AthenaComps; +} + +#include <string> +#include <map> + +/// CaloMaterialManager. This provides an interface to the GeoModel Material Manager +/// as well as allowing additional materials to be defined or standard ones redefined. +/// It also allows creating new materials based on existing ones but with a different +/// density. It is also possible to specify a weight table and this is used to create +/// materials with a density such that the the total weight is correct. + + +class CaloMaterialManager +{ + +public: + + CaloMaterialManager(const std::string & managerName, StoreGateSvc* detStore); + CaloMaterialManager(const std::string & managerName, StoreGateSvc* detStore, + IRDBRecordset_ptr weightTable, + const std::string & space = "", + bool extraFunctionality = false); + CaloMaterialManager(const std::string & managerName, StoreGateSvc* detStore, + IRDBRecordset_ptr weightTable, + IRDBRecordset_ptr compositionTable, + const std::string & space = ""); + CaloMaterialManager(const std::string & managerName, + const CaloDD::AthenaComps *); + ~CaloMaterialManager(); + + void addWeightTable(IRDBRecordset_ptr weightTable, const std::string & space = ""); + void addWeightMaterial(std::string materialName, std::string materialBase, double weight, int linearWeightFlag); + void addCompositionTable(IRDBRecordset_ptr compositionTable, const std::string & space = ""); + void addScalingTable(IRDBRecordset_ptr scalingTable); + + + bool hasMaterial(const std::string &materialName) const; + + /// Get material. First looks for locally defined material and if not found looks in GeoModel material manager. + const GeoMaterial* getMaterial(const std::string & materialName); + + /// Get element from GeoModel material manager + const GeoElement* getElement(const std::string & elementName) const; + + /// Create and get material with a specified density based on an existing material. + /// If a newName is supplied it creates the new material even if the orginal material + /// has the same density. It however first checks if the material with NewName exists. + /// If no newName is supplied then it checks the density of + /// the existing material. If it is consistent it returns the material. + /// If it is different it creates a material with the string "Modified" added to the + /// name. + const GeoMaterial* getMaterial(const std::string & origMaterialName, + double density, + const std::string & newName = ""); + + // Creates a new material based on origMaterialName but with denisty scaled + // by scaleFactor. If no newName then will add the string containing the scale + // factor. Eg if scale 12.345678 "Silicon" -> "Silicon12_3456" + // If the scale factor is 1 and there is no newName then it just returns the + // original material. + // scaleFactor must be between 0.001 and 1000. + const GeoMaterial* getMaterialScaled(const std::string & origMaterialName, + double scaleFactor, + const std::string & newName = ""); + + /// Create and get material with a density calculated to give weight in predefined weight table. + const GeoMaterial * getMaterialForVolume(const std::string & materialName, + double volume, + const std::string & newName = ""); + + // Similar to getMaterialForVolume but if weight table uses linear weight, then determine weight + // using length. First looks in special table of material compositions which can specify several + // components and their count. + const GeoMaterial * getMaterialForVolumeLength(const std::string & materialName, + double volume, + double length, + const std::string & newName = ""); + + // As above but rather than using the special table of material compositions, the compositions is specified + // in the arguments as a vector of materials and multiplictive factors. + const GeoMaterial * getMaterialForVolumeLength(const std::string & name, + const std::vector<std::string> & materialComponents, + const std::vector<double> factors, + double volume, + double length); + + // As above but only one material making up the composition. + const GeoMaterial * getMaterialForVolumeLength(const std::string & name, + const std::string & materialComponent, + double factor, + double volume, + double length); + + // Define composite material : function used to create dynamically a new composite material by adding + // a defined volume of glue/grease to an already existing material (IBL stave) + const GeoMaterial * getCompositeMaterialForVolume(const std::string & newMatName, + const double volumeTot, + const double volume1, const std::string & matName1, + const double volume2, const std::string & matName2 + ); + + // Define a new material composition. + const GeoMaterial * getMaterial(const std::string & name, + const std::vector<std::string> & materialComponents, + const std::vector<double> & fractWeights, + double density); + + + /// Add material + void addMaterial(GeoMaterial *material); + + //Declaring the Message method for further use + MsgStream& msg (MSG::Level lvl) const { return m_msg << lvl; } + + //Declaring the Method providing Verbosity Level + bool msgLvl (MSG::Level lvl){ return m_msg.get().level() <= lvl; } + + +private: + + class MaterialByWeight { + public: + MaterialByWeight() : weight(0), linearWeightFlag(false) {} + MaterialByWeight(const std::string & name_in, double weight_in, bool linearWeightFlag_in) + : name(name_in), weight(weight_in), linearWeightFlag(linearWeightFlag_in) {} + MaterialByWeight(double weight_in) + : weight(weight_in), linearWeightFlag(false) {} + std::string name; + double weight; + bool linearWeightFlag; + }; + + class MaterialComponent { + public: + MaterialComponent() : factor(1), actualLength(-1) {} + MaterialComponent(const std::string & name_in, double factor_in = 1, bool actualLength_in = -1) + : name(name_in), factor(factor_in), actualLength(actualLength_in) {} + std::string name; + double factor; + double actualLength; + }; + + /// Class to hold information need to create a material + class MaterialDef { + public: + MaterialDef(); + MaterialDef(const std::string & name, double density); + void addComponent(const std::string & compName, double fraction); + void setCreated() {m_created = true;} + unsigned int numComponents() const {return m_components.size();} + bool isCreated() const {return m_created;} + const std::string & name() const {return m_name;} + double density() const {return m_density;} + const std::string & compName(unsigned int i) const {return m_components[i];} + double fraction(unsigned int i) const {return m_fractions[i];} + double totalFraction() const; + + private: + std::string m_name; + double m_density; + std::vector<std::string> m_components; + std::vector<double> m_fractions; + bool m_created; + }; + + + const AbsMaterialManager * retrieveManager(StoreGateSvc* detStore); + const GeoMaterial* getAdditionalMaterial(const std::string & materialName) const; + bool compareDensity(double d1, double d2) const; + void addWeightTableOld(IRDBRecordset_ptr weightTable, const std::string & space); + + // Internal versions. The public versions allow materials to be have extra scaling. + const GeoMaterial* getMaterialInternal(const std::string & materialName) const; + const GeoMaterial* getMaterialInternal(const std::string & origMaterialName, + double density, + const std::string & newName = ""); + const GeoMaterial* getMaterialScaledInternal(const std::string & origMaterialName, + double scaleFactor, + const std::string & newName = ""); + const GeoMaterial * getMaterialInternal(const std::string & name, + const std::vector<std::string> & materialComponents, + const std::vector<double> & fractWeights, + double density); + + // Methods to return material with extra scaling. + const GeoMaterial * extraScaledMaterial(const std::string & materialName, + const std::string & newName, + const GeoMaterial * origMaterial); + + const GeoMaterial * extraScaledMaterial(const std::string & materialName, + const GeoMaterial * origMaterial); + + const IGeometryDBSvc * db(); + void addTextFileMaterials(); + void createMaterial(const MaterialDef & material); + double getExtraScaleFactor(const std::string & materialName); + + const AbsMaterialManager *m_materialManager; + std::string m_managerName; + + typedef std::map<std::string, const GeoMaterial *> MaterialStore; + MaterialStore m_store; + + typedef std::map<std::string, MaterialByWeight > MaterialWeightMap; + MaterialWeightMap m_weightMap; + + typedef std::map<std::string, MaterialComponent > MaterialCompositionMap; + MaterialCompositionMap m_matCompositionMap; + + typedef std::map<std::string, double > ExtraScaleFactorMap; + ExtraScaleFactorMap m_scalingMap; + + //Declaring private message stream member. + mutable Athena::MsgStreamMember m_msg; + + // Has linear weight flag. + bool m_extraFunctionality; + + const CaloDD::AthenaComps * m_athenaComps; + +}; + + +#endif // CALOMATERIALMANAGER_H diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/DetectorFactoryBase.h b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/DetectorFactoryBase.h new file mode 100644 index 0000000000000000000000000000000000000000..a344e26685a98e0479a933c26920e8683e961459 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/DetectorFactoryBase.h @@ -0,0 +1,51 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CaloGeoModelUtils_DetectorFactoryBase_H +#define CaloGeoModelUtils_DetectorFactoryBase_H + +#include "AthenaKernel/MsgStreamMember.h" +#include "GeoModelKernel/GeoVDetectorFactory.h" +#include "CaloGeoModelUtils/CaloDDAthenaComps.h" + +class StoreGateSvc; +class IGeoDbTagSvc; +class IRDBAccessSvc; + +namespace CaloDD { + +class DetectorFactoryBase : public GeoVDetectorFactory +{ + +public: + DetectorFactoryBase(const CaloDD::AthenaComps * athenaComps) + : m_athenaComps(athenaComps) + {} + + StoreGateSvc * detStore() const {return m_athenaComps->detStore();} + + IGeoDbTagSvc * geoDbTagSvc() const {return m_athenaComps->geoDbTagSvc();} + + IRDBAccessSvc * rdbAccessSvc() const {return m_athenaComps->rdbAccessSvc();} + + IGeometryDBSvc * geomDB() const {return m_athenaComps->geomDB();} + + //Declaring the Message method for further use + MsgStream& msg (MSG::Level lvl) const { return m_athenaComps->msg(lvl); } + + //Declaring the Method providing Verbosity Level + bool msgLvl (MSG::Level lvl) const { return m_athenaComps->msgLvl(lvl); } + + const CaloDD::AthenaComps * getAthenaComps() {return m_athenaComps;} + +private: + + const CaloDD::AthenaComps * m_athenaComps; + +}; + +} // end namespace + +#endif // CaloGeoModelUtils_DetectorFactoryBase_H + diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/DistortedMaterialManager.h b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/DistortedMaterialManager.h new file mode 100644 index 0000000000000000000000000000000000000000..b4776df272815d6b407f4e52f43f50c1d970aa01 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/DistortedMaterialManager.h @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CaloGeoModelUtils_DistortedMaterialManager_h +#define CaloGeoModelUtils_DistortedMaterialManager_h + +class AbsMaterialManager; +#include "RDBAccessSvc/IRDBAccessSvc.h" + +namespace CaloDD { + +class DistortedMaterialManager +{ +public: + DistortedMaterialManager(); + IRDBRecordset_ptr extraMaterialTable() const {return m_xMatTable;} + const AbsMaterialManager * materialManager() const {return m_materialManager;} + +private: + const AbsMaterialManager * m_materialManager; + IRDBRecordset_ptr m_xMatTable; +}; + + +} // endnamespace + +#endif // CaloGeoModelUtils_DistortedMaterialManager_h diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/ExtraMaterial.h b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/ExtraMaterial.h new file mode 100644 index 0000000000000000000000000000000000000000..58bf0fba525e0bb547c460abc17a1ab3c93598e8 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/ExtraMaterial.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CaloGeoModelUtils_ExtraMaterial +#define CaloGeoModelUtils_ExtraMaterial + +#include <cmath> +#include <string> +#include <sstream> +#include "RDBAccessSvc/IRDBAccessSvc.h" + +class GeoPhysVol; +class GeoFullPhysVol; +class AbsMaterialManager; + +namespace CaloDD { + +class DistortedMaterialManager; + +class ExtraMaterial +{ +public: + ExtraMaterial(IRDBRecordset_ptr xMatTable, const AbsMaterialManager * matManager); + ExtraMaterial(const CaloDD::DistortedMaterialManager * manager); + void add(GeoPhysVol * parent, const std::string & parentName, double zPos = 0); + void add(GeoFullPhysVol * parent, const std::string & parentName, double zPos = 0); + +private: + void add(GeoPhysVol * parent, GeoFullPhysVol * fullparent, const std::string & parentName, double zPos); + IRDBRecordset_ptr m_xMatTable; + const AbsMaterialManager * m_matManager; +}; + +} // end namespace + +#endif // CaloGeoModelUtils_ExtraMaterial diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/GenericTubeMaker.h b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/GenericTubeMaker.h new file mode 100644 index 0000000000000000000000000000000000000000..edaf04723570705e40d04ac4b1689df4d916a4a3 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/GenericTubeMaker.h @@ -0,0 +1,55 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CaloGeoModelUtils_GenericTubeMaker_h +#define CaloGeoModelUtils_GenericTubeMaker_h + +#include "CaloGeoModelUtils/TubeVolData.h" +#include <string> + +class GeoVPhysVol; +class GeoPhysVol; +class GeoFullPhysVol; +class GeoShape; +class IRDBRecord; + +/// Helper class to make general tubes used mainly for services. +/// Takes as input a DB table which has the following columns +/// Handles numberouse cases +/// Simple tubes: Rmin2, Rmax2 <=0. +/// Cones: Uses Rmin2 and Rmax2. +/// Tube and cone sectors: Uses phi start and phi delta. +/// If RadialDiv > 0 then simulates the CLHEP::radial dependence of tubes/cables going outward CLHEP::radially. +/// + +namespace CaloDD { + +class GenericTubeMaker +{ +public: + GenericTubeMaker(const IRDBRecord *); + const TubeVolData & volData() const {return m_volData;} + std::string name() const; + std::string materialName() const; + const GeoShape * buildShape(); + void placeVolume(GeoPhysVol * parent, GeoVPhysVol * child, double zParent = 0); + void placeVolume(GeoFullPhysVol * fullparent, GeoVPhysVol * child, double zParent = 0); + void placeVolTwoSide(GeoPhysVol * parentPos, GeoPhysVol * parentNeg, GeoVPhysVol * child, double zParent = 0); + void placeVolTwoSide(GeoFullPhysVol * fullparentPos, GeoFullPhysVol * fullparentNeg, GeoVPhysVol * child, double zParent = 0); + + +private: + + void placeVolume(GeoPhysVol * parent, GeoFullPhysVol * fullparent, GeoVPhysVol * child, double zParent); + void placeVolTwoSide(GeoPhysVol * parentPos, GeoPhysVol * parentNeg, + GeoFullPhysVol * fullparentPos, GeoFullPhysVol * fullparentNeg, + GeoVPhysVol * child, double zParent); + + const IRDBRecord * m_record; + TubeVolData m_volData; +}; + +} // end namespace + +#endif // CaloGeoModelUtils_GenericTubeMaker_h diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/TopLevelPlacements.h b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/TopLevelPlacements.h new file mode 100644 index 0000000000000000000000000000000000000000..363cd3a1bdb17acb499d2c98e7b32b472b5f0f7f --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/TopLevelPlacements.h @@ -0,0 +1,47 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOGEOMODELUTILS_TOPLEVELPLACEMENTS_H +#define CALOGEOMODELUTILS_TOPLEVELPLACEMENTS_H + +#include "RDBAccessSvc/IRDBAccessSvc.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" + +#include <map> +#include <string> + +class IRDBRecord; + +class TopLevelPlacements +{ + +public: + + TopLevelPlacements(IRDBRecordset_ptr topLevelTable); + ~TopLevelPlacements(); + + bool present(const std::string & partName) const; + const GeoTrf::Transform3D & transform(const std::string & partName) const; + + +private: + + class Part { + public: + std::string label; + GeoTrf::Transform3D transform; + }; + + void fillPlacements(IRDBRecordset_ptr topLevelTable); + GeoTrf::Transform3D partTransform(const IRDBRecord* record) const; + Part * getPart(const std::string & partName) const; + + std::map<std::string, Part *> m_parts; + bool m_noTopLevelTable; + + static GeoTrf::Transform3D s_identityTransform; +}; + +#endif // CALOGEOMODELUTILS_TOPLEVELPLACEMENTS_H diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/TubeVolData.h b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/TubeVolData.h new file mode 100644 index 0000000000000000000000000000000000000000..53a809be6687537dbc00372b020fec8fd7f9bdc7 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/CaloGeoModelUtils/TubeVolData.h @@ -0,0 +1,59 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CaloGeoModelUtils_TubeVolData_h +#define CaloGeoModelUtils_TubeVolData_h + +class IRDBRecord; +#include <string> + +namespace CaloDD { + + +/// Helper class to read in generic TUBE, TUBS, CONS or PCON type volumes. + +class TubeVolData +{ + public: + enum VolShape {TUBE, TUBS, CONS, RADIAL}; + + TubeVolData(const IRDBRecord *); + double rmin() const {return m_rmin1;} + double rmax() const {return m_rmax1;} + double rmin2() const {return m_rmin2;} + double rmax2() const {return m_rmax2;} + double length() const {return m_length;} + double zMid() const {return m_zMid;} + double phiStart() const {return m_phiStart;} + double phiDelta() const {return m_phiDelta;} + double phiStep() const {return m_phiStep;} + int nRepeat() const {return m_nRepeat;} + int radialDivisions() const {return m_radialDiv;} + bool bothZ() const {return m_bothZ;} + + VolShape shape() const {return m_shape;} + std::string material() const; + + double maxRadius() const; + + private: + const IRDBRecord * m_record; + bool m_bothZ; + int m_nRepeat; + int m_radialDiv; + double m_phiStart; + double m_phiDelta; + double m_phiStep; + double m_rmin1; + double m_rmin2; + double m_rmax1; + double m_rmax2; + double m_length; + double m_zMid; + VolShape m_shape{CONS}; +}; + +} // end namespace + +#endif // CaloGeoModelUtils_TubeVolData diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/CaloDDAthenaComps.cxx b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/CaloDDAthenaComps.cxx new file mode 100644 index 0000000000000000000000000000000000000000..969b5832ae02f1d73223447bae3536a121a97608 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/CaloDDAthenaComps.cxx @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + */ + +#include "CaloGeoModelUtils/CaloDDAthenaComps.h" + +namespace CaloDD { + AthenaComps::AthenaComps(const std::string& msgStreamName) + : m_msg(msgStreamName), + m_detStore(0), + m_geoDbTagSvc(0), + m_rdbAccessSvc(0), + m_geometryDBSvc(0) + {} + + void + AthenaComps::setDetStore(StoreGateSvc* detStore) { + m_detStore = detStore; + } + + void + AthenaComps::setGeoDbTagSvc(IGeoDbTagSvc* geoDbTagSvc) { + m_geoDbTagSvc = geoDbTagSvc; + } + + void + AthenaComps::setRDBAccessSvc(IRDBAccessSvc* rdbAccessSvc) { + m_rdbAccessSvc = rdbAccessSvc; + } + + void + AthenaComps::setGeometryDBSvc(IGeometryDBSvc* geometryDBSvc) { + m_geometryDBSvc = geometryDBSvc; + } +} diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/CaloMaterialManager.cxx b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/CaloMaterialManager.cxx new file mode 100644 index 0000000000000000000000000000000000000000..5f00bbd3218249488c9d1c9daba5c3c65570887d --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/CaloMaterialManager.cxx @@ -0,0 +1,1042 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + */ + +#include "CaloGeoModelUtils/CaloMaterialManager.h" +#include "CaloGeoModelUtils/CaloDDAthenaComps.h" +#include "GeoModelInterfaces/AbsMaterialManager.h" +#include "GeoModelInterfaces/StoredMaterialManager.h" +#include "GeoModelKernel/GeoMaterial.h" +#include "GeoModelKernel/GeoElement.h" +#include "GeoModelKernel/Units.h" +#include "GaudiKernel/SystemOfUnits.h" +#include "RDBAccessSvc/IRDBRecordset.h" +#include "RDBAccessSvc/IRDBRecord.h" +#include "GeometryDBSvc/IGeometryDBSvc.h" +#include "StoreGate/StoreGateSvc.h" + +#include <iostream> +#include <iomanip> +#include <cmath> +#include <stdexcept> + +// Constructor +CaloMaterialManager::CaloMaterialManager(const std::string& managerName, + StoreGateSvc* detStore) + : m_managerName(managerName), + m_msg(managerName), + m_extraFunctionality(false), + m_athenaComps(0) { + m_materialManager = retrieveManager(detStore); +} + +// Constructor +CaloMaterialManager::CaloMaterialManager(const std::string& managerName, + StoreGateSvc* detStore, + IRDBRecordset_ptr weightTable, + const std::string& space, + bool extraFunctionality) + : m_managerName(managerName), + m_msg(managerName), + m_extraFunctionality(extraFunctionality), + m_athenaComps(0) { + m_materialManager = retrieveManager(detStore); + + if (weightTable) addWeightTable(weightTable, space); + + // For testing we add a few materials. + //m_weightMap["veto::CoolingBlock"] = MaterialByWeight(2.418*CLHEP::gram); + //m_weightMap["veto::CoolingBlock"] = MaterialByWeight(2*CLHEP::gram); + //m_weightMap["veto::BrlHybrid"] = MaterialByWeight("veto::Hybrid", 8*CLHEP::gram); + //m_weightMap["veto::FwdHybrid"] = MaterialByWeight("std::Carbon", 7.662*CLHEP::gram); +} + +CaloMaterialManager::CaloMaterialManager(const std::string& managerName, StoreGateSvc* detStore, + IRDBRecordset_ptr weightTable, + IRDBRecordset_ptr compositionTable, + const std::string& space) + : m_managerName(managerName), + m_msg(managerName), + m_extraFunctionality(true), + m_athenaComps(0) { + m_materialManager = retrieveManager(detStore); + + if (weightTable) addWeightTable(weightTable, space); + if (compositionTable) addCompositionTable(compositionTable, space); +} + +CaloMaterialManager::CaloMaterialManager(const std::string& managerName, + const CaloDD::AthenaComps* athenaComps) + : m_managerName(managerName), + m_msg(managerName), + m_extraFunctionality(true), + m_athenaComps(athenaComps) { + m_materialManager = retrieveManager(athenaComps->detStore()); + addTextFileMaterials(); +} + +CaloMaterialManager::~CaloMaterialManager() { + // Dereference the materials. + MaterialStore::const_iterator iter; + for (iter = m_store.begin(); iter != m_store.end(); ++iter) { + iter->second->unref(); + } +} + +const AbsMaterialManager* +CaloMaterialManager::retrieveManager(StoreGateSvc* detStore) { + const StoredMaterialManager* theGeoMaterialManager = nullptr; + + if (StatusCode::SUCCESS != detStore->retrieve(theGeoMaterialManager, "MATERIALS")) { + msg(MSG::FATAL) << "Cannot locate Materials"; + } + + return theGeoMaterialManager; +} + +const GeoElement* +CaloMaterialManager::getElement(const std::string& elementName) const { + return m_materialManager->getElement(elementName); +} + +const GeoMaterial* +CaloMaterialManager::getMaterial(const std::string& materialName) { + return extraScaledMaterial(materialName, getMaterialInternal(materialName)); +} + +bool +CaloMaterialManager::hasMaterial(const std::string& materialName) const { + return m_store.find(materialName) != m_store.end(); +} + +const GeoMaterial* +CaloMaterialManager::getMaterialInternal(const std::string& materialName) const { + // First check local store of materials. If not found then get it from the GeoModel + // manager. + const GeoMaterial* material = getAdditionalMaterial(materialName); + + if (!material) { + // This prints error message if not found. + material = m_materialManager->getMaterial(materialName); + } + return material; +} + +const GeoMaterial* +CaloMaterialManager::getAdditionalMaterial(const std::string& materialName) const { + MaterialStore::const_iterator iter; + if ((iter = m_store.find(materialName)) != m_store.end()) { + return iter->second; + } else { + return 0; + } +} + +const GeoMaterial* +CaloMaterialManager::getCompositeMaterialForVolume(const std::string& newMatName, + const double volumeTot, + const double volume1, const std::string& matName1, + const double volume2, const std::string& matName2 + ) { + std::vector<std::string> baseMaterials; + std::vector<double> fracWeight; + baseMaterials.reserve(2); + fracWeight.reserve(2); + + msg(MSG::DEBUG) << "Composite material : " << volumeTot / Gaudi::Units::cm3 << " = " << volume1 / Gaudi::Units::cm3 << " + " << + volume2 / Gaudi::Units::cm3 << endmsg; + msg(MSG::DEBUG) << "Composite material : " << matName1 << " " << matName2 << endmsg; + + double density1, density2; + + MaterialWeightMap::const_iterator iter; + if ((iter = m_weightMap.find(matName1)) != m_weightMap.end()) { + const GeoMaterial* mat1 = getMaterialForVolume(matName1, volume1); + density1 = mat1->getDensity(); + msg(MSG::DEBUG) << "Composite material 1 - weight : " << density1 / (GeoModelKernelUnits::gram / Gaudi::Units::cm3) << endmsg; + } else { + const GeoMaterial* mat1 = getMaterial(matName1); + density1 = mat1->getDensity(); + msg(MSG::DEBUG) << "Composite material 1 - standard : " << density1 / (GeoModelKernelUnits::gram / Gaudi::Units::cm3) << endmsg; + } + + if ((iter = m_weightMap.find(matName2)) != m_weightMap.end()) { + const GeoMaterial* mat2 = getMaterialForVolume(matName2, volume2); + density2 = mat2->getDensity(); + msg(MSG::DEBUG) << "Composite material 2 - weight : " << density2 / (GeoModelKernelUnits::gram / Gaudi::Units::cm3) << endmsg; + } else { + const GeoMaterial* mat2 = getMaterial(matName2); + density2 = mat2->getDensity(); + msg(MSG::DEBUG) << "Composite material 2 - standard : " << density2 / (GeoModelKernelUnits::gram / Gaudi::Units::cm3) << endmsg; + } + + double weight1 = density1 * volume1; + double weight2 = density2 * volume2; + double invWeightTot = 1.0 / (weight1 + weight2); + + double density = (weight1 + weight2) / volumeTot; + + double frac1 = weight1 / (weight1 + weight2); + double frac2 = weight2 / (weight1 + weight2); + double density_2 = 1.0 / (frac1 / density1 + frac2 / density2); + double density_3 = (weight1 + weight2) / (volume1 + volume2); + msg(MSG::DEBUG) << "-> weights : " << weight1 / (GeoModelKernelUnits::gram) << " " << weight2 / (GeoModelKernelUnits::gram) << endmsg; + msg(MSG::DEBUG) << "-> density : " << density / (GeoModelKernelUnits::gram / Gaudi::Units::cm3) << " " << density_2 / + (GeoModelKernelUnits::gram / Gaudi::Units::cm3) << " " << density_3 / (GeoModelKernelUnits::gram / Gaudi::Units::cm3) << endmsg; + + + baseMaterials.push_back(matName1); + baseMaterials.push_back(matName2); + fracWeight.push_back(weight1 * invWeightTot); + fracWeight.push_back(weight2 * invWeightTot); + + return getMaterial(newMatName, baseMaterials, fracWeight, density); +} + +// This creates a new material with specified density. + +// If a newName is supplied it creates the new material even if the orginal material +// has the same density. It however first checks if the material with NewName exists. + +// If no new name is supplied then it checks the density of +// the existing material. If it is consistent it returns the material. +// If it is different it creates a material with the string "Modified" added to the +// name. + + +const GeoMaterial* +CaloMaterialManager::getMaterial(const std::string& origMaterialName, + double density, + const std::string& newName) { + return extraScaledMaterial(origMaterialName, newName, + getMaterialInternal(origMaterialName, density, newName)); +} + +const GeoMaterial* +CaloMaterialManager::getMaterialInternal(const std::string& origMaterialName, + double density, + const std::string& newName) { + std::string newName2 = newName; + bool newNameProvided = !newName2.empty(); + if (!newNameProvided) { + newName2 = origMaterialName + "Modified"; + } + + const GeoMaterial* newMaterial = 0; + + // First see if we already have the modified material + const GeoMaterial* material = getAdditionalMaterial(newName2); + if (material) { + if (!compareDensity(material->getDensity(), density)) { + msg(MSG::WARNING) << "Density is not consistent for material " << newName2 + << " " << material->getDensity() / (GeoModelKernelUnits::gram / Gaudi::Units::cm3) + << " / " << density / (GeoModelKernelUnits::gram / Gaudi::Units::cm3) << endmsg; + } + newMaterial = material; + } else { + const GeoMaterial* origMaterial = getMaterialInternal(origMaterialName); + newMaterial = origMaterial; + if (origMaterial) { + // If no new name was provided we check if the density is compatible + // and if so we return the original material. + if (newNameProvided || !compareDensity(origMaterial->getDensity(), density)) { + // create new material + GeoMaterial* newMaterialTmp = new GeoMaterial(newName2, density); + newMaterialTmp->add(const_cast<GeoMaterial*>(origMaterial), 1.); + addMaterial(newMaterialTmp); + newMaterial = newMaterialTmp; + } + } + } + return newMaterial; +} + +const GeoMaterial* +CaloMaterialManager::getMaterialScaled(const std::string& origMaterialName, + double scaleFactor, + const std::string& newName) { + return extraScaledMaterial(origMaterialName, newName, + getMaterialScaledInternal(origMaterialName, scaleFactor, newName)); +} + +const GeoMaterial* +CaloMaterialManager::getMaterialScaledInternal(const std::string& origMaterialName, + double scaleFactor, + const std::string& newName) { + // Don't allow large scale factors + if (scaleFactor > 1000 || scaleFactor < 0.001) { + msg(MSG::ERROR) << "Scale factor must be between 0.001 and 1000." << endmsg; + return 0; + } + + const GeoMaterial* origMaterial = getMaterialInternal(origMaterialName); + + // If scalefactor is 1 and no new name is requested + // then just return the orginal material + if (newName.empty() && scaleFactor == 1.) return origMaterial; + + const GeoMaterial* newMaterial = 0; + + if (origMaterial) { + double density = origMaterial->getDensity() * scaleFactor; + std::string newName2 = newName; + if (newName2.empty()) { + // Create name using the scale factor. + int scaleInt = static_cast<int>(scaleFactor * 10000); + int scale1 = scaleInt / 10000; + int scale2 = scaleInt % 10000; + + std::ostringstream os; + os << origMaterialName << scale1 << "_" << std::setw(4) << std::setfill('0') << scale2; + newName2 = os.str(); + } + + newMaterial = getMaterialInternal(origMaterialName, density, newName2); + } + + return newMaterial; +} + +void +CaloMaterialManager::addMaterial(GeoMaterial* material) { + std::string name(material->getName()); + if (m_store.find(name) != m_store.end()) { + msg(MSG::WARNING) << "Ignoring attempt to redefine an existing material: " << name << endmsg; + // Delete the material if it is not already ref counted. + material->ref(); + material->unref(); + //std::cout << m_store[name] << std::endl; + } else { + material->lock(); + material->ref(); + m_store[name] = material; + + if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Created new material: " << name << ", " << material->getDensity() / + (Gaudi::Units::g / Gaudi::Units::cm3) << " g/cm3" << endmsg; + } +} + +bool +CaloMaterialManager::compareDensity(double d1, double d2) const { + return(std::abs(d1 / d2 - 1.) < 1e-5); +} + +void +CaloMaterialManager::addWeightTable(IRDBRecordset_ptr weightTable, const std::string& space) { + if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Reading in weight table: " << weightTable->nodeName() << endmsg; + // If not using geometryDBSvc revert to old version + if (!db()) { + if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "GeometryDBSvc not available. Using old version." << endmsg; + addWeightTableOld(weightTable, space); + return; + } + for (unsigned int i = 0; i < db()->getTableSize(weightTable); i++) { + std::string materialName = db()->getString(weightTable, "MATERIAL", i); + if (!space.empty()) { + materialName = space + "::" + materialName; + } + std::string materialBase; + if (db()->testField(weightTable, "BASEMATERIAL", i)) { + materialBase = db()->getString(weightTable, "BASEMATERIAL", i); + } + double weight = db()->getDouble(weightTable, "WEIGHT", i) * GeoModelKernelUnits::gram; + //std::cout << materialName << " " << materialBase << " " << weight/CLHEP::g << std::endl; + + bool linearWeightFlag = false; + if (m_extraFunctionality && db()->testField(weightTable, "LINWEIGHTFLAG", i)) { + linearWeightFlag = db()->getInt(weightTable, "LINWEIGHTFLAG", i); + } + + if (m_weightMap.find(materialName) != m_weightMap.end()) { + msg(MSG::WARNING) << "Material: " << materialName << " already exists in weight table" << endmsg; + } else { + msg(MSG::DEBUG) << "Adding " << materialName + << " weight " << weight + << " linearWeightFlag " << linearWeightFlag + << " raw weight " << db()->getDouble(weightTable, "WEIGHT", i) + << " m_extraFunctionality " << m_extraFunctionality + << " to weight table" << endmsg; + m_weightMap[materialName] = MaterialByWeight(materialBase, weight, linearWeightFlag); + } + } +} + +void +CaloMaterialManager::addWeightMaterial(std::string materialName, std::string materialBase, double weight, + int linearWeightFlag) { + // Weight in gr + weight = weight * GeoModelKernelUnits::gram; + + if (m_weightMap.find(materialName) != m_weightMap.end()) { + msg(MSG::WARNING) << "Material: " << materialName << " already exists in weight table" << endmsg; + } else { + msg(MSG::DEBUG) << "Adding " << materialName + << " weight " << weight + << " linearWeightFlag " << linearWeightFlag + << " to weight table" << endmsg; + m_weightMap[materialName] = MaterialByWeight(materialBase, weight, linearWeightFlag); + } +} + +void +CaloMaterialManager::addWeightTableOld(IRDBRecordset_ptr weightTable, const std::string& space) { + for (unsigned int i = 0; i < weightTable->size(); i++) { + const IRDBRecord* record = (*weightTable)[i]; + std::string materialName = record->getString("MATERIAL"); + if (!space.empty()) { + materialName = space + "::" + materialName; + } + std::string materialBase; + if (!record->isFieldNull("BASEMATERIAL")) { + materialBase = record->getString("BASEMATERIAL"); + } + double weight = record->getDouble("WEIGHT") * GeoModelKernelUnits::gram; + //std::cout << materialName << " " << materialBase << " " << weight/CLHEP::g << std::endl; + + bool linearWeightFlag = false; + if (m_extraFunctionality) { + linearWeightFlag = record->getInt("LINWEIGHTFLAG"); + } + + if (m_weightMap.find(materialName) != m_weightMap.end()) { + msg(MSG::WARNING) << "Material: " << materialName << " already exists in weight table" << endmsg; + } else { + m_weightMap[materialName] = MaterialByWeight(materialBase, weight, linearWeightFlag); + } + } +} + +void +CaloMaterialManager::addCompositionTable(IRDBRecordset_ptr compositionTable, const std::string& space) { + if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Reading in composition table: " << compositionTable->nodeName() << endmsg; + + if (!db()) { + msg(MSG::ERROR) << "GeometryDBSvc not available. Unable to read in composition table." << endmsg; + } + for (unsigned int i = 0; i < db()->getTableSize(compositionTable); i++) { + std::string materialName = db()->getString(compositionTable, "MATERIAL", i); + if (!space.empty()) { + materialName = space + "::" + materialName; + } + + std::string componentName = db()->getString(compositionTable, "COMPONENT", i); + int count = db()->getInt(compositionTable, "COUNT", i); + double factor = db()->getDouble(compositionTable, "FACTOR", i); + double actualLength = db()->getDouble(compositionTable, "ACTUALLENGTH", i); + + m_matCompositionMap.insert(std::pair<std::string, MaterialComponent>(materialName, + MaterialComponent(componentName, + count * factor, + actualLength))); + } +} + +void +CaloMaterialManager::addScalingTable(IRDBRecordset_ptr scalingTable) { + if (!scalingTable) return; + + if (db()->getTableSize(scalingTable) == 0) return; + + if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Reading in extra material scaling table: " << scalingTable->nodeName() << + endmsg; + if (!db()) { + msg(MSG::ERROR) << "GeometryDBSvc not available. Unable to read in scaling table." << endmsg; + } + for (unsigned int i = 0; i < db()->getTableSize(scalingTable); i++) { + std::string materialName = db()->getString(scalingTable, "MATERIAL", i); + double scalingFactor = db()->getDouble(scalingTable, "FACTOR", i); + + if (msgLvl(MSG::DEBUG)) { + if (scalingFactor >= 0 || scalingFactor == 1) { + msg(MSG::DEBUG) << "Material " << materialName << " will be scaled by: " << scalingFactor << endmsg; + } else { + // -ve or scalefactor = 1 means will not be scaled. + msg(MSG::DEBUG) << "Material " << materialName << " will be NOT be scaled." << endmsg; + } + } + if (m_scalingMap.find(materialName) != m_scalingMap.end()) { + msg(MSG::WARNING) << "Overriding material: " << materialName << " which already exists in scaling table" << + endmsg; + } + m_scalingMap[materialName] = scalingFactor; + } +} + +const GeoMaterial* +CaloMaterialManager::getMaterialForVolume(const std::string& materialName, double volume, const std::string& newName) { + // Make sure we have a valid volume size. + if (volume <= 0) { + msg(MSG::ERROR) << "Invalid volume : " << volume << endmsg; + return 0; + } + + // Find if material is in the weight table. + // If so we use the information to create a material with the + // density calculated from the volume and weight. If a base material + // is specified in the weight table, then a new material is made + // which is the same as the base material but with the new + // density. If no base material is specified then there should be a + // material already existing with that name. If the existing material already has the + // correct density it is used, otherwise a new material is created + // with the string "Modified" added to the material name. + + MaterialWeightMap::const_iterator iter; + if ((iter = m_weightMap.find(materialName)) != m_weightMap.end()) { + const std::string& materialBase = iter->second.name; + double weight = iter->second.weight; + double density = weight / volume; + if (iter->second.linearWeightFlag) { + msg(MSG::ERROR) << "Material defined by linear weight cannot be created with getMaterialForVolume method: " << + materialName << endmsg; + } + + if (msgLvl(MSG::VERBOSE)) { + msg(MSG::VERBOSE) + << + "Found material in weight table - name, base, weight(g), volume(cm3), density(g/cm3): " + << materialName << ", " + << materialBase << ", " + << weight / GeoModelKernelUnits::gram << ", " + << volume / Gaudi::Units::cm3 << ", " + << density / (Gaudi::Units::g / Gaudi::Units::cm3) << endmsg; + } + + if (materialBase.empty()) { + return getMaterial(materialName, density, newName); + } else { + if (newName.empty()) { + return getMaterial(materialBase, density, materialName); + } else { + return getMaterial(materialBase, density, newName); + } + } + } else { + // If not in the weight table we just return the material. + // This is not an error. + if (msgLvl(MSG::VERBOSE)) + msg(MSG::VERBOSE) + << "Material not in weight table, using standard material: " + << materialName + << ", volume(cm3) = " << volume / Gaudi::Units::cm3 + << endmsg; + return getMaterial(materialName); + } +} + +const GeoMaterial* +CaloMaterialManager::getMaterialForVolumeLength(const std::string& materialName, double volume, double length, + const std::string& newName) { + // In the case there is no material composition table (MaterialCompositionMap) and no linear weights are used this + // will + // behave the same way as getMaterialForVolume. + // If the material is in the MaterialCompositionMap it will build a material using the components + // from that table. If any components are defined as a linear weight the length is used to calculate the + // weight (ie linear weight * length). + + + std::string name; + if (newName.empty()) { + name = materialName; + } else { + name = newName; + } + + // Make sure we have a valid volume size. + if (volume <= 0 || length <= 0) { + msg(MSG::ERROR) << "Invalid volume or length : " << volume << ", " << length << endmsg; + return 0; + } + + // First look in the predefinded collections + std::pair<MaterialCompositionMap::const_iterator, MaterialCompositionMap::const_iterator> iterRange; + iterRange = m_matCompositionMap.equal_range(materialName); + if (iterRange.first != m_matCompositionMap.end()) { + if (msgLvl(MSG::VERBOSE)) { + msg(MSG::VERBOSE) + << "Found material in material composition table:" << materialName << endmsg; + } + + std::vector<double> factors; + std::vector<std::string> components; + for (MaterialCompositionMap::const_iterator iter = iterRange.first; iter != iterRange.second; iter++) { + double factorTmp = iter->second.factor; + if (iter->second.actualLength > 0) factorTmp *= iter->second.actualLength / length; + factors.push_back(factorTmp); + components.push_back(iter->second.name); + } + return getMaterialForVolumeLength(name, components, factors, volume, length); + } + + // Next look in weight table + MaterialWeightMap::const_iterator iter; + if ((iter = m_weightMap.find(materialName)) != m_weightMap.end()) { + const std::string& materialBase = iter->second.name; + double weight = iter->second.weight; + double density = weight / volume; + if (iter->second.linearWeightFlag) weight *= length; + + if (materialBase.empty()) { + return getMaterial(materialName, density, newName); + } else { + return getMaterial(materialBase, density, name); + } + } else { + // Otherwise we just return the material. + // This is not an error. + if (msgLvl(MSG::VERBOSE)) + msg(MSG::VERBOSE) + << "Material not in weight table, using standard material: " + << materialName + << ", volume(cm3) = " << volume / Gaudi::Units::cm3 + << endmsg; + return getMaterial(materialName); + } +} + +const GeoMaterial* +CaloMaterialManager::getMaterialForVolumeLength(const std::string& name, + const std::string& materialComponent, + double factor, + double volume, + double length) { + std::vector<std::string> tmpMaterialComponents(1, materialComponent); + std::vector<double> tmpFactors(1, factor); + return getMaterialForVolumeLength(name, tmpMaterialComponents, tmpFactors, volume, length); +} + +const GeoMaterial* +CaloMaterialManager::getMaterialForVolumeLength(const std::string& name, + const std::vector<std::string>& materialComponents, + const std::vector<double> factors, + double volume, + double length) { + // Make sure we have a valid volume size. + if (volume <= 0 || length <= 0) { + msg(MSG::ERROR) << "Invalid volume or length : " << volume << ", " << length << endmsg; + return 0; + } + + if (!factors.empty() && factors.size() < materialComponents.size()) { + msg(MSG::WARNING) << "getMaterialForVolumeLength: factor vector size too small. Setting remaining factors to 1." << + endmsg; + } + + std::vector<std::string> baseMaterials; + std::vector<double> fracWeight; + baseMaterials.reserve(materialComponents.size()); + fracWeight.reserve(materialComponents.size()); + + double totWeight = 0; + for (unsigned int iComp = 0; iComp < materialComponents.size(); ++iComp) { + const std::string& materialName = materialComponents[iComp]; + + // First search in MaterialWeightMap + MaterialWeightMap::const_iterator iter; + if ((iter = m_weightMap.find(materialName)) != m_weightMap.end()) { + const std::string& materialBase = iter->second.name; + double weight = iter->second.weight; + + if (iComp < factors.size()) { + weight *= factors[iComp]; + } + msg(MSG::DEBUG) << "Material " << materialName + << " found in weight table, weight " << iter->second.weight / GeoModelKernelUnits::gram + << " factor " << factors[iComp] + << " w*fac*len " << weight * length / GeoModelKernelUnits::gram + << " basMat " << materialBase + << " linear? " << iter->second.linearWeightFlag << endmsg; + + if (iter->second.linearWeightFlag) weight *= length; + if (materialBase.empty()) { + // If no base material then name should refer to an already defined material + baseMaterials.push_back(materialName); + } else { + baseMaterials.push_back(materialBase); + } + fracWeight.push_back(weight); // Will be normalized later. + totWeight += weight; + } else { + // If not in the weight table we look for a regular material. + // I don't think this would normally be intentional so we give a warning message. + /* + if (msgLvl(MSG::WARNING)) + msg(MSG::WARNING) + << "Component material not in weight table, using standard material: " + << materialName << " with weight= " + << factors.at(iComp) * length + << endmsg; + const GeoMaterial * material = getMaterialInternal(materialName); + */ + + // In this case the factor should correspond to the linear weight + double weight = factors.at(iComp) * length * GeoModelKernelUnits::gram; + + // If material not found, will get error message when attempting to make the material. So carry on here. + baseMaterials.push_back(materialName); + fracWeight.push_back(weight); + totWeight += weight; + } + } + + if (msgLvl(MSG::VERBOSE)) { + msg(MSG::VERBOSE) << "Creating material from multiple components: " << name << endmsg; + for (unsigned int i = 0; i < materialComponents.size(); ++i) { + msg(MSG::VERBOSE) << " Component " << i << ": Name = " << baseMaterials[i] + << " Weight(g) = " << fracWeight[i] / Gaudi::Units::g << endmsg; + } + } + + for (unsigned int i = 0; i < fracWeight.size(); ++i) { + fracWeight[i] /= totWeight; + } + double density = totWeight / volume; + + return getMaterial(name, baseMaterials, fracWeight, density); +} + +// Add materials assuming they simply occupy the same volume. +/* + const GeoMaterial* + CaloMaterialManager::getMaterial(const std::vector<const GeoMaterial *> & materialComponents, + const std::string & newName) + { + const GeoMaterial * newMaterial = 0; + std::vector<double> fracWeight; + fracWeight.reserve(materialComponents.size()); + + for (unsigned int i = 0; i < materialComponents.size(); i++) { + const GeoMaterial * origMaterial = materialComponents[i]; + double weight = origMaterial->getDensity(); + fracWeight.push_back(weight); + totWeight += weight; + } + for (unsigned int i = 0; i < fracWeight.size(); ++i) { + fracWeight[i] /= totWeight; + } + return getMaterial(materialComponents, fracWeight, totWeight, newName); + } + + const GeoMaterial* + CaloMaterialManager::getMaterial(const std::vector<std::string> & materialComponents, + const std::string & newName) + { + const GeoMaterial * newMaterial = 0; + + // First see if we already have the modified material + const GeoMaterial* material = getAdditionalMaterial(newName); + + for (unsigned int i = 0; i < materialComponents.size(); i++) { + const GeoMaterial * origMaterial = getMaterial(materialComponents[i]); + components.push_back(origMaterial); + } + return getMaterial(components, newName); + } + */ + + +const GeoMaterial* +CaloMaterialManager::getMaterial(const std::string& name, + const std::vector<std::string>& materialComponents, + const std::vector<double>& fracWeight, + double density) { + return extraScaledMaterial(name, getMaterialInternal(name, materialComponents, fracWeight, density)); +} + +const GeoMaterial* +CaloMaterialManager::getMaterialInternal(const std::string& name, + const std::vector<std::string>& materialComponents, + const std::vector<double>& fracWeight, + double density) { + const GeoMaterial* newMaterial = 0; + + // First see if we already have the material + const GeoMaterial* material = getAdditionalMaterial(name); + + if (material) { + if (!compareDensity(material->getDensity(), density)) { + msg(MSG::WARNING) << "Density is not consistent for material " << name << endmsg; + } + newMaterial = material; + } else { + GeoMaterial* newMaterialTmp = new GeoMaterial(name, density); + for (unsigned int i = 0; i < materialComponents.size(); i++) { + const GeoMaterial* origMaterial = getMaterialInternal(materialComponents[i]); + if (origMaterial) { + newMaterialTmp->add(const_cast<GeoMaterial*>(origMaterial), fracWeight[i]); + } else { + msg(MSG::ERROR) << "Material component missing " << materialComponents[i] << endmsg; + } + } + addMaterial(newMaterialTmp); + newMaterial = newMaterialTmp; + } + return newMaterial; +} + +const IGeometryDBSvc* +CaloMaterialManager::db() { + if (m_athenaComps) return m_athenaComps->geomDB(); + + return 0; +} + +void +CaloMaterialManager::addTextFileMaterials() { + const std::string materialTable = "ExtraMaterials"; + const std::string componentsTable = "ExtraMatComponents"; + + // Look for tables ExtraMaterials and ExtraMatComponents. + // These are text file only tables where extra materials are desired or + // one wants to override some database ones. + if (!db() || !db()->testField("", "TableSize:" + materialTable) || !db()->getTableSize(materialTable) + || !db()->testField("", "TableSize:" + componentsTable) || !db()->getTableSize(componentsTable)) return; + + + msg(MSG::INFO) << "Extra materials being read in from text file." << endmsg; + + typedef std::map<std::string, MaterialDef> MatMap; + MatMap materials; + + // read in material table + for (unsigned int iMat = 0; iMat < db()->getTableSize(materialTable); iMat++) { + std::string materialName = db()->getString(materialTable, "NAME", iMat); + double density = db()->getDouble(materialTable, "DENSITY", iMat) * Gaudi::Units::g / Gaudi::Units::cm3; + materials[materialName] = MaterialDef(materialName, density); + } + + // read in material component table + for (unsigned int iComp = 0; iComp < db()->getTableSize(componentsTable); iComp++) { + std::string materialName = db()->getString(componentsTable, "NAME", iComp); + std::string compName = db()->getString(componentsTable, "COMPNAME", iComp); + double fracWeight = db()->getDouble(componentsTable, "FRACTION", iComp); + MatMap::iterator iter = materials.find(materialName); + if (iter != materials.end()) { + iter->second.addComponent(compName, fracWeight); + } else { + msg(MSG::ERROR) << "Attemp to add material component, " << compName << ", to non-existing material: " << + materialName << endmsg; + } + } + + //Now create the materials + int matCount = 0; + int matCountLast = -1; + bool someUndefined = true; + // While there are still undefined materials keep creating materials. + // Check also that the matCount had change to avoid endless loop due to cyclicly + // defined materials. + while (someUndefined && matCount != matCountLast) { + matCountLast = matCount; + someUndefined = false; + for (MatMap::iterator iter = materials.begin(); iter != materials.end(); ++iter) { + MaterialDef& tmpMat = iter->second; + if (!tmpMat.isCreated()) { + // Check if any components are materials in this table and if they are defined. + // If not flag that there are undefined materials and go to next material + bool compsDefined = true; + for (unsigned int iComp = 0; iComp < tmpMat.numComponents(); ++iComp) { + std::string compName = tmpMat.compName(iComp); + MatMap::iterator iter2 = materials.find(compName); + if (iter2 != materials.end()) { + if (!iter2->second.isCreated()) { + compsDefined = false; + break; + } + } + } + if (compsDefined) { + createMaterial(tmpMat); + tmpMat.setCreated(); + matCount++; + } else { + someUndefined = true; + } + } + } + } + + + if (someUndefined) { + msg(MSG::ERROR) << "Not all materials could be defined due to cyclic definitions" << endmsg; + } +} + +void +CaloMaterialManager::createMaterial(const MaterialDef& material) { + if (material.numComponents() == 0) { + msg(MSG::ERROR) << "Material has no components: " << material.name() << endmsg; + return; + } + + // If total of fractions is greater than 1.1 then assume material is define by ratio of atoms. + double totWeight = material.totalFraction(); + bool byAtomicRatio = false; + if (totWeight > 1.1) { + byAtomicRatio = true; + for (unsigned int i = 0; i < material.numComponents(); i++) { + if (material.compName(i).find("::") != std::string::npos) { + // If component name has "::" in it then its not an element. + msg(MSG::ERROR) << "Material, " << material.name() + << + ", is assumed to be defined by atomic ratio (due to total fraction > 1) but component is not an element: " + << material.compName(i) << endmsg; + return; + } + const GeoElement* element = getElement(material.compName(i)); + if (!element) { + msg(MSG::ERROR) << "Error making material " << material.name() << ". Element not found: " << + material.compName(i) << endmsg; + return; + } + totWeight += material.fraction(i) * element->getA(); + } + } else { + // Check if total fraction is close to 1. + if (std::abs(totWeight - 1) > 0.01) { + msg(MSG::WARNING) << "Total fractional weight does not sum to 1. Will renormalize. Total = " << totWeight << + endmsg; + } + } + // Now build the material + GeoMaterial* newMaterial = new GeoMaterial(material.name(), material.density()); + if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Creating material: " << material.name() + << " with density: " << material.density() / (Gaudi::Units::g / Gaudi::Units::cm3) << + endmsg; + for (unsigned int i = 0; i < material.numComponents(); i++) { + double fracWeight = material.fraction(i) / totWeight; + if (material.compName(i).find("::") == std::string::npos) { + const GeoElement* element = getElement(material.compName(i)); + if (!element) { + msg(MSG::ERROR) << "Error making material " << material.name() << ". Element not found: " << + material.compName(i) << endmsg; + // delete the partially created material + newMaterial->ref(); + newMaterial->unref(); + return; + } + if (byAtomicRatio) { + fracWeight = material.fraction(i) * element->getA() / totWeight; + } + newMaterial->add(const_cast<GeoElement*>(element), fracWeight); + if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Component: " << material.compName(i) << " " << fracWeight << endmsg; + } else { + const GeoMaterial* materialTmp = getMaterialInternal(material.compName(i)); + if (!materialTmp) { + msg(MSG::ERROR) << "Error making material " << material.name() << ". Component not found: " << + material.compName(i) << endmsg; + // delete the partially created material + newMaterial->ref(); + newMaterial->unref(); + return; + } + if (byAtomicRatio) { + // Should not happen as already checked that all components were elements. + msg(MSG::ERROR) << "Unexpected Error" << endmsg; + } + newMaterial->add(const_cast<GeoMaterial*>(materialTmp), fracWeight); + if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Component: " << material.compName(i) << " " << fracWeight << endmsg; + } + } + newMaterial->lock(); + addMaterial(newMaterial); +} + +CaloMaterialManager::MaterialDef::MaterialDef() + : m_density(0), + m_created(false) +{} + +CaloMaterialManager::MaterialDef::MaterialDef(const std::string& name, double density) + : m_name(name), + m_density(density), + m_created(false) +{} + +void +CaloMaterialManager::MaterialDef::addComponent(const std::string& compName, double fraction) { + m_components.push_back(compName); + m_fractions.push_back(fraction); +} + +double +CaloMaterialManager::MaterialDef::totalFraction() const { + double sum = 0; + + for (unsigned int i = 0; i < m_fractions.size(); i++) { + sum += m_fractions[i]; + } + return sum; +} + +// We need the original name as the GeoMaterial from the standard +// material manager has its namespace dropped. We have two versions +// of extraScaledMaterial. One where two names are provided. In this +// version if newName is not empty that is used, otherwise +// materialName is used. The other just has one name and that is the +// one that is used. + +const GeoMaterial* +CaloMaterialManager::extraScaledMaterial(const std::string& materialName, + const std::string& newName, + const GeoMaterial* origMaterial) { + if (newName.empty()) { + return extraScaledMaterial(materialName, origMaterial); + } else { + return extraScaledMaterial(newName, origMaterial); + } +} + +const GeoMaterial* +CaloMaterialManager::extraScaledMaterial(const std::string& materialName, const GeoMaterial* origMaterial) { + if (!origMaterial) throw std::runtime_error(std::string("Invalid material: ") + materialName); + + double scaleFactor = getExtraScaleFactor(materialName); + // -1 (or any -ve number) indicates material is not scaled. And if the scale factor + // is 1 then there is no need to create a new material. + if (scaleFactor < 0 || scaleFactor == 1 || materialName.find("Ether") != std::string::npos) return origMaterial; + + if (scaleFactor == 0) return getMaterialInternal("std::Vacuum"); + + std::string newName = materialName + "_ExtraScaling"; + + // Check if it is already made. + const GeoMaterial* newMaterial = getAdditionalMaterial(newName); + + // Already made so we return it. + if (newMaterial) return newMaterial; + + // Otherwise we need to make it. + double density = origMaterial->getDensity() * scaleFactor; + + // create new material + GeoMaterial* newMaterialTmp = new GeoMaterial(newName, density); + newMaterialTmp->add(const_cast<GeoMaterial*>(origMaterial), 1.); + addMaterial(newMaterialTmp); + newMaterial = newMaterialTmp; + + return newMaterial; +} + +double +CaloMaterialManager::getExtraScaleFactor(const std::string& materialName) { + // If name is found in map we return the corresponding scale factor. + // The special name "ALL" indicates all materials are scaled. + // Individual materials can be excluded from scaling by giving either + // a -ve scaling factor or just specifying a scaling factor of 1. + // A scaling factor of 0 means the material will be replaced by vacuum. + + ExtraScaleFactorMap::const_iterator iter = m_scalingMap.find(materialName); + if (iter != m_scalingMap.end()) { + return iter->second; + } else { + // Check for special names + // ALL means everything scaled. Do not scale air or vacuum (unless explicity requested) + iter = m_scalingMap.find("ALL"); + if (iter != m_scalingMap.end() && materialName != "std::Air" && materialName != "std::Vacuum") { + return iter->second; + } + } + + // If not found then return -1 to indicate material is not to be scaled. + return -1; +} diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/DistortedMaterialManager.cxx b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/DistortedMaterialManager.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1b10d0f258e48b73ae059bb9165983221917f4f3 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/DistortedMaterialManager.cxx @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + */ + + +#include "CaloGeoModelUtils/DistortedMaterialManager.h" +#include "GeoModelInterfaces/StoredMaterialManager.h" +#include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" +#include "AthenaKernel/MsgStreamMember.h" +#include "StoreGate/StoreGateSvc.h" +#include "RDBAccessSvc/IRDBAccessSvc.h" +#include "GaudiKernel/ISvcLocator.h" +#include "GaudiKernel/Bootstrap.h" + +namespace CaloDD { + DistortedMaterialManager::DistortedMaterialManager() { + ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap + + Athena::MsgStreamMember log("ExtraMaterialManager"); + log << MSG::DEBUG << "Initialized Calo Distorted Material Manager" << endmsg; + + StoreGateSvc* detStore; + StatusCode sc; + sc = svcLocator->service("DetectorStore", detStore); + if (sc.isFailure()) log << MSG::FATAL << "Could not locate DetectorStore" << endmsg; + + IRDBAccessSvc* rdbSvc; + sc = svcLocator->service("RDBAccessSvc", rdbSvc); + if (sc.isFailure()) log << MSG::FATAL << "Could not locate RDBAccessSvc" << endmsg; + + // Get version tag and node for InDet. + DecodeFaserVersionKey versionKey("Calorimeter"); + std::string detectorKey = versionKey.tag(); + std::string detectorNode = versionKey.node(); + + log << MSG::DEBUG << "Retrieving Record Sets from database ..." << endmsg; + log << MSG::DEBUG << "Key = " << detectorKey << " Node = " << detectorNode << endmsg; + + m_xMatTable = rdbSvc->getRecordsetPtr("CaloExtraMaterial", detectorKey, detectorNode, "FASERDD"); + + const StoredMaterialManager* theGeoMaterialManager = 0; + sc = detStore->retrieve(theGeoMaterialManager, "MATERIALS"); + if (sc.isFailure()) log << MSG::FATAL << "Could not locate GeoModel Material manager" << endmsg; + m_materialManager = theGeoMaterialManager; + } +} // end namespace diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/ExtraMaterial.cxx b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/ExtraMaterial.cxx new file mode 100644 index 0000000000000000000000000000000000000000..613009e2bb0f5e1e615d4323632bb5bd64b24530 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/ExtraMaterial.cxx @@ -0,0 +1,74 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + */ + +#include "CaloGeoModelUtils/ExtraMaterial.h" +#include "CaloGeoModelUtils/GenericTubeMaker.h" +#include "CaloGeoModelUtils/TubeVolData.h" +#include "CaloGeoModelUtils/DistortedMaterialManager.h" +#include "RDBAccessSvc/IRDBRecordset.h" +#include "RDBAccessSvc/IRDBRecord.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoPhysVol.h" +#include "GeoModelKernel/GeoFullPhysVol.h" +#include "GeoModelKernel/GeoTube.h" +#include "GeoModelKernel/GeoTubs.h" +#include "GeoModelKernel/GeoCons.h" +#include "GeoModelKernel/GeoLogVol.h" +#include "GeoModelKernel/GeoMaterial.h" + +#include "GeoModelInterfaces/AbsMaterialManager.h" + +#include <string> +#include <sstream> +#include <iostream> + +namespace CaloDD { + ExtraMaterial::ExtraMaterial(IRDBRecordset_ptr xMatTable, const AbsMaterialManager* matManager) + : m_xMatTable(xMatTable), + m_matManager(matManager) + {} + + ExtraMaterial::ExtraMaterial(const DistortedMaterialManager* manager) + : m_xMatTable(manager->extraMaterialTable()), + m_matManager(manager->materialManager()) + {} + + void + ExtraMaterial::add(GeoPhysVol* parent, const std::string& region, double zParent) { + add(parent, 0, region, zParent); + } + + void + ExtraMaterial::add(GeoFullPhysVol* parent, const std::string& region, double zParent) { + add(0, parent, region, zParent); + } + + void + ExtraMaterial::add(GeoPhysVol* parent, GeoFullPhysVol* fullparent, const std::string& region, double zParent) { + //std::cout << "Adding Extra material for region: " << region << ", zParent = " << zParent << std::endl; + + for (unsigned int i = 0; i < m_xMatTable->size(); i++) { + std::ostringstream volnamestr; + volnamestr << "ExtraMaterial" << i; + + //std::cout << "In Extra material " << i << std::endl; + + if ((*m_xMatTable)[i]->getString("REGION") == region) { + //std::cout << "Extra material Match " << i << std::endl; + + GenericTubeMaker tubeHelper((*m_xMatTable)[i]); + const GeoMaterial* material = m_matManager->getMaterial(tubeHelper.volData().material()); + const GeoShape* shape = tubeHelper.buildShape(); + GeoLogVol* logVol = new GeoLogVol(volnamestr.str(), shape, material); + GeoPhysVol* physVol = new GeoPhysVol(logVol); + + if (parent) { + tubeHelper.placeVolume(parent, physVol, zParent); + } else { + tubeHelper.placeVolume(fullparent, physVol, zParent); + } + } + } + } +} // end namespace diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/GenericTubeMaker.cxx b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/GenericTubeMaker.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2e122b21bc2fb4cc2788f0493057aefc51893f24 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/GenericTubeMaker.cxx @@ -0,0 +1,164 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + */ + +#include "CaloGeoModelUtils/GenericTubeMaker.h" +#include "CaloGeoModelUtils/TubeVolData.h" + +#include "GeoModelKernel/GeoTube.h" +#include "GeoModelKernel/GeoTubs.h" +#include "GeoModelKernel/GeoCons.h" +#include "GeoModelKernel/GeoPcon.h" +#include "GeoModelKernel/GeoTransform.h" +#include "GeoModelKernel/GeoPhysVol.h" +#include "GeoModelKernel/GeoFullPhysVol.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GaudiKernel/SystemOfUnits.h" + +#include "RDBAccessSvc/IRDBRecord.h" + +namespace CaloDD { + GenericTubeMaker::GenericTubeMaker(const IRDBRecord* record) + : m_record(record), + m_volData(record) + {} + + std::string + GenericTubeMaker::materialName() const { + return m_record->getString("MATERIAL"); + } + + std::string + GenericTubeMaker::name() const { + return m_record->getString("NAME"); + } + + const GeoShape* + GenericTubeMaker::buildShape() { + const GeoShape* shape = 0; + + switch (m_volData.shape()) { + case TubeVolData::TUBE: + shape = new GeoTube(m_volData.rmin(), m_volData.rmax(), 0.5 * m_volData.length()); + break; + + case TubeVolData::TUBS: + shape = new GeoTubs(m_volData.rmin(), m_volData.rmax(), 0.5 * m_volData.length(), + m_volData.phiStart(), m_volData.phiDelta()); + break; + + case TubeVolData::CONS: + shape = new GeoCons(m_volData.rmin(), m_volData.rmin2(), m_volData.rmax(), m_volData.rmax2(), + 0.5 * m_volData.length(), m_volData.phiStart(), m_volData.phiDelta()); + break; + + case TubeVolData::RADIAL: + // This simulates the radial decrease in density. + double zstart = -0.5 * m_volData.length(); + GeoPcon* shapeTmp = new GeoPcon(m_volData.phiStart(), m_volData.phiDelta()); + shapeTmp->addPlane(zstart, m_volData.rmin(), m_volData.rmax()); + double radialDelta = (m_volData.rmax() - m_volData.rmin()) / m_volData.radialDivisions(); + for (int i = 0; i < m_volData.radialDivisions(); i++) { + double rIntermediate = m_volData.rmax() - i * radialDelta; + double reductionFactor = m_volData.rmin() / rIntermediate; + shapeTmp->addPlane(zstart + reductionFactor * m_volData.length(), m_volData.rmin(), rIntermediate); + } + shapeTmp->addPlane(zstart + m_volData.length(), m_volData.rmin(), m_volData.rmin()); + shape = shapeTmp; + break; + } + + return shape; + } + + void + GenericTubeMaker::placeVolume(GeoPhysVol* parent, GeoVPhysVol* child, double zParent) { + placeVolume(parent, 0, child, zParent); + } + + void + GenericTubeMaker::placeVolume(GeoFullPhysVol* fullparent, GeoVPhysVol* child, double zParent) { + placeVolume(0, fullparent, child, zParent); + } + + void + GenericTubeMaker::placeVolTwoSide(GeoPhysVol* parentPos, GeoPhysVol* parentNeg, GeoVPhysVol* child, double zParent) { + placeVolTwoSide(parentPos, parentNeg, 0, 0, child, zParent); + } + + void + GenericTubeMaker::placeVolTwoSide(GeoFullPhysVol* fullparentPos, GeoFullPhysVol* fullparentNeg, GeoVPhysVol* child, + double zParent) { + placeVolTwoSide(0, 0, fullparentPos, fullparentNeg, child, zParent); + } + + void + GenericTubeMaker::placeVolume(GeoPhysVol* parent, GeoFullPhysVol* fullparent, GeoVPhysVol* child, double zParent) { + for (int iRepeat = 0; iRepeat < m_volData.nRepeat(); iRepeat++) { + double phi = m_volData.phiStep() * iRepeat; + + GeoTransform* xform = 0; + double zOffset = m_volData.zMid() - zParent; + if (zOffset != 0 || iRepeat > 0) { + xform = new GeoTransform(GeoTrf::TranslateZ3D(zOffset) * GeoTrf::RotateZ3D(phi)); + } + + if (parent) { + if (xform) parent->add(xform); + parent->add(child); + } else { + if (xform) fullparent->add(xform); + fullparent->add(child); + } + + // Place in negative z as well. + if (m_volData.bothZ()) { + GeoTransform* xformNeg = new GeoTransform(GeoTrf::RotateY3D(180 * Gaudi::Units::deg) * GeoTrf::TranslateZ3D( + zOffset) * GeoTrf::RotateZ3D(phi)); + if (parent) { + parent->add(xformNeg); + parent->add(child); + } else { + fullparent->add(xformNeg); + fullparent->add(child); + } + } + } // iRepeat loop + } + + void + GenericTubeMaker::placeVolTwoSide(GeoPhysVol* parentPos, GeoPhysVol* parentNeg, + GeoFullPhysVol* fullparentPos, GeoFullPhysVol* fullparentNeg, + GeoVPhysVol* child, double zParent) { + for (int iRepeat = 0; iRepeat < m_volData.nRepeat(); iRepeat++) { + double phi = m_volData.phiStep() * iRepeat; + double zOffset = m_volData.zMid() - zParent; + const bool newXform((zOffset != 0)or(iRepeat > 0)); + + if (parentPos) { + if (newXform) { + parentPos->add(new GeoTransform(GeoTrf::TranslateZ3D(zOffset) * GeoTrf::RotateZ3D(phi))); + } + parentPos->add(child); + } else if (fullparentPos) { + if (newXform) { + fullparentPos->add(new GeoTransform(GeoTrf::TranslateZ3D(zOffset) * GeoTrf::RotateZ3D(phi))); + } + fullparentPos->add(child); + } + + // Place in negative z as well. + if (m_volData.bothZ()) { + GeoTransform* xformNeg = new GeoTransform(GeoTrf::RotateY3D(180 * Gaudi::Units::deg) * GeoTrf::TranslateZ3D( + zOffset) * GeoTrf::RotateZ3D(phi)); + if (parentNeg) { + parentNeg->add(xformNeg); + parentNeg->add(child); + } else { + fullparentNeg->add(xformNeg); + fullparentNeg->add(child); + } + } + } // iRepeat loop + } +}// end namespace diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/TopLevelPlacements.cxx b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/TopLevelPlacements.cxx new file mode 100644 index 0000000000000000000000000000000000000000..656aab190b22772fc4a58ee92deff3730216c9e5 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/TopLevelPlacements.cxx @@ -0,0 +1,145 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + */ + +#include "CaloGeoModelUtils/TopLevelPlacements.h" +#include "GaudiKernel/SystemOfUnits.h" +#include "RDBAccessSvc/IRDBRecordset.h" +#include "RDBAccessSvc/IRDBRecord.h" +#include <iostream> + +GeoTrf::Transform3D TopLevelPlacements::s_identityTransform = GeoTrf::Transform3D::Identity(); + +TopLevelPlacements::TopLevelPlacements(IRDBRecordset_ptr topLevelTable) + : m_noTopLevelTable(true) { + fillPlacements(topLevelTable); +} + +TopLevelPlacements::~TopLevelPlacements() { + std::map<std::string, Part*>::const_iterator iter; + for (iter = m_parts.begin(); iter != m_parts.end(); ++iter) delete iter->second; +} + +const GeoTrf::Transform3D& +TopLevelPlacements::transform(const std::string& partName) const { + Part* part = getPart(partName); + + if (part) return part->transform; + + return s_identityTransform; +} + +bool +TopLevelPlacements::present(const std::string& partName) const { + // If no table present assume everything is present. + if (m_noTopLevelTable) return true; + + return(getPart(partName) != 0); +} + +void +TopLevelPlacements::fillPlacements(IRDBRecordset_ptr topLevelTable) { + if (topLevelTable.get() == 0) { + m_noTopLevelTable = true; + return; + } + m_noTopLevelTable = false; + int numParts = topLevelTable->size(); + for (int i = 0; i < numParts; i++) { + const IRDBRecord* record = (*topLevelTable)[i]; + std::string label = record->getString("LABEL"); + + Part* part = new Part; + part->label = label; + part->transform = partTransform(record); + + m_parts[label] = part; + } +} + +GeoTrf::Transform3D +TopLevelPlacements::partTransform(const IRDBRecord* record) const { + double posX = record->getDouble("POSX") * Gaudi::Units::mm; + double posY = record->getDouble("POSY") * Gaudi::Units::mm; + double posZ = record->getDouble("POSZ") * Gaudi::Units::mm; + double rotX = record->getDouble("ROTX") * Gaudi::Units::degree; + double rotY = record->getDouble("ROTY") * Gaudi::Units::degree; + double rotZ = record->getDouble("ROTZ") * Gaudi::Units::degree; + int rotOrder = record->getInt("ROTORDER"); + + // Translation part + GeoTrf::Translate3D transform(posX, posY, posZ); + + // If rotation is zero return translation + if (rotX == 0 && rotY == 0 && rotZ == 0) { + return transform; + } + + // For rotation have to look at order. + // 123 means rotate around X, then Y , then Z. + // 312 means rotate around Z, then X , then Y. + // etc + + int ixyz1 = rotOrder / 100 - 1; + int ixyz2 = (rotOrder % 100) / 10 - 1; + int ixyz3 = (rotOrder % 10) - 1; + + if (ixyz1 < 0 || ixyz1 > 2 || + ixyz2 < 0 || ixyz2 > 2 || + ixyz3 < 0 || ixyz3 > 2) { + std::cout << "ERROR: Invalid rotation order:" << rotOrder << std::endl; + ixyz1 = 0; + ixyz2 = 1; + ixyz3 = 2; + } + + GeoTrf::Transform3D rotation(GeoTrf::Translate3D::Identity()); + std::vector<int> order { ixyz1 , ixyz2, ixyz3 }; + for (int ixyz : order) + { + switch (ixyz) + { + case 0: + if (rotX != 0) rotation = GeoTrf::RotateX3D{rotX} * rotation; + break; + case 1: + if (rotY != 0) rotation = GeoTrf::RotateY3D{rotY} * rotation; + break; + case 2: + if (rotZ != 0) rotation = GeoTrf::RotateZ3D{rotZ} * rotation; + break; + } + } + + // This segfaults at runtime when deleting the pointers, + // I think because the base class of Transform3D + // does not have a virtual destructor + // + // List of the three transforms + // GeoTrf::Transform3D* xformList[] = { nullptr, nullptr, nullptr }; + // if (rotX != 0) xformList[0] = new GeoTrf::RotateX3D(rotX); + // if (rotY != 0) xformList[1] = new GeoTrf::RotateY3D(rotY); + // if (rotZ != 0) xformList[2] = new GeoTrf::RotateZ3D(rotZ); + + // GeoTrf::Transform3D rotation(GeoTrf::Transform3D::Identity()); + // if (xformList[ixyz1] != nullptr) rotation = *(xformList[ixyz1]) * rotation; + // if (xformList[ixyz2] != nullptr) rotation = *(xformList[ixyz2]) * rotation; + // if (xformList[ixyz3] != nullptr) rotation = *(xformList[ixyz3]) * rotation; + // if (xformList[0] != nullptr) + // delete xformList[0]; + // if (xformList[1] != nullptr) + // delete xformList[1]; + // if (xformList[2] != nullptr) + // delete xformList[2]; + + return transform * rotation; +} + +TopLevelPlacements::Part* +TopLevelPlacements::getPart(const std::string& partName) const { + std::map<std::string, Part*>::const_iterator iter; + iter = m_parts.find(partName); + if (iter == m_parts.end()) return 0; + + return iter->second; +} diff --git a/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/TubeVolData.cxx b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/TubeVolData.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a4dbcba371b722e4bbc212f1f8dbe895a7ceeeff --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloGeoModelUtils/src/TubeVolData.cxx @@ -0,0 +1,101 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + */ + +#include "CaloGeoModelUtils/TubeVolData.h" +#include "RDBAccessSvc/IRDBRecord.h" +#include "GaudiKernel/SystemOfUnits.h" + +#include <cmath> +#include <string> +#include <iostream> + +namespace CaloDD { + std::string + TubeVolData::material() const { + return m_record->getString("MATERIAL"); + } + + double + TubeVolData::maxRadius() const { + return std::max(m_rmax1, m_rmax2); + } + + TubeVolData::TubeVolData(const IRDBRecord* record) + : m_record(record), + m_bothZ(false), + m_nRepeat(0), + m_radialDiv(0), + m_phiStart(0.), + m_phiDelta(0.), + m_phiStep(0.), + m_rmin1(0.), + m_rmin2(0.), + m_rmax1(0.), + m_rmax2(0.), + m_length(0.), + m_zMid(0.) { + // add an 2*epsilon gap between phi sectors. + const double phiepsilon = 0.001 * Gaudi::Units::degree; + + bool fullPhiSector = false; + + + // Get the parameters which we need to do some preprocessing with. + // The rest are obtained directly from RDB. + + if (m_record) { + m_phiStart = m_record->getDouble("PHISTART") * Gaudi::Units::degree; + m_phiDelta = m_record->getDouble("PHIDELTA") * Gaudi::Units::degree; + m_phiStep = m_record->getDouble("PHISTEP") * Gaudi::Units::degree; + m_nRepeat = m_record->getInt("NREPEAT"); + m_rmin1 = m_record->getDouble("RMIN") * Gaudi::Units::mm; + m_rmax1 = m_record->getDouble("RMAX") * Gaudi::Units::mm; + m_rmin2 = m_record->getDouble("RMIN2") * Gaudi::Units::mm; + m_rmax2 = m_record->getDouble("RMAX2") * Gaudi::Units::mm; + m_radialDiv = 0; + if (!m_record->isFieldNull("RADIAL")) { + m_radialDiv = m_record->getInt("RADIAL"); + } + m_bothZ = 0; + if (!m_record->isFieldNull("ZSYMM")) { + m_bothZ = m_record->getInt("ZSYMM"); + } + + double zmin = m_record->getDouble("ZMIN") * Gaudi::Units::mm; + double zmax = m_record->getDouble("ZMAX") * Gaudi::Units::mm; + m_length = std::abs(zmax - zmin); + m_zMid = 0.5 * (zmin + zmax); + + if (m_phiDelta == 0 || m_phiDelta >= 359.9 * Gaudi::Units::degree) { + m_phiDelta = 360 * Gaudi::Units::degree; + fullPhiSector = true; + } else { + m_phiDelta -= 2 * phiepsilon; + m_phiStart += phiepsilon; + } + + // Force nRepeat to be >= 1; + if (m_nRepeat <= 0) m_nRepeat = 1; + // if PHISTEP==0 then set it to be equi-distant steps filling up phi. + if (m_phiStep == 0) { + m_phiStep = 360 * Gaudi::Units::degree / m_nRepeat; + } + + if (m_rmin2 <= 0) m_rmin2 = m_rmin1; + if (m_rmax2 <= 0) m_rmax2 = m_rmax1; + + if (m_radialDiv > 0) { + m_shape = TubeVolData::RADIAL; + } else if (m_rmin1 == m_rmin2 && m_rmax1 == m_rmax2) { + if (fullPhiSector) { + m_shape = TubeVolData::TUBE; + } else { + m_shape = TubeVolData::TUBS; + } + } else { + m_shape = TubeVolData::CONS; + } + } else std::cout << "Unexpected ERROR in ExtraMaterial!" << std::endl; + } +} // end namespace diff --git a/Calorimeter/CaloDetDescr/CaloIdDictFiles/data/IdDictCalorimeter.xml b/Calorimeter/CaloDetDescr/CaloIdDictFiles/data/IdDictCalorimeter.xml index a88c973a1494b913dc0dcbcaa60dc170a6f39c4b..006fabfa2116e1390b3c2f612e3b378e45f5562d 100644 --- a/Calorimeter/CaloDetDescr/CaloIdDictFiles/data/IdDictCalorimeter.xml +++ b/Calorimeter/CaloDetDescr/CaloIdDictFiles/data/IdDictCalorimeter.xml @@ -1,11 +1,26 @@ <IdDictionary name="Calorimeter"> <field name="part" > - <label name="ECAL" value="1" /> + <label name="Ecal" value="1" /> + </field> + + <field name="row"> + <label name="Bottom" value="0" /> + <label name="Top" value="1" /> + </field> + + <field name="module"> + <!-- facing downstream (hence "starboard" and "port") + x must increase right to left for a right-handed + coordinate system --> + <label name="Starboard" value="0" /> + <label name="Port" value="1" /> </field> <region> - <range field="part" value="ECAL" /> + <range field="part" value="Ecal" /> + <range field="row" values="Bottom Top" wraparound="FALSE" /> + <range field="module" values="Starboard Port" wraparound="FALSE" /> + <range field="pmt" minvalue="0" maxvalue="0" /> </region> - </IdDictionary> \ No newline at end of file diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CMakeLists.txt b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..0cd083896cc1a9053acd6b5c6e8bf7bcf6a15b0f --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CMakeLists.txt @@ -0,0 +1,22 @@ +################################################################################ +# Package: CaloReadoutGeometry +################################################################################ + +# Declare the package name: +atlas_subdir( CaloReadoutGeometry ) + +# External dependencies: +find_package( CLHEP ) +find_package( Eigen ) +find_package( GeoModel ) + +# Component(s) in the package: +atlas_add_library( CaloReadoutGeometry + src/*.cxx + PUBLIC_HEADERS CaloReadoutGeometry + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + DEFINITIONS ${CLHEP_DEFINITIONS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel CxxUtils FaserDetDescr GeoModelFaserUtilities GeoPrimitives Identifier GaudiKernel FaserCaloIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions + PRIVATE_LINK_LIBRARIES AthenaPoolUtilities IdDictDetDescr ) + + diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloCommonItems.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloCommonItems.h new file mode 100644 index 0000000000000000000000000000000000000000..51327ad88e1e990fa573c40129eabf3a2308e11d --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloCommonItems.h @@ -0,0 +1,92 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloCommonItems.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef CALOREADOUTGEOMETRY_CALOCOMMONITEMS_H +#define CALOREADOUTGEOMETRY_CALOCOMMONITEMS_H + +class FaserDetectorID; + +// Message Stream Member +#include "AthenaKernel/MsgStreamMember.h" +#include "CxxUtils/checker_macros.h" +// #include "InDetCondTools/ISiLorentzAngleTool.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/RCBase.h" + + +#include "GaudiKernel/ServiceHandle.h" +#include "CLHEP/Geometry/Transform3D.h" + +#include <mutex> + +// mutable Athena::MsgStreamMember issues warnings. +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; + +namespace CaloDD { + + /** @class CaloCommonItems + + Helper class to concentrate common items, such as the pointer to the IdHelper, + + To be used for Veto, Trigger and Preshower. + + @author: Grant Gorfine + mondified & maintained: Nick Styles, Andreas Salzburger + modified: Dave Casper + */ + + class CaloCommonItems: public RCBase + { + + public: + + CaloCommonItems(const FaserDetectorID* const idHelper); + + const FaserDetectorID* getIdHelper() const; + // const HepGeom::Transform3D & solenoidFrame() const; + // void setSolenoidFrame(const HepGeom::Transform3D & transform) const; + + //Declaring the Message method for further use + MsgStream& msg (MSG::Level lvl) const { return m_msg.get() << lvl; } + + //Declaring the Method providing Verbosity Level + bool msgLvl (MSG::Level lvl) const { return m_msg.get().level() <= lvl; } + + private: + + //Declaring private message stream member. + mutable Athena::MsgStreamMember m_msg; + + const FaserDetectorID* m_idHelper; + // mutable HepGeom::Transform3D m_solenoidFrame ATLAS_THREAD_SAFE; // Guarded by m_mutex + + mutable std::mutex m_mutex; + }; + + + inline const FaserDetectorID* CaloCommonItems::getIdHelper() const + { + return m_idHelper; + } + + + // inline const HepGeom::Transform3D & SiCommonItems::solenoidFrame() const + // { + // std::lock_guard<std::mutex> lock{m_mutex}; + // return m_solenoidFrame; + // // This reference might be changed by setSolenoidFrame. + // // However, it occurrs very rarely. + // } + + + +} // End namespace CaloDD + +#endif // CALOREADOUTGEOMETRY_CALOCOMMONITEMSS_H diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDD_Defs.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDD_Defs.h new file mode 100644 index 0000000000000000000000000000000000000000..029f1656ef2501bf0826011c4da0386485137b65 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDD_Defs.h @@ -0,0 +1,22 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloDD_Defs.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef CALOREADOUTGEOMETRY_CALODD_Defs_H +#define CALOREADOUTGEOMETRY_CALODD_Defs_H + + +namespace CaloDD { + enum FrameType {local, global, other}; +// enum CarrierType {holes, electrons}; + // new enumerator to select given align-folder structure + enum AlignFolderType {none = -1, static_run1 = 0, timedependent_run2 = 1}; +} + +#endif // CALOREADOUTGEOMETRY_CALODD_DEFS_H diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorDesign.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorDesign.h new file mode 100644 index 0000000000000000000000000000000000000000..9206fe4376a96907c30e15b2d032df4df4eaf7fc --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorDesign.h @@ -0,0 +1,176 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloDetectorDesign.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef CALOREADOUTGEOMETRY_CALODETECTORDESIGN_H +#define CALOREADOUTGEOMETRY_CALODETECTORDESIGN_H + +// Input/output classes +#include "CaloReadoutGeometry/CaloDD_Defs.h" +#include "CLHEP/Geometry/Point3D.h" +#include "CLHEP/Geometry/Vector3D.h" +#include "FaserDetDescr/FaserDetectorID.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/RCBase.h" + +#include <list> +#include <vector> + + +class Identifier; + +namespace Trk { +class SurfaceBounds; +class RectangleBounds; +} + +namespace CaloDD { +class CaloLocalPosition; +class CaloIntersect; + +enum DetectorShape { + Box=0, Trapezoid, Annulus, Other +}; + +/** @class CaloDetectorDesign + + Base class for the detector design classes for Ecal. + These hold the local description of the detector elements which are + shared by a number of detector elements. + + @author A. Calvet, Grant Gorfine + */ + +class CaloDetectorDesign: public RCBase { +public: + enum Axis { + xAxis = 0, yAxis, zAxis + }; + + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// +public: + /** Constructor + */ + + CaloDetectorDesign( const double width, + const double height, + const double length, + const int cells ); + + /** Destructor: */ + virtual ~CaloDetectorDesign(); + + /////////////////////////////////////////////////////////////////// + // Const methods: + /////////////////////////////////////////////////////////////////// + + /** Test if point is in the active part of the detector with specified tolerances */ + CaloIntersect inDetector(const CaloLocalPosition &localPosition, double xTol, + double yTol) const; + + /** which axis in hit frame is horizontal */ + /** phi corresponds to "width" */ + CaloDetectorDesign::Axis phiAxis() const; + + /** which axis in hit frame is vertical */ + /** eta corresponds to "length" (really "height"...)*/ + CaloDetectorDesign::Axis etaAxis() const; + + /** which axis in hit frame is thickness/beam direction */ + CaloDetectorDesign::Axis depthAxis() const; + + /////////////////////////////////////////////////////////////////// + // Pure virtual methods: + /////////////////////////////////////////////////////////////////// + + /** Returns distance to nearest detector active edge + +ve = inside + -ve = outside */ + virtual void distanceToDetectorEdge(const CaloLocalPosition &localPosition, + double &xDist, double &yDist) const; + + /** Method to calculate length of a module (global z coordinate)*/ + virtual double length() const; + + /** Method to calculate average width of a module (global x coordinate)*/ + virtual double width() const; + + /** Method which returns thickness of a module (global y coordinate) */ + double height() const; + + /** Number of PMTs */ + int cells() const; + + // /** Shape of element */ + virtual DetectorShape shape() const; + + /** Element boundary */ + virtual const Trk::SurfaceBounds &bounds() const; + + /////////////////////////////////////////////////////////////////// + // Private methods: + /////////////////////////////////////////////////////////////////// +private: + CaloDetectorDesign(); + + /////////////////////////////////////////////////////////////////// + // Private data: + /////////////////////////////////////////////////////////////////// +private: + double m_width; + double m_height; + double m_length; + int m_cells; // !< number of pmts + + CaloDetectorDesign::Axis m_phiAxis; // which axis in hit frame is horizontal ("width" axis) + CaloDetectorDesign::Axis m_etaAxis; // which axis in hit frame is vertical ("height" axis) + CaloDetectorDesign::Axis m_depthAxis; // which axis in hit frame is depth/beam? + + const Trk::RectangleBounds* m_bounds; + + // Disallow Copy and assignment; + CaloDetectorDesign(const CaloDetectorDesign &design); + CaloDetectorDesign &operator = (const CaloDetectorDesign &design); +}; + +/////////////////////////////////////////////////////////////////// +// Inline methods: +/////////////////////////////////////////////////////////////////// +inline double CaloDetectorDesign::height() const { + return m_height; +} + +inline double CaloDetectorDesign::width() const { + return m_width; +} + +inline double CaloDetectorDesign::length() const { + return m_length; +} + +inline int CaloDetectorDesign::cells() const { + return m_cells; +} + +inline CaloDetectorDesign::Axis CaloDetectorDesign::phiAxis() const { + return m_phiAxis; +} + +inline CaloDetectorDesign::Axis CaloDetectorDesign::etaAxis() const { + return m_etaAxis; +} + +inline CaloDetectorDesign::Axis CaloDetectorDesign::depthAxis() const { + return m_depthAxis; +} + +} // namespace CaloDD +#endif // CALOREADOUTGEOMETRY_CALODETECTORDESIGN_H diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorElement.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorElement.h new file mode 100644 index 0000000000000000000000000000000000000000..452822c0a481ba734b8c18aa5174cc04c3179e8f --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorElement.h @@ -0,0 +1,755 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file CaloDetectorElement.h +**/ + +#ifndef CALOREADOUTGEOMETRY_CALODETECTORELEMENT_H +#define CALOREADOUTGEOMETRY_CALODETECTORELEMENT_H + +// Base class. +#include "TrkDetElementBase/TrkDetElementBase.h" + +// Data member classes +#include "CxxUtils/CachedUniquePtr.h" +#include "Identifier/Identifier.h" +#include "Identifier/IdentifierHash.h" +#include "CaloReadoutGeometry/CaloDetectorDesign.h" +#include "CaloReadoutGeometry/CaloLocalPosition.h" +#include "TrkEventPrimitives/ParamDefs.h" +#include "CaloReadoutGeometry/CaloIntersect.h" +#include "CaloReadoutGeometry/CaloCommonItems.h" +#include "CaloReadoutGeometry/CaloDD_Defs.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" + +#include "CLHEP/Geometry/Point3D.h" + +#include <atomic> +#include <mutex> + +class FaserDetectorID; +class GeoVFullPhysVol; +class GeoAlignmentStore; + +namespace Trk{ + class Surface; + class SurfaceBounds; +} + +namespace CaloDD { + + /** + + @class CaloDetectorElement + + Class to hold geometrical description of a calorimeter detector element. + A detector element is a single calorimeter module. + + @par Coordinate Frames. + + The following coordinate frames are used in these elements. + + - Global frame:\n + Currently global frame in G4/GeoModel. Probably eventually + will be global frame most suitable for reconstruction + (eg solenoid axis). + + - Local hit frame:\n + Local frame for hits. It is the same as local frame in G4 and GeoModel. + I also refer to this as the local simulation frame. + In FASER: + - hitDepth = local z = global z (always beam direction) + - hitEta = local y = global y (always vertical up) + - hitPhi = local x (right-handed wrt y cross z, hence same as global x; left of beam direction) + (hitPhi, hitEta, hitDepth) is right-handed + In veto/preshower, photon direction is +hitEta = +y + In trigger, pmt number increases in +hitPhi direction = +x + In ATLAS (retained for reference): + By convention elements are orientated such that: + - hitDepth = local x + - hitPhi = local y + - hitEta = local z + Directions of these correspond to the physical wafer. Consequently hitDepth and hitPhi axes go in + different directions depending on the orientation of the module. + The readout side is determined from design()->readoutSide(). + + - Local reconstruction frame:\n + - distPhi = local x (= global x in FASER) + - distEta = local y (= global y in FASER) + - distDepth = local z (= global z in FASER) + . + (In ATLAS:) + The directions of the axes are defined as + - distPhi in direction of increasing phi + - distEta in direction of increasing z in barrel and increasing r in endcap. + - distDepth (normal) choosen to give right-handed coordinate. + => away from intersection point for barrel, decreasing z for endcap + + @par Overview of Methods + + Methods are grouped into the the following categories + + - Identification + - Navigation + - Transformation/Orientation + - Module Frame + - Element Extent + - Design methods + - Intersection Tests + - Lorentz Correction + - Readout cell id + - Miscellaneous + - Cache handling. + + + @author Grant Gorfine + - modified & maintained: Nick Styles, Andreas Salzburger + - modified Nigel Hessey: get directions from the design instead of hard-wiring them + - modified for Faser: Dave Casper + + */ + + class CaloDetectorElement : public Trk::TrkDetElementBase { + + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// + public: + + + /// Constructor: + CaloDetectorElement(const Identifier &id, + const CaloDetectorDesign *design, + const GeoVFullPhysVol *geophysvol, + const CaloCommonItems * commonItems, + const GeoAlignmentStore* geoAlignStore=nullptr); + + /// Destructor: + virtual ~CaloDetectorElement(); + + + /////////////////////////////////////////////////////////////////// + // + /// @name Identification + /// Methods to identify the element and identifier manipulation. + // + /////////////////////////////////////////////////////////////////// + + //@{ + + /// identifier of this detector element: + Identifier identify() const; + + /// identifier hash + IdentifierHash identifyHash() const; + + /// Returns the id helper + const FaserDetectorID* getIdHelper() const; + + // bool isVeto() const; + // bool isTrigger() const; + // bool isPreshower() const; + bool isEcal() const; + + // Identifier <-> pmt + + /// Identifier from pmt + Identifier identifierFromCellId(const int& cellId) const; + + /// pmt from Identifier + int cellIdFromIdentifier(const Identifier & identifier) const; + + //@} + + + /////////////////////////////////////////////////////////////////// + // + /// @name Navigation + /// Methods to access neighbours. + // + /////////////////////////////////////////////////////////////////// + + //@{ + const CaloDetectorElement* nextInEta() const; // inline + const CaloDetectorElement* prevInEta() const; // inline + const CaloDetectorElement* nextInPhi() const; // inline + const CaloDetectorElement* prevInPhi() const; // inline + + // const CaloDetectorElement* nextInZ() const; + // const CaloDetectorElement* prevInZ() const; + //@} + + /////////////////////////////////////////////////////////////////// + // + /// @name Transformation/Orientation + // + /////////////////////////////////////////////////////////////////// + + //@{ + // Position + /// Local (simulation/hit frame) to global transform + virtual const GeoTrf::Transform3D & transformHit() const; + /// Local (reconstruction frame) to global transform + const Amg::Transform3D & transform() const; + /// Default Local (reconstruction frame) to global transform + /// ie with no misalignment. + const HepGeom::Transform3D defTransformCLHEP() const; + const Amg::Transform3D defTransform() const; + /// Center in global coordinates + const Amg::Vector3D & center() const; + + const HepGeom::Transform3D & transformCLHEP() const; + + /// Simulation/Hit local frame to reconstruction local frame. 2D. + // TODO: Will change order of parameters at some point. + Amg::Vector2D hitLocalToLocal(double xEta, double xPhi) const; + /// Same as previuos method but 3D. + HepGeom::Point3D<double> hitLocalToLocal3D(const HepGeom::Point3D<double> & hitPosition) const; + + /// Transform to go from local reconstruction frame to local hit frame. + const HepGeom::Transform3D recoToHitTransform() const; + + /// Directions of hit depth,phi,eta axes relative to reconstruction local position + /// axes (LocalPosition). Returns +/-1. + double hitDepthDirection() const; + /// See previous method. + double hitPhiDirection() const; + /// See previous method. + double hitEtaDirection() const; + + // To determine if readout direction between online and offline needs swapping, see methods + // swapPhiReadoutDirection() and swapEtaReadoutDirection() below in "Readout Cell id" section + + // Orientation. + // Directions. + // phiAxis - in same direction as increasing phi and identifier phi_index/strip. + // NB. This requires some flipping of axes with repsect to the hits. + // etaAxis - in direction of increasing z in the barrel and increasing r in the endcap. + // normal - choosen to give right-handed coordinate frame (x=normal,y=phiAxis,z=etaAxis) + // NB. This requires some flipping of axes with repsect to the hits. + + /// Get reconstruction local x axes in global frame. + const Amg::Vector3D & phiAxis() const; + const HepGeom::Vector3D<double> & phiAxisCLHEP() const; + /// Get reconstruction local y axes in global frame. + const Amg::Vector3D & etaAxis() const; + const HepGeom::Vector3D<double> & etaAxisCLHEP() const; + /// Get reconstruction local normal axes in global frame. Choosen to give right-handed coordinate frame. + const Amg::Vector3D & normal() const; + + /// transform a hit local position into a global position: + HepGeom::Point3D<double> globalPositionHit(const HepGeom::Point3D<double> &simulationLocalPos) const; + Amg::Vector3D globalPositionHit(const Amg::Vector3D &simulationLocalPos) const; + + /// transform a reconstruction local position into a global position: + HepGeom::Point3D<double> globalPosition(const HepGeom::Point3D<double> &localPos) const; + Amg::Vector3D globalPosition(const Amg::Vector3D &localPos) const; + + /// as in previous method but for 2D local position + HepGeom::Point3D<double> globalPositionCLHEP(const Amg::Vector2D &localPos) const; + + Amg::Vector3D globalPosition(const Amg::Vector2D &localPos) const; + + /// transform a global position into a 2D local position (reconstruction frame) + Amg::Vector2D localPosition(const HepGeom::Point3D<double> & globalPosition) const; + + Amg::Vector2D localPosition(const Amg::Vector3D& globalPosition) const; + + /// Element Surface + virtual Trk::Surface & surface(); + virtual const Trk::Surface & surface() const; + + //@} + + /** Returns the full list of surfaces associated to this detector element */ + virtual const std::vector<const Trk::Surface*>& surfaces() const; + + /** + + @name Module Frame + Methods to help work with the module frame. + This is mainly of of use in the SCT where the module frame can + in general be different from the element frame. It is actully + defined as the frame of one of the sides (currently the axial + side), but using these methods one does not need to make any + assumptions about what the actual frame is. In the following + methods the local element frame is the local reconstruction + frame of this element. + */ + + //@{ + + /// Module to global frame transform. + /// Includes misalignment. + //const HepGeom::Transform3D & moduleTransform() const; + const Amg::Transform3D & moduleTransform() const; + + /// Default plate to global frame transform, ie with no misalignment. + Amg::Transform3D defModuleTransform() const; + + /// Take a transform of the local element frame and return its equivalent in the module frame. + //HepGeom::Transform3D localToModuleFrame(const HepGeom::Transform3D & localTransform) const; + Amg::Transform3D localToModuleFrame(const Amg::Transform3D & localTransform) const; + + + /// Transformation from local element to module frame. This can be + /// used to take a local position in the element frame and transform + /// it to a position in the module frame. If one is already in the + /// module frame it will return the Identity transform. + //HepGeom::Transform3D localToModuleTransform() const; + Amg::Transform3D localToModuleTransform() const; + + + //@} + + /////////////////////////////////////////////////////////////////// + // + /// @name Element Extent + /// Methods to get extent of element in x, y and z. + /////////////////////////////////////////////////////////////////// + + //@{ + // Extent in x,y and z + double xMin() const; + double xMax() const; + double yMin() const; + double yMax() const; + double zMin() const; + double zMax() const; + + //@} + + /////////////////////////////////////////////////////////////////// + // + /// @name Design methods + // + /////////////////////////////////////////////////////////////////// + //@{ + + /// access to the local description: + const CaloDetectorDesign &design() const; + + // Methods from design + double width() const; // Width in x direction. + double height() const; // Height in y direction + double length() const; // Length in z direction + + virtual const Trk::SurfaceBounds & bounds() const; + + // Test that it is in the active region + // Intersect has 3 states + // bool SiIntersect::in() const // definitely in + // bool SiIntersect::out() const // definitely out + // bool SiIntersect::nearBoundary() const // near a boundary within the tolerances + // bool SiIntersect::mayIntersect() const // in() OR nearBoundary() + CaloIntersect inDetector(const Amg::Vector2D & localPosition, double phiTol, double etaTol) const; + CaloIntersect inDetector(const HepGeom::Point3D<double> & globalPosition, double phiTol, double etaTol) const; + + //@} + + /////////////////////////////////////////////////////////////////// + // + /// @name Cache handling. + // + /////////////////////////////////////////////////////////////////// + //@{. + // - Methods to handle invalidating and updating caches. The cached values include values that are affected by alignment + // Surface are only created on demand. The method updateAllCaches also creates the surfaces as well as calling updateCache. + // Conditions cache contains Lorentz angle related quantities. + + /// Signal that cached values are no longer valid. + /// Invalidate general cache + // void invalidate ATLAS_NOT_THREAD_SAFE () const; + void invalidate(); + + ///Set/calculate cache values + void setCache(){ + updateCache(); + } + ///Set/calculate all cache values including surfaces. + void setAllCaches(){ + updateAllCaches(); + } + //@} + + /////////////////////////////////////////////////////////////////// + // + /// @name Methods to satisfy TrkDetElementBase interface + // + /////////////////////////////////////////////////////////////////// + //{@ + virtual const Amg::Transform3D & transform(const Identifier&) const {return transform();} + virtual const Trk::Surface& surface (const Identifier&) const {return surface();} + virtual const Amg::Vector3D& center (const Identifier&) const {return center();} + virtual const Amg::Vector3D& normal (const Identifier&) const {return normal();} + virtual const Trk::SurfaceBounds & bounds(const Identifier&) const {return bounds();} + //@} + + ////////////////////////////////////////////////////////////////////////////////////// + + // void setNextInZ(const CaloDetectorElement* element); + // void setPrevInZ(const CaloDetectorElement* element); + void setNextInPhi(const CaloDetectorElement* element); + void setPrevInPhi(const CaloDetectorElement* element); + void setNextInEta(const CaloDetectorElement* element); + void setPrevInEta(const CaloDetectorElement* element); + + ////////////////////////////////////////////////////////////////////////////////////// + + public: + + const CaloCommonItems* getCommonItems() const; + + /////////////////////////////////////////////////////////////////// + // Private methods: + /////////////////////////////////////////////////////////////////// + + private: + /// Recalculate cached values. + void updateCache() const; + + /// Update all caches including surfaces. + void updateAllCaches() const; + + + // Common code for constructors. + void commonConstructor(); + + // Calculate extent in x, y and z. The values are cached and there + // are xMin(), xMax etc methods. + void getExtent(double &xMin, double &xMax, + double &yMin, double &yMax, + double &zMin, double &zMax) const; + + // Return the four corners of an element in local coordinates. + // Pass it an array of length 4. + // This function is used by getEtaPhiRegion() + void getCorners(HepGeom::Point3D<double> *corners) const; + + //Declaring the Message method for further use + MsgStream& msg (MSG::Level lvl) const { return m_commonItems->msg(lvl);} + + //Declaring the Method providing Verbosity Level + bool msgLvl (MSG::Level lvl) const { return m_commonItems->msgLvl(lvl);} + + + /////////////////////////////////////////////////////////////////// + // Private methods: + /////////////////////////////////////////////////////////////////// + private: + // Don't allow copying. + CaloDetectorElement(); + CaloDetectorElement(const CaloDetectorElement&); + CaloDetectorElement &operator=(const CaloDetectorElement&); + + /////////////////////////////////////////////////////////////////// + // Protected data: + /////////////////////////////////////////////////////////////////// + protected: + Identifier m_id; // identifier of this detector element + IdentifierHash m_idHash; // hash id + const CaloDetectorDesign *m_design; // local description of this detector element + const CaloCommonItems * m_commonItems; + + const CaloDetectorElement* m_prevInPhi; + const CaloDetectorElement* m_nextInPhi; + const CaloDetectorElement* m_prevInEta; + const CaloDetectorElement* m_nextInEta; + // const CaloDetectorElement* m_prevInZ; + // const CaloDetectorElement* m_nextInZ; + + // bool m_isVeto; + // bool m_isTrigger; + // bool m_isPreshower; + bool m_isEcal; + + // + // Cached values. + // + // Axes + CaloDetectorDesign::Axis m_hitEta; + CaloDetectorDesign::Axis m_hitPhi; + CaloDetectorDesign::Axis m_hitDepth; + + // Directions of axes. These are true if the hit/simulation and reconstruction local frames are + // in the same direction and false if they are opposite. + mutable bool m_depthDirection ATLAS_THREAD_SAFE; // Guarded by m_mutex // Direction of depth axis. + // Also direction of readout implant (n+ for pixel, p+ for SCT). + mutable bool m_phiDirection ATLAS_THREAD_SAFE; // + mutable bool m_etaDirection ATLAS_THREAD_SAFE; // + + mutable std::atomic_bool m_cacheValid; // Alignment associated quatities. + mutable std::atomic_bool m_firstTime; + + mutable std::recursive_mutex m_mutex; + + mutable Amg::Transform3D m_transform ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable HepGeom::Transform3D m_transformCLHEP ATLAS_THREAD_SAFE; // Guarded by m_mutex + + mutable Amg::Vector3D m_normal ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable Amg::Vector3D m_etaAxis ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable HepGeom::Vector3D<double> m_etaAxisCLHEP ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable Amg::Vector3D m_phiAxis ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable HepGeom::Vector3D<double> m_phiAxisCLHEP ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable Amg::Vector3D m_center ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable HepGeom::Vector3D<double> m_centerCLHEP ATLAS_THREAD_SAFE; // Guarded by m_mutex + + mutable double m_minX ATLAS_THREAD_SAFE;// Guarded by m_mutex + mutable double m_maxX ATLAS_THREAD_SAFE;// Guarded by m_mutex + mutable double m_minY ATLAS_THREAD_SAFE;// Guarded by m_mutex + mutable double m_maxY ATLAS_THREAD_SAFE;// Guarded by m_mutex + mutable double m_minZ ATLAS_THREAD_SAFE;// Guarded by m_mutex + mutable double m_maxZ ATLAS_THREAD_SAFE;// Guarded by m_mutex + + CxxUtils::CachedUniquePtrT<Trk::Surface> m_surface; + mutable std::vector<const Trk::Surface*> m_surfaces ATLAS_THREAD_SAFE; // Guarded by m_mutex + + const GeoAlignmentStore* m_geoAlignStore{}; + }; + + /////////////////////////////////////////////////////////////////// + // Inline methods: + /////////////////////////////////////////////////////////////////// + + inline HepGeom::Point3D<double> CaloDetectorElement::globalPositionHit(const HepGeom::Point3D<double> &localPos) const + { + return Amg::EigenTransformToCLHEP(transformHit())*localPos; + } + + inline Amg::Vector3D CaloDetectorElement::globalPosition(const Amg::Vector2D &localPos) const + { + if (!m_cacheValid) { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + return m_center + localPos[Trk::distEta] * m_etaAxis + localPos[Trk::distPhi] * m_phiAxis; + } + + inline Amg::Vector3D CaloDetectorElement::globalPositionHit(const Amg::Vector3D &localPos) const + { + return transformHit() * localPos; + } + + inline HepGeom::Point3D<double> CaloDetectorElement::globalPositionCLHEP(const Amg::Vector2D &localPos) const + { + if (!m_cacheValid) { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + return m_centerCLHEP + localPos[Trk::distEta] * m_etaAxisCLHEP + localPos[Trk::distPhi] * m_phiAxisCLHEP; + } + //here + inline Amg::Vector3D CaloDetectorElement::globalPosition(const Amg::Vector3D &localPos) const + { + return transform() * localPos; + } + + inline HepGeom::Point3D<double> CaloDetectorElement::globalPosition(const HepGeom::Point3D<double> &localPos) const + { + return transformCLHEP() * localPos; + } + + inline Amg::Vector2D CaloDetectorElement::localPosition(const HepGeom::Point3D<double> & globalPosition) const + { + if (!m_cacheValid){ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + HepGeom::Vector3D<double> relativePos = globalPosition - m_centerCLHEP; + return Amg::Vector2D(relativePos.dot(m_phiAxisCLHEP), relativePos.dot(m_etaAxisCLHEP)); + } + + inline Amg::Vector2D CaloDetectorElement::localPosition(const Amg::Vector3D & globalPosition) const + { + if (!m_cacheValid){ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + Amg::Vector3D relativePos = globalPosition - m_center; + return Amg::Vector2D(relativePos.dot(m_phiAxis), relativePos.dot(m_etaAxis)); + } + + inline const CaloDetectorDesign &CaloDetectorElement::design() const + { + return *m_design; + } + + inline const FaserDetectorID* CaloDetectorElement::getIdHelper() const + { + return m_commonItems->getIdHelper(); + } + + inline Identifier CaloDetectorElement::identify() const + { + return m_id; + } + + inline IdentifierHash CaloDetectorElement::identifyHash() const + { + return m_idHash; + } + + inline double CaloDetectorElement::hitDepthDirection() const + { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + return (m_depthDirection) ? 1. : -1.; + } + + inline double CaloDetectorElement::hitPhiDirection() const + { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + return (m_phiDirection) ? 1. : -1.; + } + + inline double CaloDetectorElement::hitEtaDirection() const + { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + return (m_etaDirection) ? 1. : -1.; + } + + inline void CaloDetectorElement::invalidate() + { + m_cacheValid = false; + } + + inline void CaloDetectorElement::updateAllCaches() const + { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + if (not m_surface) surface(); + } + + + inline double CaloDetectorElement::xMin() const + { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + return m_minX; + } + + inline double CaloDetectorElement::xMax() const + { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + return m_maxX; + } + + inline double CaloDetectorElement::yMin() const + { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + return m_minY; + } + + inline double CaloDetectorElement::yMax() const + { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + return m_maxY; + } + + inline double CaloDetectorElement::zMin() const + { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + return m_minZ; + } + + inline double CaloDetectorElement::zMax() const + { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + return m_maxZ; + } + + inline double CaloDetectorElement::width() const + { + return m_design->width(); + } + + inline double CaloDetectorElement::length() const + { + return m_design->length(); + } + + inline double CaloDetectorElement::height() const + { + return m_design->height(); + } + + inline const CaloCommonItems* CaloDetectorElement::getCommonItems() const + { + return m_commonItems; + } + + inline const CaloDetectorElement* CaloDetectorElement::prevInPhi() const + { + return m_prevInPhi; + } + + inline const CaloDetectorElement* CaloDetectorElement::nextInPhi() const + { + return m_nextInPhi; + } + + inline const CaloDetectorElement* CaloDetectorElement::prevInEta() const + { + return m_prevInEta; + } + + inline const CaloDetectorElement* CaloDetectorElement::nextInEta() const + { + return m_nextInEta; + } + + // inline const CaloDetectorElement* CaloDetectorElement::prevInZ() const + // { + // return m_prevInZ; + // } + + // inline const CaloDetectorElement* CaloDetectorElement::nextInZ() const + // { + // return m_nextInZ; + // } + + inline void CaloDetectorElement::setPrevInPhi(const CaloDetectorElement* element) + { + m_prevInPhi = element; + } + + inline void CaloDetectorElement::setNextInPhi(const CaloDetectorElement* element) + { + m_nextInPhi = element; + } + + inline void CaloDetectorElement::setPrevInEta(const CaloDetectorElement* element) + { + m_prevInEta = element; + } + + inline void CaloDetectorElement::setNextInEta(const CaloDetectorElement* element) + { + m_nextInEta = element; + } + + // inline void CaloDetectorElement::setPrevInZ(const CaloDetectorElement* element) + // { + // m_prevInZ = element; + // } + + // inline void CaloDetectorElement::setNextInZ(const CaloDetectorElement* element) + // { + // m_nextInZ = element; + // } + +} // namespace CaloDD + +#endif // CALOREADOUTGEOMETRY_CALODETECTORELEMENT_H + diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorElementCollection.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorElementCollection.h new file mode 100644 index 0000000000000000000000000000000000000000..1178eee2328e4466b44aeb157624caff20d82210 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorElementCollection.h @@ -0,0 +1,44 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloDetectorElementCollection.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + + +#ifndef CALOREADOUTGEOMETRY_CALODETECTORELEMENTCOLLECTION_H +#define CALOREADOUTGEOMETRY_CALODETECTORELEMENTCOLLECTION_H + +#include <vector> + +class IdentifierHash; + +namespace CaloDD { + + class CaloDetectorElement; + + /** @class CaloDetectorElementCollection + + Class to hold the CaloDetectorElement objects to be put in the detector store + + @author Grant Gorfine + @author Dave Casper + */ + + class CaloDetectorElementCollection : public std::vector<CaloDetectorElement *> { + public: + ~CaloDetectorElementCollection(); + const CaloDetectorElement* getDetectorElement(const IdentifierHash& hash) const; + }; + +} // namespace CaloDD + +#include "AthenaKernel/CLASS_DEF.h" +CLASS_DEF( CaloDD::CaloDetectorElementCollection , 1131534083 , 1 ) +#include "AthenaKernel/CondCont.h" +CONDCONT_DEF( CaloDD::CaloDetectorElementCollection, 1117233743 ); + +#endif // CALOREADOUTGEOMETRY_CALODETECTORELEMENTCOLLECTION_H diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorManager.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorManager.h new file mode 100644 index 0000000000000000000000000000000000000000..517d1f1453a86ff088d4729280eb3ed884938be5 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorManager.h @@ -0,0 +1,145 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloDetectorManager.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef CALOREADOUTGEOMETRY_CALODETECTORMANAGER_H +#define CALOREADOUTGEOMETRY_CALODETECTORMANAGER_H + +#include "CaloReadoutGeometry/CaloDetectorManagerBase.h" + +#include "CaloReadoutGeometry/CaloDetectorElementCollection.h" +#include "CaloReadoutGeometry/CaloDD_Defs.h" +#include "CaloReadoutGeometry/CaloNumerology.h" + +// Amg stuff +#include "GeoPrimitives/GeoPrimitives.h" + +#include "CLHEP/Geometry/Transform3D.h" + +#include <string> +#include <map> + +class StoreGateSvc; +class Identifier; +class IdentifierHash; +class FaserDetectorID; +class GeoAlignableTransform; +class GeoVAlignmentStore; + +namespace CaloDD { + +class CaloDetectorElement; +class CaloDetectorDesign; +class ExtendedAlignableTransform; +class CaloNumerology; + + /** @class CaloDetectorManager + + Base class for Calorimeter Detector managers. + + The Detector manager has methods to retrieve the Identifier + helper and methods to retrieve the detector elements. It also + manages the alignment with methods to register the call backs + and infrastructure to associate the alignment transforms with + the appropriate alignable transform in GeoModel. + + @author: Grant Gorfine + - modified and maintained by Nick Styles & Andreas Salzburger + */ + + class CaloDetectorManager : public CaloDetectorManagerBase { + + + public: + + // Constructor + CaloDetectorManager(StoreGateSvc * detStore, const std::string & name); + + // Destructor + virtual ~CaloDetectorManager() {}; + + + // + // Access Readout Elements + // + + /** access to individual elements using Identifier or IdentiferHash */ + virtual CaloDetectorElement * getDetectorElement(const Identifier &id) const = 0; + virtual CaloDetectorElement * getDetectorElement(const IdentifierHash &idHash) const = 0; + + /** access to whole collectiom */ + virtual const CaloDetectorElementCollection * getDetectorElementCollection() const = 0; + virtual CaloDetectorElementCollection::const_iterator getDetectorElementBegin() const = 0; + virtual CaloDetectorElementCollection::const_iterator getDetectorElementEnd() const = 0; + + + /** Add elememts */ + virtual void addDetectorElement(CaloDetectorElement * element) = 0; + + /** Initialize the neighbours. This can only be done when all elements are built */ + virtual void initNeighbours() = 0; + + /** Get tag used in dictionary */ + const std::string & tag() const; + + /** Invalidate cache for all detector elements */ + virtual void invalidateAll() const; + + /** Update all caches */ + virtual void updateAll() const; + + + /** Helper method to set delta transform from a global delta - Amg interface*/ + bool setAlignableTransformGlobalDelta(ExtendedAlignableTransform * extXF, + const Amg::Transform3D & delta, + GeoVAlignmentStore* alignStore=nullptr) const; + + /** Helper method to set delta transform from a local delta - Amg interface */ + bool setAlignableTransformLocalDelta(ExtendedAlignableTransform * extXF, + const Amg::Transform3D & localToGlobalXF, + const Amg::Transform3D & delta, + GeoVAlignmentStore* alignStore=nullptr) const; + + /** Access to module design */ + + void setDesign(const CaloDetectorDesign*); + const CaloDetectorDesign* getDesign() const; + + /** Access Numerology */ + const CaloNumerology & numerology() const {return m_numerology;} + CaloNumerology & numerology() {return m_numerology;} + + private: + //** Prevent copy and assignment */ + const CaloDetectorManager & operator=(const CaloDetectorManager &right); + CaloDetectorManager(const CaloDetectorManager &right); + + /** This method is called by the CaloDetectorManagerBase */ + virtual bool setAlignableTransformDelta(int level, + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore) const = 0; + + std::string m_tag; + CaloNumerology m_numerology; + const CaloDetectorDesign * m_design; + + }; + + +} // namespace CaloDD + +#ifndef GAUDI_NEUTRAL +#include "AthenaKernel/CLASS_DEF.h" + +CLASS_DEF(CaloDD::CaloDetectorManager, 231427264, 1) +#endif + +#endif // CALOREADOUTGEOMETRY_CALODETECTORMANAGER_H diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorManagerBase.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorManagerBase.h new file mode 100644 index 0000000000000000000000000000000000000000..dde80dee44c93f548da08c60835cf47f162b272f --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloDetectorManagerBase.h @@ -0,0 +1,204 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloDectorManagerBase.h (was InDetDetectorManager.h) +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef CALOREADOUTGEOMETRY_CALODETECTORMANAGERBASE_H +#define CALOREADOUTGEOMETRY_CALODETECTORMANAGERBASE_H + +// Amg +#include "GeoPrimitives/GeoPrimitives.h" +// GeoModel stuff +#include "GeoModelKernel/GeoVDetectorManager.h" +#include "CaloReadoutGeometry/CaloDD_Defs.h" +#include "CaloReadoutGeometry/Version.h" +#include "CLHEP/Geometry/Transform3D.h" +// Message Stream Member +#include "AthenaKernel/MsgStreamMember.h" + +// IOV SVC for alignment: +#include "AthenaKernel/IIOVSvc.h" + +#include "DetDescrConditions/AlignableTransformContainer.h" + +#include "CxxUtils/checker_macros.h" + +#include <atomic> +#include <string> +#include <map> +#include <set> +#include <list> + +class StoreGateSvc; +class AlignableTransform; +class Identifier; +class FaserDetectorID; +class GeoVAlignmentStore; +class CondAttrListCollection; + +// mutable Athena::MsgStreamMember issues warnings. +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; + +namespace CaloDD { + + typedef std::map<std::string, const void*> RawAlignmentObjects; + + /** @class CaloDetectorManagerBase + + Virtual base class for all Calorimeter detector managers. + + It implements the processKey() method for alingment + which calls the setAlignableTransformDelta() method which + is specified in the extended classes. This method supports both, + local and global delta's in the frame and translates it to the + underlying GeoModel transform. As GeoModel (CLHEP) and tracking + (Amg) use different geo libraries, these are the methods that + act as the CLHEP <--> Amg interface + + @author: Grant Gorfine + - modified & maintained: Nick Styles & Andreas Salzburger + */ + class CaloDetectorManagerBase : public GeoVDetectorManager { + + public: + + // Constructor + CaloDetectorManagerBase(StoreGateSvc * detStore, const std::string & name); + + // Destructor + virtual ~CaloDetectorManagerBase(); + + + /** Get version information */ + const Version & getVersion() const; + const std::string & getLayout() const; // eg Initial, Final, TestBeam + void setVersion(const Version & version); + + /** Alignment access */ + void addChannel(const std::string & key, int level, FrameType frame); + void addFolder(const std::string & key); + void addSpecialFolder(const std::string & key); + void addGlobalFolder(const std::string & key); + void addAlignFolderType(const AlignFolderType alignfolder); + + StatusCode align( IOVSVC_CALLBACK_ARGS ) const; + + StatusCode align(const RawAlignmentObjects& alignObjects, GeoVAlignmentStore* alignStore) const; + + /** Invalidate cache for all detector elements */ + virtual void invalidateAll() const = 0; + + /** Update all caches */ + virtual void updateAll() const = 0; + + /** Check identifier is for this detector */ + virtual bool identifierBelongs(const Identifier & id) const = 0; + + /** Declaring the Message method for further use */ + MsgStream& msg (MSG::Level lvl) const { return m_msg.get() << lvl; } + + /** Declaring the Method providing Verbosity Level */ + bool msgLvl (MSG::Level lvl) const { return m_msg.get().level() <= lvl; } + + AlignFolderType m_alignfoldertype; + + protected: + StoreGateSvc * m_detStore; + + private: + /** @class LevelInfo + Private helper class definition. + */ + class LevelInfo { + + private: + int m_level; + FrameType m_type; + + public: + LevelInfo(): m_level(-1), m_type(CaloDD::global) {}; + LevelInfo(int level, FrameType frame): m_level(level), m_type(frame) {}; + + int level() const {return m_level;} + FrameType frame() const {return m_type;} + bool isGlobalDelta() const {return m_type == CaloDD::global;} + bool isLocalDelta() const {return m_type == CaloDD::local;} + bool isValid() const {return (m_level >= 0);} + + }; + + class AlignInfo { + + private: + AlignFolderType m_aligntype; + + public: + AlignInfo(): m_aligntype(CaloDD::none) {}; + AlignInfo(AlignFolderType alignfolder): m_aligntype(alignfolder) {}; + AlignFolderType AlignFolder() const {return m_aligntype;} + bool isValidAlign() const {return (m_aligntype != CaloDD::none);} + + }; + + + /** Retrieve level information */ + const LevelInfo & getLevel(const std::string & key) const; + + /** return align folder string to use **/ + // CaloDD::AlignFolderType getAlignInfo(); + + /** Process the alignment container, calls processKey */ + bool processAlignmentContainer(const std::string & key) const; + bool processAlignmentContainer(const AlignableTransformContainer* container, GeoVAlignmentStore* alignStore) const; + + /** Called by processAlignmentContainer, + applies only one key on the transform Collections */ + bool processKey(const std::string key, + const AlignableTransform* transformCollection, + GeoVAlignmentStore* alignStore=nullptr) const; + + /** Set method applying the delta transform (in global or local frame) + onto the geoModel transform : CLHEP <--> Amg interface */ + virtual bool setAlignableTransformDelta(int level, + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore=nullptr) const = 0; + + virtual bool processSpecialAlignment(const std::string & key, + CaloDD::AlignFolderType alignfolder) const = 0; + + virtual bool processSpecialAlignment(const std::string& key, + const CondAttrListCollection* obj=nullptr, + GeoVAlignmentStore* alignStore=nullptr) const = 0; + + bool processGlobalAlignmentContainer(const std::string & key, + const CondAttrListCollection* obj=nullptr, + GeoVAlignmentStore* alignStore=nullptr) const; + + virtual bool processGlobalAlignment(const std::string & key, int level, FrameType frame, + const CondAttrListCollection* obj=nullptr, + GeoVAlignmentStore* alignStore=nullptr) const; + + virtual const FaserDetectorID* getIdHelper() const = 0; + + //Declaring private message stream member. + mutable Athena::MsgStreamMember m_msg; + + Version m_version; + std::map<std::string, LevelInfo> m_keys; + std::set<std::string> m_folders; + std::set<std::string> m_specialFolders; + std::set<std::string> m_globalFolders; // new time-dependent global folders + + static const LevelInfo s_invalidLevel; + }; + +} // namespace CaloDD + +#endif // CALOREADOUTGEOMETRY_CALODETECTORMANAGERBASE_H diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloIntersect.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloIntersect.h new file mode 100644 index 0000000000000000000000000000000000000000..7ee73dc1d49858cd425d123726d63057dd89ab75 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloIntersect.h @@ -0,0 +1,94 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloIntersect.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef CALOREADOUTGEOMETRY_CALOINTERSECT_H +#define CALOREADOUTGEOMETRY_CALOINTERSECT_H + +namespace CaloDD { + + /** @class CaloIntersect + + class to run intersection tests + + @author Grant Gorfine + */ + + class CaloIntersect { + + public: + + enum IntersectState {OUT = 0, BOUNDARY = 1, IN = 2}; + + CaloIntersect(IntersectState state = OUT); + + bool in() const; // Definitely in + bool out() const; // Definitely out + bool nearBoundary() const; // Near boundary within tolerences + bool mayIntersect() const; // in() || nearBoundary() + operator bool() const; // Equivalent to mayIntersect(). + + void setIn(); + void setOut(); + void setNearBoundary(); + + private: + IntersectState m_state; + + }; + +inline CaloIntersect::CaloIntersect(IntersectState state) + : m_state(state) +{} + +inline bool CaloIntersect::in() const +{ + return (m_state == IN); +} + +inline bool CaloIntersect::out() const +{ + return (m_state == OUT); +} + +inline bool CaloIntersect::nearBoundary() const +{ + return (m_state == BOUNDARY); +} + + +inline bool CaloIntersect::mayIntersect() const +{ + return (m_state == BOUNDARY || m_state == IN); +} + +inline CaloIntersect::operator bool() const +{ + return mayIntersect(); +} + +inline void CaloIntersect::setIn() +{ + m_state = IN; +} + +inline void CaloIntersect::setOut() +{ + m_state = OUT; +} + +inline void CaloIntersect::setNearBoundary() +{ + m_state = BOUNDARY; +} + +} // namespace CaloDD + +#endif //CALOREADOUTGEOMETRY_CALOINTERSECT_H + diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloLocalPosition.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloLocalPosition.h new file mode 100644 index 0000000000000000000000000000000000000000..9b78c81ad2637899e8e02dfdbeca9e3f22e5a388 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloLocalPosition.h @@ -0,0 +1,173 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloLocalPosition.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef CALOREADOUTGEOMETRY_CALOLOCALPOSITION_H +#define CALOREADOUTGEOMETRY_CALOLOCALPOSITION_H + +#include "GeoPrimitives/GeoPrimitives.h" +#include "TrkEventPrimitives/ParamDefs.h" +#include <cmath> + +namespace CaloDD { + enum ExtraLocalPosParam {distDepth = 2}; // These will be defined in Trk soon. +} + +namespace CaloDD { + + /** @class CaloLocalPosition + Class to represent a position in the natural frame of a calorimeter sensor + */ + + class CaloLocalPosition { + + + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// + public: + + /** Default constructor: */ + CaloLocalPosition(); + + /** Copy constructor: */ + CaloLocalPosition(const CaloLocalPosition &position) = default; + + /** This allows one to pass a Amg::Vector2D to a CaloLocalPosition */ + CaloLocalPosition(const Amg::Vector2D &position); + + /** Constructor with parameters: + position along eta direction + position along phi direction + position along depth direction (default is 0) */ + CaloLocalPosition(const double eta,const double phi, + const double xDepth=0); + + /** Destructor: */ + ~CaloLocalPosition(); + + /** Assignment operator: */ + CaloLocalPosition &operator=(const CaloLocalPosition &) = default; + + /** Move assignment **/ + CaloLocalPosition &operator=(CaloLocalPosition &&) = default; + + /////////////////////////////////////////////////////////////////// + // Const methods: + /////////////////////////////////////////////////////////////////// + + /** position along local eta direction:*/ + double xEta() const; + + /** position along local phi direction:*/ + double xPhi() const; + + /** Cylindrical coordinate r:*/ + double r() const; + + /** Cylindrical coordinate phi:*/ + double phi() const; + + /** position along depth direction: */ + double xDepth() const; + + /////////////////////////////////////////////////////////////////// + // Non-const methods: + /////////////////////////////////////////////////////////////////// + + void xEta(const double eta); + + void xPhi(const double phi); + + void xDepth(const double xDepth); + + // addition of positions: + CaloLocalPosition &operator+=(const CaloLocalPosition &position); + + // so we can go from CaloLocalPosition to Trk::LocalPosition + operator Amg::Vector2D(void) const; + + // scaling: + CaloLocalPosition &operator*=(const double factor); + CaloLocalPosition &operator/=(const double factor); + + /////////////////////////////////////////////////////////////////// + // Private data: + /////////////////////////////////////////////////////////////////// + + private: + double m_eta; //!< position along eta direction + double m_phi; //!< position along phi direction + double m_xDepth; //!< position along depth direction + }; + +/////////////////////////////////////////////////////////////////// +// Inline methods: +/////////////////////////////////////////////////////////////////// +inline CaloLocalPosition::~CaloLocalPosition() +{} + +inline double CaloLocalPosition::xEta() const +{ + return m_eta; +} + +inline double CaloLocalPosition::xPhi() const +{ + return m_phi; +} + +inline double CaloLocalPosition::xDepth() const +{ + return m_xDepth; +} + +inline double CaloLocalPosition::r() const +{ + return std::sqrt(m_eta * m_eta + m_phi * m_phi); +} + +inline double CaloLocalPosition::phi() const +{ + return std::atan2(m_phi, m_eta); +} + +inline void CaloLocalPosition::xEta(const double y) +{ + m_eta=y; +} + +inline void CaloLocalPosition::xPhi(const double x) +{ + m_phi=x; +} + +inline void CaloLocalPosition::xDepth(const double xDepth) +{ + m_xDepth=xDepth; +} + +/////////////////////////////////////////////////////////////////// +// Binary operators: +/////////////////////////////////////////////////////////////////// +CaloLocalPosition operator+(const CaloLocalPosition &position1, + const CaloLocalPosition &position2); + +CaloLocalPosition operator*(const CaloLocalPosition &position,const double factor); + +inline CaloLocalPosition operator*(const double factor,const CaloLocalPosition &position) +{ + return position*factor; +} + +CaloLocalPosition operator/(const CaloLocalPosition &position,const double factor); + +} // namespace CaloDD + +#endif // CALOREADOUTGEOMETRY_CALOLOCALPOSITION_H diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloNumerology.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloNumerology.h new file mode 100644 index 0000000000000000000000000000000000000000..dc9a041e41b0c8526b186e16574b05e43b057c42 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloNumerology.h @@ -0,0 +1,68 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloNumerology.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + + +#ifndef CALOREADOUTGEOMETRY_CALONUMEROLOGY_H +#define CALOREADOUTGEOMETRY_CALONUMEROLOGY_H + +#include <set> + +namespace CaloDD { + + /** @class CaloNumerology + + Class to extract numerology for Ecal. For example number of rows, modules, pmts, etc. + + @author Grant Gorfine + */ + + class CaloNumerology { + + + public: + + /** Constructor: */ + CaloNumerology(); + + // Accessors: + + /** Number of rows */ + int numRows() const; + + /** Number of modules in a row */ + int numModulesPerRow() const; + + /** Number of pmts for module */ + int numPmtsPerModule() const; + + const std::set<int>& rowIds() const; + + // Check presence of row + /** Check if row exists */ + bool useRow(int row) const; + + + // Modifiers: + void addRow(int id); + void setNumModulesPerRow(int modules); + void setNumPmtsPerModule(int pmts); + + private: + + int m_numModulesPerRow; + int m_numPmtsPerModule; + std::set<int> m_rowIds; + }; + +}// End namespace + +#include "CaloNumerology.icc" + +#endif // CALOREADOUTGEOMETRY_CALONUMEROLOGY_H diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloNumerology.icc b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloNumerology.icc new file mode 100644 index 0000000000000000000000000000000000000000..f6cf532429efe7ea432513d5a5be49ae42bc6ce3 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/CaloNumerology.icc @@ -0,0 +1,33 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +namespace CaloDD { + + +inline int CaloNumerology::numRows() const +{ + return m_rowIds.size(); +} + +inline int CaloNumerology::numModulesPerRow() const +{ + return m_numModulesPerRow; +} + +inline int CaloNumerology::numPmtsPerModule() const +{ + return m_numPmtsPerModule; +} + +inline bool CaloNumerology::useRow(int row) const +{ + return (m_rowIds.count(row) > 0); +} + +inline const std::set<int>& CaloNumerology::rowIds() const +{ + return m_rowIds; +} + +} // End namespace diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/EcalDetectorManager.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/EcalDetectorManager.h new file mode 100644 index 0000000000000000000000000000000000000000..e16d546b464300c493e19fa8b0f5888bc07ee7ca --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/EcalDetectorManager.h @@ -0,0 +1,163 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// EcalDetectorManager.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef CALOREADOUTGEOMETRY_ECALDETECTORMANAGER_H +#define CALOREADOUTGEOMETRY_ECALDETECTORMANAGER_H + +#include "GeoPrimitives/GeoPrimitives.h" + +#include "GeoModelKernel/GeoVPhysVol.h" + +#include "CaloReadoutGeometry/CaloDetectorManager.h" +#include "CaloReadoutGeometry/CaloDetectorElementCollection.h" +#include "CaloReadoutGeometry/CaloDD_Defs.h" + +#include "FaserCaloIdentifier/EcalID.h" + +class StoreGateSvc; +class Identifier; +class IdentifierHash; +class GeoAlignableTransform; +class GeoVFullPhysVol; +class GeoVPhysVol; +class GeoVAlignmentStore; +class CondAttrListCollection; + +namespace CaloDD { + + class CaloDetectorElement; + class ExtendedAlignableTransform; + class EcalDetectorDesign; + + /** @class EcalDetectorManager + + Dedicated detector manager extending the functionality of the CaloDetectorManager + with dedicated Ecal information, access. + + @author: Grant Gorfine + - modified and maintained by Nick Styles & Andreas Salzburger + - modified for FASER by D. Casper + */ + + class EcalDetectorManager : public CaloDetectorManager { + + public: + + // Constructor + EcalDetectorManager( StoreGateSvc* detStore ); + + // Destructor + virtual ~EcalDetectorManager(); + + /** Access Raw Geometry */ + virtual unsigned int getNumTreeTops() const override; + virtual PVConstLink getTreeTop(unsigned int i) const override; + /** Add tree top */ + void addTreeTop(PVLink); + + + // + // Access Readout Elements + // + + /** access to individual elements via Identifier */ + virtual CaloDetectorElement * getDetectorElement(const Identifier &id) const override; + + /** access to individual elements via IdentifierHash */ + virtual CaloDetectorElement * getDetectorElement(const IdentifierHash &idHash) const override; + + /** access to individual elements via module numbering schema */ + CaloDetectorElement * getDetectorElement(int row, int module) const; + + /** access to whole collectiom via iterators */ + virtual const CaloDetectorElementCollection * getDetectorElementCollection() const override; + virtual CaloDetectorElementCollection::const_iterator getDetectorElementBegin() const override; + virtual CaloDetectorElementCollection::const_iterator getDetectorElementEnd() const override; + + /** Add elememts during construction */ + virtual void addDetectorElement(CaloDetectorElement * element) override; + + /** Add alignable transforms. No access to these, they will be changed by manager: */ + virtual void addAlignableTransform (int level, + const Identifier &id, + GeoAlignableTransform *xf, + const GeoVFullPhysVol * child); + + /** As above but does a dynamic_cast to GeoVFullPhysVol */ + virtual void addAlignableTransform (int level, + const Identifier &id, + GeoAlignableTransform *xf, + const GeoVPhysVol * child); + + /** Initialize the neighbours. This can only be done when all elements are built. */ + virtual void initNeighbours() override; + + /** Check identifier is for this detector */ + virtual bool identifierBelongs(const Identifier & id) const override; + + /** Access to module design, casts to EcalDetectorDesign */ + const CaloDetectorDesign * getEcalDesign() const; + + /** Process new global DB folders for L1 and L2 **/ + virtual + bool processGlobalAlignment(const std::string &, int level, FrameType frame, + const CondAttrListCollection* obj, + GeoVAlignmentStore* alignStore) const override; + + // comply with CaloDetectorManager interface + bool processSpecialAlignment(const std::string & key, + CaloDD::AlignFolderType alignfolder) const override; + + bool processSpecialAlignment(const std::string& key, + const CondAttrListCollection* obj=nullptr, + GeoVAlignmentStore* alignStore=nullptr) const override; + + + private: + /** implements the main alignment update for delta transforms in different frames, + it translates into the LocalDelta or GlobalDelta function of CaloDetectorManager + */ + virtual bool setAlignableTransformDelta(int level, + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore) const override; + + /** Prevent copy and assignment */ + const EcalDetectorManager & operator=(const EcalDetectorManager &right); + EcalDetectorManager(const EcalDetectorManager &right); + + virtual const EcalID* getIdHelper() const override; + + // Private member data + std::vector<PVLink> m_volume; + CaloDetectorElementCollection m_elementCollection; + typedef std::map<Identifier, ExtendedAlignableTransform *> AlignableTransformMap; + std::vector< AlignableTransformMap > m_higherAlignableTransforms; + std::vector< ExtendedAlignableTransform *> m_alignableTransforms; + const EcalID* m_idHelper; + + /** This variable switches the how the local alignment corrections are applied + If true they will be calcualted on top of all of other corrections but in the default reference frame + If false they will be calcualted on top of all of other corrections but in the globally aligned reference frame + */ + bool m_isLogical; + + + }; + +} // namespace CaloDD + +#ifndef GAUDI_NEUTRAL +#include "AthenaKernel/CLASS_DEF.h" +CLASS_DEF(CaloDD::EcalDetectorManager, 155753500, 1) +#endif + +#endif // CALOREADOUTGEOMETRY_ECALDETECTORMANAGER_H diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/ExtendedAlignableTransform.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/ExtendedAlignableTransform.h new file mode 100644 index 0000000000000000000000000000000000000000..8c04c295f721a102e992564ae695fa27d721a9cd --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/ExtendedAlignableTransform.h @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// ExtendedAlignableTransform.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef SCINTREADOUTGEOMETRY_EXTENDEDALIGNABLETRANSFORM_H +#define SCINTREADOUTGEOMETRY_EXTENDEDALIGNABLETRANSFORM_H + +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoAlignableTransform.h" +#include "GeoModelKernel/GeoVFullPhysVol.h" + +namespace CaloDD { + + /** @class ExtendedAlignableTransform + + Class to hold alignable transform plus a pointer to the child volume and + optionally a frame volume. + + @author: Grant Gorfine + - modified & maintained: Nick Styles & Andreas Salzburger + */ + + class ExtendedAlignableTransform + { + + public: + + ExtendedAlignableTransform(GeoAlignableTransform * alignableTransform, + const GeoVFullPhysVol * child, + const GeoVFullPhysVol * frame = 0) + : m_alignableTransform(alignableTransform), + m_child(child), + m_frame(frame) + {}; + + GeoAlignableTransform * alignableTransform() {return m_alignableTransform;} + const GeoVFullPhysVol * child() {return m_child;} + const GeoVFullPhysVol * frame() {return m_frame;} + + private: + + GeoAlignableTransform * m_alignableTransform; + const GeoVFullPhysVol * m_child; + const GeoVFullPhysVol * m_frame; + + }; + + +} // end namespace + +#endif // CALOREADOUTGEOMETRY_EXTENDEDALIGNABLETRANSFORM_H diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/Version.h b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/Version.h new file mode 100644 index 0000000000000000000000000000000000000000..39ff8b23e354a17cd6522d5193c40f77b68a3420 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/CaloReadoutGeometry/Version.h @@ -0,0 +1,91 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +//////////////////////////////////////////////////////////// +// Version.h +//////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +//////////////////////////////////////////////////////////// + +#ifndef CALOREADOUTGEOMETRY_VERSION +#define CALOREADOUTGEOMETRY_VERSION + +#include <string> + +namespace CaloDD { + + /** @class Version + + Class to hold version information consisting of tag, name layout and description as strings, + such as their integer regpresentation in the major-minor-tag scheme + */ + + class Version { + + public: + + /** Constructor. */ + Version(const std::string & tag, + const std::string & name, + const std::string & layout, + const std::string & description, + int major, + int minor, + int patch); + + /** Constructor. DEPRECATED */ + Version(const std::string & name, + const std::string & layout, + const std::string & description, + int major, + int minor, + int patch); + + /** Empty Constructor */ + Version(); + + /** Version tag */ + const std::string & tag() const; + + /** Version label */ + const std::string & name() const; + + /** Layout (eg Initial, Final, TestBeam) */ + const std::string & layout() const; + + /** Description or comment. */ + const std::string & description() const; + + /** Major version number */ + int majorNum() const; + + /** Minor version number */ + int minorNum() const; + + /** Patch version number */ + int patchNum() const; + + /** Print out version number (eg. 2.00.00) */ + std::string versionNumber() const; + + /** Full Description + For example, + Version: SCT-DC1-00, Name: DC1, Layout: Final, Code Version: 2.00.00, Description: DC1 Geometry */ + std::string fullDescription() const; + + + private: + + std::string m_tag; + std::string m_name; + std::string m_layout; + std::string m_description; + int m_major; + int m_minor; + int m_patch; + }; + +} // namespace CaloDD + +#endif // CALOREADOUTGEOMETRY_VERSION diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloCommonItems.cxx b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloCommonItems.cxx new file mode 100644 index 0000000000000000000000000000000000000000..cc0eed376d69c5cd6a34442921bb7578cff81f3b --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloCommonItems.cxx @@ -0,0 +1,15 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CaloReadoutGeometry/CaloCommonItems.h" + +namespace CaloDD { + +CaloCommonItems::CaloCommonItems(const FaserDetectorID* const idHelper) + : m_msg("CaloDetectorElement"), + m_idHelper(idHelper), + m_mutex{} +{} + +} // End namespace CaloDD diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorDesign.cxx b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorDesign.cxx new file mode 100644 index 0000000000000000000000000000000000000000..60fb0114e6b8c2674a7ae110fe7d1756181fe127 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorDesign.cxx @@ -0,0 +1,101 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloDetectorDesign.cxx +// Implementation file for class CaloDetectorDesign +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// Version 3.0 05/05/2001 David Calvet +// Modified: Grant Gorfine +// Modified: Dave Casper +/////////////////////////////////////////////////////////////////// + +#include "CaloReadoutGeometry/CaloDetectorDesign.h" +#include "CaloReadoutGeometry/CaloIntersect.h" +#include "CaloReadoutGeometry/CaloLocalPosition.h" +#include "TrkSurfaces/RectangleBounds.h" + +namespace CaloDD { +// Constructor: +CaloDetectorDesign::CaloDetectorDesign( const double width, + const double height, + const double length, + const int cells) : + m_width{width}, + m_height(height), + m_length{length}, + m_cells{cells}, + m_phiAxis(Axis::xAxis), + m_etaAxis(Axis::yAxis), + m_depthAxis(Axis::zAxis) +{ + m_bounds = new Trk::RectangleBounds(0.5*width, 0.5*height); +} + + +// Destructor: +CaloDetectorDesign::~CaloDetectorDesign() { + if (m_bounds != nullptr) delete m_bounds; +} + +CaloIntersect CaloDetectorDesign::inDetector(const CaloLocalPosition &localPosition, + double xTol, double yTol) const { + double xDist = 0; + double yDist = 0; + + distanceToDetectorEdge(localPosition, xDist, yDist); + + CaloIntersect state; + + if (xDist < -xTol || yDist < -yTol) { + state.setOut(); + return state; + } + + if (xDist > xTol && yDist > yTol) { + state.setIn(); + return state; + } + + // Near boundary. + state.setNearBoundary(); + return state; +} + +DetectorShape CaloDetectorDesign::shape() const { + // Default is Box. + return CaloDD::Box; +} + +const Trk::SurfaceBounds & +CaloDetectorDesign::bounds() const +{ + return *m_bounds; +} + +// Returns distance to nearest detector edge +// +ve = inside +// -ve = outside +void +CaloDetectorDesign::distanceToDetectorEdge(const CaloLocalPosition & localPosition, + double & etaDist, double & phiDist) const +{ + // As the calculation is symmetric around 0,0 we only have to test it for one side. + double xEta = abs(localPosition.xEta()); + double xPhi = abs(localPosition.xPhi()); + + double xEtaEdge = 0.5 * height(); + double xPhiEdge = 0.5 * width(); + + // Distance to top/bottom + etaDist = xEtaEdge - xEta; + + // Distance to right/left edge + phiDist = xPhiEdge - xPhi; + +} + +} // namespace CaloDD diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorElement.cxx b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorElement.cxx new file mode 100644 index 0000000000000000000000000000000000000000..722be09211a8f1d962b011f0d39285a2f59120f3 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorElement.cxx @@ -0,0 +1,930 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file CaloDetectorElement.cxx + * Implementation file for class CaloDetectorElement + * @author Grant Gorfine + * Based on version developed by David Calvet. +**/ + +#include "CaloReadoutGeometry/CaloDetectorElement.h" + +#include "FaserCaloIdentifier/EcalID.h" + +#include "GeoModelKernel/GeoVFullPhysVol.h" +#include "GeoModelFaserUtilities/GeoAlignmentStore.h" +#include "FaserDetDescr/FaserDetectorID.h" + +#include "CLHEP/Geometry/Point3D.h" +#include "CLHEP/Geometry/Vector3D.h" +#include "CLHEP/Vector/ThreeVector.h" +#include "CLHEP/Units/PhysicalConstants.h" // for M_PI +#include "CLHEP/Units/SystemOfUnits.h" + +#include "CaloReadoutGeometry/CaloDetectorDesign.h" + + +#include "CaloReadoutGeometry/CaloCommonItems.h" + +#include "TrkSurfaces/PlaneSurface.h" +#include "TrkSurfaces/SurfaceBounds.h" + +#include <cmath> +#include <cassert> +#include <limits> + +namespace CaloDD { +using Trk::distEta; +using Trk::distPhi; +// using Trk::distDepth; + +// Constructor with parameters: +CaloDetectorElement::CaloDetectorElement(const Identifier &id, + const CaloDetectorDesign *design, + const GeoVFullPhysVol *geophysvol, + const CaloCommonItems * commonItems, + const GeoAlignmentStore* geoAlignStore) : + TrkDetElementBase(geophysvol), + m_id(id), + m_idHash(64000), + m_design(design), + m_commonItems(commonItems), + m_cacheValid(false), + m_firstTime(true), + m_mutex(), + m_surface{}, + m_surfaces{}, + m_geoAlignStore(geoAlignStore) +{ + //The following are fixes for coverity bug 11955, uninitialized scalars: + const bool boolDefault(true); + m_depthDirection=boolDefault; + m_phiDirection=boolDefault; + m_etaDirection=boolDefault; + const double defaultMin(std::numeric_limits<double>::max()); + const double defaultMax(std::numeric_limits<double>::lowest()); + m_minX=defaultMin; + m_maxX=defaultMax; + m_minY=defaultMin; + m_maxY=defaultMax; + m_minZ=defaultMin; + m_maxZ=defaultMax; + + m_hitEta = m_design->etaAxis(); + m_hitPhi = m_design->phiAxis(); + m_hitDepth = m_design->depthAxis(); + /// + + commonConstructor(); +} + +void +CaloDetectorElement::commonConstructor() +{ + if (!m_id.is_valid()) throw std::runtime_error("CaloDetectorElement: Invalid identifier"); + + m_isEcal = getIdHelper()->is_ecal(m_id); + if (!m_isEcal) + { + if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Element id is not for Ecal" << endmsg; + } + + // Set IdHash. + if (isEcal()) + { + const EcalID* ecalId = dynamic_cast<const EcalID* >(getIdHelper()); + m_idHash = ecalId->module_hash(m_id); + } + + if (!m_idHash.is_valid()) throw std::runtime_error("CaloDetectorElement: Unable to set IdentifierHash"); + + // Increase the reference count of the CaloDetectorDesign objects. + m_design->ref(); + + // Increase the reference count of the CaloCommonItems objects. + m_commonItems->ref(); + + // Should we reference count the geophysvol as well? + +} + + +// Destructor: +CaloDetectorElement::~CaloDetectorElement() +{ + // The design is reference counted so that it will not be deleted until the last element is deleted. + m_design->unref(); + + m_commonItems->unref(); +} + +void +CaloDetectorElement::updateCache() const +{ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + + bool firstTimeTmp = m_firstTime; + m_firstTime = false; + m_cacheValid = true; + + const GeoTrf::Transform3D & geoTransform = transformHit(); + + HepGeom::Point3D<double> centerGeoModel(0., 0., 0.); + m_centerCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * centerGeoModel; + m_center = Amg::Vector3D(m_centerCLHEP[0],m_centerCLHEP[1],m_centerCLHEP[2]); + + // (In ATLAS:) + // Determine directions depth, eta and phi axis in reconstruction local frame + // ie depth away from interaction point + // phi in direction of increasing phi + // eta in direction of increasing z in barrel, and increasing r in endcap + // + // depthAxis, phiAxis, and etaAxis are defined to be x,y,z respectively for all detectors for hit local frame. + // depthAxis, phiAxis, and etaAxis are defined to be z,x,y respectively for all detectors for reco local frame. + // + // In FASER: + // depthAxis, phiAxis and etaAxis are defined to be z,x,y respectively for all detectors in hit local AND reco local frames + // This is accomplished simply by the fixed initialization of m_hitEta, m_hitPhi and m_hitDepth in CaloDetectorDesign + // + + static const HepGeom::Vector3D<double> localAxes[3] = { + HepGeom::Vector3D<double>(1,0,0), + HepGeom::Vector3D<double>(0,1,0), + HepGeom::Vector3D<double>(0,0,1) + }; + + static const HepGeom::Vector3D<double> & localRecoPhiAxis = localAxes[distPhi]; // Defined to be same as x axis + static const HepGeom::Vector3D<double> & localRecoEtaAxis = localAxes[distEta]; // Defined to be same as y axis + static const HepGeom::Vector3D<double> & localRecoDepthAxis = localAxes[distDepth]; // Defined to be same as z axis + + // We only need to calculate the rough orientation once. + //For it to change would require extreme unrealistic misalignment changes. + if (firstTimeTmp) { + // Determine the unit vectors in global frame + + const HepGeom::Vector3D<double> &geoModelPhiAxis = localAxes[m_hitPhi]; + const HepGeom::Vector3D<double> &geoModelEtaAxis = localAxes[m_hitEta]; + const HepGeom::Vector3D<double> &geoModelDepthAxis = localAxes[m_hitDepth]; + + HepGeom::Vector3D<double> globalDepthAxis(Amg::EigenTransformToCLHEP(geoTransform) * geoModelDepthAxis); + HepGeom::Vector3D<double> globalPhiAxis(Amg::EigenTransformToCLHEP(geoTransform) * geoModelPhiAxis); + HepGeom::Vector3D<double> globalEtaAxis(Amg::EigenTransformToCLHEP(geoTransform) * geoModelEtaAxis); + + // unit radial vector + // HepGeom::Vector3D<double> unitR(m_center.x(), m_center.y(), 0.); + + // unitR.setMag(1.); + + // HepGeom::Vector3D<double> nominalEta; + // HepGeom::Vector3D<double> nominalNormal; + // HepGeom::Vector3D<double> nominalPhi(-unitR.y(), unitR.x(), 0); + + // In Barrel like geometry, the etaAxis is along increasing z, and normal is in increasing radial direction. + // In Endcap like geometry, the etaAxis is along increasing r, and normal is in decreasing z direction, + // We base whether it is barrel like or endcap like by the orientation of the local z axis of the + // the element. This allows the use of endcap identifiers in a TB setup. A warning message is issued however if + // the orientation and identifier are not consistent (ie a barrel like orientation with an endcap identifier). + + // bool barrelLike = true; + // nominalEta.setZ(1); + // if (std::abs(globalEtaAxis.dot(nominalEta)) < 0.5) { // Check that it is in roughly the right direction. + // barrelLike = false; + // } + + // if (isBarrel() && !barrelLike) { + // if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Element has endcap like orientation with barrel identifier." + // << endmsg; + // } else if (!isBarrel() && barrelLike) { + // if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Element has barrel like orientation with endcap identifier." + // << endmsg; + // } + + // if (barrelLike) { + // nominalEta.setZ(1); + // nominalNormal = unitR; + // } else { // endcap like + // nominalNormal.setZ(-1); + // nominalEta = unitR; + // } + + // Determine if axes are to have their directions swapped. + + // + // Depth axis. + // + // double depthDir = globalDepthAxis.dot(nominalNormal); + // m_depthDirection = true; + // if (depthDir < 0) { + // if (m_design->depthSymmetric()) { + // m_depthDirection = false; + // } else { + // if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Unable to swap local depth axis." << endmsg; + // } + // } + // if (std::abs(depthDir) < 0.5) { // Check that it is in roughly the right direction. + // msg(MSG::ERROR) << "Orientation of local depth axis does not follow correct convention." << endmsg; + // // throw std::runtime_error("Orientation of local depth axis does not follow correct convention."); + // m_depthDirection = true; // Don't swap. + // } + + // + // Phi axis (unclear how to handle for FASER - never swap for now) + // + // double phiDir = globalPhiAxis.dot(nominalPhi); + // m_phiDirection = true; + // if (phiDir < 0) { + // if (m_design->phiSymmetric()) { + // m_phiDirection = false; + // } else { + // if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Unable to swap local xPhi axis." << endmsg; + // } + // } + + // if (std::abs(phiDir) < 0.5) { // Check that it is in roughly the right direction. + // msg(MSG::ERROR) << "Orientation of local xPhi axis does not follow correct convention." << endmsg; + // // throw std::runtime_error("Orientation of local xPhi axis does not follow correct convention."); + // m_phiDirection = true; // Don't swap. + // } + + // + // Eta axis (unclear how to handle for FASER - never swap for now) + // + // double etaDir = globalEtaAxis.dot(nominalEta); + // m_etaDirection = true; + // if (etaDir < 0) { + // if (m_design->etaSymmetric()) { + // m_etaDirection = false; + // } else { + // if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Unable to swap local xEta axis." << endmsg; + // } + // } + // if (std::abs(etaDir) < 0.5) { // Check that it is in roughly the right direction. + // msg(MSG::ERROR) << "Orientation of local xEta axis does not follow correct convention." << endmsg; + // // throw std::runtime_error("Orientation of local xEta axis does not follow correct convention."); + // m_etaDirection = true; // Don't swap + // } + + } // end if (firstTimeTmp) + + + + m_transformCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * recoToHitTransform(); + //m_transform = m_commonItems->solenoidFrame() * geoTransform * recoToHitTransform(); + m_transform = Amg::CLHEPTransformToEigen(m_transformCLHEP); + + // Check that local frame is right-handed. (ie transform has no reflection) + // This can be done by checking that the determinant is >0. + // if (firstTimeTmp) { // Only need to check this once. + // HepGeom::Transform3D & t = m_transformCLHEP; + // double det = t(0,0) * (t(1,1)*t(2,2) - t(1,2)*t(2,1)) - + // t(0,1) * (t(1,0)*t(2,2) - t(1,2)*t(2,0)) + + // t(0,2) * (t(1,0)*t(2,1) - t(1,1)*t(2,0)); + // if (det < 0) { + // if (m_design->depthSymmetric()) { + // if (msgLvl(MSG::DEBUG)) + // msg(MSG::DEBUG) << "Local frame is left-handed, Swapping depth axis to make it right handed." + // << endmsg; + // m_depthDirection = !m_depthDirection; + // m_transformCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * recoToHitTransform(); + // m_transform = Amg::CLHEPTransformToEigen(m_transformCLHEP); + //m_transform = m_commonItems->solenoidFrame() * geoTransform * recoToHitTransform(); + // } else { + // if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Local frame is left-handed." << endmsg; + // } + // } + // } + + + // Initialize various cached members + // The unit vectors + HepGeom::Vector3D<double> normalCLHEP = m_transformCLHEP * localRecoDepthAxis; + m_normal = Amg::Vector3D( normalCLHEP[0], normalCLHEP[1], normalCLHEP[2]); + + + m_phiAxisCLHEP = m_transformCLHEP * localRecoPhiAxis; + m_etaAxisCLHEP = m_transformCLHEP * localRecoEtaAxis; + + m_phiAxis = Amg::Vector3D(m_phiAxisCLHEP[0],m_phiAxisCLHEP[1],m_phiAxisCLHEP[2]); + m_etaAxis = Amg::Vector3D(m_etaAxisCLHEP[0],m_etaAxisCLHEP[1],m_etaAxisCLHEP[2]); + + getExtent(m_minX, m_maxX, m_minY, m_maxY, m_minZ, m_maxZ); + + + // Determin isStereo +// if (firstTimeTmp) { +// if (isSCT() && m_otherSide) { +// double sinStereoThis = std::abs(sinStereo()); +// double sinStereoOther = std::abs(m_otherSide->sinStereo()); +// if (sinStereoThis == sinStereoOther) { +// // If they happend to be equal then set side0 as axial and side1 as stereo. +// const SCT_ID* sctId = dynamic_cast<const SCT_ID *>(getIdHelper()); +// if (sctId) { +// int side = sctId->side(m_id); +// m_isStereo = (side == 1); +// } +// } else { +// // set the stereo side as the one with largest absolute sinStereo. +// m_isStereo = (sinStereoThis > sinStereoOther); +// } +// } else { +// m_isStereo = false; +// } +// } +} + + +const GeoTrf::Transform3D & +CaloDetectorElement::transformHit() const +{ + if (m_geoAlignStore) { + const GeoTrf::Transform3D* ptrXf = m_geoAlignStore->getAbsPosition(getMaterialGeom()); + if (ptrXf) return *ptrXf; + } + return getMaterialGeom()->getAbsoluteTransform(); +} + +const Amg::Transform3D & +CaloDetectorElement::transform() const +{ + if (!m_cacheValid){ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + return m_transform; +} + +const HepGeom::Transform3D & +CaloDetectorElement::transformCLHEP() const +{ + //stuff to get the CLHEP version of the local to global transform. + if (!m_cacheValid){ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + return m_transformCLHEP; +} + +const HepGeom::Transform3D +CaloDetectorElement::defTransformCLHEP() const +{ + if (m_geoAlignStore) { + const GeoTrf::Transform3D* ptrXf = m_geoAlignStore->getDefAbsPosition(getMaterialGeom()); + if (ptrXf) return Amg::EigenTransformToCLHEP(*ptrXf) * recoToHitTransform(); + } + return Amg::EigenTransformToCLHEP(getMaterialGeom()->getDefAbsoluteTransform()) * recoToHitTransform(); +} + +const Amg::Transform3D +CaloDetectorElement::defTransform() const +{ + HepGeom::Transform3D tmpTransform = defTransformCLHEP(); + return Amg::CLHEPTransformToEigen(tmpTransform); +} + +const HepGeom::Transform3D +CaloDetectorElement::recoToHitTransform() const +{ + + // Determine the reconstruction local (LocalPosition) to global transform. + + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (m_firstTime) updateCache(); + + // global = transform * recoLocal + // = transformHit * hitLocal + // = transformHit * recoToHitTransform * recoLocal + // + // (In ATLAS:) recoToHitTransform takes recoLocal to hitLocal + // x,y,z -> y,z,x + // equiv to a rotation around Y of 90 deg followed by a rotation around X of 90deg + // + // recoToHit is static as it needs to be calculated once only. + // We use the HepGeom::Transform3D constructor which takes one coordinates system to another where the + // coordinate system is defined by it center and two axes. + // distPhi, distEta are the reco local axes and hitPhi and hitEta are the hit local axes. + // It assume phi, eta, depth makes a right handed system which is the case. + static const HepGeom::Vector3D<double> localAxes[3] = { + HepGeom::Vector3D<double>(1,0,0), + HepGeom::Vector3D<double>(0,1,0), + HepGeom::Vector3D<double>(0,0,1) + }; + //static + + const HepGeom::Transform3D recoToHit(HepGeom::Point3D<double>(0,0,0),localAxes[distPhi],localAxes[distEta], + HepGeom::Point3D<double>(0,0,0),localAxes[m_hitPhi],localAxes[m_hitEta]); + + // Swap direction of axis as appropriate + CLHEP::Hep3Vector scale(1,1,1); + if (!m_phiDirection) scale[distPhi] = -1; + if (!m_etaDirection) scale[distEta] = -1; + if (!m_depthDirection) scale[distDepth] = -1; + return recoToHit * HepGeom::Scale3D(scale[0],scale[1],scale[2]); +} + +const Amg::Transform3D & +CaloDetectorElement::moduleTransform() const +{ + return transform(); + // return (isModuleFrame()) ? transform() : m_otherSide->transform(); +} + + Amg::Transform3D + CaloDetectorElement::defModuleTransform() const +{ + return defTransform(); +// return (isModuleFrame()) ? defTransform() : m_otherSide->defTransform(); +} + + +// Take a transform in the local reconstruction and return it in the module frame +// For a given transform l in frame A. The equivalent transform in frame B is +// B.inverse() * A * l * A.inverse() * B +// Here A is the local to global transform of the element and B is the local to global +// transform of the module. +// If we are already in the module frame then there is nothing to do, we just return the +// transform that is input. Otherwise we use the above formula. +Amg::Transform3D +CaloDetectorElement::localToModuleFrame(const Amg::Transform3D & localTransform) const +{ + // if (isModuleFrame()) { + return localTransform; + // } else { + // return m_otherSide->transform().inverse() * transform() * localTransform * transform().inverse() * m_otherSide->transform(); + // } +} + +Amg::Transform3D +CaloDetectorElement::localToModuleTransform() const +{ + // if (isModuleFrame()) { + return Amg::Transform3D(); // Identity + // } else { + // return m_otherSide->transform().inverse() * transform(); + // } +} + + +// bool +// CaloDetectorElement::isModuleFrame() const +// { +// // The module frame is the axial side. +// // NB isStereo returns false for the pixel and so +// // isModuleFrame is always true for the pixel. + +// return !isStereo(); +// } + + +const Amg::Vector3D & +CaloDetectorElement::center() const +{ + if (!m_cacheValid){ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + return m_center; +} + +const Amg::Vector3D & +CaloDetectorElement::normal() const +{ + if (!m_cacheValid){ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + return m_normal; +} + +const HepGeom::Vector3D<double> & +CaloDetectorElement::etaAxisCLHEP() const +{ + if (!m_cacheValid){ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + return m_etaAxisCLHEP; +} + +const HepGeom::Vector3D<double> & +CaloDetectorElement::phiAxisCLHEP() const +{ + if (!m_cacheValid){ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + return m_phiAxisCLHEP; +} + +const Amg::Vector3D & +CaloDetectorElement::etaAxis() const +{ + if (!m_cacheValid){ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + return m_etaAxis; +} + +const Amg::Vector3D & +CaloDetectorElement::phiAxis() const +{ + if (!m_cacheValid){ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + return m_phiAxis; +} + +Amg::Vector2D +CaloDetectorElement::hitLocalToLocal(double xEta, double xPhi) const // Will change order to phi,eta +{ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + if (!m_etaDirection) xEta = -xEta; + if (!m_phiDirection) xPhi = -xPhi; + return Amg::Vector2D(xPhi, xEta); +} + +HepGeom::Point3D<double> +CaloDetectorElement::hitLocalToLocal3D(const HepGeom::Point3D<double> & hitPosition) const +{ + // Equiv to transform().inverse * transformHit() * hitPosition + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + double xDepth = hitPosition[m_hitDepth]; + double xPhi = hitPosition[m_hitPhi]; + double xEta = hitPosition[m_hitEta]; + if (!m_depthDirection) xDepth = -xDepth; + if (!m_phiDirection) xPhi = -xPhi; + if (!m_etaDirection) xEta = -xEta; + return HepGeom::Point3D<double>(xPhi, xEta, xDepth); +} + + +bool CaloDetectorElement::isEcal() const +{ + return m_isEcal; +} + +Trk::Surface & +CaloDetectorElement::surface() +{ + if (not m_surface) m_surface.set(std::make_unique<Trk::PlaneSurface>(*this)); + return *m_surface; +} + +const Trk::Surface & +CaloDetectorElement::surface() const +{ + if (not m_surface) m_surface.set(std::make_unique<Trk::PlaneSurface>(*this)); + return *m_surface; +} + +const std::vector<const Trk::Surface*>& CaloDetectorElement::surfaces() const +{ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_surfaces.size()) { + // get this surface + m_surfaces.push_back(&surface()); + // get the other side surface + // if (otherSide()) { + // m_surfaces.push_back(&(otherSide()->surface())); + // } + } + // return the surfaces + return m_surfaces; +} + +const Trk::SurfaceBounds & +CaloDetectorElement::bounds() const +{ + return m_design->bounds(); +} + +// Get min/max or r, z,and phi +void CaloDetectorElement::getExtent(double &xMin, double &xMax, + double &yMin, double &yMax, + double &zMin, double &zMax) const +{ + + HepGeom::Point3D<double> corners[4]; + getCorners(corners); + + bool first = true; + + // double phiOffset = 0.; + + double radialShift = 0.; + const HepGeom::Transform3D rShift = HepGeom::TranslateX3D(radialShift);//in local frame, radius is x + + for (int i = 0; i < 4; i++) { + + // if (testDesign) corners[i].transform(rShift); + + HepGeom::Point3D<double> globalPoint = globalPosition(corners[i]); + + // double rPoint = globalPoint.perp(); + double xPoint = globalPoint.x(); + double yPoint = globalPoint.y(); + double zPoint = globalPoint.z(); + // double phiPoint = globalPoint.phi(); + + // Use first point to initializa min/max values. + if (first) { + + // // Put phi in a range so that we are not near -180/+180 division. + // // Do this by adding an offset if phi > 90 CLHEP::deg or < -90 CLHEP::deg. + // // This offset is later removed. + // if (phiPoint < -0.5 * M_PI) { + // phiOffset = -0.5 * M_PI; + // } else if (phiPoint > 0.5 * M_PI) { + // phiOffset = 0.5 * M_PI; + // } + // phiMin = phiMax = phiPoint - phiOffset; + // rMin = rMax = rPoint; + xMin = xMax = xPoint; + yMin = yMax = yPoint; + zMin = zMax = zPoint; + + } else { + // phiPoint -= phiOffset; + // // put phi back in -M_PI < phi < +M_PI range + // if (phiPoint < -M_PI) phiPoint += 2. * M_PI; + // if (phiPoint > M_PI) phiPoint -= 2. * M_PI; + // phiMin = std::min(phiMin, phiPoint); + // phiMax = std::max(phiMax, phiPoint); + // rMin = std::min(rMin, rPoint); + // rMax = std::max(rMax, rPoint); + xMin = std::min(xMin, xPoint); + xMax = std::max(xMax, xPoint); + yMin = std::min(yMin, yPoint); + yMax = std::max(yMax, yPoint); + zMin = std::min(zMin, zPoint); + zMax = std::max(zMax, zPoint); + } + first = false; + } + + // // put phi back in -M_PI < phi < +M_PI range + // phiMin += phiOffset; + // phiMax += phiOffset; + // if (phiMin < -M_PI) phiMin += 2. * M_PI; + // if (phiMin > M_PI) phiMin -= 2. * M_PI; + // if (phiMax < -M_PI) phiMax += 2. * M_PI; + // if (phiMax > M_PI) phiMax -= 2. * M_PI; + +} + + + +// Get eta/phi extent. Returns min/max eta and phi and r (for barrel) +// or z (for endcap) Takes as input the vertex spread in z (+-deltaZ). +// Gets 4 corners of the sensor and calculates eta phi for each corner +// for both +/- vertex spread. The returned phi is between -M_PI and M_PI +// with the direction minPhi to maxPhi always in the positive sense, +// so if the element extends across the -180/180 boundary then minPhi will +// be greater than maxPhi. +// void CaloDetectorElement::getEtaPhiRegion(double deltaZ, double &etaMin, double &etaMax, double &phiMin, +// double &phiMax, double &rz) const +// { +// std::lock_guard<std::recursive_mutex> lock(m_mutex); +// if (!m_cacheValid) updateCache(); + +// HepGeom::Point3D<double> corners[4]; +// getCorners(corners); + +// bool first = true; + +// double phiOffset = 0.; + +// for (int i = 0; i < 4; i++) { +// double etaMinPoint; +// double etaMaxPoint; +// double phiPoint; + +// // Get the eta phi value for this corner. +// getEtaPhiPoint(corners[i], deltaZ, etaMinPoint, etaMaxPoint, phiPoint); + +// if (first) { // Use the first point to initialize the min/max values. + +// // Put phi in a range so that we are not near -180/+180 division. +// // Do this by adding an offset if phi > 90 CLHEP::deg or < -90 CLHEP::deg. +// // This offset is later removed. +// if (phiPoint < -0.5 * M_PI) { +// phiOffset = -0.5 * M_PI; +// } else if (phiPoint > 0.5 * M_PI) { +// phiOffset = 0.5 * M_PI; +// } +// phiMin = phiMax = phiPoint - phiOffset; +// etaMin = etaMinPoint; +// etaMax = etaMaxPoint; +// } else { +// phiPoint -= phiOffset; +// // put phi back in -M_PI < phi < +M_PI range +// if (phiPoint < -M_PI) phiPoint += 2. * M_PI; +// if (phiPoint > M_PI) phiPoint -= 2. * M_PI; +// phiMin = std::min(phiMin, phiPoint); +// phiMax = std::max(phiMax, phiPoint); +// etaMin = std::min(etaMin, etaMinPoint); +// etaMax = std::max(etaMax, etaMaxPoint); +// } +// first = false; +// } + +// // put phi back in -M_PI < phi < +M_PI range +// phiMin += phiOffset; +// phiMax += phiOffset; +// if (phiMin < -M_PI) phiMin += 2. * M_PI; +// if (phiMin > M_PI) phiMin -= 2. * M_PI; +// if (phiMax < -M_PI) phiMax += 2. * M_PI; +// if (phiMax > M_PI) phiMax -= 2. * M_PI; + +// // Calculate rz = r (barrel) or z (endcap) +// // Use center of sensor ((0,0,0) in local coordinates) for determining this. +// // HepGeom::Point3D<double> globalCenter = globalPosition(HepGeom::Point3D<double>(0,0,0)); +// if (isBarrel()) { +// rz = center().perp(); // r +// } else { +// rz = center().z(); // z +// } + +// } + +// Gets eta phi for a point given in local coordinates. deltaZ is specified to +// account for the vertex spread. phi is independent of this vertex +// spread. etaMax will correspond to zMin (-deltaZ) and etaMin will +// correspond to zMax (+deltaZ). +// void CaloDetectorElement::getEtaPhiPoint(const HepGeom::Point3D<double> & point, double deltaZ, +// double &etaMin, double &etaMax, double &phi) const +// { +// // Get the point in global coordinates. +// HepGeom::Point3D<double> globalPoint = globalPosition(point); + +// double r = globalPoint.perp(); +// double z = globalPoint.z(); + +// double thetaMin = atan2(r,(z + deltaZ)); +// etaMax = -log(tan(0.5 * thetaMin)); +// double thetaMax = atan2(r,(z - deltaZ)); +// etaMin = -log(tan(0.5 * thetaMax)); + +// phi = globalPoint.phi(); +// } + +void CaloDetectorElement::getCorners(HepGeom::Point3D<double> *corners) const +{ + std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + + // This makes the assumption that the forward SCT detectors are orientated such that + // the positive etaAxis corresponds to the top of the detector where the width is largest. + // This is currently always the case. + // For the SCT barrel and pixel detectors minWidth and maxWidth are the same and so should + // work for all orientations. + + // double minWidth = m_design->minWidth(); + // double maxWidth = m_design->maxWidth(); + double width = m_design->width(); + double length = m_design->length(); + + // Lower left + corners[0][distPhi] = -0.5 * width; + corners[0][distEta] = -0.5 * length; + corners[0][distDepth] = 0.; + + // Lower right + corners[1][distPhi] = 0.5 * width; + corners[1][distEta] = -0.5 * length; + corners[1][distDepth] = 0.; + + // Upper Right + corners[2][distPhi] = 0.5 * width; + corners[2][distEta] = 0.5 * length; + corners[2][distDepth] = 0.; + + // Upper left + corners[3][distPhi] = -0.5 * width; + corners[3][distEta] = 0.5 * length; + corners[3][distDepth] = 0.; +} + +CaloIntersect +CaloDetectorElement::inDetector(const Amg::Vector2D & localPosition, + double phiTol, double etaTol) const +{ + return m_design->inDetector(localPosition, phiTol, etaTol); +} + + +CaloIntersect +CaloDetectorElement::inDetector(const HepGeom::Point3D<double> & globalPosition, double phiTol, double etaTol) const +{ + return m_design->inDetector(localPosition(globalPosition), phiTol, etaTol); +} + +// bool +// CaloDetectorElement::nearBondGap(Amg::Vector2D localPosition, double etaTol) const +// { +// return m_design->nearBondGap(localPosition, etaTol); +// } + +// bool +// CaloDetectorElement::nearBondGap(HepGeom::Point3D<double> globalPosition, double etaTol) const +// { +// return m_design->nearBondGap(localPosition(globalPosition), etaTol); +// } + +// Amg::Vector2D +// CaloDetectorElement::rawLocalPositionOfCell(const SiCellId &cellId) const +// { +// return m_design->localPositionOfCell(cellId); +// } + +// Amg::Vector2D +// CaloDetectorElement::rawLocalPositionOfCell(const Identifier & id) const +// { +// SiCellId cellId = cellIdFromIdentifier(id); +// return m_design->localPositionOfCell(cellId); +// } + +// int +// CaloDetectorElement::numberOfConnectedCells(const SiCellId cellId) const +// { +// SiReadoutCellId readoutId = m_design->readoutIdOfCell(cellId); +// return m_design->numberOfConnectedCells(readoutId); +// } + +// SiCellId +// CaloDetectorElement::connectedCell(const SiCellId cellId, int number) const +// { +// SiReadoutCellId readoutId = m_design->readoutIdOfCell(cellId); +// return m_design->connectedCell(readoutId, number); +// } + + +// SiCellId +// CaloDetectorElement::cellIdOfPosition(const Amg::Vector2D &localPosition) const +// { +// return m_design->cellIdOfPosition(localPosition); +// } + +// Identifier +// CaloDetectorElement::identifierOfPosition(const Amg::Vector2D &localPosition) const +// { +// SiCellId cellId = m_design->cellIdOfPosition(localPosition); +// return identifierFromCellId(cellId); +// } + +// Identifier +// CaloDetectorElement::identifierFromCellId(const SiCellId & cellId) const +// { +// Identifier id; // Will be initialized in an invalid state. + +// // If something fails it returns the id in an invalid state. + +// if (cellId.isValid()) { + +// if (isPixel()) { +// const PixelID * pixelIdHelper = static_cast<const PixelID *>(getIdHelper()); +// if (pixelIdHelper) { +// id = pixelIdHelper->pixel_id(m_id, cellId.phiIndex(), cellId.etaIndex()); +// } +// } else { +// const SCT_ID * sctIdHelper = static_cast<const SCT_ID *>(getIdHelper()); +// if (sctIdHelper) { +// id = sctIdHelper->strip_id(m_id, cellId.strip()); +// } +// } +// } + +// return id; +// } + +// SiCellId +// CaloDetectorElement::cellIdFromIdentifier(const Identifier & identifier) const +// { +// SiCellId cellId; // Initialized in invalid state. + +// // If something fails it returns the cellId in an invalid state. + +// if (identifier.is_valid()) { + +// if (isPixel()) { +// const PixelID * pixelIdHelper = static_cast<const PixelID *>(getIdHelper()); +// if (pixelIdHelper) { +// cellId = SiCellId(pixelIdHelper->phi_index(identifier), pixelIdHelper->eta_index(identifier)); +// } +// } else { +// const SCT_ID * sctIdHelper = static_cast<const SCT_ID *>(getIdHelper()); +// if (sctIdHelper) { +// cellId = SiCellId(sctIdHelper->strip(identifier)); +// } +// } +// } + +// return cellId; +// } + +} // namespace CaloDD diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorElementCollection.cxx b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorElementCollection.cxx new file mode 100644 index 0000000000000000000000000000000000000000..cfc5c95b52a489df46eca5e1dbcd46d3e6da6cf0 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorElementCollection.cxx @@ -0,0 +1,19 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CaloReadoutGeometry/CaloDetectorElementCollection.h" + +#include "CaloReadoutGeometry/CaloDetectorElement.h" +#include "Identifier/IdentifierHash.h" + +CaloDD::CaloDetectorElementCollection::~CaloDetectorElementCollection() { + for (CaloDD::CaloDetectorElement* ele: *this) delete ele; +} + +const CaloDD::CaloDetectorElement* +CaloDD::CaloDetectorElementCollection::getDetectorElement(const IdentifierHash& hash) const { + const unsigned int value{hash.value()}; + if (this->size()<=value) return nullptr; + return this->at(value); +} diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorManager.cxx b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorManager.cxx new file mode 100644 index 0000000000000000000000000000000000000000..44592683ce5ddf1095e9062baa97d552280fd740 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorManager.cxx @@ -0,0 +1,144 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + + +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + +#include "CaloReadoutGeometry/CaloDetectorManager.h" +#include "FaserDetDescr/FaserDetectorID.h" +#include "IdDictDetDescr/IdDictManager.h" +#include "StoreGate/StoreGateSvc.h" + +#include "GeoModelKernel/GeoXF.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoModelKernel/GeoAlignableTransform.h" +#include "DetDescrConditions/AlignableTransformContainer.h" +#include "CaloReadoutGeometry/CaloDetectorElementCollection.h" +#include "CaloReadoutGeometry/CaloDetectorElement.h" +#include "CaloReadoutGeometry/ExtendedAlignableTransform.h" + +#include <iostream> + +namespace CaloDD +{ + + CaloDetectorManager::CaloDetectorManager(StoreGateSvc * detStore, const std::string & name) + : CaloDetectorManagerBase(detStore, name), + m_design {nullptr} + { + // Add default folder + // addFolder("/Calo/Align"); + } + + const std::string& CaloDetectorManager::tag() const + { + return m_tag; + } + + void CaloDetectorManager::invalidateAll() const + { + for (CaloDetectorElementCollection::const_iterator element_iter = getDetectorElementBegin(); + element_iter != getDetectorElementEnd(); + ++element_iter) { + + if (*element_iter) { + (*element_iter)->invalidate(); + } + } + } + + void CaloDetectorManager::updateAll() const + { + for (CaloDetectorElementCollection::const_iterator element_iter = getDetectorElementBegin(); + element_iter != getDetectorElementEnd(); + ++element_iter) { + if (*element_iter) { + (*element_iter)->setAllCaches(); + } + } + } + + bool CaloDetectorManager::setAlignableTransformLocalDelta(ExtendedAlignableTransform * extXF, + const Amg::Transform3D & localToGlobalXF, + const Amg::Transform3D & delta, + GeoVAlignmentStore* alignStore) const + { + // ATTENTION -------------------------------------------------------- (A.S.) + // CLHEP < -- > AMG interface method + + // Sets the alignable transform delta when the supplied delta is in the local + // reconstruction frame + + // If the default transform to the local recostruction frame is + // T = A*B*C*D*E + // and the alignable transform is C with delta c and the delat in the local frame is l, then + // A*B*C*c*D*E = A*B*C*D*E*l + // c = (D*E) * l * (D*E).inverse() + // c = (A*B*C).inverse * T * l * T.inverse() * (A*B*C) + + // To get default transform up and including the alignable transform, + // we assume the next volume down is a fullphys volume and so its + // transform is the transform we want (ie A*B*C in the above example). + + if (!extXF) return false; + + const GeoVFullPhysVol* child = extXF->child(); + if (child && extXF->alignableTransform()) { + // the definitiv absolut transform is in CLHEP -> do the calculation in CLHEP + const GeoTrf::Transform3D& transform = child->getDefAbsoluteTransform(alignStore); + // calucluate the corrected delta according to the formula above + GeoTrf::Transform3D correctedDelta = transform.inverse()*localToGlobalXF // (A*B*C).inverse() * T + * delta // l + * localToGlobalXF.inverse() * transform; // T.inverse() * (A*B*C) + extXF->alignableTransform()->setDelta(correctedDelta, alignStore); + return true; + } else { + return false; + } + } + + bool CaloDetectorManager::setAlignableTransformGlobalDelta(ExtendedAlignableTransform * extXF, + const Amg::Transform3D& delta, + GeoVAlignmentStore* alignStore) const { + // ATTENTION -------------------------------------------------------- (A.S.) + // CLHEP < -- > AMG interface method + + // Sets the alignable transform delta when the supplied delta is in the global frame. + + // If the default transform down to the alignable transform is + // T = A*B*C + // and the alignable transform is C with delta c and the delta in the global frame is g, then + // A*B*C*c = g*A*B*C + // T*c = g*T + // c = T.inverse() * g * T + + // To get default transform up and including the alignable transform, + // we assume the next volume down is a fullphys volume and so its + // transform is the transform we want (ie T=A*B*C in the above example). + + + if (!extXF) return false; + + const GeoVFullPhysVol * child = extXF->child(); + if (child && extXF->alignableTransform()) { + // do the calculation in CLHEP + const GeoTrf::Transform3D& transform = child->getDefAbsoluteTransform(alignStore); + extXF->alignableTransform()->setDelta(transform.inverse() * delta * transform, alignStore); + return true; + } else { + return false; + } + } + + void CaloDetectorManager::setDesign(const CaloDetectorDesign * design) + { + m_design = design; + } + + const CaloDetectorDesign* CaloDetectorManager::getDesign() const + { + return m_design; + } + +}// namespace CaloDD diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorManagerBase.cxx b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorManagerBase.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ca73b50ff438065fd4cb24baf947a01ac4817030 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloDetectorManagerBase.cxx @@ -0,0 +1,424 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + + +#include "CaloReadoutGeometry/CaloDetectorManagerBase.h" + +#include "StoreGate/StoreGateSvc.h" +#include "DetDescrConditions/AlignableTransform.h" +#include "FaserDetDescr/FaserDetectorID.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" +#include "AthenaBaseComps/AthMsgStreamMacros.h" + +#include <map> + +namespace CaloDD +{ + + CaloDetectorManagerBase::CaloDetectorManagerBase(StoreGateSvc * detStore, const std::string & name) + : m_alignfoldertype{none},m_detStore(detStore), + m_msg(name+"DetectorManager") + { + setName(name); + } + + // Destructor + CaloDetectorManagerBase::~CaloDetectorManagerBase() + {} + + + const Version& CaloDetectorManagerBase::getVersion() const + { + return m_version; + } + + const std::string& CaloDetectorManagerBase::getLayout() const + { + return m_version.layout(); + } + + void CaloDetectorManagerBase::setVersion(const Version & version) + { + m_version = version; + } + + void CaloDetectorManagerBase::addChannel(const std::string & key, int level, FrameType frame) + { + std::string frameStr = "other"; + if (frame == CaloDD::global) frameStr = "global"; + if (frame == CaloDD::local) frameStr = "local"; + ATH_MSG_INFO("Registering alignment channel with key " << key << ", level " << level + << ", with frame " << frameStr << "."); + m_keys[key] = LevelInfo(level, frame); + } + + void CaloDetectorManagerBase::addFolder(const std::string & key) + { + m_folders.insert(key); + } + + void CaloDetectorManagerBase::addSpecialFolder(const std::string & key) + { + m_specialFolders.insert(key); + } + + void CaloDetectorManagerBase::addGlobalFolder(const std::string & key) + { + m_globalFolders.insert(key); + } + + void CaloDetectorManagerBase::addAlignFolderType(const AlignFolderType alignfolder) + { + m_alignfoldertype = alignfolder; + } + + // Return the level in the hierarchy (user defined) corresponding to the key. + const CaloDetectorManagerBase::LevelInfo& CaloDetectorManagerBase::getLevel(const std::string & key) const + { + std::map<std::string, LevelInfo>::const_iterator iter; + iter = m_keys.find(key); + if (iter == m_keys.end()) return s_invalidLevel; + return iter->second; + } + + StatusCode CaloDetectorManagerBase::align( IOVSVC_CALLBACK_ARGS_P(I,keys) ) const + { + + (void) I; // avoid warning about unused parameter + + ATH_MSG_DEBUG("AlignmentCallback called "); + + if (!getIdHelper()) return StatusCode::SUCCESS; + + bool alignmentChange = false; + const AlignInfo &aligninfo = AlignInfo(m_alignfoldertype); + + // If dummy arguments + if (keys.empty()) { + + + // New global aligment folders should be processed first + for (std::set<std::string>::const_iterator iterFolders = m_globalFolders.begin(); + iterFolders != m_globalFolders.end(); + ++iterFolders) { + + try { + bool status = processGlobalAlignmentContainer(*iterFolders); + alignmentChange = (alignmentChange || status); + } catch(std::runtime_error& err) { + // keys are empty when running simualtion. It is normal for detector specific aligments not to exist. + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + } + + // Regular alignments. Loop through folder keys. Normally only one. + for (std::set<std::string>::const_iterator iterFolders = m_folders.begin(); + iterFolders != m_folders.end(); + ++iterFolders) { + + try { + bool status = processAlignmentContainer(*iterFolders); + alignmentChange = (alignmentChange || status); + } + catch(std::runtime_error& err) { + // alignments should always exist so we return fatal if we could not process the alignment for this key + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + } + // Detector specific aligments + for (std::set<std::string>::const_iterator iterFolders = m_specialFolders.begin(); + iterFolders != m_specialFolders.end(); + ++iterFolders) { + try { + bool status = processSpecialAlignment(*iterFolders, aligninfo.AlignFolder()); + alignmentChange = (alignmentChange || status); + } catch(std::runtime_error& err) { + // keys are empty when running simualtion. It is normal for detector specific aligments not to exist. + ATH_MSG_INFO(err.what()); + // We continue as detector specific aligments don't always exist. + } + } + + } else { + // Loop over all the keys. + for (std::list<std::string>::const_iterator itr=keys.begin(); itr!=keys.end(); ++itr) { + + const std::string & key = *itr; + + ATH_MSG_DEBUG(" Processing call back key " << key); + + if ( m_globalFolders.find(key) != m_globalFolders.end() ) { + + try { + // New global alignemnts + bool status = processGlobalAlignmentContainer(key); + alignmentChange = (alignmentChange || status); + } catch(std::runtime_error& err) { + // alignments should always exist so we return fatal if we could not process the alignment for this key + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + + } else if ( m_folders.find(key) != m_folders.end() ) { + + try { + // Regular alignemnts + bool status = processAlignmentContainer(key); + alignmentChange = (alignmentChange || status); + } catch(std::runtime_error& err) { + // alignments should always exist so we return fatal if we could not process the alignment for this key + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + + } else if ( m_specialFolders.find(key) != m_specialFolders.end() ) { + try { + // Detector specific alignments + bool status = processSpecialAlignment(key, aligninfo.AlignFolder()); + alignmentChange = (alignmentChange || status); + } + catch(std::runtime_error& err) { + // Should always exist if the folder was requested so we return fatal if we could not process the alignment for this key + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + } else { + // Should not be any other keys specified in call back. + ATH_MSG_ERROR("Unrecognized key in call back."); + return StatusCode::RECOVERABLE; + } + } + } + + // We invalidate all the elements if at least one alignment changed. + if (alignmentChange) { + invalidateAll(); + } + + return StatusCode::SUCCESS; + } + + StatusCode CaloDetectorManagerBase::align(const RawAlignmentObjects& alignObjects, GeoVAlignmentStore* alignStore) const + { + + ATH_MSG_DEBUG("align() called from an alignment CondAlg"); + if (!getIdHelper()) return StatusCode::SUCCESS; // To Do: is it really a success? + + bool alignmentChange = false; + // const AlignInfo &aligninfo = AlignInfo(m_alignfoldertype); + + for(const auto& alignObj : alignObjects) { + const std::string& key = alignObj.first; + + ATH_MSG_DEBUG(" Processing folder " << key); + + if(m_globalFolders.find(key)!=m_globalFolders.end()) { + try { + // New global alignemnts + const CondAttrListCollection* obj = static_cast<const CondAttrListCollection*>(alignObj.second); + bool status = processGlobalAlignmentContainer(key,obj,alignStore); + alignmentChange = (alignmentChange || status); + } catch(std::runtime_error& err) { + // alignments should always exist so we return fatal if we could not process the alignment for this key + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + } + else if(m_folders.find(key)!=m_folders.end()) { + try { + // Regular alignemnts + const AlignableTransformContainer* container = static_cast<const AlignableTransformContainer*>(alignObj.second); + bool status = processAlignmentContainer(container,alignStore); + alignmentChange = (alignmentChange || status); + } catch(std::runtime_error& err) { + // alignments should always exist so we return fatal if we could not process the alignment for this key + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + } + else if(m_specialFolders.find(key)!=m_specialFolders.end()) { + try { + // Detector specific alignments + const CondAttrListCollection *obj = + static_cast<const CondAttrListCollection*>(alignObj.second); + bool status = processSpecialAlignment(key, obj, alignStore); + alignmentChange = (alignmentChange || status); + } + catch(std::runtime_error& err) { + // Should always exist if the folder was requested so we return fatal if + // we could not process the alignment for this key + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + } + else { + // Should not be any other keys specified in raw alignment object. + ATH_MSG_ERROR("Unrecognized folder name."); + return StatusCode::RECOVERABLE; + } + } + // To Do: custom caching is not going to work in MT + /* + if(alignmentChange) invalidateAll(); + */ + + return StatusCode::SUCCESS; + } + + bool CaloDetectorManagerBase::processAlignmentContainer(const std::string & key) const + { + bool alignmentChange = false; + + ATH_MSG_DEBUG("Dealing with key as container"); + const AlignableTransformContainer* container; + if (StatusCode::SUCCESS!=m_detStore->retrieve(container, key)) { + ATH_MSG_ERROR("Cannot find AlignableTransformContainer for key " + << key << " - no misalignment"); + // This should not occur in normal situations so we force job to abort. + throw std::runtime_error("Unable to apply Calorimeter alignments"); + } + // Check if container is empty - this can occur if it is an invalid IOV. + if (container->empty()) { + ATH_MSG_ERROR("AlignableTransformContainer for key " + << key << " is empty. Probably due to out of range IOV"); + // This should not occur in normal situations so we force job to abort. + throw std::runtime_error("Unable to apply Calorimeter alignments."); + } + // loop over all the AlignableTransform objects in the collection + for (DataVector<AlignableTransform>::const_iterator pat=container->begin(); + pat!=container->end();++pat) { + + bool status = processKey((*pat)->tag(),*pat); + alignmentChange = (alignmentChange || status); + } + return alignmentChange; + } + + bool CaloDetectorManagerBase::processAlignmentContainer(const AlignableTransformContainer* container, GeoVAlignmentStore* alignStore) const + { + bool alignmentChange = false; + + // Check if container is empty - this can occur if it is an invalid IOV. + if (container->empty()) { + ATH_MSG_ERROR("AlignableTransformContainer " + << " is empty. Probably due to out of range IOV"); // To Do: add key to this printout for making it more informative + // This should not occur in normal situations so we force job to abort. + throw std::runtime_error("Unable to apply Calorimeter alignments."); + } + // loop over all the AlignableTransform objects in the collection + // use only the last ones. + std::map<const std::string, const AlignableTransform*> stringToTransform; + for (DataVector<AlignableTransform>::const_iterator pat=container->begin(); + pat!=container->end();++pat) { + stringToTransform[(*pat)->tag()] = *pat; + } + for (std::pair<const std::string, const AlignableTransform*> value: stringToTransform) { + bool status = processKey(value.first, value.second, alignStore); + alignmentChange = (alignmentChange || status); + } + return alignmentChange; + } + + bool CaloDetectorManagerBase::processKey(const std::string key, + const AlignableTransform* transformCollection, + GeoVAlignmentStore* alignStore) const + { + bool alignmentChange = false; + + // From the key determine what level in hierarchy we are dealing with. + // returns -1 if unrecognized. + const LevelInfo & levelInfo = getLevel(key); + if (levelInfo.isValid()) { + ATH_MSG_VERBOSE("Processing channel: " << key); + } else { + ATH_MSG_DEBUG("Channel " << key << " not registered in this manager"); + } + // return silently if unrecognised - this can happen in container mode + // when a single container holds transforms for both pixel and SCT + if (!levelInfo.isValid() ) return false; + + //Loop over the effected nodes. + for (AlignableTransform::AlignTransMem_citr trans_iter = transformCollection->begin(); + trans_iter != transformCollection->end(); + ++trans_iter) { + ATH_MSG_DEBUG( "Get alignment for identifier " + << getIdHelper()->show_to_string(trans_iter->identify()) + << " at level " << levelInfo.level()); + + // The delta in the conditions DB is not necessarily the same as what is needed in the + // alignable transform. At the moment we support global frame, local frame or an alternative frame + // The setAlignableTransformDelta method takes care of this correction - this is CLHEP <--> Amg interfaced + bool status = setAlignableTransformDelta(levelInfo.level(), + trans_iter->identify(), + Amg::CLHEPTransformToEigen(trans_iter->transform()), + levelInfo.frame(), + alignStore); + + alignmentChange = (alignmentChange || status); + + if (!status) { + if (!identifierBelongs(trans_iter->identify())) { + ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier." + << getIdHelper()->show_to_string(trans_iter->identify()) + << " at level " << levelInfo.level()); + } else { + ATH_MSG_WARNING("Cannot set AlignableTransform for identifier " + << getIdHelper()->show_to_string(trans_iter->identify()) + << " at level " << levelInfo.level()); + ATH_MSG_WARNING("Subsequent WARNINGS will be printed at DEBUG level."); + } + } + } + return alignmentChange; + } + + // We provide a default implementation of any detector specific alignment. + bool CaloDetectorManagerBase::processGlobalAlignmentContainer(const std::string & key, + const CondAttrListCollection* obj, + GeoVAlignmentStore* alignStore) const + { + bool alignmentChange = false; + + ATH_MSG_DEBUG("processing GlobalAlignmentContainer with key: " << key); + // From the key determine what level in hierarchy we are dealing with. + // returns -1 if unrecognized. + const LevelInfo & levelInfo = getLevel(key); + if (levelInfo.isValid()) { + ATH_MSG_VERBOSE("Processing channel: " << key); + } else { + ATH_MSG_DEBUG("Channel " << key << " not registered in this manager"); + } + // return silently if unrecognised - this can happen in container mode + // when a single container holds transforms for both pixel and SCT + if (!levelInfo.isValid() ) return false; + + // Within detector specific code + bool status = processGlobalAlignment(key, levelInfo.level(), levelInfo.frame(), obj, alignStore); + + alignmentChange = (alignmentChange || status); + + return alignmentChange; + + } + + // We provide a default implementation of any detector specific alignment. + bool CaloDetectorManagerBase::processGlobalAlignment(const std::string &, int /*level*/, FrameType /*frame*/, + const CondAttrListCollection* /*obj*/, GeoVAlignmentStore* /*alignStore*/) const + { + return false; + } + + + // We provide a default implementation of any detector specific alignment. + bool CaloDetectorManagerBase::processSpecialAlignment(const std::string &, CaloDD::AlignFolderType) const + { + return false; + } + + const CaloDetectorManagerBase::LevelInfo CaloDetectorManagerBase::s_invalidLevel; + +} // namespace CaloDD diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloLocalPosition.cxx b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloLocalPosition.cxx new file mode 100644 index 0000000000000000000000000000000000000000..b181f28c1002b211f0cf64d26bbaf09d19061e53 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloLocalPosition.cxx @@ -0,0 +1,100 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloLocalPosition.cxx +// Implementation file for class CaloLocalPosition +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// Version 2.1 01/08/2001 David Calvet +/////////////////////////////////////////////////////////////////// + +#include "CaloReadoutGeometry/CaloLocalPosition.h" + +namespace CaloDD { + +// Default constructor: +CaloLocalPosition::CaloLocalPosition() : + m_eta(0), + m_phi(0), + m_xDepth(0) +{} + + + +// Constructor with parameters: +CaloLocalPosition::CaloLocalPosition(const double x,const double y, + const double xDepth) : + m_eta(x), + m_phi(y), + m_xDepth(xDepth) +{} + +CaloLocalPosition::CaloLocalPosition(const Amg::Vector2D &position) + : m_eta(position[Trk::distEta]), + m_phi(position[Trk::distPhi]), + m_xDepth(0) +{} + + +CaloLocalPosition::operator Amg::Vector2D(void) const +{ + return Amg::Vector2D(m_phi, m_eta); +} + + + +// addition of positions: +CaloLocalPosition &CaloLocalPosition::operator+=(const CaloLocalPosition &position) +{ + m_eta+=position.m_eta; + m_phi+=position.m_phi; + m_xDepth+=position.m_xDepth; + return *this; +} + +// scaling: +CaloLocalPosition &CaloLocalPosition::operator*=(const double factor) +{ + m_eta*=factor; + m_phi*=factor; + m_xDepth*=factor; + return *this; +} + +// scaling: +CaloLocalPosition &CaloLocalPosition::operator/=(const double factor) +{ + if (0!=factor) { + m_eta/=factor; + m_phi/=factor; + m_xDepth/=factor; + } else {} + return *this; +} + +CaloLocalPosition operator+(const CaloLocalPosition &position1, + const CaloLocalPosition &position2) +{ + CaloLocalPosition result(position1); + result+=position2; + return result; +} + +CaloLocalPosition operator*(const CaloLocalPosition &position,const double factor) +{ + CaloLocalPosition result(position); + result*=factor; + return result; +} + +CaloLocalPosition operator/(const CaloLocalPosition &position,const double factor) +{ + CaloLocalPosition result(position); + result/=factor; + return result; +} + +} // namespace CaloDD diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloNumerology.cxx b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloNumerology.cxx new file mode 100644 index 0000000000000000000000000000000000000000..9afd4259225ba6cf51832604574a80494856368d --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/CaloNumerology.cxx @@ -0,0 +1,31 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CaloReadoutGeometry/CaloNumerology.h" + + +namespace CaloDD { + +CaloNumerology::CaloNumerology() + : m_numModulesPerRow(0), + m_numPmtsPerModule(0) +{} + +void CaloNumerology::addRow(int id) +{ + m_rowIds.insert(id); +} + +void CaloNumerology::setNumModulesPerRow(int nModules) +{ + m_numModulesPerRow = nModules; +} + +void CaloNumerology::setNumPmtsPerModule(int nPmts) +{ + m_numPmtsPerModule = nPmts; +} + + +} // End namespace diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/EcalDetectorManager.cxx b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/EcalDetectorManager.cxx new file mode 100644 index 0000000000000000000000000000000000000000..79cec3540d66d34e1f3ff3f34e23c1690c7b93b9 --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/EcalDetectorManager.cxx @@ -0,0 +1,354 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CaloReadoutGeometry/EcalDetectorManager.h" + +#include "AthenaBaseComps/AthMsgStreamMacros.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" +#include "Identifier/Identifier.h" +#include "Identifier/IdentifierHash.h" +#include "FaserCaloIdentifier/EcalID.h" +#include "CaloReadoutGeometry/CaloDetectorElementCollection.h" +#include "CaloReadoutGeometry/CaloDetectorElement.h" +#include "CaloReadoutGeometry/ExtendedAlignableTransform.h" +#include "CaloReadoutGeometry/CaloDetectorDesign.h" +#include "StoreGate/StoreGateSvc.h" + +#include <iostream> + +namespace CaloDD { + + const int FIRST_HIGHER_LEVEL = 1; + + EcalDetectorManager::EcalDetectorManager( StoreGateSvc* detStore ) + : CaloDetectorManager(detStore, "Ecal"), + m_idHelper(0), + m_isLogical(false) // Change to true to change the definition of local module corrections + { + // + // Initialized the Identifier helper. + // + StatusCode sc = detStore->retrieve(m_idHelper, "EcalID"); + if (sc.isFailure()) { + ATH_MSG_ERROR("Could not retrieve Ecal id helper"); + } + // Initialize the collections. + if (m_idHelper) { + m_elementCollection.resize(m_idHelper->module_hash_max()); + m_alignableTransforms.resize(m_idHelper->module_hash_max()); + // m_moduleAlignableTransforms.resize(m_idHelper->module_hash_max()); + } + } + + + + EcalDetectorManager::~EcalDetectorManager() + { + // Clean up + for (size_t i=0; i < m_volume.size(); i++) { + m_volume[i]->unref(); + } + + for (size_t j=0; j < m_higherAlignableTransforms.size(); j++){ + AlignableTransformMap::iterator iterMap; + for (iterMap = m_higherAlignableTransforms[j].begin(); + iterMap != m_higherAlignableTransforms[j].end(); + ++iterMap) { + delete iterMap->second; + } + } + + for (size_t k=0; k < m_alignableTransforms.size(); k++){ + delete m_alignableTransforms[k]; + } + + // for (size_t l=0; l < m_moduleAlignableTransforms.size(); l++){ + // delete m_moduleAlignableTransforms[l]; + // } + } + + unsigned int EcalDetectorManager::getNumTreeTops() const + { + return m_volume.size(); + } + + PVConstLink EcalDetectorManager::getTreeTop(unsigned int i) const + { + return m_volume[i]; + } + + void EcalDetectorManager::addTreeTop(PVLink vol){ + vol->ref(); + m_volume.push_back(vol); + } + + + CaloDetectorElement* EcalDetectorManager::getDetectorElement(const Identifier & id) const + { + // NB the id helpers implementation for getting a hash is not optimal. + // Essentially does a binary search. + // Make sure it is a wafer Id + Identifier waferId = m_idHelper->module_id(id); + IdentifierHash idHash = m_idHelper->module_hash(waferId); + if (idHash.is_valid()) { + return m_elementCollection[idHash]; + } else { + return 0; + } + } + + CaloDetectorElement* EcalDetectorManager::getDetectorElement(const IdentifierHash & idHash) const + { + return m_elementCollection[idHash]; + } + + CaloDetectorElement* EcalDetectorManager::getDetectorElement(int row, int module) const + { + return getDetectorElement(m_idHelper->module_id(row, module)); + } + + const CaloDetectorElementCollection* EcalDetectorManager::getDetectorElementCollection() const + { + return &m_elementCollection; + } + + CaloDetectorElementCollection::const_iterator EcalDetectorManager::getDetectorElementBegin() const + { + return m_elementCollection.begin(); + } + + CaloDetectorElementCollection::const_iterator EcalDetectorManager::getDetectorElementEnd() const + { + return m_elementCollection.end(); + } + + + void EcalDetectorManager::addDetectorElement(CaloDetectorElement * element) + { + IdentifierHash idHash = element->identifyHash(); + if (idHash >= m_elementCollection.size()) + throw std::runtime_error("EcalDetectorManager: Error adding detector element."); + m_elementCollection[idHash] = element; + } + + void EcalDetectorManager::initNeighbours() + { + CaloDetectorElementCollection::iterator iter; + + // Loop over all elements and set the neighbours + for (iter = m_elementCollection.begin(); iter != m_elementCollection.end(); ++iter){ + + CaloDetectorElement * element = *iter; + if (element) { + + IdentifierHash idHash = element->identifyHash(); + IdentifierHash idHashOther; + + int result; + // If no neighbour, result != 0 in which case we leave neighbour as null + result = m_idHelper->get_next_in_eta(idHash, idHashOther); + if (result==0) element->setNextInEta(m_elementCollection[idHashOther]); + + result = m_idHelper->get_prev_in_eta(idHash, idHashOther); + if (result==0) element->setPrevInEta(m_elementCollection[idHashOther]); + + result = m_idHelper->get_next_in_phi(idHash, idHashOther); + if (result==0) element->setNextInPhi(m_elementCollection[idHashOther]); + + result = m_idHelper->get_prev_in_phi(idHash, idHashOther); + if (result==0) element->setPrevInPhi(m_elementCollection[idHashOther]); + } + } + } + + const EcalID* EcalDetectorManager::getIdHelper() const + { + return m_idHelper; + } + + + bool EcalDetectorManager::setAlignableTransformDelta(int level, + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore) const + { + + if (level == 0) { // 0 - At the element level + + // We retrieve it via a hashId. + IdentifierHash idHash = m_idHelper->module_hash(id); + if (!idHash.is_valid()) return false; + + if (frame == CaloDD::global) { // global shift + // Its a global transform + return setAlignableTransformGlobalDelta(m_alignableTransforms[idHash], delta, alignStore); + + } else if (frame == CaloDD::local) { // local shift + + CaloDetectorElement * element = m_elementCollection[idHash]; + if (!element) return false; + + + // Its a local transform + //See header file for definition of m_isLogical + if( m_isLogical ){ + //Ensure cache is up to date and use the alignment corrected local to global transform + element->setCache(); + return setAlignableTransformLocalDelta(m_alignableTransforms[idHash], element->transform(), delta, alignStore); + } else + //Use default local to global transform + return setAlignableTransformLocalDelta(m_alignableTransforms[idHash], element->defTransform(), delta, alignStore); + + } else { + // other not supported + ATH_MSG_WARNING("Frames other than global or local are not supported."); + return false; + } + } else { // higher level + if (frame != CaloDD::global) { + ATH_MSG_WARNING("Non global shift at higher levels is not supported."); + return false; + } + + int index = level - FIRST_HIGHER_LEVEL; // level 0 is treated separately. + if (index >= static_cast<int>(m_higherAlignableTransforms.size())) return false; + + // We retrieve it from a map. + AlignableTransformMap::const_iterator iter; + iter = m_higherAlignableTransforms[index].find(id); + if (iter == m_higherAlignableTransforms[index].end()) return false; + + // Its a global transform + return setAlignableTransformGlobalDelta(iter->second, delta, alignStore); + } + } + + void EcalDetectorManager::addAlignableTransform (int level, + const Identifier & id, + GeoAlignableTransform *transform, + const GeoVPhysVol * child) + { + if (m_idHelper) { + + const GeoVFullPhysVol * childFPV = dynamic_cast<const GeoVFullPhysVol *>(child); + if (!childFPV) { + ATH_MSG_ERROR("Child of alignable transform is not a full physical volume"); + } else { + addAlignableTransform (level, id, transform, childFPV); + } + } + } + + void EcalDetectorManager::addAlignableTransform (int level, + const Identifier & id, + GeoAlignableTransform *transform, + const GeoVFullPhysVol * child) + { + if (m_idHelper) { + if (level == 0) { + // Element + IdentifierHash idHash = m_idHelper->module_hash(id); + if (idHash.is_valid()) { + m_alignableTransforms[idHash]= new ExtendedAlignableTransform(transform, child); + } + } else { + // Higher levels are saved in a map. NB level=0 is treated above. + int index = level - FIRST_HIGHER_LEVEL; // level 0 is treated separately. + if (index >= static_cast<int>(m_higherAlignableTransforms.size())) m_higherAlignableTransforms.resize(index+1); + m_higherAlignableTransforms[index][id] = new ExtendedAlignableTransform(transform, child); + } + } + } + + bool + EcalDetectorManager::identifierBelongs(const Identifier & id) const + { + return getIdHelper()->is_ecal(id); + } + + + const CaloDetectorDesign* EcalDetectorManager::getEcalDesign() const + { + return dynamic_cast<const CaloDetectorDesign *>(getDesign()); + } + + // New global alignment folders + bool EcalDetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame, + const CondAttrListCollection* obj, GeoVAlignmentStore* alignStore) const + { + ATH_MSG_INFO("Processing new global alignment containers with key " << key << " in the " << frame << " frame at level "); + + const CondAttrListCollection* atrlistcol=obj; + if(atrlistcol==nullptr and m_detStore->retrieve(atrlistcol,key)!=StatusCode::SUCCESS) { + ATH_MSG_INFO("Cannot find new global align Container for key " + << key << " - no new global alignment "); + return false; + } + + bool alignmentChange = false; + Identifier ident=Identifier(); + + // loop over objects in collection + for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) { + const coral::AttributeList& atrlist=citr->second; + // SCT manager, therefore ignore all that is not a SCT Identifier + // if (atrlist["det"].data<int>()!=2) continue; + ATH_MSG_FATAL("Using invalid alignment data for Ecal detector (correct treatment not yet implemented"); + ident = getIdHelper()->module_id(atrlist["row"].data<int>(), + atrlist["module"].data<int>()); // The last is the module side which is at this ident-level always the 0-side + + // construct new transform + // Order of rotations is defined as around z, then y, then x. + Amg::Translation3D newtranslation(atrlist["Tx"].data<float>(),atrlist["Ty"].data<float>(),atrlist["Tz"].data<float>()); + Amg::Transform3D newtrans = newtranslation * Amg::RotationMatrix3D::Identity(); + newtrans *= Amg::AngleAxis3D(atrlist["Rz"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,0.,1.)); + newtrans *= Amg::AngleAxis3D(atrlist["Ry"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,1.,0.)); + newtrans *= Amg::AngleAxis3D(atrlist["Rx"].data<float>()*CLHEP::mrad, Amg::Vector3D(1.,0.,0.)); + + ATH_MSG_DEBUG("New global DB -- channel: " << citr->first + << " ,det: " << atrlist["det"].data<int>() + << " ,bec: " << atrlist["bec"].data<int>() + << " ,layer: " << atrlist["layer"].data<int>() + << " ,ring: " << atrlist["ring"].data<int>() + << " ,sector: " << atrlist["sector"].data<int>() + << " ,Tx: " << atrlist["Tx"].data<float>() + << " ,Ty: " << atrlist["Ty"].data<float>() + << " ,Tz: " << atrlist["Tz"].data<float>() + << " ,Rx: " << atrlist["Rx"].data<float>() + << " ,Ry: " << atrlist["Ry"].data<float>() + << " ,Rz: " << atrlist["Rz"].data<float>()); + + // Set the new transform; Will replace existing one with updated transform + bool status = setAlignableTransformDelta(level, + ident, + newtrans, + frame, + alignStore); + + if (!status) { + ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier." + << getIdHelper()->show_to_string(ident) + << " at level " << level << " for new global DB "); + } + + alignmentChange = (alignmentChange || status); + } + return alignmentChange; + } + +bool EcalDetectorManager::processSpecialAlignment( + const std::string &, CaloDD::AlignFolderType) const { + return false; +} + +bool EcalDetectorManager::processSpecialAlignment(const std::string& /*key*/, + const CondAttrListCollection* /*obj*/, + GeoVAlignmentStore* /*alignStore*/) const { + return false; + +} + +} // namespace CaloDD diff --git a/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/Version.cxx b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/Version.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3d333e1ea697a673d8782508ec30aa7820ee12ed --- /dev/null +++ b/Calorimeter/CaloDetDescr/CaloReadoutGeometry/src/Version.cxx @@ -0,0 +1,121 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CaloReadoutGeometry/Version.h" + +#include <sstream> +#include <string> +#include <iomanip> + +namespace CaloDD { + +Version::Version(const std::string & tag, + const std::string & name, + const std::string & layout, + const std::string & description, + int major, + int minor, + int patch) + : m_tag(tag), + m_name(name), + m_layout(layout), + m_description(description), + m_major(major), + m_minor(minor), + m_patch(patch) +{} + +// For backward compatibility +Version::Version(const std::string & name, + const std::string & layout, + const std::string & description, + int major, + int minor, + int patch) + : m_tag("-"), + m_name(name), + m_layout(layout), + m_description(description), + m_major(major), + m_minor(minor), + m_patch(patch) +{} + + + +Version::Version() + : m_major(0), + m_minor(0), + m_patch(0) +{} + +const std::string & +Version::tag() const +{ + return m_tag; +} + +const std::string & +Version::name() const +{ + return m_name; +} + +const std::string & +Version::layout() const +{ + return m_layout; +} + +const std::string & +Version::description() const +{ + return m_description; +} + +int +Version::majorNum() const +{ + return m_major; +} + +int +Version::minorNum() const +{ + return m_minor; +} + +int +Version::patchNum() const +{ + return m_patch; +} + +std::string +Version::versionNumber() const +{ + std::ostringstream ostr; + ostr << m_major + << "." << std::setfill('0') << std::setw(2) << m_minor + << "." << std::setfill('0') << std::setw(2) << m_patch; + return ostr.str(); +} + +std::string +Version::fullDescription() const +{ + + // Output of the form + // Version: SCT-DC1-00, Name: DC1, Layout: Final, Code Version: 02.01.01, Description: DC1 Geometry + + std::ostringstream ostr; + ostr << "Version: " << m_tag << ", Name: " << m_name << ", Layout: " << m_layout + << ", Code Version: " << versionNumber(); + if (!m_description.empty()) { + ostr << ", Description: " << m_description; + } + return ostr.str(); +} + +} // namespace CaloDD diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/CMakeLists.txt b/Calorimeter/CaloDetDescr/EcalGeoModel/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..d073b04abed0e38c19819efef4504c2b8fac78a9 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/CMakeLists.txt @@ -0,0 +1,31 @@ +################################################################################ +# Package: EcalGeoModel +################################################################################ + +# Declare the package name: +atlas_subdir( EcalGeoModel ) + +# External dependencies: +find_package( Boost COMPONENTS filesystem thread system ) +find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel COMPONENTS GeoModelKernel GeoModelDBManager GDMLtoGM ) +find_package( XercesC ) + +# Component(s) in the package: +atlas_add_component( EcalGeoModel + src/*.cxx + src/components/*.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIR} ${XERCESC_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} ${XERCESC_LIBRARIES} AthenaKernel GeoModelFaserUtilities GaudiKernel + CaloGeoModelUtils CaloReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions Identifier FaserCaloIdentifier PathResolver ) + +atlas_add_test( EcalGMConfig_test + SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/test/EcalGMConfig_test.py + PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + PROPERTIES TIMEOUT 300 ) + +# Install files from the package: +atlas_install_python_modules( python/*.py ) +atlas_install_scripts( test/*.py ) +atlas_install_xmls( data/*.gdml ) diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/EcalGeoModel/ATLAS_CHECK_THREAD_SAFETY b/Calorimeter/CaloDetDescr/EcalGeoModel/EcalGeoModel/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..95596097435f2ac2b09a48a8c5772a11781059a2 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/EcalGeoModel/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Calorimeter/CaloDetDescr/EcalGeoModel diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/EcalGeoModel/EcalDetectorTool.h b/Calorimeter/CaloDetDescr/EcalGeoModel/EcalGeoModel/EcalDetectorTool.h new file mode 100644 index 0000000000000000000000000000000000000000..35bc89ddc35eed107a451ca804e9c2d74dedf6c1 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/EcalGeoModel/EcalDetectorTool.h @@ -0,0 +1,60 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ECALGEOMODEL_ECALDETECTORTOOL_H +#define ECALGEOMODEL_ECALDETECTORTOOL_H + +#include "GeoModelFaserUtilities/GeoModelTool.h" +#include "EcalGeoModel/EcalGeoModelAthenaComps.h" + +#include "GeometryDBSvc/IGeometryDBSvc.h" +#include "GeoModelInterfaces/IGeoDbTagSvc.h" +#include "RDBAccessSvc/IRDBAccessSvc.h" + +#include "GaudiKernel/ServiceHandle.h" + +#include <string> + +namespace CaloDD { + class EcalDetectorManager; +} + +class EcalDetectorTool : public GeoModelTool { + +public: + // Standard Constructor + EcalDetectorTool(const std::string& type, const std::string& name, const IInterface* parent); + + virtual StatusCode create() override final; + virtual StatusCode clear() override final; + + // Register callback function on ConDB object + virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override final; + + // Callback function itself + virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override; + +private: + StringProperty m_detectorName{this, "DetectorName", "Ecal"}; + StringProperty m_gdmlFile{this, "GdmlFile", ""}; + BooleanProperty m_alignable{this, "Alignable", true}; + BooleanProperty m_useDynamicAlignFolders{this, "useDynamicAlignFolders", false}; + bool m_cosmic; + + const CaloDD::EcalDetectorManager* m_manager; + + EcalGeoModelAthenaComps m_athenaComps; + + ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc; + ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc; + ServiceHandle< IGeometryDBSvc > m_geometryDBSvc; + + StringProperty m_run1Folder{this, "Run1Folder", "/Calorimeter/Align"}; + // StringProperty m_run1Folder{this, "Run1Folder", "/Indet/Align"}; + // StringProperty m_run2L1Folder{this, "Run2L1Folder", "/Indet/AlignL1/ID"}; + // StringProperty m_run2L2Folder{this, "Run2L2Folder", "/Indet/AlignL2/SCT"}; + // StringProperty m_run2L3Folder{this, "Run2L3Folder", "/Indet/AlignL3"}; +}; + +#endif // ECALGEOMODEL_ECALDETECTORTOOL_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/EcalGeoModel/EcalGeoModelAthenaComps.h b/Calorimeter/CaloDetDescr/EcalGeoModel/EcalGeoModel/EcalGeoModelAthenaComps.h new file mode 100644 index 0000000000000000000000000000000000000000..67376b97d5937945a9ce2dfb9c82b9564f9bd979 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/EcalGeoModel/EcalGeoModelAthenaComps.h @@ -0,0 +1,30 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef EcalGeoModel_EcalGeoModelAthenaComps_H +#define EcalGeoModel_EcalGeoModelAthenaComps_H + +#include "CaloGeoModelUtils/CaloDDAthenaComps.h" + +class EcalID; + + +/// Class to hold various Athena components +class EcalGeoModelAthenaComps : public CaloDD::AthenaComps { + +public: + + EcalGeoModelAthenaComps(); + + void setIdHelper(const EcalID* idHelper); + + const EcalID* getIdHelper() const; + +private: + const EcalID* m_idHelper; + +}; + +#endif // EcalGeoModel_EcalGeoModelAthenaComps_H + diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/data/Ecal.gdml b/Calorimeter/CaloDetDescr/EcalGeoModel/data/Ecal.gdml new file mode 100644 index 0000000000000000000000000000000000000000..592c6b28ad721883f7b456c9a3742ac52b259b9f --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/data/Ecal.gdml @@ -0,0 +1,3520 @@ +<?xml version="1.0"?> +<gdml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd"> + <define> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_FiberShieldLeft0x8a25340in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeftpos" x="0" y="0" z="-40.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HAirSlotsL0x8a28320in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="0" y="-23.280000000000001" z="29.5" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HAirSlotsL_10x8a27590in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="0" y="23.280000000000001" z="29.5" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_VAirSlotsL0x8a27820in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="11.090000000000002" y="0" z="29.5" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets1L0x8a29050in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="0" y="-23.280000000000001" z="-11.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets1L_10x8a29110in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="0" y="23.280000000000001" z="-11.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_VSteelSheets1L0x8a293f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="11.090000000000002" y="0" z="-11.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets2L0x8a296b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="-1.1000000000000001" y="-21.780000000000001" z="24.25" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets2L_10x8a29770in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="-1.1000000000000001" y="21.780000000000001" z="24.25" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_VSteelSheets2L0x8a29a60in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="9.5900000000000016" y="0" z="24.25" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets1L0x8a2a0a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="-1.5" y="0" z="40.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets1L_10x8a2a160in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="-1.5" y="0" z="20.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets2L0x8a2a760in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="-1.1000000000000001" y="0" z="6.25" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets2L_10x8a2a820in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="-1.1000000000000001" y="0" z="-14.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets2L_20x8a2a8e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos" x="-1.1000000000000001" y="0" z="-35.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_InnSupportFrameLeft0x8a2a9d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeftpos" x="-182.85000000000002" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleFrontCover0x8a2b9a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_Innerpos" x="0" y="0" z="-33.350000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleBackCover0x8a2c990in_dd_Geometry_DownstreamRegion_Ecal_Modules_Innerpos" x="0" y="0" z="14.450000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnReadOut_InnerReadOutBox0x8a2d720in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnReadOutpos" x="0" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleReadOut0x8a2d780in_dd_Geometry_DownstreamRegion_Ecal_Modules_Innerpos" x="0" y="0" z="26.200000000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnFrontSteelMatrix0x8a2e7b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-21.550000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnBackSteelMatrix0x8a2e860in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="21.550000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnFrontPlastic0x8a2f500in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-21.150000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnBackPlastic0x8a2f560in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="21.150000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber0x8a30470in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="-1.5150000000000001" y="1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_10x8a30520in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="-0.50499999999999989" y="1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_20x8a305d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="0.50500000000000012" y="1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_30x8a306e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="1.5150000000000001" y="1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_40x8a307c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="-1.5150000000000001" y="0.50499999999999989" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_50x8a308f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="-0.50499999999999989" y="0.50499999999999989" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_60x8a309a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="0.50500000000000012" y="0.50499999999999989" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_70x8a30a80in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="1.5150000000000001" y="0.50499999999999989" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_80x8a30b60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="-1.5150000000000001" y="-0.50500000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_90x8a30cd0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="-0.50499999999999989" y="-0.50500000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_100x8a30d60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="0.50500000000000012" y="-0.50500000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_110x8a30e40in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="1.5150000000000001" y="-0.50500000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_120x8a30f20in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="-1.5150000000000001" y="-1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_130x8a31000in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="-0.50499999999999989" y="-1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_140x8a310e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="0.50500000000000012" y="-1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_150x8a311c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos" x="1.5150000000000001" y="-1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells0x8a312a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-20.276" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_10x8a313d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-19.652000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_20x8a31480in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-19.028000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_30x8a31560in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-18.404" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_40x8a31640in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-17.780000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_50x8a317b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-17.156000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_60x8a31840in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-16.532" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_70x8a31920in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-15.908000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_80x8a31a00in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-15.284000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_90x8a31ae0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-14.66" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_100x8a31bc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-14.036000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_110x8a31ca0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-13.412000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_120x8a31d80in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-12.788" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_130x8a31720in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-12.164000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_140x8a31fc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-11.540000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_150x8a320a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-10.916" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_160x8a32180in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-10.292000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_170x8a32260in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-9.668000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_180x8a32340in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-9.0440000000000023" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_190x8a32420in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-8.4200000000000017" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_200x8a32500in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-7.7960000000000029" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_210x8a325e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-7.1720000000000033" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_220x8a326c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-6.5480000000000018" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_230x8a327a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-5.9240000000000013" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_240x8a32880in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-5.3000000000000007" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_250x8a32960in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-4.6759999999999993" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_260x8a32a40in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-4.0519999999999987" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_270x8a32b20in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-3.4279999999999973" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_280x8a32c00in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-2.8039999999999963" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_290x8a31e60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-2.1799999999999953" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_300x8a32ef0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-1.5559999999999952" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_310x8a32fa0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-0.93199999999999372" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_320x8a33080in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="-0.30799999999999272" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_330x8a33160in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="0.31600000000000822" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_340x8a33240in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="0.94000000000000916" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_350x8a33320in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="1.56400000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_360x8a33400in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="2.1880000000000108" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_370x8a334e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="2.8120000000000118" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_380x8a335c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="3.4360000000000128" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_390x8a336a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="4.0600000000000147" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_400x8a33780in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="4.6840000000000153" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_410x8a33860in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="5.3080000000000149" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_420x8a33940in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="5.9320000000000164" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_430x8a33a20in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="6.5560000000000178" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_440x8a33b00in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="7.1800000000000184" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_450x8a33be0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="7.8040000000000198" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_460x8a33cc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="8.4280000000000204" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_470x8a33da0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="9.0520000000000209" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_480x8a33e80in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="9.6760000000000232" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_490x8a33f60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="10.30000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_500x8a34040in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="10.924000000000021" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_510x8a34120in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="11.548000000000021" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_520x8a34200in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="12.172000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_530x8a342e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="12.796000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_540x8a343c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="13.42000000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_550x8a344a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="14.044000000000032" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_560x8a34580in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="14.668000000000029" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_570x8a34660in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="15.29200000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_580x8a34740in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="15.916000000000032" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_590x8a34820in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="16.540000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_600x8a34900in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="17.16400000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_610x8a303f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="17.788000000000032" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_620x8a32d60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="18.412000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_630x8a32e40in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="19.03600000000004" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_640x8a34df0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="19.660000000000039" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_650x8a34ed0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos" x="0" y="0" z="20.284000000000042" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix0xed86e60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos" x="-4.04" y="4.04" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_10xed86ec0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos" x="0" y="4.04" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_20xed87f90in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos" x="4.04" y="4.04" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_30xed880b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos" x="-4.04" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_40xed881a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos" x="0" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_50xed88960in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos" x="4.04" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_60xed88a20in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos" x="-4.04" y="-4.04" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_70xed88b10in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos" x="0" y="-4.04" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_80xed88c00in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos" x="4.04" y="-4.04" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleStack0xed86f20in_dd_Geometry_DownstreamRegion_Ecal_Modules_Innerpos" x="0" y="0" z="-10.600000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows10xed88e90in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="-42.664999999999999" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_10xeda1ca0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="-30.475000000000001" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_20xeda1d90in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="-18.285" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_30xeda1eb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="-6.0949999999999989" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_40xeda1fa0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="6.0949999999999989" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_50xeda20e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="18.285" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_60xeda21a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="30.474999999999991" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_70xeda2290in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="42.664999999999992" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_80xeda2380in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="-42.664999999999999" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_90xeda2500in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="-30.475000000000001" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_100xeda25f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="-18.285" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_110xeda26e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="-6.0949999999999989" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_120xeda27d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="6.0949999999999989" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_130xeda28c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="18.285" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_140xeda29b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="30.474999999999991" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_150xeda2aa0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos" x="42.664999999999992" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Up_Rows_Left0xeda2c20in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos" x="0" y="60.950000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Up_Rows_Left_10xeda2d10in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos" x="0" y="36.57" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows20xeda2f30in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="-30.475000000000001" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_10xeda3020in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="-18.285" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_20xeda3110in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="-6.0949999999999989" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_30xeda3230in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="6.095000000000006" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_40xeda3320in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="18.285" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_50xeda3460in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="30.475000000000001" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_60xeda3520in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="-30.475000000000001" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_70xeda3610in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="-18.285" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_80xeda3700in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="-6.0949999999999989" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_90xeda37f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="6.095000000000006" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_100xeda38e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="18.285" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_110xeda39d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos" x="30.475000000000001" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Left_Rows0xeda3b50in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos" x="12.190000000000001" y="12.190000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Left_Rows_10xeda3c70in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos" x="12.190000000000001" y="-12.190000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Down_Rows_Left0xeda3d60in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos" x="0" y="-60.950000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Down_Rows_Left_10xeda3e50in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos" x="0" y="-36.57" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_EcalAInner0xed88e30in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeftpos" x="-146.28" y="0" z="0.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleFrontCover0xeda55f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_Middlepos" x="0" y="0" z="-34.100000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleBackCover0xeda58d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_Middlepos" x="0" y="0" z="13.950000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix0xeda5ea0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutpos" x="-3.0300000000000002" y="3.0300000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix_10xeda5f60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutpos" x="3.0300000000000002" y="3.0300000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix_20xeda6070in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutpos" x="-3.0300000000000002" y="-3.0300000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix_30xeda6190in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutpos" x="3.0300000000000002" y="-3.0300000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleReadOut0xeda5e40in_dd_Geometry_DownstreamRegion_Ecal_Modules_Middlepos" x="0" y="0" z="26.450000000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidFrontSteelMatrix0xeda6820in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-21.550000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidBackSteelMatrix0xeda68d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="21.550000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidFrontPlastic0xeda6bf0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-21.150000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidBackPlastic0xeda6c80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="21.150000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber0xeda7000in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-2.5250000000000004" y="2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_10xeda70b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-1.5150000000000001" y="2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_20xeda7190in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-0.50500000000000012" y="2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_30xeda72a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="0.50499999999999978" y="2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_40xeda7380in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="1.5150000000000001" y="2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_50xeda74b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="2.5250000000000004" y="2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_60xeda7560in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-2.5250000000000004" y="1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_70xeda7640in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-1.5150000000000001" y="1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_80xeda7720in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-0.50500000000000012" y="1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_90xeda7890in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="0.50499999999999978" y="1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_100xeda7920in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="1.5150000000000001" y="1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_110xeda7a00in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="2.5250000000000004" y="1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_120xeda7ae0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-2.5250000000000004" y="0.50500000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_130xeda7bc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-1.5150000000000001" y="0.50500000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_140xeda7ca0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-0.50500000000000012" y="0.50500000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_150xeda7d80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="0.50499999999999978" y="0.50500000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_160xeda7e60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="1.5150000000000001" y="0.50500000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_170xeda7800in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="2.5250000000000004" y="0.50500000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_180xeda80a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-2.5250000000000004" y="-0.50499999999999978" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_190xeda8180in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-1.5150000000000001" y="-0.50499999999999978" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_200xeda8260in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-0.50500000000000012" y="-0.50499999999999978" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_210xeda8340in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="0.50499999999999978" y="-0.50499999999999978" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_220xeda8420in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="1.5150000000000001" y="-0.50499999999999978" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_230xeda8500in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="2.5250000000000004" y="-0.50499999999999978" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_240xeda85e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-2.5250000000000004" y="-1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_250xeda86c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-1.5150000000000001" y="-1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_260xeda87a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-0.50500000000000012" y="-1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_270xeda8880in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="0.50499999999999978" y="-1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_280xeda8960in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="1.5150000000000001" y="-1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_290xeda8a40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="2.5250000000000004" y="-1.5150000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_300xeda8b20in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-2.5250000000000004" y="-2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_310xeda8c00in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-1.5150000000000001" y="-2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_320xeda8ce0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="-0.50500000000000012" y="-2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_330xeda7f40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="0.50499999999999978" y="-2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_340xeda8fd0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="1.5150000000000001" y="-2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_350xeda9080in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos" x="2.5250000000000004" y="-2.5250000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells0xeda9160in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-20.276" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_10xeda9290in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-19.652000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_20xeda9340in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-19.028000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_30xeda9420in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-18.404" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_40xeda9500in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-17.780000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_50xeda9670in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-17.156000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_60xeda9700in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-16.532" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_70xeda97e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-15.908000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_80xeda98c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-15.284000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_90xeda99a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-14.66" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_100xeda9a80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-14.036000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_110xeda9b60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-13.412000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_120xeda9c40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-12.788" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_130xeda95e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-12.164000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_140xeda9e80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-11.540000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_150xeda9f60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-10.916" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_160xedaa040in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-10.292000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_170xedaa120in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-9.668000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_180xedaa200in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-9.0440000000000023" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_190xedaa2e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-8.4200000000000017" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_200xedaa3c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-7.7960000000000029" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_210xedaa4a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-7.1720000000000033" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_220xedaa580in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-6.5480000000000018" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_230xedaa660in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-5.9240000000000013" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_240xedaa740in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-5.3000000000000007" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_250xedaa820in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-4.6759999999999993" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_260xedaa900in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-4.0519999999999987" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_270xedaa9e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-3.4279999999999973" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_280xedaaac0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-2.8039999999999963" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_290xeda9d20in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-2.1799999999999953" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_300xedaadb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-1.5559999999999952" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_310xedaae60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-0.93199999999999372" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_320xedaaf40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="-0.30799999999999272" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_330xedab020in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="0.31600000000000822" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_340xedab100in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="0.94000000000000916" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_350xedab1e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="1.56400000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_360xedab2c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="2.1880000000000108" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_370xedab3a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="2.8120000000000118" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_380xedab480in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="3.4360000000000128" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_390xedab560in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="4.0600000000000147" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_400xedab640in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="4.6840000000000153" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_410xedab720in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="5.3080000000000149" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_420xedab800in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="5.9320000000000164" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_430xedab8e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="6.5560000000000178" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_440xedab9c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="7.1800000000000184" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_450xedabaa0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="7.8040000000000198" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_460xedabb80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="8.4280000000000204" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_470xedabc60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="9.0520000000000209" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_480xedabd40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="9.6760000000000232" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_490xedabe20in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="10.30000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_500xedabf00in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="10.924000000000021" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_510xedabfe0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="11.548000000000021" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_520xedac0c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="12.172000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_530xedac1a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="12.796000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_540xedac280in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="13.42000000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_550xedac360in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="14.044000000000032" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_560xedac440in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="14.668000000000029" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_570xedac520in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="15.29200000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_580xedac600in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="15.916000000000032" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_590xedac6e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="16.540000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_600xedac7c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="17.16400000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_610xeda4d00in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="17.788000000000032" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_620xedaaba0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="18.412000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_630xedaac80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="19.03600000000004" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_640xedaccb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="19.660000000000039" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_650xedacd40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos" x="0" y="0" z="20.284000000000042" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix0xedaceb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStackpos" x="-3.0300000000000002" y="3.0300000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix_10xedacfa0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStackpos" x="3.0300000000000002" y="3.0300000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix_20xedad090in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStackpos" x="-3.0300000000000002" y="-3.0300000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix_30xedad1b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStackpos" x="3.0300000000000002" y="-3.0300000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleStack0xedacf40in_dd_Geometry_DownstreamRegion_Ecal_Modules_Middlepos" x="0" y="0" z="-11.350000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows0xedad400in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="-42.664999999999999" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_10xedad4f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="-30.475000000000001" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_20xedad5e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="-18.285" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_30xedad700in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="-6.0949999999999989" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_40xedad7f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="6.0949999999999989" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_50xedad930in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="18.285" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_60xedad9f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="30.474999999999991" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_70xedadae0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="42.664999999999992" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_80xedadbd0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="-42.664999999999999" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_90xedadd50in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="-30.475000000000001" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_100xedade40in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="-18.285" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_110xedadf30in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="-6.0949999999999989" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_120xedae020in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="6.0949999999999989" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_130xedae110in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="18.285" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_140xedae200in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="30.474999999999991" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_150xedae2f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos" x="42.664999999999992" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Up_Rows_Left0xedae470in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="-48.760000000000005" y="109.70999999999999" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Up_Rows_Left_10xedae560in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="-48.760000000000005" y="85.330000000000027" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows0xedae650in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="48.760000000000005" y="109.70999999999999" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_10xedae770in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="48.760000000000005" y="85.330000000000027" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_20xedae860in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="48.760000000000005" y="60.950000000000017" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_30xedae950in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="48.760000000000005" y="36.57" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_40xedaea10in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="48.760000000000005" y="12.190000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_50xedaeb00in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="48.760000000000005" y="-12.189999999999991" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_60xedaebf0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="48.760000000000005" y="-36.569999999999986" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_70xedaed70in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="48.760000000000005" y="-60.949999999999982" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_80xedaee60in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="48.760000000000005" y="-85.329999999999984" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_90xedaef50in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="48.760000000000005" y="-109.70999999999999" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Down_Rows_Left0xedaf040in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="-48.760000000000005" y="-109.70999999999999" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Down_Rows_Left_10xedaf130in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos" x="-48.760000000000005" y="-85.330000000000027" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_EcalAMiddle0xedad3a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeftpos" x="-97.52000000000001" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleFrontCover0xedaff80in_dd_Geometry_DownstreamRegion_Ecal_Modules_Outerpos" x="0" y="0" z="-34.100000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleBackCover0xedb0ad0in_dd_Geometry_DownstreamRegion_Ecal_Modules_Outerpos" x="0" y="0" z="13.950000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutReadOut_OuterReadOutTube0xedb1090in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutReadOutpos" x="0" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleReadOut0xedb10f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_Outerpos" x="0" y="0" z="26.450000000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutFrontSteelMatrix0xedb1780in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-21.550000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutBackSteelMatrix0xedb1830in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="21.550000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutFrontPlastic0xedb1b50in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-21.150000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutBackPlastic0xedb1be0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="21.150000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber0xedb1f60in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-5.3025000000000002" y="5.3025000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_10xedb2010in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-3.7875000000000001" y="5.3025000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_20xedb20f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-2.2725000000000004" y="5.3025000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_30xedb2200in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-0.75749999999999962" y="5.3025000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_40xedb22e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="0.75750000000000028" y="5.3025000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_50xedb2410in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="2.2725000000000004" y="5.3025000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_60xedb24c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="3.787500000000001" y="5.3025000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_70xedb25a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="5.302500000000002" y="5.3025000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_80xedb2680in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-5.3025000000000002" y="3.7875000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_90xedb27f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-3.7875000000000001" y="3.7875000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_100xedb2880in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-2.2725000000000004" y="3.7875000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_110xedb2960in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-0.75749999999999962" y="3.7875000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_120xedb2a40in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="0.75750000000000028" y="3.7875000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_130xedb2b20in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="2.2725000000000004" y="3.7875000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_140xedb2c00in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="3.787500000000001" y="3.7875000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_150xedb2ce0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="5.302500000000002" y="3.7875000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_160xedb2dc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-5.3025000000000002" y="2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_170xedb2760in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-3.7875000000000001" y="2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_180xedb3000in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-2.2725000000000004" y="2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_190xedb30e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-0.75749999999999962" y="2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_200xedb31c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="0.75750000000000028" y="2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_210xedb32a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="2.2725000000000004" y="2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_220xedb3380in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="3.787500000000001" y="2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_230xedb3460in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="5.302500000000002" y="2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_240xedb3540in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-5.3025000000000002" y="0.75749999999999962" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_250xedb3620in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-3.7875000000000001" y="0.75749999999999962" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_260xedb3700in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-2.2725000000000004" y="0.75749999999999962" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_270xedb37e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-0.75749999999999962" y="0.75749999999999962" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_280x8a6e670in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="0.75750000000000028" y="0.75749999999999962" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_290x8a6e720in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="2.2725000000000004" y="0.75749999999999962" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_300x8a6e800in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="3.787500000000001" y="0.75749999999999962" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_310x8a6e8e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="5.302500000000002" y="0.75749999999999962" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_320x8a6e9c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-5.3025000000000002" y="-0.75750000000000028" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_330xedb2ea0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-3.7875000000000001" y="-0.75750000000000028" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_340x8a6ecb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-2.2725000000000004" y="-0.75750000000000028" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_350x8a6ed60in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-0.75749999999999962" y="-0.75750000000000028" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_360x8a6ee40in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="0.75750000000000028" y="-0.75750000000000028" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_370x8a6ef20in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="2.2725000000000004" y="-0.75750000000000028" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_380x8a6f000in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="3.787500000000001" y="-0.75750000000000028" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_390x8a6f0e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="5.302500000000002" y="-0.75750000000000028" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_400x8a6f1c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-5.3025000000000002" y="-2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_410x8a6f2a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-3.7875000000000001" y="-2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_420x8a6f380in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-2.2725000000000004" y="-2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_430x8a6f460in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-0.75749999999999962" y="-2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_440x8a6f540in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="0.75750000000000028" y="-2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_450x8a6f620in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="2.2725000000000004" y="-2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_460x8a6f700in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="3.787500000000001" y="-2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_470x8a6f7e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="5.302500000000002" y="-2.2725000000000004" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_480x8a6f8c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-5.3025000000000002" y="-3.787500000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_490x8a6f9a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-3.7875000000000001" y="-3.787500000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_500x8a6fa80in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-2.2725000000000004" y="-3.787500000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_510x8a6fb60in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-0.75749999999999962" y="-3.787500000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_520x8a6fc40in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="0.75750000000000028" y="-3.787500000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_530x8a6fd20in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="2.2725000000000004" y="-3.787500000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_540x8a6fe00in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="3.787500000000001" y="-3.787500000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_550x8a6fee0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="5.302500000000002" y="-3.787500000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_560x8a6ffc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-5.3025000000000002" y="-5.302500000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_570x8a700a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-3.7875000000000001" y="-5.302500000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_580x8a70180in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-2.2725000000000004" y="-5.302500000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_590x8a70260in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="-0.75749999999999962" y="-5.302500000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_600x8a70340in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="0.75750000000000028" y="-5.302500000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_610x8a70420in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="2.2725000000000004" y="-5.302500000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_620x8a70500in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="3.787500000000001" y="-5.302500000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_630x8a705e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos" x="5.302500000000002" y="-5.302500000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells0x8a70730in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-20.276" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_10x8a70860in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-19.652000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_20x8a70910in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-19.028000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_30x8a709f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-18.404" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_40x8a70ad0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-17.780000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_50x8a70c40in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-17.156000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_60x8a70cd0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-16.532" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_70x8a70db0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-15.908000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_80x8a70e90in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-15.284000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_90x8a70f70in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-14.66" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_100x8a71050in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-14.036000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_110x8a71130in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-13.412000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_120x8a71210in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-12.788" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_130x8a70bb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-12.164000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_140x8a71450in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-11.540000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_150x8a71530in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-10.916" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_160x8a71610in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-10.292000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_170x8a716f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-9.668000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_180x8a717d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-9.0440000000000023" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_190x8a718b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-8.4200000000000017" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_200x8a71990in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-7.7960000000000029" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_210x8a71a70in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-7.1720000000000033" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_220x8a71b50in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-6.5480000000000018" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_230x8a71c30in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-5.9240000000000013" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_240x8a71d10in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-5.3000000000000007" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_250x8a71df0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-4.6759999999999993" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_260x8a71ed0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-4.0519999999999987" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_270x8a71fb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-3.4279999999999973" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_280x8a72090in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-2.8039999999999963" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_290x8a712f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-2.1799999999999953" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_300x8a72380in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-1.5559999999999952" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_310x8a72430in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-0.93199999999999372" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_320x8a72510in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="-0.30799999999999272" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_330x8a725f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="0.31600000000000822" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_340x8a726d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="0.94000000000000916" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_350x8a727b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="1.56400000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_360x8a72890in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="2.1880000000000108" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_370x8a72970in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="2.8120000000000118" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_380x8a72a50in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="3.4360000000000128" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_390x8a72b30in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="4.0600000000000147" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_400x8a72c10in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="4.6840000000000153" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_410x8a72cf0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="5.3080000000000149" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_420x8a72dd0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="5.9320000000000164" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_430x8a72eb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="6.5560000000000178" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_440x8a72f90in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="7.1800000000000184" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_450x8a73070in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="7.8040000000000198" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_460x8a73150in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="8.4280000000000204" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_470x8a73230in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="9.0520000000000209" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_480x8a73310in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="9.6760000000000232" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_490x8a733f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="10.30000000000002" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_500x8a734d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="10.924000000000021" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_510x8a735b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="11.548000000000021" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_520x8a73690in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="12.172000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_530x8a73770in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="12.796000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_540x8a73850in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="13.42000000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_550x8a73930in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="14.044000000000032" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_560x8a73a10in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="14.668000000000029" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_570x8a73af0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="15.29200000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_580x8a73bd0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="15.916000000000032" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_590x8a73cb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="16.540000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_600x8a73d90in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="17.16400000000003" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_610xedb1ee0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="17.788000000000032" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_620x8a721f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="18.412000000000031" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_630x8a722d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="19.03600000000004" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_640x8a74280in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="19.660000000000039" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_650x8a74360in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos" x="0" y="0" z="20.284000000000042" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutStack_Outer_Cell0x8a74440in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutStackpos" x="0" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleStack0x8a74520in_dd_Geometry_DownstreamRegion_Ecal_Modules_Outerpos" x="0" y="0" z="-11.350000000000001" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows0x8a746e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-91.425000000000011" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_10x8a747d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-79.235000000000014" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_20x8a748c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-67.045000000000002" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_30x8a749e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-54.854999999999997" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_40x8a74ad0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-42.664999999999999" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_50x8a74c10in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-30.475000000000001" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_60x8a74cd0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-18.285" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_70x8a74dc0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-6.095000000000006" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_80x8a74eb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="6.0949999999999935" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_90x8a75030in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="18.284999999999993" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_100x8a75120in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="30.475000000000001" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_110x8a75210in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="42.665000000000013" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_120x8a75300in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="54.855000000000018" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_130x8a753f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="67.04500000000003" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_140x8a754e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="79.235000000000042" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_150x8a755d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="91.425000000000054" y="6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_160x8a756c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-91.425000000000011" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_170x8a74fa0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-79.235000000000014" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_180x8a75920in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-67.045000000000002" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_190x8a75a10in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-54.854999999999997" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_200x8a75b00in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-42.664999999999999" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_210x8a75bf0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-30.475000000000001" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_220x8a75ce0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-18.285" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_230x8a75dd0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="-6.095000000000006" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_240x8a75ec0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="6.0949999999999935" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_250x8a75fb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="18.284999999999993" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_260x8a760a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="30.475000000000001" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_270x8a76190in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="42.665000000000013" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_280x8a76280in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="54.855000000000018" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_290x8a76370in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="67.04500000000003" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_300x8a76460in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="79.235000000000042" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_310x8a76550in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos" x="91.425000000000054" y="-6.0950000000000006" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left0x8a766d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="304.75" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_10x8a767c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="280.37" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_20x8a768b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="255.99000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_30x8a769d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="231.61000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_40x8a76ac0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="207.23000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_50x8a76bb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="182.85000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_60x8a76c70in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="158.47000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_70x8a76d60in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="134.09" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows0x8a76e50in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="304.75" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_10x8a76fd0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="280.37" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_20x8a770c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="255.99000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_30x8a771b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="231.61000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_40x8a772a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="207.23000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_50x8a77390in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="182.85000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_60x8a77480in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="158.47000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_70x8a77570in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="134.09" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_80x8a77660in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="109.70999999999999" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_90x8a76640in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="85.330000000000027" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_100x8a778c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="60.950000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_110x8a779b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="36.569999999999986" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_120x8a77aa0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="12.18999999999996" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_130x8a77b90in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-12.190000000000051" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_140x8a77c80in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-36.570000000000071" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_150x8a77d70in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-60.950000000000095" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_160x8a77e60in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-85.330000000000112" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_170x8a77f50in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-109.71000000000011" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_180x8a78040in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-134.09000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_190x8a78130in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-158.47000000000023" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_200x8a78220in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-182.85000000000022" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_210x8a78310in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-207.23000000000022" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_220x8a78400in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-231.61000000000024" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_230x8a784f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-255.99000000000021" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_240x8a785e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-280.37000000000029" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_250x8a77750in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="97.52000000000001" y="-304.75000000000034" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left0x8a788e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="-304.75" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_10x8a789d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="-280.37" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_20x8a78ac0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="-255.99000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_30x8a78bb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="-231.61000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_40x8a78ca0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="-207.23000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_50x8a78d90in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="-182.85000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_60x8a78e80in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="-158.47000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_70x8a78f70in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos" x="-97.52000000000001" y="-134.09" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_EcalAOuter0x8a74680in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeftpos" x="0" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecal_EcalA0x8a76f70in_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecalpos" x="195.04000000000002" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_FiberShieldRight0x8a7a5c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRightpos" x="0" y="0" z="-40.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HAirSlotsR0x8a7b680in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="0" y="-23.280000000000001" z="29.5" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HAirSlotsR_10x8a7b740in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="0" y="23.280000000000001" z="29.5" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_VAirSlotsR0x8a7b800in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="-11.090000000000002" y="0" z="29.5" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets1R0x8a7b920in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="0" y="-23.280000000000001" z="-11.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets1R_10x8a7ba10in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="0" y="23.280000000000001" z="-11.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_VSteelSheets1R0x8a7bb90in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="-11.090000000000002" y="0" z="-11.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets2R0x8a7bc50in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="1.1000000000000001" y="-21.780000000000001" z="24.25" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets2R_10x8a7bd40in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="1.1000000000000001" y="21.780000000000001" z="24.25" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_VSteelSheets2R0x8a7be30in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="-9.5900000000000016" y="0" z="24.25" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets1R0x8a7c320in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="1.5" y="0" z="40.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets1R_10x8a7c580in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="1.5" y="0" z="20.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets2R0x8a7c9b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="1.1000000000000001" y="0" z="6.25" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets2R_10x8a7cc10in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="1.1000000000000001" y="0" z="-14.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets2R_20x8a7ccd0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos" x="1.1000000000000001" y="0" z="-35.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_InnSupportFrameRight0x8a7cdc0in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRightpos" x="182.85000000000002" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Up_Rows_Right0x8a7d2c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos" x="0" y="60.950000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Up_Rows_Right_10x8a7d380in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos" x="0" y="36.57" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Right_Rows0x8a7d470in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos" x="-12.190000000000001" y="12.190000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Right_Rows_10x8a7d590in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos" x="-12.190000000000001" y="-12.190000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Down_Rows_Right0x8a7d680in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos" x="0" y="-60.950000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Down_Rows_Right_10x8a7d800in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos" x="0" y="-36.57" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_EcalCInner0x8a7d260in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRightpos" x="146.28" y="0" z="0.75" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Up_Rows_Right0x8a7de80in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="48.760000000000005" y="109.70999999999999" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Up_Rows_Right_10x8a7df40in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="48.760000000000005" y="85.330000000000027" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows0x8a7e030in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="-48.760000000000005" y="109.70999999999999" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_10x8a7e150in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="-48.760000000000005" y="85.330000000000027" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_20x8a7e240in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="-48.760000000000005" y="60.950000000000017" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_30x8a7e3c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="-48.760000000000005" y="36.57" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_40x8a7e480in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="-48.760000000000005" y="12.190000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_50x8a7e570in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="-48.760000000000005" y="-12.189999999999991" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_60x8a7e660in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="-48.760000000000005" y="-36.569999999999986" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_70x8a7e7e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="-48.760000000000005" y="-60.949999999999982" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_80x8a7e8d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="-48.760000000000005" y="-85.329999999999984" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_90x8a7e9c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="-48.760000000000005" y="-109.70999999999999" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Down_Rows_Right0x8a7eab0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="48.760000000000005" y="-109.70999999999999" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Down_Rows_Right_10x8a7de20in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos" x="48.760000000000005" y="-85.330000000000027" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_EcalCMiddle0x8a7ecb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRightpos" x="97.52000000000001" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right0x8a7f1d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="304.75" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_10x8a7f290in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="280.37" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_20x8a7f380in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="255.99000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_30x8a7f4a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="231.61000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_40x8a7f590in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="207.23000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_50x8a7f710in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="182.85000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_60x8a7f7d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="158.47000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_70x8a7f8c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="134.09" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows0x8a7f9b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="304.75" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_10x8a7fb30in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="280.37" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_20x8a7fc20in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="255.99000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_30x8a7fd10in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="231.61000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_40x8a7fe00in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="207.23000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_50x8a7fef0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="182.85000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_60x8a7ffe0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="158.47000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_70x8a800d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="134.09" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_80x8a801c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="109.70999999999999" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_90x8a7f680in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="85.330000000000027" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_100x8a80420in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="60.950000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_110x8a80510in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="36.569999999999986" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_120x8a80600in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="12.18999999999996" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_130x8a806f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-12.190000000000051" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_140x8a807e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-36.570000000000071" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_150x8a808d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-60.950000000000095" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_160x8a809c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-85.330000000000112" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_170x8a80ab0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-109.71000000000011" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_180x8a80ba0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-134.09000000000012" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_190x8a80c90in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-158.47000000000023" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_200x8a80d80in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-182.85000000000022" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_210x8a80e70in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-207.23000000000022" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_220x8a80f60in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-231.61000000000024" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_230x8a81050in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-255.99000000000021" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_240x8a81140in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-280.37000000000029" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_250x8a802b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="-97.52000000000001" y="-304.75000000000034" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right0x8a81440in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="-304.75" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_10x8a81530in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="-280.37" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_20x8a81620in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="-255.99000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_30x8a81710in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="-231.61000000000001" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_40x8a81800in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="-207.23000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_50x8a818f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="-182.85000000000002" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_60x8a819e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="-158.47000000000003" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_70x8a81ad0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos" x="97.52000000000001" y="-134.09" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_EcalCOuter0x8a7f170in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRightpos" x="0" y="0" z="0" unit="cm"/> + <position name="_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecal_EcalC0x8a81c40in_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecalpos" x="-195.04000000000002" y="0" z="0" unit="cm"/> + </define> + <materials> + <element name="NITROGEN_elm" formula="N" Z="7"> + <atom unit="g/mole" value="14.006740000000001"/> + </element> + <element name="OXYGEN_elm" formula="O" Z="8"> + <atom unit="g/mole" value="15.9994"/> + </element> + <material name="_dd_Materials_Air"> + <D unit="g/cm3" value="0.001204999365978422"/> + <fraction n="0.69999998807907104" ref="NITROGEN_elm"/> + <fraction n="0.30000001192092896" ref="OXYGEN_elm"/> + </material> + <element name="ALUMINIUM_elm" formula="AL" Z="13"> + <atom unit="g/mole" value="26.981538"/> + </element> + <material name="_dd_Materials_Ecal_EcalDrilledAluminium"> + <D unit="g/cm3" value="1.350599289369673"/> + <fraction n="0.9995499849319458" ref="ALUMINIUM_elm"/> + <fraction n="0.00031500001205131412" ref="NITROGEN_elm"/> + <fraction n="0.00013499999477062374" ref="OXYGEN_elm"/> + </material> + <element name="CARBON_elm" formula="C" Z="6"> + <atom unit="g/mole" value="12.0107"/> + </element> + <element name="IRON_elm" formula="FE" Z="26"> + <atom unit="g/mole" value="55.844999999999999"/> + </element> + <material name="_dd_Materials_Ecal_EcalSteel"> + <D unit="g/cm3" value="7.8699958591287782"/> + <fraction n="0.029999999329447746" ref="CARBON_elm"/> + <fraction n="0.97000002861022949" ref="IRON_elm"/> + </material> + <element name="LEAD_elm" formula="PB" Z="82"> + <atom unit="g/mole" value="207.19999999999999"/> + </element> + <material name="_dd_Materials_Ecal_EcalPb"> + <D unit="g/cm3" value="11.3499940280955"/> + <fraction n="1" ref="LEAD_elm"/> + </material> + <element name="HYDROGEN_elm" formula="H" Z="1"> + <atom unit="g/mole" value="1.0079400000000001"/> + </element> + <material name="_dd_Materials_Ecal_EcalPlasticInnFC"> + <D unit="g/cm3" value="0.28699984899237091"/> + <fraction n="0.91962671279907227" ref="CARBON_elm"/> + <fraction n="0.077173300087451935" ref="HYDROGEN_elm"/> + <fraction n="0.0022400000598281622" ref="NITROGEN_elm"/> + <fraction n="0.00095999997574836016" ref="OXYGEN_elm"/> + </material> + <material name="_dd_Materials_Ecal_EcalPlasticBC"> + <D unit="g/cm3" value="0.1099999421225115"/> + <fraction n="0.92165637016296387" ref="CARBON_elm"/> + <fraction n="0.07734362781047821" ref="HYDROGEN_elm"/> + <fraction n="0.000699999975040555" ref="NITROGEN_elm"/> + <fraction n="0.00030000001424923539" ref="OXYGEN_elm"/> + </material> + <material name="_dd_Materials_Ecal_EcalPlastic"> + <D unit="g/cm3" value="1.0319994570039259"/> + <fraction n="0.92257893085479736" ref="CARBON_elm"/> + <fraction n="0.077421046793460846" ref="HYDROGEN_elm"/> + </material> + <material name="_dd_Materials_Ecal_EcalFiber"> + <D unit="g/cm3" value="1.0319994570039259"/> + <fraction n="0.92257893085479736" ref="CARBON_elm"/> + <fraction n="0.077421046793460846" ref="HYDROGEN_elm"/> + </material> + <material name="_dd_Materials_Ecal_EcalSc"> + <D unit="g/cm3" value="1.0319994570039259"/> + <fraction n="0.92257893085479736" ref="CARBON_elm"/> + <fraction n="0.077421046793460846" ref="HYDROGEN_elm"/> + </material> + <material name="_dd_Materials_Ecal_EcalPlasticMidFC"> + <D unit="g/cm3" value="0.25399986635561739"/> + <fraction n="0.91925764083862305" ref="CARBON_elm"/> + <fraction n="0.077142335474491119" ref="HYDROGEN_elm"/> + <fraction n="0.0025200000964105129" ref="NITROGEN_elm"/> + <fraction n="0.0010799999581649899" ref="OXYGEN_elm"/> + </material> + <material name="_dd_Materials_Ecal_EcalPlasticOutFC"> + <D unit="g/cm3" value="0.23499987635263819"/> + <fraction n="0.9188886284828186" ref="CARBON_elm"/> + <fraction n="0.077111363410949707" ref="HYDROGEN_elm"/> + <fraction n="0.00279999990016222" ref="NITROGEN_elm"/> + <fraction n="0.0012000000569969416" ref="OXYGEN_elm"/> + </material> + </materials> + <solids> + <box name="Ecal_Box" x="1580.1600000000001" y="638.88000000000011" z="83" lunit="cm"/> + <polycone name="EcalPipeHole" startphi="0" deltaphi="360" aunit="deg" lunit="cm"> + <zplane z="-42.25" rmin="0" rmax="15.602500000000001"/> + <zplane z="6.7610000000000019" rmin="0" rmax="16.092500000000001"/> + <zplane z="9.0610000000000017" rmin="0" rmax="16.199999999999999"/> + <zplane z="9.1110000000000024" rmin="0" rmax="19.100000000000001"/> + <zplane z="30.761000000000003" rmin="0" rmax="20.600000000000001"/> + <zplane z="42.25" rmin="0" rmax="20.600000000000001"/> + </polycone> + <subtraction name="Ecal_Total_shape_0x556245e66280"> + <first ref="Ecal_Box"/> + <second ref="EcalPipeHole"/> + <position name="Ecal_Total_shape_0x556245e66280EcalPipeHolepos" x="0" y="0.019000000000000003" z="0" unit="cm"/> + <rotation name="Ecal_Total_shape_0x556245e66280EcalPipeHolerot" x="-0.20699999999999999" y="-0" z="0" unit="deg"/> + </subtraction> + <box name="Ecal_Box_Left" x="390.08000000000004" y="633.88000000000011" z="82.5" lunit="cm"/> + <polycone name="EcalPipeHoleLeft" startphi="0" deltaphi="360" aunit="deg" lunit="cm"> + <zplane z="-42.25" rmin="0" rmax="15.602500000000001"/> + <zplane z="6.7610000000000019" rmin="0" rmax="16.092500000000001"/> + <zplane z="9.0610000000000017" rmin="0" rmax="16.199999999999999"/> + <zplane z="9.1110000000000024" rmin="0" rmax="19.100000000000001"/> + <zplane z="30.761000000000003" rmin="0" rmax="20.600000000000001"/> + <zplane z="42.25" rmin="0" rmax="20.600000000000001"/> + </polycone> + <subtraction name="Ecal_Total_Left_shape_0x556245e614d0"> + <first ref="Ecal_Box_Left"/> + <second ref="EcalPipeHoleLeft"/> + <position name="Ecal_Total_Left_shape_0x556245e614d0EcalPipeHoleLeftpos" x="-195.04000000000002" y="0.019000000000000003" z="0" unit="cm"/> + <rotation name="Ecal_Total_Left_shape_0x556245e614d0EcalPipeHoleLeftrot" x="-0.20699999999999999" y="-0" z="0" unit="deg"/> + </subtraction> + <box name="ShildBoxLeft" x="389.08000000000004" y="632.88000000000011" z="0.10000000000000001" lunit="cm"/> + <box name="Subtracted_Shild_Box_Left" x="49.760000000000005" y="49.760000000000005" z="1.1000000000000001" lunit="cm"/> + <subtraction name="ShieldSubLeft_shape_0x556245e5ac20"> + <first ref="ShildBoxLeft"/> + <second ref="Subtracted_Shild_Box_Left"/> + <position name="ShieldSubLeft_shape_0x556245e5ac20Subtracted_Shild_Box_Leftpos" x="-194.54000000000002" y="0" z="0" unit="cm"/> + </subtraction> + <box name="PlugboxL" x="24.380000000000003" y="48.760000000000005" z="82.5" lunit="cm"/> + <polycone name="PipeHoleL" startphi="0" deltaphi="360" aunit="deg" lunit="cm"> + <zplane z="-42.25" rmin="0" rmax="15.602500000000001"/> + <zplane z="6.7610000000000019" rmin="0" rmax="16.092500000000001"/> + <zplane z="9.0610000000000017" rmin="0" rmax="16.199999999999999"/> + <zplane z="9.1110000000000024" rmin="0" rmax="19.100000000000001"/> + <zplane z="30.761000000000003" rmin="0" rmax="20.600000000000001"/> + <zplane z="42.25" rmin="0" rmax="20.600000000000001"/> + </polycone> + <subtraction name="PlugWithHoleL_shape_0x556245e5cbc0"> + <first ref="PlugboxL"/> + <second ref="PipeHoleL"/> + <position name="PlugWithHoleL_shape_0x556245e5cbc0PipeHoleLpos" x="-12.190000000000001" y="0.019000000000000003" z="0" unit="cm"/> + <rotation name="PlugWithHoleL_shape_0x556245e5cbc0PipeHoleLrot" x="-0.20699999999999999" y="-0" z="0" unit="deg"/> + </subtraction> + <box name="HAirSlot_shape_0x556245e5ad40" x="24.380000000000003" y="2.2000000000000002" z="23.5" lunit="cm"/> + <box name="VAirSlot_shape_0x556245e5ade0" x="2.2000000000000002" y="44.360000000000007" z="23.5" lunit="cm"/> + <box name="HSteelSheet1_shape_0x556245e5aed0" x="24.375" y="2.1899999999999999" z="58.990000000000002" lunit="cm"/> + <box name="VSteelSheet1_shape_0x556245e5afc0" x="2.1899999999999999" y="44.350000000000001" z="58.990000000000002" lunit="cm"/> + <box name="HSteelSheet2_shape_0x556245e5b0b0" x="22.175000000000001" y="0.79000000000000004" z="33.990000000000002" lunit="cm"/> + <box name="VSteelSheet2_shape_0x556245e5b1a0" x="0.79000000000000004" y="42.75" z="33.990000000000002" lunit="cm"/> + <box name="StSheet1L" x="21.375" y="42.75" z="0.9900000000000001" lunit="cm"/> + <tube name="CylinderHole1L" rmin="0" rmax="21" z="2" startphi="0" deltaphi="360" aunit="deg" lunit="cm"/> + <subtraction name="StSheetWithHole1L_shape_0x556245e5b910"> + <first ref="StSheet1L"/> + <second ref="CylinderHole1L"/> + <position name="StSheetWithHole1L_shape_0x556245e5b910CylinderHole1Lpos" x="-10.6875" y="0" z="0" unit="cm"/> + </subtraction> + <box name="StSheet2L" x="22.175000000000001" y="44.350000000000001" z="0.9900000000000001" lunit="cm"/> + <tube name="CylinderHole2L" rmin="0" rmax="16.5" z="3" startphi="0" deltaphi="360" aunit="deg" lunit="cm"/> + <subtraction name="StSheetWithHole2L_shape_0x556245e5c0c0"> + <first ref="StSheet2L"/> + <second ref="CylinderHole2L"/> + <position name="StSheetWithHole2L_shape_0x556245e5c0c0CylinderHole2Lpos" x="-11.0875" y="0" z="0" unit="cm"/> + </subtraction> + <box name="Inner_Box_Left" x="97.52000000000001" y="146.28" z="69" lunit="cm"/> + <box name="Subtracted_Support_Box_Left" x="48.760000000000005" y="48.760000000000005" z="70" lunit="cm"/> + <subtraction name="Ecal_Inner_Section_Left_shape_0x556245e5e100"> + <first ref="Inner_Box_Left"/> + <second ref="Subtracted_Support_Box_Left"/> + <position name="Ecal_Inner_Section_Left_shape_0x556245e5e100Subtracted_Support_Box_Leftpos" x="-48.760000000000005" y="0" z="0" unit="cm"/> + </subtraction> + <box name="Inner_Block1_shape_0x556245e5d850" x="97.52000000000001" y="24.380000000000003" z="69" lunit="cm"/> + <box name="Inner_Module_Box_shape_0x556245e5d720" x="12.190000000000001" y="12.190000000000001" z="69" lunit="cm"/> + <box name="Inner_Module_Front_Cover_Box_shape_0x556245e5cca0" x="12.190000000000001" y="12.190000000000001" z="2.3000000000000003" lunit="cm"/> + <box name="Inner_Module_Back_Cover_Box_shape_0x556245e5cd70" x="12.190000000000001" y="12.190000000000001" z="6.9000000000000004" lunit="cm"/> + <box name="Inner_Module_Read_Out_Box_shape_0x556245e5cfd0" x="12.190000000000001" y="12.190000000000001" z="16.600000000000001" lunit="cm"/> + <box name="Inner_Read_Out_Box_shape_0x556245e5ce70" x="11.07" y="11.07" z="16.600000000000001" lunit="cm"/> + <box name="Inner_Stack_Main_Box_shape_0x556245e5d5f0" x="12.170000000000002" y="12.170000000000002" z="43.200000000000003" lunit="cm"/> + <box name="Inner_Cell_Main_Box_shape_0x556245e5d4f0" x="4.04" y="4.04" z="43.200000000000003" lunit="cm"/> + <box name="Steel_Cell_Box_shape_0x556245e5d0d0" x="4.04" y="4.04" z="0.10000000000000001" lunit="cm"/> + <box name="Plastic_Cell_Box_shape_0x556245e5d1a0" x="4.04" y="4.04" z="0.70000000000000007" lunit="cm"/> + <box name="Pb_Cell_Box_shape_0x556245e5d420" x="4.04" y="4.04" z="0.20000000000000001" lunit="cm"/> + <tube name="Fiber_Tube_Pb_shape_0x556245e5d330" rmin="0" rmax="0.059999999999999998" z="0.20000000000000001" startphi="0" deltaphi="360" aunit="deg" lunit="cm"/> + <box name="Inner_Block2_shape_0x556245e5d940" x="73.140000000000015" y="24.380000000000003" z="69" lunit="cm"/> + <box name="Middle_Box_Left" x="195.04000000000002" y="243.80000000000001" z="70.5" lunit="cm"/> + <box name="Middle_Subtracted_Box_Left" x="195.04000000000002" y="146.28" z="71.5" lunit="cm"/> + <subtraction name="Ecal_Middle_Section_Left_shape_0x556245e5f570"> + <first ref="Middle_Box_Left"/> + <second ref="Middle_Subtracted_Box_Left"/> + <position name="Ecal_Middle_Section_Left_shape_0x556245e5f570Middle_Subtracted_Box_Leftpos" x="-97.52000000000001" y="0" z="0" unit="cm"/> + </subtraction> + <box name="Middle_Block_shape_0x556245e5edc0" x="97.52000000000001" y="24.380000000000003" z="70.5" lunit="cm"/> + <box name="Middle_Module_Box_shape_0x556245e5ec90" x="12.190000000000001" y="12.190000000000001" z="70.5" lunit="cm"/> + <box name="Middle_Module_Front_Cover_Box_shape_0x556245e5e210" x="12.190000000000001" y="12.190000000000001" z="2.3000000000000003" lunit="cm"/> + <box name="Middle_Module_Back_Cover_Box_shape_0x556245e5e320" x="12.190000000000001" y="12.190000000000001" z="7.4000000000000004" lunit="cm"/> + <box name="Middle_Module_Read_Out_Box_shape_0x556245e5e630" x="12.190000000000001" y="12.190000000000001" z="17.600000000000001" lunit="cm"/> + <tube name="Middle_Read_Out_Tube_shape_0x556245e5e4b0" rmin="1.5" rmax="1.7000000000000002" z="17.600000000000001" startphi="0" deltaphi="360" aunit="deg" lunit="cm"/> + <box name="Middle_Stack_Main_Box_shape_0x556245e5eb60" x="12.170000000000002" y="12.170000000000002" z="43.200000000000003" lunit="cm"/> + <box name="Middle_Cell_Main_Box_shape_0x556245e5ea30" x="6.0600000000000005" y="6.0600000000000005" z="43.200000000000003" lunit="cm"/> + <box name="Steel_Cell_Box_shape_0x556245e5e700" x="6.0600000000000005" y="6.0600000000000005" z="0.10000000000000001" lunit="cm"/> + <box name="Plastic_Cell_Box_shape_0x556245e5e810" x="6.0600000000000005" y="6.0600000000000005" z="0.70000000000000007" lunit="cm"/> + <box name="Pb_Cell_Box_shape_0x556245e5e940" x="6.0600000000000005" y="6.0600000000000005" z="0.20000000000000001" lunit="cm"/> + <box name="Outer_Box" x="390.08000000000004" y="633.88000000000011" z="70.5" lunit="cm"/> + <box name="Outer_Subtracted_Box_Left" x="390.08000000000004" y="243.80000000000001" z="71.5" lunit="cm"/> + <subtraction name="Ecal_Outer_Section_Left_shape_0x556245e609b0"> + <first ref="Outer_Box"/> + <second ref="Outer_Subtracted_Box_Left"/> + <position name="Ecal_Outer_Section_Left_shape_0x556245e609b0Outer_Subtracted_Box_Leftpos" x="-195.04000000000002" y="0" z="0" unit="cm"/> + </subtraction> + <box name="Outer_Block_shape_0x556245e60230" x="195.04000000000002" y="24.380000000000003" z="70.5" lunit="cm"/> + <box name="Outer_Module_Box_shape_0x556245e60100" x="12.190000000000001" y="12.190000000000001" z="70.5" lunit="cm"/> + <box name="Outer_Module_Front_Cover_Box_shape_0x556245e5f680" x="12.190000000000001" y="12.190000000000001" z="2.3000000000000003" lunit="cm"/> + <box name="Outer_Module_Back_Cover_Box_shape_0x556245e5f790" x="12.190000000000001" y="12.190000000000001" z="7.4000000000000004" lunit="cm"/> + <box name="Outer_Module_Read_Out_Box_shape_0x556245e5faa0" x="12.190000000000001" y="12.190000000000001" z="17.600000000000001" lunit="cm"/> + <tube name="Outer_Read_Out_Tube_shape_0x556245e5f920" rmin="1.5" rmax="1.7000000000000002" z="17.600000000000001" startphi="0" deltaphi="360" aunit="deg" lunit="cm"/> + <box name="Outer_Stack_Main_Box_shape_0x556245e5ffd0" x="12.170000000000002" y="12.170000000000002" z="43.200000000000003" lunit="cm"/> + <box name="Outer_Cell_Main_Box_shape_0x556245e5fea0" x="12.120000000000001" y="12.120000000000001" z="43.200000000000003" lunit="cm"/> + <box name="Steel_Cell_Box_shape_0x556245e5fb70" x="12.120000000000001" y="12.120000000000001" z="0.10000000000000001" lunit="cm"/> + <box name="Plastic_Cell_Box_shape_0x556245e5fc80" x="12.120000000000001" y="12.120000000000001" z="0.70000000000000007" lunit="cm"/> + <box name="Pb_Cell_Box_shape_0x556245e5fdb0" x="12.120000000000001" y="12.120000000000001" z="0.20000000000000001" lunit="cm"/> + <box name="Ecal_Box_Right" x="390.08000000000004" y="633.88000000000011" z="82.5" lunit="cm"/> + <polycone name="EcalPipeHoleRight" startphi="0" deltaphi="360" aunit="deg" lunit="cm"> + <zplane z="-42.25" rmin="0" rmax="15.602500000000001"/> + <zplane z="6.7610000000000019" rmin="0" rmax="16.092500000000001"/> + <zplane z="9.0610000000000017" rmin="0" rmax="16.199999999999999"/> + <zplane z="9.1110000000000024" rmin="0" rmax="19.100000000000001"/> + <zplane z="30.761000000000003" rmin="0" rmax="20.600000000000001"/> + <zplane z="42.25" rmin="0" rmax="20.600000000000001"/> + </polycone> + <subtraction name="Ecal_Total_Right_shape_0x556245e65890"> + <first ref="Ecal_Box_Right"/> + <second ref="EcalPipeHoleRight"/> + <position name="Ecal_Total_Right_shape_0x556245e65890EcalPipeHoleRightpos" x="195.04000000000002" y="0.019000000000000003" z="0" unit="cm"/> + <rotation name="Ecal_Total_Right_shape_0x556245e65890EcalPipeHoleRightrot" x="-0.20699999999999999" y="-0" z="0" unit="deg"/> + </subtraction> + <box name="ShildBoxRight" x="389.08000000000004" y="632.88000000000011" z="0.10000000000000001" lunit="cm"/> + <box name="Subtracted_Shild_Box_Right" x="49.760000000000005" y="49.760000000000005" z="1.1000000000000001" lunit="cm"/> + <subtraction name="ShieldSubRight_shape_0x556245e61c60"> + <first ref="ShildBoxRight"/> + <second ref="Subtracted_Shild_Box_Right"/> + <position name="ShieldSubRight_shape_0x556245e61c60Subtracted_Shild_Box_Rightpos" x="194.54000000000002" y="0" z="0" unit="cm"/> + </subtraction> + <box name="PlugboxR" x="24.380000000000003" y="48.760000000000005" z="82.5" lunit="cm"/> + <polycone name="PipeHoleR" startphi="0" deltaphi="360" aunit="deg" lunit="cm"> + <zplane z="-42.25" rmin="0" rmax="15.602500000000001"/> + <zplane z="6.7610000000000019" rmin="0" rmax="16.092500000000001"/> + <zplane z="9.0610000000000017" rmin="0" rmax="16.199999999999999"/> + <zplane z="9.1110000000000024" rmin="0" rmax="19.100000000000001"/> + <zplane z="30.761000000000003" rmin="0" rmax="20.600000000000001"/> + <zplane z="42.25" rmin="0" rmax="20.600000000000001"/> + </polycone> + <subtraction name="PlugWithHoleR_shape_0x556245e63640"> + <first ref="PlugboxR"/> + <second ref="PipeHoleR"/> + <position name="PlugWithHoleR_shape_0x556245e63640PipeHoleRpos" x="12.190000000000001" y="0.019000000000000003" z="0" unit="cm"/> + <rotation name="PlugWithHoleR_shape_0x556245e63640PipeHoleRrot" x="-0.20699999999999999" y="-0" z="0" unit="deg"/> + </subtraction> + <box name="StSheet1R" x="21.375" y="42.75" z="0.9900000000000001" lunit="cm"/> + <tube name="CylinderHole1R" rmin="0" rmax="21" z="2" startphi="0" deltaphi="360" aunit="deg" lunit="cm"/> + <subtraction name="StSheetWithHole1R_shape_0x556245e62390"> + <first ref="StSheet1R"/> + <second ref="CylinderHole1R"/> + <position name="StSheetWithHole1R_shape_0x556245e62390CylinderHole1Rpos" x="10.6875" y="0" z="0" unit="cm"/> + </subtraction> + <box name="StSheet2R" x="22.175000000000001" y="44.350000000000001" z="0.9900000000000001" lunit="cm"/> + <tube name="CylinderHole2R" rmin="0" rmax="16.5" z="3" startphi="0" deltaphi="360" aunit="deg" lunit="cm"/> + <subtraction name="StSheetWithHole2R_shape_0x556245e62b40"> + <first ref="StSheet2R"/> + <second ref="CylinderHole2R"/> + <position name="StSheetWithHole2R_shape_0x556245e62b40CylinderHole2Rpos" x="11.0875" y="0" z="0" unit="cm"/> + </subtraction> + <box name="Inner_Box_Right" x="97.52000000000001" y="146.28" z="69" lunit="cm"/> + <box name="Subtracted_Support_Box_Right" x="48.760000000000005" y="48.760000000000005" z="70" lunit="cm"/> + <subtraction name="Ecal_Inner_Section_Right_shape_0x556245e63d80"> + <first ref="Inner_Box_Right"/> + <second ref="Subtracted_Support_Box_Right"/> + <position name="Ecal_Inner_Section_Right_shape_0x556245e63d80Subtracted_Support_Box_Rightpos" x="48.760000000000005" y="0" z="0" unit="cm"/> + </subtraction> + <box name="Middle_Box_Right" x="195.04000000000002" y="243.80000000000001" z="70.5" lunit="cm"/> + <box name="Middle_Subtracted_Box_Right" x="195.04000000000002" y="146.28" z="71.5" lunit="cm"/> + <subtraction name="Ecal_Middle_Section_Right_shape_0x556245e64570"> + <first ref="Middle_Box_Right"/> + <second ref="Middle_Subtracted_Box_Right"/> + <position name="Ecal_Middle_Section_Right_shape_0x556245e64570Middle_Subtracted_Box_Rightpos" x="97.52000000000001" y="0" z="0" unit="cm"/> + </subtraction> + <box name="Outer_Box_Right" x="390.08000000000004" y="633.88000000000011" z="70.5" lunit="cm"/> + <box name="Outer_Subtracted_Box_Right" x="390.08000000000004" y="243.80000000000001" z="71.5" lunit="cm"/> + <subtraction name="Ecal_Outer_Section_Right_shape_0x556245e64d70"> + <first ref="Outer_Box_Right"/> + <second ref="Outer_Subtracted_Box_Right"/> + <position name="Ecal_Outer_Section_Right_shape_0x556245e64d70Outer_Subtracted_Box_Rightpos" x="195.04000000000002" y="0" z="0" unit="cm"/> + </subtraction> + </solids> + <structure> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_ShieldLeft"> + <materialref ref="_dd_Materials_Ecal_EcalDrilledAluminium"/> + <solidref ref="ShieldSubLeft_shape_0x556245e5ac20"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalAirSlot"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="HAirSlot_shape_0x556245e5ad40"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_VerticalAirSlot"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="VAirSlot_shape_0x556245e5ade0"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalSteelSheet1"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="HSteelSheet1_shape_0x556245e5aed0"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_VericalSteelSheet1"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="VSteelSheet1_shape_0x556245e5afc0"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalSteelSheet2"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="HSteelSheet2_shape_0x556245e5b0b0"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_VericalSteelSheet2"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="VSteelSheet2_shape_0x556245e5b1a0"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole1Left"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="StSheetWithHole1L_shape_0x556245e5b910"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole2Left"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="StSheetWithHole2L_shape_0x556245e5c0c0"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft"> + <materialref ref="_dd_Materials_Ecal_EcalPb"/> + <solidref ref="PlugWithHoleL_shape_0x556245e5cbc0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HAirSlotsL0x8a28320" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalAirSlot"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HAirSlotsL0x8a28320in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HAirSlotsL_10x8a27590" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalAirSlot"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HAirSlotsL_10x8a27590in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_VAirSlotsL0x8a27820" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_VerticalAirSlot"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_VAirSlotsL0x8a27820in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets1L0x8a29050" copynumber="1003"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalSteelSheet1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets1L0x8a29050in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets1L_10x8a29110" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalSteelSheet1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets1L_10x8a29110in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_VSteelSheets1L0x8a293f0" copynumber="1005"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_VericalSteelSheet1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_VSteelSheets1L0x8a293f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets2L0x8a296b0" copynumber="1006"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalSteelSheet2"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets2L0x8a296b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets2L_10x8a29770" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalSteelSheet2"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_HSteelSheets2L_10x8a29770in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_VSteelSheets2L0x8a29a60" copynumber="1008"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_VericalSteelSheet2"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_VSteelSheets2L0x8a29a60in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets1L0x8a2a0a0" copynumber="1009"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole1Left"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets1L0x8a2a0a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets1L_10x8a2a160" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole1Left"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets1L_10x8a2a160in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets2L0x8a2a760" copynumber="1011"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole2Left"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets2L0x8a2a760in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets2L_10x8a2a820" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole2Left"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets2L_10x8a2a820in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets2L_20x8a2a8e0" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole2Left"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft_SteelSheets2L_20x8a2a8e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeftpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnFrontCover"> + <materialref ref="_dd_Materials_Ecal_EcalPlasticInnFC"/> + <solidref ref="Inner_Module_Front_Cover_Box_shape_0x556245e5cca0"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnBackCover"> + <materialref ref="_dd_Materials_Ecal_EcalPlasticBC"/> + <solidref ref="Inner_Module_Back_Cover_Box_shape_0x556245e5cd70"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnReadOutBox"> + <materialref ref="_dd_Materials_Ecal_EcalPlasticBC"/> + <solidref ref="Inner_Read_Out_Box_shape_0x556245e5ce70"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnReadOut"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Inner_Module_Read_Out_Box_shape_0x556245e5cfd0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnReadOut_InnerReadOutBox0x8a2d720" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnReadOutBox"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnReadOut_InnerReadOutBox0x8a2d720in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnReadOutpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellSteel"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="Steel_Cell_Box_shape_0x556245e5d0d0"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPlastic"> + <materialref ref="_dd_Materials_Ecal_EcalPlastic"/> + <solidref ref="Plastic_Cell_Box_shape_0x556245e5d1a0"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"> + <materialref ref="_dd_Materials_Ecal_EcalFiber"/> + <solidref ref="Fiber_Tube_Pb_shape_0x556245e5d330"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"> + <materialref ref="_dd_Materials_Ecal_EcalPb"/> + <solidref ref="Pb_Cell_Box_shape_0x556245e5d420"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber0x8a30470" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber0x8a30470in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_10x8a30520" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_10x8a30520in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_20x8a305d0" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_20x8a305d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_30x8a306e0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_30x8a306e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_40x8a307c0" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_40x8a307c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_50x8a308f0" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_50x8a308f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_60x8a309a0" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_60x8a309a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_70x8a30a80" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_70x8a30a80in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_80x8a30b60" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_80x8a30b60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_90x8a30cd0" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_90x8a30cd0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_100x8a30d60" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_100x8a30d60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_110x8a30e40" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_110x8a30e40in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_120x8a30f20" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_120x8a30f20in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_130x8a31000" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_130x8a31000in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_140x8a310e0" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_140x8a310e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_150x8a311c0" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb_InnerPbFiber_150x8a311c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPbpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell"> + <materialref ref="_dd_Materials_Ecal_EcalSc"/> + <solidref ref="Inner_Cell_Main_Box_shape_0x556245e5d4f0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnFrontSteelMatrix0x8a2e7b0" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellSteel"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnFrontSteelMatrix0x8a2e7b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnBackSteelMatrix0x8a2e860" copynumber="1001"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellSteel"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnBackSteelMatrix0x8a2e860in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnFrontPlastic0x8a2f500" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPlastic"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnFrontPlastic0x8a2f500in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnBackPlastic0x8a2f560" copynumber="1003"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPlastic"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_InnBackPlastic0x8a2f560in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells0x8a312a0" copynumber="1004"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells0x8a312a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_10x8a313d0" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_10x8a313d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_20x8a31480" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_20x8a31480in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_30x8a31560" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_30x8a31560in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_40x8a31640" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_40x8a31640in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_50x8a317b0" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_50x8a317b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_60x8a31840" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_60x8a31840in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_70x8a31920" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_70x8a31920in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_80x8a31a00" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_80x8a31a00in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_90x8a31ae0" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_90x8a31ae0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_100x8a31bc0" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_100x8a31bc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_110x8a31ca0" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_110x8a31ca0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_120x8a31d80" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_120x8a31d80in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_130x8a31720" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_130x8a31720in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_140x8a31fc0" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_140x8a31fc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_150x8a320a0" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_150x8a320a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_160x8a32180" copynumber="16"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_160x8a32180in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_170x8a32260" copynumber="17"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_170x8a32260in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_180x8a32340" copynumber="18"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_180x8a32340in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_190x8a32420" copynumber="19"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_190x8a32420in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_200x8a32500" copynumber="20"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_200x8a32500in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_210x8a325e0" copynumber="21"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_210x8a325e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_220x8a326c0" copynumber="22"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_220x8a326c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_230x8a327a0" copynumber="23"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_230x8a327a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_240x8a32880" copynumber="24"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_240x8a32880in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_250x8a32960" copynumber="25"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_250x8a32960in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_260x8a32a40" copynumber="26"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_260x8a32a40in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_270x8a32b20" copynumber="27"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_270x8a32b20in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_280x8a32c00" copynumber="28"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_280x8a32c00in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_290x8a31e60" copynumber="29"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_290x8a31e60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_300x8a32ef0" copynumber="30"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_300x8a32ef0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_310x8a32fa0" copynumber="31"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_310x8a32fa0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_320x8a33080" copynumber="32"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_320x8a33080in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_330x8a33160" copynumber="33"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_330x8a33160in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_340x8a33240" copynumber="34"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_340x8a33240in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_350x8a33320" copynumber="35"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_350x8a33320in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_360x8a33400" copynumber="36"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_360x8a33400in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_370x8a334e0" copynumber="37"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_370x8a334e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_380x8a335c0" copynumber="38"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_380x8a335c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_390x8a336a0" copynumber="39"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_390x8a336a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_400x8a33780" copynumber="40"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_400x8a33780in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_410x8a33860" copynumber="41"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_410x8a33860in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_420x8a33940" copynumber="42"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_420x8a33940in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_430x8a33a20" copynumber="43"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_430x8a33a20in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_440x8a33b00" copynumber="44"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_440x8a33b00in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_450x8a33be0" copynumber="45"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_450x8a33be0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_460x8a33cc0" copynumber="46"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_460x8a33cc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_470x8a33da0" copynumber="47"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_470x8a33da0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_480x8a33e80" copynumber="48"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_480x8a33e80in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_490x8a33f60" copynumber="49"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_490x8a33f60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_500x8a34040" copynumber="50"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_500x8a34040in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_510x8a34120" copynumber="51"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_510x8a34120in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_520x8a34200" copynumber="52"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_520x8a34200in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_530x8a342e0" copynumber="53"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_530x8a342e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_540x8a343c0" copynumber="54"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_540x8a343c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_550x8a344a0" copynumber="55"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_550x8a344a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_560x8a34580" copynumber="56"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_560x8a34580in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_570x8a34660" copynumber="57"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_570x8a34660in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_580x8a34740" copynumber="58"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_580x8a34740in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_590x8a34820" copynumber="59"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_590x8a34820in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_600x8a34900" copynumber="60"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_600x8a34900in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_610x8a303f0" copynumber="61"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_610x8a303f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_620x8a32d60" copynumber="62"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_620x8a32d60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_630x8a32e40" copynumber="63"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_630x8a32e40in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_640x8a34df0" copynumber="64"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_640x8a34df0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_650x8a34ed0" copynumber="65"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell_Inner_Pb_Cells_650x8a34ed0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCellpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Inner_Stack_Main_Box_shape_0x556245e5d5f0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix0xed86e60" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix0xed86e60in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_10xed86ec0" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_10xed86ec0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_20xed87f90" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_20xed87f90in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_30xed880b0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_30xed880b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_40xed881a0" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_40xed881a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_50xed88960" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_50xed88960in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_60xed88a20" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_60xed88a20in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_70xed88b10" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_70xed88b10in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_80xed88c00" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack_Inner_Cells_Matrix_80xed88c00in_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStackpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="Inner_Module_Box_shape_0x556245e5d720"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleFrontCover0x8a2b9a0" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnFrontCover"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleFrontCover0x8a2b9a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_Innerpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleBackCover0x8a2c990" copynumber="1001"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnBackCover"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleBackCover0x8a2c990in_dd_Geometry_DownstreamRegion_Ecal_Modules_Innerpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleReadOut0x8a2d780" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnReadOut"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleReadOut0x8a2d780in_dd_Geometry_DownstreamRegion_Ecal_Modules_Innerpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleStack0xed86f20" copynumber="1003"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_InnStack"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner_InnerModuleStack0xed86f20in_dd_Geometry_DownstreamRegion_Ecal_Modules_Innerpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Inner_Block1_shape_0x556245e5d850"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows10xed88e90" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows10xed88e90in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_10xeda1ca0" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_10xeda1ca0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_20xeda1d90" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_20xeda1d90in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_30xeda1eb0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_30xeda1eb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_40xeda1fa0" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_40xeda1fa0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_50xeda20e0" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_50xeda20e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_60xeda21a0" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_60xeda21a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_70xeda2290" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_70xeda2290in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_80xeda2380" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_80xeda2380in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_90xeda2500" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_90xeda2500in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_100xeda25f0" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_100xeda25f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_110xeda26e0" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_110xeda26e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_120xeda27d0" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_120xeda27d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_130xeda28c0" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_130xeda28c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_140xeda29b0" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_140xeda29b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_150xeda2aa0" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1_Inner_Module_Rows1_150xeda2aa0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1pos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Inner_Block2_shape_0x556245e5d940"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows20xeda2f30" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows20xeda2f30in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_10xeda3020" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_10xeda3020in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_20xeda3110" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_20xeda3110in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_30xeda3230" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_30xeda3230in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_40xeda3320" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_40xeda3320in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_50xeda3460" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_50xeda3460in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_60xeda3520" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_60xeda3520in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_70xeda3610" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_70xeda3610in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_80xeda3700" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_80xeda3700in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_90xeda37f0" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_90xeda37f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_100xeda38e0" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_100xeda38e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_110xeda39d0" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Inner"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2_Inner_Module_Rows2_110xeda39d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2pos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Ecal_Inner_Section_Left_shape_0x556245e5e100"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Up_Rows_Left0xeda2c20" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Up_Rows_Left0xeda2c20in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Up_Rows_Left_10xeda2d10" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Up_Rows_Left_10xeda2d10in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Left_Rows0xeda3b50" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Left_Rows0xeda3b50in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Left_Rows_10xeda3c70" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Left_Rows_10xeda3c70in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Down_Rows_Left0xeda3d60" copynumber="1004"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Down_Rows_Left0xeda3d60in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Down_Rows_Left_10xeda3e50" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft_Inner_Down_Rows_Left_10xeda3e50in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeftpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidFrontCover"> + <materialref ref="_dd_Materials_Ecal_EcalPlasticMidFC"/> + <solidref ref="Middle_Module_Front_Cover_Box_shape_0x556245e5e210"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidBackCover"> + <materialref ref="_dd_Materials_Ecal_EcalPlasticBC"/> + <solidref ref="Middle_Module_Back_Cover_Box_shape_0x556245e5e320"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutTube"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="Middle_Read_Out_Tube_shape_0x556245e5e4b0"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Middle_Module_Read_Out_Box_shape_0x556245e5e630"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix0xeda5ea0" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutTube"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix0xeda5ea0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix_10xeda5f60" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutTube"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix_10xeda5f60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix_20xeda6070" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutTube"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix_20xeda6070in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix_30xeda6190" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutTube"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut_Middle_ReadOutTube_Matrix_30xeda6190in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOutpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellSteel"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="Steel_Cell_Box_shape_0x556245e5e700"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPlastic"> + <materialref ref="_dd_Materials_Ecal_EcalPlastic"/> + <solidref ref="Plastic_Cell_Box_shape_0x556245e5e810"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"> + <materialref ref="_dd_Materials_Ecal_EcalPb"/> + <solidref ref="Pb_Cell_Box_shape_0x556245e5e940"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber0xeda7000" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber0xeda7000in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_10xeda70b0" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_10xeda70b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_20xeda7190" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_20xeda7190in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_30xeda72a0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_30xeda72a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_40xeda7380" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_40xeda7380in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_50xeda74b0" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_50xeda74b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_60xeda7560" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_60xeda7560in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_70xeda7640" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_70xeda7640in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_80xeda7720" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_80xeda7720in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_90xeda7890" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_90xeda7890in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_100xeda7920" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_100xeda7920in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_110xeda7a00" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_110xeda7a00in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_120xeda7ae0" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_120xeda7ae0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_130xeda7bc0" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_130xeda7bc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_140xeda7ca0" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_140xeda7ca0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_150xeda7d80" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_150xeda7d80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_160xeda7e60" copynumber="16"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_160xeda7e60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_170xeda7800" copynumber="17"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_170xeda7800in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_180xeda80a0" copynumber="18"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_180xeda80a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_190xeda8180" copynumber="19"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_190xeda8180in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_200xeda8260" copynumber="20"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_200xeda8260in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_210xeda8340" copynumber="21"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_210xeda8340in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_220xeda8420" copynumber="22"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_220xeda8420in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_230xeda8500" copynumber="23"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_230xeda8500in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_240xeda85e0" copynumber="24"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_240xeda85e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_250xeda86c0" copynumber="25"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_250xeda86c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_260xeda87a0" copynumber="26"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_260xeda87a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_270xeda8880" copynumber="27"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_270xeda8880in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_280xeda8960" copynumber="28"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_280xeda8960in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_290xeda8a40" copynumber="29"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_290xeda8a40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_300xeda8b20" copynumber="30"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_300xeda8b20in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_310xeda8c00" copynumber="31"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_310xeda8c00in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_320xeda8ce0" copynumber="32"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_320xeda8ce0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_330xeda7f40" copynumber="33"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_330xeda7f40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_340xeda8fd0" copynumber="34"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_340xeda8fd0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_350xeda9080" copynumber="35"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb_MiddlePbFiber_350xeda9080in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPbpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell"> + <materialref ref="_dd_Materials_Ecal_EcalSc"/> + <solidref ref="Middle_Cell_Main_Box_shape_0x556245e5ea30"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidFrontSteelMatrix0xeda6820" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellSteel"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidFrontSteelMatrix0xeda6820in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidBackSteelMatrix0xeda68d0" copynumber="1001"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellSteel"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidBackSteelMatrix0xeda68d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidFrontPlastic0xeda6bf0" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPlastic"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidFrontPlastic0xeda6bf0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidBackPlastic0xeda6c80" copynumber="1003"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPlastic"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_MidBackPlastic0xeda6c80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells0xeda9160" copynumber="1004"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells0xeda9160in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_10xeda9290" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_10xeda9290in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_20xeda9340" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_20xeda9340in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_30xeda9420" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_30xeda9420in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_40xeda9500" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_40xeda9500in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_50xeda9670" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_50xeda9670in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_60xeda9700" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_60xeda9700in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_70xeda97e0" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_70xeda97e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_80xeda98c0" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_80xeda98c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_90xeda99a0" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_90xeda99a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_100xeda9a80" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_100xeda9a80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_110xeda9b60" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_110xeda9b60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_120xeda9c40" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_120xeda9c40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_130xeda95e0" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_130xeda95e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_140xeda9e80" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_140xeda9e80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_150xeda9f60" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_150xeda9f60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_160xedaa040" copynumber="16"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_160xedaa040in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_170xedaa120" copynumber="17"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_170xedaa120in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_180xedaa200" copynumber="18"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_180xedaa200in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_190xedaa2e0" copynumber="19"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_190xedaa2e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_200xedaa3c0" copynumber="20"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_200xedaa3c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_210xedaa4a0" copynumber="21"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_210xedaa4a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_220xedaa580" copynumber="22"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_220xedaa580in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_230xedaa660" copynumber="23"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_230xedaa660in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_240xedaa740" copynumber="24"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_240xedaa740in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_250xedaa820" copynumber="25"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_250xedaa820in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_260xedaa900" copynumber="26"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_260xedaa900in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_270xedaa9e0" copynumber="27"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_270xedaa9e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_280xedaaac0" copynumber="28"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_280xedaaac0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_290xeda9d20" copynumber="29"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_290xeda9d20in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_300xedaadb0" copynumber="30"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_300xedaadb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_310xedaae60" copynumber="31"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_310xedaae60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_320xedaaf40" copynumber="32"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_320xedaaf40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_330xedab020" copynumber="33"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_330xedab020in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_340xedab100" copynumber="34"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_340xedab100in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_350xedab1e0" copynumber="35"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_350xedab1e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_360xedab2c0" copynumber="36"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_360xedab2c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_370xedab3a0" copynumber="37"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_370xedab3a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_380xedab480" copynumber="38"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_380xedab480in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_390xedab560" copynumber="39"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_390xedab560in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_400xedab640" copynumber="40"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_400xedab640in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_410xedab720" copynumber="41"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_410xedab720in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_420xedab800" copynumber="42"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_420xedab800in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_430xedab8e0" copynumber="43"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_430xedab8e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_440xedab9c0" copynumber="44"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_440xedab9c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_450xedabaa0" copynumber="45"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_450xedabaa0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_460xedabb80" copynumber="46"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_460xedabb80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_470xedabc60" copynumber="47"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_470xedabc60in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_480xedabd40" copynumber="48"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_480xedabd40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_490xedabe20" copynumber="49"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_490xedabe20in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_500xedabf00" copynumber="50"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_500xedabf00in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_510xedabfe0" copynumber="51"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_510xedabfe0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_520xedac0c0" copynumber="52"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_520xedac0c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_530xedac1a0" copynumber="53"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_530xedac1a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_540xedac280" copynumber="54"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_540xedac280in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_550xedac360" copynumber="55"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_550xedac360in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_560xedac440" copynumber="56"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_560xedac440in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_570xedac520" copynumber="57"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_570xedac520in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_580xedac600" copynumber="58"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_580xedac600in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_590xedac6e0" copynumber="59"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_590xedac6e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_600xedac7c0" copynumber="60"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_600xedac7c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_610xeda4d00" copynumber="61"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_610xeda4d00in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_620xedaaba0" copynumber="62"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_620xedaaba0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_630xedaac80" copynumber="63"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_630xedaac80in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_640xedaccb0" copynumber="64"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_640xedaccb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_650xedacd40" copynumber="65"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell_Middle_Pb_Cells_650xedacd40in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCellpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Middle_Stack_Main_Box_shape_0x556245e5eb60"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix0xedaceb0" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix0xedaceb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix_10xedacfa0" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix_10xedacfa0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix_20xedad090" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix_20xedad090in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStackpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix_30xedad1b0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack_Middle_Cells_Matrix_30xedad1b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStackpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="Middle_Module_Box_shape_0x556245e5ec90"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleFrontCover0xeda55f0" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidFrontCover"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleFrontCover0xeda55f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_Middlepos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleBackCover0xeda58d0" copynumber="1001"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidBackCover"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleBackCover0xeda58d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_Middlepos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleReadOut0xeda5e40" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidReadOut"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleReadOut0xeda5e40in_dd_Geometry_DownstreamRegion_Ecal_Modules_Middlepos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleStack0xedacf40" copynumber="1003"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_MidStack"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle_MiddleModuleStack0xedacf40in_dd_Geometry_DownstreamRegion_Ecal_Modules_Middlepos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Middle_Block_shape_0x556245e5edc0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows0xedad400" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows0xedad400in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_10xedad4f0" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_10xedad4f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_20xedad5e0" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_20xedad5e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_30xedad700" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_30xedad700in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_40xedad7f0" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_40xedad7f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_50xedad930" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_50xedad930in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_60xedad9f0" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_60xedad9f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_70xedadae0" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_70xedadae0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_80xedadbd0" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_80xedadbd0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_90xedadd50" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_90xedadd50in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_100xedade40" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_100xedade40in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_110xedadf30" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_110xedadf30in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_120xedae020" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_120xedae020in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_130xedae110" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_130xedae110in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_140xedae200" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_140xedae200in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_150xedae2f0" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Middle"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock_Middle_Module_Rows_150xedae2f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlockpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Ecal_Middle_Section_Left_shape_0x556245e5f570"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Up_Rows_Left0xedae470" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Up_Rows_Left0xedae470in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Up_Rows_Left_10xedae560" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Up_Rows_Left_10xedae560in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows0xedae650" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows0xedae650in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_10xedae770" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_10xedae770in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_20xedae860" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_20xedae860in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_30xedae950" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_30xedae950in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_40xedaea10" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_40xedaea10in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_50xedaeb00" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_50xedaeb00in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_60xedaebf0" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_60xedaebf0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_70xedaed70" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_70xedaed70in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_80xedaee60" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_80xedaee60in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_90xedaef50" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Left_Rows_90xedaef50in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Down_Rows_Left0xedaf040" copynumber="1012"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Down_Rows_Left0xedaf040in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Down_Rows_Left_10xedaf130" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft_Middle_Down_Rows_Left_10xedaf130in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeftpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutFrontCover"> + <materialref ref="_dd_Materials_Ecal_EcalPlasticOutFC"/> + <solidref ref="Outer_Module_Front_Cover_Box_shape_0x556245e5f680"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutBackCover"> + <materialref ref="_dd_Materials_Ecal_EcalPlasticBC"/> + <solidref ref="Outer_Module_Back_Cover_Box_shape_0x556245e5f790"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutReadOutTube"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="Outer_Read_Out_Tube_shape_0x556245e5f920"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutReadOut"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Outer_Module_Read_Out_Box_shape_0x556245e5faa0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutReadOut_OuterReadOutTube0xedb1090" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutReadOutTube"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutReadOut_OuterReadOutTube0xedb1090in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutReadOutpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellSteel"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="Steel_Cell_Box_shape_0x556245e5fb70"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPlastic"> + <materialref ref="_dd_Materials_Ecal_EcalPlastic"/> + <solidref ref="Plastic_Cell_Box_shape_0x556245e5fc80"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"> + <materialref ref="_dd_Materials_Ecal_EcalPb"/> + <solidref ref="Pb_Cell_Box_shape_0x556245e5fdb0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber0xedb1f60" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber0xedb1f60in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_10xedb2010" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_10xedb2010in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_20xedb20f0" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_20xedb20f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_30xedb2200" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_30xedb2200in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_40xedb22e0" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_40xedb22e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_50xedb2410" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_50xedb2410in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_60xedb24c0" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_60xedb24c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_70xedb25a0" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_70xedb25a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_80xedb2680" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_80xedb2680in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_90xedb27f0" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_90xedb27f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_100xedb2880" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_100xedb2880in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_110xedb2960" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_110xedb2960in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_120xedb2a40" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_120xedb2a40in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_130xedb2b20" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_130xedb2b20in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_140xedb2c00" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_140xedb2c00in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_150xedb2ce0" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_150xedb2ce0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_160xedb2dc0" copynumber="16"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_160xedb2dc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_170xedb2760" copynumber="17"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_170xedb2760in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_180xedb3000" copynumber="18"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_180xedb3000in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_190xedb30e0" copynumber="19"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_190xedb30e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_200xedb31c0" copynumber="20"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_200xedb31c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_210xedb32a0" copynumber="21"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_210xedb32a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_220xedb3380" copynumber="22"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_220xedb3380in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_230xedb3460" copynumber="23"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_230xedb3460in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_240xedb3540" copynumber="24"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_240xedb3540in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_250xedb3620" copynumber="25"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_250xedb3620in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_260xedb3700" copynumber="26"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_260xedb3700in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_270xedb37e0" copynumber="27"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_270xedb37e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_280x8a6e670" copynumber="28"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_280x8a6e670in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_290x8a6e720" copynumber="29"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_290x8a6e720in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_300x8a6e800" copynumber="30"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_300x8a6e800in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_310x8a6e8e0" copynumber="31"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_310x8a6e8e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_320x8a6e9c0" copynumber="32"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_320x8a6e9c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_330xedb2ea0" copynumber="33"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_330xedb2ea0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_340x8a6ecb0" copynumber="34"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_340x8a6ecb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_350x8a6ed60" copynumber="35"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_350x8a6ed60in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_360x8a6ee40" copynumber="36"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_360x8a6ee40in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_370x8a6ef20" copynumber="37"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_370x8a6ef20in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_380x8a6f000" copynumber="38"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_380x8a6f000in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_390x8a6f0e0" copynumber="39"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_390x8a6f0e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_400x8a6f1c0" copynumber="40"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_400x8a6f1c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_410x8a6f2a0" copynumber="41"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_410x8a6f2a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_420x8a6f380" copynumber="42"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_420x8a6f380in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_430x8a6f460" copynumber="43"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_430x8a6f460in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_440x8a6f540" copynumber="44"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_440x8a6f540in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_450x8a6f620" copynumber="45"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_450x8a6f620in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_460x8a6f700" copynumber="46"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_460x8a6f700in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_470x8a6f7e0" copynumber="47"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_470x8a6f7e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_480x8a6f8c0" copynumber="48"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_480x8a6f8c0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_490x8a6f9a0" copynumber="49"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_490x8a6f9a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_500x8a6fa80" copynumber="50"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_500x8a6fa80in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_510x8a6fb60" copynumber="51"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_510x8a6fb60in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_520x8a6fc40" copynumber="52"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_520x8a6fc40in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_530x8a6fd20" copynumber="53"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_530x8a6fd20in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_540x8a6fe00" copynumber="54"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_540x8a6fe00in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_550x8a6fee0" copynumber="55"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_550x8a6fee0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_560x8a6ffc0" copynumber="56"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_560x8a6ffc0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_570x8a700a0" copynumber="57"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_570x8a700a0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_580x8a70180" copynumber="58"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_580x8a70180in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_590x8a70260" copynumber="59"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_590x8a70260in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_600x8a70340" copynumber="60"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_600x8a70340in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_610x8a70420" copynumber="61"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_610x8a70420in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_620x8a70500" copynumber="62"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_620x8a70500in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_630x8a705e0" copynumber="63"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_FiberPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb_OuterPbFiber_630x8a705e0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPbpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell"> + <materialref ref="_dd_Materials_Ecal_EcalSc"/> + <solidref ref="Outer_Cell_Main_Box_shape_0x556245e5fea0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutFrontSteelMatrix0xedb1780" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellSteel"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutFrontSteelMatrix0xedb1780in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutBackSteelMatrix0xedb1830" copynumber="1001"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellSteel"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutBackSteelMatrix0xedb1830in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutFrontPlastic0xedb1b50" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPlastic"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutFrontPlastic0xedb1b50in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutBackPlastic0xedb1be0" copynumber="1003"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPlastic"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_OutBackPlastic0xedb1be0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells0x8a70730" copynumber="1004"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells0x8a70730in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_10x8a70860" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_10x8a70860in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_20x8a70910" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_20x8a70910in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_30x8a709f0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_30x8a709f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_40x8a70ad0" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_40x8a70ad0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_50x8a70c40" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_50x8a70c40in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_60x8a70cd0" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_60x8a70cd0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_70x8a70db0" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_70x8a70db0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_80x8a70e90" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_80x8a70e90in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_90x8a70f70" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_90x8a70f70in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_100x8a71050" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_100x8a71050in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_110x8a71130" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_110x8a71130in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_120x8a71210" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_120x8a71210in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_130x8a70bb0" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_130x8a70bb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_140x8a71450" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_140x8a71450in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_150x8a71530" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_150x8a71530in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_160x8a71610" copynumber="16"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_160x8a71610in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_170x8a716f0" copynumber="17"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_170x8a716f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_180x8a717d0" copynumber="18"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_180x8a717d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_190x8a718b0" copynumber="19"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_190x8a718b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_200x8a71990" copynumber="20"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_200x8a71990in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_210x8a71a70" copynumber="21"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_210x8a71a70in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_220x8a71b50" copynumber="22"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_220x8a71b50in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_230x8a71c30" copynumber="23"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_230x8a71c30in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_240x8a71d10" copynumber="24"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_240x8a71d10in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_250x8a71df0" copynumber="25"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_250x8a71df0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_260x8a71ed0" copynumber="26"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_260x8a71ed0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_270x8a71fb0" copynumber="27"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_270x8a71fb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_280x8a72090" copynumber="28"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_280x8a72090in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_290x8a712f0" copynumber="29"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_290x8a712f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_300x8a72380" copynumber="30"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_300x8a72380in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_310x8a72430" copynumber="31"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_310x8a72430in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_320x8a72510" copynumber="32"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_320x8a72510in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_330x8a725f0" copynumber="33"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_330x8a725f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_340x8a726d0" copynumber="34"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_340x8a726d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_350x8a727b0" copynumber="35"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_350x8a727b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_360x8a72890" copynumber="36"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_360x8a72890in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_370x8a72970" copynumber="37"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_370x8a72970in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_380x8a72a50" copynumber="38"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_380x8a72a50in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_390x8a72b30" copynumber="39"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_390x8a72b30in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_400x8a72c10" copynumber="40"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_400x8a72c10in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_410x8a72cf0" copynumber="41"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_410x8a72cf0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_420x8a72dd0" copynumber="42"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_420x8a72dd0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_430x8a72eb0" copynumber="43"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_430x8a72eb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_440x8a72f90" copynumber="44"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_440x8a72f90in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_450x8a73070" copynumber="45"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_450x8a73070in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_460x8a73150" copynumber="46"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_460x8a73150in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_470x8a73230" copynumber="47"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_470x8a73230in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_480x8a73310" copynumber="48"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_480x8a73310in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_490x8a733f0" copynumber="49"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_490x8a733f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_500x8a734d0" copynumber="50"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_500x8a734d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_510x8a735b0" copynumber="51"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_510x8a735b0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_520x8a73690" copynumber="52"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_520x8a73690in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_530x8a73770" copynumber="53"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_530x8a73770in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_540x8a73850" copynumber="54"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_540x8a73850in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_550x8a73930" copynumber="55"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_550x8a73930in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_560x8a73a10" copynumber="56"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_560x8a73a10in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_570x8a73af0" copynumber="57"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_570x8a73af0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_580x8a73bd0" copynumber="58"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_580x8a73bd0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_590x8a73cb0" copynumber="59"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_590x8a73cb0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_600x8a73d90" copynumber="60"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_600x8a73d90in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_610xedb1ee0" copynumber="61"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_610xedb1ee0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_620x8a721f0" copynumber="62"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_620x8a721f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_630x8a722d0" copynumber="63"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_630x8a722d0in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_640x8a74280" copynumber="64"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_640x8a74280in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_650x8a74360" copynumber="65"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellPb"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell_Outer_Pb_Cells_650x8a74360in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCellpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutStack"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Outer_Stack_Main_Box_shape_0x556245e5ffd0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutStack_Outer_Cell0x8a74440" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutStack_Outer_Cell0x8a74440in_dd_Geometry_DownstreamRegion_Ecal_Modules_OutStackpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="Outer_Module_Box_shape_0x556245e60100"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleFrontCover0xedaff80" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutFrontCover"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleFrontCover0xedaff80in_dd_Geometry_DownstreamRegion_Ecal_Modules_Outerpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleBackCover0xedb0ad0" copynumber="1001"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutBackCover"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleBackCover0xedb0ad0in_dd_Geometry_DownstreamRegion_Ecal_Modules_Outerpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleReadOut0xedb10f0" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutReadOut"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleReadOut0xedb10f0in_dd_Geometry_DownstreamRegion_Ecal_Modules_Outerpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleStack0x8a74520" copynumber="1003"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_OutStack"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer_OuterModuleStack0x8a74520in_dd_Geometry_DownstreamRegion_Ecal_Modules_Outerpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Outer_Block_shape_0x556245e60230"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows0x8a746e0" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows0x8a746e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_10x8a747d0" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_10x8a747d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_20x8a748c0" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_20x8a748c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_30x8a749e0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_30x8a749e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_40x8a74ad0" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_40x8a74ad0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_50x8a74c10" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_50x8a74c10in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_60x8a74cd0" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_60x8a74cd0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_70x8a74dc0" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_70x8a74dc0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_80x8a74eb0" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_80x8a74eb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_90x8a75030" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_90x8a75030in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_100x8a75120" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_100x8a75120in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_110x8a75210" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_110x8a75210in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_120x8a75300" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_120x8a75300in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_130x8a753f0" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_130x8a753f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_140x8a754e0" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_140x8a754e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_150x8a755d0" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_150x8a755d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_160x8a756c0" copynumber="16"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_160x8a756c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_170x8a74fa0" copynumber="17"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_170x8a74fa0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_180x8a75920" copynumber="18"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_180x8a75920in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_190x8a75a10" copynumber="19"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_190x8a75a10in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_200x8a75b00" copynumber="20"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_200x8a75b00in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_210x8a75bf0" copynumber="21"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_210x8a75bf0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_220x8a75ce0" copynumber="22"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_220x8a75ce0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_230x8a75dd0" copynumber="23"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_230x8a75dd0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_240x8a75ec0" copynumber="24"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_240x8a75ec0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_250x8a75fb0" copynumber="25"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_250x8a75fb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_260x8a760a0" copynumber="26"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_260x8a760a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_270x8a76190" copynumber="27"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_270x8a76190in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_280x8a76280" copynumber="28"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_280x8a76280in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_290x8a76370" copynumber="29"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_290x8a76370in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_300x8a76460" copynumber="30"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_300x8a76460in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_310x8a76550" copynumber="31"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock_Outer_Module_Rows_310x8a76550in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlockpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Ecal_Outer_Section_Left_shape_0x556245e609b0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left0x8a766d0" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left0x8a766d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_10x8a767c0" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_10x8a767c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_20x8a768b0" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_20x8a768b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_30x8a769d0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_30x8a769d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_40x8a76ac0" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_40x8a76ac0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_50x8a76bb0" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_50x8a76bb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_60x8a76c70" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_60x8a76c70in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_70x8a76d60" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Up_Rows_Left_70x8a76d60in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows0x8a76e50" copynumber="1008"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows0x8a76e50in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_10x8a76fd0" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_10x8a76fd0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_20x8a770c0" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_20x8a770c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_30x8a771b0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_30x8a771b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_40x8a772a0" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_40x8a772a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_50x8a77390" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_50x8a77390in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_60x8a77480" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_60x8a77480in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_70x8a77570" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_70x8a77570in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_80x8a77660" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_80x8a77660in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_90x8a76640" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_90x8a76640in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_100x8a778c0" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_100x8a778c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_110x8a779b0" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_110x8a779b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_120x8a77aa0" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_120x8a77aa0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_130x8a77b90" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_130x8a77b90in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_140x8a77c80" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_140x8a77c80in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_150x8a77d70" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_150x8a77d70in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_160x8a77e60" copynumber="16"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_160x8a77e60in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_170x8a77f50" copynumber="17"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_170x8a77f50in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_180x8a78040" copynumber="18"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_180x8a78040in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_190x8a78130" copynumber="19"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_190x8a78130in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_200x8a78220" copynumber="20"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_200x8a78220in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_210x8a78310" copynumber="21"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_210x8a78310in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_220x8a78400" copynumber="22"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_220x8a78400in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_230x8a784f0" copynumber="23"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_230x8a784f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_240x8a785e0" copynumber="24"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_240x8a785e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_250x8a77750" copynumber="25"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Left_Rows_250x8a77750in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left0x8a788e0" copynumber="1034"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left0x8a788e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_10x8a789d0" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_10x8a789d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_20x8a78ac0" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_20x8a78ac0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_30x8a78bb0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_30x8a78bb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_40x8a78ca0" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_40x8a78ca0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_50x8a78d90" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_50x8a78d90in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_60x8a78e80" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_60x8a78e80in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_70x8a78f70" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft_Outer_Down_Rows_Left_70x8a78f70in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeftpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Ecal_Total_Left_shape_0x556245e614d0"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_FiberShieldLeft0x8a25340" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_ShieldLeft"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_FiberShieldLeft0x8a25340in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_InnSupportFrameLeft0x8a2a9d0" copynumber="1001"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportLeft"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_InnSupportFrameLeft0x8a2a9d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_EcalAInner0xed88e30" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionLeft"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_EcalAInner0xed88e30in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_EcalAMiddle0xedad3a0" copynumber="1003"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionLeft"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_EcalAMiddle0xedad3a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeftpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_EcalAOuter0x8a74680" copynumber="1004"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionLeft"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft_EcalAOuter0x8a74680in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeftpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_ShieldRight"> + <materialref ref="_dd_Materials_Ecal_EcalDrilledAluminium"/> + <solidref ref="ShieldSubRight_shape_0x556245e61c60"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole1Right"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="StSheetWithHole1R_shape_0x556245e62390"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole2Right"> + <materialref ref="_dd_Materials_Ecal_EcalSteel"/> + <solidref ref="StSheetWithHole2R_shape_0x556245e62b40"/> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight"> + <materialref ref="_dd_Materials_Ecal_EcalPb"/> + <solidref ref="PlugWithHoleR_shape_0x556245e63640"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HAirSlotsR0x8a7b680" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalAirSlot"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HAirSlotsR0x8a7b680in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HAirSlotsR_10x8a7b740" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalAirSlot"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HAirSlotsR_10x8a7b740in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_VAirSlotsR0x8a7b800" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_VerticalAirSlot"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_VAirSlotsR0x8a7b800in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets1R0x8a7b920" copynumber="1003"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalSteelSheet1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets1R0x8a7b920in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets1R_10x8a7ba10" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalSteelSheet1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets1R_10x8a7ba10in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_VSteelSheets1R0x8a7bb90" copynumber="1005"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_VericalSteelSheet1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_VSteelSheets1R0x8a7bb90in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets2R0x8a7bc50" copynumber="1006"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalSteelSheet2"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets2R0x8a7bc50in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets2R_10x8a7bd40" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_HorizontalSteelSheet2"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_HSteelSheets2R_10x8a7bd40in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_VSteelSheets2R0x8a7be30" copynumber="1008"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_VericalSteelSheet2"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_VSteelSheets2R0x8a7be30in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets1R0x8a7c320" copynumber="1009"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole1Right"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets1R0x8a7c320in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets1R_10x8a7c580" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole1Right"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets1R_10x8a7c580in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets2R0x8a7c9b0" copynumber="1011"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole2Right"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets2R0x8a7c9b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets2R_10x8a7cc10" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole2Right"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets2R_10x8a7cc10in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets2R_20x8a7ccd0" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_SteelSheetWithHole2Right"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight_SteelSheets2R_20x8a7ccd0in_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRightpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Ecal_Inner_Section_Right_shape_0x556245e63d80"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Up_Rows_Right0x8a7d2c0" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Up_Rows_Right0x8a7d2c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Up_Rows_Right_10x8a7d380" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Up_Rows_Right_10x8a7d380in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Right_Rows0x8a7d470" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Right_Rows0x8a7d470in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Right_Rows_10x8a7d590" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock2"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Right_Rows_10x8a7d590in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Down_Rows_Right0x8a7d680" copynumber="1004"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Down_Rows_Right0x8a7d680in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Down_Rows_Right_10x8a7d800" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnBlock1"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight_Inner_Down_Rows_Right_10x8a7d800in_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRightpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Ecal_Middle_Section_Right_shape_0x556245e64570"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Up_Rows_Right0x8a7de80" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Up_Rows_Right0x8a7de80in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Up_Rows_Right_10x8a7df40" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Up_Rows_Right_10x8a7df40in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows0x8a7e030" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows0x8a7e030in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_10x8a7e150" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_10x8a7e150in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_20x8a7e240" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_20x8a7e240in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_30x8a7e3c0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_30x8a7e3c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_40x8a7e480" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_40x8a7e480in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_50x8a7e570" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_50x8a7e570in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_60x8a7e660" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_60x8a7e660in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_70x8a7e7e0" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_70x8a7e7e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_80x8a7e8d0" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_80x8a7e8d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_90x8a7e9c0" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Right_Rows_90x8a7e9c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Down_Rows_Right0x8a7eab0" copynumber="1012"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Down_Rows_Right0x8a7eab0in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Down_Rows_Right_10x8a7de20" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight_Middle_Down_Rows_Right_10x8a7de20in_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRightpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Ecal_Outer_Section_Right_shape_0x556245e64d70"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right0x8a7f1d0" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right0x8a7f1d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_10x8a7f290" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_10x8a7f290in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_20x8a7f380" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_20x8a7f380in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_30x8a7f4a0" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_30x8a7f4a0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_40x8a7f590" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_40x8a7f590in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_50x8a7f710" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_50x8a7f710in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_60x8a7f7d0" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_60x8a7f7d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_70x8a7f8c0" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Up_Rows_Right_70x8a7f8c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows0x8a7f9b0" copynumber="1008"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows0x8a7f9b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_10x8a7fb30" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_10x8a7fb30in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_20x8a7fc20" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_20x8a7fc20in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_30x8a7fd10" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_30x8a7fd10in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_40x8a7fe00" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_40x8a7fe00in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_50x8a7fef0" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_50x8a7fef0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_60x8a7ffe0" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_60x8a7ffe0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_70x8a800d0" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_70x8a800d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_80x8a801c0" copynumber="8"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_80x8a801c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_90x8a7f680" copynumber="9"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_90x8a7f680in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_100x8a80420" copynumber="10"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_100x8a80420in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_110x8a80510" copynumber="11"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_110x8a80510in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_120x8a80600" copynumber="12"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_120x8a80600in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_130x8a806f0" copynumber="13"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_130x8a806f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_140x8a807e0" copynumber="14"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_140x8a807e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_150x8a808d0" copynumber="15"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_150x8a808d0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_160x8a809c0" copynumber="16"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_160x8a809c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_170x8a80ab0" copynumber="17"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_170x8a80ab0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_180x8a80ba0" copynumber="18"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_180x8a80ba0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_190x8a80c90" copynumber="19"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_190x8a80c90in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_200x8a80d80" copynumber="20"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_200x8a80d80in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_210x8a80e70" copynumber="21"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_210x8a80e70in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_220x8a80f60" copynumber="22"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_220x8a80f60in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_230x8a81050" copynumber="23"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_230x8a81050in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_240x8a81140" copynumber="24"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_240x8a81140in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_250x8a802b0" copynumber="25"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Right_Rows_250x8a802b0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right0x8a81440" copynumber="1034"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right0x8a81440in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_10x8a81530" copynumber="1"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_10x8a81530in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_20x8a81620" copynumber="2"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_20x8a81620in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_30x8a81710" copynumber="3"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_30x8a81710in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_40x8a81800" copynumber="4"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_40x8a81800in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_50x8a818f0" copynumber="5"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_50x8a818f0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_60x8a819e0" copynumber="6"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_60x8a819e0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_70x8a81ad0" copynumber="7"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutBlock"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight_Outer_Down_Rows_Right_70x8a81ad0in_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRightpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Ecal_Total_Right_shape_0x556245e65890"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_FiberShieldRight0x8a7a5c0" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_ShieldRight"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_FiberShieldRight0x8a7a5c0in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_InnSupportFrameRight0x8a7cdc0" copynumber="1001"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_PlugSupportRight"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_InnSupportFrameRight0x8a7cdc0in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_EcalCInner0x8a7d260" copynumber="1002"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_InnSectionRight"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_EcalCInner0x8a7d260in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_EcalCMiddle0x8a7ecb0" copynumber="1003"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_MidSectionRight"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_EcalCMiddle0x8a7ecb0in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRightpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_EcalCOuter0x8a7f170" copynumber="1004"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_OutSectionRight"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight_EcalCOuter0x8a7f170in_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRightpos"/> + </physvol> + </volume> + <volume name="_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecal"> + <materialref ref="_dd_Materials_Air"/> + <solidref ref="Ecal_Total_shape_0x556245e66280"/> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecal_EcalA0x8a76f70" copynumber="1000"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalLeft"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecal_EcalA0x8a76f70in_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecalpos"/> + </physvol> + <physvol name="_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecal_EcalC0x8a81c40" copynumber="1001"> + <volumeref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_EcalRight"/> + <positionref ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecal_EcalC0x8a81c40in_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecalpos"/> + </physvol> + </volume> + </structure> + <setup name="default" version="1.0"> + <world ref="_dd_Geometry_DownstreamRegion_Ecal_Installation_Ecal"/> + </setup> +</gdml> diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/python/EcalGeoModelConfig.py b/Calorimeter/CaloDetDescr/EcalGeoModel/python/EcalGeoModelConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..0959d09dfd45416123f09be51d473e1f3501def2 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/python/EcalGeoModelConfig.py @@ -0,0 +1,40 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.ComponentFactory import CompFactory +# from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline + +def EcalGeometryCfg( flags ): + from FaserGeoModel.GeoModelConfig import GeoModelCfg + acc = GeoModelCfg( flags ) + geoModelSvc = acc.getPrimary() + + GeometryDBSvc = CompFactory.GeometryDBSvc + acc.addService(GeometryDBSvc("CaloGeometryDBSvc")) + + EcalDetectorTool = CompFactory.EcalDetectorTool + ecalDetectorTool = EcalDetectorTool() + + ecalDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic + geoModelSvc.DetectorTools += [ ecalDetectorTool ] + + # if flags.GeoModel.Align.Dynamic: + # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection")) + # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT",className="CondAttrListCollection")) + # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer")) + # else: + # if (not flags.Detector.SimulatePreshower) or flags.Detector.OverlayPreshower: + # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer")) + # else: + # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align")) + + # if flags.Common.Project is not "AthSimulation": # Protection for AthSimulation builds + # if (not flags.Detector.SimulatePreshower) or flags.Detector.OverlayPreshower: + # from PreshowerConditionsAlgorithms.PreshowerConditionsAlgorithmsConf import PreshowerAlignCondAlg + # preshowerAlignCondAlg = PreshowerAlignCondAlg(name = "PreshowerAlignCondAlg", + # UseDynamicAlignFolders = flags.GeoModel.Align.Dynamic) + # acc.addCondAlgo(preshowerAlignCondAlg) + # from PreshowerConditionsAlgorithms.PreshowerConditionsAlgorithmsConf import PreshowerDetectorElementCondAlg + # preshowerDetectorElementCondAlg = PreshowerDetectorElementCondAlg(name = "PreshowerDetectorElementCondAlg") + # acc.addCondAlgo(preshowerDetectorElementCondAlg) + + return acc diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalComponentFactory.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalComponentFactory.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1c9821e473ae0c8da83145fe0bd74fb88689aafa --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalComponentFactory.cxx @@ -0,0 +1,40 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalComponentFactory.h" +#include "GaudiKernel/SystemOfUnits.h" + +#include <sstream> +#include <string> + +using CaloDD::EcalDetectorManager; + +const double EcalComponentFactory::s_epsilon = 1.0e-6 * Gaudi::Units::mm; + +EcalComponentFactory::EcalComponentFactory(const std::string & name, + CaloDD::EcalDetectorManager* detectorManager, + const EcalGeometryManager* geometryManager, + EcalMaterialManager* materials) + : m_detectorManager(detectorManager), + m_geometryManager(geometryManager), + m_materials(materials), + m_name(name) +{} + +EcalComponentFactory::~EcalComponentFactory() +{} + +std::string +EcalComponentFactory::intToString(int i) const +{ + std::ostringstream str; + str << i; + return str.str(); +} + +double +EcalComponentFactory::epsilon() const +{ + return s_epsilon; +} diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalComponentFactory.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalComponentFactory.h new file mode 100644 index 0000000000000000000000000000000000000000..e20e41f21ab1949ad2a26d9f02c19c1b72ae141b --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalComponentFactory.h @@ -0,0 +1,89 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ECALGEOMODEL_ECALCOMPONENTFACTORY_H +#define ECALGEOMODEL_ECALCOMPONENTFACTORY_H + +#include "EcalIdentifier.h" +#include <string> + +namespace CaloDD{class EcalDetectorManager;} +class EcalGeometryManager; +class EcalMaterialManager; + +class GeoLogVol; +class GeoVPhysVol; + + +class EcalComponentFactory +{ + +public: + EcalComponentFactory(const std::string & name, + CaloDD::EcalDetectorManager* detectorManager, + const EcalGeometryManager* geometryManager, + EcalMaterialManager* materials); + + const std::string & getName() const {return m_name;} + + // utility function to covert int to string + std::string intToString(int i) const; + +protected: + CaloDD::EcalDetectorManager* m_detectorManager; + const EcalGeometryManager* m_geometryManager; + EcalMaterialManager* m_materials; + + double epsilon() const; + virtual ~EcalComponentFactory(); + +private: + std::string m_name; + static const double s_epsilon; + +}; + + +class EcalSharedComponentFactory : public EcalComponentFactory +{ + +public: + EcalSharedComponentFactory(const std::string & name, + CaloDD::EcalDetectorManager* detectorManager, + const EcalGeometryManager* geometryManager, + EcalMaterialManager* materials=nullptr) : + EcalComponentFactory(name, detectorManager, geometryManager, materials), + m_physVolume(nullptr) + {}; + + GeoVPhysVol * getVolume() {return m_physVolume;} + +protected: + GeoVPhysVol * m_physVolume; + virtual GeoVPhysVol * build() = 0; + +}; + +class EcalUniqueComponentFactory : public EcalComponentFactory +{ + +public: + EcalUniqueComponentFactory(const std::string & name, + CaloDD::EcalDetectorManager* detectorManager, + const EcalGeometryManager* geometryManager, + EcalMaterialManager* materials=nullptr) : + EcalComponentFactory(name, detectorManager, geometryManager, materials), + m_logVolume{nullptr} + {}; + + virtual GeoVPhysVol * build(EcalIdentifier id) = 0; + +protected: + const GeoLogVol * m_logVolume; + + virtual const GeoLogVol * preBuild() = 0; + +}; + +#endif // ECALGEOMODEL_ECALCOMPONENTFACTORY_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDataBase.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDataBase.cxx new file mode 100644 index 0000000000000000000000000000000000000000..f70014bc5c4eec38548d4abc69ec83612cdee829 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDataBase.cxx @@ -0,0 +1,104 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalDataBase.h" + +#include "RDBAccessSvc/IRDBAccessSvc.h" +#include "RDBAccessSvc/IRDBRecordset.h" +#include "RDBAccessSvc/IRDBRecord.h" + +#include "GeoModelInterfaces/IGeoDbTagSvc.h" +#include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" + +#include "EcalGeoModel/EcalGeoModelAthenaComps.h" + +#include <iostream> + +EcalDataBase::EcalDataBase(const EcalGeoModelAthenaComps * athenaComps) +{ + m_athenaComps = athenaComps; + + IGeoDbTagSvc * geoDbTag = m_athenaComps->geoDbTagSvc(); + + // Get version tag and node for Ecal + DecodeFaserVersionKey versionKey(geoDbTag,"Ecal"); + std::string versionTag = versionKey.tag(); + std::string versionNode = versionKey.node(); + + // Get version tag and node for Calorimeter. + DecodeFaserVersionKey caloVersionKey(geoDbTag,"Calorimeter"); + + // Access the RDB + IRDBAccessSvc* rdbSvc = m_athenaComps->rdbAccessSvc(); + + // Ecal version tag + m_ecalVersionTag = rdbSvc->getChildTag("Ecal", versionKey.tag(), versionKey.node(), "FASERDD"); + + +///////////////////////////////////////////////////////// +// +// Gets the structures +// +///////////////////////////////////////////////////////// + + msg(MSG::INFO) << "Retrieving Record Sets from database ..." << endmsg; + msg(MSG::DEBUG) << " Using version tag: " << versionTag << endmsg; + msg(MSG::DEBUG) << " at node: " << versionNode << endmsg; + msg(MSG::DEBUG) << " Ecal Version: " << m_ecalVersionTag << endmsg; + + // ATLS - not sure I use it. + // General atlas parameters + + // + // Ecal General + // + + // Ecal TopLevel + m_topLevel = rdbSvc->getRecordsetPtr("EcalTopLevel", versionTag, versionNode, "FASERDD"); + msg(MSG::DEBUG) << "Table EcalTopLevel Fetched" << endmsg; + + // Weight Table + m_weightTable = rdbSvc->getRecordsetPtr("EcalWeights", versionTag, versionNode, "FASERDD"); + msg(MSG::DEBUG) << "Table EcalWeights Fetched" << endmsg; + + // Extra Scaling Table. This is used for extra material studies. For nominal material the table should be empty. + // NB this is at InnerDetector level node. + m_scalingTable = rdbSvc->getRecordsetPtr("EcalMatScaling", caloVersionKey.tag(), caloVersionKey.node(), "FASERDD"); + msg(MSG::DEBUG) << "Table EcalMatScaling Fetched" << endmsg; + +// // Default conditions +// m_conditions = rdbSvc->getRecordsetPtr("EcalConditions", versionTag, versionNode, "FASERDD"); +// msg(MSG::DEBUG) << "Table EcalConditions Fetched" << endmsg; + + m_rowGeneral = rdbSvc->getRecordsetPtr("EcalRowGeneral", versionTag, versionNode, "FASERDD"); + msg(MSG::DEBUG) << "Table EcalRowGeneral Fetched" << endmsg; + + // m_plateGeneral = rdbSvc->getRecordsetPtr("EcalPlateGeneral", versionTag, versionNode, "FASERDD"); + // msg(MSG::DEBUG) << "Table EcalPlateGeneral Fetched" << endmsg; + +} + +const EcalGeoModelAthenaComps* EcalDataBase::athenaComps() const { return m_athenaComps; } + +IRDBRecordset_ptr EcalDataBase::weightTable() const {return m_weightTable;} + +IRDBRecordset_ptr EcalDataBase::scalingTable() const {return m_scalingTable;} + +// //const IRDBRecord* EcalDataBase::atls() const {return *m_atls)[0];} +IRDBRecordset_ptr EcalDataBase::topLevelTable() const {return m_topLevel;} + +// IRDBRecordset_ptr EcalDataBase::conditionsTable() const {return m_conditions;} +// const IRDBRecord* EcalDataBase::conditions() const {return (*m_conditions)[0];} + +const IRDBRecord* EcalDataBase::rowGeneral() const {return (*m_rowGeneral)[0];} +// const IRDBRecord* EcalDataBase::plateGeneral() const {return (*m_plateGeneral)[0];} + +const std::string & EcalDataBase::versionTag() const { + return m_ecalVersionTag; +} + +MsgStream& EcalDataBase::msg (MSG::Level lvl) const +{ + return m_athenaComps->msg(lvl); +} diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDataBase.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDataBase.h new file mode 100644 index 0000000000000000000000000000000000000000..8087291ea1bad4000e6affd860478a1fe7ef456e --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDataBase.h @@ -0,0 +1,59 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef EcalGeoModel_EcalDataBase_H +#define EcalGeoModel_EcalDataBase_H + +#include "EcalGeoModel/EcalGeoModelAthenaComps.h" +#include <string> + +#include "RDBAccessSvc/IRDBAccessSvc.h" +class IRDBRecord; + + +class EcalDataBase +{ + + +public: + + EcalDataBase(const EcalGeoModelAthenaComps* athenaComps); + + const EcalGeoModelAthenaComps* athenaComps() const; + + IRDBRecordset_ptr weightTable() const; + IRDBRecordset_ptr scalingTable() const; + IRDBRecordset_ptr topLevelTable() const; + + const IRDBRecord* rowGeneral() const; + // const IRDBRecord* plateGeneral() const; + + // Return the Ecal version tag. + const std::string & versionTag() const; + + MsgStream& msg (MSG::Level lvl) const; + +private: + + EcalDataBase(const EcalDataBase &); + EcalDataBase& operator= (const EcalDataBase &); + +private: + + const EcalGeoModelAthenaComps* m_athenaComps; + + std::string m_ecalVersionTag; + + IRDBRecordset_ptr m_weightTable; + IRDBRecordset_ptr m_scalingTable; + IRDBRecordset_ptr m_topLevel; + IRDBRecordset_ptr m_conditions; + + IRDBRecordset_ptr m_rowGeneral; + // IRDBRecordset_ptr m_plateGeneral; + + +}; + +#endif //EcalGeoModel_EcalDataBase_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDetectorFactory.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDetectorFactory.cxx new file mode 100644 index 0000000000000000000000000000000000000000..b0521f2244bd55d05ccd67ac3a9fcb6eb9028439 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDetectorFactory.cxx @@ -0,0 +1,264 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// +// EcalDetectorFactory: This is the top level node +// + + +#include "EcalDetectorFactory.h" + +#include "EcalDataBase.h" +#include "EcalIdentifier.h" +#include "EcalGeometryManager.h" +#include "EcalMaterialManager.h" +#include "EcalGeneralParameters.h" +#include "CaloReadoutGeometry/Version.h" +#include "CaloReadoutGeometry/CaloCommonItems.h" +#include "CaloReadoutGeometry/CaloDD_Defs.h" +#include "CaloReadoutGeometry/CaloDetectorDesign.h" + +#include "EcalRow.h" +#include "EcalModule.h" +#include "EcalDataBase.h" +#include "EcalGeoModel/EcalGeoModelAthenaComps.h" + +// +// GeoModel include files: +// +#include "GeoModelKernel/GeoMaterial.h" +#include "GeoModelKernel/GeoTube.h" +#include "GeoModelKernel/GeoLogVol.h" +#include "GeoModelKernel/GeoNameTag.h" +#include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoPhysVol.h" +#include "GeoModelKernel/GeoVPhysVol.h" +#include "GeoModelKernel/GeoTransform.h" +#include "GeoModelKernel/GeoAlignableTransform.h" +#include "GeoModelKernel/GeoShape.h" +#include "GeoModelKernel/GeoShapeUnion.h" +#include "GeoModelKernel/GeoShapeShift.h" +#include "GeoModelInterfaces/StoredMaterialManager.h" +#include "GeoModelInterfaces/IGeoDbTagSvc.h" +#include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" +#include "RDBAccessSvc/IRDBAccessSvc.h" +#include "RDBAccessSvc/IRDBRecordset.h" +#include "RDBAccessSvc/IRDBRecord.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" +#include "DetDescrConditions/AlignableTransformContainer.h" +# +#include "StoreGate/StoreGateSvc.h" +#include "GaudiKernel/ISvcLocator.h" + +#include "GeoModelKernel/GeoDefinitions.h" +#include "GaudiKernel/SystemOfUnits.h" + + + +#include <iostream> +#include <iomanip> +#include <string> + +using CaloDD::EcalDetectorManager; +using CaloDD::CaloCommonItems; + +EcalDetectorFactory::EcalDetectorFactory(const EcalGeoModelAthenaComps * athenaComps, + const EcalOptions & options) + : CaloDD::DetectorFactoryBase(athenaComps), + m_materials {nullptr}, + m_useDynamicAlignFolders(false), + m_gdmlFile(options.gdmlFile()) +{ + + // Create the detector manager + m_detectorManager = new EcalDetectorManager(detStore()); + msg(MSG::DEBUG) << "Created EcalDetectorManager" << endmsg; + + // Create the database + m_db = new EcalDataBase{athenaComps}; + msg(MSG::DEBUG) << "Created EcalDataBase" << endmsg; + + // Create the material manager + m_materials = new EcalMaterialManager{m_db}; + msg(MSG::DEBUG) << "Created EcalMaterialManager" << endmsg; + + // Create the geometry manager. + m_geometryManager = new EcalGeometryManager{m_db}; + msg(MSG::DEBUG) << "Created EcalGeometryManager" << endmsg; + m_geometryManager->setOptions(options); + msg(MSG::DEBUG) << "Set options on EcalGeometryManager" << endmsg; + + m_useDynamicAlignFolders = options.dynamicAlignFolders(); + + // Set Version information + // Get the geometry tag + DecodeFaserVersionKey versionKey(geoDbTagSvc(),"Ecal"); + IRDBRecordset_ptr switchSet + = rdbAccessSvc()->getRecordsetPtr("EcalSwitches", versionKey.tag(), versionKey.node(),"FASERDD"); + const IRDBRecord *switches = (*switchSet)[0]; + msg(MSG::DEBUG) << "Retrieved EcalSwitches" << endmsg; + + std::string layout = "Final"; + std::string description; + if (!switches->isFieldNull("LAYOUT")) { + layout = switches->getString("LAYOUT"); + } + if (!switches->isFieldNull("DESCRIPTION")) { + description = switches->getString("DESCRIPTION"); + } + + std::string versionTag = rdbAccessSvc()->getChildTag("Ecal", versionKey.tag(), versionKey.node(),"FASERDD"); + std::string versionName = switches->getString("VERSIONNAME"); + int versionMajorNumber = 1; + int versionMinorNumber = 0; + int versionPatchNumber = 0; + CaloDD::Version version(versionTag, + versionName, + layout, + description, + versionMajorNumber, + versionMinorNumber, + versionPatchNumber); + m_detectorManager->setVersion(version); +} + + +EcalDetectorFactory::~EcalDetectorFactory() +{ + // NB the detector manager (m_detectorManager)is stored in the detector store by the + // Tool and so we don't delete it. + delete m_db; + delete m_materials; + delete m_geometryManager; +} + +void EcalDetectorFactory::create(GeoPhysVol *world) +{ + + msg(MSG::INFO) << "Building Ecal Detector." << endmsg; + msg(MSG::INFO) << " " << m_detectorManager->getVersion().fullDescription() << endmsg; + msg(MSG::INFO) << " GDML file: " << m_gdmlFile << endmsg; + + // Change precision. + int oldPrecision = std::cout.precision(6); + + // The tree tops get added to world. We name it "calo" though. + GeoPhysVol *calo = world; + + const EcalGeneralParameters * ecalGeneral = m_geometryManager->generalParameters(); + + GeoTrf::Transform3D ecalTransform = ecalGeneral->partTransform("Ecal"); + msg(MSG::DEBUG) << "Ecal detector translation: ( " << ecalTransform.translation().x() << " , " << ecalTransform.translation().y() << " , " << ecalTransform.translation().z() << " )" << endmsg; + + std::string rowA_Label = "BottomRow"; + std::string rowB_Label = "TopRow"; + + bool rowA_Present = ecalGeneral->partPresent(rowA_Label); + bool rowB_Present = ecalGeneral->partPresent(rowB_Label); + + // + // Module is the same for all rows + // + EcalModule module("Module", m_detectorManager, m_geometryManager, m_materials); + msg(MSG::DEBUG) << "Created Ecal module with dimensions (" << module.width() << "," << module.height() << "," << module.length() << ")" << endmsg; + // + // Row A + // + if (rowA_Present) + { + msg(MSG::DEBUG) << "Building the Ecal Bottom Row." << endmsg; + m_detectorManager->numerology().addRow(0); + + // Create the row + EcalRow rowA("EcalBottomRow", &module, m_detectorManager, m_geometryManager, m_materials); + EcalIdentifier id{m_geometryManager->athenaComps()->getIdHelper()}; + id.setRow(0); + GeoVPhysVol* rowA_PV = rowA.build(id); + GeoAlignableTransform* rowA_Transform = new GeoAlignableTransform(ecalTransform * ecalGeneral->partTransform(rowA_Label)); + msg(MSG::DEBUG) << "Ecal " << rowA_Label << " translation: ( " << rowA_Transform->getTransform().translation().x() << " , " << rowA_Transform->getTransform().translation().y() << " , " << rowA_Transform->getTransform().translation().z() << " )" << endmsg; + + GeoNameTag* topLevelNameTag = new GeoNameTag("Ecal"); + calo->add(topLevelNameTag); + calo->add(new GeoIdentifierTag(0)); + calo->add(rowA_Transform); + calo->add(rowA_PV); + m_detectorManager->addTreeTop(rowA_PV); + + // Store alignable transform for row (level = 1) + m_detectorManager->addAlignableTransform(1, id.getModuleId(), rowA_Transform, rowA_PV); + } + + // + // Row B + // + if (rowB_Present) + { + msg(MSG::DEBUG) << "Building the Ecal Top Row." << endmsg; + m_detectorManager->numerology().addRow(1); + + // Create the row + EcalRow rowB("EcalTopRow", &module, m_detectorManager, m_geometryManager, m_materials); + EcalIdentifier id{m_geometryManager->athenaComps()->getIdHelper()}; + id.setRow(1); + GeoVPhysVol* rowB_PV = rowB.build(id); + GeoAlignableTransform* rowB_Transform = new GeoAlignableTransform(ecalTransform * ecalGeneral->partTransform(rowB_Label)); + msg(MSG::DEBUG) << "Ecal " << rowB_Label << " translation: ( " << rowB_Transform->getTransform().translation().x() << " , " << rowB_Transform->getTransform().translation().y() << " , " << rowB_Transform->getTransform().translation().z() << " )" << endmsg; + + GeoNameTag* topLevelNameTag = new GeoNameTag("Ecal"); + calo->add(topLevelNameTag); + calo->add(new GeoIdentifierTag(1)); + calo->add(rowB_Transform); + calo->add(rowB_PV); + m_detectorManager->addTreeTop(rowB_PV); + + // Store alignable transform for row (level = 1) + m_detectorManager->addAlignableTransform(1, id.getModuleId(), rowB_Transform, rowB_PV); + } + + // Set the neighbours + m_detectorManager->initNeighbours(); + + // Set number of pmts in numerology. + const CaloDD::CaloDetectorDesign* design = m_detectorManager->getEcalDesign(); + if (design != nullptr) + { + m_detectorManager->numerology().setNumPmtsPerModule(m_detectorManager->getEcalDesign()->cells()); + } + else + { + m_detectorManager->numerology().setNumPmtsPerModule(0); + } + + + // Register the keys and the level corresponding to the key + // and whether it expects a global or local shift. + // level 0: sensor, level 1: module, level 2, layer/disc, level 3: whole barrel/enccap + + + if (!m_useDynamicAlignFolders){ + + m_detectorManager->addAlignFolderType(CaloDD::static_run1); + // m_detectorManager->addFolder("/Calo/Align"); + } + else { + m_detectorManager->addAlignFolderType(CaloDD::timedependent_run2); + // m_detectorManager->addGlobalFolder("/Calo/AlignL1/Calo"); + // m_detectorManager->addGlobalFolder("/Calo/AlignL2/Ecal"); + // m_detectorManager->addChannel("/Calo/AlignL1/Calo",3,CaloDD::global); + // m_detectorManager->addChannel("/Calo/AlignL2/Ecal",2,CaloDD::global); + // m_detectorManager->addFolder("/Calo/AlignL3"); + } + + // Return precision to its original value + std::cout.precision(oldPrecision); + +} + + +const EcalDetectorManager * EcalDetectorFactory::getDetectorManager() const +{ + return m_detectorManager; +} + + diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDetectorFactory.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDetectorFactory.h new file mode 100644 index 0000000000000000000000000000000000000000..6dc1892f21043af30a77beb06033d2cac94ae736 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDetectorFactory.h @@ -0,0 +1,50 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PRESHOWERGEOMODEL_PRESHOWERDETECTORFACTORY_H +#define PRESHOWERGEOMODEL_PRESHOWERDETECTORFACTORY_H + +#include "CaloGeoModelUtils/DetectorFactoryBase.h" +#include "CaloReadoutGeometry/EcalDetectorManager.h" +#include "CaloReadoutGeometry/CaloDD_Defs.h" + +class GeoPhysVol; +class EcalDataBase; +class EcalGeometryManager; +class EcalGeoModelAthenaComps; +class EcalMaterialManager; +class EcalOptions; + +class EcalDetectorFactory : public CaloDD::DetectorFactoryBase +{ + + public: + // Constructor + EcalDetectorFactory(const EcalGeoModelAthenaComps * athenaComps, + const EcalOptions & options); + + // Destructor + virtual ~EcalDetectorFactory(); + + // Creation of geometry: + virtual void create(GeoPhysVol *world); + + // Access to the results: + virtual const CaloDD::EcalDetectorManager * getDetectorManager() const; + + private: + // Copy and assignments operations illegal and so are made private + EcalDetectorFactory(const EcalDetectorFactory &right); + const EcalDetectorFactory & operator=(const EcalDetectorFactory &right); + + CaloDD::EcalDetectorManager *m_detectorManager; + EcalGeometryManager *m_geometryManager; + EcalDataBase* m_db; + EcalMaterialManager* m_materials; + bool m_useDynamicAlignFolders; + std::string m_gdmlFile; +}; + +#endif + diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDetectorTool.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDetectorTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..bd4b729877d78083bbad2fa08091686d0c10f884 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalDetectorTool.cxx @@ -0,0 +1,257 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalGeoModel/EcalDetectorTool.h" + +#include "EcalDetectorFactory.h" +#include "EcalDataBase.h" +#include "EcalOptions.h" + +// temporary +#include "CaloReadoutGeometry/EcalDetectorManager.h" +#include "FaserCaloIdentifier/EcalID.h" +#include "DetDescrConditions/AlignableTransformContainer.h" + +#include "GeoModelFaserUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" +#include "StoreGate/DataHandle.h" +#include "RDBAccessSvc/IRDBRecord.h" +#include "RDBAccessSvc/IRDBRecordset.h" + +#include "AthenaKernel/ClassID_traits.h" +#include "SGTools/DataProxy.h" + +using CaloDD::EcalDetectorManager; +using CaloDD::CaloDetectorManager; + +// +// Constructor +// +EcalDetectorTool::EcalDetectorTool(const std::string& type, + const std::string& name, + const IInterface* parent) + : GeoModelTool(type, name, parent), + m_cosmic{false}, + m_manager{nullptr}, + m_athenaComps{ }, + m_geoDbTagSvc{"GeoDbTagSvc", name}, + m_rdbAccessSvc{"RDBAccessSvc", name}, + m_geometryDBSvc{"CaloGeometryDBSvc", name} +{ + // Get parameter values from jobOptions file + declareProperty("GeoDbTagSvc", m_geoDbTagSvc); + declareProperty("RDBAccessSvc", m_rdbAccessSvc); + declareProperty("GeometryDBSvc", m_geometryDBSvc); +} + +// +// Create the Geometry via the factory corresponding to this tool +// + +StatusCode +EcalDetectorTool::create() +{ + // Get the detector configuration. + ATH_CHECK(m_geoDbTagSvc.retrieve()); + + DecodeFaserVersionKey versionKey{&*m_geoDbTagSvc, "Ecal"}; + // Issue error if AUTO. + if (versionKey.tag() == "AUTO") { + ATH_MSG_ERROR("AUTO Faser version. Please select a version."); + } + ATH_MSG_INFO("Building Ecal with Version Tag: " << versionKey.tag() << " at Node: " << versionKey.node()); + + ATH_CHECK(m_rdbAccessSvc.retrieve()); + // Print the Ecal version tag: + std::string ecalVersionTag{m_rdbAccessSvc->getChildTag("Ecal", versionKey.tag(), versionKey.node(), "FASERDD")}; + ATH_MSG_INFO("Ecal Version: " << ecalVersionTag << " Package Version: " << PACKAGE_VERSION); + // Check if version is empty. If so, then the Ecal cannot be built. This may or may not be intentional. We + // just issue an INFO message. + if (ecalVersionTag.empty()) { + ATH_MSG_INFO("No Ecal Version. Ecal will not be built."); + } else { + std::string versionName; + if (versionKey.custom()) { + ATH_MSG_WARNING("EcalDetectorTool: Detector Information coming from a custom configuration!!"); + } else { + ATH_MSG_DEBUG("EcalDetectorTool: Detector Information coming from the database and job options IGNORED."); + ATH_MSG_DEBUG("Keys for Ecal Switches are " << versionKey.tag() << " " << versionKey.node()); + + IRDBRecordset_ptr switchSet{m_rdbAccessSvc->getRecordsetPtr("EcalSwitches", versionKey.tag(), versionKey.node(), "FASERDD")}; + if (!switchSet || switchSet->size() == 0) + { + ATH_MSG_WARNING("Unable to retrieve switches; Ecal cannot be created"); + return StatusCode::FAILURE; + } + const IRDBRecord* switches{(*switchSet)[0]}; + m_detectorName.setValue(switches->getString("DETECTORNAME")); + + if (not switches->isFieldNull("COSMICLAYOUT")) + { + m_cosmic = switches->getInt("COSMICLAYOUT"); + } + if (not switches->isFieldNull("VERSIONNAME")) + { + versionName = switches->getString("VERSIONNAME"); + } + if (not switches->isFieldNull("GDMLFILE") && m_gdmlFile.empty()) + { + m_gdmlFile = switches->getString("GDMLFILE"); + } + } + + ATH_MSG_DEBUG("Creating the Ecal"); + ATH_MSG_DEBUG("Ecal Geometry Options: "); + ATH_MSG_DEBUG(" GdmlFile: " << m_gdmlFile.value()); + ATH_MSG_DEBUG(" Alignable: " << (m_alignable.value() ? "true" : "false")); + ATH_MSG_DEBUG(" CosmicLayout: " << (m_cosmic ? "true" : "false")); + ATH_MSG_DEBUG(" VersionName: " << versionName); + + EcalOptions options; + options.setAlignable(m_alignable.value()); + options.setDynamicAlignFolders(m_useDynamicAlignFolders.value()); + options.setGdmlFile(m_gdmlFile.value()); + m_manager = nullptr; + // + // Locate the top level experiment node + // + GeoModelExperiment* theExpt{nullptr}; + ATH_CHECK(detStore()->retrieve(theExpt, "FASER")); + + // Retrieve the Geometry DB Interface + ATH_CHECK(m_geometryDBSvc.retrieve()); + + // Pass athena services to factory, etc + m_athenaComps.setDetStore(detStore().operator->()); + m_athenaComps.setGeoDbTagSvc(&*m_geoDbTagSvc); + m_athenaComps.setGeometryDBSvc(&*m_geometryDBSvc); + m_athenaComps.setRDBAccessSvc(&*m_rdbAccessSvc); + const EcalID* idHelper{nullptr}; + ATH_CHECK(detStore()->retrieve(idHelper, "EcalID")); + m_athenaComps.setIdHelper(idHelper); + idHelper->test_module_packing(); + // + // This strange way of casting is to avoid an + // utterly brain damaged compiler warning. + // + GeoPhysVol* world{&*theExpt->getPhysVol()}; + if (world != nullptr) ATH_MSG_INFO("Retrieved World PhysVol"); + + EcalDetectorFactory theEcal{&m_athenaComps, options}; + ATH_MSG_INFO("Created instance of detector factory"); + theEcal.create(world); + ATH_MSG_INFO("Called create methon on factory"); + m_manager = theEcal.getDetectorManager(); + ATH_MSG_INFO("Attempted to retrieve detector manager"); + + if (m_manager==nullptr) { + ATH_MSG_FATAL("EcalDetectorManager not created"); + return StatusCode::FAILURE; + } + + // Get the manager from the factory and store it in the detector store. + // m_detector is non constant so I can not set it to a const pointer. + // m_detector = theSCT.getDetectorManager(); + + ATH_MSG_DEBUG("Registering EcalDetectorManager. "); + ATH_CHECK(detStore()->record(m_manager, m_manager->getName())); + theExpt->addManager(m_manager); + + // Create a symLink to the CaloDetectorManager base class + const CaloDetectorManager* caloDetManager{m_manager}; + ATH_CHECK(detStore()->symLink(m_manager, caloDetManager)); + } + + return StatusCode::SUCCESS; +} + +StatusCode +EcalDetectorTool::clear() +{ + ATH_MSG_WARNING("Called untested EcalDetectorTool::clear()"); + SG::DataProxy* proxy{detStore()->proxy(ClassID_traits<EcalDetectorManager>::ID(), m_manager->getName())}; + if (proxy) { + proxy->reset(); + m_manager = nullptr; + } + return StatusCode::SUCCESS; +} + +StatusCode +EcalDetectorTool::registerCallback ATLAS_NOT_THREAD_SAFE () +{ + StatusCode sc{StatusCode::FAILURE, true}; + if (m_alignable.value()) { + if (m_useDynamicAlignFolders.value()) { + ATH_MSG_WARNING("Called unsupported EcalDetectorTool::registerCallback() with useDynamicAlignFolders = true"); + return sc; + + // if (detStore()->contains<CondAttrListCollection>(m_run2L1Folder.value())) { + // ATH_MSG_DEBUG("Registering callback on global Container with folder " << m_run2L1Folder.value()); + // const DataHandle<CondAttrListCollection> calc; + // ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, m_run2L1Folder.value())); + // sc = StatusCode::SUCCESS; + // } else { + // ATH_MSG_WARNING("Unable to register callback on global Container with folder " << m_run2L1Folder.value()); + // return StatusCode::FAILURE; + // } + + // if (detStore()->contains<CondAttrListCollection>(m_run2L2Folder.value())) { + // ATH_MSG_DEBUG("Registering callback on global Container with folder " << m_run2L2Folder.value()); + // const DataHandle<CondAttrListCollection> calc; + // ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, m_run2L2Folder.value())); + // sc = StatusCode::SUCCESS; + // } else { + // ATH_MSG_WARNING("Unable to register callback on global Container with folder " << m_run2L2Folder.value()); + // return StatusCode::FAILURE; + // } + + // if (detStore()->contains<AlignableTransformContainer>(m_run2L3Folder.value())) { + // ATH_MSG_DEBUG("Registering callback on AlignableTransformContainer with folder " << m_run2L3Folder.value()); + // const DataHandle<AlignableTransformContainer> atc; + // ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), atc, m_run2L3Folder.value())); + // sc = StatusCode::SUCCESS; + // } else { + // ATH_MSG_WARNING("Unable to register callback on AlignableTransformContainer with folder " << m_run2L3Folder.value()); + // return StatusCode::FAILURE; + // } + } else { + if (detStore()->contains<AlignableTransformContainer>(m_run1Folder.value())) { + ATH_MSG_DEBUG("Registering callback on AlignableTransformContainer with folder " << m_run1Folder.value()); + const DataHandle<AlignableTransformContainer> atc; + ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), atc, m_run1Folder.value())); + sc = StatusCode::SUCCESS; + } else { + ATH_MSG_WARNING("Unable to register callback on AlignableTransformContainer with folder " + << m_run1Folder.value() << ", Alignment disabled (only if no Run2 scheme is loaded)!"); + return sc; + } + } + } else { + ATH_MSG_INFO("Alignment disabled. No callback registered"); + // We return failure otherwise it will try and register + // a GeoModelSvc callback associated with this callback. + return sc; + } + return sc; +} + +StatusCode +EcalDetectorTool::align(IOVSVC_CALLBACK_ARGS_P(I, keys)) +{ + ATH_MSG_WARNING("Called untested EcalDetectorTool::align()"); + void* i = &I; + void* k = &keys; + if (i == nullptr && k == nullptr) return StatusCode::SUCCESS; // suppress stupid warning + if (m_manager==nullptr) { + ATH_MSG_FATAL("Manager does not exist"); + return StatusCode::FAILURE; + } + if (m_alignable.value()) { + return m_manager->align(I, keys); + } else { + ATH_MSG_DEBUG("Alignment disabled. No alignments applied"); + return StatusCode::SUCCESS; + } +} diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeneralParameters.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeneralParameters.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1a35b31aa1f0999821f3442db87ae62f86cc809a --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeneralParameters.cxx @@ -0,0 +1,51 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalGeneralParameters.h" +#include "EcalDataBase.h" +#include "RDBAccessSvc/IRDBRecord.h" +#include "RDBAccessSvc/IRDBRecordset.h" +#include "GaudiKernel/SystemOfUnits.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "CaloGeoModelUtils/TopLevelPlacements.h" + +const double EcalSAFETY = 0.01 * Gaudi::Units::mm; // Used in some places to make envelopes slightly larger to ensure + // no overlaps due to rounding errors. + + +EcalGeneralParameters::EcalGeneralParameters(EcalDataBase* rdb) +{ + m_rdb = rdb; + m_placements = new TopLevelPlacements(m_rdb->topLevelTable()); +} + +EcalGeneralParameters::~EcalGeneralParameters() +{ + delete m_placements; +} + +const GeoTrf::Transform3D & +EcalGeneralParameters::partTransform(const std::string & partName) const +{ + return m_placements->transform(partName); +} + +bool +EcalGeneralParameters::partPresent(const std::string & partName) const +{ + return m_placements->present(partName); +} + +// +// General +// +double +EcalGeneralParameters::safety() const +{ + return EcalSAFETY; +} + + + + diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeneralParameters.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeneralParameters.h new file mode 100644 index 0000000000000000000000000000000000000000..160b4d852938a24011fab1907028fca7febe0617 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeneralParameters.h @@ -0,0 +1,42 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef EcalGeoModel_EcalGeneralParameters_H +#define EcalGeoModel_EcalGeneralParameters_H + +#include "GeoModelKernel/GeoDefinitions.h" + +#include <map> +#include <string> + +class EcalDataBase; +class TopLevelPlacements; + +class EcalGeneralParameters { + +public: + + EcalGeneralParameters(EcalDataBase* rdb); + ~EcalGeneralParameters(); + //Explicitly disallow copy, assignment to appease coverity + EcalGeneralParameters(const EcalGeneralParameters &) = delete; + EcalGeneralParameters & operator=(const EcalGeneralParameters &) = delete; + + // General + double safety() const; + + //Default conditions. + + const GeoTrf::Transform3D & partTransform(const std::string & partName) const; + bool partPresent(const std::string & partName) const; + +private: + + EcalDataBase * m_rdb; + TopLevelPlacements * m_placements; + +}; + + +#endif // EcalGeoModel_EcalGeneralParameters_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeoModelAthenaComps.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeoModelAthenaComps.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2bad0b10cbf409132cce1a9dcbe4b181aa84723c --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeoModelAthenaComps.cxx @@ -0,0 +1,23 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalGeoModel/EcalGeoModelAthenaComps.h" + +EcalGeoModelAthenaComps::EcalGeoModelAthenaComps() + : CaloDD::AthenaComps("EcalGeoModel"), + m_idHelper(0) +{} + +void +EcalGeoModelAthenaComps::setIdHelper(const EcalID* idHelper) +{ + m_idHelper = idHelper; +} + +const EcalID* +EcalGeoModelAthenaComps::getIdHelper() const +{ + return m_idHelper; +} + diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeometryManager.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeometryManager.cxx new file mode 100644 index 0000000000000000000000000000000000000000..894700e18a0da79005fb270f942af5046f56e1f6 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeometryManager.cxx @@ -0,0 +1,112 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalGeometryManager.h" + +#include "CaloGeoModelUtils/DistortedMaterialManager.h" +#include "FaserCaloIdentifier/EcalID.h" +#include "CaloReadoutGeometry/CaloCommonItems.h" +#include "EcalRowParameters.h" +// #include "EcalModuleParameters.h" +#include "EcalDataBase.h" +#include "EcalGeneralParameters.h" +#include "EcalGeoModel/EcalGeoModelAthenaComps.h" + +EcalGeometryManager::EcalGeometryManager(EcalDataBase* rdb) + : m_athenaComps{rdb->athenaComps()}, + m_rdb{rdb} +{ + // This class uses reference counting. Should not be delete'd in destructor. + m_commonItems = new CaloDD::CaloCommonItems(m_athenaComps->getIdHelper()); + + m_rowParameters = std::make_unique<EcalRowParameters>(m_rdb); + // m_moduleParameters = std::make_unique<EcalModuleParameters>(m_rdb); + m_generalParameters = std::make_unique<EcalGeneralParameters>(m_rdb); + m_distortedMatManager = std::make_unique<CaloDD::DistortedMaterialManager>(); +} + +EcalGeometryManager::~EcalGeometryManager() +{ +} + +// +// Access to run time options. +// +const EcalOptions & +EcalGeometryManager::options() const +{ + return m_options; +} + +void +EcalGeometryManager::setOptions(const EcalOptions & options) +{ + m_options = options; +} + +const EcalGeoModelAthenaComps * +EcalGeometryManager::athenaComps() const +{ + return m_athenaComps; +} + +// +// CaloCommonItems which are passed to CaloDetectorElements. +// + +const CaloDD::CaloCommonItems * +EcalGeometryManager::commonItems() const +{ + return m_commonItems; +} + +const EcalRowParameters * +EcalGeometryManager::rowParameters() const +{ + return m_rowParameters.get(); +} + +// const EcalModuleParameters * +// EcalGeometryManager::moduleParameters() const +// { +// return m_moduleParameters.get(); +// } + +const EcalGeneralParameters * +EcalGeometryManager::generalParameters() const +{ + return m_generalParameters.get(); +} + +const CaloDD::DistortedMaterialManager * +EcalGeometryManager::distortedMatManager() const +{ + return m_distortedMatManager.get(); +} + +EcalGeometryManager& +EcalGeometryManager::operator=(const EcalGeometryManager& right) { + if (this != &right) { + m_options = right.m_options; + m_athenaComps = right.m_athenaComps; + m_commonItems = right.m_commonItems; + m_rdb = right.m_rdb; + m_rowParameters.reset(new EcalRowParameters(m_rdb)); + // m_moduleParameters.reset(new EcalModuleParameters(m_rdb)); + m_generalParameters.reset(new EcalGeneralParameters(m_rdb)); + m_distortedMatManager.reset(new CaloDD::DistortedMaterialManager()); + } + return *this; +} + +EcalGeometryManager::EcalGeometryManager(const EcalGeometryManager& right) { + m_options = right.m_options; + m_athenaComps = right.m_athenaComps; + m_commonItems = right.m_commonItems; + m_rdb = right.m_rdb; + m_rowParameters.reset(new EcalRowParameters(m_rdb)); + // m_moduleParameters.reset(new EcalModuleParameters(m_rdb)); + m_generalParameters.reset(new EcalGeneralParameters(m_rdb)); + m_distortedMatManager.reset(new CaloDD::DistortedMaterialManager()); +} diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeometryManager.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeometryManager.h new file mode 100644 index 0000000000000000000000000000000000000000..e816aeb2dde593e451b05e42bc66f36121bcb65d --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalGeometryManager.h @@ -0,0 +1,66 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef EcalGeoModel_EcalGeometryManager_H +#define EcalGeoModel_EcalGeometryManager_H + +#include "EcalOptions.h" + +#include <memory> + +namespace CaloDD { + class CaloCommonItems; + class DistortedMaterialManager; +} + +class EcalRowParameters; +// class EcalModuleParameters; +class EcalDataBase; +class EcalGeneralParameters; +class EcalGeoModelAthenaComps; + +class EcalGeometryManager { + +public: + + // Constructor + EcalGeometryManager(EcalDataBase* rdb); + + // Destructor + ~EcalGeometryManager(); + + // Access to run time options + const EcalOptions & options() const; + void setOptions(const EcalOptions & options); + + // Access to athena components + const EcalGeoModelAthenaComps * athenaComps() const; + + // To be passed to detector element. + const CaloDD::CaloCommonItems * commonItems() const; + + const EcalRowParameters* rowParameters() const; + // const EcalModuleParameters* moduleParameters() const; + const EcalGeneralParameters* generalParameters() const; + const CaloDD::DistortedMaterialManager* distortedMatManager() const; + + EcalGeometryManager& operator=(const EcalGeometryManager& right); + EcalGeometryManager(const EcalGeometryManager& right); + +private: + + EcalOptions m_options; + const EcalGeoModelAthenaComps * m_athenaComps; + CaloDD::CaloCommonItems * m_commonItems; + EcalDataBase* m_rdb; + + std::unique_ptr<EcalRowParameters> m_rowParameters; + // std::unique_ptr<EcalModuleParameters> m_moduleParameters; + std::unique_ptr<EcalGeneralParameters> m_generalParameters; + std::unique_ptr<CaloDD::DistortedMaterialManager> m_distortedMatManager; + +}; + + +#endif // EcalGeoModel_EcalGeometryManager_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalIdentifier.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalIdentifier.cxx new file mode 100644 index 0000000000000000000000000000000000000000..239c3d17863a2fdc15c629c5ef35cdc2169cb066 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalIdentifier.cxx @@ -0,0 +1,23 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalIdentifier.h" +#include "FaserCaloIdentifier/EcalID.h" +#include "Identifier/Identifier.h" + +#include <cassert> +#include <iostream> + +Identifier +EcalIdentifier::getModuleId() +{ + assert (m_idHelper); + return m_idHelper->module_id(m_row, m_module); +} + +void EcalIdentifier::print() +{ + std::cout << "4/1/" << m_row << "/" + << m_module << std::endl; +} diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalIdentifier.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalIdentifier.h new file mode 100644 index 0000000000000000000000000000000000000000..92cbd8cbd86b6f0be090c25f2e2d0e7cb1db4bdd --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalIdentifier.h @@ -0,0 +1,41 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ECALGEOMODEL_ECALIDENTIFIER_H +#define ECALGEOMODEL_ECALIDENTIFIER_H + +class Identifier; +class EcalID; + +class EcalIdentifier +{ +public: + + EcalIdentifier( const EcalID* idHelper, + int row = 0, + int module = 0 ) + : m_idHelper{idHelper}, + m_row{row}, + m_module{module} + {}; + + + void setRow(int i) {m_row = i;} + int getRow() const {return m_row;} + + void setModule(int i) {m_module = i;} + int getModule() const {return m_module;} + + Identifier getModuleId(); + + // For debugging purposes. + void print(); + +private: + const EcalID* m_idHelper; + int m_row; + int m_module; +}; + +#endif // ECALGEOMODEL_ECALIDENTIFIER_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalMaterialManager.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalMaterialManager.cxx new file mode 100644 index 0000000000000000000000000000000000000000..9e631831d37885deb2ed7bc98239c9909dbcf0cc --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalMaterialManager.cxx @@ -0,0 +1,81 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalMaterialManager.h" +#include "GeoModelKernel/GeoMaterial.h" +#include "GeoModelKernel/GeoElement.h" +#include "EcalDataBase.h" +#include "RDBAccessSvc/IRDBRecordset.h" +#include "StoreGate/StoreGateSvc.h" +#include "GaudiKernel/Bootstrap.h" +#include "GaudiKernel/ISvcLocator.h" +#include "GaudiKernel/SystemOfUnits.h" + +#include <iostream> + +// Constructor +EcalMaterialManager::EcalMaterialManager(EcalDataBase* db) +{ + // Get my material manager. + ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap + StoreGateSvc* detStore; + StatusCode sc = svcLocator->service("DetectorStore", detStore ); + if (sc.isFailure()) { + std::cout << "Could not locate DetectorStore" << std::endl; + return; + } + + m_materialManager = std::make_unique<CaloMaterialManager>("EcalMaterialManager", db->athenaComps()); + m_materialManager->addWeightTable(db->weightTable(), "ecal"); + m_materialManager->addScalingTable(db->scalingTable()); + + loadMaterials(); + + m_gasMaterial = m_materialManager->getMaterial("std::Air"); +} + +// Add materials not yet in the database +void +EcalMaterialManager::loadMaterials() +{ +} + +const GeoElement* +EcalMaterialManager::getElement(const std::string & elementName) const +{ + return m_materialManager->getElement(elementName); +} + +const GeoMaterial* +EcalMaterialManager::getMaterial(const std::string & materialName) const +{ + return m_materialManager->getMaterial(materialName); +} + +void +EcalMaterialManager::addMaterial(GeoMaterial* material) +{ + return m_materialManager->addMaterial(material); +} + +const GeoMaterial* +EcalMaterialManager::getMaterial(const std::string & originalMaterial, + double density, + const std::string & newName) +{ + + return m_materialManager->getMaterial(originalMaterial, density, newName); +} + +const GeoMaterial * +EcalMaterialManager::getMaterialForVolume(const std::string & materialName, double volume) +{ + return m_materialManager->getMaterialForVolume(materialName, volume); +} + +const GeoMaterial* +EcalMaterialManager::gasMaterial() const +{ + return m_gasMaterial; +} diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalMaterialManager.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalMaterialManager.h new file mode 100644 index 0000000000000000000000000000000000000000..9e32daf0ed9141869eb808ead1a0472138e27fd4 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalMaterialManager.h @@ -0,0 +1,47 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ECALMATERIALMANAGER_H +#define ECALMATERIALMANAGER_H + +// EcalMaterialManager. This provides an interface to the CaloMaterialManager which in turn +// is an interface to GeoModel Material Manager with some additional functionality. +#include "CaloGeoModelUtils/CaloMaterialManager.h" + +#include <memory> +#include <string> + +class GeoMaterial; +class GeoElement; +class EcalDataBase; + +class EcalMaterialManager +{ + +public: + + EcalMaterialManager(EcalDataBase* db); + + const GeoMaterial* getMaterial(const std::string & materialName) const; + const GeoElement* getElement(const std::string & elementName) const; + + const GeoMaterial* getMaterial(const std::string & originalMaterial, + double density, + const std::string & newName = ""); + const GeoMaterial *getMaterialForVolume(const std::string & materialName, double volume); + + // Default gas material + const GeoMaterial* gasMaterial() const; + +private: + void loadMaterials(); + void addMaterial(GeoMaterial* material); + + std::unique_ptr<CaloMaterialManager> m_materialManager; + const GeoMaterial* m_gasMaterial; + +}; + + +#endif // ECALMATERIALMANAGER_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalModule.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalModule.cxx new file mode 100644 index 0000000000000000000000000000000000000000..064cf9ffb4604ee407b08db00deb6ff7e3cebede --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalModule.cxx @@ -0,0 +1,133 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalModule.h" + +#include "EcalGeometryManager.h" +// #include "EcalMaterialManager.h" + +// #include "EcalModuleParameters.h" + +#include "GeoModelKernel/GeoBox.h" +#include "GeoModelKernel/GeoLogVol.h" +#include "GeoModelKernel/GeoPhysVol.h" +#include "GeoModelKernel/GeoFullPhysVol.h" +#include "GeoModelKernel/GeoMaterial.h" + +#include "GeoModelXMLParser/XercesParser.h" + +#include "CaloReadoutGeometry/EcalDetectorManager.h" +#include "CaloReadoutGeometry/CaloDetectorDesign.h" +#include "CaloReadoutGeometry/CaloDetectorElement.h" +#include "CaloReadoutGeometry/CaloDD_Defs.h" +#include "CaloReadoutGeometry/CaloCommonItems.h" + +#include "PathResolver/PathResolver.h" + +#include "GaudiKernel/SystemOfUnits.h" + +using namespace CaloDD; + +EcalModule::EcalModule(const std::string & name, + CaloDD::EcalDetectorManager* detectorManager, + const EcalGeometryManager* geometryManager, + EcalMaterialManager* materials) + : EcalUniqueComponentFactory(name, detectorManager, geometryManager, materials), + m_width{0.0}, m_height{0.0}, m_length{0.0}, + m_noElementWarning{true} +{ + + std::string resolvedFile = PathResolver::find_file(geometryManager->options().gdmlFile(), "XMLPATH", PathResolver::RecursiveSearch); + XercesParser xercesParser; + xercesParser.ParseFileAndNavigate(resolvedFile); + std::cout << "done parsing " << resolvedFile << std::endl; + + getParameters(); + + m_logVolume = preBuild(); + m_logVolume->ref(); +} + +EcalModule::~EcalModule() +{ + m_logVolume->unref(); +} + +void +EcalModule::getParameters() +{ + const GeoBox* lvBox = dynamic_cast<const GeoBox*>(m_controller.retrieveLogicalVolume("_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer").first->getShape()); + if (lvBox != nullptr) + { + std::cout << "Ecal logical volume dimensions: ( " << 2 * lvBox->getXHalfLength() << " , " << 2 * lvBox->getYHalfLength() << " , " << 2 * lvBox->getZHalfLength() << " )" << std::endl; + m_width = 2 * lvBox->getXHalfLength(); + m_height = 2 * lvBox->getYHalfLength(); + m_length = 2 * lvBox->getZHalfLength(); + } + + m_detectorManager->numerology().setNumPmtsPerModule(m_pmtsPerModule); +} + +const GeoLogVol * +EcalModule::preBuild() +{ + + // Build the module. + + const GeoLogVol* moduleLog = m_controller.retrieveLogicalVolume("_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer").first; + + // Make the calo design for this plate + makeDesign(); + + m_detectorManager->setDesign(m_design); + + return moduleLog; +} + + +void +EcalModule::makeDesign() +{ + m_design = new CaloDetectorDesign(m_width, + m_height, + m_length, + m_pmtsPerModule); +} + + + +GeoVPhysVol * +EcalModule::build(EcalIdentifier id) +{ + GeoFullPhysVol * module = new GeoFullPhysVol(m_logVolume); + GeoPhysVol* modulePhys = m_controller.retrieveLogicalVolume("_dd_Geometry_DownstreamRegion_Ecal_Modules_Outer").second; + module->add(modulePhys); + + // Make detector element and add to collection + // Only do so if we have a valid id helper. + + //id.print(); // for debugging only + + const CaloCommonItems* commonItems = m_geometryManager->commonItems(); + + if (commonItems->getIdHelper()) { + + CaloDetectorElement * detElement; + + detElement = new CaloDetectorElement(id.getModuleId(), + m_design, + module, + commonItems); + + // Add the detector element. + m_detectorManager->addDetectorElement(detElement); + + } else { + if (m_noElementWarning) { + std::cout << "WARNING!!!!: No Ecal id helper and so no elements being produced." << std::endl; + m_noElementWarning = false; + } + } + return module; +} diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalModule.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalModule.h new file mode 100644 index 0000000000000000000000000000000000000000..49abeebfd0d8ce4019baeba8549090e4e5fa28e2 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalModule.h @@ -0,0 +1,54 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ECALGEOMODEL_ECALPLATE_H +#define ECALGEOMODEL_ECALPLATE_H + +#include "EcalComponentFactory.h" +#include "GDMLInterface/GDMLController.h" + +#include <atomic> +#include <string> + +// class GeoMaterial; +class GeoVPhysVol; +namespace CaloDD{class CaloDetectorDesign;} + +class EcalModule: public EcalUniqueComponentFactory +{ +public: + EcalModule(const std::string & name, + CaloDD::EcalDetectorManager* detectorManager, + const EcalGeometryManager* geometryManager, + EcalMaterialManager* materials); + + ~EcalModule(); + +public: + // const GeoMaterial * material() const {return m_material;} + double height() const {return m_height;} + double width() const {return m_width;} + double length() const {return m_length;} + + virtual GeoVPhysVol * build(EcalIdentifier id); + +private: + void getParameters(); + virtual const GeoLogVol * preBuild(); + void makeDesign(); + + GDMLController m_controller {"GDMLController"}; + // const GeoMaterial * m_material; + double m_width; + double m_height; + double m_length; + + const int m_pmtsPerModule {1}; + + CaloDD::CaloDetectorDesign * m_design; + + mutable std::atomic_bool m_noElementWarning; +}; + +#endif // ECALGEOMODEL_ECALPLATE_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalOptions.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalOptions.cxx new file mode 100644 index 0000000000000000000000000000000000000000..998726a6b15258543a84f073bc82023ac39c1b30 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalOptions.cxx @@ -0,0 +1,45 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalOptions.h" + +EcalOptions::EcalOptions() + : m_gdmlFile{""} + , m_alignable(true) + , m_dynAlignFolders(false) +{} + +void +EcalOptions::setGdmlFile(std::string fileName) +{ + m_gdmlFile = fileName; +} + +std::string +EcalOptions::gdmlFile() const +{ + return m_gdmlFile; +} + +void +EcalOptions::setAlignable(bool flag) +{ + m_alignable = flag; +} + +bool +EcalOptions::alignable() const +{ + return m_alignable; +} + +void EcalOptions::setDynamicAlignFolders(const bool flag) +{ + m_dynAlignFolders = flag; +} + +bool EcalOptions::dynamicAlignFolders() const +{ + return m_dynAlignFolders; +} diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalOptions.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalOptions.h new file mode 100644 index 0000000000000000000000000000000000000000..527bc049f45129033ca209500d604eb1c4f936f3 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalOptions.h @@ -0,0 +1,33 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef EcalGeoModel_EcalOptions_H +#define EcalGeoModel_EcalOptions_H + +// Class for any run time options. +#include <string> + +class EcalOptions +{ + +public: + EcalOptions(); + bool alignable() const; + void setAlignable(bool flag = true); + + //dynamic alignment folders + void setDynamicAlignFolders(const bool flag = true); + bool dynamicAlignFolders() const; + + void setGdmlFile(std::string fileName); + std::string gdmlFile() const; +private: + std::string m_gdmlFile; + bool m_alignable; + bool m_dynAlignFolders; //controls which set of alignment folders is used + +}; + + +#endif // EcalGeoModel_EcalOptions_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRow.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRow.cxx new file mode 100644 index 0000000000000000000000000000000000000000..081a70726c1068165b6b4d7d202699fb26ec7c12 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRow.cxx @@ -0,0 +1,104 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalRow.h" + +#include "EcalMaterialManager.h" + +#include "EcalGeometryManager.h" +#include "EcalRowParameters.h" +// #include "EcalGeneralParameters.h" +#include "EcalIdentifier.h" +#include "EcalModule.h" + +#include "CaloReadoutGeometry/EcalDetectorManager.h" + +#include "CaloGeoModelUtils/ExtraMaterial.h" + +#include "GeoModelKernel/GeoBox.h" +#include "GeoModelKernel/GeoLogVol.h" +#include "GeoModelKernel/GeoFullPhysVol.h" +#include "GeoModelKernel/GeoPhysVol.h" +#include "GeoModelKernel/GeoNameTag.h" +#include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoTransform.h" +#include "GeoModelKernel/GeoAlignableTransform.h" +#include "GeoModelKernel/GeoMaterial.h" +#include "GeoModelKernel/GeoShape.h" +#include "GeoModelKernel/GeoShapeShift.h" +#include "GaudiKernel/SystemOfUnits.h" + +#include <iostream> + +EcalRow::EcalRow(const std::string & name, + EcalModule* module, + CaloDD::EcalDetectorManager* detectorManager, + const EcalGeometryManager* geometryManager, + EcalMaterialManager* materials) + : EcalUniqueComponentFactory(name, detectorManager, geometryManager, materials), + m_module { module } +{ + getParameters(); + m_logVolume = preBuild(); +} + + +void +EcalRow::getParameters() +{ + m_numModules = m_geometryManager->rowParameters()->numModules(); + m_moduleGap = m_geometryManager->rowParameters()->xGap(); + m_moduleAngle = m_geometryManager->rowParameters()->yawAngle(); + m_modulePitch = m_moduleGap + m_module->width(); + m_moduleStagger = std::abs(m_module->width() * tan(m_moduleAngle * M_PI / 180.0)); + m_safety = 1.0e-7; + + m_width = m_module->width() + (m_numModules - 1) * m_modulePitch + m_safety; + m_height = m_module->height() + m_safety; + + // Row length (beam direction) includes an additional offset due to angle + m_length = m_module->length() + (m_numModules - 1) * m_moduleStagger + m_safety; + + // Set numerology + m_detectorManager->numerology().setNumModulesPerRow(m_numModules); +} + +const GeoLogVol * +EcalRow::preBuild() +{ + // Create the station volume + // Box envelope containing the row. + const GeoBox* stationEnvelopeShape = new GeoBox(0.5 * m_width, 0.5 * m_height, 0.5 * m_length); + GeoLogVol* stationLog = new GeoLogVol(getName(), stationEnvelopeShape, m_materials->gasMaterial()); + return stationLog; +} + +GeoVPhysVol * +EcalRow::build(EcalIdentifier id) +{ + + GeoFullPhysVol * station = new GeoFullPhysVol(m_logVolume); + + double activeWidth = m_width - m_safety; + double moduleWidth = m_module->width(); + double activeLength = m_length - m_safety; + double moduleLength = m_module->length(); + int iStaggerSign = ( m_moduleAngle >= 0 ? 1 : -1); + for (int iModule = 0; iModule < m_numModules; iModule++) + { + station->add(new GeoNameTag("Module")); + station->add(new GeoIdentifierTag(iModule)); + id.setModule(iModule); + GeoAlignableTransform* transform = new GeoAlignableTransform(GeoTrf::Translate3D((moduleWidth - activeWidth)/2 + iModule * m_modulePitch, + 0.0, + iStaggerSign * ((moduleLength - activeLength)/2 + iModule * m_moduleStagger))); + station->add(transform); + GeoVPhysVol* modulePV = m_module->build(id); + station->add(modulePV); + m_detectorManager->addAlignableTransform(0, id.getModuleId(), transform, modulePV); + } + + return station; +} + diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRow.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRow.h new file mode 100644 index 0000000000000000000000000000000000000000..8ef4c8f2a807d9d87bacd7f75f6ba56b6542964e --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRow.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ECALGEOMODEL_ECALROW_H +#define ECALGEOMODEL_ECALROW_H + +#include "EcalComponentFactory.h" + +class GeoVPhysVol; +class GeoFullPhysVol; +class GeoLogVol; +class EcalIdentifier; +class EcalModule; + +class EcalRow : public EcalUniqueComponentFactory +{ + +public: + EcalRow(const std::string & name, + EcalModule* module, + CaloDD::EcalDetectorManager* detectorManager, + const EcalGeometryManager* geometryManager, + EcalMaterialManager* materials); + virtual GeoVPhysVol * build(EcalIdentifier id); + +public: + int numModules() const {return m_numModules;} + double modulePitch() const {return m_modulePitch;} + double moduleStagger() const {return m_moduleStagger;} + double moduleAngle() const {return m_moduleAngle;} + double moduleGap() const {return m_moduleGap;} + double height() const {return m_height;} + double width() const {return m_width;} + double length() const {return m_length;} + +private: + void getParameters(); + virtual const GeoLogVol * preBuild(); + + EcalModule* m_module; + + int m_numModules {2}; + double m_moduleGap {0.0}; + double m_moduleAngle {0.0}; + double m_modulePitch {0.0}; + double m_moduleStagger {0.0}; + + double m_height {0.0}; + double m_width {0.0}; + double m_length {0.0}; + + double m_safety {0.0}; +}; + +#endif // ECALGEOMODEL_ECALROW_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRowParameters.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRowParameters.cxx new file mode 100644 index 0000000000000000000000000000000000000000..7d2516069f60e315648665df31424181e1ab80e4 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRowParameters.cxx @@ -0,0 +1,41 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EcalRowParameters.h" +#include "EcalGeometryManager.h" + +#include "EcalDataBase.h" + +#include "RDBAccessSvc/IRDBRecord.h" +#include "GaudiKernel/SystemOfUnits.h" + +#include <cmath> + + +EcalRowParameters::EcalRowParameters(EcalDataBase* rdb) +{ + m_rdb = rdb; +} + +// +// General +// +int +EcalRowParameters::numModules() const +{ + return m_rdb->rowGeneral()->getInt("NUMMODULES"); +} + +double +EcalRowParameters::xGap() const +{ + return m_rdb->rowGeneral()->getDouble("XGAP"); +} + +double +EcalRowParameters::yawAngle() const +{ + return m_rdb->rowGeneral()->getDouble("YAWANGLE"); +} + diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRowParameters.h b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRowParameters.h new file mode 100644 index 0000000000000000000000000000000000000000..d18ebffb27bbfd61ce61bfe3ef3c225f32fab91c --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/EcalRowParameters.h @@ -0,0 +1,31 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef EcalGeoModel_EcalRowParameters_H +#define EcalGeoModel_EcalRowParameters_H + +#include <string> + +class EcalDataBase; + +class EcalRowParameters { + +public: + + // Constructor + EcalRowParameters(EcalDataBase* rdb); + + + // General + int numModules() const; + double xGap() const; + double yawAngle() const; + + private: + EcalDataBase * m_rdb; + +}; + + +#endif // EcalGeoModel_EcalRowParameters_H diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/src/components/EcalGeoModel_entries.cxx b/Calorimeter/CaloDetDescr/EcalGeoModel/src/components/EcalGeoModel_entries.cxx new file mode 100644 index 0000000000000000000000000000000000000000..69c609a113a9e8e05f9fa0ccc64346b295083ae8 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/src/components/EcalGeoModel_entries.cxx @@ -0,0 +1,4 @@ +#include "EcalGeoModel/EcalDetectorTool.h" + +DECLARE_COMPONENT( EcalDetectorTool ) + diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/test/EcalGMConfig_test.py b/Calorimeter/CaloDetDescr/EcalGeoModel/test/EcalGMConfig_test.py new file mode 100644 index 0000000000000000000000000000000000000000..98aed0888e8fc149ab8b957b5f667da5e93b48c8 --- /dev/null +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/test/EcalGMConfig_test.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python +"""Run tests on EcalGeoModel configuration + +Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +""" +if __name__ == "__main__": + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + from CalypsoConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.HITS + ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" + ConfigFlags.Detector.SimulateEcal = False + ConfigFlags.GeoModel.Align.Dynamic = False + ConfigFlags.lock() + + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + from EcalGeoModel.EcalGeoModelConfig import EcalGeometryCfg + acc = EcalGeometryCfg(ConfigFlags) + f=open('EcalGeometryCfg.pkl','wb') + acc.store(f) + f.close() diff --git a/Calorimeter/CaloDetDescr/FaserCaloIdentifier/CMakeLists.txt b/Calorimeter/CaloDetDescr/FaserCaloIdentifier/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..54ba749cddc246185bc3d2e161bb56663f0a925c --- /dev/null +++ b/Calorimeter/CaloDetDescr/FaserCaloIdentifier/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################################################ +# Package: FaserCaloIdentifier +################################################################################ + +# Declare the package name: +atlas_subdir( FaserCaloIdentifier ) + +# External dependencies: +find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) + +# Component(s) in the package: +atlas_add_library( FaserCaloIdentifier + src/EcalID.cxx + PUBLIC_HEADERS FaserCaloIdentifier + PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES AthenaKernel FaserDetDescr IdDict Identifier + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} IdDictParser GaudiKernel ) + +atlas_add_dictionary( FaserCaloIdentifierDict + FaserCaloIdentifier/FaserCaloIdentifierDict.h + FaserCaloIdentifier/selection.xml + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} FaserDetDescr IdDict Identifier IdDictParser GaudiKernel FaserCaloIdentifier ) + +#atlas_add_executable( test_indet_id +# test/test_indet_id.cxx +# INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} +# LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasDetDescr IdDict Identifier IdDictParser GaudiKernel InDetIdentifier ) + diff --git a/Calorimeter/CaloDetDescr/FaserCaloIdentifier/FaserCaloIdentifier/EcalID.h b/Calorimeter/CaloDetDescr/FaserCaloIdentifier/FaserCaloIdentifier/EcalID.h new file mode 100644 index 0000000000000000000000000000000000000000..29440c3bc2c478ad9d6814b05d60847e56d7cd9f --- /dev/null +++ b/Calorimeter/CaloDetDescr/FaserCaloIdentifier/FaserCaloIdentifier/EcalID.h @@ -0,0 +1,540 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOIDENTIFIER_ECALID_H +#define CALOIDENTIFIER_ECALID_H +/** + * @file EcalID.h + * + * @brief This is an Identifier helper class for the Ecal + * subdetector. This class is a factory for creating compact + * Identifier objects and IdentifierHash or hash ids. And it also + * allows decoding of these ids. + * + */ + +//<<<<<< INCLUDES >>>>>> + +#include "FaserDetDescr/FaserDetectorID.h" +#include "Identifier/Identifier.h" +#include "Identifier/IdentifierHash.h" +#include "Identifier/Range.h" +#include "Identifier/IdHelper.h" +#include "IdDict/IdDictFieldImplementation.h" +#include "AthenaKernel/CLASS_DEF.h" + +#include <string> +#include <assert.h> +#include <algorithm> + +//<<<<<< PUBLIC DEFINES >>>>>> +//<<<<<< PUBLIC CONSTANTS >>>>>> +//<<<<<< PUBLIC TYPES >>>>>> + +class IdDictDictionary; + +//<<<<<< PUBLIC VARIABLES >>>>>> +//<<<<<< PUBLIC FUNCTIONS >>>>>> +//<<<<<< CLASS DECLARATIONS >>>>>> + +/** + ** @class EcalID + ** + ** @brief This is an Identifier helper class for the Ecal + ** subdetector. This class is a factory for creating compact + ** Identifier objects and IdentifierHash or hash ids. And it also + ** allows decoding of these ids. + ** + ** Definition and the range of values for the levels of the + ** identifier are: + ** + ** @verbatim + ** element range meaning + ** ------- ----- ------- + ** + ** row 0 - 1 vertical location of module (bottom, top) + ** module 0 - 1 horizontal location of module in row (left, right) + ** pmt 0 single pmt per module + ** + ** @endverbatim + ** + */ +class EcalID : public FaserDetectorID +{ +public: + + /// @name public typedefs + //@{ + typedef Identifier::size_type size_type; + typedef std::vector<Identifier>::const_iterator const_id_iterator; + typedef MultiRange::const_identifier_factory const_expanded_id_iterator; + //@} + + /// @name strutors + //@{ + EcalID(void); + virtual ~EcalID(void) = default; + //@} + + /// @name Creators for module ids and pmt ids + //@{ + /// For a single row + Identifier row_id ( int row ) const; + Identifier row_id ( int row, + bool checks) const; + + /// For a row from a module id + Identifier row_id ( const Identifier& module_id ) const; + + /// For a single module + Identifier module_id ( int row, + int module ) const; + Identifier module_id ( int row, + int module, + bool checks) const; + + /// For a single module from a pmt id + Identifier module_id ( const Identifier& pmt_id ) const; + + /// From hash - optimized + Identifier module_id ( IdentifierHash module_hash ) const; + + /// For an individual pmt + Identifier pmt_id ( int row, + int module, + int pmt ) const; + + Identifier pmt_id ( int row, + int module, + int pmt, + bool check ) const; + + Identifier pmt_id ( const Identifier& module_id, + int pmt ) const; + + //@} + + + /// @name Hash table maximum sizes + //@{ + size_type module_hash_max (void) const; + size_type pmt_hash_max (void) const; + //@} + + /// @name Access to all ids + //@{ + /// Iterators over full set of ids. Module iterator is sorted + const_id_iterator module_begin (void) const; + const_id_iterator module_end (void) const; + /// For pmt ids, only expanded id iterators are available. Use + /// following "pmt_id" method to obtain a compact identifier + const_expanded_id_iterator pmt_begin (void) const; + const_expanded_id_iterator pmt_end (void) const; + //@} + + + /// @name Optimized accessors - ASSUMES id IS an Ecal id, i.e. NOT other + //@{ + /// module hash from id - optimized + IdentifierHash module_hash (Identifier module_id) const; + + /// Values of different levels (failure returns 0) + int row (const Identifier& id) const; + int module (const Identifier& id) const; + int pmt (const Identifier& id) const; + + /// Max/Min values for each field (-999 == failure) + int row_max (const Identifier& id) const; + int module_max (const Identifier& id) const; + int pmt_max (const Identifier& id) const; + //@} + + /// @name module navigation + //@{ + // /// Previous in z + // int get_prev_in_z(const IdentifierHash& id, IdentifierHash& prev) const; + // /// Next in z + // int get_next_in_z(const IdentifierHash& id, IdentifierHash& next) const; + /// Previous module hash in phi (return == 0 for neighbor found) + int get_prev_in_phi (const IdentifierHash& id, IdentifierHash& prev) const; + /// Next module hash in phi (return == 0 for neighbor found) + int get_next_in_phi (const IdentifierHash& id, IdentifierHash& next) const; + /// Previous module hash in eta (return == 0 for neighbor found) + int get_prev_in_eta (const IdentifierHash& id, IdentifierHash& prev) const; + // /// Next module hash in eta (return == 0 for neighbor found) + int get_next_in_eta (const IdentifierHash& id, IdentifierHash& next) const; + // /// Wafer hash on other side + // int get_other_side (const IdentifierHash& id, IdentifierHash& other) const; + + // Check limits + bool is_phi_module_max(const Identifier& id) const; + bool is_phi_module_min(const Identifier& id) const; + bool is_eta_module_min(const Identifier& id) const; + bool is_eta_module_max(const Identifier& id) const; + //@} + + /// @name contexts to distinguish module id from pmt id + //@{ + IdContext module_context (void) const; + IdContext pmt_context (void) const; + //@} + + /// @name methods from abstract interface - slower than opt version + //@{ + /// Create compact id from hash id (return == 0 for OK) + virtual int get_id (const IdentifierHash& hash_id, + Identifier& id, + const IdContext* context = 0) const; + + /// Create hash id from compact id (return == 0 for OK) + virtual int get_hash (const Identifier& id, + IdentifierHash& hash_id, + const IdContext* context = 0) const; + //@} + + /// Return the lowest bit position used in the channel id + int base_bit (void) const; + + /// Calculate a channel offset between the two identifiers. + Identifier::diff_type calc_offset(const Identifier& base, + const Identifier& target) const; + + /// Create an identifier with a given base and channel offset + Identifier pmt_id_offset(const Identifier& base, + Identifier::diff_type offset) const; + + /// @name interaction with id dictionary + //@{ + /// Create strip Identifier from expanded id, which is returned by the + /// id_iterators + Identifier pmt_id (const ExpandedIdentifier& pmt_id) const; + + /// Create expanded id from compact id (return == 0 for OK) + void get_expanded_id (const Identifier& id, + ExpandedIdentifier& exp_id, + const IdContext* context = 0) const; + + /// Initialization from the identifier dictionary + virtual int initialize_from_dictionary(const IdDictMgr& dict_mgr); + + /// Tests of packing + void test_module_packing (void) const; + //@} + +private: + + enum {NOT_VALID_HASH = 64000}; + + typedef std::vector<Identifier> id_vec; + typedef id_vec::const_iterator id_vec_it; + typedef std::vector<unsigned short> hash_vec; + typedef hash_vec::const_iterator hash_vec_it; + + void module_id_checks ( int row, + int module ) const; + + void pmt_id_checks ( int row, + int module, + int pmt ) const; + + + int initLevelsFromDict(void); + + int init_hashes(void); + + int init_neighbors(void); + + // Temporary method for adapting an identifier for the MultiRange + // check - MR is missing the InnerDetector level + // Identifier idForCheck (const Identifier& id) const; + + size_type m_ecal_region_index; + size_type m_CALO_INDEX; + size_type m_ECAL_INDEX; + size_type m_ROW_INDEX; + size_type m_MODULE_INDEX; + size_type m_PMT_INDEX; + + const IdDictDictionary* m_dict; + MultiRange m_full_module_range; + MultiRange m_full_pmt_range; + size_type m_module_hash_max; + size_type m_pmt_hash_max; + // Range::field m_barrel_field; + id_vec m_module_vec; + // hash_vec m_prev_z_plate_vec; + // hash_vec m_next_z_plate_vec; + hash_vec m_prev_phi_module_vec; + hash_vec m_next_phi_module_vec; + hash_vec m_prev_eta_module_vec; + hash_vec m_next_eta_module_vec; + // bool m_hasRows ; + + IdDictFieldImplementation m_calo_impl ; + IdDictFieldImplementation m_ecal_impl ; + IdDictFieldImplementation m_row_impl ; + IdDictFieldImplementation m_module_impl ; + IdDictFieldImplementation m_pmt_impl ; +}; + + +//<<<<<< INLINE PUBLIC FUNCTIONS >>>>>> + +///////////////////////////////////////////////////////////////////////////// +//<<<<<< INLINE MEMBER FUNCTIONS >>>>>> +///////////////////////////////////////////////////////////////////////////// + +//using the macros below we can assign an identifier (and a version) +//This is required and checked at compile time when you try to record/retrieve +CLASS_DEF(EcalID, 113753346, 1) + +//---------------------------------------------------------------------------- +inline Identifier +EcalID::row_id ( int row, + bool checks) const +{ + + // Build identifier + Identifier result((Identifier::value_type)0); + + // Pack fields independently + m_calo_impl.pack (calo_field_value(), result); + m_ecal_impl.pack (ecal_field_value(), result); + m_row_impl.pack (row, result); + // Do checks + if(checks) + { + module_id_checks ( row, 0 ); + } + + return result; +} + +inline Identifier +EcalID::row_id ( int row ) const +{ + return row_id (row, do_checks()); +} + +//---------------------------------------------------------------------------- +inline Identifier +EcalID::row_id ( const Identifier& module_id ) const +{ + Identifier result(module_id); + // Reset the module and pmt fields + m_module_impl.reset(result); + m_pmt_impl.reset(result); + return (result); +} + +//---------------------------------------------------------------------------- +inline Identifier +EcalID::module_id ( int row, + int module, + bool checks) const +{ + // Build identifier + Identifier result((Identifier::value_type)0); + + // Pack fields independently + m_calo_impl.pack (calo_field_value(), result); + m_ecal_impl.pack (ecal_field_value(), result); + m_row_impl.pack (row, result); + m_module_impl.pack (module, result); + + // Do checks + if(checks) + { + module_id_checks ( row, module ); + } + return result; +} + +inline Identifier +EcalID::module_id ( int row, + int module ) const +{ + return module_id (row, module, do_checks()); +} + +//---------------------------------------------------------------------------- +inline Identifier +EcalID::module_id ( const Identifier& pmt_id ) const +{ + Identifier result(pmt_id); + // reset the pmt field + m_pmt_impl.reset(result); + return (result); +} + +//---------------------------------------------------------------------------- +inline Identifier EcalID::module_id ( IdentifierHash module_hash ) const +{ + return (m_module_vec[module_hash]); +} + +//---------------------------------------------------------------------------- +inline IdentifierHash EcalID::module_hash (Identifier module_id) const +{ + // MsgStream log(m_msgSvc, "EcalID"); + // log << MSG::VERBOSE << "m_module_vec size: " << m_module_vec.size() << endmsg; + // log << MSG::VERBOSE << "input id = " << module_id << endmsg; + // for (size_t i = 0; i < m_module_vec.size(); i++) + // { + // log << MSG::VERBOSE << "Hash = " << i << " : ID = " << m_module_vec[i] << endmsg; + // } + id_vec_it it = std::lower_bound(m_module_vec.begin(), + m_module_vec.end(), + module_id); + // Require that module_id matches the one in vector + if (it != m_module_vec.end() && module_id == (*it)) { + return (it - m_module_vec.begin()); + } + IdentifierHash result; + return (result); // return hash in invalid state +} + +//---------------------------------------------------------------------------- +inline Identifier +EcalID::pmt_id ( int row, + int module, + int pmt, + bool checks) const +{ + // Build identifier + Identifier result((Identifier::value_type)0); + + // Pack fields independently + m_calo_impl.pack (calo_field_value(), result); + m_ecal_impl.pack (ecal_field_value(), result); + m_row_impl.pack (row, result); + m_module_impl.pack (module, result); + m_pmt_impl.pack (pmt, result); + + // Do checks + if(checks) { + pmt_id_checks ( row, module, pmt ); + } + return result; +} + +inline Identifier +EcalID::pmt_id ( int row, + int module, + int pmt ) const +{ + return pmt_id (row, module, pmt, do_checks()); +} + +//---------------------------------------------------------------------------- +inline Identifier +EcalID::pmt_id (const ExpandedIdentifier& id) const +{ + // Build identifier + Identifier result((Identifier::value_type)0); + + // Pack fields independently + m_calo_impl.pack (calo_field_value(), result); + m_ecal_impl.pack (ecal_field_value(), result); + m_row_impl.pack (id[m_ROW_INDEX], result); + m_module_impl.pack (id[m_MODULE_INDEX], result); + m_pmt_impl.pack (id[m_PMT_INDEX], result); + + // Do checks + if(m_do_checks) + { + pmt_id_checks ( id[m_ROW_INDEX], + id[m_MODULE_INDEX], + id[m_PMT_INDEX]); + } + return result; +} + +//---------------------------------------------------------------------------- +inline Identifier +EcalID::pmt_id ( const Identifier& module_id, int pmt ) const +{ + // Build identifier + Identifier result(module_id); + + // Reset pmt and then add in value + m_pmt_impl.reset (result); + m_pmt_impl.pack (pmt, result); + + if(m_do_checks) + { + pmt_id_checks ( row(result), + module(result), + pmt ); + } + return result; +} + +//---------------------------------------------------------------------------- +inline Identifier::diff_type +EcalID::calc_offset(const Identifier& base, const Identifier& target) const +{ + Identifier::diff_type tval = static_cast<Identifier::diff_type>(target.get_compact() >> base_bit()); + Identifier::diff_type bval = static_cast<Identifier::diff_type>(base.get_compact() >> base_bit()); + return (tval - bval); +} + +//---------------------------------------------------------------------------- +inline Identifier +EcalID::pmt_id_offset(const Identifier& base, + Identifier::diff_type offset) const +{ + Identifier::value_type bval = base.get_compact() >> base_bit(); + return Identifier((bval + offset) << base_bit()); +} + +//---------------------------------------------------------------------------- +inline int +EcalID::base_bit ( void ) const +{ + int base = static_cast<int>(m_pmt_impl.shift()); // lowest field base + return (base > 32) ? 32 : base; + // max base is 32 so we can still read old strip id's and differences + // from non-SLHC releases. +} + +//---------------------------------------------------------------------------- +inline IdContext +EcalID::module_context (void) const +{ + ExpandedIdentifier id; + return (IdContext(id, 0, m_MODULE_INDEX)); +} + +//---------------------------------------------------------------------------- +inline IdContext +EcalID::pmt_context (void) const +{ + ExpandedIdentifier id; + return (IdContext(id, 0, m_PMT_INDEX)); +} + +//---------------------------------------------------------------------------- +inline int +EcalID::row (const Identifier& id) const +{ + return (m_row_impl.unpack(id)); +} + +//---------------------------------------------------------------------------- +inline int +EcalID::module (const Identifier& id) const +{ + return (m_module_impl.unpack(id)); +} + +//---------------------------------------------------------------------------- +inline int +EcalID::pmt (const Identifier& id) const +{ + return (m_pmt_impl.unpack(id)); +} + + +#endif // CALOIDENTIFIER_ECALID_H diff --git a/Calorimeter/CaloDetDescr/FaserCaloIdentifier/FaserCaloIdentifier/FaserCaloIdentifierDict.h b/Calorimeter/CaloDetDescr/FaserCaloIdentifier/FaserCaloIdentifier/FaserCaloIdentifierDict.h new file mode 100644 index 0000000000000000000000000000000000000000..2d8825f50fa3aec58ad56e3a4bd161774a429714 --- /dev/null +++ b/Calorimeter/CaloDetDescr/FaserCaloIdentifier/FaserCaloIdentifier/FaserCaloIdentifierDict.h @@ -0,0 +1,17 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file FaserCaloIdentifierDict.h + * + * @brief This file includes the class for dictionary definitions + * + * $Id: $ + */ +#ifndef FASERCALOIDENTIFIER_CALOIDENTIFIERDICT_H +#define FASERCALOIDENTIFIER_CALOIDENTIFIERDICT_H + +#include "FaserCaloIdentifier/EcalID.h" + +#endif // FASERCALOIDENTIFIER_CALOIDENTIFIERDICT_H diff --git a/Calorimeter/CaloDetDescr/FaserCaloIdentifier/FaserCaloIdentifier/selection.xml b/Calorimeter/CaloDetDescr/FaserCaloIdentifier/FaserCaloIdentifier/selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..d66c6ce0e07e175229e53c2dd8e4554e1f5d55cd --- /dev/null +++ b/Calorimeter/CaloDetDescr/FaserCaloIdentifier/FaserCaloIdentifier/selection.xml @@ -0,0 +1,3 @@ +<lcgdict> + <class name="EcalID" /> +</lcgdict> diff --git a/Calorimeter/CaloDetDescr/FaserCaloIdentifier/src/EcalID.cxx b/Calorimeter/CaloDetDescr/FaserCaloIdentifier/src/EcalID.cxx new file mode 100644 index 0000000000000000000000000000000000000000..bcecc3fa77467ec9b36e7e6a7618159814309fe5 --- /dev/null +++ b/Calorimeter/CaloDetDescr/FaserCaloIdentifier/src/EcalID.cxx @@ -0,0 +1,865 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/*************************************************************************** + Calorimeter identifier package + ------------------------------------------- +***************************************************************************/ + +//<<<<<< INCLUDES >>>>>> +#include "GaudiKernel/MsgStream.h" + +#include "FaserCaloIdentifier/EcalID.h" +#include "Identifier/IdentifierHash.h" +#include "IdDict/IdDictDefs.h" +#include <set> +#include <algorithm> +#include <iostream> + +//<<<<<< PRIVATE DEFINES >>>>>> +//<<<<<< PRIVATE CONSTANTS >>>>>> +//<<<<<< PRIVATE TYPES >>>>>> +//<<<<<< PRIVATE VARIABLE DEFINITIONS >>>>>> +//<<<<<< PUBLIC VARIABLE DEFINITIONS >>>>>> +//<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>> +//<<<<<< PRIVATE FUNCTION DEFINITIONS >>>>>> +//<<<<<< PUBLIC FUNCTION DEFINITIONS >>>>>> +//<<<<<< MEMBER FUNCTION DEFINITIONS >>>>>> + + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + + +EcalID::EcalID(void) + : + m_ecal_region_index(0), + m_CALO_INDEX(0), + m_ECAL_INDEX(1), + m_ROW_INDEX(2), + m_MODULE_INDEX(3), + m_PMT_INDEX(4), + m_dict(0), + m_module_hash_max(0), + m_pmt_hash_max(0) +{ +} + +void +EcalID::module_id_checks ( int row, + int module ) const +{ + + // Check that id is within allowed range + + // Fill expanded id + ExpandedIdentifier id; + id << calo_field_value() << ecal_field_value() + << row << module; + + if (!m_full_module_range.match(id)) { // module range check is sufficient + MsgStream log(m_msgSvc, "EcalID"); + log << MSG::ERROR << " EcalID::module_id result is NOT ok. ID, range " + << (std::string)id << " " << (std::string)m_full_module_range << endmsg; + } +} + +void +EcalID::pmt_id_checks ( int row, + int module, + int pmt) const +{ + + // Check that id is within allowed range + + // Fill expanded id + ExpandedIdentifier id; + id << calo_field_value() << ecal_field_value() + << row << module << pmt; + + if (!m_full_pmt_range.match(id)) { + MsgStream log(m_msgSvc, "EcalID"); + log << MSG::ERROR << " EcalID::pmt_id result is NOT ok. ID, range " + << (std::string)id << " " << (std::string)m_full_pmt_range << std::endl; + } +} + +int +EcalID::row_max(const Identifier& id) const +{ + // get max from dictionary + ExpandedIdentifier expId; + IdContext module_context1 = module_context(); + get_expanded_id(id, expId, &module_context1); + for (unsigned int i = 0; i < m_full_module_range.size(); ++i) { + const Range& range = m_full_module_range[i]; + if (range.match(expId)) { + const Range::field& row_field = range[m_ROW_INDEX]; + if (row_field.has_maximum()) { + return (row_field.get_maximum()); + } + } + } + return (-999); // default +} + +int +EcalID::pmt_max (const Identifier& id) const +{ + ExpandedIdentifier expId; + IdContext row_context(expId, 0, m_ROW_INDEX); + get_expanded_id(id, expId, &row_context); + int result = -999; + for (unsigned int i = 0; i < m_full_pmt_range.size(); ++i) { + const Range& range = m_full_pmt_range[i]; + if (range.match(expId)) { + const Range::field& pmt_field = range[m_PMT_INDEX]; + if (pmt_field.has_maximum()) { + int pmt = pmt_field.get_maximum(); + if (result < pmt) result = pmt; + } + } + } + return (result); +} + +int +EcalID::module_max(const Identifier& id) const +{ + // get max from dictionary + ExpandedIdentifier expId; + IdContext module_context1 = module_context(); + get_expanded_id(id, expId, &module_context1); + for (unsigned int i = 0; i < m_full_module_range.size(); ++i) { + const Range& range = m_full_module_range[i]; + if (range.match(expId)) { + const Range::field& module_field = range[m_MODULE_INDEX]; + if (module_field.has_maximum()) { + return (module_field.get_maximum()); + } + } + } + return -1; +} + +int +EcalID::initialize_from_dictionary(const IdDictMgr& dict_mgr) +{ + MsgStream log(m_msgSvc, "EcalID"); + log << MSG::INFO << "Initialize from dictionary" << endmsg; + + // Check whether this helper should be reinitialized + if (!reinitialize(dict_mgr)) { + log << MSG::INFO << "Request to reinitialize not satisfied - tags have not changed" << endmsg; + return (0); + } + else { + if (m_msgSvc) { + log << MSG::DEBUG << "(Re)initialize" << endmsg; + } + else { + std::cout << " DEBUG (Re)initialize" << std::endl; + } + } + + // init base object + if(FaserDetectorID::initialize_from_dictionary(dict_mgr)) return (1); + + // Register version of InnerDetector dictionary + if (register_dict_tag(dict_mgr, "Calorimeter")) return(1); + + m_dict = dict_mgr.find_dictionary ("Calorimeter"); + if(!m_dict) { + log << MSG::ERROR << " EcalID::initialize_from_dict - cannot access Calorimeter dictionary " << endmsg; + return 1; + } + + // Initialize the field indices + if(initLevelsFromDict()) return (1); + + // + // Build multirange for the valid set of identifiers + // + + + // Find value for the field Scintillator + const IdDictDictionary* faserDict = dict_mgr.find_dictionary ("FASER"); + int caloField = -1; + if (faserDict->get_label_value("subdet", "Calorimeter", caloField)) { + log << MSG::ERROR << "Could not get value for label 'Calorimeter' of field 'subdet' in dictionary " + << faserDict->m_name + << endmsg; + return (1); + } + + // Find value for the field Ecal + int ecalField = -1; + if (m_dict->get_label_value("part", "Ecal", ecalField)) { + log << MSG::ERROR << "Could not get value for label 'Ecal' of field 'part' in dictionary " + << m_dict->m_name + << endmsg; + return (1); + } + if (m_msgSvc) { + log << MSG::DEBUG << " EcalID::initialize_from_dict " + << "Found field values: Ecal " + << ecalField + << std::endl; + } + else { + std::cout << " DEBUG EcalID::initialize_from_dict " + << "Found field values: Ecal " + << ecalField + << std::endl; + } + + // Set up id for region and range prefix + ExpandedIdentifier region_id; + region_id.add(caloField); + region_id.add(ecalField); + Range prefix; + m_full_module_range = m_dict->build_multirange(region_id, prefix, "module"); + m_full_pmt_range = m_dict->build_multirange(region_id, prefix); + + // Setup the hash tables + if(init_hashes()) return (1); + + // Setup hash tables for finding neighbors + if(init_neighbors()) return (1); + + if (m_msgSvc) { + log << MSG::INFO << " EcalID::initialize_from_dict " << endmsg; + log << MSG::DEBUG + << "Module range -> " << (std::string)m_full_module_range + << endmsg; + log << MSG::DEBUG + << "Pmt range -> " << (std::string)m_full_pmt_range + << endmsg; + } + else { + std::cout << " INFO EcalID::initialize_from_dict " << std::endl; + std::cout << " DEBUG Module range -> " << (std::string)m_full_module_range + << std::endl; + std::cout << " DEBUG Pmt range -> " << (std::string)m_full_pmt_range + << std::endl; + } + + return 0; +} + +int +EcalID::init_hashes(void) +{ + + // + // create a vector(s) to retrieve the hashes for compact ids. For + // the moment, we implement a hash for modules but NOT for pmts + // + MsgStream log(m_msgSvc, "EcalID"); + // module hash + m_module_hash_max = m_full_module_range.cardinality(); + m_module_vec.resize(m_module_hash_max); + unsigned int nids = 0; + std::set<Identifier> ids; + for (unsigned int i = 0; i < m_full_module_range.size(); ++i) { + const Range& range = m_full_module_range[i]; + Range::const_identifier_factory first = range.factory_begin(); + Range::const_identifier_factory last = range.factory_end(); + for (; first != last; ++first) { + const ExpandedIdentifier& exp_id = (*first); + Identifier id = module_id(exp_id[m_ROW_INDEX], + exp_id[m_MODULE_INDEX]); + if(!(ids.insert(id)).second) { + log << MSG::ERROR << " EcalID::init_hashes " + << " Error: duplicated id for module id. nid " << nids + << " compact id " << id.getString() + << " id " << (std::string)exp_id << endmsg; + return (1); + } + nids++; + } + } + if(ids.size() != m_module_hash_max) { + log << MSG::ERROR << " EcalID::init_hashes " + << " Error: set size NOT EQUAL to hash max. size " << ids.size() + << " hash max " << m_module_hash_max + << endmsg; + return (1); + } + + nids = 0; + std::set<Identifier>::const_iterator first = ids.begin(); + std::set<Identifier>::const_iterator last = ids.end(); + for (; first != last && nids < m_module_vec.size(); ++first) { + m_module_vec[nids] = (*first); + nids++; + } + + // pmt hash - we do not keep a vec for the pmts + m_pmt_hash_max = m_full_pmt_range.cardinality(); + + return (0); +} + + // int + // EcalID::get_prev_in_z(const IdentifierHash& id, IdentifierHash& prev) const + // { + // unsigned short index = id; + // if (index < m_prev_z_module_vec.size()) + // { + // if (m_prev_z_module_vec[index] == NOT_VALID_HASH) return (1); + // prev = m_prev_z_module_vec[index]; + // return (0); + // } + // return (1); + // } + + // int + // EcalID::get_next_in_z(const IdentifierHash& id, IdentifierHash& next) const + // { + // unsigned short index = id; + // if (index < m_next_z_module_vec.size()) + // { + // if (m_next_z_module_vec[index] == NOT_VALID_HASH) return (1); + // next = m_next_z_module_vec[index]; + // return (0); + // } + // return (1); + // } + +int +EcalID::get_prev_in_phi(const IdentifierHash& id, IdentifierHash& prev) const +{ + unsigned short index = id; + if (index < m_prev_phi_module_vec.size()) { + if (m_prev_phi_module_vec[index] == NOT_VALID_HASH) return (1); + prev = m_prev_phi_module_vec[index]; + return (0); + } + return (1); +} + +int +EcalID::get_next_in_phi(const IdentifierHash& id, IdentifierHash& next) const +{ + unsigned short index = id; + if (index < m_next_phi_module_vec.size()) { + if (m_next_phi_module_vec[index] == NOT_VALID_HASH) return (1); + next = m_next_phi_module_vec[index]; + return (0); + } + return (1); +} + +int +EcalID::get_prev_in_eta(const IdentifierHash& id, IdentifierHash& prev) const +{ + unsigned short index = id; + if (index < m_prev_eta_module_vec.size()) { + if (m_prev_eta_module_vec[index] == NOT_VALID_HASH) return (1); + prev = m_prev_eta_module_vec[index]; + return (0); + } + return (1); +} + +int +EcalID::get_next_in_eta(const IdentifierHash& id, IdentifierHash& next) const +{ + unsigned short index = id; + if (index < m_next_eta_module_vec.size()) { + if (m_next_eta_module_vec[index] == NOT_VALID_HASH) return (1); + next = m_next_eta_module_vec[index]; + return (0); + } + return (1); +} + +int +EcalID::init_neighbors(void) +{ + // + // create a vector(s) to retrieve the hashes for compact ids for + // module neighbors. + // + MsgStream log(m_msgSvc, "EcalID"); + + m_prev_phi_module_vec.resize(m_module_hash_max, NOT_VALID_HASH); + m_next_phi_module_vec.resize(m_module_hash_max, NOT_VALID_HASH); + m_prev_eta_module_vec.resize(m_module_hash_max, NOT_VALID_HASH); + m_next_eta_module_vec.resize(m_module_hash_max, NOT_VALID_HASH); + + for (unsigned int i = 0; i < m_full_module_range.size(); ++i) { + const Range& range = m_full_module_range[i]; + const Range::field& phi_field = range[m_MODULE_INDEX]; + const Range::field& eta_field = range[m_ROW_INDEX]; + Range::const_identifier_factory first = range.factory_begin(); + Range::const_identifier_factory last = range.factory_end(); + for (; first != last; ++first) { + const ExpandedIdentifier& exp_id = (*first); + ExpandedIdentifier::element_type previous_phi; + ExpandedIdentifier::element_type next_phi; + ExpandedIdentifier::element_type previous_eta; + ExpandedIdentifier::element_type next_eta; + bool pphi = phi_field.get_previous(exp_id[m_MODULE_INDEX], previous_phi); + bool nphi = phi_field.get_next (exp_id[m_MODULE_INDEX], next_phi); + bool peta = eta_field.get_previous(exp_id[m_ROW_INDEX], previous_eta); + bool neta = eta_field.get_next (exp_id[m_ROW_INDEX], next_eta); + + IdContext wcontext = module_context(); + + // First get primary hash id + IdentifierHash hash_id; + Identifier id = module_id(exp_id[m_ROW_INDEX], + exp_id[m_MODULE_INDEX]); + if (get_hash(id, hash_id, &wcontext)) { + log << MSG::ERROR << " EcalID::init_neighbors - unable to get hash, exp/compact " + << show_to_string(id, &wcontext) + << " " << (std::string)m_full_module_range << endmsg; + return (1); + } + + // index for the subsequent arrays + unsigned short index = hash_id; + assert (hash_id < m_prev_phi_module_vec.size()); + assert (hash_id < m_next_phi_module_vec.size()); + assert (hash_id < m_prev_eta_module_vec.size()); + assert (hash_id < m_next_eta_module_vec.size()); + + if (pphi) { + // Get previous phi hash id + ExpandedIdentifier expId = exp_id; + expId[m_MODULE_INDEX] = previous_phi; + Identifier id = module_id(expId[m_ROW_INDEX], + expId[m_MODULE_INDEX]); + if (get_hash(id, hash_id, &wcontext)) { + log << MSG::ERROR << " EcalID::init_neighbors - unable to get previous phi hash, exp/compact " << id.getString() << " " + << endmsg; + return (1); + } + m_prev_phi_module_vec[index] = hash_id; + } + + if (nphi) { + // Get next phi hash id + ExpandedIdentifier expId = exp_id; + expId[m_MODULE_INDEX] = next_phi; + Identifier id = module_id(expId[m_ROW_INDEX], + expId[m_MODULE_INDEX]); + if (get_hash(id, hash_id, &wcontext)) { + log << MSG::ERROR << " EcalID::init_neighbors - unable to get next phi hash, exp/compact " << id.getString() << + " " << MSG::hex << id.getString() << MSG::dec << endmsg; + return (1); + } + m_next_phi_module_vec[index] = hash_id; + } + + if (peta) { + // Get previous eta hash id + ExpandedIdentifier expId = exp_id; + expId[m_ROW_INDEX] = previous_eta; + Identifier id = module_id(expId[m_ROW_INDEX], + expId[m_MODULE_INDEX]); + if (get_hash(id, hash_id, &wcontext)) { + log << MSG::ERROR << " EcalID::init_neighbors - unable to get previous eta hash, exp/compact " << id.getString() + << " " << std::endl; + return (1); + } + m_prev_eta_module_vec[index] = hash_id; + } + + if (neta) { + // Get next eta hash id + ExpandedIdentifier expId = exp_id; + expId[m_ROW_INDEX] = next_eta; + Identifier id = module_id(expId[m_ROW_INDEX], + expId[m_MODULE_INDEX]); + if (get_hash(id, hash_id, &wcontext)) { + log << MSG::ERROR << " EcalID::init_neighbors - unable to get next eta hash, exp/compact " << id.getString() + << " " << endmsg; + return (1); + } + m_next_eta_module_vec[index] = hash_id; + } + + + // std::cout << " EcalID::init_neighbors " + // << " phi, previous, next " << id[m_MODULE_INDEX] + // << " " << pphi + // << " " << previous_phi + // << " " << nphi + // << " " << next_phi + // << " eta, previous, next " << id[m_ROW_INDEX] + // << " " << peta + // << " " << previous_eta + // << " " << neta + // << " " << next_eta + // << " id " << (std::string)(*first) + // << std::endl; + } + } + return (0); +} + + + +int +EcalID::initLevelsFromDict() +{ + MsgStream log(m_msgSvc, "EcalID"); + if(!m_dict) { + log << MSG::ERROR << " EcalID::initLevelsFromDict - dictionary NOT initialized " << endmsg; + return (1); + } + + // Find out which identifier field corresponds to each level. Use + // names to find each field/leve. + + m_CALO_INDEX = 999; + m_ECAL_INDEX = 999; + m_ROW_INDEX = 999; + m_MODULE_INDEX = 999; + m_PMT_INDEX = 999; + + // Save index to a Ecal region for unpacking + ExpandedIdentifier id; + id << calo_field_value() << ecal_field_value(); + if (m_dict->find_region(id, m_ecal_region_index)) { + log << MSG::ERROR << "EcalID::initLevelsFromDict - unable to find ecal region index: id, reg " + << (std::string)id << " " << m_ecal_region_index + << endmsg; + return (1); + } + + // Find a Ecal region + IdDictField* field = m_dict->find_field("subdet"); + if (field) { + m_CALO_INDEX = field->m_index; + } + else { + log << MSG::ERROR << "EcalID::initLevelsFromDict - unable to find 'subdet' field " << endmsg; + return (1); + } + field = m_dict->find_field("part"); + if (field) { + m_ECAL_INDEX = field->m_index; + } + else { + log << MSG::ERROR << "EcalID::initLevelsFromDict - unable to find 'part' field " << endmsg; + return (1); + } + field = m_dict->find_field("row"); + if (field) { + m_ROW_INDEX = field->m_index; + } + else { + log << MSG::ERROR << "EcalID::initLevelsFromDict - unable to find 'row' field " << endmsg; + return (1); + } + field = m_dict->find_field("module"); + if (field) { + m_MODULE_INDEX = field->m_index; + } + else { + log << MSG::ERROR<< "EcalID::initLevelsFromDict - unable to find 'module' field " << endmsg; + return (1); + } + field = m_dict->find_field("pmt"); + if (field) { + m_PMT_INDEX = field->m_index; + } + else { + log << MSG::ERROR << "EcalID::initLevelsFromDict - unable to find 'pmt' field " << endmsg; + return (1); + } + + // Set the field implementations + + const IdDictRegion& region = *m_dict->m_regions[m_ecal_region_index]; + + m_calo_impl = region.m_implementation[m_CALO_INDEX]; + m_ecal_impl = region.m_implementation[m_ECAL_INDEX]; + m_row_impl = region.m_implementation[m_ROW_INDEX]; + m_module_impl = region.m_implementation[m_MODULE_INDEX]; + m_pmt_impl = region.m_implementation[m_PMT_INDEX]; + + if (m_msgSvc) { + log << MSG::DEBUG << "decode index and bit fields for each level: " << endmsg; + log << MSG::DEBUG << "calo " << m_calo_impl.show_to_string() << endmsg; + log << MSG::DEBUG << "ecal " << m_ecal_impl.show_to_string() << endmsg; + log << MSG::DEBUG << "row " << m_row_impl.show_to_string() << endmsg; + log << MSG::DEBUG << "module " << m_module_impl.show_to_string() << endmsg; + log << MSG::DEBUG << "pmt " << m_pmt_impl.show_to_string() << endmsg; + } + else { + std::cout << " DEBUG decode index and bit fields for each level: " << std::endl; + std::cout << " DEBUG calo " << m_calo_impl.show_to_string() << std::endl; + std::cout << " DEBUG ecal " << m_ecal_impl.show_to_string() << std::endl; + std::cout << " DEBUG row " << m_row_impl.show_to_string() << std::endl; + std::cout << " DEBUG module " << m_module_impl.show_to_string() << std::endl; + std::cout << " DEBUG pmt " << m_pmt_impl.show_to_string() << std::endl; + } + + std::cout << "calo " << m_calo_impl.decode_index() << " " + << (std::string)m_calo_impl.ored_field() << " " + << std::hex << m_calo_impl.mask() << " " + << m_calo_impl.zeroing_mask() << " " + << std::dec << m_calo_impl.shift() << " " + << m_calo_impl.bits() << " " + << m_calo_impl.bits_offset() + << std::endl; + std::cout << "ecal " << m_ecal_impl.decode_index() << " " + << (std::string)m_ecal_impl.ored_field() << " " + << std::hex << m_ecal_impl.mask() << " " + << m_ecal_impl.zeroing_mask() << " " + << std::dec << m_ecal_impl.shift() << " " + << m_ecal_impl.bits() << " " + << m_ecal_impl.bits_offset() + << std::endl; + std::cout << "row "<< m_row_impl.decode_index() << " " + << (std::string)m_row_impl.ored_field() << " " + << std::hex << m_row_impl.mask() << " " + << m_row_impl.zeroing_mask() << " " + << std::dec << m_row_impl.shift() << " " + << m_row_impl.bits() << " " + << m_row_impl.bits_offset() + << std::endl; + std::cout << "module " << m_module_impl.decode_index() << " " + << (std::string)m_module_impl.ored_field() << " " + << std::hex << m_module_impl.mask() << " " + << m_module_impl.zeroing_mask() << " " + << std::dec << m_module_impl.shift() << " " + << m_module_impl.bits() << " " + << m_module_impl.bits_offset() + << std::endl; + std::cout << "pmt" << m_pmt_impl.decode_index() << " " + << (std::string)m_pmt_impl.ored_field() << " " + << std::hex << m_pmt_impl.mask() << " " + << m_pmt_impl.zeroing_mask() << " " + << std::dec << m_pmt_impl.shift() << " " + << m_pmt_impl.bits() << " " + << m_pmt_impl.bits_offset() + << std::endl; + + return (0); +} + +EcalID::size_type +EcalID::module_hash_max (void) const +{ + return m_module_hash_max; +} + +EcalID::size_type +EcalID::pmt_hash_max (void) const +{ + return m_pmt_hash_max; +} + +EcalID::const_id_iterator EcalID::module_begin (void) const +{ + return (m_module_vec.begin()); +} + +EcalID::const_id_iterator EcalID::module_end (void) const +{ + return (m_module_vec.end()); +} + +EcalID::const_expanded_id_iterator EcalID::pmt_begin (void) const +{ + return (m_full_pmt_range.factory_begin()); +} + +EcalID::const_expanded_id_iterator EcalID::pmt_end (void) const +{ + return (m_full_pmt_range.factory_end()); +} + +// From hash get Identifier +int +EcalID::get_id (const IdentifierHash& hash_id, + Identifier& id, + const IdContext* context) const +{ + + int result = 1; + id.clear(); + + size_t begin = (context) ? context->begin_index(): 0; + // cannot get hash if end is 0: + size_t end = (context) ? context->end_index() : 0; + if (0 == begin) { + // No hashes yet for ids with prefixes + if (m_MODULE_INDEX == end) { + if (hash_id < (unsigned int)(m_module_vec.end() - m_module_vec.begin())) { + id = m_module_vec[hash_id]; + result = 0; + } + } + else if (m_PMT_INDEX == end) { + // Do not know how to calculate strip id from hash yet!! + std::cout << "Do not know how to calculate pmt id from hash yet!!" << std::endl; + } + } + return (result); +} + +void +EcalID::get_expanded_id (const Identifier& id, + ExpandedIdentifier& exp_id, + const IdContext* context) const +{ + exp_id.clear(); + exp_id << calo_field_value() + << ecal_field_value() + << row(id) + << module(id); + if(!context || context->end_index() == m_PMT_INDEX) + { + exp_id << pmt(id); + } +} + +int +EcalID::get_hash (const Identifier& id, + IdentifierHash& hash_id, + const IdContext* context) const +{ + + // Get the hash code from either a vec (for module) or calculate + // it (pmts). For the former, we convert to compact and call + // get_hash again. For the latter, we calculate the hash from the + // Identifier. + + int result = 1; + hash_id = 0; + size_t begin = (context) ? context->begin_index(): 0; + size_t end = (context) ? context->end_index() : 0; + if (0 == begin) { + // No hashes yet for ids with prefixes + if (m_MODULE_INDEX == end) { + hash_id = module_hash(id); + if (hash_id.is_valid()) result = 0; + } + else if (context && context->end_index() == m_PMT_INDEX) { + // Must calculate for pmt hash + ExpandedIdentifier new_id; + get_expanded_id(id, new_id); + hash_id = m_full_pmt_range.cardinalityUpTo(new_id); + result = 0; + } + } + return (result); +} + + +void +EcalID::test_module_packing (void) const +{ + MsgStream log(m_msgSvc, "EcalID"); + + if (m_dict) { + + int nids = 0; + int nerr = 0; + IdContext context = module_context(); + const_id_iterator first = m_module_vec.begin(); + const_id_iterator last = m_module_vec.end(); + for (; first != last; ++first, ++nids) { + Identifier id = (*first); + ExpandedIdentifier exp_id; + get_expanded_id(id, exp_id, &context); + Identifier new_id = module_id(exp_id[m_ROW_INDEX], + exp_id[m_MODULE_INDEX]); + if (id != new_id) { + log << MSG::ERROR << "EcalID::test_module_packing: new and old compacts not equal. New/old/expanded ids " + << MSG::hex << show_to_string(id) << " " << show_to_string(new_id) << " " << MSG::dec + << (std::string)exp_id << endmsg; + nerr++; + continue; + } + // check row id + if (!exp_id[m_MODULE_INDEX]) { + + Identifier new_id1 = row_id(exp_id[m_ROW_INDEX]); + if (id != new_id1) { + log << MSG::ERROR << "EcalID::test_module_packing: new and old row ids not equal. New/old/expanded ids " + << MSG::hex << show_to_string(id) << " " << show_to_string(new_id1) << " " << MSG::dec + << (std::string)exp_id << endmsg; + nerr++; + continue; + } + } + } + + if (m_msgSvc) { + log << MSG::DEBUG << "EcalID::test_module_packing: tested module and row ids. nids, errors " + << nids << " " << nerr << endmsg; + } + else { + std::cout << " DEBUG EcalID::test_module_packing: tested module and row ids. nids, errors " + << nids << " " << nerr << std::endl; + } + + nids = 0; + context = pmt_context(); + const_expanded_id_iterator first_ecal = pmt_begin(); + const_expanded_id_iterator last_ecal = pmt_end(); + for (; first_ecal != last_ecal; ++first_ecal, ++nids) { + // if (nids%10000 != 1) continue; + const ExpandedIdentifier& exp_id = *first_ecal; + ExpandedIdentifier new_exp_id; + + Identifier id = module_id(exp_id[m_ROW_INDEX], + exp_id[m_MODULE_INDEX]); + get_expanded_id(id, new_exp_id, &context); + if (exp_id[0] != new_exp_id[0] || + exp_id[1] != new_exp_id[1] || + exp_id[2] != new_exp_id[2] || + exp_id[3] != new_exp_id[3]) + { + log << MSG::ERROR << "EcalID::test_module_packing: new and old ids not equal. New/old/compact ids " + << (std::string)new_exp_id << " " << (std::string)exp_id + << " " << show_to_string(id) << endmsg; + continue; + } + + Identifier pmtid ; + Identifier pmtid1 ; + pmtid = pmt_id ( + exp_id[m_ROW_INDEX], + exp_id[m_MODULE_INDEX], + exp_id[m_PMT_INDEX]); + + pmtid1 = pmt_id ( + row(pmtid), + module(pmtid), + pmt(pmtid)); + + if (pmtid != pmtid1) { + log << MSG::ERROR << "EcalID::test_module_packing: new and old pmt ids not equal. New/old ids " + << " " << show_to_string(pmtid1) << " " + << show_to_string(pmtid) << endmsg; + } + } + + if (m_msgSvc) { + log << MSG::DEBUG << "EcalID::test_module_packing: Successful tested " + << nids << " ids. " + << endmsg; + } + else { + std::cout << " DEBUG EcalID::test_module_packing: Successful tested " + << nids << " ids. " + << std::endl; + } + } + else { + log << MSG::ERROR << "EcalID::test_module_packing: Unable to test module packing - no dictionary has been defined. " + << endmsg; + } +} + diff --git a/Calorimeter/CaloDetDescrCnv/CaloIdCnv/CMakeLists.txt b/Calorimeter/CaloDetDescrCnv/CaloIdCnv/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..98fcd4b11750ca28af2018e3fab6454be24bc82c --- /dev/null +++ b/Calorimeter/CaloDetDescrCnv/CaloIdCnv/CMakeLists.txt @@ -0,0 +1,15 @@ +################################################################################ +# Package: CaloIdCnv +################################################################################ + +# Declare the package name: +atlas_subdir( CaloIdCnv ) + +# Component(s) in the package: +atlas_add_component( CaloIdCnv + src/*.cxx + LINK_LIBRARIES StoreGateLib SGtests DetDescrCnvSvcLib IdDictDetDescr GaudiKernel FaserCaloIdentifier ) + +# Install files from the package: +#atlas_install_joboptions( share/*.py ) + diff --git a/Calorimeter/CaloDetDescrCnv/CaloIdCnv/src/CaloIdCnv_entries.cxx b/Calorimeter/CaloDetDescrCnv/CaloIdCnv/src/CaloIdCnv_entries.cxx new file mode 100644 index 0000000000000000000000000000000000000000..46971794e0241e93a06eb6defd6c01607f3e7c3b --- /dev/null +++ b/Calorimeter/CaloDetDescrCnv/CaloIdCnv/src/CaloIdCnv_entries.cxx @@ -0,0 +1,4 @@ + +#include "EcalIDDetDescrCnv.h" + +DECLARE_CONVERTER(EcalIDDetDescrCnv) diff --git a/Calorimeter/CaloDetDescrCnv/CaloIdCnv/src/EcalIDDetDescrCnv.cxx b/Calorimeter/CaloDetDescrCnv/CaloIdCnv/src/EcalIDDetDescrCnv.cxx new file mode 100644 index 0000000000000000000000000000000000000000..38c12125499604d284fd613fe9ec8bc06f2357d6 --- /dev/null +++ b/Calorimeter/CaloDetDescrCnv/CaloIdCnv/src/EcalIDDetDescrCnv.cxx @@ -0,0 +1,239 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/*************************************************************************** + Calo DetDescrCnv package + ----------------------------------------- + ***************************************************************************/ + +//<<<<<< INCLUDES >>>>>> + +#include "EcalIDDetDescrCnv.h" + +#include "DetDescrCnvSvc/DetDescrConverter.h" +#include "DetDescrCnvSvc/DetDescrAddress.h" +#include "GaudiKernel/MsgStream.h" +#include "StoreGate/StoreGateSvc.h" + +#include "IdDictDetDescr/IdDictManager.h" +#include "FaserCaloIdentifier/EcalID.h" + + +//<<<<<< PRIVATE DEFINES >>>>>> +//<<<<<< PRIVATE CONSTANTS >>>>>> +//<<<<<< PRIVATE TYPES >>>>>> +//<<<<<< PRIVATE VARIABLE DEFINITIONS >>>>>> +//<<<<<< PUBLIC VARIABLE DEFINITIONS >>>>>> +//<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>> +//<<<<<< PRIVATE FUNCTION DEFINITIONS >>>>>> +//<<<<<< PUBLIC FUNCTION DEFINITIONS >>>>>> +//<<<<<< MEMBER FUNCTION DEFINITIONS >>>>>> + +//-------------------------------------------------------------------- + +long int +EcalIDDetDescrCnv::repSvcType() const +{ + return (storageType()); +} + +//-------------------------------------------------------------------- + +StatusCode +EcalIDDetDescrCnv::initialize() +{ + // First call parent init + StatusCode sc = DetDescrConverter::initialize(); + MsgStream log(msgSvc(), "EcalIDDetDescrCnv"); + log << MSG::DEBUG << "in initialize" << endmsg; + + if (sc.isFailure()) { + log << MSG::ERROR << "DetDescrConverter::initialize failed" << endmsg; + return sc; + } + + // The following is an attempt to "bootstrap" the loading of a + // proxy for EcalID into the detector store. However, + // EcalIDDetDescrCnv::initialize is NOT called by the conversion + // service. So for the moment, this cannot be use. Instead the + // DetDescrCnvSvc must do the bootstrap from a parameter list. + + +// // Add Calo_DetDescrManager proxy as entry point to the detector store +// // - this is ONLY needed for the manager of each system +// sc = addToDetStore(classID(), "EcalID"); +// if (sc.isFailure()) { +// log << MSG::FATAL << "Unable to add proxy for EcalID to the Detector Store!" << endmsg; +// return StatusCode::FAILURE; +// } else {} + + return StatusCode::SUCCESS; +} + +//-------------------------------------------------------------------- + +StatusCode +EcalIDDetDescrCnv::finalize() +{ + MsgStream log(msgSvc(), "EcalIDDetDescrCnv"); + log << MSG::DEBUG << "in finalize" << endmsg; + + return StatusCode::SUCCESS; +} + +//-------------------------------------------------------------------- + +StatusCode +EcalIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj) +{ + //StatusCode sc = StatusCode::SUCCESS; + MsgStream log(msgSvc(), "EcalIDDetDescrCnv"); + log << MSG::INFO << "in createObj: creating an EcalID helper object in the detector store" << endmsg; + + // Create a new EcalID + + DetDescrAddress* ddAddr; + ddAddr = dynamic_cast<DetDescrAddress*> (pAddr); + if(!ddAddr) { + log << MSG::FATAL << "Could not cast to DetDescrAddress." << endmsg; + return StatusCode::FAILURE; + } + + // Get the StoreGate key of this container. + std::string helperKey = *( ddAddr->par() ); + if ("" == helperKey) { + log << MSG::DEBUG << "No Helper key " << endmsg; + } + else { + log << MSG::DEBUG << "Helper key is " << helperKey << endmsg; + } + + + // get DetectorStore service + StoreGateSvc * detStore; + StatusCode status = serviceLocator()->service("DetectorStore", detStore); + if (status.isFailure()) { + log << MSG::FATAL << "DetectorStore service not found !" << endmsg; + return StatusCode::FAILURE; + } else {} + + // Get the dictionary manager from the detector store + const DataHandle<IdDictManager> idDictMgr; + status = detStore->retrieve(idDictMgr, "IdDict"); + if (status.isFailure()) { + log << MSG::FATAL << "Could not get IdDictManager !" << endmsg; + return StatusCode::FAILURE; + } + else { + log << MSG::DEBUG << " Found the IdDictManager. " << endmsg; + } + + // Only create new helper if it is the first pass or if there is a + // change in the the file or tag + bool initHelper = false; + + const IdDictMgr* mgr = idDictMgr->manager(); + + // Internal Calo id tag + std::string caloIDTag = mgr->tag(); + + // DoChecks flag + bool doChecks = mgr->do_checks(); + + IdDictDictionary* dict = mgr->find_dictionary("Calorimeter"); + if (!dict) { + log << MSG::ERROR + << "unable to find idDict for Calorimeter" + << endmsg; + return StatusCode::FAILURE; + } + + // File to be read for Calo ids + std::string caloIDFileName = dict->file_name(); + + // Tag of RDB record for Calo ids + std::string caloIdDictTag = dict->dict_tag(); + + + if (m_ecalId) { + + // Ecal id helper already exists - second pass. Check for a + // change + if (caloIDTag != m_caloIDTag) { + // Internal Calo id tag + initHelper = true; + log << MSG::DEBUG << " Changed internal Calo id tag: " + << caloIDTag << endmsg; + } + if (caloIDFileName != m_caloIDFileName) { + // File to be read for Calo ids + initHelper = true; + log << MSG::DEBUG << " Changed CaloFileName:" + << caloIDFileName << endmsg; + } + if (caloIdDictTag != m_caloIdDictTag) { + // Tag of RDB record for Calo ids + initHelper = true; + log << MSG::DEBUG << " Changed CaloIdDictTag: " + << caloIdDictTag + << endmsg; + } + if (doChecks != m_doChecks) { + // DoChecks flag + initHelper = true; + log << MSG::DEBUG << " Changed doChecks flag: " + << doChecks + << endmsg; + } + } + else { + // create the helper + m_ecalId = new EcalID; + initHelper = true; + // add in message service for printout + m_ecalId->setMessageSvc(msgSvc()); + } + + if (initHelper) { + if (idDictMgr->initializeHelper(*m_ecalId)) { + log << MSG::ERROR << "Unable to initialize EcalID" << endmsg; + return StatusCode::FAILURE; + } + // Save state: + m_caloIDTag = caloIDTag; + m_caloIDFileName = caloIDFileName; + m_caloIdDictTag = caloIdDictTag; + m_doChecks = doChecks; + } + + // Pass a pointer to the container to the Persistency service by reference. + pObj = StoreGateSvc::asStorable(m_ecalId); + + return StatusCode::SUCCESS; + +} + +//-------------------------------------------------------------------- + +long +EcalIDDetDescrCnv::storageType() +{ + return DetDescr_StorageType; +} + +//-------------------------------------------------------------------- +const CLID& +EcalIDDetDescrCnv::classID() { + return ClassID_traits<EcalID>::ID(); +} + +//-------------------------------------------------------------------- +EcalIDDetDescrCnv::EcalIDDetDescrCnv(ISvcLocator* svcloc) + : + DetDescrConverter(ClassID_traits<EcalID>::ID(), svcloc), + m_ecalId(0), + m_doChecks(false) + +{} + diff --git a/Calorimeter/CaloDetDescrCnv/CaloIdCnv/src/EcalIDDetDescrCnv.h b/Calorimeter/CaloDetDescrCnv/CaloIdCnv/src/EcalIDDetDescrCnv.h new file mode 100644 index 0000000000000000000000000000000000000000..e8da48251789a9ae69fd19ec817b98e674b57c2c --- /dev/null +++ b/Calorimeter/CaloDetDescrCnv/CaloIdCnv/src/EcalIDDetDescrCnv.h @@ -0,0 +1,71 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/*************************************************************************** + Calo DetDescrCnv package + ----------------------------------------- + ***************************************************************************/ + +#ifndef CALOIDCNV_ECALIDDETDESCRCNV_H +#define CALOIDCNV_ECALIDDETDESCRCNV_H + +//<<<<<< INCLUDES >>>>>> + +#include "DetDescrCnvSvc/DetDescrConverter.h" + +//<<<<<< PUBLIC DEFINES >>>>>> +//<<<<<< PUBLIC CONSTANTS >>>>>> +//<<<<<< PUBLIC TYPES >>>>>> + +class EcalID; + +//<<<<<< PUBLIC VARIABLES >>>>>> +//<<<<<< PUBLIC FUNCTIONS >>>>>> +//<<<<<< CLASS DECLARATIONS >>>>>> + + +/** + ** This class is a converter for the EcalID an IdHelper which is + ** stored in the detector store. This class derives from + ** DetDescrConverter which is a converter of the DetDescrCnvSvc. + ** + **/ + +class EcalIDDetDescrCnv: public DetDescrConverter { + +public: + virtual long int repSvcType() const; + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj); + + // Storage type and class ID (used by CnvFactory) + static long storageType(); + static const CLID& classID(); + + EcalIDDetDescrCnv(ISvcLocator* svcloc); + +private: + /// The helper - only will create it once + EcalID* m_ecalId; + + /// File to be read for Scint ids + std::string m_caloIDFileName; + + /// Tag of RDB record for Scint ids + std::string m_caloIdDictTag; + + /// Internal Scint id tag + std::string m_caloIDTag; + + /// Whether or not + bool m_doChecks; + +}; + + +//<<<<<< INLINE PUBLIC FUNCTIONS >>>>>> +//<<<<<< INLINE MEMBER FUNCTIONS >>>>>> + +#endif // CALOIDCNV_ECALIDDETDESCRCNV_H diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/CMakeLists.txt b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..c80211c6de582ec835b545ef0cc21070d5f2dfe2 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################################################ +# Package: FaserCaloSimEventAthenaPool +################################################################################ + +# Declare the package name: +atlas_subdir( FaserCaloSimEventAthenaPool ) + +# External dependencies: +find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) + +# Component(s) in the package: +atlas_add_poolcnv_library( FaserCaloSimEventAthenaPoolPoolCnv + src/*.cxx + FILES FaserCaloSimEvent/CaloHitCollection.h + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib AthenaPoolUtilities AtlasSealCLHEP GaudiKernel FaserCaloSimEventTPCnv FaserCaloSimEvent ) + +atlas_add_dictionary( FaserCaloSimEventAthenaPoolCnvDict + FaserCaloSimEventAthenaPool/CaloSimEventAthenaPoolCnvDict.h + FaserCaloSimEventAthenaPool/selection.xml + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib AthenaPoolUtilities AtlasSealCLHEP GaudiKernel FaserCaloSimEventTPCnv FaserCaloSimEvent ) + +# Install files from the package: +atlas_install_headers( FaserCaloSimEventAthenaPool ) +#atlas_install_joboptions( share/*.py ) + diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/CaloSimDataCollection_p1.h b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/CaloSimDataCollection_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..2298acdeb1092567af4e6b0e3d194a7184f22b62 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/CaloSimDataCollection_p1.h @@ -0,0 +1,4 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/CaloSimData_p1.h b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/CaloSimData_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..2298acdeb1092567af4e6b0e3d194a7184f22b62 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/CaloSimData_p1.h @@ -0,0 +1,4 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/CaloSimEventAthenaPoolCnvDict.h b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/CaloSimEventAthenaPoolCnvDict.h new file mode 100644 index 0000000000000000000000000000000000000000..88675694ab8da27e1e2e3da6a2ccaac25313eb38 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/CaloSimEventAthenaPoolCnvDict.h @@ -0,0 +1,9 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOSIMEVENTATHENAPOOLDICT_H +#define CALOSIMEVENTATHENAPOOLDICT_H + + +#endif diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/selection.xml b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..2eff49dff6688999d781e8922c8138fc7a36b1e8 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/FaserCaloSimEventAthenaPool/selection.xml @@ -0,0 +1,2 @@ +<lcgdict> +</lcgdict> diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/src/CaloHitCollectionCnv.cxx b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/src/CaloHitCollectionCnv.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2ac860d86c8f3c42b3c5f1382f36e905bc17371c --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/src/CaloHitCollectionCnv.cxx @@ -0,0 +1,33 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHitCollectionCnv_p1.h" +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHit_p1.h" +#include "CaloHitCollectionCnv.h" + + +CaloHitCollection_PERS* CaloHitCollectionCnv::createPersistent(CaloHitCollection* transCont) { + MsgStream mlog(msgSvc(), "CaloHitCollectionConverter" ); + CaloHitCollectionCnv_PERS converter; + CaloHitCollection_PERS *persObj = converter.createPersistent( transCont, mlog ); + return persObj; +} + + +CaloHitCollection* CaloHitCollectionCnv::createTransient() { + MsgStream mlog(msgSvc(), "CaloHitCollectionConverter" ); + CaloHitCollectionCnv_p1 converter_p1; + + static const pool::Guid p1_guid("134E8045-AB99-43EF-9AD1-324C48830B64"); + // static const pool::Guid p1_guid("B2573A16-4B46-4E1E-98E3-F93421680779"); + + CaloHitCollection *trans_cont(0); + if( this->compareClassGuid(p1_guid)) { + std::unique_ptr< CaloHitCollection_p1 > col_vect( this->poolReadObject< CaloHitCollection_p1 >() ); + trans_cont = converter_p1.createTransient( col_vect.get(), mlog ); + } else { + throw std::runtime_error("Unsupported persistent version of Data container"); + } + return trans_cont; +} diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/src/CaloHitCollectionCnv.h b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/src/CaloHitCollectionCnv.h new file mode 100644 index 0000000000000000000000000000000000000000..b46894c5ffe1f96fe91451b9206269b2f8e44b53 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventAthenaPool/src/CaloHitCollectionCnv.h @@ -0,0 +1,29 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOHITCOLLECTIONCNV +#define CALOHITCOLLECTIONCNV + +#include "FaserCaloSimEvent/CaloHitCollection.h" +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHitCollection_p1.h" +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHitCollectionCnv_p1.h" +#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" +// Gaudi +#include "GaudiKernel/MsgStream.h" +// typedef to the latest persistent version +typedef CaloHitCollection_p1 CaloHitCollection_PERS; +typedef CaloHitCollectionCnv_p1 CaloHitCollectionCnv_PERS; + +class CaloHitCollectionCnv : public T_AthenaPoolCustomCnv<CaloHitCollection, CaloHitCollection_PERS > { + friend class CnvFactory<CaloHitCollectionCnv>; +public: + CaloHitCollectionCnv(ISvcLocator* svcloc) : + T_AthenaPoolCustomCnv<CaloHitCollection, CaloHitCollection_PERS >( svcloc) {} +protected: + CaloHitCollection_PERS* createPersistent(CaloHitCollection* transCont); + CaloHitCollection* createTransient (); +}; + + +#endif diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/CMakeLists.txt b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..dbbd1a372aa26fde66a58aee80ce3bf30f758812 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/CMakeLists.txt @@ -0,0 +1,26 @@ +############################################################################### +# Package: FaserCaloSimEventTPCnv +################################################################################ + +# Declare the package name: +atlas_subdir( FaserCaloSimEventTPCnv ) + +# External dependencies: +find_package( CLHEP ) +find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) + +# Component(s) in the package: +atlas_add_library( FaserCaloSimEventTPCnv + src/CaloHits/*.cxx + PUBLIC_HEADERS FaserCaloSimEventTPCnv + PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} + LINK_LIBRARIES GaudiKernel GeneratorObjectsTPCnv FaserCaloSimEvent AthenaPoolCnvSvcLib StoreGateLib SGtests + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools Identifier ) + +atlas_add_dictionary( FaserCaloSimEventTPCnvDict + FaserCaloSimEventTPCnv/CaloSimEventTPCnvDict.h + FaserCaloSimEventTPCnv/selection.xml + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaPoolCnvSvcLib GaudiKernel GeneratorObjectsTPCnv FaserCaloSimEvent TestTools StoreGateLib SGtests Identifier FaserCaloSimEventTPCnv ) + diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHitCnv_p1.h b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHitCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..75965a82fff4dc1aa9e8bab6337f60ca5c571e5a --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHitCnv_p1.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOHITCNV_P1_H +#define CALOHITCNV_P1_H + +/* +Transient/Persistent converter for CaloHit class +Author: Davide Costanzo +*/ + +#include "FaserCaloSimEvent/CaloHit.h" +#include "CaloHit_p1.h" + +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" + +class MsgStream; + + +class CaloHitCnv_p1 : public T_AthenaPoolTPCnvBase<CaloHit, CaloHit_p1> +{ +public: + + CaloHitCnv_p1() {} + + virtual void persToTrans(const CaloHit_p1* persObj, CaloHit* +transObj, MsgStream &log); + virtual void transToPers(const CaloHit* transObj, CaloHit_p1* +persObj, MsgStream &log); +}; + + +#endif diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHitCollectionCnv_p1.h b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHitCollectionCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..012a8f2279cfb827032e050b83e15783b7c19b1f --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHitCollectionCnv_p1.h @@ -0,0 +1,41 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOHITCOLLECTIONCNV_P1_H +#define CALOHITCOLLECTIONCNV_P1_H + +// CaloHitCollectionCnv_p1, T/P separation of Calo Hits +// author D.Costanzo <davide.costanzo@cern.ch> +// author O.Arnaez <olivier.arnaez@cern.ch> + +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +#include "FaserCaloSimEvent/CaloHitCollection.h" +#include "CaloHitCollection_p1.h" + + +class CaloHitCollectionCnv_p1 : public T_AthenaPoolTPCnvBase<CaloHitCollection, CaloHitCollection_p1> +{ + public: + + CaloHitCollectionCnv_p1() {}; + + virtual CaloHitCollection* createTransient(const CaloHitCollection_p1* persObj, MsgStream &log); + + virtual void persToTrans(const CaloHitCollection_p1* persCont, + CaloHitCollection* transCont, + MsgStream &log) ; + virtual void transToPers(const CaloHitCollection* transCont, + CaloHitCollection_p1* persCont, + MsgStream &log) ; + + private: + + static const double m_persEneUnit; + static const double m_persLenUnit; + static const double m_persAngUnit; + static const double m_2bHalfMaximum; + static const int m_2bMaximum; +}; + +#endif diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHitCollection_p1.h b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHitCollection_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..ad52343386ee48b4dbefe1013984a9a3f4182569 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHitCollection_p1.h @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOHITCOLLECTION_P1_H +#define CALOHITCOLLECTION_P1_H + +/* + +Authors: Davide Costanzo Rob Duxfield + +*/ + +#include <vector> +#include <string> + +class CaloHitCollection_p1 +{ + public: +/// Default constructor + CaloHitCollection_p1 (); + //private: + + std::vector<float> m_hit1_meanTime; // 1 element per string + std::vector<float> m_hit1_x0; // + std::vector<float> m_hit1_y0; // + std::vector<float> m_hit1_z0; // + std::vector<float> m_hit1_theta; // + std::vector<float> m_hit1_phi; // + std::vector<unsigned short> m_nHits; // + + std::vector<unsigned short> m_hitEne_2b; // 1 element per hit + std::vector<unsigned short> m_hitLength_2b; // + + std::vector<unsigned short> m_dTheta; // 1 element per hit except for first hit in string + std::vector<unsigned short> m_dPhi; // + + std::vector<float> m_hitEne_4b; // 1 element per hit with m_hitEne_2b[i] == 2**16 + + std::vector<float> m_hitLength_4b; // 1 element per hit with m_hitLength_2b[i] == 2**16 + + std::vector<unsigned long> m_barcode; + std::vector<unsigned short> m_mcEvtIndex; + std::vector<char> m_evtColl; + std::vector<unsigned short> m_nBC; + + std::vector<unsigned long> m_id; + std::vector<unsigned short> m_nId; +}; + + +// inlines + +inline +CaloHitCollection_p1::CaloHitCollection_p1 () {} + +#endif diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHit_p1.h b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHit_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..671421cad2c5955c55248a663a77cddc57be1fb3 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloHits/CaloHit_p1.h @@ -0,0 +1,19 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOHIT_P1_H +#define CALOHIT_P1_H + +#include "GeneratorObjectsTPCnv/HepMcParticleLink_p2.h" + +class CaloHit_p1 { + public: + float m_stX, m_stY, m_stZ; + float m_enX, m_enY, m_enZ; + float m_energyLoss; // deposited energy + float m_meanTime; // time of energy deposition + HepMcParticleLink_p2 m_partLink; + unsigned int m_ID; +}; +#endif diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloSimEventTPCnvDict.h b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloSimEventTPCnvDict.h new file mode 100644 index 0000000000000000000000000000000000000000..80937ffc825a51c8dc4611a559507fcd0e7e30b5 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/CaloSimEventTPCnvDict.h @@ -0,0 +1,20 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOEVENTTPCNV_CALOSIMEVENTTPCNVDICT_H +#define CALOEVENTTPCNV_CALOSIMEVENTTPCNVDICT_H + +//----------------------------------------------------------------------------- +// +// file: CaloSimEventTPCnvDict_p1.h +// +//----------------------------------------------------------------------------- + + +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHitCnv_p1.h" +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHitCollectionCnv_p1.h" +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHitCollection_p1.h" +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHit_p1.h" + +#endif // CALOEVENTTPCNV_CALOSIMEVENTTPCNVDICT_H diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/selection.xml b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..d73b5ce1a258bce7766b3278358530e5a99b4fbc --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/FaserCaloSimEventTPCnv/selection.xml @@ -0,0 +1,7 @@ +<lcgdict> + + <!-- CaloHits --> + <class name="CaloHit_p1" /> + <class name="std::vector<CaloHit_p1>" /> + <class name="CaloHitCollection_p1" id="134E8045-AB99-43EF-9AD1-324C48830B64" /> +</lcgdict> diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/src/CaloHits/CaloHitCnv_p1.cxx b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/src/CaloHits/CaloHitCnv_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..48b25810e4d333fad69378cbd5dfa9e863fb9808 --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/src/CaloHits/CaloHitCnv_p1.cxx @@ -0,0 +1,54 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FaserCaloSimEvent/CaloHit.h" +#include "Identifier/Identifier.h" +#include "GeneratorObjectsTPCnv/HepMcParticleLinkCnv_p2.h" + +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHit_p1.h" +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHitCnv_p1.h" + + +void +CaloHitCnv_p1::persToTrans(const CaloHit_p1* persObj, CaloHit* transObj, MsgStream &log) +{ + HepMcParticleLinkCnv_p2 HepMcPLCnv; + HepMcParticleLink link; + HepMcPLCnv.persToTrans(&(persObj->m_partLink),&link, log); + + *transObj = CaloHit (HepGeom::Point3D<double> (persObj->m_stX, + persObj->m_stY, + persObj->m_stZ), + HepGeom::Point3D<double> (persObj->m_enX, + persObj->m_enY, + persObj->m_enZ), + persObj->m_energyLoss, + persObj->m_meanTime, + link, + persObj->m_ID + ); +} + + +void +CaloHitCnv_p1::transToPers(const CaloHit* transObj, CaloHit_p1* persObj, MsgStream &log) +{ +// if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "CaloHitCnv_p1::transToPers called " << endmsg; + HepMcParticleLinkCnv_p2 HepMcPLCnv; + + HepGeom::Point3D<double> st = transObj->localStartPosition(); + persObj->m_stX = st.x(); + persObj->m_stY = st.y(); + persObj->m_stZ = st.z(); + + HepGeom::Point3D<double> en = transObj->localEndPosition(); + persObj->m_enX = en.x(); + persObj->m_enY = en.y(); + persObj->m_enZ = en.z(); + + persObj->m_energyLoss = transObj->energyLoss(); + persObj->m_meanTime = transObj->meanTime(); + persObj->m_ID = transObj->identify(); + HepMcPLCnv.transToPers(&(transObj->particleLink()),&(persObj->m_partLink), log); +} diff --git a/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/src/CaloHits/CaloHitCollectionCnv_p1.cxx b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/src/CaloHits/CaloHitCollectionCnv_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c54f8765abfcbeda9b8c72b67717608c9c8b21ef --- /dev/null +++ b/Calorimeter/CaloEventCnv/FaserCaloSimEventTPCnv/src/CaloHits/CaloHitCollectionCnv_p1.cxx @@ -0,0 +1,312 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FaserCaloSimEvent/CaloHit.h" +#include "FaserCaloSimEvent/CaloHitCollection.h" +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHitCollection_p1.h" +#include "FaserCaloSimEventTPCnv/CaloHits/CaloHitCollectionCnv_p1.h" +#include "GeneratorObjects/HepMcParticleLink.h" + +#include <cmath> + +//CLHEP +#include "CLHEP/Geometry/Point3D.h" +// Gaudi +#include "GaudiKernel/MsgStream.h" +// Athena +#include "StoreGate/StoreGateSvc.h" + +// * * * stolen from eflowRec * * * // +inline double phicorr(double a) +{ + if (a <= -M_PI) + { + return a+(2*M_PI*floor(-(a-M_PI)/(2*M_PI))); + } + else if (a > M_PI) + { + return a-(2*M_PI*floor((a+M_PI)/(2*M_PI))); + } + else + { + return a; + } +} + +// * * * stolen from eflowRec * * * // +inline double cycle(double a, double b) +{ + double del = b-a; + if (del > M_PI) + { + return a+2.0*M_PI; + } + else if (del < -M_PI) + { + return a-2.0*M_PI; + } + else + { + return a; + } +} + + +const double CaloHitCollectionCnv_p1::m_persEneUnit = 1.0e-5; +const double CaloHitCollectionCnv_p1::m_persLenUnit = 1.0e-5; +const double CaloHitCollectionCnv_p1::m_persAngUnit = 1.0e-5; +const double CaloHitCollectionCnv_p1::m_2bHalfMaximum = pow(2.0, 15.0); +const int CaloHitCollectionCnv_p1::m_2bMaximum = (unsigned short)(-1); + + +void CaloHitCollectionCnv_p1::transToPers(const CaloHitCollection* transCont, CaloHitCollection_p1* persCont, MsgStream &/*log*/) +{ + // Finds hits belonging to a "string" (in which the end point of one hit is the same as the start point of the next) and + // persistifies the end point of each hit plus the start point of the first hit in each string. + // + // Further compression is achieved by optimising the storage of the position vectors:- start (x,y,z) and (theta,phi) of + // first hit are stored as floats, (delta_theta,delta_phi) relative to the fisrst hit are stored as 2 byte numbers and + // used to specify the hit direction. All hit lengths are stored as 2 byte numbers. + // + // Additional savings are achieved by storing the energy loss for each hit as a 2 byte number and only storing the mean + // time of the first hit per string. + // + // See http://indico.cern.ch/getFile.py/access?contribId=11&resId=2&materialId=slides&confId=30893 for more info. + + static const double dRcut = 1.0e-7; + static const double dTcut = 1.0; + + const HepMcParticleLink * lastLink=nullptr; + int lastId = -1; + double stringFirstTheta = 0.0; + double stringFirstPhi = 0.0; + double lastT = 0.0; + double persSumE = 0.0; + double transSumE = 0.0; + unsigned int idx = 0; + unsigned int endBC = 0; + unsigned int endId = 0; + unsigned int endHit = 0; + HepGeom::Point3D<double> lastTransEnd(0.0, 0.0, 0.0); + HepGeom::Point3D<double> lastPersEnd(0.0, 0.0, 0.0); + + for (CaloHitCollection::const_iterator it = transCont->begin(); it != transCont->end(); ++it) { + + CaloHitCollection::const_iterator siHit = it; + + + if ( !lastLink || (siHit->particleLink() != *lastLink) ) { + + // store barcode once for set of consecutive hits with same barcode + + lastLink = &(siHit->particleLink()); + persCont->m_barcode.push_back(lastLink->barcode()); + persCont->m_mcEvtIndex.push_back(lastLink->eventIndex()); + persCont->m_evtColl.push_back(lastLink->getEventCollectionAsChar()); + + if (idx > 0) { + persCont->m_nBC.push_back(idx - endBC); + endBC = idx; + } + } + + if ( (int)siHit->identify() != lastId ) { + + // store id once for set of consecutive hits with same barcode + + lastId = siHit->identify(); + persCont->m_id.push_back(lastId); + + if (idx > 0) { + persCont->m_nId.push_back(idx - endId); + endId = idx; + } + } + + HepGeom::Point3D<double> st = siHit->localStartPosition(); + HepGeom::Point3D<double> en = siHit->localEndPosition(); + + const double dx = st.x() - lastTransEnd.x(); + const double dy = st.y() - lastTransEnd.y(); + const double dz = st.z() - lastTransEnd.z(); + const double t = siHit->meanTime(); + + const double dRLast = sqrt(dx * dx + dy * dy + dz * dz); // dR between end of previous hit and start of current one + const double dTLast = fabs(t - lastT); + + CLHEP::Hep3Vector direction(0.0, 0.0, 0.0); + double theta = 0.0; + double phi = 0.0; + bool startNewString = false; + + if (dRLast < dRcut && dTLast < dTcut) { + + // hit is part of existing string + + direction = CLHEP::Hep3Vector( en.x() - lastPersEnd.x(), en.y() - lastPersEnd.y(), en.z() - lastPersEnd.z() ); + + theta = direction.theta(); + phi = phicorr( direction.phi() ); + + const int dTheta_2b = (int)( (theta - stringFirstTheta) / m_persAngUnit + m_2bHalfMaximum + 0.5 ); + const int dPhi_2b = (int)( (cycle(phi, stringFirstPhi) - stringFirstPhi) / m_persAngUnit + m_2bHalfMaximum + 0.5 ); + + if ( dTheta_2b < m_2bMaximum && dTheta_2b >= 0 && dPhi_2b < m_2bMaximum && dPhi_2b >= 0) { + persCont->m_dTheta.push_back(dTheta_2b); + persCont->m_dPhi.push_back(dPhi_2b); + theta = stringFirstTheta + ( (double)dTheta_2b - m_2bHalfMaximum ) * m_persAngUnit; + phi = stringFirstPhi + ( (double)dPhi_2b - m_2bHalfMaximum ) * m_persAngUnit; + phi = phicorr(phi); + } + else { + startNewString = true; + } + } + + if (startNewString || dRLast >= dRcut || dTLast >= dTcut) { + + // begin new hit string + + direction = CLHEP::Hep3Vector( en.x() - st.x(), en.y() - st.y(), en.z() - st.z() ); + + theta = direction.theta(); + phi = phicorr( direction.phi() ); + + persCont->m_hit1_meanTime.push_back(t); + persCont->m_hit1_x0.push_back(st.x()); + persCont->m_hit1_y0.push_back(st.y()); + persCont->m_hit1_z0.push_back(st.z()); + persCont->m_hit1_theta.push_back(theta); + persCont->m_hit1_phi.push_back(phi); + + lastPersEnd = HepGeom::Point3D<double>(st.x(), st.y(), st.z()); + + stringFirstTheta = theta; + stringFirstPhi = phi; + + if (idx > 0) { + persCont->m_nHits.push_back(idx - endHit); + endHit = idx; + } + } + + lastTransEnd = HepGeom::Point3D<double>(en.x(), en.y(), en.z()); + transSumE += siHit->energyLoss(); + + const int eneLoss_2b = (int)((transSumE - persSumE) / m_persEneUnit + 0.5); // calculated to allow recovery sum over + // whole hit string to chosen precision + + const int hitLength_2b = (int)(direction.mag() / m_persLenUnit + 0.5); // calculated to give the correct position to + // the chosen precision, NOT the length of the + // hit (small difference in practice). + double eneLoss = 0.0; + + if (eneLoss_2b >= m_2bMaximum) { + eneLoss = siHit->energyLoss(); + persCont->m_hitEne_2b.push_back(m_2bMaximum); + persCont->m_hitEne_4b.push_back(eneLoss); + } + else { + eneLoss = eneLoss_2b * m_persEneUnit; + persCont->m_hitEne_2b.push_back(eneLoss_2b); + } + + double length = 0.0; + + if (hitLength_2b >= m_2bMaximum) { + length = direction.mag(); + persCont->m_hitLength_2b.push_back(m_2bMaximum); + persCont->m_hitLength_4b.push_back(direction.mag()); + } + else { + length = hitLength_2b * m_persLenUnit; + persCont->m_hitLength_2b.push_back(hitLength_2b); + } + + CLHEP::Hep3Vector persDir(length, 0.0, 0.0); + persDir.setTheta(theta); + persDir.setPhi(phi); + + lastPersEnd = (CLHEP::Hep3Vector)lastPersEnd + persDir; + persSumE += eneLoss; + lastT = t; + + ++idx; + } + + persCont->m_nBC.push_back(idx - endBC); + persCont->m_nId.push_back(idx - endId); + persCont->m_nHits.push_back(idx - endHit); +} + + +CaloHitCollection* CaloHitCollectionCnv_p1::createTransient(const CaloHitCollection_p1* persObj, MsgStream &log) { + std::unique_ptr<CaloHitCollection> trans(std::make_unique<CaloHitCollection>("DefaultCollectionName",persObj->m_nHits.size())); + persToTrans(persObj, trans.get(), log); + return(trans.release()); +} + + +void CaloHitCollectionCnv_p1::persToTrans(const CaloHitCollection_p1* persCont, CaloHitCollection* transCont, MsgStream &/*log*/) +{ + unsigned int hitCount = 0; + unsigned int angleCount = 0; + unsigned int idxBC = 0; + unsigned int idxId = 0; + unsigned int idxEne4b = 0; + unsigned int idxLen4b = 0; + unsigned int endHit = 0; + unsigned int endBC = 0; + unsigned int endId = 0; + + for (unsigned int i = 0; i < persCont->m_nHits.size(); i++) { + + if (persCont->m_nHits[i]) { + + const unsigned int start = endHit; + endHit += persCont->m_nHits[i]; + + const double t0 = persCont->m_hit1_meanTime[i]; + const double theta0 = persCont->m_hit1_theta[i]; + const double phi0 = persCont->m_hit1_phi[i]; + HepGeom::Point3D<double> endLast(persCont->m_hit1_x0[i], persCont->m_hit1_y0[i], persCont->m_hit1_z0[i]); + + for (unsigned int j = start; j < endHit; j++) { + + if (j >= endBC + persCont->m_nBC[idxBC]) + endBC += persCont->m_nBC[idxBC++]; + + if (j >= endId + persCont->m_nId[idxId]) + endId += persCont->m_nId[idxId++]; + + const double eneLoss_2b = persCont->m_hitEne_2b[hitCount]; + const double hitLength_2b = persCont->m_hitLength_2b[hitCount]; + + const double eneLoss = (eneLoss_2b < m_2bMaximum) ? eneLoss_2b * m_persEneUnit : persCont->m_hitEne_4b[idxEne4b++]; + const double length = (hitLength_2b < m_2bMaximum) ? hitLength_2b * m_persLenUnit : persCont->m_hitLength_4b[idxLen4b++]; + + const double dTheta = (j > start) ? ((double)persCont->m_dTheta[angleCount] - m_2bHalfMaximum) * m_persAngUnit : 0.0; + const double dPhi = (j > start) ? ((double)persCont->m_dPhi[angleCount] - m_2bHalfMaximum) * m_persAngUnit : 0.0; + + const double meanTime = t0; + const double theta = theta0 + dTheta; + const double phi = phicorr(phi0 + dPhi); + + CLHEP::Hep3Vector r(length, 0.0, 0.0); + r.setTheta(theta); + r.setPhi(phi); + + HepGeom::Point3D<double> endThis( endLast + r ); + + HepMcParticleLink partLink( persCont->m_barcode[idxBC], persCont->m_mcEvtIndex[idxBC], HepMcParticleLink::ExtendedBarCode::eventCollectionFromChar(persCont->m_evtColl[idxBC]), HepMcParticleLink::IS_INDEX ); + transCont->Emplace( endLast, endThis, eneLoss, meanTime, partLink, persCont->m_id[idxId]); + + endLast = endThis; + + ++hitCount; + if (j > start) ++angleCount; + } + } + } +} diff --git a/Calorimeter/CaloG4/EcalG4_SD/CMakeLists.txt b/Calorimeter/CaloG4/EcalG4_SD/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..487688ec1084a2d8a6c8188f0de5f052ef8ba2cd --- /dev/null +++ b/Calorimeter/CaloG4/EcalG4_SD/CMakeLists.txt @@ -0,0 +1,22 @@ +################################################################################ +# Package: EcalG4_SD +################################################################################ + +# Declare the package name: +atlas_subdir( EcalG4_SD ) + +# External dependencies: +find_package( CLHEP ) +find_package( Geant4 ) +find_package( XercesC ) + +# Component(s) in the package: +atlas_add_component( EcalG4_SD + src/*.cxx + src/components/*.cxx + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GaudiKernel FaserCaloSimEvent G4AtlasToolsLib FaserMCTruth ) + +# Install files from the package: +atlas_install_python_modules( python/*.py ) + diff --git a/Calorimeter/CaloG4/EcalG4_SD/python/EcalG4_SDToolConfig.py b/Calorimeter/CaloG4/EcalG4_SD/python/EcalG4_SDToolConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..e679d7fca9c93e9341a87c61685f6bd2d9d00b6c --- /dev/null +++ b/Calorimeter/CaloG4/EcalG4_SD/python/EcalG4_SDToolConfig.py @@ -0,0 +1,21 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + +EcalSensorSDTool=CompFactory.EcalSensorSDTool + +def EcalSensorSDCfg(ConfigFlags, name="EcalSensorSD", **kwargs): + + result = ComponentAccumulator() + bare_collection_name = "EcalHits" + # mergeable_collection_suffix = "_G4" + # merger_input_property = "PreshowerHits" + + # acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, mergeable_collection_suffix, merger_input_property, "SCINT") + # kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) + kwargs.setdefault("LogicalVolumeNames", ["Ecal::_dd_Geometry_DownstreamRegion_Ecal_Modules_OutCell"]) + kwargs.setdefault("OutputCollectionNames", [bare_collection_name]) + + # result.merge(acc) + return result, EcalSensorSDTool(name, **kwargs) diff --git a/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSD.cxx b/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSD.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2dbe767cab13b00f36d76d91660dfa36236edc52 --- /dev/null +++ b/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSD.cxx @@ -0,0 +1,133 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// +// Ecal Sensitive Detector. +// The Hits are processed here. For every hit I get the position and +// an information on the sensor in which the interaction happened +// + +// class headers +#include "EcalSensorSD.h" + +// athena includes +#include "FaserMCTruth/FaserTrackHelper.h" + +// Geant4 includes +#include "G4Step.hh" +#include "G4ThreeVector.hh" +#include "G4SDManager.hh" +#include "G4Geantino.hh" +#include "G4ChargedGeantino.hh" + +// CLHEP transform +#include "CLHEP/Geometry/Transform3D.h" + +#include <memory> // For make unique + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +EcalSensorSD::EcalSensorSD( const std::string& name, const std::string& hitCollectionName ) + : G4VSensitiveDetector( name ) + , m_HitColl( hitCollectionName ) +{ +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +void EcalSensorSD::Initialize(G4HCofThisEvent *) +{ + if (!m_HitColl.isValid()) m_HitColl = std::make_unique<CaloHitCollection>(); +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +G4bool EcalSensorSD::ProcessHits(G4Step* aStep, G4TouchableHistory* /*ROhist*/) +{ + double edep = aStep->GetTotalEnergyDeposit(); + if(edep==0.) { + if(aStep->GetTrack()->GetDefinition()!=G4Geantino::GeantinoDefinition() && + aStep->GetTrack()->GetDefinition()!=G4ChargedGeantino::ChargedGeantinoDefinition()) + return false; + } + edep *= CLHEP::MeV; + // + // Get the Touchable History: + // + const G4TouchableHistory *myTouch = dynamic_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable()); + // + // Get the hit coordinates. Start and End Point + // + G4ThreeVector coord1 = aStep->GetPreStepPoint()->GetPosition(); + G4ThreeVector coord2 = aStep->GetPostStepPoint()->GetPosition(); + // + // Calculate the local step begin and end position. + // From a G4 FAQ: + // http://geant4-hn.slac.stanford.edu:5090/HyperNews/public/get/geometry/17/1.html + // + // const G4AffineTransform transformation = myTouch->GetHistory()->GetTopTransform(); + // G4int targetDepth = (myTouch->GetVolume(0)->GetName().find("FiberPb") != std::string::npos ? 5 : 3); + //const G4AffineTransform topTransformation = myTouch->GetHistory()->GetTopTransform(); + const G4AffineTransform transformation = myTouch->GetHistory()->GetTransform(kModuleDepth); + G4ThreeVector localPosition1 = transformation.TransformPoint(coord1); + G4ThreeVector localPosition2 = transformation.TransformPoint(coord2); + // G4String vName = myTouch->GetVolume(targetDepth)->GetName(); + // if (targetDepth == 5) + // { + // std::cout << "Fiber hit at global position: " << coord1 << " in " << vName <<std::endl; + // } + // else + // { + // std::cout << "Plane hit at global position:" << coord1 << " in " << vName << std::endl; + // } + // for (G4int depth = 0; depth <= myTouch->GetHistoryDepth(); depth++) + // { + // G4ThreeVector dbgPosition = myTouch->GetHistory()->GetTransform(depth).TransformPoint(coord1); + // std::cout << "depth: " << depth << " = " << dbgPosition << " (" << myTouch->GetVolume(depth)->GetName() << ")" << std::endl; + // } + + // + // Get it into a vector in local coords and with the right units: + // + HepGeom::Point3D<double> lP1,lP2; + + // No funny business with coordinates like ATLAS... + lP1[2] = localPosition1[2]*CLHEP::mm; + lP1[1] = localPosition1[1]*CLHEP::mm; + lP1[0] = localPosition1[0]*CLHEP::mm; + + lP2[2] = localPosition2[2]*CLHEP::mm; + lP2[1] = localPosition2[1]*CLHEP::mm; + lP2[0] = localPosition2[0]*CLHEP::mm; + + // Now Navigate the history to know in what detector the step is: + // and finally set the ID of det element in which the hit is. + // + //G4int History; + // + // Get station and plate + // + int row = 0; + int module = 0; + this->indexMethod(myTouch, row, module); + // get the HepMcParticleLink from the TrackHelper + FaserTrackHelper trHelp(aStep->GetTrack()); + m_HitColl->Emplace(lP1, + lP2, + edep, + aStep->GetPreStepPoint()->GetGlobalTime(),//use the global time. i.e. the time from the beginning of the event + trHelp.GetParticleLink(), + row,module); + return true; +} + +void EcalSensorSD::indexMethod(const G4TouchableHistory *myTouch, + int &row, int &module) { + + G4int targetDepth = (myTouch->GetVolume(0)->GetName().find("FiberPb") != std::string::npos ? kFiberDepth : kModuleDepth); + module = myTouch->GetVolume(targetDepth)->GetCopyNo(); + row = myTouch->GetVolume(targetDepth+1)->GetCopyNo(); + + return; +} diff --git a/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSD.h b/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSD.h new file mode 100644 index 0000000000000000000000000000000000000000..3e4db72dec2759e8e9c7b67bdadb5fc280d0204f --- /dev/null +++ b/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSD.h @@ -0,0 +1,52 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/**************************************************************** + Ecal Sensitive Detector class +****************************************************************/ + +#ifndef ECALG4_SD_ECALSENSORSD_H +#define ECALG4_SD_ECALSENSORSD_H + +// Base class +#include "G4VSensitiveDetector.hh" + +// For the hits +#include "FaserCaloSimEvent/CaloHitCollection.h" +#include "StoreGate/WriteHandle.h" + +// G4 needed classes +class G4Step; +class G4TouchableHistory; + +class EcalSensorSD : public G4VSensitiveDetector +{ +public: + // Constructor + EcalSensorSD(const std::string& name, const std::string& hitCollectionName); + + // Destructor + ~EcalSensorSD() { /* If all goes well we do not own myHitColl here */ } + + // Deal with each G4 hit + G4bool ProcessHits(G4Step*, G4TouchableHistory*) override; + + // For setting up the hit collection + void Initialize(G4HCofThisEvent*) override final; + + /** Templated method to stuff a single hit into the sensitive detector class. This + could get rather tricky, but the idea is to allow fast simulations to use the very + same SD classes as the standard simulation. */ + template <class... Args> void AddHit(Args&&... args){ m_HitColl->Emplace( args... ); } + +private: + void indexMethod(const G4TouchableHistory *myTouch, int &station, int &plate); + static const uint32_t kModuleDepth { 3 }; + static const uint32_t kFiberDepth { 5 }; +protected: + // The hits collection + SG::WriteHandle<CaloHitCollection> m_HitColl; +}; + +#endif //ECALG4_SD_ECALSENSORSD_H diff --git a/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSDTool.cxx b/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSDTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..0a82737011ee04aa5412ba586ca536af5ece0de4 --- /dev/null +++ b/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSDTool.cxx @@ -0,0 +1,32 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// Ecal Sensitive Detector Tool. +// + +// class header +#include "EcalSensorSDTool.h" + +// package includes +#include "EcalSensorSD.h" + +// STL includes +#include <exception> + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +EcalSensorSDTool::EcalSensorSDTool(const std::string& type, const std::string& name, const IInterface* parent) + : SensitiveDetectorBase( type , name , parent ) +{ + +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +G4VSensitiveDetector* EcalSensorSDTool::makeSD() const +{ + ATH_MSG_DEBUG( "Creating Ecal SD: " << name() ); + return new EcalSensorSD(name(), m_outputCollectionNames[0]); +} + diff --git a/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSDTool.h b/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..ceb5b94581a3a04b4b708b7d21cafc45ce3548a7 --- /dev/null +++ b/Calorimeter/CaloG4/EcalG4_SD/src/EcalSensorSDTool.h @@ -0,0 +1,36 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/**************************************************************** + Ecal Sensitive Detector Tool + ****************************************************************/ + +#ifndef ECALG4_SD_ECALSENSORSDTOOL_H +#define ECALG4_SD_ECALSENSORSDTOOL_H + +// Base class +#include "G4AtlasTools/SensitiveDetectorBase.h" + +// STL headers +#include <string> + +class G4VSensitiveDetector; + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... + +class EcalSensorSDTool : public SensitiveDetectorBase +{ + public: + // Constructor + EcalSensorSDTool(const std::string& type, const std::string& name, const IInterface *parent); + + // Destructor + ~EcalSensorSDTool() { /* If all goes well we do not own myHitColl here */ } + +protected: + // Make me an SD! + G4VSensitiveDetector* makeSD() const override final; +}; + +#endif //ECALG4_SD_ECALSENSORSDTOOL_H diff --git a/Calorimeter/CaloG4/EcalG4_SD/src/components/PreshowerG4_SD_entries.cxx b/Calorimeter/CaloG4/EcalG4_SD/src/components/PreshowerG4_SD_entries.cxx new file mode 100644 index 0000000000000000000000000000000000000000..9e1b494a5a8cc9b9399f10f6ca9a7cfbab4539d3 --- /dev/null +++ b/Calorimeter/CaloG4/EcalG4_SD/src/components/PreshowerG4_SD_entries.cxx @@ -0,0 +1,3 @@ +#include "../EcalSensorSDTool.h" + +DECLARE_COMPONENT( EcalSensorSDTool ) diff --git a/Calorimeter/FaserCaloSimEvent/CMakeLists.txt b/Calorimeter/FaserCaloSimEvent/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..9777d4178e6e465f0f57de0c82173b0620fbe46a --- /dev/null +++ b/Calorimeter/FaserCaloSimEvent/CMakeLists.txt @@ -0,0 +1,28 @@ +################################################################################ +# Package: FaserCaloSimEvent +################################################################################ + +# Declare the package name: +atlas_subdir( FaserCaloSimEvent ) + +# External dependencies: +find_package( CLHEP ) +find_package( Geant4 ) +find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) + +# Component(s) in the package: +atlas_add_library( FaserCaloSimEvent + src/*.cxx + PUBLIC_HEADERS FaserCaloSimEvent + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} + PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} + DEFINITIONS ${CLHEP_DEFINITIONS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthAllocators AthenaKernel CxxUtils GeneratorObjects HitManagement StoreGateLib SGtests + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} FaserCaloIdentifier ) + +atlas_add_dictionary( FaserCaloSimEventDict + FaserCaloSimEvent/CaloSimEventDict.h + FaserCaloSimEvent/selection.xml + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthAllocators CxxUtils GeneratorObjects HitManagement StoreGateLib SGtests FaserCaloIdentifier FaserCaloSimEvent ) + diff --git a/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloHit.h b/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloHit.h new file mode 100644 index 0000000000000000000000000000000000000000..b1e955f845d8f82ea8dcff82a6bbd5883f96b4b1 --- /dev/null +++ b/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloHit.h @@ -0,0 +1,185 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// CaloHit.h +// Header file for class CaloHit +/////////////////////////////////////////////////////////////////// +// Class for Ecal hits +/////////////////////////////////////////////////////////////////// + +#ifndef CALOSIMEVENT_CALOHIT_H +#define CALOSIMEVENT_CALOHIT_H + +// Data members classes +#include "CLHEP/Geometry/Point3D.h" +#include "GeneratorObjects/HepMcParticleLink.h" + +class CaloHit { + + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// +public: + + // Constructor with parameters: + // local start position of the energy deposit + // local end position of the energy deposit + // deposited energy + // time of energy deposition + // number of track which released this energy + // + CaloHit(const HepGeom::Point3D<double> &localStartPosition, + const HepGeom::Point3D<double> &localEndPosition, + const double energyLoss, + const double meanTime, + const int trackNumber, + const unsigned int id); + + CaloHit(const HepGeom::Point3D<double> &localStartPosition, + const HepGeom::Point3D<double> &localEndPosition, + const double energyLoss, + const double meanTime, + const int trackNumber, + const int, const int); + // Constructor with parameters: + // local start position of the energy deposit + // local end position of the energy deposit + // deposited energy + // time of energy deposition + // link to particle which released this energy + // + CaloHit(const HepGeom::Point3D<double> &localStartPosition, + const HepGeom::Point3D<double> &localEndPosition, + const double energyLoss, + const double meanTime, + const HepMcParticleLink &track, + const unsigned int id); + + CaloHit(const HepGeom::Point3D<double> &localStartPosition, + const HepGeom::Point3D<double> &localEndPosition, + const double energyLoss, + const double meanTime, + const HepMcParticleLink &track, + const int, const int); + // needed by athenaRoot + CaloHit(); + + // Destructor: + virtual ~CaloHit(); + + //move assignment defaulted + CaloHit & operator = (CaloHit &&) = default; + //assignment defaulted + CaloHit & operator = (const CaloHit &) = default; + //copy c'tor defaulted + CaloHit(const CaloHit &) = default; + + /////////////////////////////////////////////////////////////////// + // Const methods: + /////////////////////////////////////////////////////////////////// + + unsigned int identify() const; + + // local start position of the energy deposit: + HepGeom::Point3D<double> localStartPosition() const; + + HepGeom::Point3D<double> localEndPosition() const; + + // deposited energy: + double energyLoss() const; + + // time of energy deposition: FIXME name! + double meanTime() const; + + // Set the time of energy deposition: FIXME name! + void setMeanTime(float meanTime); + + // number of track which released this energy: + int trackNumber() const; + + // link to the particle generating the hit + const HepMcParticleLink& particleLink() const; + + // Veto, trigger or preshower? + // bool isVeto() const; + // bool isTrigger() const; + // bool isPreshower() const; + + // Row + int getRow() const; + + // Module + int getModule() const; + + // some print-out: + void print() const; + + bool operator < (const CaloHit& rhs) const + {return m_ID < rhs.m_ID;} + + /////////////////////////////////////////////////////////////////// + // Non-const methods: + /////////////////////////////////////////////////////////////////// + // Scale the length, used to go from cm to mm, of whatever we like. + void ScaleLength(double); + + /////////////////////////////////////////////////////////////////// + // Private data: + /////////////////////////////////////////////////////////////////// +private: + + float m_stX, m_stY, m_stZ; + float m_enX, m_enY, m_enZ; + float m_energyLoss; // deposited energy + float m_meanTime; // time of energy deposition + HepMcParticleLink m_partLink; + unsigned int m_ID; +public: + // enum + // { xDep = 2, xPhi = 0, xEta = 1}; +}; + + +/////////////////////////////////////////////////////////////////// +// Inline methods: +/////////////////////////////////////////////////////////////////// + +inline unsigned int CaloHit::identify() const +{ + return m_ID; +} + +inline double CaloHit::energyLoss() const +{ + return (double) m_energyLoss; +} + +inline double CaloHit::meanTime() const +{ + return (double) m_meanTime; +} + +inline void CaloHit::setMeanTime(float meanTime) +{ + m_meanTime=meanTime; +} + +inline const HepMcParticleLink& CaloHit::particleLink() const +{ + return m_partLink; +} + + + +/////////////////////////////////////////////////////////////////// +// open functions: +/////////////////////////////////////////////////////////////////// + +inline float hitTime(const CaloHit& hit) +{ + return (float) hit.meanTime(); +} + +#endif // CALOSIMEVENT_CALOHIT_H diff --git a/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloHitCollection.h b/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloHitCollection.h new file mode 100644 index 0000000000000000000000000000000000000000..cde3ac140da1be8a1bde4e586197c0477275a82c --- /dev/null +++ b/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloHitCollection.h @@ -0,0 +1,20 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOSIMEVENT_CALOHITCOLLECTION_H +#define CALOSIMEVENT_CALOHITCOLLECTION_H + +#include "FaserCaloSimEvent/CaloHit.h" +#include "HitManagement/AtlasHitsVector.h" +#include "AthenaKernel/CLASS_DEF.h" + +typedef AtlasHitsVector<CaloHit> CaloHitCollection; +typedef AtlasHitsVector<CaloHit>::iterator CaloHitIterator; +typedef AtlasHitsVector<CaloHit>::const_iterator CaloHitConstIterator; + +#ifndef __CINT__ + CLASS_DEF(CaloHitCollection, 1255329155, 1 ) +#endif + +#endif // CALOSIMEVENT_CALOHITCOLLECTION_H diff --git a/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloHitIdHelper.h b/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloHitIdHelper.h new file mode 100644 index 0000000000000000000000000000000000000000..5500649bc0c789aa5119503ee357839ee7e11b9e --- /dev/null +++ b/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloHitIdHelper.h @@ -0,0 +1,59 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOSIMEVENT_CALOHITIDHELPER +#define CALOSIMEVENT_CALOHITIDHELPER + +// +// This is a helper class to build an identifing integer used by +// the simulation. It inherits from HitIdHelper, in order to get +// all the packing and shifting for free. +// The class is a singleton and a static GetHelper() is provided +// the constructor calls the Initialize() method which sets all the +// field dimensions +// Methods are provided to get access to the Geometry +// description +// + + +// +// Base Class +#include "HitManagement/HitIdHelper.h" + +// This class is singleton and static method and variable are used. +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; + +class CaloHitIdHelper : HitIdHelper { + public: + // + // Access to the helper + static CaloHitIdHelper* GetHelper(); + // + // Info retrieval: + // Veto or Trigger or Preshower + // bool isVeto(const int& hid) const; + // bool isTrigger(const int& hid) const; + // bool isPreshower(const int& hid) const; + + // Top or Bottom + int getRow(const int& hid) const; + + // Left or Right + int getModule(const int& hid) const; + + // + // Info packing: + int buildHitId(const int, const int) const; + + private: + // + // private constructor to have a singleton + CaloHitIdHelper(); + // + // Initialize the helper, only called by the constructor + void Initialize(); +}; + +#endif // CALOSIMEVENT_CALOHITIDHELPER diff --git a/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloSimEventDict.h b/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloSimEventDict.h new file mode 100644 index 0000000000000000000000000000000000000000..be648a689251a8804e9dffe97dadb9fcd29ec603 --- /dev/null +++ b/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/CaloSimEventDict.h @@ -0,0 +1,10 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef CALOSIMEVENT_CALOSIMEVENTDICT_H +#define CALOSIMEVENT_CALOSIMEVENTDICT_H + +#include "FaserCaloSimEvent/CaloHitCollection.h" + +#endif \ No newline at end of file diff --git a/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/selection.xml b/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..44b50b645a002609bd4cafd75c3b324afadc63fa --- /dev/null +++ b/Calorimeter/FaserCaloSimEvent/FaserCaloSimEvent/selection.xml @@ -0,0 +1,5 @@ +<lcgdict> + <class name="AtlasHitsVector<CaloHit>" /> + <class name="std::vector<CaloHit>" /> + <class name="CaloHit" /> +</lcgdict> diff --git a/Calorimeter/FaserCaloSimEvent/src/CaloHit.cxx b/Calorimeter/FaserCaloSimEvent/src/CaloHit.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c8e18d7fc737268e388bf469be037ea43655a6d3 --- /dev/null +++ b/Calorimeter/FaserCaloSimEvent/src/CaloHit.cxx @@ -0,0 +1,154 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FaserCaloSimEvent/CaloHit.h" +#include "FaserCaloSimEvent/CaloHitIdHelper.h" + +// Default consdtructor needed by athenaroot +// +CaloHit::CaloHit( ) : + m_stX(0.), + m_stY(0.), + m_stZ(0.), + m_enX(0.), + m_enY(0.), + m_enZ(0.), + m_energyLoss(0.), + m_meanTime(0.), + m_partLink(), + m_ID(0xffff) +{ + +} + +CaloHit::~CaloHit() {} + + +// Constructor +CaloHit::CaloHit(const HepGeom::Point3D<double> &localStartPosition, + const HepGeom::Point3D<double> &localEndPosition, + const double energyLoss, + const double meanTime, + const int trackNumber, + const unsigned int id) : + m_stX( (float) localStartPosition.x() ), + m_stY( (float) localStartPosition.y() ), + m_stZ( (float) localStartPosition.z() ), + m_enX( (float) localEndPosition.x() ), + m_enY( (float) localEndPosition.y() ), + m_enZ( (float) localEndPosition.z() ), + m_energyLoss(energyLoss), + m_meanTime(meanTime), + m_partLink(trackNumber), + m_ID(id) +{ +} + +// Constructor +CaloHit::CaloHit(const HepGeom::Point3D<double> &localStartPosition, + const HepGeom::Point3D<double> &localEndPosition, + const double energyLoss, + const double meanTime, + const int trackNumber, + // const int veto_trigger_preshower, + const int row, + const int module) : + m_stX( (float) localStartPosition.x() ), + m_stY( (float) localStartPosition.y() ), + m_stZ( (float) localStartPosition.z() ), + m_enX( (float) localEndPosition.x() ), + m_enY( (float) localEndPosition.y() ), + m_enZ( (float) localEndPosition.z() ), + m_energyLoss(energyLoss), + m_meanTime(meanTime), + m_partLink(trackNumber), + m_ID(0) +{ + // Compress the location info into the integer: + m_ID = CaloHitIdHelper::GetHelper()->buildHitId( row, + module); +} + +// Constructor +CaloHit::CaloHit(const HepGeom::Point3D<double> &localStartPosition, + const HepGeom::Point3D<double> &localEndPosition, + const double energyLoss, + const double meanTime, + const HepMcParticleLink &track, + const unsigned int id) : + m_stX( (float) localStartPosition.x() ), + m_stY( (float) localStartPosition.y() ), + m_stZ( (float) localStartPosition.z() ), + m_enX( (float) localEndPosition.x() ), + m_enY( (float) localEndPosition.y() ), + m_enZ( (float) localEndPosition.z() ), + m_energyLoss(energyLoss), + m_meanTime(meanTime), + m_partLink(track), + m_ID(id) +{ +} + +// Constructor +CaloHit::CaloHit(const HepGeom::Point3D<double> &localStartPosition, + const HepGeom::Point3D<double> &localEndPosition, + const double energyLoss, + const double meanTime, + const HepMcParticleLink &track, + // const int veto_trigger_preshower, + const int row, + const int module) : + m_stX( (float) localStartPosition.x() ), + m_stY( (float) localStartPosition.y() ), + m_stZ( (float) localStartPosition.z() ), + m_enX( (float) localEndPosition.x() ), + m_enY( (float) localEndPosition.y() ), + m_enZ( (float) localEndPosition.z() ), + m_energyLoss(energyLoss), + m_meanTime(meanTime), + m_partLink(track), + m_ID(0) +{ + // Compress the location info into the integer: + m_ID = CaloHitIdHelper::GetHelper()->buildHitId( row, + module); +} + +void CaloHit::ScaleLength(double sfactor) { + m_stX *= (float) sfactor; + m_stY *= (float) sfactor; + m_stZ *= (float) sfactor; + m_enX *= (float) sfactor; + m_enY *= (float) sfactor; + m_enZ *= (float) sfactor; +} + +HepGeom::Point3D<double> CaloHit::localStartPosition() const +{ + return HepGeom::Point3D<double>((double) m_stX, (double) m_stY, (double) m_stZ); +} + +HepGeom::Point3D<double> CaloHit::localEndPosition() const +{ + return HepGeom::Point3D<double>((double) m_enX, (double) m_enY, (double) m_enZ); +} + +int CaloHit::getRow() const { + return CaloHitIdHelper::GetHelper()->getRow(m_ID); +} + +int CaloHit::getModule() const { + return CaloHitIdHelper::GetHelper()->getModule(m_ID); +} + +void CaloHit::print() const { + std::cout << "*** Calorimeter Hit" << std::endl; + std::cout << " Station Number " << getRow() << std::endl; + std::cout << " Plate Number " << getModule() << std::endl; +} + +int CaloHit::trackNumber() const +{ + return m_partLink.barcode(); +} diff --git a/Calorimeter/FaserCaloSimEvent/src/CaloHitIdHelper.cxx b/Calorimeter/FaserCaloSimEvent/src/CaloHitIdHelper.cxx new file mode 100644 index 0000000000000000000000000000000000000000..128ced42480147abbcc3e95eeb4bf167e0419971 --- /dev/null +++ b/Calorimeter/FaserCaloSimEvent/src/CaloHitIdHelper.cxx @@ -0,0 +1,76 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include <mutex> + +#include "FaserCaloSimEvent/CaloHitIdHelper.h" +#include "StoreGate/StoreGateSvc.h" +#include "StoreGate/StoreGateSvc.h" +#include "FaserCaloIdentifier/EcalID.h" + +#include "G4Types.hh" +#ifdef G4MULTITHREADED +# include "GaudiKernel/ContextSpecificPtr.h" +#endif + +static std::mutex sgMutex; + +// This class is singleton and static method and variable are used. +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; + +// +// private constructor +CaloHitIdHelper::CaloHitIdHelper() :HitIdHelper() { + Initialize(); +} + +CaloHitIdHelper* CaloHitIdHelper::GetHelper() { +#ifdef G4MULTITHREADED + // Context-specific singleton + static Gaudi::Hive::ContextSpecificPtr<CaloHitIdHelper> helperPtr; + if(!helperPtr) helperPtr = new CaloHitIdHelper(); + return helperPtr.get(); +#else + static CaloHitIdHelper helper; + return &helper; +#endif +} + +void CaloHitIdHelper::Initialize() { + + // determine whether hits were created with an SLHC dictionary + // in which case eta module field is expanded. + // Need to lock this thread-unsafe retrieval + const EcalID* pix; + ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "CaloHitIdHelper"); + if (detStore.retrieve().isSuccess()) { + if (detStore->retrieve(pix, "Ecal_ID").isFailure()) { pix = 0; } + } + + InitializeField("Row", 0, 1); + InitializeField("Module", 0, 1); +} + +// Station +int CaloHitIdHelper::getRow(const int& hid) const +{ + return this->GetFieldValue("Row", hid); +} + +// Plate +int CaloHitIdHelper::getModule(const int& hid) const +{ + return this->GetFieldValue("Module", hid); +} + +// +// Info packing: +int CaloHitIdHelper::buildHitId( const int row, + const int module) const +{ + int theID(0); + this->SetFieldValue("Row", row, theID); + this->SetFieldValue("Module", module, theID); + return theID; +} diff --git a/Control/CalypsoConfiguration/python/DetectorConfigFlags.py b/Control/CalypsoConfiguration/python/DetectorConfigFlags.py index 3ee03697edd98ecad49496bc707b924890b45202..29c4e71b35bc40e4acbdeeaca90876b57102b2d1 100644 --- a/Control/CalypsoConfiguration/python/DetectorConfigFlags.py +++ b/Control/CalypsoConfiguration/python/DetectorConfigFlags.py @@ -26,7 +26,7 @@ def createDetectorConfigFlags(): dcf.addFlag('Detector.GeometryFaserSCT', False) dcf.addFlag('Detector.GeometryTracker', lambda prevFlags : prevFlags.Detector.GeometryFaserSCT ) dcf.addFlag('Detector.GeometryEcal', False) - dcf.addFlag('Detector.GeometryFaserCalo', lambda prevFlags : prevFlags.DetectorGeometry.Ecal) + dcf.addFlag('Detector.GeometryFaserCalo', lambda prevFlags : prevFlags.Detector.GeometryEcal) dcf.addFlag('Detector.GeometryFaser', lambda prevFlags : (prevFlags.Detector.GeometryDecayVolume or prevFlags.Detector.GeometryScintillator or prevFlags.Detector.GeometryTracker or @@ -56,18 +56,18 @@ def createDetectorConfigFlags(): prevFlags.Detector.SimulateFaserCalo)) #Detector.Overlay - dcf.addFlag('Detector.OverlayVeto', False) - dcf.addFlag('Detector.OverlayTrigger', False) - dcf.addFlag('Detector.OverlayPreshower', False) - dcf.addFlag('Detector.OverlayScintillator', lambda prevFlags : (prevFlags.Detector.OverlayVeto or - prevFlags.Detector.OverlayTrigger or - prevFlags.Detector.OverlayPreshower)) - dcf.addFlag('Detector.OverlayFaserSCT', False) - dcf.addFlag('Detector.OverlayTracker', lambda prevFlags : prevFlags.Detector.OverlayFaserSCT ) - dcf.addFlag('Detector.OverlayEcal', False) - dcf.addFlag('Detector.OverlayFaserCalo', lambda prevFlags : prevFlags.Detector.OverlayEcal) - dcf.addFlag('Detector.OverlayFaser', lambda prevFlags : (prevFlags.Detector.OverlayScintillator or - prevFlags.Detector.OverlayTracker or - prevFlags.Detector.OverlayFaserCalo)) + # dcf.addFlag('Detector.OverlayVeto', False) + # dcf.addFlag('Detector.OverlayTrigger', False) + # dcf.addFlag('Detector.OverlayPreshower', False) + # dcf.addFlag('Detector.OverlayScintillator', lambda prevFlags : (prevFlags.Detector.OverlayVeto or + # prevFlags.Detector.OverlayTrigger or + # prevFlags.Detector.OverlayPreshower)) + # dcf.addFlag('Detector.OverlayFaserSCT', False) + # dcf.addFlag('Detector.OverlayTracker', lambda prevFlags : prevFlags.Detector.OverlayFaserSCT ) + # dcf.addFlag('Detector.OverlayEcal', False) + # dcf.addFlag('Detector.OverlayFaserCalo', lambda prevFlags : prevFlags.Detector.OverlayEcal) + # dcf.addFlag('Detector.OverlayFaser', lambda prevFlags : (prevFlags.Detector.OverlayScintillator or + # prevFlags.Detector.OverlayTracker or + # prevFlags.Detector.OverlayFaserCalo)) return dcf diff --git a/Control/CalypsoExample/GeoModelTest/CMakeLists.txt b/Control/CalypsoExample/GeoModelTest/CMakeLists.txt index 011aae139c0475a4706c2907a3b71010476a6302..d42aea9fde56245e7b3ffd663ba39a9280352e39 100644 --- a/Control/CalypsoExample/GeoModelTest/CMakeLists.txt +++ b/Control/CalypsoExample/GeoModelTest/CMakeLists.txt @@ -6,14 +6,14 @@ atlas_subdir( GeoModelTest ) # External dependencies: -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( GeoModelTest src/GeoModelTestAlg.cxx src/components/GeoModelTest_entries.cxx - INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS} - LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaBaseComps GeoModelUtilities ScintReadoutGeometry TrackerReadoutGeometry MagFieldInterfaces MagFieldElements MagFieldConditions ) + INCLUDE_DIRS ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} AthenaBaseComps GeoModelFaserUtilities ScintReadoutGeometry TrackerReadoutGeometry MagFieldInterfaces MagFieldElements MagFieldConditions ) atlas_add_test( GeoModelCheck SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/python/GeoModelTestConfig.py diff --git a/Control/CalypsoExample/GeoModelTest/python/GeoModelTestConfig.py b/Control/CalypsoExample/GeoModelTest/python/GeoModelTestConfig.py index 20fe76c9bc84c6dc513757f9db7e815000d5880f..e8474a6d64560f7c707a5666ff2396843100fa27 100644 --- a/Control/CalypsoExample/GeoModelTest/python/GeoModelTestConfig.py +++ b/Control/CalypsoExample/GeoModelTest/python/GeoModelTestConfig.py @@ -2,7 +2,7 @@ #!/usr/bin/env python import sys -# from AthenaCommon.Constants import VERBOSE +from AthenaCommon.Constants import VERBOSE, INFO from AthenaConfiguration.ComponentFactory import CompFactory def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs): @@ -14,39 +14,16 @@ def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs): # Initialize field service from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg a.merge(MagneticFieldSvcCfg(flags)) - # fieldSvc = a.getService("FaserFieldSvc") - - # This section is to allow alignment to be written to a conditions DB file - # from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg - # result = IOVDbSvcCfg(flags) - # iovDbSvc = result.getPrimary() - # iovDbSvc.dbConnection="sqlite://;schema=ALLP200.db;dbname=OFLP200" - # a.merge(result) - - # AthenaPoolCnvSvc=CompFactory.AthenaPoolCnvSvc - # apcs=AthenaPoolCnvSvc() - # a.addService(apcs) - # EvtPersistencySvc=CompFactory.EvtPersistencySvc - # a.addService(EvtPersistencySvc("EventPersistencySvc",CnvServices=[apcs.getFullJobOptName(),])) - - # a.addService(CompFactory.IOVRegistrationSvc(PayloadTable=False,OutputLevel=VERBOSE)) # Configure the algorithm itself - # from GeoModelTest.GeoModelTestConf import GeoModelTestAlg GeoModelTestAlg = CompFactory.GeoModelTestAlg - # outputTool = CompFactory.AthenaOutputStreamTool("DbStreamTool", OutputFile = "FaserSCT_AlignDb.pool.root") - # alignDbTool = CompFactory.TrackerAlignDBTool("AlignDbTool", OutputTool = outputTool) a.addEventAlgo(GeoModelTestAlg(name, **kwargs)) - # a.getEventAlgo(name).FieldService = fieldSvc - # a.getEventAlgo(name).AlignDbTool = alignDbTool return a - if __name__ == "__main__": - # from AthenaCommon.Logging import log, logging + from AthenaCommon.Logging import log#, logging from AthenaCommon.Configurable import Configurable - # from AthenaConfiguration.ComponentFactory import CompFactory from CalypsoConfiguration.AllConfigFlags import ConfigFlags Configurable.configurableRun3Behavior = True @@ -63,21 +40,24 @@ if __name__ == "__main__": ConfigFlags.Detector.SimulateUpstreamDipole = True ConfigFlags.Detector.SimulateCentralDipole = True ConfigFlags.Detector.SimulateDownstreamDipole = True + ConfigFlags.Detector.SimulateEcal = True ConfigFlags.lock() # Configure components from CalypsoConfiguration.MainServicesConfig import MainServicesCfg acc = MainServicesCfg(ConfigFlags) -# Set things up to create a conditions DB with neutral Tracker alignment transforms +# Set up algorithm acc.merge(GeoModelTestCfg(ConfigFlags)) # Configure verbosity + msgSvc = acc.getService("MessageSvc") + msgSvc.Format = "% F%30W%S%7W%R%T %0W%M" # ConfigFlags.dump() # logging.getLogger('forcomps').setLevel(VERBOSE) - # acc.foreach_component("*").OutputLevel = VERBOSE - # acc.foreach_component("*ClassID*").OutputLevel = INFO - # log.setLevel(VERBOSE) + acc.foreach_component("*").OutputLevel = VERBOSE + acc.foreach_component("*ClassID*").OutputLevel = INFO + log.setLevel(VERBOSE) # Execute and finish sys.exit(int(acc.run(maxEvents=1).isFailure())) diff --git a/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx b/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx index a16364842eb1008678b7909aac7c2ee20a97b20e..85bcd7e50311645693e8cba809cfc41e31beb093 100644 --- a/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx +++ b/Control/CalypsoExample/GeoModelTest/src/GeoModelTestAlg.cxx @@ -1,7 +1,7 @@ #include "GeoModelTestAlg.h" #include "GeoModelKernel/GeoVDetectorManager.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "ScintReadoutGeometry/VetoDetectorManager.h" #include "ScintReadoutGeometry/TriggerDetectorManager.h" diff --git a/Control/CalypsoExample/SimHitExample/CMakeLists.txt b/Control/CalypsoExample/SimHitExample/CMakeLists.txt index 69c640d5916a82853ac556a399cb8a0074895ade..907c494c5bff07dfeb120ecc66165048fe2e693f 100644 --- a/Control/CalypsoExample/SimHitExample/CMakeLists.txt +++ b/Control/CalypsoExample/SimHitExample/CMakeLists.txt @@ -3,7 +3,7 @@ atlas_subdir( SimHitExample ) atlas_add_component( SimHitExample src/SimHitAlg.cxx src/components/SimHitExample_entries.cxx - LINK_LIBRARIES AthenaBaseComps GeneratorObjects TrackerSimEvent ScintSimEvent + LINK_LIBRARIES AthenaBaseComps GeneratorObjects TrackerSimEvent ScintSimEvent FaserCaloSimEvent ) atlas_install_joboptions( share/*.py ) \ No newline at end of file diff --git a/Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx b/Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx index b36f7a61da7f946aa783aa7a2fa6ed4ce39d7e68..86a1ecf5ac747a9a4bdc99a9cceeef8be0fdc2e1 100644 --- a/Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx +++ b/Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx @@ -25,15 +25,19 @@ StatusCode SimHitAlg::initialize() ATH_CHECK(histSvc()->regHist("/HIST/plate_trigger", m_plate_trigger)); ATH_CHECK(histSvc()->regHist("/HIST/plate_veto", m_plate_veto)); + m_ecalEnergy = new TH1D("ecalEnergy", "Ecal Energy Fraction", 100, 0.0, 0.20); + ATH_CHECK(histSvc()->regHist("/HIST/ecal_energy", m_ecalEnergy)); + // initialize data handle keys ATH_CHECK( m_mcEventKey.initialize() ); ATH_CHECK( m_faserSiHitKey.initialize() ); - //Sav things ATH_CHECK( m_preshowerHitKey.initialize() ); ATH_CHECK( m_triggerHitKey.initialize() ); ATH_CHECK( m_vetoHitKey.initialize() ); + ATH_CHECK( m_ecalHitKey.initialize() ); + ATH_MSG_INFO( "Using GenEvent collection with key " << m_mcEventKey.key()); ATH_MSG_INFO( "Using Faser SiHit collection with key " << m_faserSiHitKey.key()); @@ -41,7 +45,7 @@ StatusCode SimHitAlg::initialize() ATH_MSG_INFO( "Using ScintHit collection with key " << m_triggerHitKey.key()); ATH_MSG_INFO( "Using ScintHit collection with key " << m_vetoHitKey.key()); - + ATH_MSG_INFO( "Using CaloHit collection with key " << m_ecalHitKey.key()); return StatusCode::SUCCESS; @@ -64,6 +68,7 @@ StatusCode SimHitAlg::execute() SG::ReadHandle<ScintHitCollection> h_vetoHits(m_vetoHitKey); ATH_MSG_INFO("Read ScintHitCollectionVeto with " << h_vetoHits->size() << " hits"); + SG::ReadHandle<CaloHitCollection> h_ecalHits(m_ecalHitKey); // Since we have no pile-up, there should always be a single GenEvent in the container const HepMC::GenEvent* ev = (*h_mcEvents)[0]; @@ -74,6 +79,13 @@ StatusCode SimHitAlg::execute() } ATH_MSG_INFO("Event contains " << ev->particles_size() << " truth particles" ); + double ePrimary = 0; + if (ev->particles_size() > 0) + { + HepMC::GenEvent::particle_const_iterator p = ev->particles_begin(); + ePrimary = (*p)->momentum().e(); + } + // The hit container might be empty because particles missed the wafers //if (h_siHits->size() == 0) return StatusCode::SUCCESS; @@ -126,7 +138,15 @@ StatusCode SimHitAlg::execute() } } - + if (h_ecalHits->size() != 0) + { + double ecalTotal = 0.0; + for (const CaloHit& hit : *h_ecalHits) + { + ecalTotal += hit.energyLoss(); + } + if (ePrimary > 0) m_ecalEnergy->Fill(ecalTotal/ePrimary); + } return StatusCode::SUCCESS; } diff --git a/Control/CalypsoExample/SimHitExample/src/SimHitAlg.h b/Control/CalypsoExample/SimHitExample/src/SimHitAlg.h index 773fc3171f7821193b3d18186401939206194743..3cf0fde82218a30756bfe344a3baf8dd862aceba 100644 --- a/Control/CalypsoExample/SimHitExample/src/SimHitAlg.h +++ b/Control/CalypsoExample/SimHitExample/src/SimHitAlg.h @@ -1,11 +1,12 @@ #include "AthenaBaseComps/AthHistogramAlgorithm.h" #include "GeneratorObjects/McEventCollection.h" #include "TrackerSimEvent/FaserSiHitCollection.h" -#include "ScintSimEvent/ScintHitCollection.h" //New Sav +#include "ScintSimEvent/ScintHitCollection.h" +#include "FaserCaloSimEvent/CaloHitCollection.h" #include <TH1.h> -/* SimHit reading example - Ryan Rice-Smith, UC Irvine */ +/* SimHit reading example - Ryan Rice-Smith, Savannah Shively - UC Irvine */ class SimHitAlg : public AthHistogramAlgorithm { @@ -29,6 +30,9 @@ class SimHitAlg : public AthHistogramAlgorithm TH2* m_plate_trigger; TH2* m_plate_veto; + // Ecal histogram + TH1* m_ecalEnergy; + // Read handle keys for data containers // Any other event data can be accessed identically // Note the key names ("GEN_EVENT" or "SCT_Hits") are Gaudi properties and can be configured at run-time @@ -40,4 +44,7 @@ class SimHitAlg : public AthHistogramAlgorithm SG::ReadHandleKey<ScintHitCollection> m_preshowerHitKey { this, "ScintHitCollection", "PreshowerHits" }; SG::ReadHandleKey<ScintHitCollection> m_triggerHitKey { this, "ScintHitCollection", "TriggerHits" }; SG::ReadHandleKey<ScintHitCollection> m_vetoHitKey { this, "ScintHitCollection", "VetoHits" }; + + //EcalHits + SG::ReadHandleKey<CaloHitCollection> m_ecalHitKey { this, "CaloHitCollection", "EcalHits" }; }; \ No newline at end of file diff --git a/Control/CalypsoExample/WriteAlignment/CMakeLists.txt b/Control/CalypsoExample/WriteAlignment/CMakeLists.txt.disabled similarity index 100% rename from Control/CalypsoExample/WriteAlignment/CMakeLists.txt rename to Control/CalypsoExample/WriteAlignment/CMakeLists.txt.disabled diff --git a/Control/CalypsoExample/WriteAlignment/src/WriteAlignmentAlg.cxx b/Control/CalypsoExample/WriteAlignment/src/WriteAlignmentAlg.cxx index 3974a519986d5fa7a8bf8c29da8c126bf970efcb..ed67d81aa6d269208efc836a43196b39ab8ce360 100644 --- a/Control/CalypsoExample/WriteAlignment/src/WriteAlignmentAlg.cxx +++ b/Control/CalypsoExample/WriteAlignment/src/WriteAlignmentAlg.cxx @@ -1,7 +1,7 @@ #include "WriteAlignmentAlg.h" #include "GeoModelKernel/GeoVDetectorManager.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "ScintReadoutGeometry/VetoDetectorManager.h" #include "ScintReadoutGeometry/TriggerDetectorManager.h" diff --git a/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx b/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx index 49c8ef99ed72e6cc20e29737f863d4a3bcff4b08..4456994392b7c6d07ba43ea9ce3627ff2bfa190d 100644 --- a/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx +++ b/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx @@ -125,6 +125,8 @@ DetDescrCnvSvc::initialize() { if (status != StatusCode::SUCCESS) return status; status = addToDetStore(205618430, "FaserSCT_ID"); if (status != StatusCode::SUCCESS) return status; + status = addToDetStore(113753346, "EcalID"); + if (status != StatusCode::SUCCESS) return status; return status; } diff --git a/DetectorDescription/FaserDetDescr/src/FaserDetectorID.cxx b/DetectorDescription/FaserDetDescr/src/FaserDetectorID.cxx index 6bbaec02b606f0a19c04dca10c0016e435c8be77..21f010378e163d6c6055dac5d9cd47140d0f3c0b 100644 --- a/DetectorDescription/FaserDetDescr/src/FaserDetectorID.cxx +++ b/DetectorDescription/FaserDetDescr/src/FaserDetectorID.cxx @@ -904,7 +904,7 @@ FaserDetectorID::initLevelsFromDict(const IdDictMgr& dict_mgr) return (1); } - label = field->find_label("ECAL"); + label = field->find_label("Ecal"); if (label) { if (label->m_valued) { m_ECAL_ID = label->m_value; diff --git a/DetectorDescription/FaserReadoutGeometry/CMakeLists.txt b/DetectorDescription/FaserReadoutGeometry/CMakeLists.txt index 760e2a039b0d39c2f9b2c1f942a7cd1af4804738..17b171a27b12ede7d7eafed36d248c854c50a725 100644 --- a/DetectorDescription/FaserReadoutGeometry/CMakeLists.txt +++ b/DetectorDescription/FaserReadoutGeometry/CMakeLists.txt @@ -8,14 +8,14 @@ atlas_subdir( FaserReadoutGeometry ) # External dependencies: find_package( CLHEP ) find_package( Eigen ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( FaserReadoutGeometry src/*.cxx PUBLIC_HEADERS FaserReadoutGeometry - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel FaserDetDescr GeoModelUtilities GeoModelFaserUtilities GeoPrimitives Identifier GaudiKernel InDetCondTools TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel FaserDetDescr GeoModelFaserUtilities GeoPrimitives Identifier GaudiKernel InDetCondTools TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions PRIVATE_LINK_LIBRARIES AthenaPoolUtilities IdDictDetDescr ) diff --git a/DetectorDescription/GeoModel/GeoAdaptors/CMakeLists.txt b/DetectorDescription/GeoModel/FaserGeoAdaptors/CMakeLists.txt similarity index 58% rename from DetectorDescription/GeoModel/GeoAdaptors/CMakeLists.txt rename to DetectorDescription/GeoModel/FaserGeoAdaptors/CMakeLists.txt index 44e5741478668b92717ca3920e5d86a5b83f0f2e..5a09b1fef5249ed46824f8095776b45aca1eac42 100644 --- a/DetectorDescription/GeoModel/GeoAdaptors/CMakeLists.txt +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/CMakeLists.txt @@ -1,18 +1,18 @@ ################################################################################ -# Package: GeoAdaptors +# Package: FaserGeoAdaptors ################################################################################ # Declare the package name: -atlas_subdir( GeoAdaptors ) +atlas_subdir( FaserGeoAdaptors ) # External dependencies: find_package( CLHEP ) # Component(s) in the package: -atlas_add_library( GeoAdaptors +atlas_add_library( FaserGeoAdaptors src/*.cxx - PUBLIC_HEADERS GeoAdaptors + PUBLIC_HEADERS FaserGeoAdaptors INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} Identifier ScintIdentifier ScintReadoutGeometry ScintSimEvent TrackerIdentifier TrackerReadoutGeometry TrackerSimEvent StoreGateLib SGtests ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} Identifier FaserCaloIdentifier CaloReadoutGeometry FaserCaloSimEvent ScintIdentifier ScintReadoutGeometry ScintSimEvent TrackerIdentifier TrackerReadoutGeometry TrackerSimEvent StoreGateLib SGtests ) diff --git a/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserCaloHit.h b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserCaloHit.h new file mode 100644 index 0000000000000000000000000000000000000000..3f8ce2b5c83d895b726e162b8d4015ef2afbf9c6 --- /dev/null +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserCaloHit.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GEOADAPTORS_GEOFASERCALOHIT_h +#define GEOADAPTORS_GEOFASERCALOHIT_h +//----------------------------------------------------------// +// // +// An adaptor for CaloHits. // +// // +// Joe Boudreau Feb 04. // +// // +// This adaptor class allows ScintHits to behave // +// as if they knew which detector they were in. // +// // +// // +//----------------------------------------------------------// +#include "CLHEP/Geometry/Point3D.h" +class CaloHit; +class EcalID; +namespace CaloDD { + class EcalDetectorManager; +} + +class GeoFaserCaloHit { + + public: + + // Constructor: + GeoFaserCaloHit(const CaloHit & h); + + // Get the absolute global position: + HepGeom::Point3D<double> getGlobalPosition() const; + + // Underlying hit. + const CaloHit &data() const { return *m_hit;} + + // Is this hit ok? + + operator bool () const { return s_ecal; } + + private: + + static void init(); + + const CaloHit *m_hit; + static const CaloDD::EcalDetectorManager *s_ecal; + static const EcalID *s_eID; +}; + +#include "FaserGeoAdaptors/GeoFaserCaloHit.icc" + +#endif diff --git a/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserCaloHit.icc b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserCaloHit.icc new file mode 100644 index 0000000000000000000000000000000000000000..0f55037585191796147662878ce279145a1522ed --- /dev/null +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserCaloHit.icc @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FaserCaloSimEvent/CaloHit.h" +#include "CaloReadoutGeometry/CaloDetectorElement.h" +#include "CaloReadoutGeometry/EcalDetectorManager.h" +#include "StoreGate/StoreGateSvc.h" +#include "StoreGate/StoreGateSvc.h" +#include "FaserCaloIdentifier/EcalID.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + +inline void GeoFaserCaloHit::init() { + + ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoFaserCaloHit"); + if (detStore.retrieve().isSuccess()) { + if(detStore->retrieve(s_ecal,"Ecal").isFailure()) + s_ecal = 0; + if(detStore->retrieve(s_eID,"EcalID").isFailure()) + s_eID = 0; + } +} + +inline GeoFaserCaloHit::GeoFaserCaloHit (const CaloHit & h) { + m_hit = &h; + if (!s_ecal) init(); +} + +inline HepGeom::Point3D<double> GeoFaserCaloHit::getGlobalPosition() const { + + int row = m_hit->getRow(); + Identifier id; + const CaloDD::CaloDetectorElement *geoelement=NULL; + id = s_eID->module_id(row, m_hit->getModule()); + geoelement = s_ecal->getDetectorElement(id); + + if (geoelement) { + + const HepGeom::Point3D<double> globalStartPos = Amg::EigenTransformToCLHEP(geoelement->transformHit()) * HepGeom::Point3D<double>(m_hit->localStartPosition()); + + double x=globalStartPos.x(); + double y=globalStartPos.y(); + double z=globalStartPos.z(); + return HepGeom::Point3D<double>(x,y,z); + } + + return HepGeom::Point3D<double>(0.0,0.0,0.0); +} diff --git a/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoFaserSiHit.h b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserSiHit.h similarity index 97% rename from DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoFaserSiHit.h rename to DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserSiHit.h index c68a59b509df4265c2404324d1d1c2c1219938c2..d373d33ac32acaed37e8e19db4be8b97e8567cd0 100644 --- a/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoFaserSiHit.h +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserSiHit.h @@ -48,6 +48,6 @@ class GeoFaserSiHit { static const FaserSCT_ID *s_sID; }; -#include "GeoAdaptors/GeoFaserSiHit.icc" +#include "FaserGeoAdaptors/GeoFaserSiHit.icc" #endif diff --git a/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoFaserSiHit.icc b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserSiHit.icc similarity index 85% rename from DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoFaserSiHit.icc rename to DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserSiHit.icc index 43fe515b25c226c6caefe9389aa4476bc5907bf5..37ad70941b8a41779bd4a555ca5ad1c46b0d19c5 100644 --- a/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoFaserSiHit.icc +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoFaserSiHit.icc @@ -6,16 +6,19 @@ #include "TrackerReadoutGeometry/SiDetectorElement.h" #include "TrackerReadoutGeometry/SCT_DetectorManager.h" #include "StoreGate/StoreGateSvc.h" +#include "StoreGate/StoreGateSvc.h" #include "TrackerIdentifier/FaserSCT_ID.h" #include "GeoPrimitives/CLHEPtoEigenConverter.h" inline void GeoFaserSiHit::init() { ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoFaserSiHit"); - if(detStore->retrieve(s_sct,"SCT").isFailure()) - s_sct = 0; - if(detStore->retrieve(s_sID,"FaserSCT_ID").isFailure()) - s_sID = 0; + if (detStore.retrieve().isSuccess()) { + if(detStore->retrieve(s_sct,"SCT").isFailure()) + s_sct = 0; + if(detStore->retrieve(s_sID,"FaserSCT_ID").isFailure()) + s_sID = 0; + } } inline GeoFaserSiHit::GeoFaserSiHit (const FaserSiHit & h) { diff --git a/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoScintHit.h b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.h similarity index 97% rename from DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoScintHit.h rename to DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.h index f9d6068e38256ee952631bda594f75225385a935..b64fe128eac2531f3a4c44b98dbb2e19f2f9d301 100644 --- a/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoScintHit.h +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.h @@ -56,6 +56,6 @@ class GeoScintHit { static const PreshowerID *s_pID; }; -#include "GeoAdaptors/GeoScintHit.icc" +#include "FaserGeoAdaptors/GeoScintHit.icc" #endif diff --git a/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoScintHit.icc b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.icc similarity index 76% rename from DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoScintHit.icc rename to DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.icc index 464c6b0fc88ff80db0c9ba7496485477d61e9a93..47610f91a19cded0a84bb7e6c3c955d3bf4faaa9 100644 --- a/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoScintHit.icc +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/FaserGeoAdaptors/GeoScintHit.icc @@ -8,6 +8,7 @@ #include "ScintReadoutGeometry/TriggerDetectorManager.h" #include "ScintReadoutGeometry/PreshowerDetectorManager.h" #include "StoreGate/StoreGateSvc.h" +#include "StoreGate/StoreGateSvc.h" #include "ScintIdentifier/VetoID.h" #include "ScintIdentifier/TriggerID.h" #include "ScintIdentifier/PreshowerID.h" @@ -16,18 +17,20 @@ inline void GeoScintHit::init() { ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoScintHit"); - if(detStore->retrieve(s_veto,"Veto").isFailure()) - s_veto = 0; - if(detStore->retrieve(s_trigger,"Trigger").isFailure()) - s_trigger = 0; - if(detStore->retrieve(s_preshower,"Preshower").isFailure()) - s_preshower = 0; - if(detStore->retrieve(s_vID,"VetoID").isFailure()) - s_vID = 0; - if(detStore->retrieve(s_tID,"TriggerID").isFailure()) - s_tID = 0; - if(detStore->retrieve(s_pID,"PreshowerID").isFailure()) - s_pID = 0; + if (detStore.retrieve().isSuccess()) { + if(detStore->retrieve(s_veto,"Veto").isFailure()) + s_veto = 0; + if(detStore->retrieve(s_trigger,"Trigger").isFailure()) + s_trigger = 0; + if(detStore->retrieve(s_preshower,"Preshower").isFailure()) + s_preshower = 0; + if(detStore->retrieve(s_vID,"VetoID").isFailure()) + s_vID = 0; + if(detStore->retrieve(s_tID,"TriggerID").isFailure()) + s_tID = 0; + if(detStore->retrieve(s_pID,"PreshowerID").isFailure()) + s_pID = 0; + } } inline GeoScintHit::GeoScintHit (const ScintHit & h) { diff --git a/DetectorDescription/GeoModel/GeoAdaptors/src/statics.cxx b/DetectorDescription/GeoModel/FaserGeoAdaptors/src/statics.cxx similarity index 69% rename from DetectorDescription/GeoModel/GeoAdaptors/src/statics.cxx rename to DetectorDescription/GeoModel/FaserGeoAdaptors/src/statics.cxx index 675d7726b063a36d0cbf3cd0cc1a60d8be8f0a07..7c72a5103ec9b078504b041df625e5fc5b2257c4 100644 --- a/DetectorDescription/GeoModel/GeoAdaptors/src/statics.cxx +++ b/DetectorDescription/GeoModel/FaserGeoAdaptors/src/statics.cxx @@ -2,15 +2,18 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GeoAdaptors/GeoScintHit.h" -#include "GeoAdaptors/GeoFaserSiHit.h" +#include "FaserGeoAdaptors/GeoScintHit.h" +#include "FaserGeoAdaptors/GeoFaserSiHit.h" +#include "FaserGeoAdaptors/GeoFaserCaloHit.h" const ScintDD::VetoDetectorManager *GeoScintHit::s_veto = 0; const ScintDD::TriggerDetectorManager *GeoScintHit::s_trigger = 0; const ScintDD::PreshowerDetectorManager *GeoScintHit::s_preshower = 0; const TrackerDD::SCT_DetectorManager *GeoFaserSiHit::s_sct; +const CaloDD::EcalDetectorManager *GeoFaserCaloHit::s_ecal = 0; const VetoID *GeoScintHit::s_vID = 0; const TriggerID *GeoScintHit::s_tID = 0; const PreshowerID *GeoScintHit::s_pID = 0; const FaserSCT_ID *GeoFaserSiHit::s_sID = 0; +const EcalID *GeoFaserCaloHit::s_eID = 0; diff --git a/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql b/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql index b31886dcd38905aa729fd2a706316c73970e3d49..169464145119b397ee3c56a336f4356d4584137d 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql +++ b/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql @@ -236,7 +236,7 @@ CREATE TABLE IF NOT EXISTS "TRIGGERPLATEGENERAL_DATA2TAG" ( "TRIGGERPLATEGENERAL_DATA_ID" SLONGLONG ); -- --- Tables for describing Veto scintillator plates (and passive radiators) +-- Tables for describing Preshower scintillator plates (and passive radiators) -- DROP TABLE IF EXISTS "PRESHOWERTOPLEVEL_DATA"; CREATE TABLE IF NOT EXISTS "PRESHOWERTOPLEVEL_DATA" ( @@ -288,6 +288,49 @@ CREATE TABLE IF NOT EXISTS "PRESHOWERPLATEGENERAL_DATA2TAG" ( "PRESHOWERPLATEGENERAL_TAG_ID" SLONGLONG, "PRESHOWERPLATEGENERAL_DATA_ID" SLONGLONG ); +-- +-- Ecal top level tables +-- +DROP TABLE IF EXISTS "ECALTOPLEVEL_DATA"; +CREATE TABLE IF NOT EXISTS "ECALTOPLEVEL_DATA" ( + "ECALTOPLEVEL_DATA_ID" SLONGLONG UNIQUE, + "POSX" DOUBLE, + "POSY" DOUBLE, + "POSZ" DOUBLE, + "ROTX" DOUBLE, + "ROTY" DOUBLE, + "ROTZ" DOUBLE, + "ROTORDER" INT, + "LABEL" TEXT +); +-- +-- The DATA2TAG tables associate specific rows of the corresponding +-- _DATA table with the referenced tag (from the HVS_TAG2NODE table). +-- This is a many-to-many relationship: each row may belong to +-- several tags, and each tag may apply to several rows. +DROP TABLE IF EXISTS "ECALTOPLEVEL_DATA2TAG"; +CREATE TABLE IF NOT EXISTS "ECALTOPLEVEL_DATA2TAG" ( + "ECALTOPLEVEL_TAG_ID" SLONGLONG, + "ECALTOPLEVEL_DATA_ID" SLONGLONG +); +-- +-- +-- Ecal row general tables +-- +DROP TABLE IF EXISTS "ECALROWGENERAL_DATA"; +CREATE TABLE IF NOT EXISTS "ECALROWGENERAL_DATA" ( + "ECALROWGENERAL_DATA_ID" SLONGLONG UNIQUE, + "NUMMODULES" INT, + "XGAP" DOUBLE, + "YAWANGLE" DOUBLE +); +-- +DROP TABLE IF EXISTS "ECALROWGENERAL_DATA2TAG"; +CREATE TABLE IF NOT EXISTS "ECALROWGENERAL_DATA2TAG" ( + "ECALROWGENERAL_TAG_ID" SLONGLONG, + "ECALROWGENERAL_DATA_ID" SLONGLONG +); +-- -- Tables for scintillator materials. -- Materials are recorded in two related nodes. -- One stores the name and density of the material. @@ -469,6 +512,23 @@ CREATE TABLE IF NOT EXISTS "PRESHOWERSWITCHES_DATA2TAG" ( "PRESHOWERSWITCHES_DATA_ID" SLONGLONG ); -- +DROP TABLE IF EXISTS "ECALSWITCHES_DATA"; +CREATE TABLE IF NOT EXISTS "ECALSWITCHES_DATA" ( + "ECALSWITCHES_DATA_ID" SLONGLONG UNIQUE, + "DETECTORNAME" TEXT , + "USEMAGFIELDSVC" INT , + "COSMICLAYOUT" INT , + "VERSIONNAME" TEXT , + "LAYOUT" TEXT , + "DESCRIPTION" TEXT, + "GDMLFILE" TEXT +); +DROP TABLE IF EXISTS "ECALSWITCHES_DATA2TAG"; +CREATE TABLE IF NOT EXISTS "ECALSWITCHES_DATA2TAG" ( + "ECALSWITCHES_TAG_ID" SLONGLONG, + "ECALSWITCHES_DATA_ID" SLONGLONG +); +-- DROP TABLE IF EXISTS "NEUTRINOIDENTIFIER_DATA"; CREATE TABLE IF NOT EXISTS "NEUTRINOIDENTIFIER_DATA" ( "NEUTRINOIDENTIFIER_DATA_ID" SLONGLONG UNIQUE, @@ -577,6 +637,10 @@ INSERT INTO "HVS_NODE" VALUES (320, "DipoleTopLevel", 32, 0, NULL); INSERT INTO "HVS_NODE" VALUES (321, "DipoleGeneral", 32, 0, NULL); INSERT INTO "HVS_NODE" VALUES (324, "DipoleSwitches", 32, 0, NULL); INSERT INTO "HVS_NODE" VALUES (4, "Calorimeter", 0, 1, NULL); +INSERT INTO "HVS_NODE" VALUES (41, "Ecal", 4, 1, NULL); +INSERT INTO "HVS_NODE" VALUES (410, "EcalTopLevel", 41, 0, NULL); +INSERT INTO "HVS_NODE" VALUES (411, "EcalRowGeneral", 41, 0, NULL); +INSERT INTO "HVS_NODE" VALUES (414, "EcalSwitches", 41, 0, NULL); INSERT INTO "HVS_NODE" VALUES (4003, "CaloMaterials", 4, 0, NULL); INSERT INTO "HVS_NODE" VALUES (4004, "CaloMatComponents", 4, 0, NULL); INSERT INTO "HVS_NODE" VALUES (4005, "CaloIdentifier", 4, 0, NULL); @@ -625,6 +689,10 @@ INSERT INTO "HVS_TAG2NODE" VALUES (320, "DipoleTopLevel-01", 100040, NULL, 0, 0, INSERT INTO "HVS_TAG2NODE" VALUES (321, "DipoleGeneral-00", 100004, NULL, 0, 0, 1568678400000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (324, "DipoleSwitches-00", 100028, NULL, 0, 0, 1568678400000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (4, "Calorimeter-00", 100003, NULL, 0, 0, 1549238400000000000, NULL, 22); +INSERT INTO "HVS_TAG2NODE" VALUES (41, "Ecal-00", 100056, NULL, 0, 0, 1593907200000000000, NULL, 22); +INSERT INTO "HVS_TAG2NODE" VALUES (410, "EcalTopLevel-00", 100058, NULL, 0, 0, 1599350400000000000, NULL, 22); +INSERT INTO "HVS_TAG2NODE" VALUES (411, "EcalRowGeneral-00", 100059, NULL, 0, 0, 1599350400000000000, NULL, 22); +INSERT INTO "HVS_TAG2NODE" VALUES (414, "EcalSwitches-00", 100057, NULL, 0, 0, 1593907200000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (210, "VetoTopLevel-00", 100009, NULL, 0, 0, 1567123200000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (210, "VetoTopLevel-01", 100046, NULL, 0, 0, 1590796800000000000, NULL, 22); INSERT INTO "HVS_TAG2NODE" VALUES (211, "VetoStationGeneral-00", 100010, NULL, 0, 0, 1567123200000000000, NULL, 22); @@ -666,13 +734,16 @@ INSERT INTO "HVS_TAG2NODE" VALUES (4005, "CaloIdentifier-00", 100018, NULL, 0, 0 -- Data for the HVS_LTAG2LTAG table INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100000, 2, 100001); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100039, 2, 100042); +INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107784, 2, 100042); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100000, 3, 100002); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100039, 3, 100038); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107784, 3, 107783); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100000, 4, 100003); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100039, 4, 100003); +INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107784, 4, 100003); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100000, 9000, 100005); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100039, 9000, 100005); +INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 107784, 9000, 100005); INSERT INTO "HVS_LTAG2LTAG" VALUES (9000, 100005, 9001, 100006); INSERT INTO "HVS_LTAG2LTAG" VALUES (9000, 100005, 9002, 100007); INSERT INTO "HVS_LTAG2LTAG" VALUES (9000, 100005, 9003, 100008); @@ -741,6 +812,10 @@ INSERT INTO "HVS_LTAG2LTAG" VALUES (32, 100027, 324, 100028); INSERT INTO "HVS_LTAG2LTAG" VALUES (32, 100041, 320, 100040); INSERT INTO "HVS_LTAG2LTAG" VALUES (32, 100041, 321, 100004); INSERT INTO "HVS_LTAG2LTAG" VALUES (32, 100041, 324, 100028); +INSERT INTO "HVS_LTAG2LTAG" VALUES (4, 100003, 41, 100056); +INSERT INTO "HVS_LTAG2LTAG" VALUES (41, 100056, 410, 100058); +INSERT INTO "HVS_LTAG2LTAG" VALUES (41, 100056, 411, 100059); +INSERT INTO "HVS_LTAG2LTAG" VALUES (41, 100056, 414, 100057); INSERT INTO "HVS_LTAG2LTAG" VALUES (4, 100003, 4003, 100023); INSERT INTO "HVS_LTAG2LTAG" VALUES (4, 100003, 4004, 100024); INSERT INTO "HVS_LTAG2LTAG" VALUES (0, 100000, 90, 100013); @@ -794,6 +869,10 @@ INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "DipoleTopLevel", "DipoleTopL INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "DipoleGeneral", "DipoleGeneral-00", 100004); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "DipoleSwitches", "DipoleSwitches-00", 100028); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "Calorimeter", "Calorimeter-00", 100003); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "Ecal", "Ecal-00", 100056); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "EcalTopLevel", "EcalTopLevel-00", 100058); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "EcalRowGeneral", "EcalRowGeneral-00", 100059); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "EcalSwitches", "EcalSwitches-00", 100057); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "VetoTopLevel", "VetoTopLevel-00", 100009); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "VetoStationGeneral", "VetoStationGeneral-00", 100010); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-00", "VetoPlateGeneral", "VetoPlateGeneral-00", 100025); @@ -850,6 +929,10 @@ INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "DipoleTopLevel", "DipoleTopL INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "DipoleGeneral", "DipoleGeneral-00", 100004); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "DipoleSwitches", "DipoleSwitches-00", 100028); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "Calorimeter", "Calorimeter-00", 100003); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "Ecal", "Ecal-00", 100056); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "EcalTopLevel", "EcalTopLevel-00", 100058); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "EcalRowGeneral", "EcalRowGeneral-00", 100059); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "EcalSwitches", "EcalSwitches-00", 100057); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "VetoTopLevel", "VetoTopLevel-01", 100046); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "VetoStationGeneral", "VetoStationGeneral-01", 100049); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "VetoPlateGeneral", "VetoPlateGeneral-01", 100050); @@ -906,6 +989,10 @@ INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "DipoleTopLevel", "DipoleTopL INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "DipoleGeneral", "DipoleGeneral-00", 100004); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "DipoleSwitches", "DipoleSwitches-00", 100028); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "Calorimeter", "Calorimeter-00", 100003); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "Ecal", "Ecal-00", 100056); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "EcalTopLevel", "EcalTopLevel-00", 100058); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "EcalRowGeneral", "EcalRowGeneral-00", 100059); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "EcalSwitches", "EcalSwitches-00", 100057); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "VetoTopLevel", "VetoTopLevel-01", 100046); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "VetoStationGeneral", "VetoStationGeneral-01", 100049); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "VetoPlateGeneral", "VetoPlateGeneral-01", 100050); @@ -1536,6 +1623,18 @@ INSERT INTO "PRESHOWERPLATEGENERAL_DATA" VALUES (0, 1, 300.0, 300.0, 20.0, "scin INSERT INTO "PRESHOWERPLATEGENERAL_DATA2TAG" VALUES (120025, 0); -- -- +INSERT INTO "ECALTOPLEVEL_DATA" VALUES (0, 0.0, 0.0, 3099.2, 0.0, 0.0, 0.0, 321, "Ecal"); +INSERT INTO "ECALTOPLEVEL_DATA" VALUES (1, 0.0, -71.6, 0.0, 0.0, 2.8, 0.0, 321, "BottomRow"); +INSERT INTO "ECALTOPLEVEL_DATA" VALUES (2, 0.0, 49.6, 0.0, 0.0, 2.8, 0.0, 321, "TopRow"); +INSERT INTO "ECALTOPLEVEL_DATA2TAG" VALUES (100058, 0); +INSERT INTO "ECALTOPLEVEL_DATA2TAG" VALUES (100058, 1); +INSERT INTO "ECALTOPLEVEL_DATA2TAG" VALUES (100058, 2); +-- +-- +INSERT INTO "ECALROWGENERAL_DATA" VALUES (0, 2, 0.0, 2.8); +INSERT INTO "ECALROWGENERAL_DATA2TAG" VALUES (100059, 0); +-- +-- INSERT INTO "SCINTMATERIALS_DATA" VALUES (0, "Scintillator", 1.032); INSERT INTO "SCINTMATERIALS_DATA2TAG" VALUES (100011, 0); -- @@ -1562,6 +1661,10 @@ INSERT INTO "PRESHOWERSWITCHES_DATA" VALUES (0, "Preshower", 1, 0, "GEO", "Deve INSERT INTO "PRESHOWERSWITCHES_DATA2TAG" VALUES (120014, 0); -- -- +INSERT INTO "ECALSWITCHES_DATA" VALUES ( 0, "Ecal", 1, 0, "GEO", "Development", "Baseline geometry", "EcalGeoModel/Ecal.gdml"); +INSERT INTO "ECALSWITCHES_DATA2TAG" VALUES (100057, 0); +-- +-- INSERT INTO "NEUTRINOIDENTIFIER_DATA" VALUES (0, "Neutrino", "NeutrinoIdDictFiles/IdDictNeutrino.xml", "Baseline layout"); INSERT INTO "NEUTRINOIDENTIFIER_DATA2TAG" VALUES (100030, 0); -- diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/CaloGMConfig.py b/DetectorDescription/GeoModel/FaserGeoModel/python/CaloGMConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..32889ca65d1e8a3cd05b894ef6aa5d52fbca89fb --- /dev/null +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/CaloGMConfig.py @@ -0,0 +1,49 @@ +# +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + +def CaloGeometryCfg (flags): + acc = ComponentAccumulator() + from EcalGeoModel.EcalGeoModelConfig import EcalGeometryCfg + acc.merge(EcalGeometryCfg( flags )) + + return acc + + +if __name__ == "__main__": + # import os + from AthenaCommon.Logging import log + from AthenaCommon.Constants import DEBUG + from AthenaCommon.Configurable import Configurable + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.MainServicesConfig import MainServicesCfg + from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg + # Set up logging and new style config + log.setLevel(DEBUG) + Configurable.configurableRun3Behavior = True + ConfigFlags.addFlag("GeoModel.FaserVersion", "Faser-01") + + # from AthenaConfiguration.TestDefaults import defaultTestFiles + # Provide MC input + # ConfigFlags.Input.Files = defaultTestFiles.HITS + ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" + ConfigFlags.Detector.SimulateEcal = True + ConfigFlags.GeoModel.Align.Dynamic = False + # Provide data input + ##from AthenaConfiguration.TestDefaults import defaultTestFiles + # + ConfigFlags.lock() + # Construct ComponentAccumulator + acc = MainServicesCfg(ConfigFlags) + acc.merge(PoolReadCfg(ConfigFlags)) + acc.merge(CaloGeometryCfg(ConfigFlags)) + acc.getService("ConditionStore").Dump=True + acc.printConfig(withDetails=True) + f=open('CaloGMCfg2.pkl','wb') + acc.store(f) + f.close() + ConfigFlags.dump() + # Execute and finish + acc.run(maxEvents=3) diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoModelConfig.py b/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoModelConfig.py index 246ddceda267cd240431c3dc6379ea1641f3df5c..8f3b5d836d9fc870012b791f88eab60981861ad2 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoModelConfig.py +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoModelConfig.py @@ -34,4 +34,8 @@ def FaserGeometryCfg (flags): # from FaserGeoModel.DipoleGMConfig import DipoleGeometryCfg # acc.merge(DipoleGeometryCfg(flags)) + if flags.Detector.SimulateFaserCalo or flags.Detector.GeometryFaserCalo: + from FaserGeoModel.CaloGMConfig import CaloGeometryCfg + acc.merge(CaloGeometryCfg(flags)) + return acc diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelInit.py b/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelInit.py index 37c7692f8f50d8afb04f734b58d0b9895d806430..7d9c16d9f7a66cc823b993919413bd992bbdb3f1 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelInit.py +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelInit.py @@ -30,6 +30,10 @@ def _setupGeoModel(): from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc svcMgr+=GeometryDBSvc("TrackerGeometryDBSvc") + if not hasattr(svcMgr, 'CaloGeometryDBSvc'): + from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc + svcMgr+=GeometryDBSvc("CaloGeometryDBSvc") + # from AthenaCommon import CfgGetter from VetoGeoModel.VetoGeoModelConf import VetoDetectorTool vetoDetectorTool = VetoDetectorTool( DetectorName = "Veto", @@ -73,6 +77,17 @@ def _setupGeoModel(): GeoDbTagSvc = "GeoDbTagSvc") geoModelSvc.DetectorTools += [ dipoleTool ] + from EcalGeoModel.EcalGeoModelConf import EcalDetectorTool + ecalDetectorTool = EcalDetectorTool( DetectorName = "Ecal", + Alignable = True, + RDBAccessSvc = "RDBAccessSvc", + GeometryDBSvc = "CaloGeometryDBSvc", + GeoDbTagSvc = "GeoDbTagSvc") + + geoModelSvc.DetectorTools += [ ecalDetectorTool ] + + + pass ## setup GeoModel at module import diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/CMakeLists.txt b/DetectorDescription/GeoModel/GeoModelFaserUtilities/CMakeLists.txt index b058f0cdcb8d00da3bde13c99bd9c90296e8f579..f4b076f7c11d2de5b08dba9f031b86de04c2f77e 100644 --- a/DetectorDescription/GeoModel/GeoModelFaserUtilities/CMakeLists.txt +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/CMakeLists.txt @@ -1,23 +1,67 @@ ################################################################################ # Package: GeoModelFaserUtilities ################################################################################ -# -# Only one class in the ATLAS GeoModelUtilities library needs to be modified for FASER -# so instead of duplicating the entire library, create a small one with only -# the modified class -# +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( GeoModelFaserUtilities ) +if(NOT BUILDVP1LIGHT) # External dependencies: find_package( Eigen ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( GeoModelFaserUtilities src/*.cxx PUBLIC_HEADERS GeoModelFaserUtilities - INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel GeoModelInterfaces RDBAccessSvcLib ) + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel GeoModelInterfaces RDBAccessSvcLib CxxUtils ) + +atlas_add_test( GeoGetIds_test + SOURCES test/GeoGetIds_test.cxx + LINK_LIBRARIES GeoModelFaserUtilities ) + +atlas_add_test( GeoVisitVolumes_test + SOURCES test/GeoVisitVolumes_test.cxx + LINK_LIBRARIES GeoModelFaserUtilities ) + +endif() +if(BUILDVP1LIGHT) + +# External dependencies: +find_package( GeoModel ) +find_package( Eigen ) + +file(GLOB SOURCES src/GeoMPVEntry.cxx + src/GeoModelExperiment.cxx + src/GeoOpticalSurface.cxx + src/GeoBorderSurface.cxx + src/GeoMaterialPropertiesTable.cxx + src/StoredAlignX.cxx + src/GeoExtendedMaterial.cxx + src/GeoMaterialPropertyVector.cxx + src/GeoOpticalPhysVol.cxx + src/StoredPhysVol.cxx) + +# Component(s) in the package: +atlas_add_library( GeoModelFaserUtilities + ${SOURCES} + PUBLIC_HEADERS GeoModelFaserUtilities + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} ) +endif() + +# Code in this file makes heavy use of eigen and runs orders of magnitude +# more slowly without optimization. So force this to be optimized even +# in debug builds. If you need to debug it you might want to change this. +# Specifying optimization via an attribute on the particular +# function didn't work, because that still didn't allow inlining. +if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" ) + set_source_files_properties( + ${CMAKE_CURRENT_SOURCE_DIR}/src/GeoVisitVolumes.cxx + PROPERTIES + COMPILE_FLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" + COMPILE_DEFINITIONS "FLATTEN" ) +endif() diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoAlignmentStore.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoAlignmentStore.h new file mode 100644 index 0000000000000000000000000000000000000000..089092f6bba675155d220ec15c2a6f836668c265 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoAlignmentStore.h @@ -0,0 +1,75 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GEOMODELFASERUTILITIES_GEOALIGNMENTSTORE_H +#define GEOMODELFASERUTILITIES_GEOALIGNMENTSTORE_H + +#include "GeoModelKernel/GeoVAlignmentStore.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelFaserUtilities/TransformMap.h" +#include "AthenaKernel/CLASS_DEF.h" +#include "AthenaKernel/CondCont.h" +#include <stdexcept> + +class GeoAlignmentStore : public GeoVAlignmentStore +{ + public: + GeoAlignmentStore() {} + virtual ~GeoAlignmentStore() override {} + + virtual void setDelta(const GeoAlignableTransform*, const GeoTrf::Transform3D&) override; + virtual const GeoTrf::Transform3D* getDelta(const GeoAlignableTransform*) const override; + + virtual void setAbsPosition(const GeoVFullPhysVol*, const GeoTrf::Transform3D&) override; + virtual const GeoTrf::Transform3D* getAbsPosition(const GeoVFullPhysVol*) const override; + + virtual void setDefAbsPosition(const GeoVFullPhysVol*, const GeoTrf::Transform3D&) override; + virtual const GeoTrf::Transform3D* getDefAbsPosition(const GeoVFullPhysVol*) const override; + + + protected: + TransformMap<GeoAlignableTransform,GeoTrf::Transform3D> m_deltas; + TransformMap<GeoVFullPhysVol,GeoTrf::Transform3D> m_absPositions; + TransformMap<GeoVFullPhysVol,GeoTrf::Transform3D> m_defAbsPositions; + + public: + const TransformMap<GeoAlignableTransform,GeoTrf::Transform3D>& + getDeltas() const; + + const TransformMap<GeoVFullPhysVol,GeoTrf::Transform3D>& + getAbsPositions() const; + + const TransformMap<GeoVFullPhysVol,GeoTrf::Transform3D>& + getDefAbsPositions() const; +}; + +CLASS_DEF(GeoAlignmentStore, 135648236, 1) +CONDCONT_DEF( GeoAlignmentStore , 33985726 ); + +class ExcAlignmentStore : public std::runtime_error { + public: + ExcAlignmentStore (const std::string& what) + : std::runtime_error (what) + {} + ExcAlignmentStore (const char* what) + : std::runtime_error (what) + {} +}; + +inline +const TransformMap<GeoAlignableTransform,GeoTrf::Transform3D>& +GeoAlignmentStore::getDeltas() const { return m_deltas; } + +inline +const TransformMap<GeoVFullPhysVol,GeoTrf::Transform3D>& +GeoAlignmentStore::getAbsPositions() const { return m_absPositions; } + +inline +const TransformMap<GeoVFullPhysVol,GeoTrf::Transform3D>& +GeoAlignmentStore::getDefAbsPositions() const { return m_defAbsPositions; } + +#endif + + + diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoBorderSurface.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoBorderSurface.h new file mode 100644 index 0000000000000000000000000000000000000000..12bf856954db9886a3a8415a8a194e39d0c0f3a0 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoBorderSurface.h @@ -0,0 +1,38 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GeoBorderSurface_h +#define GeoBorderSurface_h 1 + +#include <string> + +class GeoOpticalPhysVol; +class GeoOpticalSurface; + +class GeoBorderSurface +{ + public: + GeoBorderSurface(std::string name, + GeoOpticalPhysVol* pv1, + GeoOpticalPhysVol* pv2, + GeoOpticalSurface* opticalSurface); + GeoBorderSurface(const GeoBorderSurface &right); + ~GeoBorderSurface(); + + GeoBorderSurface& operator= (const GeoBorderSurface &right) = delete; + + std::string getName() const {return m_name;} + const GeoOpticalPhysVol* getPV1() const {return m_pv1;} + const GeoOpticalPhysVol* getPV2() const {return m_pv2;} + const GeoOpticalSurface* getOptSurface() const {return m_opticalSurface;} + + private: + std::string m_name; + GeoOpticalPhysVol* m_pv1; + GeoOpticalPhysVol* m_pv2; + GeoOpticalSurface* m_opticalSurface; + +}; + +#endif diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoBorderSurfaceContainer.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoBorderSurfaceContainer.h new file mode 100644 index 0000000000000000000000000000000000000000..cc815107ddd0d605adc16a47802319828957d8b1 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoBorderSurfaceContainer.h @@ -0,0 +1,16 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GeoBorderSurfaceContainer_h +#define GeoBorderSurfaceContainer_h 1 + +#include "GeoModelFaserUtilities/GeoBorderSurface.h" +#include "AthenaKernel/CLASS_DEF.h" +#include <vector> + +typedef std::vector< GeoBorderSurface > GeoBorderSurfaceContainer; + +CLASS_DEF( GeoBorderSurfaceContainer , 1325664490 , 1 ) + +#endif diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoDBUtils.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoDBUtils.h new file mode 100644 index 0000000000000000000000000000000000000000..fe591d09e404f29de76828c3616c4174e4c3affe --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoDBUtils.h @@ -0,0 +1,42 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GeoDBUtils_h_ +#define GeoDBUtils_h_ +#include "RDBAccessSvc/IRDBAccessSvc.h" +#include "RDBAccessSvc/IRDBRecordset.h" +#include "RDBAccessSvc/IRDBRecord.h" +#include <string> +#include "GeoModelKernel/GeoDefinitions.h" +#include "GaudiKernel/SystemOfUnits.h" + + +class GeoDBUtils { + + public: + + inline static const IRDBRecord *getTransformRecord(IRDBRecordset_ptr positionRecSet, const std::string & key) { + for (unsigned int s=0;s<positionRecSet->size(); s++) { + const IRDBRecord *currentRec= (*positionRecSet)[s]; + if (key == currentRec->getString("NAME")) { + return currentRec; + } + } + return NULL; + } + + inline static GeoTrf::Transform3D getTransform (const IRDBRecord *currentRec) { + double x = currentRec->getDouble("TRANSX")*Gaudi::Units::mm; + double y = currentRec->getDouble("TRANSY")*Gaudi::Units::mm; + double z = currentRec->getDouble("TRANSZ")*Gaudi::Units::mm; + double theta = currentRec->getDouble("THETA")*Gaudi::Units::rad; + double phi = currentRec->getDouble("PHI")*Gaudi::Units::rad; + double rotationAngle = currentRec->getDouble("ROTATIONANGLE")*Gaudi::Units::rad; + + GeoTrf::Vector3D axis(sin(theta)*cos(phi), sin(theta)*sin(phi),cos(theta)); + return GeoTrf::Translate3D(x,y,z)*GeoTrf::Rotate3D(rotationAngle,axis); + } + +}; +#endif diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoExtendedMaterial.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoExtendedMaterial.h new file mode 100644 index 0000000000000000000000000000000000000000..76f73f67e4a8d3d1baf1302d9acff9d030876c7b --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoExtendedMaterial.h @@ -0,0 +1,80 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GeoExtendedMaterial_h +#define GeoExtendedMaterial_h 1 + +#include "GeoModelKernel/GeoMaterial.h" + +#include "GeoModelFaserUtilities/GeoMaterialPropertiesTable.h" + +// Physical constants +#ifdef BUILDVP1LIGHT + #include "GeoModelKernel/Units.h" + #define SYSTEM_OF_UNITS GeoModelKernelUnits // --> 'GeoModelKernelUnits::STP_Temperature' +#else + #include "GaudiKernel/PhysicalConstants.h" + #define SYSTEM_OF_UNITS Gaudi::Units // --> 'Gaudi::Units::STP_Temperature' +#endif + + +enum GeoMaterialState { stateUndefined, stateSolid, stateLiquid, stateGas }; + +class GeoExtendedMaterial : public GeoMaterial +{ + public: + GeoExtendedMaterial(const std::string &Name, + double Density, + GeoMaterialState State = stateUndefined, + double Temperature = SYSTEM_OF_UNITS::STP_Temperature, + double Pressure = SYSTEM_OF_UNITS::STP_Pressure); + + virtual ~GeoExtendedMaterial(); + + const GeoMaterialState& getState() const; + const double& getTemperature() const; + const double& getPressure() const; + + void SetMaterialPropertiesTable(GeoMaterialPropertiesTable* MPT); + GeoMaterialPropertiesTable* GetMaterialPropertiesTable() const; + + private: + GeoExtendedMaterial(const GeoExtendedMaterial &right); + GeoExtendedMaterial & operator=(const GeoExtendedMaterial &right); + + GeoMaterialState m_state; + double m_temperature; + double m_pressure; + + GeoMaterialPropertiesTable* m_properties; +}; + + +inline const GeoMaterialState& GeoExtendedMaterial::getState() const +{ + return m_state; +} + +inline const double& GeoExtendedMaterial::getTemperature() const +{ + return m_temperature; +} + +inline const double& GeoExtendedMaterial::getPressure() const +{ + return m_pressure; +} + +inline void GeoExtendedMaterial::SetMaterialPropertiesTable(GeoMaterialPropertiesTable* MPT) +{ + m_properties = MPT; + m_properties->ref(); +} + +inline GeoMaterialPropertiesTable* GeoExtendedMaterial::GetMaterialPropertiesTable() const +{ + return m_properties; +} + +#endif diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoGetIds.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoGetIds.h new file mode 100644 index 0000000000000000000000000000000000000000..e9f7363cd0cc74b1a06c9a5f90ad6ad5c6e8f0c2 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoGetIds.h @@ -0,0 +1,88 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file GeoModelFaserUtilities/GeoGetIds.h + * @author scott snyder <snyder@bnl.gov> + * @date Jun, 2019 + * @brief Visitor to collect all IDs under a GeoModel node. + */ + + +#ifndef GEOMODELUTILITIES_GEOGETIDS_H +#define GEOMODELUTILITIES_GEOGETIDS_H + + +#include "GeoModelKernel/GeoNodeAction.h" + + +/** + * @brief Define a simple callback for each ID found. + * It will probably be more convenient to use the + * templated versions below. + */ +class IGeoGetIdsAction +{ +public: + virtual ~IGeoGetIdsAction() = default; + virtual void operator() (int id) = 0; +}; + + +/** + * @brief Visitor to traverse a GeoModel graph and make a callback + * for each identifier found. + */ +class GeoGetIds + : public GeoNodeAction +{ +public: + GeoGetIds (IGeoGetIdsAction& action, int depthLimit = 1); + virtual void handleSerialTransformer (const GeoSerialTransformer *sT) override; + virtual void handleIdentifierTag (const GeoIdentifierTag *idTag) override; + virtual void handleSerialIdentifier(const GeoSerialIdentifier *sI) override; + + +private: + IGeoGetIdsAction& m_action; + const GeoSerialIdentifier *m_serialIdentifier = nullptr; +}; + + +/** + * @brief Callback object calling a templated functional. + */ +template <class FUNCTION> +class GeoGetIdsAction + : public IGeoGetIdsAction +{ +public: + GeoGetIdsAction (FUNCTION f) : m_f (f) {} + virtual void operator() (int id) override + { + m_f (id); + } + FUNCTION m_f; +}; + + + +/** + * @brief Template helper for running the visitor. Example: + *@code + * GeoFullPhysVol* pv = ...; + * std::vector<int> ids; + * geoGetIds ([&](int id) { ids.push_back (id); }, pv); + @endcode + */ +template <class FUNCTION> +void geoGetIds (FUNCTION f, const GeoGraphNode* node, int depthLimit = 1) +{ + GeoGetIdsAction<FUNCTION> act (f); + GeoGetIds visitor (act, depthLimit); + node->exec (&visitor); +} + + +#endif // not GEOMODELUTILITIES_GEOGETIDS_H diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoMPVEntry.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoMPVEntry.h new file mode 100644 index 0000000000000000000000000000000000000000..fd2278ebbdd9a5a0a3aa4fe9638bde2eeba501fa --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoMPVEntry.h @@ -0,0 +1,39 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GeoMPVEntry_h +#define GeoMPVEntry_h 1 + +class GeoMPVEntry +{ + public: + bool operator <(const GeoMPVEntry &right) const; + bool operator ==(const GeoMPVEntry &right) const; + GeoMPVEntry& operator =(const GeoMPVEntry &right); + + GeoMPVEntry(double aPhotonMomentum, double aPropertyValue); + GeoMPVEntry(const GeoMPVEntry &right); + ~GeoMPVEntry(); + + double GetPhotonMomentum(); + double GetProperty(); + + void DumpEntry(); + + private: + double m_thePhotonMomentum; + double m_theProperty; +}; + +inline double GeoMPVEntry::GetPhotonMomentum() +{ + return m_thePhotonMomentum; +} + +inline double GeoMPVEntry::GetProperty() +{ + return m_theProperty; +} + +#endif diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoMaterialPropertiesTable.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoMaterialPropertiesTable.h new file mode 100644 index 0000000000000000000000000000000000000000..9321402676f3c92323908e1c59c0e83ed3aa457b --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoMaterialPropertiesTable.h @@ -0,0 +1,76 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GeoMaterialPropertiesTable_h +#define GeoMaterialPropertiesTable_h 1 + +#include <map> +#include <string> + +#include "GeoModelKernel/RCBase.h" +#include "GeoModelFaserUtilities/GeoMaterialPropertyVector.h" + +class GeoMaterialPropertyVector; + +class GeoMaterialPropertiesTable : public RCBase +{ + public: + GeoMaterialPropertiesTable(); + ~GeoMaterialPropertiesTable(); + + public: + // ******** Typedefs + // Maps + typedef std::map<std::string, GeoMaterialPropertyVector*, std::less<std::string> > GeoMatPVMap; + typedef std::map< std::string, double, std::less<std::string> > GeoMatPMap; + + // Iterators + typedef GeoMatPVMap::const_iterator GeoMatPVMap_ConstIt; + typedef GeoMatPMap::const_iterator GeoMatPMap_ConstIt; + + public: + // Add a new property to the table by giving a key-name and value + void AddConstProperty(const char *key, + double PropertyValue); + + // Add a new property to the table by giving a key-name and the + // arrays x and y of size NumEntries. + void AddProperty(const char *key, + double *PhotonMomenta, + double *PropertyValues, + int NumEntries); + + // Add a new property to the table by giving a key-name and an + // already constructed GeoMaterialPropertyVector. + void AddProperty(const char *key, GeoMaterialPropertyVector *opv); + + // Remove a constant property from the table. + void RemoveConstProperty(const char *key); + + // Remove a property from the table. + void RemoveProperty(const char *key); + + // Add a new entry (pair of numbers) to the table for a given key. + void AddEntry(const char *key, double aPhotonMomentum, + double aPropertyValue); + + // Access to the contents + GeoMatPVMap_ConstIt beginPVMap() const; + GeoMatPVMap_ConstIt endPVMap() const; + + GeoMatPMap_ConstIt beginPMap() const; + GeoMatPMap_ConstIt endPMap() const; + + // Dump contents + void DumpTable() const; + + private: + GeoMatPVMap m_MPT; + GeoMatPMap m_MPTC; + + typedef GeoMatPVMap::iterator MPTiterator; + typedef GeoMatPMap::iterator MPTCiterator; +}; + +#endif diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoMaterialPropertyVector.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoMaterialPropertyVector.h new file mode 100644 index 0000000000000000000000000000000000000000..9212486a7ddae7cb6eb716efcbd4de634791c538 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoMaterialPropertyVector.h @@ -0,0 +1,52 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GeoMaterialPropertyVector_h +#define GeoMaterialPropertyVector_h 1 + +#include "GeoModelFaserUtilities/GeoMPVEntry.h" +#include <vector> + +class GeoMaterialPropertyVector +{ +public: + bool operator ++(); + GeoMaterialPropertyVector& + operator =(const GeoMaterialPropertyVector &right); + + GeoMaterialPropertyVector(): m_MPV(0) + { + m_CurrentEntry = -1; + m_NumEntries = 0; + }; + + GeoMaterialPropertyVector(double *PhotonMomenta, + double *PropertyValues, + int NumElements); + + GeoMaterialPropertyVector(const GeoMaterialPropertyVector &right); + + ~GeoMaterialPropertyVector(); + + void ResetIterator(); + + // Add a new element (pair of numbers) to the GeoMaterialPropertyVector. + void AddElement(double aPhotonMomentum, + double aPropertyValue); + + double GetProperty() const; + double GetPhotonMomentum() const; + + // Dump contents + void DumpVector(); + +private: + GeoMPVEntry GetEntry(int i) const; + + std::vector<GeoMPVEntry*> m_MPV; + int m_NumEntries; + int m_CurrentEntry; +}; + +#endif diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoModelExperiment.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoModelExperiment.h new file mode 100644 index 0000000000000000000000000000000000000000..b3a541bc0943bc4728eaa55f57a83f6a5f4af68b --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoModelExperiment.h @@ -0,0 +1,109 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +//-------------------------------------------------------------------------------------------// +// // +// This class (GeoModelExperiment) is a stored manager of managers. It provides access to // +// the world physical volume and all of the managers; so, indirectly, all of the detector // +// specific top level physical volumes. // +// // +// Joe Boudreau October 2003 // +// // +//-------------------------------------------------------------------------------------------// + +#ifndef GEOMODELSVC_GEOMODELEXPERIMENT_H +#define GEOMODELSVC_GEOMODELEXPERIMENT_H +#include "GeoModelKernel/GeoVPhysVol.h" +#ifndef BUILDVP1LIGHT + #include "AthenaKernel/CLASS_DEF.h" +#endif +#include <set> +#include <string> +#include <vector> + +class GeoPhysVol; +class GeoVDetectorManager; + +class GeoModelExperiment { + +public: + + + //-----------------------------Internal----------------------------------------------------// + // // + typedef const GeoVDetectorManager * value_type; // + // + class NameEquals{ // + public: // + // + NameEquals(const std::string & name); // + bool operator () (const value_type & m) const; // + // + private: // + // + std::string m_name; // + // + }; // + // + class LexigraphicalOrder{ // + public: // + bool operator () (const value_type & a, const value_type & b) const; // + }; // + // + typedef LexigraphicalOrder order_type; // + typedef std::set<value_type, order_type> collection_type; // + typedef collection_type::iterator iterator_type; // + typedef collection_type::const_iterator const_iterator_type; // + // + // + typedef const_iterator_type ConstIterator; // + // // + //-----------------------------------------------------------------------------------------// + + + // ---------------------------For you: ----------------------------------------------------// + // // + // Standard Constructor // + GeoModelExperiment(GeoPhysVol* physVol); // + // // + // Standard Destructor // + virtual ~GeoModelExperiment(); // + // // + // Return the World physical volume: // + GeoPhysVol *getPhysVol(); // + const GeoPhysVol *getPhysVol() const; // + // + // Print a list of all the managers: + std::vector<std::string> getListOfManagers() const; + // // + // Manage the managers: // + void addManager(const GeoVDetectorManager *); // + // // + // Access those managers: // + const GeoVDetectorManager *getManager(const std::string & name) const; // + ConstIterator beginManager() const; // + ConstIterator endManager() const; // + // Add temporary volumes created during Geo2G4 translation // + void addTmpVolume(GeoPhysVol* volume); // + // // + //-----------------------------------------------------------------------------------------// + + private: + + GeoPhysVol *m_physVol; + collection_type m_managers; + std::vector<GeoPhysVol*> m_tmpVolumes; + +}; + +#ifndef BUILDVP1LIGHT +//using the macros below we can assign an identifier (and a version) +//This is required and checked at compile time when you try to record/retrieve + CLASS_DEF(GeoModelExperiment, 9875, 1) +#endif + +#endif // GEOMODELSVC_GEOMODELEXPERIMENT_H + + + diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoModelTool.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoModelTool.h new file mode 100644 index 0000000000000000000000000000000000000000..7bf1f03be6bc9db8643c2eeec98ed30d5a6d29fa --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoModelTool.h @@ -0,0 +1,42 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GEOMODELSVC_GEOMODELTOOL_H +#define GEOMODELSVC_GEOMODELTOOL_H + +#ifndef BUILDVP1LIGHT + +#include "GeoModelInterfaces/IGeoModelTool.h" +#include "AthenaBaseComps/AthAlgTool.h" +#include "CxxUtils/checker_macros.h" + +class GeoVDetectorManager; + +class GeoModelTool : public AthAlgTool, public virtual IGeoModelTool { + +public: + + // Standard Constructor + GeoModelTool( const std::string& type, const std::string& name, const IInterface* parent ); + + // Standard Destructor + virtual ~GeoModelTool(); + + virtual GeoVDetectorManager* manager() const; + + virtual StatusCode clear() override; + virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override; + virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override; + +protected: + + GeoVDetectorManager* m_detector; // The corresponding +}; + +#endif // BUILDVP1LIGHT + +#endif // GEOMODELSVC_DETDESCRTOOL_H + + + diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoOpticalPhysVol.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoOpticalPhysVol.h new file mode 100644 index 0000000000000000000000000000000000000000..5773305e16ae6b61f3ee189e8925e63ac24607fc --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoOpticalPhysVol.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GeoOpticalPhysVol_h +#define GeoOpticalPhysVol_h 1 + +#include "GeoModelKernel/GeoPhysVol.h" + +class GeoOpticalPhysVol : public GeoPhysVol +{ + public: + GeoOpticalPhysVol(const GeoLogVol* LogVol); + + protected: + ~GeoOpticalPhysVol(); + + private: + GeoOpticalPhysVol(const GeoOpticalPhysVol &right); + GeoOpticalPhysVol & operator=(const GeoOpticalPhysVol &right); + +}; + +#endif diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoOpticalSurface.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoOpticalSurface.h new file mode 100644 index 0000000000000000000000000000000000000000..47759da352f1c79e9782502390d6b0b968b31592 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoOpticalSurface.h @@ -0,0 +1,72 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GeoOpticalSurface_h +#define GeoOpticalSurface_h 1 + +#include "GeoModelKernel/RCBase.h" +#include "GeoModelFaserUtilities/GeoMaterialPropertiesTable.h" +#include <string> + + +class GeoOpticalSurface : public RCBase +{ + public: + // Enums --------- + enum GeoSurfaceType + { + dielectric_metal, // dielectric-metal interface + dielectric_dielectric, // dielectric-dielectric interface + firsov, // for Firsov Process + x_ray // for x-ray mirror process + }; + + enum GeoOpticalSurfaceFinish + { + polished, // smooth perfectly polished surface + polishedfrontpainted, // smooth top-layer (front) paint + polishedbackpainted, // same is 'polished' but with a back-paint + ground, // rough surface + groundfrontpainted, // rough top-layer (front) paint + groundbackpainted // same as 'ground' but with a back-paint + }; + + enum GeoOpticalSurfaceModel + { + glisur, // original GEANT3 model + unified // UNIFIED model + }; + // Enums --------- + + GeoOpticalSurface(const std::string& name, + GeoOpticalSurfaceModel model = glisur, + GeoOpticalSurfaceFinish finish = polished, + GeoSurfaceType type = dielectric_dielectric, + double parameter = 1.0); + + ~GeoOpticalSurface(); + + // accessor methods + std::string GetName() const {return m_name;} + GeoSurfaceType GetType() const {return m_type;}; + GeoOpticalSurfaceFinish GetFinish() const {return m_finish;}; + GeoOpticalSurfaceModel GetModel() const {return m_model;}; + double GetParameter() const {return m_parameter;} + + void SetMaterialPropertiesTable(GeoMaterialPropertiesTable *mpt) + { m_materialPropertiesTable = mpt; if(mpt) m_materialPropertiesTable->ref(); }; + + GeoMaterialPropertiesTable* GetMaterialPropertiesTable() const + { return m_materialPropertiesTable;}; + + private: + std::string m_name; + GeoOpticalSurfaceModel m_model; + GeoOpticalSurfaceFinish m_finish; + GeoSurfaceType m_type; + double m_parameter; + GeoMaterialPropertiesTable* m_materialPropertiesTable; +}; + +#endif diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoVisitVolumes.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoVisitVolumes.h new file mode 100644 index 0000000000000000000000000000000000000000..c9b641451e383a031a00ed1772a3fb69315f87f7 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/GeoVisitVolumes.h @@ -0,0 +1,151 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file GeoModelFaserUtilities/GeoVisitVolumes.h + * @author scott snyder <snyder@bnl.gov> + * @date Jul, 2019 + * @brief Visitor to process all volumes under a GeoModel node. + * + * Based on GeoAccessVolumeAction. + */ + + +#ifndef GEOMODELUTILITIES_GEOVISITVOLUMES_H +#define GEOMODELUTILITIES_GEOVISITVOLUMES_H + + +#include "GeoModelKernel/GeoNodeAction.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include <vector> + + +class GeoVPhysVol; +class GeoTransform; +class GeoVAlignmentStore; + + +/** + * @brief Define a simple callback for each volume found. + * It may be more convenient to use the + * templated versions below. + */ +class IGeoVisitVolumesAction +{ +public: + virtual ~IGeoVisitVolumesAction() = default; + virtual void operator() (int id, + const std::string& name, + const GeoVPhysVol* volume, + const GeoTrf::Transform3D& transform, + const GeoTrf::Transform3D& defTransform) = 0; +}; + + +/** + * @brief Visitor to process all volumes under a GeoModel node. + */ +class GeoVisitVolumes : public GeoNodeAction +{ +public: + GeoVisitVolumes (IGeoVisitVolumesAction& action, int depthLimit = 1); + + /// Handles a Transform. + virtual void handleTransform (const GeoTransform *xform) override; + + /// Handles a physical volume. + virtual void handlePhysVol (const GeoPhysVol *vol) override; + + /// Handles a physical volume. + virtual void handleFullPhysVol (const GeoFullPhysVol *vol) override; + + /// Handles a Name Tag. + virtual void handleNameTag (const GeoNameTag *nameTag) override; + + /// Handles a Serial Denominator. + virtual void handleSerialDenominator (const GeoSerialDenominator *sD) override; + + /// Handles a Serial Transformer + virtual void handleSerialTransformer (const GeoSerialTransformer *sT) override; + + /// Handles an Identifier Tag. + virtual void handleIdentifierTag (const GeoIdentifierTag *idTag) override; + + /// Handles an Serial Identifier + virtual void handleSerialIdentifier(const GeoSerialIdentifier *sI) override; + + +private: + GeoVisitVolumes (const GeoVisitVolumes &right) = delete; + GeoVisitVolumes & operator=(const GeoVisitVolumes &right) = delete; + + void handleVol (const GeoVPhysVol *vol); + + IGeoVisitVolumesAction& m_action; + + /// A pointer to a name tag. If the volume is named. + const GeoNameTag *m_nameTag; + + /// A pointer to a serial denominator. If one exists. + const GeoSerialDenominator *m_serialDenominator; + + /// A pointer to an identifier tag. If the volume is identified. + const GeoIdentifierTag *m_idTag; + + /// List of Pending Transformations. + std::vector<const GeoTransform *> m_pendingTransformList; + + const GeoSerialIdentifier *m_serialIdentifier; +}; + + +/** + * @brief Callback object calling a templated functional. + */ +template <class FUNCTION> +class GeoVisitVolumesAction + : public IGeoVisitVolumesAction +{ +public: + GeoVisitVolumesAction (FUNCTION f) : m_f (f) {} + virtual void operator() (int id, + const std::string& name, + const GeoVPhysVol* volume, + const GeoTrf::Transform3D& transform, + const GeoTrf::Transform3D& defTransform) override + { + m_f (id, name, volume, transform, defTransform); + } + FUNCTION m_f; +}; + + + +/** + * @brief Template helper for running the visitor. + */ +template <class FUNCTION> +void geoVisitVolumes (FUNCTION f, const GeoGraphNode* node, int depthLimit = 1) +{ + GeoVisitVolumesAction<FUNCTION> act (f); + GeoVisitVolumes visitor (act, depthLimit); + node->exec (&visitor); +} + + +/** + * @brief Return the child volumes and associated transforms. + * @param node Root of the graph to traverse. + * @param depthLimit Depth limit for the traversal. + * + * Returns a vector of (volume, transform) pairs for volumes in the graph. + * The same volume may be returned multiple times with different transforms + * in the case of a GeoSerialTransform. + */ +typedef std::vector<std::pair<const GeoVPhysVol*, GeoTrf::Transform3D> > + GeoVolumeVec_t; +GeoVolumeVec_t geoGetVolumes (const GeoGraphNode* node, int depthLimit = 1); + + +#endif // not GEOMODELUTILITIES_GEOVISITVOLUMES_H diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/StoredAlignX.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/StoredAlignX.h new file mode 100644 index 0000000000000000000000000000000000000000..e3e708854f51394d97a4afc6484bf5702e504b7e --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/StoredAlignX.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +//-------------------------------------------------------------------------------------------// +// // +// Insert a volume into the detector store: // +// // +// Joe Boudreau October 2003 // +// // +//-------------------------------------------------------------------------------------------// + +#ifndef STOREDALIGNX_H +#define STOREDALIGNX_H + +#ifndef BUILDVP1LIGHT + #include "AthenaKernel/CLASS_DEF.h" +#endif +#include <set> +#include <string> + +class GeoAlignableTransform; +class StoredAlignX { + +public: + + + // ---------------------------For you: ----------------------------------------------------// + // // + // Standard Constructor // + StoredAlignX(GeoAlignableTransform* alignX); // + // // + // Standard Destructor // + virtual ~StoredAlignX(); // + // // + // Return the World physical volume: // + GeoAlignableTransform *getAlignX(); // + const GeoAlignableTransform *getAlignX() const; // + // // + // // + //-----------------------------------------------------------------------------------------// + + private: + + GeoAlignableTransform *m_alignX; + +}; + +#ifndef BUILDVP1LIGHT + CLASS_DEF(StoredAlignX, 9878, 1) +#endif + +#endif // class + + + diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/StoredPhysVol.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/StoredPhysVol.h new file mode 100644 index 0000000000000000000000000000000000000000..4aecca25e94b948a1c81043bde614337bf0a3924 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/StoredPhysVol.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +//-------------------------------------------------------------------------------------------// +// // +// Insert a volume into the detector store: // +// // +// Joe Boudreau October 2003 // +// // +//-------------------------------------------------------------------------------------------// + +#ifndef STOREDPHYSVOL_H +#define STOREDPHYSVOL_H +#include "GeoModelKernel/GeoVPhysVol.h" +#ifndef BUILDVP1LIGHT + #include "AthenaKernel/CLASS_DEF.h" +#endif +#include <set> +#include <string> + +class GeoFullPhysVol; +class StoredPhysVol { + +public: + + + // ---------------------------For you: ----------------------------------------------------// + // // + // Standard Constructor // + StoredPhysVol(GeoFullPhysVol* physVol); // + // // + // Standard Destructor // + virtual ~StoredPhysVol(); // + // // + // Return the World physical volume: // + GeoFullPhysVol *getPhysVol(); // + const GeoFullPhysVol *getPhysVol() const; // + // // + // // + //-----------------------------------------------------------------------------------------// + + private: + + GeoFullPhysVol *m_physVol; + +}; + +#ifndef BUILDVP1LIGHT + CLASS_DEF(StoredPhysVol, 9877, 1) +#endif + +#endif + + + diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/TransformMap.h b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/TransformMap.h new file mode 100644 index 0000000000000000000000000000000000000000..165381f9aba014ac088f62a9ce548c5eeb227786 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/GeoModelFaserUtilities/TransformMap.h @@ -0,0 +1,51 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GEOMODELUTILITIES_TRANSFORMMAP_H +#define GEOMODELUTILITIES_TRANSFORMMAP_H + +#include <unordered_map> + +template<typename T, typename X> +class TransformMap { + public: + TransformMap() {}; + ~TransformMap() {}; + + bool setTransform(const T* obj, const X& xf); + const X* getTransform(const T* obj) const; + + const std::unordered_map<const T*, X>& container() const; + + private: + std::unordered_map<const T*, X> m_container; +}; + +template<typename T, typename X> +bool TransformMap<T,X>::setTransform(const T* obj, const X& xf) +{ + bool result = m_container.find(obj) == m_container.end(); + m_container[obj] = xf; + return result; +} + +template<typename T, typename X> +const X* TransformMap<T,X>::getTransform(const T* obj) const +{ + auto it = m_container.find(obj); + if(it!=m_container.end()) { + return &it->second; + } + else { + return nullptr; + } +} + +template<typename T, typename X> +const std::unordered_map<const T*, X>& TransformMap<T,X>::container() const +{ + return m_container; +} + +#endif diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/share/GeoGetIds_test.ref b/DetectorDescription/GeoModel/GeoModelFaserUtilities/share/GeoGetIds_test.ref new file mode 100644 index 0000000000000000000000000000000000000000..b112d8e766842ade6e1499f28b8911207b73f9c1 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/share/GeoGetIds_test.ref @@ -0,0 +1,2 @@ +GeoModelFaserUtilities/test/GeoGetIds_test +test1 diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/share/GeoVisitVolumes_test.ref b/DetectorDescription/GeoModel/GeoModelFaserUtilities/share/GeoVisitVolumes_test.ref new file mode 100644 index 0000000000000000000000000000000000000000..0cecf020c8618663546715f3f8fee8b90968bb94 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/share/GeoVisitVolumes_test.ref @@ -0,0 +1,3 @@ +GeoModelFaserUtilities/test/GeoVisitVolumes_test +test1 +test2 diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/DecodeFaserVersionKey.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/DecodeFaserVersionKey.cxx index cd85de943ffac6714590a5cb285edbceb6b548b0..a913211431b395745ecb18e14b537351ec81a7d9 100644 --- a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/DecodeFaserVersionKey.cxx +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/DecodeFaserVersionKey.cxx @@ -33,8 +33,9 @@ template <class T> void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) { std::string nodeOverrideTag; - std::string scintOverrideTag; // Scint has two levels. + std::string scintOverrideTag; // Scint, tracker and Calo has two levels. std::string trackerOverrideTag; + std::string caloOverrideTag; std::string neutrinoOverrideTag; if (node == "FASER") { nodeOverrideTag = ""; @@ -64,6 +65,9 @@ void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) trackerOverrideTag = svc->trackerVersionOverride(); } else if (node == "Calorimeter") { nodeOverrideTag = svc->caloVersionOverride(); + } else if (node == "Ecal") { + caloOverrideTag = svc->caloVersionOverride(); + nodeOverrideTag = svc->ecalVersionOverride(); } else { std::cout << "DecodeFaserVersionKey passed an unknown node:" << node << std::endl; nodeOverrideTag = ""; @@ -112,6 +116,18 @@ void DecodeFaserVersionKey::defineTag(const T* svc, const std::string & node) m_node = "Tracker"; } + // If caloOverrideTag is specified (and is not just "CUSTOM") then override with the calo tag. + std::string caloTag; + if (!caloOverrideTag.empty()) { + // We dont care about the return value (custom = true/false). We only take notice of the custom + // flag if the override is at the node we have selected. Ie we only look at nodeOverrideTag + // in order to set m_custom. At any rate, we have to remove the CUSTOM string if it is present. + getCustomTag(caloOverrideTag, caloTag); + } + if (!caloTag.empty()) { + m_tag = caloTag; + m_node = "Calorimeter"; + } // Finally if subsystem tag is overriden then use that. std::string outputTag; diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoAlignmentStore.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoAlignmentStore.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ff03d3b12d8e07f959f328b87cd0fe91a5414bc3 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoAlignmentStore.cxx @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/GeoAlignmentStore.h" + +void GeoAlignmentStore::setDelta(const GeoAlignableTransform* axf, const GeoTrf::Transform3D& xf) +{ + m_deltas.setTransform(axf, xf); +} + +const GeoTrf::Transform3D* GeoAlignmentStore::getDelta(const GeoAlignableTransform* axf) const +{ + return m_deltas.getTransform(axf); +} + +void GeoAlignmentStore::setAbsPosition(const GeoVFullPhysVol* fpv, const GeoTrf::Transform3D& xf) +{ + m_absPositions.setTransform(fpv,xf); +} + +const GeoTrf::Transform3D* GeoAlignmentStore::getAbsPosition(const GeoVFullPhysVol* fpv) const +{ + return m_absPositions.getTransform(fpv); +} + +void GeoAlignmentStore::setDefAbsPosition(const GeoVFullPhysVol* fpv, const GeoTrf::Transform3D& xf) +{ + m_defAbsPositions.setTransform(fpv,xf); +} + +const GeoTrf::Transform3D* GeoAlignmentStore::getDefAbsPosition(const GeoVFullPhysVol* fpv) const +{ + return m_defAbsPositions.getTransform(fpv); +} diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoBorderSurface.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoBorderSurface.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c271c2de508febeaa367c7ca72be873441eaa59b --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoBorderSurface.cxx @@ -0,0 +1,44 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/GeoBorderSurface.h" +#include "GeoModelFaserUtilities/GeoOpticalPhysVol.h" +#include "GeoModelFaserUtilities/GeoOpticalSurface.h" + +#include <exception> + +GeoBorderSurface::GeoBorderSurface(std::string name, + GeoOpticalPhysVol* pv1, + GeoOpticalPhysVol* pv2, + GeoOpticalSurface* opticalSurface): + m_name(name), + m_pv1(pv1), + m_pv2(pv2), + m_opticalSurface(opticalSurface) +{ + if(pv1->isShared() || pv2->isShared()) + throw std::runtime_error("Attempt to create a surface with shared physical volumes"); + + pv1->ref(); + pv2->ref(); + opticalSurface->ref(); +} + +GeoBorderSurface::GeoBorderSurface(const GeoBorderSurface &right): + m_name(right.m_name), + m_pv1(right.m_pv1), + m_pv2(right.m_pv2), + m_opticalSurface(right.m_opticalSurface) +{ + m_pv1->ref(); + m_pv2->ref(); + m_opticalSurface->ref(); +} + +GeoBorderSurface::~GeoBorderSurface() +{ + m_pv1->unref(); + m_pv2->unref(); + m_opticalSurface->unref(); +} diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoExtendedMaterial.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoExtendedMaterial.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1ff333b08513d4b6fbc9db2f76e40d05d6c1cc74 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoExtendedMaterial.cxx @@ -0,0 +1,25 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/GeoExtendedMaterial.h" +#include "GeoModelFaserUtilities/GeoMaterialPropertiesTable.h" + +GeoExtendedMaterial::GeoExtendedMaterial(const std::string &Name, + double Density, + GeoMaterialState State, + double Temperature, + double Pressure): + GeoMaterial(Name,Density), + m_state(State), + m_temperature(Temperature), + m_pressure(Pressure), + m_properties(0) +{ +} + +GeoExtendedMaterial::~GeoExtendedMaterial() +{ + m_properties->unref(); +} + diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoGetIds.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoGetIds.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ea53400ec56664f256c5ebad975b9a39c5a2abf6 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoGetIds.cxx @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file GeoModelFaserUtilities/src/GeoGetIds.cxx + * @author scott snyder <snyder@bnl.gov> + * @date Jun, 2019 + * @brief Visitor to collect all IDs under a GeoModel node. + */ + + +#include "GeoModelFaserUtilities/GeoGetIds.h" + + +GeoGetIds::GeoGetIds (IGeoGetIdsAction& action, + int depthLimit /*= 1*/) + : m_action (action) +{ + setDepthLimit (depthLimit); +} + + +void GeoGetIds::handleSerialTransformer (const GeoSerialTransformer *sT) +{ + if (m_serialIdentifier) { + int idbase = m_serialIdentifier->getBaseId(); + for (unsigned int i=0; i < sT->getNCopies(); i++) { + m_action (idbase + i); + } + } +} + + +void GeoGetIds::handleIdentifierTag (const GeoIdentifierTag *idTag) +{ + m_serialIdentifier = nullptr; + m_action (idTag->getIdentifier()); +} + + +void GeoGetIds::handleSerialIdentifier(const GeoSerialIdentifier *sI) +{ + m_serialIdentifier = sI; +} diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoMPVEntry.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoMPVEntry.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2718f0ecd48c53a5ece9b6c0651afcf51b0a9226 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoMPVEntry.cxx @@ -0,0 +1,54 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/GeoMPVEntry.h" +#include <iostream> + +bool GeoMPVEntry::operator ==(const GeoMPVEntry &right) const +{ + if (m_thePhotonMomentum == right.m_thePhotonMomentum) + return true; + else + return false; +} + +bool GeoMPVEntry::operator <(const GeoMPVEntry &right) const +{ + if (m_thePhotonMomentum < right.m_thePhotonMomentum) + return true; + else + return false; +} + +GeoMPVEntry& GeoMPVEntry::operator =(const GeoMPVEntry& right) +{ + if (this == &right) return *this; + + m_thePhotonMomentum = right.m_thePhotonMomentum; + m_theProperty = right.m_theProperty; + return *this; +} + +GeoMPVEntry::GeoMPVEntry(double aPhotonMomentum, double aProperty) +{ + m_thePhotonMomentum = aPhotonMomentum; + m_theProperty = aProperty; +} + +GeoMPVEntry::GeoMPVEntry(const GeoMPVEntry &right) +{ + m_thePhotonMomentum = right.m_thePhotonMomentum; + m_theProperty = right.m_theProperty; +} + +GeoMPVEntry::~GeoMPVEntry(){} + +void GeoMPVEntry::DumpEntry() +{ + std::cout << "(" + << m_thePhotonMomentum + << ", " + << m_theProperty + << ")\n"; +} diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoMaterialPropertiesTable.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoMaterialPropertiesTable.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ed959318e268034d1a61ec5f2f47670ee0e6c2dd --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoMaterialPropertiesTable.cxx @@ -0,0 +1,110 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/GeoMaterialPropertiesTable.h" +#include "GeoModelFaserUtilities/GeoMaterialPropertyVector.h" +#include <stdexcept> +#include <iostream> + +GeoMaterialPropertiesTable::GeoMaterialPropertiesTable() +{ +} + +GeoMaterialPropertiesTable::~GeoMaterialPropertiesTable() +{ + MPTiterator i; + for(i = m_MPT.begin(); i!= m_MPT.end(); i++) + delete (*i).second; + + m_MPT.clear(); + m_MPTC.clear(); +} + + +void GeoMaterialPropertiesTable::AddConstProperty(const char *key, + double PropertyValue) +{ + m_MPTC [std::string(key)] = PropertyValue; +} + +void GeoMaterialPropertiesTable::AddProperty(const char *key, + double* PhotonMomenta, + double* PropertyValues, + int NumEntries) +{ + GeoMaterialPropertyVector *mpv = + new GeoMaterialPropertyVector(PhotonMomenta, + PropertyValues, + NumEntries); + m_MPT[std::string(key)] = mpv; +} + +void GeoMaterialPropertiesTable::AddProperty(const char *key, + GeoMaterialPropertyVector *mpv) +{ + m_MPT [std::string(key)] = mpv; +} + +void GeoMaterialPropertiesTable::RemoveConstProperty(const char *key) +{ + m_MPTC.erase(std::string(key)); +} + +void GeoMaterialPropertiesTable::RemoveProperty(const char *key) +{ + m_MPT.erase(std::string(key)); +} + +void GeoMaterialPropertiesTable::AddEntry(const char *key, + double aPhotonMomentum, + double aPropertyValue) +{ + GeoMaterialPropertyVector *targetVector=m_MPT[std::string(key)]; + if(targetVector != 0) + targetVector->AddElement(aPhotonMomentum, aPropertyValue); + else + throw std::runtime_error("GeoMaterialPropertiesTable::AddEntry ==> Material Property Vector not found."); +} + +GeoMaterialPropertiesTable::GeoMatPVMap_ConstIt GeoMaterialPropertiesTable::beginPVMap() const +{ + return m_MPT.begin(); +} + +GeoMaterialPropertiesTable::GeoMatPVMap_ConstIt GeoMaterialPropertiesTable::endPVMap() const +{ + return m_MPT.end(); +} + +GeoMaterialPropertiesTable::GeoMatPMap_ConstIt GeoMaterialPropertiesTable::beginPMap() const +{ + return m_MPTC.begin(); +} + +GeoMaterialPropertiesTable::GeoMatPMap_ConstIt GeoMaterialPropertiesTable::endPMap() const +{ + return m_MPTC.end(); +} + +void GeoMaterialPropertiesTable::DumpTable() const +{ + for(GeoMatPVMap_ConstIt i=m_MPT.begin(); i!=m_MPT.end(); i++) + { + std::cout << (*i).first << "\n"; + if((*i).second != 0) + (*i).second->DumpVector(); + else + std::cout << "NULL Material Property Vector Pointer." << "\n"; + } + + for (GeoMatPMap_ConstIt j = m_MPTC.begin(); j != m_MPTC.end(); ++j) + { + std::cout << j->first << "\n"; + if(j->second != 0) + std::cout << j->second << "\n"; + else + std::cout << "No Material Constant Property." << "\n"; + } +} + diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoMaterialPropertyVector.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoMaterialPropertyVector.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a3685116c2d8bb756acafee43b75e7e933ae78eb --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoMaterialPropertyVector.cxx @@ -0,0 +1,121 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/GeoMaterialPropertyVector.h" +#include <stdexcept> +#include <iostream> + +bool GeoMaterialPropertyVector::operator ++() +{ + m_CurrentEntry++; + if(m_CurrentEntry < m_NumEntries) + return true; + else + return false; +} + +GeoMaterialPropertyVector& GeoMaterialPropertyVector::operator =(const GeoMaterialPropertyVector& right) +{ + if (this == &right) return *this; + + for(unsigned i=0; i<m_MPV.size(); ++i) + delete m_MPV[i]; + m_MPV.clear(); + + m_NumEntries = 0; + m_CurrentEntry = -1; + + for(int i = 0 ; i < right.m_NumEntries; i++) + { + GeoMPVEntry *newElement = new GeoMPVEntry(right.GetEntry(i)); + m_MPV.push_back(newElement); + m_NumEntries++; + } + + return *this; +} + +GeoMaterialPropertyVector::GeoMaterialPropertyVector(double *PhotonMomenta, + double *PropertyValues, + int NumElements) +{ + m_NumEntries = 0; + m_CurrentEntry = -1; + + for(int i = 0; i < NumElements; i++) + AddElement(PhotonMomenta[i], PropertyValues[i]); +} + +GeoMaterialPropertyVector::GeoMaterialPropertyVector(const GeoMaterialPropertyVector &right) +{ + m_NumEntries = 0; + m_CurrentEntry = -1; + + for(int i = 0 ; i < right.m_NumEntries; i++) + { + GeoMPVEntry *newElement = new GeoMPVEntry(right.GetEntry(i)); + m_MPV.push_back(newElement); + m_NumEntries++; + } +} + +GeoMaterialPropertyVector::~GeoMaterialPropertyVector() +{ + for(unsigned i=0; i<m_MPV.size(); ++i) + delete m_MPV[i]; + m_MPV.clear(); +} + +void GeoMaterialPropertyVector::ResetIterator() +{ + m_CurrentEntry = -1; +} + +void GeoMaterialPropertyVector::AddElement(double aPhotonMomentum, + double aPropertyValue) +{ + GeoMPVEntry *newElement; + + newElement = new GeoMPVEntry(aPhotonMomentum, aPropertyValue); + m_MPV.push_back(newElement); + m_NumEntries++; +} + +double GeoMaterialPropertyVector::GetProperty() const +{ + if(m_CurrentEntry == -1 || m_CurrentEntry >= m_NumEntries) + throw std::runtime_error("GeoMaterialPropertyVector::GetProperty ==>Iterator attempted to Retrieve Property out of range"); + else + return m_MPV[m_CurrentEntry]->GetProperty(); +} + +double GeoMaterialPropertyVector::GetPhotonMomentum() const +{ + if(m_CurrentEntry == -1 || m_CurrentEntry >= m_NumEntries) + throw std::runtime_error("GeoMaterialPropertyVector::GetPhotonMomentum ==>Iterator attempted to Retrieve Photon Momentum out of range"); + else + return m_MPV[m_CurrentEntry]->GetPhotonMomentum(); +} + +void GeoMaterialPropertyVector::DumpVector() +{ + if (m_MPV.empty()) + { + std::cerr << "nothing to dump\n"; + throw std::runtime_error("GeoMaterialPropertyVector::DumpVector ==>Nothing to dump! Vector is empty"); + } + + for (int i = 0; i < m_NumEntries; i++) + { + std::cout << "m_MPV["<< i << "]: "; + m_MPV[i]->DumpEntry(); + } + std::cout << " Done DumpVector of " << m_NumEntries << " entries\n"; + +} + +GeoMPVEntry GeoMaterialPropertyVector::GetEntry(int i) const +{ + return *m_MPV[i]; +} diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoModelExperiment.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoModelExperiment.cxx new file mode 100644 index 0000000000000000000000000000000000000000..0888a3e5c46728fa9652e0e66886b90c35a539ed --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoModelExperiment.cxx @@ -0,0 +1,98 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/GeoModelExperiment.h" +#include "GeoModelKernel/GeoPhysVol.h" +#include "GeoModelKernel/GeoVDetectorManager.h" +#include <algorithm> +#include <sstream> +#include <stdexcept> +/** + ** Constructor(s) + **/ +GeoModelExperiment::GeoModelExperiment( GeoPhysVol * physVol ) + : m_physVol(physVol) +{ + physVol->ref(); +} + +/** + ** Destructor + **/ +GeoModelExperiment::~GeoModelExperiment() { + // Unref all temporary volumes + std::vector<GeoPhysVol*>::iterator it = m_tmpVolumes.begin(); + for(; it!=m_tmpVolumes.end(); it++) + (*it)->unref(); + + m_physVol->unref(); +} + +GeoPhysVol * GeoModelExperiment::getPhysVol() { + return m_physVol; +} + + +const GeoPhysVol *GeoModelExperiment::getPhysVol() const{ + return m_physVol; +} + + + +GeoModelExperiment::ConstIterator GeoModelExperiment::beginManager() const { + return m_managers.begin(); +} + +GeoModelExperiment::ConstIterator GeoModelExperiment::endManager() const { + return m_managers.end(); +} + +void GeoModelExperiment::addManager(const GeoVDetectorManager *mgr) { + if (getManager(mgr->getName())) { + std::ostringstream errorMessage; + errorMessage + << "A detector manager named" << mgr->getName() + << " has already been declared to GeoModelExperiment"; + + throw std::runtime_error(errorMessage.str()); + } + m_managers.insert(mgr); +} + +const GeoVDetectorManager *GeoModelExperiment::getManager(const std::string & name) const { + + const_iterator_type m = std::find_if(m_managers.begin(),m_managers.end(),NameEquals(name)); + if (m!=m_managers.end()) { + return *m; + } + else { + return NULL; + } + +} + +std::vector<std::string> GeoModelExperiment::getListOfManagers() const { + std::vector<std::string> managersList; + for(auto manager : m_managers) { + managersList.push_back(manager->getName()); + } + return managersList; +} + + +GeoModelExperiment::NameEquals::NameEquals(const std::string & name):m_name(name) { +} + +bool GeoModelExperiment::NameEquals::operator() (const value_type & m) const { + return m->getName()==m_name; +} + +bool GeoModelExperiment::LexigraphicalOrder::operator () (const value_type & a, const value_type &b) const { + return a->getName()< b->getName(); +} + +void GeoModelExperiment::addTmpVolume(GeoPhysVol* volume) +{ + m_tmpVolumes.push_back(volume); +} diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoModelTool.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoModelTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..fd986c3f9feca72293d53af4ba5552cb66c71f19 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoModelTool.cxx @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef BUILDVP1LIGHT + +#include "GeoModelFaserUtilities/GeoModelTool.h" + +/** + ** Constructor(s) + **/ +GeoModelTool::GeoModelTool( const std::string& type, const std::string& name, const IInterface* parent ) + : AthAlgTool( type, name, parent ) + , m_detector(0) +{ + declareInterface<IGeoModelTool>( this ); +} + +/** + ** Destructor + **/ +GeoModelTool::~GeoModelTool() { +} + +/** + ** The Detector Node corresponding to this tool + **/ +GeoVDetectorManager* GeoModelTool::manager() const { + return m_detector; +} + +StatusCode GeoModelTool::clear() +{ + return StatusCode::SUCCESS; +} + +StatusCode GeoModelTool::align(IOVSVC_CALLBACK_ARGS) +{ + return StatusCode::SUCCESS; +} + +StatusCode GeoModelTool::registerCallback() +{ + // Return Failure since no function has been registered + return StatusCode::FAILURE; +} + +#endif // BUILDVP1LIGHT diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoOpticalPhysVol.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoOpticalPhysVol.cxx new file mode 100644 index 0000000000000000000000000000000000000000..e7b5fc4428af19876d742aa09c50ef0840c4930a --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoOpticalPhysVol.cxx @@ -0,0 +1,14 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/GeoOpticalPhysVol.h" + +GeoOpticalPhysVol::GeoOpticalPhysVol(const GeoLogVol* LogVol): + GeoPhysVol(LogVol) +{ +} + +GeoOpticalPhysVol::~GeoOpticalPhysVol() +{ +} diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoOpticalSurface.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoOpticalSurface.cxx new file mode 100644 index 0000000000000000000000000000000000000000..7b0425f23eccba66e49234ac1901f2223566ae74 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoOpticalSurface.cxx @@ -0,0 +1,26 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/GeoOpticalSurface.h" + +GeoOpticalSurface::GeoOpticalSurface(const std::string& name, + GeoOpticalSurfaceModel model, + GeoOpticalSurfaceFinish finish, + GeoSurfaceType type, + double parameter): + m_name(name), + m_model(model), + m_finish(finish), + m_type(type), + m_parameter(parameter), + m_materialPropertiesTable(0) +{ +} + +GeoOpticalSurface::~GeoOpticalSurface() +{ + if(m_materialPropertiesTable) + m_materialPropertiesTable->unref(); +} + diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoVisitVolumes.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoVisitVolumes.cxx new file mode 100644 index 0000000000000000000000000000000000000000..f6aa3a7bf3afa44a19a1070de9175dcff59823e5 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/GeoVisitVolumes.cxx @@ -0,0 +1,186 @@ +/* + * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file GeoModelFaserUtilities/src/GeoVisitVolumes.cxx + * @author scott snyder <snyder@bnl.gov> + * @date Jul, 2019 + * @brief Visitor to process all volumes under a GeoModel node. + * + * Based on GeoAccessVolumeAction. + */ + + +#include "GeoModelFaserUtilities/GeoVisitVolumes.h" +#include "GeoModelKernel/GeoNameTag.h" +#include "GeoModelKernel/GeoSerialDenominator.h" +#include "GeoModelKernel/GeoSerialIdentifier.h" + +#include <string> + + +GeoVisitVolumes::GeoVisitVolumes (IGeoVisitVolumesAction& action, + int depthLimit /*= 1*/) + : m_action (action) + , m_nameTag(nullptr) + , m_serialDenominator(nullptr) + , m_idTag(nullptr) + , m_serialIdentifier(nullptr) +{ + setDepthLimit (depthLimit); + m_pendingTransformList.reserve(1); +} + + +void GeoVisitVolumes::handleTransform (const GeoTransform *xform) +{ + m_pendingTransformList.push_back (xform); +} + + +void GeoVisitVolumes::handleVol (const GeoVPhysVol *vol) +{ + // + // Return if we have not got to any children: + // + if(getPath()->getLength()-1 == 0) + return; + + GeoTrf::Transform3D transform; + GeoTrf::Transform3D defTransform; + + if (m_pendingTransformList.size() == 1) { + transform = m_pendingTransformList[0]->getTransform(nullptr); + defTransform = m_pendingTransformList[0]->getDefTransform(nullptr); + } + else { + transform = GeoTrf::Transform3D::Identity(); + defTransform = GeoTrf::Transform3D::Identity(); + for (const GeoTransform* t : m_pendingTransformList) { + transform = transform * t->getTransform(nullptr); + defTransform = defTransform * t->getDefTransform(nullptr); + } + } + + const static std::string anon = "ANON"; + const std::string& name = m_nameTag ? m_nameTag->getName() : anon; + + int id = m_idTag ? m_idTag->getIdentifier() : -1; + + m_action (id, name, vol, transform, defTransform); + + m_idTag = nullptr; + m_nameTag = nullptr; + m_pendingTransformList.clear(); +} + + +void GeoVisitVolumes::handlePhysVol (const GeoPhysVol *vol) +{ + handleVol (vol); +} + +void GeoVisitVolumes::handleFullPhysVol (const GeoFullPhysVol *vol) +{ + handleVol (vol); +} + + +void GeoVisitVolumes::handleNameTag (const GeoNameTag *nameTag) +{ + m_nameTag = nameTag; + m_serialDenominator = nullptr; +} + + +void GeoVisitVolumes::handleSerialDenominator (const GeoSerialDenominator *sD) +{ + m_serialDenominator = sD; +} + + +#if defined(FLATTEN) && defined(__GNUC__) +// We compile this package with optimization, even in debug builds; otherwise, +// the heavy use of Eigen makes it too slow. However, from here we may call +// to out-of-line Eigen code that is linked from other DSOs; in that case, +// it would not be optimized. Avoid this by forcing all Eigen code +// to be inlined here if possible. +__attribute__ ((flatten)) +#endif +void GeoVisitVolumes::handleSerialTransformer (const GeoSerialTransformer *sT) +{ + const GeoVPhysVol* vol = &*sT->getVolume(); + unsigned int ncopies = sT->getNCopies(); + int idbase = -1; + if (m_serialIdentifier) { + idbase = m_serialIdentifier->getBaseId(); + } + + GeoTrf::Transform3D transform (GeoTrf::Transform3D::Identity()); + GeoTrf::Transform3D defTransform (GeoTrf::Transform3D::Identity()); + for (const GeoTransform* t : m_pendingTransformList) { + transform = transform * t->getTransform(nullptr); + defTransform = defTransform * t->getDefTransform(nullptr); + } + + for (unsigned int i = 0; i < ncopies; i++) { + int id = idbase; + if (id >= 0) { + id += i; + } + + std::string name; + if (m_serialDenominator) { + name = m_serialDenominator->getBaseName() + std::to_string(i); + } + else { + name = "ANON"; + } + + m_action (id, name, vol, + transform * sT->getTransform (i), + defTransform * sT->getTransform (i)); + } + + m_idTag = nullptr; + m_nameTag = nullptr; + m_pendingTransformList.clear(); +} + + +void GeoVisitVolumes::handleIdentifierTag (const GeoIdentifierTag *idTag) +{ + m_idTag = idTag; + m_serialIdentifier = nullptr; +} + + +void GeoVisitVolumes::handleSerialIdentifier(const GeoSerialIdentifier *sI) +{ + m_serialIdentifier = sI; +} + + +/** + * @brief Return the child volumes and associated transforms. + * @param node Root of the graph to traverse. + * @param depthLimit Depth limit for the traversal. + * + * Returns a vector of (volume, transform) pairs for volumes in the graph. + * The same volume may be returned multiple times with different transforms + * in the case of a GeoSerialTransform. + */ +GeoVolumeVec_t geoGetVolumes (const GeoGraphNode* node, int depthLimit /*= 1*/) +{ + GeoVolumeVec_t ret; + ret.reserve (20); + geoVisitVolumes ([&] (int /*id*/, + const std::string& /*name*/, + const GeoVPhysVol* volume, + const GeoTrf::Transform3D& transform, + const GeoTrf::Transform3D& /*defTransform*/) + { ret.emplace_back (volume, transform); }, + node, + depthLimit); + return ret; +} diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/StoredAlignX.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/StoredAlignX.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1d98d87b9b5d33d1facbd309dbc83219015eecee --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/StoredAlignX.cxx @@ -0,0 +1,34 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/StoredAlignX.h" +#include "GeoModelKernel/GeoAlignableTransform.h" +#include <algorithm> +#include <sstream> +#include <stdexcept> +/** + ** Constructor(s) + **/ +StoredAlignX::StoredAlignX( GeoAlignableTransform * alignX ) + : m_alignX(alignX) +{ + alignX->ref(); +} + +/** + ** Destructor + **/ +StoredAlignX::~StoredAlignX() { + m_alignX->unref(); +} + +GeoAlignableTransform * StoredAlignX::getAlignX() { + return m_alignX; +} + + +const GeoAlignableTransform *StoredAlignX::getAlignX() const{ + return m_alignX; +} + diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/StoredPhysVol.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/StoredPhysVol.cxx new file mode 100644 index 0000000000000000000000000000000000000000..5248fb4749b385d4ccf785e08db6e195a59af9e4 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/src/StoredPhysVol.cxx @@ -0,0 +1,34 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoModelFaserUtilities/StoredPhysVol.h" +#include "GeoModelKernel/GeoFullPhysVol.h" +#include <algorithm> +#include <sstream> +#include <stdexcept> +/** + ** Constructor(s) + **/ +StoredPhysVol::StoredPhysVol( GeoFullPhysVol * physVol ) + : m_physVol(physVol) +{ + physVol->ref(); +} + +/** + ** Destructor + **/ +StoredPhysVol::~StoredPhysVol() { + m_physVol->unref(); +} + +GeoFullPhysVol * StoredPhysVol::getPhysVol() { + return m_physVol; +} + + +const GeoFullPhysVol *StoredPhysVol::getPhysVol() const{ + return m_physVol; +} + diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/test/GeoGetIds_test.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/test/GeoGetIds_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3133648298013c3a5a201a7b0e74a23d6dad8056 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/test/GeoGetIds_test.cxx @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file GeoModelFaserUtilities/test/GeoGetIds_test.cxx + * @author scott snyder <snyder@bnl.gov> + * @date Jun, 2019 + * @brief Unit test for GeoGetIds. + */ + + +#undef NDEBUG +#include "GeoModelFaserUtilities/GeoGetIds.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoModelKernel/GeoBox.h" +#include <iostream> +#include <cassert> +#include <memory> +#include <cmath> + + +PVConstLink makeTest() +{ + GeoMaterial* m0 = new GeoMaterial ("mat", 1); + GeoShape* s0 = new GeoBox (1, 1, 1); + GeoLogVol* l0 = new GeoLogVol ("l0", s0, m0); + GeoFullPhysVol* v0 = new GeoFullPhysVol(l0); + + GeoGenfun::Variable K; + GeoGenfun::GENFUNCTION f = K; + GeoXF::TRANSFUNCTION t = GeoXF::Pow(GeoTrf::TranslateY3D(1.0),f); + + v0->add (new GeoIdentifierTag (10)); + v0->add (new GeoPhysVol (new GeoLogVol ("l1", s0, m0))); + v0->add (new GeoIdentifierTag (20)); + v0->add (new GeoPhysVol (new GeoLogVol ("l2", s0, m0))); + v0->add (new GeoSerialIdentifier (100)); + v0->add (new GeoSerialTransformer (new GeoPhysVol (new GeoLogVol ("l3", s0, m0)), + &t, 3)); + v0->add (new GeoIdentifierTag (200)); + v0->add (new GeoPhysVol (new GeoLogVol ("l4", s0, m0))); + return v0; +} + + +void test1() +{ + std::cout << "test1\n"; + PVConstLink v0 = makeTest(); + + std::vector<int> ids; + geoGetIds ([&](int id) { ids.push_back (id); }, &*v0); + assert (ids == (std::vector<int>{10, 20, 100, 101, 102, 200})); +} + + +int main() +{ + std::cout << "GeoModelFaserUtilities/test/GeoGetIds_test\n"; + test1(); + return 0; +} diff --git a/DetectorDescription/GeoModel/GeoModelFaserUtilities/test/GeoVisitVolumes_test.cxx b/DetectorDescription/GeoModel/GeoModelFaserUtilities/test/GeoVisitVolumes_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..59230f7016eb46c0b54c59a31b438b418da29db5 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoModelFaserUtilities/test/GeoVisitVolumes_test.cxx @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file GeoModelFaserUtilities/test/GeoVisitVolumes_test.cxx + * @author scott snyder <snyder@bnl.gov> + * @date Jul, 2019 + * @brief Unit test for GeoVisitVOlumes. + */ + + +#undef NDEBUG +#include "GeoModelFaserUtilities/GeoVisitVolumes.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoModelKernel/GeoBox.h" +#include <iostream> +#include <cassert> +#include <memory> +#include <cmath> + + +PVConstLink makeTest() +{ + GeoMaterial* m0 = new GeoMaterial ("mat", 1); + GeoShape* s0 = new GeoBox (1, 1, 1); + GeoLogVol* l0 = new GeoLogVol ("l0", s0, m0); + GeoFullPhysVol* v0 = new GeoFullPhysVol(l0); + + GeoGenfun::Variable K; + GeoGenfun::GENFUNCTION f = K; + GeoXF::TRANSFUNCTION t = GeoXF::Pow(GeoTrf::TranslateY3D(1.0),f); + + GeoTrf::TranslateX3D t2(1); + + v0->add (new GeoIdentifierTag (10)); + v0->add (new GeoNameTag ("l1")); + v0->add (new GeoPhysVol (new GeoLogVol ("l1", s0, m0))); + v0->add (new GeoIdentifierTag (20)); + v0->add (new GeoNameTag ("l2")); + v0->add (new GeoTransform (t2)); + v0->add (new GeoPhysVol (new GeoLogVol ("l2", s0, m0))); + v0->add (new GeoSerialIdentifier (100)); + v0->add (new GeoSerialDenominator ("l3")); + v0->add (new GeoTransform (t2)); + v0->add (new GeoSerialTransformer (new GeoPhysVol (new GeoLogVol ("l3", s0, m0)), + &t, 3)); + v0->add (new GeoIdentifierTag (200)); + v0->add (new GeoNameTag ("l4")); + v0->add (new GeoPhysVol (new GeoLogVol ("l4", s0, m0))); + return v0; +} + + +class TestVisitor +{ +public: + TestVisitor (PVConstLink v0) : m_v0 (v0) {} + void operator() (int id, + const std::string& name, + PVConstLink volume, + const GeoTrf::Transform3D& transform, + const GeoTrf::Transform3D& defTransform); + + PVConstLink m_v0; + int m_icount = 0; +}; + + +void compareTransform (const GeoTrf::Transform3D& a, + const GeoTrf::Transform3D& b) +{ + assert (a.translation().isApprox(b.translation(), 1e-6)); + assert (a.rotation().isApprox(b.rotation(), 1e-6)); +} + + +void TestVisitor::operator() (int id, + const std::string& name, + PVConstLink volume, + const GeoTrf::Transform3D& transform, + const GeoTrf::Transform3D& defTransform) +{ + assert (m_v0->getIdOfChildVol (m_icount) == id); + assert (m_v0->getNameOfChildVol (m_icount) == name); + assert (m_v0->getChildVol (m_icount) == volume); + compareTransform (m_v0->getXToChildVol (m_icount), transform); + compareTransform (m_v0->getDefXToChildVol (m_icount), defTransform); + ++m_icount; +} + + +void test1() +{ + std::cout << "test1\n"; + PVConstLink v0 = makeTest(); + + TestVisitor visitor (v0); + geoVisitVolumes (visitor, &*v0); + assert (visitor.m_icount == 0); + + geoVisitVolumes ([&] (int id, + const std::string& name, + PVConstLink volume, + const GeoTrf::Transform3D& transform, + const GeoTrf::Transform3D& defTransform) + { visitor (id, name, volume, transform, defTransform); }, + &*v0); + assert (visitor.m_icount == 6); +} + + +void test2() +{ + std::cout << "test2\n"; + PVConstLink v0 = makeTest(); + + GeoVolumeVec_t vols = geoGetVolumes (&*v0); + + GeoTrf::Transform3D xform = GeoTrf::Transform3D::Identity(); + assert (vols.size() == 6); + assert (vols[0].first->getLogVol()->getName() == "l1"); + compareTransform (vols[0].second, xform); + + xform = xform * GeoTrf::TranslateX3D(1); + assert (vols[1].first->getLogVol()->getName() == "l2"); + compareTransform (vols[1].second, xform); + + assert (vols[2].first->getLogVol()->getName() == "l3"); + compareTransform (vols[2].second, xform); + + xform = xform * GeoTrf::TranslateY3D(1); + assert (vols[3].first->getLogVol()->getName() == "l3"); + compareTransform (vols[3].second, xform); + + xform = xform * GeoTrf::TranslateY3D(1); + assert (vols[4].first->getLogVol()->getName() == "l3"); + compareTransform (vols[4].second, xform); + + assert (vols[5].first->getLogVol()->getName() == "l4"); + compareTransform (vols[5].second, GeoTrf::Transform3D::Identity()); +} + + +int main() +{ + std::cout << "GeoModelFaserUtilities/test/GeoVisitVolumes_test\n"; + test1(); + test2(); + return 0; +} diff --git a/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoDbTagSvc.h b/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoDbTagSvc.h index e4e86248dfe0a3726675e20fe06114d2b555efca..ecb285ff291c3c6b7584d137f07de5d38f970c3d 100644 --- a/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoDbTagSvc.h +++ b/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoDbTagSvc.h @@ -38,6 +38,7 @@ class IGeoDbTagSvc : virtual public IInterface { virtual const std::string & sctVersion() const =0; virtual const std::string & dipoleVersion() const =0; virtual const std::string & caloVersion() const =0; + virtual const std::string & ecalVersion() const =0; // virtual const std::string & magFieldVersion() const =0; // virtual const std::string & cavernInfraVersion() const =0; @@ -51,6 +52,7 @@ class IGeoDbTagSvc : virtual public IInterface { virtual const std::string & sctVersionOverride() const =0; virtual const std::string & dipoleVersionOverride() const =0; virtual const std::string & caloVersionOverride() const =0; + virtual const std::string & ecalVersionOverride() const =0; // virtual const std::string & magFieldVersionOverride() const =0; // virtual const std::string & cavernInfraVersionOverride() const =0; diff --git a/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoModelSvc.h b/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoModelSvc.h index 8b2d442c356b65b27947c3381d0b808b8b0ffeaa..2268f87fb1f490b135f04aa8ed6c9d7ccb114763 100644 --- a/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoModelSvc.h +++ b/DetectorDescription/GeoModel/GeoModelInterfaces/GeoModelInterfaces/IGeoModelSvc.h @@ -36,6 +36,7 @@ public: virtual const std::string & sctVersion() const =0; virtual const std::string & dipoleVersion() const =0; virtual const std::string & caloVersion() const =0; + virtual const std::string & ecalVersion() const =0; // virtual const std::string & magFieldVersion() const =0; // virtual const std::string & cavernInfraVersion() const =0; @@ -49,15 +50,12 @@ public: virtual const std::string & dipoleVersionOverride() const =0; virtual const std::string & sctVersionOverride() const =0; virtual const std::string & caloVersionOverride() const =0; + virtual const std::string & ecalVersionOverride() const =0; // virtual const std::string & magFieldVersionOverride() const =0; // virtual const std::string & cavernInfraVersionOverride() const =0; virtual GeoModel::GeoConfig geoConfig() const = 0; - // Callback functions - virtual StatusCode align (IOVSVC_CALLBACK_ARGS) = 0; - virtual StatusCode compareTags (IOVSVC_CALLBACK_ARGS) = 0; - // Access to subsystem tool for callback registration virtual const IGeoModelTool* getTool(std::string toolName) const = 0; diff --git a/DetectorDescription/GeoModel/GeoModelSvc/CMakeLists.txt b/DetectorDescription/GeoModel/GeoModelSvc/CMakeLists.txt index f1d1eb48f09fef2dce86a4d62a4e84ed369951b4..f811a71d0a1ec656c5b1cd4444a7bc1f5f58836c 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/CMakeLists.txt +++ b/DetectorDescription/GeoModel/GeoModelSvc/CMakeLists.txt @@ -9,8 +9,7 @@ atlas_subdir( GeoModelSvc ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) -find_package( GeoModelCore ) -find_package( GeoModelIO COMPONENTS GeoModelWrite GeoModelDBManager) +find_package( GeoModel COMPONENTS GeoModelKernel GeoModelWrite GeoModelDBManager) find_package( Qt5 COMPONENTS Core Sql ) # Component(s) in the package: @@ -19,8 +18,8 @@ atlas_add_component( GeoModelSvc src/GeoDbTagSvc.cxx src/RDBMaterialManager.cxx src/components/GeoModelSvc_entries.cxx - INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} ${GEOMODELIO_INCLUDE_DIRS} ${QT5_INCLUDE_DIRS} - LINK_LIBRARIES ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} ${GEOMODELIO_LIBRARIES} ${QT5_LIBRARIES} AthenaBaseComps CxxUtils AthenaKernel SGTools StoreGateLib SGtests GeoModelUtilities GeoModelFaserUtilities EventInfo RDBAccessSvcLib EventInfoMgtLib GaudiKernel ) + INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${QT5_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} ${QT5_LIBRARIES} AthenaBaseComps CxxUtils AthenaKernel SGTools StoreGateLib SGtests GeoModelFaserUtilities EventInfo RDBAccessSvcLib EventInfoMgtLib GaudiKernel ) # Install files from the package: #atlas_install_joboptions( share/*.py ) diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx index 3ccdb51d776a995c25c61688b925ce536edd8d0a..f329c0f6d3b599c5a1971cc53ad1f52331c7aba2 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx @@ -105,9 +105,13 @@ StatusCode GeoDbTagSvc::setupTags() : m_SCTVersionOverride); m_CaloVersion = (m_CaloVersionOverride.empty() - ? rdbAccessSvc->getChildTag("Calorimeter", m_FaserVersion,"FASER", "FASERDD") + ? rdbAccessSvc->getChildTag("Calorimeter", m_FaserVersion, "FASER", "FASERDD") : m_CaloVersionOverride); + m_EcalVersion = (m_EcalVersionOverride.empty() + ? rdbAccessSvc->getChildTag("Ecal", m_CaloVersion, "Calorimeter", "FASERDD") + : m_EcalVersionOverride); + // m_MagFieldVersion = (m_MagFieldVersionOverride.empty() // ? rdbAccessSvc->getChildTag("MagneticField",m_AtlasVersion,"ATLAS") // : m_MagFieldVersionOverride); diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.h b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.h index d965325d4c004349976f4f7e43c243a644d65dce..c7ed5637321b3e6a4124e39d40c72d8e3091a207 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.h +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.h @@ -36,8 +36,9 @@ class GeoDbTagSvc : public AthService, virtual public IGeoDbTagSvc void setPreshowerVersionOverride(const std::string& tag) { m_PreshowerVersionOverride=tag; } void setTrackerVersionOverride(const std::string& tag) { m_TrackerVersionOverride=tag; } void setSCTVersionOverride(const std::string& tag) { m_SCTVersionOverride=tag; } - void setDipoleVersionOverride(const std::string& tag) { m_DipoleVersionOverride=tag; } + void setDipoleVersionOverride(const std::string& tag) { m_DipoleVersionOverride=tag; } void setCaloVersionOverride(const std::string& tag) { m_CaloVersionOverride=tag; } + void setEcalVersionOverride(const std::string& tag) { m_EcalVersionOverride=tag; } // void setMagFieldVersionOverride(const std::string& tag) { m_MagFieldVersionOverride=tag; } // void setCavernInfraVersionOverride(const std::string& tag) { m_CavernInfraVersionOverride=tag; } @@ -56,6 +57,7 @@ class GeoDbTagSvc : public AthService, virtual public IGeoDbTagSvc const std::string & sctVersionOverride() const { return m_SCTVersionOverride; } const std::string & dipoleVersionOverride() const { return m_DipoleVersionOverride; } const std::string & caloVersionOverride() const { return m_CaloVersionOverride; } + const std::string & ecalVersionOverride() const { return m_EcalVersionOverride; } // const std::string & magFieldVersionOverride() const { return m_MagFieldVersionOverride; } // const std::string & cavernInfraVersionOverride() const { return m_CavernInfraVersionOverride; } @@ -69,6 +71,7 @@ class GeoDbTagSvc : public AthService, virtual public IGeoDbTagSvc const std::string & sctVersion() const { return m_SCTVersion; } const std::string & dipoleVersion() const { return m_DipoleVersion; } const std::string & caloVersion() const { return m_CaloVersion; } + const std::string & ecalVersion() const { return m_EcalVersion; } // const std::string & magFieldVersion() const { return m_MagFieldVersion; } // const std::string & cavernInfraVersion() const { return m_CavernInfraVersion; } @@ -87,6 +90,7 @@ class GeoDbTagSvc : public AthService, virtual public IGeoDbTagSvc std::string m_SCTVersion; std::string m_DipoleVersion; std::string m_CaloVersion; + std::string m_EcalVersion; // std::string m_MagFieldVersion; // std::string m_CavernInfraVersion; @@ -100,6 +104,7 @@ class GeoDbTagSvc : public AthService, virtual public IGeoDbTagSvc std::string m_SCTVersionOverride; std::string m_DipoleVersionOverride; std::string m_CaloVersionOverride; + std::string m_EcalVersionOverride; // std::string m_MagFieldVersionOverride; // std::string m_CavernInfraVersionOverride; diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx index b2218f45b7847163893155abb888dfd70753b413..4f728d36e0d6a1798d262c10cc4267b8f4d9089b 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx @@ -7,7 +7,7 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoVolumeCursor.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "GeoModelDBManager/GMDBManager.h" #include "GeoModelWrite/WriteGeoModel.h" @@ -23,8 +23,6 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBRecord.h" -#include "EventInfo/TagInfo.h" - #include "GeoModelKernel/GeoPerfUtils.h" #include <fstream> #include <filesystem> @@ -32,6 +30,7 @@ #include "AthenaKernel/ClassID_traits.h" #include "SGTools/DataProxy.h" + GeoModelSvc::GeoModelSvc(const std::string& name,ISvcLocator* svc) : AthService(name,svc), m_detectorTools(this), @@ -45,7 +44,6 @@ GeoModelSvc::GeoModelSvc(const std::string& name,ISvcLocator* svc) m_callBackON(true), m_ignoreTagDifference(false), m_useTagInfo(true), - m_useCaloAlign(false), m_statisticsToFile(false), m_geoExportFile(""), m_supportedGeometry(0), @@ -64,6 +62,7 @@ GeoModelSvc::GeoModelSvc(const std::string& name,ISvcLocator* svc) declareProperty( "SCTVersionOverride", m_SCTVersionOverride); declareProperty( "DipoleVersionOverride", m_DipoleVersionOverride); declareProperty( "CaloVersionOverride", m_CaloVersionOverride); + declareProperty( "EcalVersionOverride", m_EcalVersionOverride); // declareProperty( "MagFieldVersionOverride", m_MagFieldVersionOverride); // declareProperty( "CavernInfraVersionOverride", m_CavernInfraVersionOverride); declareProperty( "AlignCallbacks", m_callBackON); @@ -111,13 +110,8 @@ StatusCode GeoModelSvc::initialize() ToolHandleArray< IGeoModelTool >::iterator itPriv = m_detectorTools.begin(), itPrivEnd = m_detectorTools.end(); - // **** **** **** TagInfo **** **** **** - std::string tagInfoKey = ""; - if(m_useTagInfo) { - // get the key ATH_CHECK( m_tagInfoMgr.retrieve() ); - tagInfoKey = m_tagInfoMgr->tagInfoKey(); } // build regular geometry @@ -142,12 +136,6 @@ StatusCode GeoModelSvc::initialize() } } else { - // _________________ Align functions NOT registered as callbacks _____________ - - // We want to register IGeoModelSvc::align() even if no alignment callback is registered by - // subsystem tools, such that clients like CaloTowerBuilder can simply go after IGeoModelSvc::align() - bool alignRegistered = false; - // Register align() functions for all Tools for (; itPriv!=itPrivEnd; ++itPriv) { IGeoModelTool* theTool = &(**itPriv); @@ -155,59 +143,14 @@ StatusCode GeoModelSvc::initialize() if(StatusCode::SUCCESS != theTool->registerCallback()) { ATH_MSG_DEBUG("IGeoModelTool::align() was not registerred on CondDB object for the tool " << theTool->name()); } - else { - if(StatusCode::SUCCESS == m_detStore->regFcn(&IGeoModelTool::align,theTool, - &IGeoModelSvc::align,dynamic_cast<IGeoModelSvc*>(this))) { - ATH_MSG_DEBUG("IGeoModelSvc::align() callback registered for the tool " << theTool->name()); - alignRegistered = true; - - // Set useCaloAlign flag if the successful tool is LAr - if((*itPriv).typeAndName().find("LAr")!=std::string::npos) { - m_useCaloAlign = true; - } - } - else { - ATH_MSG_DEBUG("Unable to register callback on IGeoModelSvc::align() for the tool " << theTool->name()); - } - } } - // Retrieve a tool for Calo Alignments - // if(m_useCaloAlign) { - // IGeoAlignTool* calo_align{nullptr}; - // if(m_toolSvc->retrieveTool("CaloAlignTool",calo_align)!=StatusCode::SUCCESS) { - // ATH_MSG_INFO("Unable to retrieve CaloAlignTool. No Calo alignments in this job"); - // } - // else { - // ATH_MSG_DEBUG("CaloAligntTool retrieved successfully"); - // } - // } - // Register a callback on TagInfo in order to compare geometry configurations defined in job options // to the one read from the input file if(m_useTagInfo) { - const DataHandle<TagInfo> tagInfoH; - if(m_detStore->regFcn(&IGeoModelSvc::compareTags,dynamic_cast<IGeoModelSvc*>(this), tagInfoH, tagInfoKey) != StatusCode::SUCCESS) { - ATH_MSG_WARNING("Cannot register compareTags function for key " << tagInfoKey); - } - else { - ATH_MSG_DEBUG("Registered compareTags callback for key: " << tagInfoKey); - - if(!alignRegistered) { - // There is no successfull alignment callback registration from subsystems - // Register IGeoModelSvc::align() after IGeoModelSvc::compareTags() then - if(m_detStore->regFcn(&IGeoModelSvc::compareTags,dynamic_cast<IGeoModelSvc*>(this), - &IGeoModelSvc::align,dynamic_cast<IGeoModelSvc*>(this)) == StatusCode::SUCCESS) { - ATH_MSG_DEBUG("Registered IGeoModelSvc::align() after IGeoModelSvc::compareTags()"); - } - else { - ATH_MSG_WARNING("Cannot register IGeoModelSvc::align() after IGeoModelSvc::compareTags()"); - } - } - } - - // Fill in the contents of TagInfo - ATH_CHECK(fillTagInfo()); + m_tagInfoMgr->addListener( this ); + // Fill in the contents of TagInfo + ATH_CHECK(fillTagInfo()); } } @@ -216,6 +159,7 @@ StatusCode GeoModelSvc::initialize() StatusCode GeoModelSvc::finalize() { + m_tagInfoMgr->removeListener(this); return StatusCode::SUCCESS; } @@ -251,6 +195,7 @@ StatusCode GeoModelSvc::geoInit() ATH_MSG_DEBUG("* SCT tag: " << m_SCTVersionOverride); ATH_MSG_DEBUG("* Dipole tag: " << m_DipoleVersionOverride); ATH_MSG_DEBUG("* Calo tag: " << m_CaloVersionOverride); + ATH_MSG_DEBUG("* Ecal tag: " << m_EcalVersionOverride); // ATH_MSG_DEBUG("* MagField tag: " << m_MagFieldVersionOverride); // ATH_MSG_DEBUG("* CavernInfra tag: " << m_CavernInfraVersionOverride); @@ -322,6 +267,7 @@ StatusCode GeoModelSvc::geoInit() dbTagSvc->setSCTVersionOverride(m_SCTVersionOverride); dbTagSvc->setDipoleVersionOverride(m_DipoleVersionOverride); dbTagSvc->setCaloVersionOverride(m_CaloVersionOverride); + dbTagSvc->setEcalVersionOverride(m_EcalVersionOverride); // dbTagSvc->setMagFieldVersionOverride(m_MagFieldVersionOverride); // dbTagSvc->setCavernInfraVersionOverride(m_CavernInfraVersionOverride); @@ -401,7 +347,7 @@ StatusCode GeoModelSvc::geoInit() { PVConstLink world(worldPhys); GMDBManager db(m_geoExportFile.c_str()); - if (db.isOpen()) + if (db.checkIsDBOpen()) { GeoModelIO::WriteGeoModel dump{db}; world->exec(&dump); @@ -412,27 +358,19 @@ StatusCode GeoModelSvc::geoInit() return StatusCode::SUCCESS; } -StatusCode GeoModelSvc::align(IOVSVC_CALLBACK_ARGS) +void GeoModelSvc::tagInfoUpdated() { - ATH_MSG_DEBUG("GeoModelSvc::align() called"); - return StatusCode::SUCCESS; + compareTags().ignore(); } -StatusCode GeoModelSvc::compareTags(IOVSVC_CALLBACK_ARGS) +StatusCode GeoModelSvc::compareTags() { bool tagsMatch = true; - - ATH_MSG_DEBUG("GeoModelSvc::compareTags() callback trigerred"); - - // Get TagInfo and retrieve tags - const TagInfo* tagInfo = 0; - ATH_CHECK( m_detStore->retrieve(tagInfo) ); - - TagInfo::NameTagPairVec pairs; - tagInfo->getInputTags(pairs); + // Get tags from TagInfoMgr + const ITagInfoMgr::NameTagPairVec pairs = m_tagInfoMgr->getInputTags(); for( const auto& pair : pairs ) { std::string tagPairName = pair.first; - if(tagPairName=="GeoAtlas") { + if(tagPairName=="GeoFaser") { // ** Two possible cases need to be taken into account // ** // ** 1. The retrieved FASER tag is following naming schema FASER-...-XX-YY-ZZ @@ -505,6 +443,8 @@ StatusCode GeoModelSvc::compareTags(IOVSVC_CALLBACK_ARGS) tagsMatch = m_DipoleVersionOverride == pair.second; else if(tagPairName=="GeoCalo") tagsMatch = m_CaloVersionOverride == pair.second; + else if(tagPairName=="GeoEcal") + tagsMatch = m_EcalVersionOverride == pair.second; if(!tagsMatch) break; } @@ -524,6 +464,7 @@ StatusCode GeoModelSvc::compareTags(IOVSVC_CALLBACK_ARGS) ATH_MSG_INFO("* SCT tag: " << m_SCTVersionOverride); ATH_MSG_INFO("* Dipole tag: " << m_DipoleVersionOverride); ATH_MSG_INFO("* Calo tag: " << m_CaloVersionOverride); + ATH_MSG_INFO("* Ecal tag: " << m_EcalVersionOverride); // ATH_MSG_INFO("* MagField tag: " << m_MagFieldVersionOverride); // ATH_MSG_INFO("* CavernInfra tag: " << m_CavernInfraVersionOverride); ATH_MSG_INFO("** TAG INFO configuration: "); @@ -551,6 +492,8 @@ StatusCode GeoModelSvc::compareTags(IOVSVC_CALLBACK_ARGS) ATH_MSG_INFO("*Dipole tag: " << pair.second); else if(tagPairName=="GeoCalo") ATH_MSG_INFO("*Calo tag: " << pair.second); + else if(tagPairName=="GeoEcal") + ATH_MSG_INFO("*Ecal tag: " << pair.second); // else if(tagPairName=="GeoMagField") // ATH_MSG_INFO("*MagField tag: " << pair.second); // else if(tagPairName=="GeoCavernInfra") @@ -653,6 +596,13 @@ StatusCode GeoModelSvc::fillTagInfo() const } } + if(m_EcalVersionOverride != "") { + if(m_tagInfoMgr->addTag("GeoEcal",m_EcalVersionOverride).isFailure()) { + ATH_MSG_ERROR("GeoModelSvc Ecal tag: " << m_EcalVersionOverride << " not added to TagInfo " ); + return StatusCode::FAILURE; + } + } + // if(m_MagFieldVersionOverride != "") { // if(m_tagInfoMgr->addTag("GeoMagField",m_MagFieldVersionOverride).isFailure()) { // ATH_MSG_ERROR("GeoModelSvc MagField tag: " << m_MagFieldVersionOverride << " not added to TagInfo "); diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h index b03a87ad4ca3395dfed170a746776050939ec7fb..e3880ced363400cb05ff949091346511d5c90c86 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h @@ -22,8 +22,9 @@ class ISvcLocator; template <class TYPE> class SvcFactory; -class GeoModelSvc : public AthService, virtual public IGeoModelSvc { - +class GeoModelSvc : public AthService, virtual public IGeoModelSvc, + virtual public ITagInfoMgr::Listener +{ public: virtual StatusCode initialize(); @@ -36,8 +37,10 @@ public: // N.B. Don't forget to release the interface after use!!! virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ); - virtual StatusCode align (IOVSVC_CALLBACK_ARGS); - virtual StatusCode compareTags (IOVSVC_CALLBACK_ARGS); + /// Callback from TagInfoMgr on TagInfo change + virtual void tagInfoUpdated() override final; + + StatusCode compareTags(); virtual const IGeoModelTool* getTool(std::string toolName) const; @@ -82,6 +85,7 @@ private: std::string m_SCTVersionOverride; std::string m_DipoleVersionOverride; std::string m_CaloVersionOverride; + std::string m_EcalVersionOverride; // std::string m_MagFieldVersionOverride; // std::string m_CavernInfraVersionOverride; @@ -90,7 +94,6 @@ private: bool m_ignoreTagDifference; // Keep going if TagInfo and property tags are different // when geometry configured manually bool m_useTagInfo; // Flag for TagInfo usage - bool m_useCaloAlign; // Flag for using alignments for Calo bool m_statisticsToFile; // Flag for generating GeoModelStatistics file in the run directory std::string m_geoExportFile; // Name of file to export GeoModel trees (constructed geometry) to @@ -108,6 +111,7 @@ private: const std::string & sctVersionOverride() const {return m_SCTVersionOverride ;} const std::string & dipoleVersionOverride() const {return m_DipoleVersionOverride; } const std::string & caloVersionOverride() const {return m_CaloVersionOverride ;} + const std::string & ecalVersionOverride() const {return m_EcalVersionOverride ;} // const std::string & magFieldVersionOverride() const {return m_MagFieldVersionOverride ;} // const std::string & cavernInfraVersionOverride() const {return m_CavernInfraVersionOverride ;} @@ -121,6 +125,7 @@ private: const std::string & sctVersion() const {return m_geoDbTagSvc->sctVersion(); } const std::string & dipoleVersion() const {return m_geoDbTagSvc->dipoleVersion(); } const std::string & caloVersion() const {return m_geoDbTagSvc->caloVersion(); } + const std::string & ecalVersion() const {return m_geoDbTagSvc->ecalVersion(); } // const std::string & magFieldVersion() const {return m_geoDbTagSvc->magFieldVersion(); } // const std::string & cavernInfraVersion() const {return m_geoDbTagSvc->cavernInfraVersion(); } diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx index f48cc362c2c603fbd06b3633a3c625572f1749f6..dd440226fdff6abfc3e609d4f705e92884edd61e 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx @@ -269,12 +269,12 @@ GeoMaterial* RDBMaterialManager::searchMaterialMap(const std::string & name) if (m!=end) { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchMaterialMap(): search success " << endmsg; + log << MSG::VERBOSE << " ***** in searchMaterialMap(" << name << "): cache search success " << endmsg; return (*m).second; } else { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchMaterialMap(): search fail " << endmsg; + log << MSG::VERBOSE << " ***** in searchMaterialMap(" << name << "): cache search fail " << endmsg; return NULL; } } @@ -287,12 +287,12 @@ GeoMaterial* RDBMaterialManager::searchMaterialMap(const std::string & name) con std::map< std::string, GeoMaterial * >::const_iterator end = m_materialMap.end(); if (m!=end) { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchMaterialMap(): search success " << endmsg; + log << MSG::VERBOSE << " ***** in searchMaterialMap(" << name << "): cache search success " << endmsg; return (*m).second; } else { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchMaterialMap(): search fail " << endmsg; + log << MSG::VERBOSE << " ***** in searchMaterialMap(" << name << "): cache search fail " << endmsg; return NULL; } } @@ -307,12 +307,12 @@ GeoElement *RDBMaterialManager::searchElementVector(const std::string & name) if (e!=m_elementVector.end()) { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchElementVector() search succes " << endmsg; + log << MSG::VERBOSE << " ***** in searchElementVector(" << name << ") cache search success " << endmsg; return *e; } else { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchElementVector() search fail " << endmsg; + log << MSG::VERBOSE << " ***** in searchElementVector(" << name << ") cache search fail " << endmsg; return NULL; } } @@ -327,12 +327,12 @@ GeoElement *RDBMaterialManager::searchElementVector(const std::string & name) c if (e!=m_elementVector.end()) { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchElementVector() search succes " << endmsg; + log << MSG::VERBOSE << " ***** in searchElementVector(" << name << ") cache search success " << endmsg; return *e; } else { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchElementVector() search fail " << endmsg; + log << MSG::VERBOSE << " ***** in searchElementVector(" << name << ") cache search fail " << endmsg; return NULL; } } @@ -347,12 +347,12 @@ GeoElement *RDBMaterialManager::searchElementVector(const unsigned int atomicNum if (e!=m_elementVector.end()) { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchElementVector(atomicNumber) search succes " << endmsg; + log << MSG::VERBOSE << " ***** in searchElementVector(atomicNumber = " << atomicNumber << ") cache search succes " << endmsg; return *e; } else { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchElementVector(atomicNumber) search succes " << endmsg; + log << MSG::VERBOSE << " ***** in searchElementVector(atomicNumber = " << atomicNumber << ") cache search success " << endmsg; return NULL; } } @@ -366,12 +366,12 @@ GeoElement *RDBMaterialManager::searchElementVector(const unsigned int atomicNum if (e!=m_elementVector.end()) { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchElementVector(atomicNumber) search succes " << endmsg; + log << MSG::VERBOSE << " ***** in searchElementVector(atomicNumber = " << atomicNumber << ") cache search success " << endmsg; return *e; } else { if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** in searchElementVector(atomicNumber) search succes " << endmsg; + log << MSG::VERBOSE << " ***** in searchElementVector(atomicNumber = " << atomicNumber << ") cache search success " << endmsg; return NULL; } } @@ -918,10 +918,10 @@ GeoElement *RDBMaterialManager::getElement(unsigned int atomicNumber) { void RDBMaterialManager::addMaterial(const std::string & space, GeoMaterial *material) { MsgStream log(Athena::getMessageSvc(), "GeoModelSvc::RDBMaterialManager"); + std::string key = space + std::string("::")+ std::string(material->getName()); if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** RDBMaterialManager::addMaterial() "<<endmsg; + log << MSG::VERBOSE << " ***** RDBMaterialManager::addMaterial(" << key << ") "<<endmsg; - std::string key = space + std::string("::")+ std::string(material->getName()); // Check whether we already have materials with the same space::name defined if(m_materialMap.find(key)!=m_materialMap.end()) log << MSG::WARNING << " Attempt to redefine material " << key << "!. The existing instance is kept. Please choose another name for new material" << endmsg; @@ -935,10 +935,10 @@ void RDBMaterialManager::addMaterial(const std::string & space, GeoMaterial *mat void RDBMaterialManager::addMaterial(const std::string & space, GeoMaterial *material) const { MsgStream log(Athena::getMessageSvc(), "GeoModelSvc::RDBMaterialManager"); + std::string key = space + std::string("::")+ std::string(material->getName()); if(log.level()==MSG::VERBOSE) - log << MSG::VERBOSE << " ***** RDBMaterialManager::addMaterial() "<<endmsg; + log << MSG::VERBOSE << " ***** RDBMaterialManager::addMaterial(" << key << ") "<<endmsg; - std::string key = space + std::string("::")+ std::string(material->getName()); // Check whether we already have materials with the same space::name defined if(m_materialMap.find(key)!=m_materialMap.end()) log << MSG::WARNING << " Attempt to redefine material " << key << "!. The existing instance is kept. Please choose another name for new material" << endmsg; diff --git a/DetectorDescription/IdDictDetDescrCnv/CMakeLists.txt b/DetectorDescription/IdDictDetDescrCnv/CMakeLists.txt index bbcc1218c391f5072fb35160dd402b06f4c7502c..3980a969cac36749b7f84a803c82bd5cadcd9ff4 100644 --- a/DetectorDescription/IdDictDetDescrCnv/CMakeLists.txt +++ b/DetectorDescription/IdDictDetDescrCnv/CMakeLists.txt @@ -13,7 +13,7 @@ find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) atlas_add_component( IdDictDetDescrCnv src/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps CxxUtils AthenaKernel StoreGateLib SGtests FaserDetDescr DetDescrCnvSvcLib GeoModelUtilities GeoModelFaserUtilities IdDictDetDescr IdDictParser Identifier GaudiKernel ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps CxxUtils AthenaKernel StoreGateLib SGtests FaserDetDescr DetDescrCnvSvcLib GeoModelFaserUtilities IdDictDetDescr IdDictParser Identifier GaudiKernel ) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/Event/FaserByteStreamCnvSvc/src/FaserByteStreamInputSvc.cxx b/Event/FaserByteStreamCnvSvc/src/FaserByteStreamInputSvc.cxx index d15e84c0e57eaf9f537f8d7405ae667211b33ccd..64e263a8bb64ad5730e1a53358e63631d0d2d67d 100644 --- a/Event/FaserByteStreamCnvSvc/src/FaserByteStreamInputSvc.cxx +++ b/Event/FaserByteStreamCnvSvc/src/FaserByteStreamInputSvc.cxx @@ -10,7 +10,6 @@ #include "FaserByteStreamCnvSvcBase/FaserByteStreamAddress.h" #include "FaserEventStorage/pickFaserDataReader.h" -#include "GaudiKernel/IJobOptionsSvc.h" #include "Gaudi/Property.h" #include "PersistentDataModel/DataHeader.h" diff --git a/Event/FaserByteStreamCnvSvc/src/FaserEventSelectorByteStream.cxx b/Event/FaserByteStreamCnvSvc/src/FaserEventSelectorByteStream.cxx index a53bc53c9876d1ce6cc12c32ae78d6e860739912..ef11d4c96265b1a8c8bd74e373dc59a8be8299cd 100644 --- a/Event/FaserByteStreamCnvSvc/src/FaserEventSelectorByteStream.cxx +++ b/Event/FaserByteStreamCnvSvc/src/FaserEventSelectorByteStream.cxx @@ -18,7 +18,6 @@ #include "GaudiKernel/FileIncident.h" #include "GaudiKernel/IIncidentSvc.h" #include "GaudiKernel/IIoComponentMgr.h" -#include "GaudiKernel/IJobOptionsSvc.h" #include "AthenaKernel/IAthenaIPCTool.h" #include "EventInfo/EventInfo.h" @@ -103,48 +102,11 @@ StatusCode FaserEventSelectorByteStream::initialize() { } // Check for input setting - if (m_filebased && m_inputCollectionsProp.value().size() == 0) { - ATH_MSG_WARNING("InputCollections not properly set, checking EventStorageInputSvc properties"); - ServiceHandle<IJobOptionsSvc> joSvc("JobOptionsSvc", name()); - bool retrieve(false); - if (!joSvc.retrieve().isSuccess()) { - ATH_MSG_FATAL("Cannot get JobOptionsSvc."); - } else { - // Check if FullFileName is set in the InputSvc - typedef std::vector<const Gaudi::Details::PropertyBase*> Properties_t; - //const Properties_t* esProps = joSvc->getProperties("FaserByteStreamInputSvc"); - const Properties_t* esProps = joSvc->getProperties(m_eventSourceName); - - std::vector<const Gaudi::Details::PropertyBase*>::const_iterator ii = esProps->begin(); - if (esProps != 0) { - while (ii != esProps->end()) { - if ((*ii)->name() == "FullFileName") { - StringArrayProperty temp; - if ((*ii)->load(temp)) { - retrieve = true; - m_inputCollectionsProp.assign(temp); - m_inputCollectionsFromIS = true; - ATH_MSG_INFO("Retrieved InputCollections from InputSvc"); - } - } - if ((*ii)->name() == "EventStore") { - StringProperty temp2; - if ((*ii)->load(temp2)) { - m_evtStore = ServiceHandle<StoreGateSvc>(temp2.value(),this->name()); - ATH_MSG_INFO("Retrieved StoreGateSvc name of " << temp2); - } - } - ++ii; - } - } else { - ATH_MSG_WARNING("Did not find InputSvc jobOptions properties"); - } - } - if (!retrieve) { - ATH_MSG_FATAL("Unable to retrieve valid input list"); - return(StatusCode::FAILURE); - } + if (m_filebased && m_inputCollectionsProp.value().empty()) { + ATH_MSG_FATAL("Unable to retrieve valid input list"); + return(StatusCode::FAILURE); } + m_skipEventSequence = m_skipEventSequenceProp.value(); std::sort(m_skipEventSequence.begin(), m_skipEventSequence.end()); @@ -210,42 +172,6 @@ StatusCode FaserEventSelectorByteStream::initialize() { if (!allGood) { return(StatusCode::FAILURE); } - - // For backward compatibility, check InputSvc properties for bad events - ServiceHandle<IJobOptionsSvc> joSvc("JobOptionsSvc", name()); - if (!joSvc.retrieve().isSuccess()) { - ATH_MSG_FATAL("Cannot get JobOptionsSvc."); - return(StatusCode::FAILURE); - } - typedef std::vector<const Gaudi::Details::PropertyBase*> Properties_t; - //const Properties_t* esProps = joSvc->getProperties("FaserByteStreamInputSvc"); - const Properties_t* esProps = joSvc->getProperties(m_eventSourceName); - if (esProps != 0) { - std::vector<const Gaudi::Details::PropertyBase*>::const_iterator ii = esProps->begin(); - while (ii != esProps->end()) { - IntegerProperty temp; - if ((*ii)->name() == "MaxBadEvents") { // find it - if ((*ii)->load(temp)) { // load it - if (temp.value() != -1) { // check if it is set - m_maxBadEvts = temp.value(); - ATH_MSG_INFO("Retrieved MaxBadEvents=" << m_maxBadEvts << " from ByteStreamInputSvc"); - } - } - } - BooleanProperty temp2; - if ((*ii)->name() == "ProcessBadEvents") { // find it - if ((*ii)->load(temp)) { // load it - if (temp.value()) { // check if it is set - m_procBadEvent = temp.value(); - ATH_MSG_INFO("Retrieved ProcessBadEvents=" << m_procBadEvent << " from ByteStreamInputSvc"); - } - } - } - ++ii; - } - } else { - ATH_MSG_WARNING("Did not find FaserByteStreamInputSvc jobOptions properties"); - } // Must happen before trying to open a file StatusCode risc = this->reinit(); diff --git a/Generators/FaserCosmicGenerator/README.md b/Generators/FaserCosmicGenerator/README.md index 3490a12099ef825fab6fea08fa4fcca8e4b13f90..36032771d5612d4d8280056497c1483ace53e288 100644 --- a/Generators/FaserCosmicGenerator/README.md +++ b/Generators/FaserCosmicGenerator/README.md @@ -2,11 +2,11 @@ ## Setup -In Athena 22.0.19, the scipy module is missing from the LCG environment for some reason. +In Athena 22.0.29, the scipy module is missing from the LCG environment for some reason. To use the generator, the following command is required after the usual steps to setup the release: -`lsetup "lcgenv -p LCG_98python3_ATLAS_2 x86_64-centos7-gcc8-opt scipy"` +`lsetup "lcgenv -p LCG_98python3_ATLAS_8 x86_64-centos7-gcc8-opt scipy"` ## Usage diff --git a/Legacy/LegacyBase/CMakeLists.txt b/Legacy/LegacyBase/CMakeLists.txt deleted file mode 100644 index a85175384ac80f6b23500112367909d8a1b8929c..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -################################################################################ -# Package: LegacyBase -# Contains objects written to TDR ntuple -################################################################################ - - -# Declare the package name: -atlas_subdir( LegacyBase ) - -# External dependencies: -find_package( CLHEP ) -find_package( ROOT COMPONENTS Core Tree RIO pthread Physics ) -find_package( Geant4 ) - -atlas_add_library( LegacyBase - LegacyBase/*.h src/*.cxx - PUBLIC_HEADERS LegacyBase - #INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - #PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - #LINK_LIBRARIES ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} - #PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} - INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} -) - -atlas_add_dictionary( LegacyBaseDict - LegacyBase/LegacyBaseDict.h - LegacyBase/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES LegacyBase ${ROOT_LIBRARIES} -# DATA_LINKS LegacyBase - ) - -#atlas_generate_cliddb( LegacyBase ) - -# Install files from the package: -atlas_install_headers( LegacyBase ) diff --git a/Legacy/LegacyBase/LegacyBase/FaserCaloDigi.h b/Legacy/LegacyBase/LegacyBase/FaserCaloDigi.h deleted file mode 100644 index b88803b905b925def3ba1c07e813c81c7cf58480..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/LegacyBase/FaserCaloDigi.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef FaserCaloDigi_h -#define FaserCaloDigi_h 1 - -#include "G4Types.hh" -#include "G4VDigi.hh" -#include "G4TDigiCollection.hh" -#include "G4Allocator.hh" -#include "G4AffineTransform.hh" -#include "G4Colour.hh" - -class FaserDetectorConstruction; - -class FaserCaloDigi: public G4VDigi -{ - public: - FaserCaloDigi(); - virtual ~FaserCaloDigi(); - - FaserCaloDigi(const FaserCaloDigi&); - const FaserCaloDigi& operator=(const FaserCaloDigi&); - int operator==(const FaserCaloDigi&) const; - - inline void* operator new(size_t); - inline void operator delete(void*); - - virtual void Draw(); - virtual void Print(); - virtual G4Colour QtoC(); - - private: - - G4int fModuleID; - G4int fTowerID; - G4AffineTransform fTransform; - G4double fEnergy; - std::map<G4int, G4double> fTracks; - - static const FaserDetectorConstruction* fDetectorConstruction; - - public: - - inline void SetModule(G4int module) { fModuleID = module; }; - inline void SetTower(G4int tower) { fTowerID = tower; }; - inline void SetTransform(G4AffineTransform transform) - { fTransform = transform; } - inline void SetEnergy(G4double energy){ fEnergy = energy; }; - inline void AddTrack(G4int trackID, G4double energy) - { fTracks[trackID] += energy; fEnergy += energy; } - - inline G4int Module() const { return fModuleID; }; - inline G4int Tower() const { return fTowerID; }; - inline G4AffineTransform Transform() const - { return fTransform; } - inline G4double Energy() const { return fEnergy; }; - inline std::map<G4int, G4double> Tracks() const - { return fTracks; } -}; - -typedef G4TDigiCollection<FaserCaloDigi> FaserCaloDigiCollection; - -extern G4ThreadLocal G4Allocator<FaserCaloDigi>* faserCaloDigiAllocator; - -inline void* FaserCaloDigi::operator new(size_t) -{ - if (!faserCaloDigiAllocator) - faserCaloDigiAllocator = new G4Allocator<FaserCaloDigi>; - return (void *) faserCaloDigiAllocator->MallocSingle(); -} - -inline void FaserCaloDigi::operator delete(void* aDigi) -{ - faserCaloDigiAllocator->FreeSingle((FaserCaloDigi*) aDigi); -} - -#endif diff --git a/Legacy/LegacyBase/LegacyBase/FaserCaloHit.h b/Legacy/LegacyBase/LegacyBase/FaserCaloHit.h deleted file mode 100644 index 00d3d09fb80cc3ab086306b834e69fb7cafe35f8..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/LegacyBase/FaserCaloHit.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef FaserCaloHit_h -#define FaserCaloHit_h 1 - -#include "G4Types.hh" -#include "G4VHit.hh" -#include "G4THitsCollection.hh" -#include "G4Allocator.hh" -#include "G4ThreeVector.hh" -#include "G4AffineTransform.hh" -//#include "FaserDetectorConstruction.hh" -#include "tls.hh" - -class FaserDetectorConstruction; - -// Hit class for the Faser silicon sensor -// - -class FaserCaloHit : public G4VHit -{ - public: - - FaserCaloHit(); - FaserCaloHit(const FaserCaloHit&); - virtual ~FaserCaloHit(); - - const FaserCaloHit& operator=(const FaserCaloHit&); - G4int operator==(const FaserCaloHit&); - - inline void* operator new(size_t); - inline void operator delete(void*); - - // over-ridden methods - virtual void Draw(); - virtual void Print(); - - // setters - void SetPlane(G4int plane) { fPlaneID = plane; }; - void SetTower(G4int tower) { fTowerID = tower; } - void SetModule(G4int module) { fModuleID = module; } - void SetEdep(G4double de) { fEdep = de; }; - void SetGlobalPos(G4ThreeVector globalXYZ) { fGlobalPos = globalXYZ; }; - void SetLocalPos(G4ThreeVector localXYZ) { fLocalPos = localXYZ; }; - - void SetOriginTrack(G4int track) { fOriginTrackID = track; } - void SetSourceTrack(G4int track) { fSourceTrackID = track; } - - void SetTransform(G4AffineTransform transform ) - { fTransform = transform; } - - // getters - G4int Plane() const { return fPlaneID; }; - G4int Tower() const { return fTowerID; } - G4int Module() const { return fModuleID; } - G4double Edep() const { return fEdep; }; - G4ThreeVector GlobalPos() const { return fGlobalPos; }; - G4ThreeVector LocalPos() const { return fLocalPos; }; - - - G4int OriginTrack() const { return fOriginTrackID; } - G4int SourceTrack() const { return fSourceTrackID; } - - G4AffineTransform Transform() const { return fTransform; } - - private: - - G4int fPlaneID; - G4int fTowerID; - G4int fModuleID; - G4double fEdep; - G4ThreeVector fGlobalPos; - G4ThreeVector fLocalPos; - G4AffineTransform fTransform; - - G4int fOriginTrackID; - G4int fSourceTrackID; - - static const FaserDetectorConstruction* fDetectorConstruction; -}; - -typedef G4THitsCollection<FaserCaloHit> FaserCaloHitsCollection; - -extern G4ThreadLocal G4Allocator<FaserCaloHit>* FaserCaloHitAllocator; - -inline void* FaserCaloHit::operator new(size_t) -{ - if (!FaserCaloHitAllocator) - FaserCaloHitAllocator = new G4Allocator<FaserCaloHit>; - return (void *) FaserCaloHitAllocator->MallocSingle(); -} - -inline void FaserCaloHit::operator delete(void* hit) -{ - FaserCaloHitAllocator->FreeSingle((FaserCaloHit*) hit); -} - -#endif diff --git a/Legacy/LegacyBase/LegacyBase/FaserCluster.h b/Legacy/LegacyBase/LegacyBase/FaserCluster.h deleted file mode 100644 index 1e21ccb441c0dec3274a90c6a8fe0716525b2e3c..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/LegacyBase/FaserCluster.h +++ /dev/null @@ -1,54 +0,0 @@ -#pragma once - -#include "LegacyBase/FaserDigi.h" - -#include <vector> -#include <memory> - -//#include "globals.hh" - -// Cluster class for grouped Faser digits -// - -class FaserCluster { - -public: - - FaserCluster(); - - FaserCluster(int index, std::vector<FaserDigi*> & digis); - - FaserCluster(const FaserCluster& right); - - FaserCluster& operator=(const FaserCluster& right); - - virtual ~FaserCluster(); - - std::vector<FaserDigi*>& Digis() { return fDigis; } - - G4int Plane() const { return (fDigis.size() > 0 ? fDigis[0]->Plane() : -1); } - G4int Module() const { return (fDigis.size() > 0 ? fDigis[0]->Module() : -1); } - G4int Sensor() const { return (fDigis.size() > 0 ? fDigis[0]->Sensor() : -1); } - G4int Row() const { return (fDigis.size() > 0 ? fDigis[0]->Row() : -1); } - - std::vector<G4int> LocalMaxima() const { return fMaxima; } - G4double Charge() const { return fCharge; } - G4double WeightedStrip() const { return fWeightedStrip; } - G4ThreeVector GlobalPosition() const { return fGlobalPos; } - - G4int Index() const { return fIndex; } - -private: - G4int fIndex; - std::vector<FaserDigi*> fDigis; - - std::vector<G4int> fMaxima; - - G4double fCharge; - G4double fWeightedStrip; - G4ThreeVector fGlobalPos; - - void WeightedAverage(); - -}; - diff --git a/Legacy/LegacyBase/LegacyBase/FaserDigi.h b/Legacy/LegacyBase/LegacyBase/FaserDigi.h deleted file mode 100644 index b89f3a8b3e39a212498170293ed8945c45eea89f..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/LegacyBase/FaserDigi.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef FaserDigi_h -#define FaserDigi_h 1 - -#include "G4Types.hh" -#include "G4VDigi.hh" -#include "G4TDigiCollection.hh" -#include "G4Allocator.hh" -#include "G4ThreeVector.hh" -#include "G4AffineTransform.hh" -#include "G4Colour.hh" - -class FaserDetectorConstruction; - -class FaserDigi: public G4VDigi -{ - public: - FaserDigi(); - virtual ~FaserDigi(); - - FaserDigi(const FaserDigi&); - const FaserDigi& operator=(const FaserDigi&); - int operator==(const FaserDigi&) const; - - inline void* operator new(size_t); - inline void operator delete(void*); - - virtual void Draw(); - virtual void Print(); - virtual G4Colour QtoC(); - - private: - - G4int fPlaneID; - G4int fModuleID; - G4int fSensorID; - G4int fRowID; - G4int fStripID; - G4AffineTransform fTransform; - G4double fCharge; - std::map<G4int, G4double> fTracks; - - static const FaserDetectorConstruction* fDetectorConstruction; - - public: - - inline void SetPlane(G4int plane) { fPlaneID = plane; }; - inline void SetModule(G4int module) { fModuleID = module; }; - inline void SetSensor(G4int sensor) { fSensorID = sensor; }; - inline void SetRow(G4int row) { fRowID = row; }; - inline void SetStrip(G4int strip) { fStripID = strip; }; - inline void SetTransform(G4AffineTransform transform) - { fTransform = transform; } - inline void SetCharge(G4double charge) { fCharge = charge; }; - inline void AddTrack(G4int trackID, G4double charge) - { fTracks[trackID] += charge; } - - inline G4int Plane() const { return fPlaneID; }; - inline G4int Module() const { return fModuleID; }; - inline G4int Sensor() const { return fSensorID; }; - inline G4int Row() const { return fRowID; }; - inline G4int Strip() const { return fStripID; }; - inline G4AffineTransform Transform() const - { return fTransform; } - inline G4double Charge() const { return fCharge; }; - inline std::map<G4int, G4double> Tracks() const - { return fTracks; } -}; - -typedef G4TDigiCollection<FaserDigi> FaserDigiCollection; - -extern G4ThreadLocal G4Allocator<FaserDigi>* faserDigiAllocator; - -inline void* FaserDigi::operator new(size_t) -{ - if (!faserDigiAllocator) - faserDigiAllocator = new G4Allocator<FaserDigi>; - return (void *) faserDigiAllocator->MallocSingle(); -} - -inline void FaserDigi::operator delete(void* aDigi) -{ - faserDigiAllocator->FreeSingle((FaserDigi*) aDigi); -} - -#endif diff --git a/Legacy/LegacyBase/LegacyBase/FaserEvent.h b/Legacy/LegacyBase/LegacyBase/FaserEvent.h deleted file mode 100644 index 08593da18156ab33e3fb3d2d33835afdbb1d06e3..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/LegacyBase/FaserEvent.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef FASER_EVENT_HH -#define FASER_EVENT_HH 1 - -#include "LegacyBase/FaserTruthParticle.h" -#include "LegacyBase/FaserSensorHit.h" -#include "LegacyBase/FaserCaloHit.h" -#include "LegacyBase/FaserDigi.h" -#include "LegacyBase/FaserCaloDigi.h" -#include "LegacyBase/FaserCluster.h" -#include "LegacyBase/FaserSpacePoint.h" - -#include "G4Types.hh" -#include "G4TrajectoryContainer.hh" - -#include <map> -#include <vector> - -using std::map; -using std::vector; - -class FaserEvent -{ -public: - FaserEvent(); - FaserEvent(G4int eventNumber); - virtual ~FaserEvent(); - - G4int GetEventNumber() { return fEventNumber; } - void SetEventNumber(G4int eventNumber) { fEventNumber = eventNumber; } - - std::vector<FaserTruthParticle*>& Particles() { return fParticles; } - void SetParticles(G4TrajectoryContainer* particles); - - // create owned copies of objects managed by G4 - std::vector<FaserSensorHit*>& TrackerHits() { return fTrackerHits; } - void SetTrackerHits(const FaserSensorHitsCollection* hits) { for (G4int i=0; i < hits->entries(); i++) fTrackerHits.push_back(new FaserSensorHit(*(*hits)[i])); } - - std::vector<FaserSensorHit*>& SamplerHits() { return fSamplerHits; } - void SetSamplerHits(const FaserSensorHitsCollection* hits) { for (G4int i=0; i < hits->entries(); i++) fSamplerHits.push_back(new FaserSensorHit(*(*hits)[i])); } - - std::vector<FaserCaloHit*>& CaloHits() { return fCaloHits; } - void SetCaloHits(const FaserCaloHitsCollection* hits) { for (G4int i=0; i < hits->entries(); i++) fCaloHits.push_back(new FaserCaloHit(*(*hits)[i])); } - - std::vector<FaserDigi*> TrackerDigis()& { return fTrackerDigis; } - void SetTrackerDigis(const FaserDigiCollection* digis) { for (G4int i=0; i < digis->entries(); i++) fTrackerDigis.push_back(new FaserDigi(*(*digis)[i])); } - - std::vector<FaserDigi*> SamplerDigis()& { return fSamplerDigis; } - void SetSamplerDigis(const FaserDigiCollection* digis) { for (G4int i=0; i < digis->entries(); i++) fSamplerDigis.push_back(new FaserDigi(*(*digis)[i])); } - - std::vector<FaserCaloDigi*> CaloDigis()& { return fCaloDigis; } - void SetCaloDigis(const FaserCaloDigiCollection* digis) { for (G4int i=0; i < digis->entries(); i++) fCaloDigis.push_back(new FaserCaloDigi(*(*digis)[i])); } - - std::vector<FaserCluster*>& Clusters() { return fClusters; } - void SetClusters(); - - std::vector<FaserSpacePoint*>& SpacePoints() { return fSpacePoints; } - void SetSpacePoints(); - - -private: - G4int fEventNumber; - std::vector<FaserTruthParticle*> fParticles; - std::vector<FaserSensorHit*> fTrackerHits; - std::vector<FaserSensorHit*> fSamplerHits; - std::vector<FaserCaloHit*> fCaloHits; - std::vector<FaserDigi*> fTrackerDigis; - std::vector<FaserDigi*> fSamplerDigis; - std::vector<FaserCaloDigi*> fCaloDigis; - std::vector<FaserCluster*> fClusters; - std::vector<FaserSpacePoint*> fSpacePoints; - - //////////////////////////////////////////////////////////////////////////////// - // Utility methods for cluster finding // - - int rowID(FaserDigi* d); - vector<vector<FaserDigi*>> clusterOneRow(vector<FaserDigi*> digits); - void sortDigits(vector<FaserDigi*>& v); - map<int, vector<FaserDigi*>> mapDigitsByPlane(FaserEvent & evt); - map<int, vector<FaserDigi*>> mapDigitsByRow(vector<FaserDigi*> v); -}; - -#endif diff --git a/Legacy/LegacyBase/LegacyBase/FaserSensorHit.h b/Legacy/LegacyBase/LegacyBase/FaserSensorHit.h deleted file mode 100644 index 8e92ea0622fa80455dda45b36520e73ae95d6a5e..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/LegacyBase/FaserSensorHit.h +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef FaserSensorHit_h -#define FaserSensorHit_h 1 - -#include "G4Types.hh" -#include "G4VHit.hh" -#include "G4THitsCollection.hh" -#include "G4Allocator.hh" -#include "G4ThreeVector.hh" -#include "G4AffineTransform.hh" -//#include "FaserDetectorConstruction.hh" -#include "tls.hh" - -class FaserDetectorConstruction; - -// Hit class for the Faser silicon sensor -// - -class FaserSensorHit : public G4VHit -{ - public: - - FaserSensorHit(); - FaserSensorHit(const FaserSensorHit&); - virtual ~FaserSensorHit(); - - const FaserSensorHit& operator=(const FaserSensorHit&); - G4int operator==(const FaserSensorHit&); - - inline void* operator new(size_t); - inline void operator delete(void*); - - // over-ridden methods - virtual void Draw(); - virtual void Print(); - - // setters - void SetPlane(G4int plane) { fPlaneID = plane; }; - void SetModule(G4int module) { fModuleID = module; }; - void SetSensor(G4int sensor) { fSensorID = sensor; }; - void SetRow(G4int row) { fRowID = row; }; - void SetStrip(G4int strip) { fStripID = strip; }; - void SetEdep(G4double de) { fEdep = de; }; - void SetGlobalPos(G4ThreeVector globalXYZ) { fGlobalPos = globalXYZ; }; - void SetLocalPos(G4ThreeVector localXYZ) { fLocalPos = localXYZ; }; - void SetTransform(G4AffineTransform transform) { fTransform = transform; }; - - void SetTrack(G4int track) { fTrackID = track; }; - void SetEnergy(G4double te) { fEnergy = te; }; - - void SetOriginTrack(G4int track) { fOriginTrackID = track; } - - // getters - G4int Plane() const { return fPlaneID; }; - G4int Module() const { return fModuleID; }; - G4int Sensor() const { return fSensorID; }; - G4int Row() const { return fRowID; }; - G4int Strip() const { return fStripID; }; - G4double Edep() const { return fEdep; }; - G4ThreeVector GlobalPos() const { return fGlobalPos; }; - G4ThreeVector LocalPos() const { return fLocalPos; }; - G4AffineTransform Transform() const { return fTransform; } - - G4int Track() const { return fTrackID; }; - G4double Energy() const { return fEnergy; } - - G4int OriginTrack() const { return fOriginTrackID; }; - - private: - - G4int fPlaneID; - G4int fModuleID; - G4int fSensorID; - G4int fRowID; - G4int fStripID; - G4double fEdep; - G4ThreeVector fGlobalPos; - G4ThreeVector fLocalPos; - G4AffineTransform fTransform; - - G4int fTrackID; - G4double fEnergy; - - G4int fOriginTrackID; - - static const FaserDetectorConstruction* fDetectorConstruction; -}; - -typedef G4THitsCollection<FaserSensorHit> FaserSensorHitsCollection; - -extern G4ThreadLocal G4Allocator<FaserSensorHit>* FaserSensorHitAllocator; - -inline void* FaserSensorHit::operator new(size_t) -{ - if (!FaserSensorHitAllocator) - FaserSensorHitAllocator = new G4Allocator<FaserSensorHit>; - return (void *) FaserSensorHitAllocator->MallocSingle(); -} - -inline void FaserSensorHit::operator delete(void* hit) -{ - FaserSensorHitAllocator->FreeSingle((FaserSensorHit*) hit); -} - -#endif diff --git a/Legacy/LegacyBase/LegacyBase/FaserSpacePoint.h b/Legacy/LegacyBase/LegacyBase/FaserSpacePoint.h deleted file mode 100644 index 354db49ec7a5123cd0e5588f06f1674eb6726eff..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/LegacyBase/FaserSpacePoint.h +++ /dev/null @@ -1,50 +0,0 @@ -#pragma once - -#include "LegacyBase/FaserCluster.h" - -// ROOT include -#include <TVector3.h> - -#include <vector> - - -// SpacePoint class for grouped Faser clusters -// (Clusters on front/back of a detection plane should be grouped.) -// - -class FaserSpacePoint { -private: - //long fIdentifier; - std::vector<FaserCluster*> fClusters; - TVector3 fGlobalPosition; - void ComputePosition(); - -public: - - FaserSpacePoint(); - FaserSpacePoint(std::vector<FaserCluster*> & clusters); - - virtual ~FaserSpacePoint() { - } - - void AddCluster(FaserCluster * cluster); - std::vector<FaserCluster*> & Clusters() { return fClusters; } - - //long Identifier() { return fIdentifier; } - - int Plane() const { return fClusters.size()==0 ? -1 : fClusters[0]->Plane(); } - int Module() const { return fClusters.size()==0 ? -1 : fClusters[0]->Module(); } - int Sensor() const; - int Row() const { return fClusters.size()==0 ? -1 : fClusters[0]->Row(); } - - double Charge() const; - TVector3 GlobalPosition() const { return fGlobalPosition; } - - void Print() const; - void Debug() const; - - double DistanceTo(const FaserSpacePoint & other) const; - -}; - - diff --git a/Legacy/LegacyBase/LegacyBase/FaserTruthParticle.h b/Legacy/LegacyBase/LegacyBase/FaserTruthParticle.h deleted file mode 100644 index 5a0cbfd6f78306af949fa0f1739a7099908f4816..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/LegacyBase/FaserTruthParticle.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef FASERTRUTHPARTICLE_HH -#define FASERTRUTHPARTICLE_HH 1 - -#include "G4Types.hh" -#include "G4ThreeVector.hh" - -class FaserTruthParticle -{ -public: - FaserTruthParticle(); - FaserTruthParticle(G4int trackID, G4int parentID, G4int pdgCode, G4ThreeVector vertex, - G4ThreeVector momentum, G4double energy); - virtual ~FaserTruthParticle(); - - G4int TrackID() { return fTrackID; } - G4int ParentID() { return fParentID; } - G4int PdgCode() { return fPdgCode; } - G4ThreeVector Vertex() { return fVertex; } - G4ThreeVector Momentum() { return fMomentum; } - G4double Energy() { return fEnergy; } - -private: - G4int fTrackID; - G4int fParentID; - G4int fPdgCode; - G4ThreeVector fVertex; - G4ThreeVector fMomentum; - G4double fEnergy; -}; - - -#endif diff --git a/Legacy/LegacyBase/LegacyBase/LegacyBaseDict.h b/Legacy/LegacyBase/LegacyBase/LegacyBaseDict.h deleted file mode 100644 index 1075da28f8943694c267a819c0ff239b4f9942d9..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/LegacyBase/LegacyBaseDict.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef LEGACYBASE_DICT_H -#define LEGACYBASE_DICT_H - -// -// Declaration of classes that need dictionaries -// - -#include <vector> -#include <map> - -#include "LegacyBase/FaserEvent.h" -#include "LegacyBase/FaserDigi.h" -#include "LegacyBase/FaserSensorHit.h" -#include "LegacyBase/FaserCaloHit.h" -#include "LegacyBase/FaserCaloDigi.h" -#include "LegacyBase/FaserTruthParticle.h" -#include "LegacyBase/FaserCluster.h" -#include "LegacyBase/FaserSpacePoint.h" - -#include "G4String.hh" -#include "G4AttDef.hh" -#include "G4AttValue.hh" - -std::vector<FaserSensorHit*> aGarbage; -std::vector<FaserCaloHit*> aaGarbage; -std::vector<FaserDigi*> bGarbage; -std::vector<FaserCaloDigi*> bbGarbage; -std::vector<FaserTruthParticle*> cGarbage; -std::vector<FaserCluster*> hGarbage; -std::vector<FaserSpacePoint*> iGarbage; - -std::pair<G4String, G4AttDef> ddGarbage; -std::map<G4String, G4AttDef> dGarbage; -std::vector<G4AttValue> eGarbage; -std::map<G4int, G4double> fGarbage; -std::map<G4String, G4String> jjGarbage; -std::map<G4String, std::map<G4String, G4String>> jGarbage; - -#endif diff --git a/Legacy/LegacyBase/LegacyBase/selection.xml b/Legacy/LegacyBase/LegacyBase/selection.xml deleted file mode 100644 index e45e094238edceb7d7bc8a7ca6c3496e7f7f482b..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/LegacyBase/selection.xml +++ /dev/null @@ -1,36 +0,0 @@ -<lcgdict> - <selection> - <class name="G4String" /> - <class name="std::map<G4int, G4double>" /> - <class name="std::map<G4String, G4String>" /> - <class name="std::map<G4String, std::map<G4String, G4String>>" /> - <class name="FaserEvent" /> - <class name="G4VHit" /> - <class name="G4VDigi" /> - <class name="G4ThreeVector" /> - <class name="FaserTruthParticle" /> - <class name="FaserSensorHit" /> - <class name="FaserCaloHit" /> - <class name="FaserDigi" /> - <class name="FaserCaloDigi" /> - <class name="FaserCluster" /> - <class name="FaserSpacePoint" /> - <class name="G4AffineTransform" /> - <class name="G4AttDef" /> - </selection> - <exclusion> - <class name="CLHEP::Hep3Vector" /> - <class name="FaserSensorHit"> - <method name="Draw"/> - </class> - <class name="FaserCaloHit"> - <method name="Draw"/> - </class> - <class name="FaserDigi"> - <method name="Draw"/> - </class> - <class name="FaserCaloDigi"> - <method name="Draw"/> - </class> - </exclusion> -</lcgdict> diff --git a/Legacy/LegacyBase/README b/Legacy/LegacyBase/README deleted file mode 100644 index 99256d8141375a5607644ec1ff253d1c05525c3f..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/README +++ /dev/null @@ -1,3 +0,0 @@ -Package containing objects written to ntuples used in original TDR simulation. -Copied from -https://github.com/dwcasper/faserMC/tree/master/faserMC \ No newline at end of file diff --git a/Legacy/LegacyBase/src/FaserCaloDigi.cxx b/Legacy/LegacyBase/src/FaserCaloDigi.cxx deleted file mode 100644 index 2f605250584d878918c001024d2987280398188e..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/src/FaserCaloDigi.cxx +++ /dev/null @@ -1,69 +0,0 @@ -#include "LegacyBase/FaserCaloDigi.h" -#include "G4RunManager.hh" -#include "G4MTRunManager.hh" -#include "G4VVisManager.hh" -#include "G4VisAttributes.hh" -#include "G4RotationMatrix.hh" -#include "G4Box.hh" -#include <cmath> - -G4ThreadLocal G4Allocator<FaserCaloDigi> *faserCaloDigiAllocator = 0; - -FaserCaloDigi::FaserCaloDigi() - : G4VDigi(), - fModuleID(-1), - fTowerID(-1), - fTransform(G4AffineTransform()), - fEnergy(0.0) -{ } - -FaserCaloDigi::~FaserCaloDigi() -{ } - -FaserCaloDigi::FaserCaloDigi(const FaserCaloDigi& right) - : G4VDigi() -{ - fTowerID = right.fTowerID; - fModuleID = right.fModuleID; - fTransform = right.fTransform; - fEnergy = right.fEnergy; - fTracks = right.fTracks; -} - -const FaserCaloDigi& FaserCaloDigi::operator=(const FaserCaloDigi& right) -{ - fTowerID = right.fTowerID; - fModuleID = right.fModuleID; - fTransform = right.fTransform; - fEnergy = right.fEnergy; - fTracks = right.fTracks; - - return *this; -} - -int FaserCaloDigi::operator==(const FaserCaloDigi& right) const -{ - return ( fTowerID == right.fTowerID - && fModuleID == right.fModuleID - && fEnergy == right.fEnergy ) ? 1 : 0; -} - -G4Colour FaserCaloDigi::QtoC() -{ - if (fEnergy <=0) return G4Colour(0,0,0); - G4double q = std::min(1.0, 0.05 + 0.95 * log10(std::max(1.0,fEnergy/100.0))/log10(3500000/100.0)); - G4double h = 300.0 * (1 - q); // from 300 at q=0 to 0 at q=1 (purple->blue->green->...->red) - G4double x = 1.0 - fabs(std::fmod(h/60.0, 2.0)-1.0); - if (h < 60) return G4Colour(1.0,x,0); - if (h < 120) return G4Colour(x,1.0,0); - if (h < 180) return G4Colour(0,1.0,x); - if (h < 240) return G4Colour(0,x,1.0); - if (h < 300) return G4Colour(x,0,1.0); - return G4Colour(1.0,0,x); -} - -void FaserCaloDigi::Draw() -{ } - -void FaserCaloDigi::Print() -{ } diff --git a/Legacy/LegacyBase/src/FaserCaloHit.cxx b/Legacy/LegacyBase/src/FaserCaloHit.cxx deleted file mode 100644 index eda36c742e2940677105bcb1899185f77b45f894..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/src/FaserCaloHit.cxx +++ /dev/null @@ -1,78 +0,0 @@ -#include "LegacyBase/FaserCaloHit.h" -#include "G4UnitsTable.hh" -#include "G4VVisManager.hh" -#include "G4Circle.hh" -#include "G4Colour.hh" -#include "G4VisAttributes.hh" -#include "G4RunManager.hh" -#include "G4MTRunManager.hh" - -#include <iomanip> - -G4ThreadLocal G4Allocator<FaserCaloHit>* FaserCaloHitAllocator = 0; - -FaserCaloHit::FaserCaloHit() - : G4VHit(), - fPlaneID(-1), - fTowerID(-1), - fModuleID(-1), - fEdep(0.0), - fGlobalPos(G4ThreeVector()), - fLocalPos(G4ThreeVector()), - fOriginTrackID(-1), - fSourceTrackID(-1) -{} - -FaserCaloHit::~FaserCaloHit() -{ } - -FaserCaloHit::FaserCaloHit(const FaserCaloHit& right) - : G4VHit() -{ - fPlaneID = right.fPlaneID; - fTowerID = right.fTowerID; - fModuleID = right.fModuleID; - fEdep = right.fEdep; - fGlobalPos = right.fGlobalPos; - fLocalPos = right.fLocalPos; - - fOriginTrackID = right.fOriginTrackID; - fSourceTrackID = right.fSourceTrackID; -} - -const FaserCaloHit& FaserCaloHit::operator=(const FaserCaloHit& right) -{ - fPlaneID = right.fPlaneID; - fTowerID = right.fTowerID; - fModuleID = right.fModuleID; - fEdep =right.fEdep; - fGlobalPos = right.fGlobalPos; - fLocalPos = right.fLocalPos; - - fOriginTrackID = right.fOriginTrackID; - fSourceTrackID = right.fSourceTrackID; - - return *this; -} - -G4int FaserCaloHit::operator==(const FaserCaloHit& right) -{ - return ( this == &right) ? 1 : 0; -} - -void FaserCaloHit::Draw() -{ } - -void FaserCaloHit::Print() -{ - G4cout - << " trackID: " << fSourceTrackID << " planeID: " - << (fPlaneID) - << " Edep: " - << std::setw(7) << G4BestUnit(fEdep, "Energy") - << " Global: " - << std::setw(7) << G4BestUnit(fGlobalPos, "Length") - << " Local: " - << std::setw(7) << G4BestUnit(fLocalPos, "Length") - << G4endl; -} diff --git a/Legacy/LegacyBase/src/FaserCluster.cxx b/Legacy/LegacyBase/src/FaserCluster.cxx deleted file mode 100644 index a9d1734a43845b185a2e6d431932f81ec1c9280e..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/src/FaserCluster.cxx +++ /dev/null @@ -1,142 +0,0 @@ -#include "LegacyBase/FaserCluster.h" - -using std::vector; -using std::shared_ptr; -using std::make_shared; -using std::cout; -using std::min; -using std::max; - - -//------------------------------------------------------------------------------ - -FaserCluster::FaserCluster() - : fIndex {0} - , fCharge {0.0} - , fWeightedStrip {0.0} { } - -FaserCluster::FaserCluster(const FaserCluster& right) - : fIndex(right.fIndex) - , fDigis(right.fDigis) - , fMaxima(right.fMaxima) - , fCharge(right.fCharge) - , fWeightedStrip(right.fWeightedStrip) - , fGlobalPos(right.fGlobalPos) { } - - -FaserCluster& FaserCluster::operator= (const FaserCluster& right) -{ - if (this == &right) return *this; - fIndex = right.fIndex; - fDigis = right.fDigis; - fMaxima = right.fMaxima; - fCharge = right.fCharge; - fWeightedStrip = right.fWeightedStrip; - fGlobalPos = right.fGlobalPos; - - return *this; -} - -FaserCluster::FaserCluster(int index, vector<FaserDigi*>& digis) - : fIndex(index) - , fDigis(digis) - , fCharge(0.0) - , fWeightedStrip(0.0) -{ - for (size_t i = 0; i < digis.size(); i++) - { - double q = digis[i]->Charge(); - fCharge += q; - } - - if (digis.size() == 1) - { - fMaxima.push_back(0); - } - else if (digis.size() == 2) - { - if (fDigis[0]->Charge() > fDigis[1]->Charge()) - { - fMaxima.push_back(0); - } - else - { - fMaxima.push_back(1); - } - } - else - { - for (size_t i = 0 ; i < digis.size(); i++) - { - if (i == 0) - { - if (digis[i]->Charge() > digis[i+1]->Charge()) - { - fMaxima.push_back(i); - } - } - else if (i == digis.size() - 1) - { - if (digis[i]->Charge() > digis[i-1]->Charge()) - { - fMaxima.push_back(i); - } - } - else - { - if (digis[i]->Charge() > digis[i-1]->Charge() && digis[i]->Charge() > digis[i+1]->Charge()) - { - fMaxima.push_back(i); - } - } - } - } - WeightedAverage(); -} - -FaserCluster::~FaserCluster() -{ } - -//------------------------------------------------------------------------------ - -void FaserCluster::WeightedAverage() { - static int iCluster = -1; - ++iCluster; - // bail out on 1 hit cluster - if (fDigis.size() == 1) - { - fWeightedStrip = G4double(fDigis[0]->Strip()); - fGlobalPos = fDigis[0]->Transform().NetTranslation(); - return; - } - - // find highest local maximum - G4double maxQ = 0.0; - G4int iLoc = 0; - for (auto i : fMaxima) { - if (fDigis[i]->Charge() > maxQ) { - maxQ = fDigis[i]->Charge(); - iLoc = i; - } - } - - G4int iMin = max(0, iLoc - 1); - G4int iMax = min((int)fDigis.size() - 1, iLoc + 1); - G4double sumQ = 0.0; - G4double sumXQ = 0.0; - G4ThreeVector sumPQ = {0.0, 0.0, 0.0}; - //cout << "INFO FaserCluster::WeightedAverage\n"; - for (G4int i = iMin; i <= iMax; i++) { - G4double q = fDigis[i]->Charge(); - sumQ += q; - sumXQ += q * fDigis[i]->Strip(); - sumPQ += q * fDigis[i]->Transform().NetTranslation(); - //cout << "DEBUG_DIGITS " << fDigis[i]->Plane() << ";" << fDigis[i]->Module() << ";" << fDigis[i]->Sensor() << ";" << fDigis[i]->Row() << ";" << fDigis[i]->Strip() << ";" << iCluster << ";" << fDigis[i]->Transform().NetTranslation() << "\n"; - } - fWeightedStrip = sumXQ/sumQ; - fGlobalPos = sumPQ/sumQ; - cout << "\n"; - //cout << "DEBUG_CLUSTERS " << Plane() << "," << Module() << "," << Sensor() << "," << Row() << "," << fWeightedStrip << "," << fGlobalPos << "\n"; - return; - -} diff --git a/Legacy/LegacyBase/src/FaserDigi.cxx b/Legacy/LegacyBase/src/FaserDigi.cxx deleted file mode 100644 index 07bd61254b0cf74858ce3652ca5c29a70dff96f1..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/src/FaserDigi.cxx +++ /dev/null @@ -1,78 +0,0 @@ -#include "LegacyBase/FaserDigi.h" -#include "G4RunManager.hh" -#include "G4MTRunManager.hh" -#include "G4VVisManager.hh" -#include "G4VisAttributes.hh" -#include "G4RotationMatrix.hh" - -G4ThreadLocal G4Allocator<FaserDigi> *faserDigiAllocator = 0; - -FaserDigi::FaserDigi() - : G4VDigi(), - fPlaneID(-1), - fModuleID(-1), - fSensorID(-1), - fRowID(-1), - fStripID(-1), - fTransform(G4AffineTransform()), - fCharge(0.0) -{ } - -FaserDigi::~FaserDigi() -{ } - -FaserDigi::FaserDigi(const FaserDigi& right) - : G4VDigi() -{ - fPlaneID = right.fPlaneID; - fModuleID = right.fModuleID; - fSensorID = right.fSensorID; - fRowID = right.fRowID; - fStripID = right.fStripID; - fTransform = right.fTransform; - fCharge = right.fCharge; -} - -const FaserDigi& FaserDigi::operator=(const FaserDigi& right) -{ - fPlaneID = right.fPlaneID; - fModuleID = right.fModuleID; - fSensorID = right.fSensorID; - fRowID = right.fRowID; - fStripID = right.fStripID; - fTransform = right.fTransform; - fCharge = right.fCharge; - - return *this; -} - -int FaserDigi::operator==(const FaserDigi& right) const -{ - return ( fPlaneID == right.fPlaneID - && fModuleID == right.fModuleID - && fSensorID == right.fSensorID - && fRowID == right.fRowID - && fStripID == right.fStripID - && fCharge == right.fCharge ) ? 1 : 0; -} - -G4Colour FaserDigi::QtoC() -{ - if (fCharge <=0) return G4Colour(0,0,0); - G4double q = std::min(log(std::max(1.0,fCharge))/log(30000.0),1.0); - G4double h = 300.0 * (1 - q); // from 300 at q=0 to 0 at q=1 (purple->blue->green->...->red) - G4double x = 1.0 - fabs(std::fmod(h/60.0, 2.0)-1.0); - if (h < 60) return G4Colour(1.0,x,0); - if (h < 120) return G4Colour(x,1.0,0); - if (h < 180) return G4Colour(0,1.0,x); - if (h < 240) return G4Colour(0,x,1.0); - if (h < 300) return G4Colour(x,0,1.0); - return G4Colour(1.0,0,x); -} - -void FaserDigi::Draw() -{ -} - -void FaserDigi::Print() -{ } diff --git a/Legacy/LegacyBase/src/FaserEvent.cxx b/Legacy/LegacyBase/src/FaserEvent.cxx deleted file mode 100644 index d3e9af12b021a78c1c51432502679b7b9e997152..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/src/FaserEvent.cxx +++ /dev/null @@ -1,197 +0,0 @@ -#include "LegacyBase/FaserEvent.h" - -#include "G4ParticleTable.hh" -#include "G4VTrajectoryPoint.hh" - -//////////////////////////////////////////////////////////////////////////////// - - -FaserEvent::FaserEvent(G4int eventNumber) - : fEventNumber(eventNumber) -{} - -//------------------------------------------------------------------------------ - -FaserEvent::FaserEvent() - : FaserEvent(0) -{ } - -//------------------------------------------------------------------------------ - -FaserEvent::~FaserEvent() -{ - for (auto h : fTrackerHits) if (h) delete h; - fTrackerHits.clear(); - - for (auto h : fSamplerHits) if (h) delete h; - fSamplerHits.clear(); - - for (auto h : fCaloHits) if (h) delete h; - fCaloHits.clear(); - - for (auto d : fTrackerDigis) if (d) delete d; - fTrackerDigis.clear(); - - for (auto d : fSamplerDigis) if (d) delete d; - fSamplerDigis.clear(); - - for (auto d : fCaloDigis) if (d) delete d; - fCaloDigis.clear(); - - for (auto c : fClusters) if (c) delete c; - fClusters.clear(); - - for (auto s : fSpacePoints) if (s) delete s; - fSpacePoints.clear(); - - for (auto p : fParticles) if (p) delete p; - fParticles.clear(); -} - -//------------------------------------------------------------------------------ - -void FaserEvent::SetParticles(G4TrajectoryContainer* particles) -{ - if (particles == nullptr) return; - for (size_t i = 0; i < particles->size(); i++) - { - G4VTrajectory& t = *((*particles)[i]); - G4int pdgCode = t.GetPDGEncoding(); - G4double mass = G4ParticleTable::GetParticleTable()->FindParticle(pdgCode)->GetPDGMass(); - G4ThreeVector momentum = t.GetInitialMomentum(); - G4double energy = sqrt(momentum.mag2() + mass*mass); - FaserTruthParticle* p = new FaserTruthParticle(t.GetTrackID(), t.GetParentID(), pdgCode, - (*(t.GetPoint(0))).GetPosition(), momentum, energy); - fParticles.push_back(p); - } -} - -//------------------------------------------------------------------------------ - -void FaserEvent::SetClusters() -{ - fClusters.clear(); - - // If there are no digits, return empty `fClusters` - if (fTrackerDigis.size() == 0) return; - - // Collect the digits by planes of the detector - map<int, vector<FaserDigi*>> planeMap = mapDigitsByPlane(*this); - - // Process each plane in turn - map<int, map<int, vector<FaserDigi*>>> rowMap; - for (auto & plane : planeMap) - { - rowMap[plane.first] = mapDigitsByRow(plane.second); - } - - int clusterNumber = 0; - // cluster the digits in each row of a plane - map<int, vector<FaserCluster*>> clusterMap; - for ( auto& plane : rowMap ) { - for ( auto& row : plane.second ) { - vector<vector<FaserDigi*>> clusters = clusterOneRow(row.second); - for ( auto& c : clusters ) { - clusterMap[plane.first].push_back(new FaserCluster(clusterNumber++, c)); - } - } - } - - for ( auto& plane : clusterMap ) { - for ( auto c : plane.second ) { - fClusters.push_back( c ); - } - } - -} - -//------------------------------------------------------------------------------ - -void FaserEvent::SetSpacePoints() -{ - fSpacePoints.clear(); - - // Group clusters on opposite sides of each module in the same row - for (uint i = 0; i < fClusters.size(); ++i) { - for (uint j = i+1; j < fClusters.size(); ++j) { - FaserCluster * cl_i = fClusters[i]; - FaserCluster * cl_j = fClusters[j]; - if (cl_i->Plane() != cl_j->Plane() ) continue; - if (cl_i->Module() != cl_j->Module()) continue; - if (cl_i->Row() != cl_j->Row() ) continue; - if (cl_i->Sensor() == cl_j->Sensor()) continue; // opposite sides so skip if `==` here - - auto sp = new FaserSpacePoint; - sp->AddCluster(cl_i); - sp->AddCluster(cl_j); - fSpacePoints.push_back(sp); - } - } - -} - -//////////////////////////////////////////////////////////////////////////////// -// Utility methods for cluster finding // -//////////////////////////////////////////////////////////////////////////////// - -int FaserEvent::rowID(FaserDigi* d) -{ - return d->Row() + 2 * ( d->Sensor() + 4 * ( d->Module() + 2 * d->Plane() ) ); -} - -//------------------------------------------------------------------------------ - -vector<vector<FaserDigi*>> FaserEvent::clusterOneRow(vector<FaserDigi*> digits) -{ - vector<vector<FaserDigi*>> clusters; - vector<FaserDigi*> cluster; - int previousStrip = 1 << 30; - for (auto d : digits) - { - if (cluster.size() > 0 && d->Strip() > previousStrip + 1) - { - clusters.push_back(cluster); - cluster.clear(); - } - cluster.push_back(d); - previousStrip = d->Strip(); - } - if (cluster.size() > 0) clusters.push_back(cluster); - return clusters; -} - -//------------------------------------------------------------------------------ - -void FaserEvent::sortDigits(vector<FaserDigi*>& v) -{ - std::sort(v.begin(), v.end(), [](FaserDigi* const& l, FaserDigi* const& r) { return l->Strip() < r->Strip(); }); -} - -//------------------------------------------------------------------------------ - -map<int, vector<FaserDigi*>> FaserEvent::mapDigitsByPlane(FaserEvent & evt) -{ - map<int, vector<FaserDigi*>> planeMap; - for (FaserDigi* d : evt.TrackerDigis()) - { - planeMap[d->Plane()].push_back( d ); - } - return planeMap; -} - -//------------------------------------------------------------------------------ - -map<int, vector<FaserDigi*>> FaserEvent::mapDigitsByRow(vector<FaserDigi*> v) -{ - map<int, vector<FaserDigi*>> rowMap; - - for (FaserDigi* d : v) - { - rowMap[rowID(d)].push_back( d ); - } - for (auto& row : rowMap) - { - sortDigits(row.second); - } - return rowMap; -} diff --git a/Legacy/LegacyBase/src/FaserSensorHit.cxx b/Legacy/LegacyBase/src/FaserSensorHit.cxx deleted file mode 100644 index bc05e8e73bd534deaaa861b0ee75a1fdc065229a..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/src/FaserSensorHit.cxx +++ /dev/null @@ -1,90 +0,0 @@ -#include "LegacyBase/FaserSensorHit.h" -#include "G4UnitsTable.hh" -#include "G4VVisManager.hh" -#include "G4Circle.hh" -#include "G4Colour.hh" -#include "G4VisAttributes.hh" -#include "G4RunManager.hh" -#include "G4MTRunManager.hh" - -#include <iomanip> - -G4ThreadLocal G4Allocator<FaserSensorHit>* FaserSensorHitAllocator = 0; - -FaserSensorHit::FaserSensorHit() - : G4VHit(), - fPlaneID(-1), - fModuleID(-1), - fSensorID(-1), - fRowID(-1), - fStripID(-1), - fEdep(0.0), - fGlobalPos(G4ThreeVector()), - fLocalPos(G4ThreeVector()), - fTransform(G4AffineTransform()), - fTrackID(-1), - fEnergy(0), - fOriginTrackID(-1) -{} - -FaserSensorHit::~FaserSensorHit() -{ } - -FaserSensorHit::FaserSensorHit(const FaserSensorHit& right) - : G4VHit() -{ - fPlaneID = right.fPlaneID; - fModuleID = right.fModuleID; - fSensorID = right.fSensorID; - fRowID = right.fRowID; - fStripID = right.fStripID; - fEdep = right.fEdep; - fGlobalPos = right.fGlobalPos; - fLocalPos = right.fLocalPos; - fTransform = right.fTransform; - - fTrackID = right.fTrackID; - fEnergy = right.fEnergy; - fOriginTrackID = right.fOriginTrackID; -} - -const FaserSensorHit& FaserSensorHit::operator=(const FaserSensorHit& right) -{ - fPlaneID = right.fPlaneID; - fModuleID = right.fModuleID; - fSensorID = right.fSensorID; - fRowID = right.fRowID; - fStripID = right.fStripID; - fEdep =right.fEdep; - fGlobalPos = right.fGlobalPos; - fLocalPos = right.fLocalPos; - fTransform = right.fTransform; - - fTrackID = right.fTrackID; - fEnergy = right.fEnergy; - fOriginTrackID = right.fOriginTrackID; - - return *this; -} - -G4int FaserSensorHit::operator==(const FaserSensorHit& right) -{ - return ( this == &right) ? 1 : 0; -} - -void FaserSensorHit::Draw() -{ } - -void FaserSensorHit::Print() -{ - G4cout - << " trackID: " << fTrackID << " sensorID: " - << (10000000*fPlaneID + 1000000*fModuleID + 100000*fSensorID + 10000*fRowID + fStripID) - << " Edep: " - << std::setw(7) << G4BestUnit(fEdep, "Energy") - << " Global: " - << std::setw(7) << G4BestUnit(fGlobalPos, "Length") - << " Local: " - << std::setw(7) << G4BestUnit(fLocalPos, "Length") - << G4endl; -} diff --git a/Legacy/LegacyBase/src/FaserSpacePoint.cxx b/Legacy/LegacyBase/src/FaserSpacePoint.cxx deleted file mode 100644 index bec5513b8b30de5c5d91c5566cf1f7184a17ad6a..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/src/FaserSpacePoint.cxx +++ /dev/null @@ -1,137 +0,0 @@ -#include "LegacyBase/FaserSpacePoint.h" -#include "G4MTRunManager.hh" -#include "G4RunManager.hh" - -#include <iostream> -#include <string> -#include <map> -#include <stdexcept> - -using std::cout; -using std::to_string; -using std::runtime_error; - -//------------------------------------------------------------------------------ - -FaserSpacePoint::FaserSpacePoint() - : fClusters {} - , fGlobalPosition {0., 0., 0.} -{ - ; -} - -//------------------------------------------------------------------------------ - -FaserSpacePoint::FaserSpacePoint(std::vector<FaserCluster*> & clusters) - : fClusters {} - , fGlobalPosition {0., 0., 0. } -{ - for (FaserCluster * clus : clusters) { - AddCluster(clus); - } -} - -//------------------------------------------------------------------------------ - -int FaserSpacePoint::Sensor() const -{ - if (fClusters.size()==0) return -1; - int sensor = fClusters[0]->Sensor(); - - // Group top sensors 0/1 -> 0 and bottom 2/3 -> 2. - if (sensor==0 || sensor==1) return 0; - else if (sensor==2 || sensor==3) return 2; - - return sensor; -} - -//------------------------------------------------------------------------------ - -double FaserSpacePoint::Charge() const -{ double charge = 0.; - for (const FaserCluster * clus : fClusters) charge += clus->Charge(); - return charge; -} - -//------------------------------------------------------------------------------ - -void FaserSpacePoint::ComputePosition() -{ } - -//------------------------------------------------------------------------------ - -void FaserSpacePoint::AddCluster(FaserCluster * cluster) -{ - if (fClusters.size() == 0) - { - fClusters.push_back(cluster); - return; - } - - if (cluster->Plane() != Plane() ) throw runtime_error {"FaserSpacePoint::AddCluster: incompatible planes"}; - if (cluster->Module() != Module()) throw runtime_error {"FaserSpacePoint::AddCluster: incompatible modules"}; - - int sensor = fClusters[0]->Sensor(); - // Group top sensors 0/1 -> 0 and bottom 2/3 -> 2. - if (sensor==1) sensor = 0; - else if (sensor==3) sensor = 2; - if (sensor!= Sensor()) throw runtime_error {"FaserSpacePoint::AddCluster: incompatible sensors"}; - - if (cluster->Row() != Row()) throw runtime_error {"FaserSpacePoint::AddCluster: incompatible rows"}; - - fClusters.push_back(cluster); - ComputePosition(); -} - -//------------------------------------------------------------------------------ - -void FaserSpacePoint::Print() const -{ - cout << "INFO FaserSpacePoint::Print\n" - << " Clusters (nClusters=" << fClusters.size() << "):\n"; - - for (size_t i=0; i<fClusters.size(); ++i) - { - FaserCluster * c = fClusters[i]; - cout << " Cluster " << i << " plane=" << c->Plane() << ", module=" << c->Module() << ", sensor=" << c->Sensor() - << ", row=" << c->Row() << ", charge=" << c->Charge() << ", weightedStrip=" << c->WeightedStrip() - << ", globalPos=" << c->GlobalPosition() <<"\n"; - } - - TVector3 pos = GlobalPosition(); - double x = pos.X(); - double y = pos.Y(); - double z = pos.Z(); - cout << " Space point obtained:\n" - << " plane=" << Plane() << ", module=" << Module() << ", sensor=" << Sensor() << ", row=" << Row() - << ", charge=" << Charge() << ", globalPos=(" << x << ", " << y << ", " << z << ")\n"; -} - -//------------------------------------------------------------------------------ - -void FaserSpacePoint::Debug() const -{ - - for (size_t i=0; i<fClusters.size(); ++i) - { - FaserCluster * c = fClusters[i]; - cout << "DEBUG_CLUSTERS " << i << ";" << c->Plane() << ";" << c->Module() << ";" << c->Sensor() - << ";" << c->Row() << ";" << c->WeightedStrip() << ";" << c->Charge() - << ";" << c->GlobalPosition() << "\n"; - } - - //TVector3 pos = GlobalPos(); - //double x = pos.X(); - //double y = pos.Y(); - //double z = pos.Z(); - //cout << "DEBUG_SPACEPOINT " << Plane() << "," << Module() << "," << Sensor() << "," << Row() - // << "," << x << "," << y << "," << z << "\n"; -} - -//------------------------------------------------------------------------------ - -double FaserSpacePoint::DistanceTo(const FaserSpacePoint & other) const { - return (GlobalPosition() - other.GlobalPosition()).Mag(); -} - - diff --git a/Legacy/LegacyBase/src/FaserTruthParticle.cxx b/Legacy/LegacyBase/src/FaserTruthParticle.cxx deleted file mode 100644 index 3d707eec1ac6db7fcc1496204dfcbc827910ccf1..0000000000000000000000000000000000000000 --- a/Legacy/LegacyBase/src/FaserTruthParticle.cxx +++ /dev/null @@ -1,19 +0,0 @@ -#include "LegacyBase/FaserTruthParticle.h" - -FaserTruthParticle::FaserTruthParticle() - : FaserTruthParticle(0, 0, 0, G4ThreeVector(), G4ThreeVector(), 0.0) -{ } - -FaserTruthParticle::FaserTruthParticle(G4int trackID, G4int parentID, G4int pdgCode, G4ThreeVector vertex, G4ThreeVector momentum, - G4double energy) - : - fTrackID { trackID }, - fParentID { parentID }, - fPdgCode { pdgCode }, - fVertex { vertex }, - fMomentum { momentum }, - fEnergy { energy } -{ } - -FaserTruthParticle::~FaserTruthParticle() -{ } diff --git a/Legacy/LegacyConverter/CMakeLists.txt b/Legacy/LegacyConverter/CMakeLists.txt deleted file mode 100644 index a9c317687ae1ce9302886dda256447dff5b3f738..0000000000000000000000000000000000000000 --- a/Legacy/LegacyConverter/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -################################################################################ -# Package: LegacyConverter -################################################################################ - - -# Declare the package name: -atlas_subdir( LegacyConverter ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread EG ) - -# Component(s) in the package: -atlas_add_component( LegacyConverter - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} - AthenaBaseComps xAODFaserTruth xAODFaserTracking LegacyBase GaudiKernel AthenaKernel -) -# Install files from the package: -atlas_install_headers( LegacyConverter ) diff --git a/Legacy/LegacyConverter/LegacyConverter/FaserTestConverter.h b/Legacy/LegacyConverter/LegacyConverter/FaserTestConverter.h deleted file mode 100644 index 832ed6c8d3baa60e7be896fe8010144ce3b57683..0000000000000000000000000000000000000000 --- a/Legacy/LegacyConverter/LegacyConverter/FaserTestConverter.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef FASERTESTCONVERTER_H -#define FASERTESTCONVERTER_H - -//STL -#include <string> - -// ROOT -#include <TFile.h> -#include <TTree.h> -#include <TBranch.h> - -// Base class -#include "AthenaBaseComps/AthAlgorithm.h" - -#include "LegacyBase/FaserEvent.h" - -namespace Legacy{ -class FaserTestConverter : public AthAlgorithm { -public: - /// Constructor with parameters: - FaserTestConverter(const std::string &name,ISvcLocator *pSvcLocator); - - ~FaserTestConverter(); - - StatusCode initialize(); - StatusCode execute(); - StatusCode finalize(); - -private: - - std::string m_inputFileName; - std::string m_treeName; - std::string m_branchName; - - std::string m_truthEventCollectionName; - std::string m_truthParticleCollectionName; - std::string m_truthVertexCollectionName; - - std::string m_clusCollectionName; - - TFile* m_tfile; - TTree* m_ttree; - TBranch* m_tbranch; - - FaserEvent* m_faserEvent; - long m_currentEvent; - long m_totalEvents; - - StatusCode fillTrackerClusters() const; - StatusCode fillTruth() const; -}; - - -} // End of namespace - -#endif // FASERTESTCONVERTER_H diff --git a/Legacy/LegacyConverter/share/JO_TestConverter.py b/Legacy/LegacyConverter/share/JO_TestConverter.py deleted file mode 100644 index f6934dc731501d57f089e78589bfcbe5016f64e7..0000000000000000000000000000000000000000 --- a/Legacy/LegacyConverter/share/JO_TestConverter.py +++ /dev/null @@ -1,42 +0,0 @@ -# -# Run this with -# athena.py JO_TestConverter.py -# -# Not reading anything, so don't set up EventSelector -# See here for other useful stuff: -# https://twiki.cern.ch/twiki/bin/view/Main/AthenaCodeSnippets -#import AthenaRootComps.ReadAthenaRoot -#svcMgr.EventSelector.InputCollections = ["/afs/cern.ch/work/r/rjansky/FASER/clusters.root"] -#svcMgr.EventSelector.TupleName = "clusters" - -#print svcMgr.EventSelector - -# Define number of events to run -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags as af -af.EvtMax=100 - -# Access the algorithm sequence: -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - -from LegacyConverter.LegacyConverterConf import Legacy__FaserTestConverter - -# Add the algorithm. -importalg = Legacy__FaserTestConverter("FaserTestConverter") -importalg.InputFileName = "CaloPbC5cm_1k.root" -importalg.OutputLevel = VERBOSE -topSequence += importalg -print importalg - -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -xaodStream = MSMgr.NewPoolRootStream( "StreamAOD", "XAOD_"+"clusters"+".pool.root" ) - -#xaodStream.AddItem("xAOD::FaserTruthEventContainer#*") -#xaodStream.AddItem("xAOD::FaserTruthEventAuxContainer#*") -#xaodStream.AddItem("xAOD::FaserTruthParticleContainer#*") -#xaodStream.AddItem("xAOD::FaserTruthParticleAuxContainer#*") -#xaodStream.AddItem("xAOD::FaserTruthVertexContainer#*") -#xaodStream.AddItem("xAOD::FaserTruthVertexAuxContainer#*") - -xaodStream.AddItem("xAOD::StripClusterContainer#*") -xaodStream.AddItem("xAOD::StripClusterAuxContainer#*") diff --git a/Legacy/LegacyConverter/src/FaserTestConverter.cxx b/Legacy/LegacyConverter/src/FaserTestConverter.cxx deleted file mode 100644 index ed4dd9d83409be1a2bf879fdcca710faa2975f26..0000000000000000000000000000000000000000 --- a/Legacy/LegacyConverter/src/FaserTestConverter.cxx +++ /dev/null @@ -1,170 +0,0 @@ -#include "LegacyConverter/FaserTestConverter.h" - -#include "xAODFaserTruth/FaserTruthEventContainer.h" -#include "xAODFaserTruth/FaserTruthEventAuxContainer.h" - -#include "xAODFaserTruth/FaserTruthParticleContainer.h" -#include "xAODFaserTruth/FaserTruthParticleAuxContainer.h" - -#include "xAODFaserTruth/FaserTruthVertexContainer.h" -#include "xAODFaserTruth/FaserTruthVertexAuxContainer.h" - -#include "xAODFaserTracking/StripClusterContainer.h" -#include "xAODFaserTracking/StripClusterAuxContainer.h" - -namespace Legacy { - - FaserTestConverter::FaserTestConverter (const std::string& name, ISvcLocator* pSvcLocator) : - AthAlgorithm( name, pSvcLocator ), - m_inputFileName("inputFile.root"), - m_treeName("faser"), - m_branchName("event"), - m_truthEventCollectionName("TruthEvent"), - m_truthParticleCollectionName("TruthParticles"), - m_truthVertexCollectionName("TruthVerticies"), - m_clusCollectionName("StripClusters"), - m_tfile(0), - m_ttree(0), - m_tbranch(0), - m_faserEvent(0) - { - declareProperty("InputFileName", m_inputFileName); - declareProperty("TreeName", m_treeName); - declareProperty("BranchName", m_branchName); - - declareProperty("OutputTruthEventName", m_truthEventCollectionName); - declareProperty("OutputTruthParticlesName", m_truthParticleCollectionName); - declareProperty("OutputTruthVerticiesName", m_truthVertexCollectionName); - - declareProperty("OutputClustersName", m_clusCollectionName); - - } - - FaserTestConverter::~FaserTestConverter() - {} - - StatusCode FaserTestConverter::initialize() { - - // Open old ROOT file - ATH_MSG_INFO( "Opening file " << m_inputFileName); - - m_tfile = new TFile(m_inputFileName.c_str()); - if (m_tfile->IsZombie()) { - ATH_MSG_FATAL( "File " << m_inputFileName << " couldn't be opened!"); - return StatusCode::FAILURE; - } - - // Get TTree - m_ttree = (TTree*) m_tfile->Get(m_treeName.c_str()); - if (!m_ttree) { - ATH_MSG_FATAL( "Tree " << m_treeName << " couldn't be found!"); - return StatusCode::FAILURE; - } - - // Get event branch - m_tbranch = m_ttree->GetBranch(m_branchName.c_str()); - if (!m_tbranch) { - ATH_MSG_FATAL( "Branch " << m_branchName << " couldn't be found!"); - return StatusCode::FAILURE; - } - - // Set up faserEvent - m_faserEvent = new FaserEvent(); - m_tbranch->SetAddress(&m_faserEvent); - - // Set current event index to -1 so it will pick up first event on inrement - m_currentEvent = -1; - m_totalEvents = m_ttree->GetEntries(); - - ATH_MSG_INFO("Tree opened with " << m_totalEvents << " events"); - - return StatusCode::SUCCESS; - } - - StatusCode FaserTestConverter::finalize() - { - ATH_MSG_INFO( "Closing file " << m_inputFileName); - m_tfile->Close(); - return StatusCode::SUCCESS; - } - - StatusCode FaserTestConverter::execute() { - - // Read in next event - if (++m_currentEvent >= m_totalEvents) { - ATH_MSG_WARNING( "Trying to load past total events " << m_totalEvents); - return StatusCode::SUCCESS; - } - - m_tbranch->GetEntry(m_currentEvent); - - ATH_MSG_INFO( "Loading event " << m_currentEvent); - - // Fill desired quantities - ATH_CHECK(fillTruth()); - ATH_CHECK(fillTrackerClusters()); - - return StatusCode::SUCCESS; - } - - StatusCode FaserTestConverter::fillTrackerClusters() const - { - - ATH_MSG_DEBUG( "Found " << m_faserEvent->Clusters().size()<< " tracker clusters"); - - // Create the cluster containers: - xAOD::StripClusterContainer* clusterC = new xAOD::StripClusterContainer(); - ATH_CHECK( evtStore()->record( clusterC, m_clusCollectionName ) ); - xAOD::StripClusterAuxContainer* aux = new xAOD::StripClusterAuxContainer(); - ATH_CHECK( evtStore()->record( aux, m_clusCollectionName + "Aux." ) ); - clusterC->setStore( aux ); - - // Loop over clusters in ntuple - for (FaserCluster* clus : m_faserEvent->Clusters()) { - xAOD::StripCluster* p = new xAOD::StripCluster(); - clusterC->push_back( p ); - p->setId(clus->Index()); - p->setGlobalPosition( clus->GlobalPosition().x(), - clus->GlobalPosition().y(), - clus->GlobalPosition().z()); - - ATH_MSG_DEBUG( "global x = " << p->globalX() << ", global y = " << p->globalY() << ", global z = " << p->globalZ() ); - } - - return StatusCode::SUCCESS; - } - - StatusCode FaserTestConverter::fillTruth() const - { - - ATH_MSG_DEBUG( "Found " << m_faserEvent->Particles().size()<< " truth particles"); - - // Create the truth containers: - xAOD::FaserTruthEventContainer* truthEvC = new xAOD::FaserTruthEventContainer(); - ATH_CHECK( evtStore()->record( truthEvC, m_truthEventCollectionName ) ); - xAOD::FaserTruthEventAuxContainer* evaux = new xAOD::FaserTruthEventAuxContainer(); - ATH_CHECK( evtStore()->record( evaux, m_truthEventCollectionName + "Aux.") ); - truthEvC->setStore( evaux ); - - xAOD::FaserTruthParticleContainer* truthPartC = new xAOD::FaserTruthParticleContainer(); - ATH_CHECK( evtStore()->record( truthPartC, m_truthParticleCollectionName ) ); - xAOD::FaserTruthParticleAuxContainer* partaux = new xAOD::FaserTruthParticleAuxContainer(); - ATH_CHECK( evtStore()->record( partaux, m_truthParticleCollectionName + "Aux." ) ); - truthPartC->setStore( partaux ); - - // Create truth particle list - for (FaserTruthParticle* part : m_faserEvent->Particles()) { - xAOD::FaserTruthParticle* p = new xAOD::FaserTruthParticle(); - truthPartC->push_back(p); - - p->setPdgId( part->PdgCode() ); - p->setPx( part->Momentum().x() ); - p->setPy( part->Momentum().y() ); - p->setPz( part->Momentum().z() ); - p->setE( part->Energy() ); - } - - return StatusCode::SUCCESS; - } - -} // End of namespace diff --git a/Legacy/LegacyConverter/src/components/LegacyConverter_entries.cxx b/Legacy/LegacyConverter/src/components/LegacyConverter_entries.cxx deleted file mode 100644 index 925fd8dfd397dd3e36f41344690c1b69de653b92..0000000000000000000000000000000000000000 --- a/Legacy/LegacyConverter/src/components/LegacyConverter_entries.cxx +++ /dev/null @@ -1,3 +0,0 @@ -#include "LegacyConverter/FaserTestConverter.h" - -DECLARE_COMPONENT( Legacy::FaserTestConverter ) diff --git a/README.md b/README.md index 2d30f8a00217d8e94f652e235179fd64ea43f126..9eb23b38eaef099935d2dff3777c390c804b3cc0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ git clone --recursive https://:@gitlab.cern.ch:8443/$USERNAME/calypso.git #The next three lines are used to setup the ATLAS release environment export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh -asetup --input=calypso/asetup.faser Athena,22.0.19 +asetup --input=calypso/asetup.faser Athena,22.0.29 #create build directory mkdir build @@ -18,5 +18,14 @@ cd build #build calypso cmake -DCMAKE_INSTALL_PREFIX=../run ../calypso ; make ; make install +``` It can be convenient to alias the "asetup --input=calypso/asetup.faser" to something like "fsetup" + +## Known issues: + +* The "WriteAlignment" example program does not compile, and is disabled. The example will be replaced eventually. + +* The "FaserActsKalmanFilter" package does not compile, and is temporarily disabled. + +* The command `lsetup "lcgenv -p LCG_98python3_ATLAS_6 x86_64-centos7-gcc8-opt sqlite` may be necessary to avoid errors when generating a database diff --git a/Scintillator/ScintDetDescr/PreshowerGeoModel/CMakeLists.txt b/Scintillator/ScintDetDescr/PreshowerGeoModel/CMakeLists.txt index 14022a10c3803fe90bebcca7a81d4a8e8a5177f3..a58ffa956f2faec599513f8d98de9f819d67fe33 100644 --- a/Scintillator/ScintDetDescr/PreshowerGeoModel/CMakeLists.txt +++ b/Scintillator/ScintDetDescr/PreshowerGeoModel/CMakeLists.txt @@ -9,18 +9,19 @@ atlas_subdir( PreshowerGeoModel ) find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( PreshowerGeoModel src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GeoModelFaserUtilities GaudiKernel SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions FaserDetDescr ScintGeoModelUtils ScintReadoutGeometry ScintIdentifier Identifier ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelFaserUtilities GaudiKernel SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions FaserDetDescr ScintGeoModelUtils ScintReadoutGeometry ScintIdentifier Identifier ) -#atlas_add_test( SCT_GMConfig_test -# SCRIPT test/SCT_GMConfig_test.py -# PROPERTIES TIMEOUT 300 ) +atlas_add_test( PreshowerGMConfig_test + SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/test/PreshowerGMConfig_test.py + PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + PROPERTIES TIMEOUT 300 ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Scintillator/ScintDetDescr/PreshowerGeoModel/PreshowerGeoModel/PreshowerDetectorTool.h b/Scintillator/ScintDetDescr/PreshowerGeoModel/PreshowerGeoModel/PreshowerDetectorTool.h index 818dd7ce590b7ca03c059b3698b76a82061efa18..d03dff68e7d842bf21db8891deb4d994d37b75d3 100644 --- a/Scintillator/ScintDetDescr/PreshowerGeoModel/PreshowerGeoModel/PreshowerDetectorTool.h +++ b/Scintillator/ScintDetDescr/PreshowerGeoModel/PreshowerGeoModel/PreshowerDetectorTool.h @@ -5,7 +5,7 @@ #ifndef PRESHOWERGEOMODEL_PRESHOWERDETECTORTOOL_H #define PRESHOWERGEOMODEL_PRESHOWERDETECTORTOOL_H -#include "GeoModelUtilities/GeoModelTool.h" +#include "GeoModelFaserUtilities/GeoModelTool.h" #include "PreshowerGeoModel/PreshowerGeoModelAthenaComps.h" #include "GeometryDBSvc/IGeometryDBSvc.h" diff --git a/Scintillator/ScintDetDescr/PreshowerGeoModel/src/PreshowerDetectorTool.cxx b/Scintillator/ScintDetDescr/PreshowerGeoModel/src/PreshowerDetectorTool.cxx index 83b38a9d8830473fad9cb51b83a9141d7eb51c37..a64eead9a31c558994b87fb61c9366ad62d977c0 100644 --- a/Scintillator/ScintDetDescr/PreshowerGeoModel/src/PreshowerDetectorTool.cxx +++ b/Scintillator/ScintDetDescr/PreshowerGeoModel/src/PreshowerDetectorTool.cxx @@ -14,7 +14,7 @@ #include "ScintIdentifier/PreshowerID.h" #include "DetDescrConditions/AlignableTransformContainer.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" #include "StoreGate/DataHandle.h" #include "RDBAccessSvc/IRDBRecord.h" diff --git a/Scintillator/ScintDetDescr/PreshowerGeoModel/test/PreshowerGMConfig_test.py b/Scintillator/ScintDetDescr/PreshowerGeoModel/test/PreshowerGMConfig_test.py index 24a1ad2103a6ece6a5bf94119b33ebc5da0dfcf1..e86bf87d5589ec97a03b4c5eaa0a03cdf8711261 100644 --- a/Scintillator/ScintDetDescr/PreshowerGeoModel/test/PreshowerGMConfig_test.py +++ b/Scintillator/ScintDetDescr/PreshowerGeoModel/test/PreshowerGMConfig_test.py @@ -11,9 +11,7 @@ if __name__ == "__main__": ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - # ConfigFlags.Detector.SimulatePixel = False ConfigFlags.Detector.SimulatePreshower = False - # ConfigFlags.Detector.SimulateTRT = False ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Scintillator/ScintDetDescr/ScintGeoModelUtils/CMakeLists.txt b/Scintillator/ScintDetDescr/ScintGeoModelUtils/CMakeLists.txt index 17066769afa7588a74270ad19a4dbd5b688e71c4..4750b15e66b208db1a4200e95b03cc62da62c2e7 100644 --- a/Scintillator/ScintDetDescr/ScintGeoModelUtils/CMakeLists.txt +++ b/Scintillator/ScintDetDescr/ScintGeoModelUtils/CMakeLists.txt @@ -9,7 +9,7 @@ atlas_subdir( ScintGeoModelUtils ) find_package( Boost COMPONENTS filesystem thread system ) find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( ScintGeoModelUtils @@ -17,6 +17,6 @@ atlas_add_library( ScintGeoModelUtils PUBLIC_HEADERS ScintGeoModelUtils INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GaudiKernel StoreGateLib SGtests GeoPrimitives GeometryDBSvcLib - PRIVATE_LINK_LIBRARIES GeoModelUtilities GeoModelFaserUtilities ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GaudiKernel StoreGateLib SGtests GeoPrimitives GeometryDBSvcLib + PRIVATE_LINK_LIBRARIES GeoModelFaserUtilities ) diff --git a/Scintillator/ScintDetDescr/ScintGeoModelUtils/src/TopLevelPlacements.cxx b/Scintillator/ScintDetDescr/ScintGeoModelUtils/src/TopLevelPlacements.cxx index 8ea12a691e3b1784ee5c01fbd4ac901ccd2b137a..98721945e02fb9f100d841289857d4a6b56b7fc0 100644 --- a/Scintillator/ScintDetDescr/ScintGeoModelUtils/src/TopLevelPlacements.cxx +++ b/Scintillator/ScintDetDescr/ScintGeoModelUtils/src/TopLevelPlacements.cxx @@ -93,22 +93,44 @@ TopLevelPlacements::partTransform(const IRDBRecord* record) const { ixyz3 = 2; } + GeoTrf::Transform3D rotation(GeoTrf::Translate3D::Identity()); + std::vector<int> order { ixyz1 , ixyz2, ixyz3 }; + for (int ixyz : order) + { + switch (ixyz) + { + case 0: + if (rotX != 0) rotation = GeoTrf::RotateX3D{rotX} * rotation; + break; + case 1: + if (rotY != 0) rotation = GeoTrf::RotateY3D{rotY} * rotation; + break; + case 2: + if (rotZ != 0) rotation = GeoTrf::RotateZ3D{rotZ} * rotation; + break; + } + } + + // This segfaults at runtime when deleting the pointers, + // I think because the base class of Transform3D + // does not have a virtual destructor + // // List of the three transforms - GeoTrf::Transform3D* xformList[3] = { - 0, 0, 0 - }; - if (rotX != 0) xformList[0] = new GeoTrf::RotateX3D(rotX); - if (rotY != 0) xformList[1] = new GeoTrf::RotateY3D(rotY); - if (rotZ != 0) xformList[2] = new GeoTrf::RotateZ3D(rotZ); - - GeoTrf::Transform3D rotation(GeoTrf::Transform3D::Identity()); - if (xformList[ixyz1]) rotation = *(xformList[ixyz1]) * rotation; - if (xformList[ixyz2]) rotation = *(xformList[ixyz2]) * rotation; - if (xformList[ixyz3]) rotation = *(xformList[ixyz3]) * rotation; - - delete xformList[0]; - delete xformList[1]; - delete xformList[2]; + // GeoTrf::Transform3D* xformList[] = { nullptr, nullptr, nullptr }; + // if (rotX != 0) xformList[0] = new GeoTrf::RotateX3D(rotX); + // if (rotY != 0) xformList[1] = new GeoTrf::RotateY3D(rotY); + // if (rotZ != 0) xformList[2] = new GeoTrf::RotateZ3D(rotZ); + + // GeoTrf::Transform3D rotation(GeoTrf::Transform3D::Identity()); + // if (xformList[ixyz1] != nullptr) rotation = *(xformList[ixyz1]) * rotation; + // if (xformList[ixyz2] != nullptr) rotation = *(xformList[ixyz2]) * rotation; + // if (xformList[ixyz3] != nullptr) rotation = *(xformList[ixyz3]) * rotation; + // if (xformList[0] != nullptr) + // delete xformList[0]; + // if (xformList[1] != nullptr) + // delete xformList[1]; + // if (xformList[2] != nullptr) + // delete xformList[2]; return transform * rotation; } diff --git a/Scintillator/ScintDetDescr/ScintIdentifier/ScintIdentifier/ScintIdentifierDict.h b/Scintillator/ScintDetDescr/ScintIdentifier/ScintIdentifier/ScintIdentifierDict.h index f8b6827f70ef31390a1ef377622d1d42b31d9730..9f3832c16e73859facfe81aa17f4864cf63a9b19 100644 --- a/Scintillator/ScintDetDescr/ScintIdentifier/ScintIdentifier/ScintIdentifierDict.h +++ b/Scintillator/ScintDetDescr/ScintIdentifier/ScintIdentifier/ScintIdentifierDict.h @@ -12,8 +12,8 @@ #ifndef SCINTIDENTIFIER_SCINTIDENTIFIERDICT_H #define SCINTIDENTIFIER_SCINTIDENTIFIERDICT_H -// #include "ScintIdentifier/PreshowerID.h" // #include "ScintIdentifier/ScintillatorID.h" +#include "ScintIdentifier/PreshowerID.h" #include "ScintIdentifier/TriggerID.h" #include "ScintIdentifier/VetoID.h" diff --git a/Scintillator/ScintDetDescr/ScintReadoutGeometry/CMakeLists.txt b/Scintillator/ScintDetDescr/ScintReadoutGeometry/CMakeLists.txt index d97c23b2d36fa08991a74e18ff3508e2dff489e3..9d1775fc4405e88f4def837e928d1e0344e31a7d 100644 --- a/Scintillator/ScintDetDescr/ScintReadoutGeometry/CMakeLists.txt +++ b/Scintillator/ScintDetDescr/ScintReadoutGeometry/CMakeLists.txt @@ -8,7 +8,7 @@ atlas_subdir( ScintReadoutGeometry ) # External dependencies: find_package( CLHEP ) find_package( Eigen ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( ScintReadoutGeometry @@ -16,6 +16,6 @@ atlas_add_library( ScintReadoutGeometry PUBLIC_HEADERS ScintReadoutGeometry INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel CxxUtils FaserDetDescr GeoModelFaserUtilities GeoModelUtilities GeoPrimitives Identifier GaudiKernel ScintIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel CxxUtils FaserDetDescr GeoModelFaserUtilities GeoPrimitives Identifier GaudiKernel ScintIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions PRIVATE_LINK_LIBRARIES AthenaPoolUtilities IdDictDetDescr ) diff --git a/Scintillator/ScintDetDescr/ScintReadoutGeometry/src/ScintDetectorElement.cxx b/Scintillator/ScintDetDescr/ScintReadoutGeometry/src/ScintDetectorElement.cxx index 7656d64d4456cffe8d34821087ad6b9d7ad8784d..3b4a0c4812177549e28af5e39cae2a4ed2d92e91 100644 --- a/Scintillator/ScintDetDescr/ScintReadoutGeometry/src/ScintDetectorElement.cxx +++ b/Scintillator/ScintDetDescr/ScintReadoutGeometry/src/ScintDetectorElement.cxx @@ -16,7 +16,7 @@ #include "ScintIdentifier/PreshowerID.h" #include "GeoModelKernel/GeoVFullPhysVol.h" -#include "GeoModelUtilities/GeoAlignmentStore.h" +#include "GeoModelFaserUtilities/GeoAlignmentStore.h" #include "FaserDetDescr/FaserDetectorID.h" #include "CLHEP/Geometry/Point3D.h" diff --git a/Scintillator/ScintDetDescr/TriggerGeoModel/CMakeLists.txt b/Scintillator/ScintDetDescr/TriggerGeoModel/CMakeLists.txt index 682fbdd40468ad288b84bdf9a63de5b21cfe9503..38946b29ec662bbce9dc07c62ae4b4309915ded2 100644 --- a/Scintillator/ScintDetDescr/TriggerGeoModel/CMakeLists.txt +++ b/Scintillator/ScintDetDescr/TriggerGeoModel/CMakeLists.txt @@ -9,18 +9,19 @@ atlas_subdir( TriggerGeoModel ) find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( TriggerGeoModel src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GeoModelFaserUtilities GaudiKernel SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions FaserDetDescr ScintGeoModelUtils ScintReadoutGeometry ScintIdentifier Identifier ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelFaserUtilities GaudiKernel SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions FaserDetDescr ScintGeoModelUtils ScintReadoutGeometry ScintIdentifier Identifier ) -#atlas_add_test( SCT_GMConfig_test -# SCRIPT test/SCT_GMConfig_test.py -# PROPERTIES TIMEOUT 300 ) +atlas_add_test( TriggerGMConfig_test + SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/test/TriggerGMConfig_test.py + PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + PROPERTIES TIMEOUT 300 ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Scintillator/ScintDetDescr/TriggerGeoModel/TriggerGeoModel/TriggerDetectorTool.h b/Scintillator/ScintDetDescr/TriggerGeoModel/TriggerGeoModel/TriggerDetectorTool.h index 1cc12211f0eaf6b14096c4df634a954d874ad2d6..747601c965131431e30fea58f56b231f8c9f482f 100644 --- a/Scintillator/ScintDetDescr/TriggerGeoModel/TriggerGeoModel/TriggerDetectorTool.h +++ b/Scintillator/ScintDetDescr/TriggerGeoModel/TriggerGeoModel/TriggerDetectorTool.h @@ -5,7 +5,7 @@ #ifndef TRIGGERGEOMODEL_TRIGGERDETECTORTOOL_H #define TRIGGERGEOMODEL_TRIGGERDETECTORTOOL_H -#include "GeoModelUtilities/GeoModelTool.h" +#include "GeoModelFaserUtilities/GeoModelTool.h" #include "TriggerGeoModel/TriggerGeoModelAthenaComps.h" #include "GeometryDBSvc/IGeometryDBSvc.h" diff --git a/Scintillator/ScintDetDescr/TriggerGeoModel/src/TriggerDetectorTool.cxx b/Scintillator/ScintDetDescr/TriggerGeoModel/src/TriggerDetectorTool.cxx index 569cdadd198f9e42c6347471f74ac753b3b426ff..878e632899d7419a775994050861c1f32bb06327 100644 --- a/Scintillator/ScintDetDescr/TriggerGeoModel/src/TriggerDetectorTool.cxx +++ b/Scintillator/ScintDetDescr/TriggerGeoModel/src/TriggerDetectorTool.cxx @@ -14,7 +14,7 @@ #include "ScintIdentifier/TriggerID.h" #include "DetDescrConditions/AlignableTransformContainer.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" #include "StoreGate/DataHandle.h" #include "RDBAccessSvc/IRDBRecord.h" diff --git a/Scintillator/ScintDetDescr/TriggerGeoModel/test/TriggerGMConfig_test.py b/Scintillator/ScintDetDescr/TriggerGeoModel/test/TriggerGMConfig_test.py index 1a1a016ce71404b9805172633fff3ceb71c6963a..0c68cdf32151c4f71a50b1922751a05b5fbd1cb6 100644 --- a/Scintillator/ScintDetDescr/TriggerGeoModel/test/TriggerGMConfig_test.py +++ b/Scintillator/ScintDetDescr/TriggerGeoModel/test/TriggerGMConfig_test.py @@ -11,9 +11,7 @@ if __name__ == "__main__": ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - # ConfigFlags.Detector.SimulatePixel = False ConfigFlags.Detector.SimulateTrigger = False - # ConfigFlags.Detector.SimulateTRT = False ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Scintillator/ScintDetDescr/VetoGeoModel/CMakeLists.txt b/Scintillator/ScintDetDescr/VetoGeoModel/CMakeLists.txt index 7d3eb4ecd863a4cfcb9b4d1fbe7d85569c47dad1..d5c979d4080b6fa2eaacbabc243a122fc50864ab 100644 --- a/Scintillator/ScintDetDescr/VetoGeoModel/CMakeLists.txt +++ b/Scintillator/ScintDetDescr/VetoGeoModel/CMakeLists.txt @@ -9,18 +9,20 @@ atlas_subdir( VetoGeoModel ) find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( VetoGeoModel src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GeoModelFaserUtilities GaudiKernel SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions FaserDetDescr ScintGeoModelUtils ScintReadoutGeometry ScintIdentifier Identifier ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelFaserUtilities GaudiKernel SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions FaserDetDescr ScintGeoModelUtils ScintReadoutGeometry ScintIdentifier Identifier ) + +atlas_add_test( VetoGMConfig_test + SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/test/VetoGMConfig_test.py + PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + PROPERTIES TIMEOUT 300 ) -#atlas_add_test( SCT_GMConfig_test -# SCRIPT test/SCT_GMConfig_test.py -# PROPERTIES TIMEOUT 300 ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Scintillator/ScintDetDescr/VetoGeoModel/VetoGeoModel/VetoDetectorTool.h b/Scintillator/ScintDetDescr/VetoGeoModel/VetoGeoModel/VetoDetectorTool.h index 6e8895e1db59e74820cff9a91bedff1c824cbc8c..3196c029e861bacab804bb0c5d6f19d86fe6060a 100644 --- a/Scintillator/ScintDetDescr/VetoGeoModel/VetoGeoModel/VetoDetectorTool.h +++ b/Scintillator/ScintDetDescr/VetoGeoModel/VetoGeoModel/VetoDetectorTool.h @@ -5,7 +5,7 @@ #ifndef VETOGEOMODEL_VETODETECTORTOOL_H #define VETOGEOMODEL_VETODETECTORTOOL_H -#include "GeoModelUtilities/GeoModelTool.h" +#include "GeoModelFaserUtilities/GeoModelTool.h" #include "VetoGeoModel/VetoGeoModelAthenaComps.h" #include "GeometryDBSvc/IGeometryDBSvc.h" diff --git a/Scintillator/ScintDetDescr/VetoGeoModel/src/VetoDetectorTool.cxx b/Scintillator/ScintDetDescr/VetoGeoModel/src/VetoDetectorTool.cxx index a397a0591ea34a456b68bb882aebcf8217a0bda3..d588039a74e5df1973cc11b29be5311be1014af6 100644 --- a/Scintillator/ScintDetDescr/VetoGeoModel/src/VetoDetectorTool.cxx +++ b/Scintillator/ScintDetDescr/VetoGeoModel/src/VetoDetectorTool.cxx @@ -14,7 +14,7 @@ #include "ScintIdentifier/VetoID.h" #include "DetDescrConditions/AlignableTransformContainer.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" #include "StoreGate/DataHandle.h" #include "RDBAccessSvc/IRDBRecord.h" diff --git a/Scintillator/ScintDetDescr/VetoGeoModel/test/VetoGMConfig_test.py b/Scintillator/ScintDetDescr/VetoGeoModel/test/VetoGMConfig_test.py index a585cdec1df9c3320686b1ab43fd09180102011f..3b649270f43f16793de2a445b66935dc69bad34f 100644 --- a/Scintillator/ScintDetDescr/VetoGeoModel/test/VetoGMConfig_test.py +++ b/Scintillator/ScintDetDescr/VetoGeoModel/test/VetoGMConfig_test.py @@ -11,9 +11,7 @@ if __name__ == "__main__": ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - # ConfigFlags.Detector.SimulatePixel = False ConfigFlags.Detector.SimulateVeto = False - # ConfigFlags.Detector.SimulateTRT = False ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Simulation/G4Faser/G4FaserAlg/src/G4FaserAlg.cxx b/Simulation/G4Faser/G4FaserAlg/src/G4FaserAlg.cxx index 20108eca13ca73095fef59dfd7c1c6830e7f25a9..50cbcec1aff8dca123e64e2a4c4effb9dde42061 100644 --- a/Simulation/G4Faser/G4FaserAlg/src/G4FaserAlg.cxx +++ b/Simulation/G4Faser/G4FaserAlg/src/G4FaserAlg.cxx @@ -5,6 +5,7 @@ // Local includes #include "G4FaserAlg.h" #include "G4FaserFluxRecorder.h" +#include "G4AtlasAlg/G4AtlasActionInitialization.h" #include "AthenaKernel/RNGWrapper.h" @@ -53,6 +54,8 @@ static std::once_flag releaseGeoModelOnceFlag; G4FaserAlg::G4FaserAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) { + // Verbosities + declareProperty("Verbosities", m_verbosities); } @@ -83,10 +86,13 @@ StatusCode G4FaserAlg::initialize() // Truth ATH_CHECK( m_truthRecordSvc.retrieve() ); ATH_MSG_INFO( "- Using ISF TruthRecordSvc : " << m_truthRecordSvc.typeAndName() ); + // ATH_CHECK( m_geoIDSvc.retrieve() ); + // ATH_MSG_INFO( "- Using ISF GeoIDSvc : " << m_geoIDSvc.typeAndName() ); FaserTruthStrategyManager* sManager = FaserTruthStrategyManager::GetStrategyManager(); sManager->SetISFTruthSvc( &(*m_truthRecordSvc) ); - + // sManager->SetISFGeoIDSvc( &(*m_geoIDSvc) ); + // I/O ATH_CHECK( m_inputTruthCollectionKey.initialize()); ATH_CHECK( m_outputTruthCollectionKey.initialize()); @@ -116,11 +122,13 @@ void G4FaserAlg::initializeOnce() // Worker Thread initialization used to create worker run manager on demand. std::unique_ptr<G4AtlasUserWorkerThreadInitialization> workerInit = std::make_unique<G4AtlasUserWorkerThreadInitialization>(); - workerInit->SetUserActionSvc( m_userActionSvc.typeAndName() ); workerInit->SetDetGeoSvc( m_detGeoSvc.typeAndName() ); workerInit->SetSDMasterTool( m_senDetTool.typeAndName() ); workerInit->SetFastSimMasterTool( m_fastSimTool.typeAndName() ); runMgr->SetUserInitialization( workerInit.release() ); + std::unique_ptr<G4AtlasActionInitialization> actionInitialization = + std::make_unique<G4AtlasActionInitialization>(&*m_userActionSvc); + runMgr->SetUserInitialization(actionInitialization.release()); #else throw std::runtime_error("Trying to use multi-threading in non-MT build!"); #endif @@ -131,12 +139,14 @@ void G4FaserAlg::initializeOnce() m_physListSvc->SetPhysicsList(); runMgr->SetRecordFlux( m_recordFlux, std::make_unique<G4FaserFluxRecorder>() ); runMgr->SetLogLevel( int(msg().level()) ); // Synch log levels - runMgr->SetUserActionSvc( m_userActionSvc.typeAndName() ); runMgr->SetDetGeoSvc( m_detGeoSvc.typeAndName() ); runMgr->SetSDMasterTool(m_senDetTool.typeAndName() ); runMgr->SetFastSimMasterTool(m_fastSimTool.typeAndName() ); runMgr->SetPhysListSvc(m_physListSvc.typeAndName() ); - } + std::unique_ptr<G4AtlasActionInitialization> actionInitialization = + std::make_unique<G4AtlasActionInitialization>(&*m_userActionSvc); + runMgr->SetUserInitialization(actionInitialization.release()); +} // G4 user interface commands G4UImanager *ui = G4UImanager::GetUIpointer(); @@ -306,7 +316,7 @@ StatusCode G4FaserAlg::execute() // Set the RNG to use for this event. We need to reset it for MT jobs // because of the mismatch between Gaudi slot-local and G4 thread-local RNG. - ATHRNG::RNGWrapper* rngWrapper = m_rndmGenSvc->getEngine(this); + ATHRNG::RNGWrapper* rngWrapper = m_rndmGenSvc->getEngine(this, m_randomStreamName); rngWrapper->setSeed( name(), Gaudi::Hive::currentContext() ); G4Random::setTheEngine(*rngWrapper); @@ -380,14 +390,6 @@ StatusCode G4FaserAlg::execute() ATH_CHECK(m_senDetTool->EndOfAthenaEvent()); ATH_CHECK(m_fastSimTool->EndOfAthenaEvent()); - if ((int) msg().level() <= (int) MSG::DEBUG) - { - for (size_t iEvt = 0; iEvt < outputTruthCollection->size(); ++iEvt) - { - outputTruthCollection->at(iEvt)->print(msg().stream()); - } - } - ATH_CHECK( m_truthRecordSvc->releaseEvent() ); return StatusCode::SUCCESS; @@ -431,4 +433,4 @@ void G4FaserAlg::commandLog(int returnCode, const std::string& commandString) co default: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Unknown Status!"); } break; } -} +} \ No newline at end of file diff --git a/Simulation/G4Faser/G4FaserAlg/src/G4FaserAlg.h b/Simulation/G4Faser/G4FaserAlg/src/G4FaserAlg.h index 7960c9a25d294acb51b76521d055d28c10a0a3c0..420e23f7154244d03d1645aeeddcdf95e7c08ba4 100644 --- a/Simulation/G4Faser/G4FaserAlg/src/G4FaserAlg.h +++ b/Simulation/G4Faser/G4FaserAlg/src/G4FaserAlg.h @@ -30,6 +30,7 @@ // ISF includes #include "FaserISF_Interfaces/IFaserTruthSvc.h" +// #include "FaserISF_Interfaces/IFaserGeoIDSvc.h" #include "FaserISF_Interfaces/IFaserInputConverter.h" /// @class G4FaserAlg @@ -99,10 +100,11 @@ private: SG::WriteHandleKey<McEventCollection> m_outputTruthCollectionKey{this, "OutputTruthCollection", "TruthEvent", "Output hard scatter truth collection"};//!< output hard scatter truth collection /// Central Truth Service ServiceHandle<ISF::IFaserTruthSvc> m_truthRecordSvc{this, "TruthRecordService", "ISF_FaserTruthRecordSvc", ""}; + /// Geo ID Service + // ServiceHandle<ISF::IFaserGeoIDSvc> m_geoIDSvc{this, "GeoIDSvc", "ISF_FaserGeoIDSvc", ""}; /// Verbosity settings for Geant4 - // std::map<std::string,std::string> m_verbosities; - Gaudi::Property<std::map<std::string,std::string> > m_verbosities {this, "Verbosities", {}, "Verbosities for G4 components"}; + std::map<std::string,std::string> m_verbosities; /// @} /// @name Configurable Properties (common with TransportTool) @@ -120,6 +122,8 @@ private: Gaudi::Property<bool> m_activateParallelGeometries{this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"}; /// Random number service ServiceHandle<IAthRNGSvc> m_rndmGenSvc{this, "AtRndmGenSvc", "AthRNGSvc", ""}; // TODO rename property + /// Random Stream Name + Gaudi::Property<std::string> m_randomStreamName{this, "RandomStreamName", "Geant4", ""}; /// ServiceHandle<IUserLimitsSvc> m_userLimitsSvc{this, "UserLimitsSvc", "UserLimitsSvc", ""}; /// User Action Service diff --git a/Simulation/G4Faser/G4FaserAlg/test/runEcal.py b/Simulation/G4Faser/G4FaserAlg/test/runEcal.py new file mode 100755 index 0000000000000000000000000000000000000000..268d8da2b34109fc82ec0225dd199282ec07719d --- /dev/null +++ b/Simulation/G4Faser/G4FaserAlg/test/runEcal.py @@ -0,0 +1,140 @@ +#!/usr/bin/env python +if __name__ == "__main__": + import os + import sys + import GaudiPython + import ParticleGun as PG + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + from AthenaConfiguration.ComponentFactory import CompFactory + from AthenaCommon.AppMgr import * + from AthenaCommon.Logging import log, logging + from AthenaCommon.SystemOfUnits import TeV + from AthenaCommon.PhysicalConstants import pi + from AthenaCommon.Constants import VERBOSE, INFO + from AthenaCommon.Configurable import Configurable + from CalypsoConfiguration.AllConfigFlags import ConfigFlags + from CalypsoConfiguration.MainServicesConfig import MainServicesCfg + from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg + from McEventSelector.McEventSelectorConfig import McEventSelectorCfg + from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg + from FaserGeoModel.FaserGeoModelConfig import FaserGeometryCfg + from G4FaserAlg.G4FaserAlgConfigNew import G4FaserAlgCfg + from G4FaserServices.G4FaserServicesConfigNew import G4GeometryNotifierSvcCfg +# +# Set up logging and new style config +# + log.setLevel(VERBOSE) + Configurable.configurableRun3Behavior = True +# +# Input settings (Generator file) +# +# from AthenaConfiguration.TestDefaults import defaultTestFiles +# ConfigFlags.Input.Files = defaultTestFiles.EVNT +# +# Alternatively, these must ALL be explicitly set to run without an input file +# (if missing, it will try to read metadata from a non-existent file and crash) +# + ConfigFlags.Input.Files = [""] + ConfigFlags.Input.isMC = True + ConfigFlags.Input.RunNumber = 12345 + ConfigFlags.Input.Collections = [""] + ConfigFlags.Input.ProjectName = "mc19" + ConfigFlags.Common.isOnline = False + ConfigFlags.Beam.Type = "collisions" + ConfigFlags.Beam.Energy = 7*TeV # Informational, does not affect simulation + ConfigFlags.GeoModel.FaserVersion = "FASER-01" # Always needed + ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" # Always needed; only the OFLCOND part matters +# Workaround for bug/missing flag; unimportant otherwise + ConfigFlags.addFlag("Input.InitialTimeStamp", 0) +# Workaround to avoid problematic ISF code + ConfigFlags.GeoModel.Layout = "Development" +# +# Output settings +# + ConfigFlags.Output.HITSFileName = "ecalNone.1k.HITS.pool.root" + ConfigFlags.GeoModel.GeoExportFile = "faserGeo.db" # Optional dump of geometry for browsing in vp1light +# +# Geometry-related settings +# Do not change! +# + ConfigFlags.Detector.SimulateVeto = True + ConfigFlags.Detector.GeometryVeto = True + ConfigFlags.Detector.SimulateTrigger= True + ConfigFlags.Detector.GeometryTrigger= True + ConfigFlags.Detector.SimulatePreshower = True + ConfigFlags.Detector.GeometryPreshower = True + ConfigFlags.Detector.SimulateFaserSCT = True + ConfigFlags.Detector.GeometryFaserSCT = True + ConfigFlags.Detector.SimulateEcal = True + ConfigFlags.Detector.GeometryEcal = True + ConfigFlags.Detector.SimulateUpstreamDipole = True + ConfigFlags.Detector.SimulateCentralDipole = True + ConfigFlags.Detector.SimulateDownstreamDipole = True + ConfigFlags.Detector.GeometryUpstreamDipole = True + ConfigFlags.Detector.GeometryCentralDipole = True + ConfigFlags.Detector.GeometryDownstreamDipole = True + ConfigFlags.GeoModel.Align.Dynamic = False + ConfigFlags.Sim.ReleaseGeoModel = False +# +# All flags should be set before calling lock +# + ConfigFlags.lock() +# +# Construct ComponentAccumulator +# + acc = MainServicesCfg(ConfigFlags) +# +# Particle Gun generator (comment out to read generator file) +# Raw energies (without units given) are interpreted as MeV +# + pg = PG.ParticleGun() + pg.McEventKey = "GEN_EVENT" + pg.randomSeed = 1234567 + pg.sampler.pid = 11 + pg.sampler.mom = PG.EThetaMPhiSampler(energy=1*TeV, theta=[0, pi/200], phi=[0, 2*pi], mass=0.511) + pg.sampler.pos = PG.PosSampler(x=[-5.0, 5.0], y=[-5.0, 5.0], z=2730.0, t=0.0) + acc.addEventAlgo(pg, "AthBeginSeq") # to run *before* G4 +# +# Only one of these two should be used in a given job +# (MCEventSelectorCfg for generating events with no input file, +# PoolReadCfg when reading generator data from an input file) +# + acc.merge(McEventSelectorCfg(ConfigFlags)) + # acc.merge(PoolReadCfg(ConfigFlags)) +# +# Output stream configuration +# + acc.merge(OutputStreamCfg(ConfigFlags, + "HITS", + ["EventInfo#*", + "McEventCollection#TruthEvent", + "McEventCollection#GEN_EVENT", + "ScintHitCollection#*", + "FaserSiHitCollection#*", + "CaloHitCollection#*" + ], disableEventTag=True)) + acc.getEventAlgo("OutputStreamHITS").AcceptAlgs = ["G4FaserAlg"] # optional + acc.getEventAlgo("OutputStreamHITS").WritingTool.ProcessingTag = "StreamHITS" # required +# +# Here is the configuration of the Geant4 pieces +# + acc.merge(FaserGeometryCfg(ConfigFlags)) + acc.merge(G4FaserAlgCfg(ConfigFlags)) + acc.addService(G4GeometryNotifierSvcCfg(ConfigFlags, ActivateLVNotifier=True)) +# +# Verbosity +# +# ConfigFlags.dump() +# logging.getLogger('forcomps').setLevel(VERBOSE) +# acc.foreach_component("*").OutputLevel = VERBOSE +# acc.foreach_component("*ClassID*").OutputLevel = INFO +# acc.getService("StoreGateSvc").Dump=True +# acc.getService("ConditionStore").Dump=True +# acc.printConfig() + f=open('FaserG4AppCfg_EVNT.pkl','wb') + acc.store(f) + f.close() +# +# Execute and finish +# + sys.exit(int(acc.run(maxEvents=1000).isFailure())) diff --git a/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py b/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py index 8b5e7718687b0315aeded2d62ecd39250738bd00..a46deaa99702897bef402d0005cc8f828c5c1421 100644 --- a/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py +++ b/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py @@ -7,7 +7,7 @@ DetectorGeometrySvc, G4AtlasSvc, G4GeometryNotifierSvc, PhysicsListSvc=CompFacto # # Physics region tools # -from G4FaserTools.G4PhysicsRegionConfigNew import ScintillatorPhysicsRegionToolCfg, TrackerPhysicsRegionToolCfg #, FaserCaloPhysicsRegionToolCfg +from G4FaserTools.G4PhysicsRegionConfigNew import ScintillatorPhysicsRegionToolCfg, TrackerPhysicsRegionToolCfg, EcalPhysicsRegionToolCfg # # Geometry tools # @@ -20,7 +20,7 @@ from G4FaserTools.G4FieldConfigNew import FASERFieldManagerToolCfg, VetoFieldMan # Future field managers (?) # # from G4FaserTools.G4FieldConfigNew import UpstreamDipoleFieldManagerToolCfg, CentralDipoleFieldManagerToolCfg, DownstreamDipleFieldManagerToolCfg, FaserCaloFieldManagerToolCfg -from G4FaserTools.G4FieldConfigNew import TrackerFieldManagerToolCfg, DipoleFieldManagerToolCfg +from G4FaserTools.G4FieldConfigNew import TrackerFieldManagerToolCfg, DipoleFieldManagerToolCfg, EcalFieldManagerToolCfg # # # @@ -38,8 +38,8 @@ def getFASER_RegionCreatorList(ConfigFlags): if ConfigFlags.Detector.SimulateTracker: regionCreatorList += [TrackerPhysicsRegionToolCfg(ConfigFlags)] - # if ConfigFlags.Detector.SimulateFaserCalo: - # regionCreatorList += [FaserCaloPhysicsRegionToolCfg(ConfigFlags)] + if ConfigFlags.Detector.SimulateEcal: + regionCreatorList += [EcalPhysicsRegionToolCfg(ConfigFlags)] return regionCreatorList @@ -84,10 +84,10 @@ def FASER_FieldMgrListCfg(ConfigFlags): acc = TrackerFieldManagerToolCfg(ConfigFlags) tool = result.popToolsAndMerge(acc) fieldMgrList += [tool] - # if ConfigFlags.Detector.SimulateFaserCalo: - # acc = FaserCaloFieldManagerToolCfg(ConfigFlags) - # tool = result.popToolsAndMerge(acc) - # fieldMgrList += [tool] + if ConfigFlags.Detector.SimulateEcal: + acc = EcalFieldManagerToolCfg(ConfigFlags) + tool = result.popToolsAndMerge(acc) + fieldMgrList += [tool] result.setPrivateTools(fieldMgrList) return result diff --git a/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfig.py b/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfig.py deleted file mode 100644 index 0c47f6b7038425e65978e3ada70555638925fdd1..0000000000000000000000000000000000000000 --- a/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfig.py +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration - -from AthenaCommon import CfgMgr - -def generateFastSimulationList(): - FastSimulationList=[] - # - # Not yet supported in FASER - # - # from G4AtlasApps.SimFlags import simFlags - # from CalypsoCommon.DetFlags import DetFlags - # if DetFlags.bpipe_on(): - # if hasattr(simFlags, 'ForwardDetectors') and simFlags.ForwardDetectors.statusOn and simFlags.ForwardDetectors() == 2: - # FastSimulationList += ['ForwardTransportModel'] - # if hasattr(simFlags, 'BeamPipeSimMode') and simFlags.BeamPipeSimMode.statusOn and simFlags.BeamPipeSimMode() != "Normal": - # FastSimulationList += [ 'SimpleFastKiller' ] - # if DetFlags.geometry.LAr_on(): - # ## Shower parameterization overrides the calibration hit flag - # if simFlags.LArParameterization.statusOn and simFlags.LArParameterization() > 0 \ - # and simFlags.CalibrationRun.statusOn and simFlags.CalibrationRun.get_Value() in ['LAr','LAr+Tile','DeadLAr']: - # print 'getFastSimulationMasterTool FATAL :: You requested both calibration hits and frozen showers / parameterization in the LAr.' - # print ' Such a configuration is not allowed, and would give junk calibration hits where the showers are modified.' - # print ' Please try again with a different value of simFlags.LArParameterization or simFlags.CalibrationRun ' - # raise RuntimeError('Configuration not allowed') - # if simFlags.LArParameterization() > 0: - # #FIXME If we're only using Frozen Showers in the FCAL do we really need to set up the EMB and EMEC as well? - # FastSimulationList += ['EMBFastShower', 'EMECFastShower', 'FCALFastShower', 'FCAL2FastShower'] - # if simFlags.LArParameterization.get_Value() > 1: - # FastSimulationList += ['DeadMaterialShower'] - # elif simFlags.LArParameterization() is None or simFlags.LArParameterization() == 0: - # print "getFastSimulationMasterTool INFO No Frozen Showers" - # if DetFlags.Muon_on(): - # if hasattr(simFlags, 'CavernBG') and simFlags.CavernBG.statusOn and simFlags.CavernBG.get_Value() != 'Read' and\ - # not (hasattr(simFlags, 'RecordFlux') and simFlags.RecordFlux.statusOn and simFlags.RecordFlux()): - # FastSimulationList += ['NeutronFastSim'] - return FastSimulationList - -# def getFastSimulationMasterTool(name="FastSimulationMasterTool", **kwargs): -# kwargs.setdefault("FastSimulations", generateFastSimulationList()) -# return CfgMgr.FastSimulationMasterTool(name, **kwargs) - -# def getEmptyFastSimulationMasterTool(name="EmptyFastSimulationMasterTool", **kwargs): -# return CfgMgr.FastSimulationMasterTool(name, **kwargs) - -# def generateFwdSensitiveDetectorList(): -# SensitiveDetectorList=[] -# from G4AtlasApps.SimFlags import simFlags -# from AthenaCommon.DetFlags import DetFlags -# if DetFlags.simulate.Lucid_on(): -# SensitiveDetectorList += [ 'LUCID_SensitiveDetector' ] -# if hasattr(simFlags, 'ForwardDetectors') and simFlags.ForwardDetectors.statusOn: -# if DetFlags.simulate.ZDC_on(): -# SensitiveDetectorList += [ 'ZDC_PixelSD', 'ZDC_StripSD' ] -# if DetFlags.simulate.ALFA_on(): -# SensitiveDetectorList += [ 'ALFA_SensitiveDetector' ] -# if DetFlags.simulate.AFP_on(): -# SensitiveDetectorList += [ 'AFP_SensitiveDetector' ] -# #SensitiveDetectorList += [ 'AFP_SiDSensitiveDetector', 'AFP_TDSensitiveDetector' ] - -# return SensitiveDetectorList - -# def generateTrackFastSimSensitiveDetectorList(): -# SensitiveDetectorList=[] -# from AthenaCommon.DetFlags import DetFlags -# from G4AtlasApps.SimFlags import simFlags -# if (DetFlags.Muon_on() and simFlags.CavernBG.statusOn and simFlags.CavernBG.get_Value() != 'Read' and 'Write' in simFlags.CavernBG.get_Value()) or (hasattr(simFlags, 'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn): -# SensitiveDetectorList += [ 'TrackFastSimSD' ] -# return SensitiveDetectorList - -def generateScintillatorSensitiveDetectorList(): - SensitiveDetectorList=[] - from CalypsoConfiguration.AllConfigFlags import ConfigFlags - if (ConfigFlags.Detector.SimulateScintillator): - if (ConfigFlags.Detector.SimulateVeto): - SensitiveDetectorList += [ 'VetoSensorSD' ] - if (ConfigFlags.Detector.SimulateTrigger): - SensitiveDetectorList += [ 'TriggerSensorSD'] - if (ConfigFlags.Detector.SimulatePreshowe): - SensitiveDetectorList += [ 'PreshowerSD'] - return SensitiveDetectorList - -def generateTrackerSensitiveDetectorList(): - SensitiveDetectorList=[] - from CalypsoConfiguration.AllFlags import ConfigFlags - if (ConfigFlags.Detector.SimulateTracker): - if (ConfigFlags.Detector.SimulateFaserSCT): - SensitiveDetectorList += [ 'SctSensorSD' ] - return SensitiveDetectorList - -def generateFaserCaloSensitiveDetectorList(): - SensitiveDetectorList=[] - # from CalypsoConfiguration.AllFlags import ConfigFlags - # if (ConfigFlags.Detector.SimulateFaserCalo): - # SensitiveDetectorList += [ 'FaserCaloSensorSD' ] - return SensitiveDetectorList - -def generateSensitiveDetectorList(): - SensitiveDetectorList=[] - SensitiveDetectorList += generateScintillatorSensitiveDetectorList() - SensitiveDetectorList += generateTrackerSensitiveDetectorList() - SensitiveDetectorList += generateFaserCaloSensitiveDetectorList() - return SensitiveDetectorList - -def getSensitiveDetectorMasterTool(name="SensitiveDetectorMasterTool", **kwargs): - kwargs.setdefault("SensitiveDetectors", generateSensitiveDetectorList()) - return CfgMgr.SensitiveDetectorMasterTool(name, **kwargs) - -def getEmptySensitiveDetectorMasterTool(name="EmptySensitiveDetectorMasterTool", **kwargs): - return CfgMgr.SensitiveDetectorMasterTool(name, **kwargs) - -def getPhysicsListToolBase(name="PhysicsListToolBase", **kwargs): - PhysOptionList = ["G4StepLimitationTool"] - from CalypsoConfiguration.AllFlags import ConfigFlags - PhysOptionList += ConfigFlags.Sim.PhysicsOptions - PhysDecaysList = [] - - kwargs.setdefault("PhysOption", PhysOptionList) - kwargs.setdefault("PhysicsDecay", PhysDecaysList) - kwargs.setdefault("PhysicsList", ConfigFlags.Sim.PhysicsList) - - if 'PhysicsList' in kwargs: - if kwargs['PhysicsList'].endswith('_EMV') or kwargs['PhysicsList'].endswith('_EMX'): - raise RuntimeError( 'PhysicsList not allowed: '+kwargs['PhysicsList'] ) - kwargs.setdefault("GeneralCut", 1.) - if (ConfigFlags.Sim.NeutronTimeCut.statusOn): - kwargs.setdefault("NeutronTimeCut", ConfigFlags.Sim.NeutronTimeCut) - if (ConfigFlags.Sim.NeutronEnergyCut.statusOn): - kwargs.setdefault("NeutronEnergyCut", ConfigFlags.Sim.NeutronEnergyCut) - if (ConfigFlags.Sim.ApplyEMCuts.statusOn): - kwargs.setdefault("ApplyEMCuts", ConfigFlags.Sim.ApplyEMCuts) - return CfgMgr.PhysicsListToolBase(name, **kwargs) - -def getReducedStepSizeUserLimitsTool(name="ReducedStepSizeUserLimitsTool", **kwargs): - from AthenaCommon.SystemOfUnits import millimeter - kwargs.setdefault("OutputLevel", 1) - kwargs.setdefault("VolumeList", [ - "Faser::Faser", - ]) - kwargs.setdefault("MaxStep", 10.*millimeter) - kwargs.setdefault("MatchType", "contains") - return CfgMgr.UserLimitsTool(name, **kwargs) - diff --git a/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py b/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py index b05da95e7b284a4f6a1a7f6fa9a1457ab4c31fb4..0fda13cce8f864fbc07d2a3ebcd3cbf01d71c69a 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py @@ -11,6 +11,7 @@ from VetoG4_SD.VetoG4_SDToolConfig import VetoSensorSDCfg from TriggerG4_SD.TriggerG4_SDToolConfig import TriggerSensorSDCfg from PreshowerG4_SD.PreshowerG4_SDToolConfig import PreshowerSensorSDCfg from FaserSCT_G4_SD.FaserSCT_G4_SDToolConfig import SctSensorSDCfg +from EcalG4_SD.EcalG4_SDToolConfig import EcalSensorSDCfg def generateScintSensitiveDetectorList(ConfigFlags): @@ -46,6 +47,17 @@ def generateTrackerSensitiveDetectorList(ConfigFlags): return result, SensitiveDetectorList #List of tools here now! (CALL IT TOOL LIST?) +def generateCaloSensitiveDetectorList(ConfigFlags): + + result = ComponentAccumulator() + SensitiveDetectorList=[] + + if ConfigFlags.Detector.SimulateEcal: + accEcal,toolEcal = EcalSensorSDCfg(ConfigFlags) + SensitiveDetectorList += [ toolEcal ] + result.merge(accEcal) + + return result, SensitiveDetectorList #List of tools here now! (CALL IT TOOL LIST?) # def generateEnvelopeSensitiveDetectorList(ConfigFlags): # SensitiveDetectorList=[] @@ -64,8 +76,12 @@ def generateSensitiveDetectorList(ConfigFlags): acc_TrackerSensitiveDetector, TrackerSensitiveDetectorList = generateTrackerSensitiveDetectorList(ConfigFlags) SensitiveDetectorList += TrackerSensitiveDetectorList + acc_CaloSensitiveDetector, CaloSensitiveDetectorList = generateCaloSensitiveDetectorList(ConfigFlags) + SensitiveDetectorList += CaloSensitiveDetectorList + result.merge(acc_ScintSensitiveDetector) result.merge(acc_TrackerSensitiveDetector) + result.merge(acc_CaloSensitiveDetector) result.setPrivateTools(SensitiveDetectorList) return result diff --git a/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py b/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py index bd6ad12d684d744f39e281e783e50ffe77759ce0..81b780f323ab50d28218df68db5c64c68c9efada 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py @@ -100,4 +100,12 @@ def DipoleFieldManagerToolCfg(ConfigFlags, name='DipoleFieldManager', **kwargs): kwargs.setdefault('MinimumEpsilonStep', 0.00001) return BasicDetectorFieldManagerToolCfg(ConfigFlags, name, **kwargs) +def EcalFieldManagerToolCfg(ConfigFlags, name='EcalFieldManager', **kwargs): + kwargs.setdefault("LogicalVolumes", ['Ecal::Ecal']) + #kwargs.setdefault('DeltaChord', 0.00001) + kwargs.setdefault('DeltaIntersection', 0.00001) + kwargs.setdefault('DeltaOneStep', 0.0001) + kwargs.setdefault('MaximumEpsilonStep', 0.001) + kwargs.setdefault('MinimumEpsilonStep', 0.00001) + return BasicDetectorFieldManagerToolCfg(ConfigFlags, name, **kwargs) diff --git a/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py b/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py index ba402f7a5ec07fcdd627a4bf250f17b53c1c9d63..dd8cbc0cf2d54e5e0c3ba5799a413ca491747142 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py @@ -14,6 +14,7 @@ from TriggerGeoModel.TriggerGeoModelConfig import TriggerGeometryCfg from PreshowerGeoModel.PreshowerGeoModelConfig import PreshowerGeometryCfg from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg from DipoleGeoModel.DipoleGeoModelConfig import DipoleGeometryCfg +from EcalGeoModel.EcalGeoModelConfig import EcalGeometryCfg #ToDo - finish migrating this (dnoel) #Todo - just return component accumulator @@ -50,6 +51,12 @@ def DipoleGeoDetectorToolCfg(ConfigFlags, name='Dipole', **kwargs): kwargs.setdefault("DetectorName", "Dipole") return result, GeoDetectorTool(name, **kwargs) +def EcalGeoDetectorToolCfg(ConfigFlags, name='Ecal', **kwargs): + #set up geometry + result=EcalGeometryCfg(ConfigFlags) + kwargs.setdefault("DetectorName", "Ecal") + return result, GeoDetectorTool(name, **kwargs) + def generateSubDetectorList(ConfigFlags): result = ComponentAccumulator() SubDetectorList=[] @@ -79,6 +86,11 @@ def generateSubDetectorList(ConfigFlags): SubDetectorList += [ toolDipole ] result.merge(accDipole) + if ConfigFlags.Detector.SimulateEcal: + accEcal, toolEcal = EcalGeoDetectorToolCfg(ConfigFlags) + SubDetectorList += [ toolEcal ] + result.merge(accEcal) + return result, SubDetectorList def FASEREnvelopeCfg(ConfigFlags, name="Faser", **kwargs): diff --git a/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py b/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py index 38dd5952d0e6d40239250b2428140f66a882a623..15750a0c55b0cca3b4ab2acb6c9b13133b5083b7 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py @@ -81,6 +81,20 @@ def TrackerPhysicsRegionToolCfg(ConfigFlags, name="TrackerPhysicsRegionTool", ** kwargs.setdefault("GammaCut", 0.05) return RegionCreator(name, **kwargs) +# Calo Regions +def EcalPhysicsRegionToolCfg(ConfigFlags, name='EcalPhysicsRegionTool', **kwargs): + kwargs.setdefault("RegionName", 'Ecal') + volumeList = ['Ecal::Ecal'] + kwargs.setdefault("VolumeList", volumeList) + rangeEMB = 0.03 + from G4AtlasApps.SimFlags import simFlags + if '_EMV' not in simFlags.PhysicsList() and '_EMX' not in simFlags.PhysicsList(): + rangeEMB = 0.1 + kwargs.setdefault("ElectronCut", rangeEMB) + kwargs.setdefault("PositronCut", rangeEMB) + kwargs.setdefault("GammaCut", rangeEMB) + return RegionCreator(name, **kwargs) + # def SCTPhysicsRegionToolCfg(ConfigFlags, name='SCTPhysicsRegionTool', **kwargs): # kwargs.setdefault("RegionName", 'SCT') # volumeList = ['SCT::BRLSensor', 'SCT::BRLSensorSS', 'SCT::BRLSensorMS', diff --git a/Simulation/G4Utilities/Geo2G4/CMakeLists.txt b/Simulation/G4Utilities/Geo2G4/CMakeLists.txt index eac3b290d8f988ead2471ff5cddb08dfd83d9854..2a923ed415ef1a9941187f1a12b797f5d8e1aca3 100644 --- a/Simulation/G4Utilities/Geo2G4/CMakeLists.txt +++ b/Simulation/G4Utilities/Geo2G4/CMakeLists.txt @@ -11,16 +11,16 @@ find_package( CLHEP ) find_package( Geant4 ) find_package( ROOT COMPONENTS MathCore RIO Core Tree Hist pthread ) find_package( XercesC ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( Geo2G4Lib src/*.cxx NO_PUBLIC_HEADERS - INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} + INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${GEOMODELCORE_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel G4AtlasInterfaces G4AtlasToolsLib GeoModelUtilities GeoModelFaserUtilities GeoPrimitives + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${GEOMODEL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel G4AtlasInterfaces G4AtlasToolsLib GeoModelFaserUtilities GeoPrimitives PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} GeoSpecialShapes SimHelpers GeoMaterial2G4 AthenaKernel GeoModelInterfaces StoreGateLib SGtests ) atlas_add_component( Geo2G4 diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx index 61e392854b8b48441d5cc22fdb51103e69e89eda..fbcfbd4635b73b37470747b04c3b984c30dd0b61 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx @@ -15,7 +15,7 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoTransform.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h index 3aa785ebb5e17f74879500e08785150f2dc53749..af414d74ac5ed76e8ebae48de0cc66bfd426ce41 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h @@ -15,7 +15,7 @@ //#include "Geo2G4/GenericVolumeBuilder.h" // Typedef -#include "GeoModelUtilities/GeoBorderSurfaceContainer.h" +#include "GeoModelFaserUtilities/GeoBorderSurfaceContainer.h" #include "AthenaKernel/MsgStreamMember.h" diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.cxx index 5440a1dca7039ab9af0d8a8a9e2d5072877656f1..7120c92521ae8699f21f6707e19c804bad4b7d79 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.cxx @@ -5,7 +5,7 @@ #include "Geo2G4OpticalSurfaceFactory.h" #include "GeoMaterial2G4/Geo2G4MatPropTableFactory.h" -#include "GeoModelUtilities/GeoOpticalSurface.h" +#include "GeoModelFaserUtilities/GeoOpticalSurface.h" #include "G4OpticalSurface.hh" diff --git a/Simulation/G4Utilities/Geo2G4/src/VolumeBuilder.h b/Simulation/G4Utilities/Geo2G4/src/VolumeBuilder.h index d1a9ed62c6cad35b8b4e0a4ea9a2ffe5869da1e7..f02526a7608ca3871cc5ac5d4065e911a5999676 100644 --- a/Simulation/G4Utilities/Geo2G4/src/VolumeBuilder.h +++ b/Simulation/G4Utilities/Geo2G4/src/VolumeBuilder.h @@ -8,7 +8,7 @@ #include "G4LogicalVolume.hh" #include "Geo2G4SvcAccessor.h" -#include "GeoModelUtilities/GeoOpticalPhysVol.h" +#include "GeoModelFaserUtilities/GeoOpticalPhysVol.h" #include "G4VPhysicalVolume.hh" diff --git a/Simulation/G4Utilities/GeoMaterial2G4/CMakeLists.txt b/Simulation/G4Utilities/GeoMaterial2G4/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..82f3653900fc142ea7fcf1368c3ab059b4736953 --- /dev/null +++ b/Simulation/G4Utilities/GeoMaterial2G4/CMakeLists.txt @@ -0,0 +1,20 @@ +################################################################################ +# Package: GeoMaterial2G4 +################################################################################ + +# Declare the package name: +atlas_subdir( GeoMaterial2G4 ) + +# External dependencies: +find_package( Geant4 ) +find_package( CLHEP ) +find_package( GeoModel ) + +# Component(s) in the package: +atlas_add_library( GeoMaterial2G4 + src/*.cxx + PUBLIC_HEADERS GeoMaterial2G4 + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GaudiKernel + PRIVATE_LINK_LIBRARIES AthenaBaseComps GeoModelFaserUtilities ) + diff --git a/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MatPropTableFactory.h b/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MatPropTableFactory.h new file mode 100644 index 0000000000000000000000000000000000000000..021dd49700275abc1c04480deddb04d9faf73399 --- /dev/null +++ b/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MatPropTableFactory.h @@ -0,0 +1,29 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GEOMATERIAL2G4_Geo2G4MatPropTableFactory_h +#define GEOMATERIAL2G4_Geo2G4MatPropTableFactory_h + +#include <map> + +class G4MaterialPropertiesTable; +class GeoMaterialPropertiesTable; + +typedef std::map<const GeoMaterialPropertiesTable* , G4MaterialPropertiesTable*, std::less<const GeoMaterialPropertiesTable*> > TableMap; + +class Geo2G4MatPropTableFactory +{ +public: + static Geo2G4MatPropTableFactory* instance(); + + G4MaterialPropertiesTable* Build(const GeoMaterialPropertiesTable*); + +private: + Geo2G4MatPropTableFactory(); + + static Geo2G4MatPropTableFactory* m_instance; + TableMap m_definedTables; +}; + +#endif diff --git a/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MaterialFactory.h b/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MaterialFactory.h new file mode 100644 index 0000000000000000000000000000000000000000..4afaa38a617dddc007d24df7798918e3f0171492 --- /dev/null +++ b/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MaterialFactory.h @@ -0,0 +1,31 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GEOMATERIAL2G4_Geo2G4MaterialFactory_h +#define GEOMATERIAL2G4_Geo2G4MaterialFactory_h + +#include "G4Material.hh" +#include "GeoModelKernel/GeoMaterial.h" +#include "AthenaKernel/MsgStreamMember.h" +#include <map> +#include <string> +typedef std::map<const GeoMaterial* , G4Material*, std::less<const GeoMaterial*> > matList; +typedef std::map<std::string, const GeoMaterial*, std::less<std::string> > matNames; + +class Geo2G4MaterialFactory { +public: + Geo2G4MaterialFactory(); + G4Material* Build(const GeoMaterial*); + /// Log a message using the Athena controlled logging system + MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } + /// Check whether the logging system is active at the provided verbosity level + bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; } +private: + static matList m_geoMaterialToG4Material; + static matNames m_geoMaterialNameToObject; + /// Private message stream member + mutable Athena::MsgStreamMember m_msg; +}; + +#endif diff --git a/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.cxx b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.cxx new file mode 100644 index 0000000000000000000000000000000000000000..63b4cf0b0fb62d124bb94248068d5b6950c6c734 --- /dev/null +++ b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.cxx @@ -0,0 +1,33 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "Geo2G4ElementFactory.h" +#include "GeoModelKernel/GeoElement.h" +#include "G4Element.hh" +#include <iostream> +#include <map> + +Geo2G4ElementFactory::Geo2G4ElementFactory() +{ +} + +G4Element *Geo2G4ElementFactory::Build(const GeoElement* theEle) +{ + // + // Check if this element has already been defined. + // + G4Element* elm; + const std::string& sym = theEle->getSymbol(); + if (m_definedElements.find(sym) != m_definedElements.end()) + { + return m_definedElements[sym]; + } + elm = new G4Element(theEle->getName(), + sym, + theEle->getZ(), + theEle->getA()); + + m_definedElements[sym]=elm; + return elm; +} diff --git a/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.h b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.h new file mode 100644 index 0000000000000000000000000000000000000000..d2ba8de676d1bb26ae14b5bf1198cbb95562198d --- /dev/null +++ b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.h @@ -0,0 +1,23 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GEOMATERIAL2G4_ElementFactory_H +#define GEOMATERIAL2G4_ElementFactory_H + +class G4Element; +class GeoElement; + +#include <map> +#include <string> +typedef std::map<std::string, G4Element*, std::less<std::string> > elList; + +class Geo2G4ElementFactory { +public: + Geo2G4ElementFactory(); + G4Element* Build(const GeoElement*); +private: + elList m_definedElements; +}; + +#endif diff --git a/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MatPropTableFactory.cxx b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MatPropTableFactory.cxx new file mode 100644 index 0000000000000000000000000000000000000000..af2b952067f5d2cbe6c88a930f2a5d4f05feb096 --- /dev/null +++ b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MatPropTableFactory.cxx @@ -0,0 +1,70 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoMaterial2G4/Geo2G4MatPropTableFactory.h" +#include "G4MaterialPropertiesTable.hh" +#include "G4MaterialPropertyVector.hh" + +#include "GeoModelFaserUtilities/GeoMaterialPropertiesTable.h" +#include "GeoModelFaserUtilities/GeoMaterialPropertyVector.h" + +Geo2G4MatPropTableFactory* Geo2G4MatPropTableFactory::m_instance = 0; + +Geo2G4MatPropTableFactory* Geo2G4MatPropTableFactory::instance() +{ + if(!m_instance) + m_instance = new Geo2G4MatPropTableFactory(); + return m_instance; +} + +Geo2G4MatPropTableFactory::Geo2G4MatPropTableFactory() +{ +} + +G4MaterialPropertiesTable* Geo2G4MatPropTableFactory::Build(const GeoMaterialPropertiesTable* thePropTable) +{ + // + // Check if this material has already been defined. + // + if(m_definedTables.find(thePropTable) != m_definedTables.end()) + return m_definedTables[thePropTable]; + + G4MaterialPropertiesTable* newTable = new G4MaterialPropertiesTable(); + + // Add properties to the table ... + + // 1. Const properties + GeoMaterialPropertiesTable::GeoMatPMap_ConstIt it1_first = thePropTable->beginPMap(); + GeoMaterialPropertiesTable::GeoMatPMap_ConstIt it1_last = thePropTable->endPMap(); + + for(;it1_first!=it1_last;it1_first++) + newTable->AddConstProperty((it1_first->first).c_str(),it1_first->second); + + // 2. Vector properties + GeoMaterialPropertiesTable::GeoMatPVMap_ConstIt it2_first = thePropTable->beginPVMap(); + GeoMaterialPropertiesTable::GeoMatPVMap_ConstIt it2_last = thePropTable->endPVMap(); + + for(;it2_first!=it2_last;it2_first++) + { + GeoMaterialPropertyVector* geoMPV = it2_first->second; + //from G4 9.6 G4MaterialPropertyVector is now a typedef of G4PhysicsOrderedFreeVector + G4MaterialPropertyVector* g4MPV = new G4MaterialPropertyVector(); + + geoMPV->ResetIterator(); + + while((*geoMPV).operator++()) + { + //g4MPV->AddElement(geoMPV->GetPhotonMomentum(),geoMPV->GetProperty()); // G4 9.4 syntax + //assume G4PhysicsOrderedFreeVector::InsertValues is equivalent to G4MaterialPropertyVector::AddElement + g4MPV->InsertValues(geoMPV->GetPhotonMomentum(),geoMPV->GetProperty()); // G4 9.6 syntax + } + + newTable->AddProperty((it2_first->first).c_str(),g4MPV); + } + + // Save new table to the map + m_definedTables[thePropTable]=newTable; + + return newTable; +} diff --git a/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MaterialFactory.cxx b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MaterialFactory.cxx new file mode 100644 index 0000000000000000000000000000000000000000..dd7d7550c53553705c204e4a950eef7170f53259 --- /dev/null +++ b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MaterialFactory.cxx @@ -0,0 +1,126 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" +#include "Geo2G4ElementFactory.h" +#include "GeoMaterial2G4/Geo2G4MatPropTableFactory.h" + +#include "GeoModelKernel/GeoMaterial.h" +#include "GeoModelFaserUtilities/GeoExtendedMaterial.h" +#include "GeoModelFaserUtilities/GeoMaterialPropertiesTable.h" + +#include "AthenaBaseComps/AthMsgStreamMacros.h" + +#include "G4Material.hh" + + +matList Geo2G4MaterialFactory::m_geoMaterialToG4Material; +matNames Geo2G4MaterialFactory::m_geoMaterialNameToObject; + +Geo2G4MaterialFactory::Geo2G4MaterialFactory(): m_msg("Geo2G4MaterialFactory") +{ +} + +G4Material* Geo2G4MaterialFactory::Build(const GeoMaterial* geoMaterial) +{ + static Geo2G4ElementFactory eFactory; + Geo2G4MatPropTableFactory* tFactory = Geo2G4MatPropTableFactory::instance(); + + // + // Check if this material has already been defined. + // + if(m_geoMaterialToG4Material.find(geoMaterial) != m_geoMaterialToG4Material.end()) { + return m_geoMaterialToG4Material[geoMaterial]; + } + + const std::string& geoMaterialName = geoMaterial->getName(); + const int nelements = geoMaterial->getNumElements(); + + // Different actions depending whether we are dealing with + // standard or extended materials + + const GeoExtendedMaterial* extMat = dynamic_cast<const GeoExtendedMaterial*>(geoMaterial); + G4Material* g4Material{}; + + if(extMat) { + G4State state = kStateUndefined; + + switch(extMat->getState()) + { + case stateUndefined: + state = kStateUndefined; + break; + case stateSolid: + state = kStateSolid; + break; + case stateLiquid: + state = kStateLiquid; + break; + case stateGas: + state = kStateGas; + break; + default: + break; + } + + const double temperature = extMat->getTemperature(); + const double pressure = extMat->getPressure(); + + g4Material= new G4Material(geoMaterialName, + extMat->getDensity(), + nelements, + state, + temperature, + pressure); + + // Build G4MaterialPropertiesTable if needed + GeoMaterialPropertiesTable* geoPropTable = extMat->GetMaterialPropertiesTable(); + + if(geoPropTable) { + G4MaterialPropertiesTable* g4PropTable = tFactory->Build(geoPropTable); + if(g4PropTable) { + g4Material->SetMaterialPropertiesTable(g4PropTable); + } + } + } + else { + g4Material= new G4Material(geoMaterialName, + geoMaterial->getDensity(), + nelements); + } + + for (int ii = 0; ii< nelements; ii++) { + G4Element* g4Element = eFactory.Build(geoMaterial->getElement(ii)); + g4Material->AddElement(g4Element, geoMaterial->getFraction(ii)); + } + + const G4MaterialTable & theMaterialTable = *(g4Material->GetMaterialTable()); + const G4String& g4MaterialName = g4Material->GetName(); + std::vector<size_t> copyIndex{}; + for(size_t i=0; i< theMaterialTable.size(); ++i) { + if(theMaterialTable[i]->GetName() == g4MaterialName) { + copyIndex.push_back(i); + } + } + if ( copyIndex.size() > 1 ) { + ATH_MSG_WARNING ( "Details of all G4Materials named " << g4MaterialName << " in the G4MaterialTable."); + for (const auto& index : copyIndex) { + ATH_MSG_WARNING ( "G4Material at position "<< index<<" in the G4MaterialTable: \n" << *(theMaterialTable[index])); + } + } + + + m_geoMaterialToG4Material[geoMaterial]=g4Material; + + // Check if we have the situation when on GeoModel side two different + // materials share the same name. + // Print a WARNING message if so. + if(m_geoMaterialNameToObject.find(geoMaterialName)==m_geoMaterialNameToObject.end()) + m_geoMaterialNameToObject[geoMaterialName] = geoMaterial; + else if(m_geoMaterialNameToObject[geoMaterialName] != geoMaterial) { + ATH_MSG_WARNING ( "!!! On GeoModel side two different materials share the name: " << geoMaterialName ); + } + + return g4Material; +} diff --git a/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserTruthSvc.cxx b/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserTruthSvc.cxx index 13e2d10bb8c9e333c7a73245ed027c9475f86de2..c3e0607252a06e4d439cf298851b6d2884cef3b9 100644 --- a/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserTruthSvc.cxx +++ b/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserTruthSvc.cxx @@ -270,7 +270,7 @@ void ISF::FaserTruthSvc::recordIncidentToMCTruth( ISF::IFaserTruthIncident& ti) if (m_ignoreUndefinedBarcodes) { ATH_MSG_WARNING("Unable to generate new Particle Barcode. Continuing due to 'IgnoreUndefinedBarcodes'==True"); } else { - ATH_MSG_FATAL("Unable to generate new Particle Barcode. Aborting"); + ATH_MSG_FATAL("Unable to generate new Particle Barcode in region " << ti.geoID() << ". Aborting"); abort(); } } diff --git a/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py b/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py index 4d84c137bf0bc566fb530127c5304d9d4332eb8a..4fe1606af6b15406fef44cfa252db7ea3eb9a6cd 100644 --- a/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py +++ b/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py @@ -187,7 +187,7 @@ def FaserTruthStrategyCfg(ConfigFlags, name="ISF_FaserTruthStrategy", **kwargs): FaserRegion.fFaserScintillator, FaserRegion.fFaserTracker, # FaserRegion.fFaserDipole, - FaserRegion.fFaserCalorimeter, + # FaserRegion.fFaserCalorimeter, FaserRegion.fFaserCavern]) # kwargs.setdefault('ParentMinEkin', 0.1*MeV) # kwargs.setdefault('ChildMinEkin', 0.1*MeV) diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/CMakeLists.txt b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/CMakeLists.txt index eee3a3a1c2393e8f76953eaa5504712d4ccaaffa..c2a3d1b2056e307e861b27ea0bef0411f754db7b 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/CMakeLists.txt +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/CMakeLists.txt @@ -13,7 +13,7 @@ atlas_add_component( FaserSCT_ConditionsAlgorithms src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelUtilities GeoModelFaserUtilities GaudiKernel FaserSCT_ConditionsData SCT_CablingLib AthenaPoolUtilities TrackerIdentifier TrackerReadoutGeometry TrkGeometry SCT_ConditionsToolsLib InDetConditionsSummaryService ) + LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelFaserUtilities GaudiKernel FaserSCT_ConditionsData AthenaPoolUtilities TrackerIdentifier TrackerReadoutGeometry TrkGeometry FaserSCT_ConditionsToolsLib InDetConditionsSummaryService ) #atlas_add_test( TestCalibChipRead # SCRIPT athena.py --threads=5 SCT_ConditionsAlgorithms/testCalibChipRead.py diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_AlignCondAlg.h b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_AlignCondAlg.h index 2e2ef9446debc4eac1c696a286d9e6ad3ce142ca..ca31c63143bc52a33cefd50707259c1ad28377f5 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_AlignCondAlg.h +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_AlignCondAlg.h @@ -15,7 +15,7 @@ #include "DetDescrConditions/AlignableTransformContainer.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" -#include "GeoModelUtilities/GeoAlignmentStore.h" +#include "GeoModelFaserUtilities/GeoAlignmentStore.h" namespace TrackerDD { class SCT_DetectorManager; diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_DetectorElementCondAlg.h b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_DetectorElementCondAlg.h index 262adca71babeac37539bb67ca32aa6bf880f226..c476e229f9cb08a39fbee28aeedfd721231eae6d 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_DetectorElementCondAlg.h +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_DetectorElementCondAlg.h @@ -10,7 +10,7 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "GeoPrimitives/GeoPrimitives.h" -#include "GeoModelUtilities/GeoAlignmentStore.h" +#include "GeoModelFaserUtilities/GeoAlignmentStore.h" #include "TrackerReadoutGeometry/SiDetectorElementCollection.h" #include "StoreGate/ReadCondHandleKey.h" #include "StoreGate/WriteCondHandleKey.h" diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_ReadCalibChipGainCondAlg.cxx b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_ReadCalibChipGainCondAlg.cxx index 4d5bf3dc3ab347fbf84c71e28e9668798718eb77..72abcb0f8d2bedec903f8947c8830f987f7feb8e 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_ReadCalibChipGainCondAlg.cxx +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_ReadCalibChipGainCondAlg.cxx @@ -9,7 +9,7 @@ #include "Identifier/IdentifierHash.h" #include "TrackerIdentifier/FaserSCT_ID.h" #include "FaserSCT_ConditionsData/FaserSCT_ConditionsParameters.h" -#include "SCT_ConditionsTools/SCT_ReadCalibChipDefs.h" +#include "FaserSCT_ConditionsTools/SCT_ReadCalibChipDefs.h" #include "GaudiKernel/EventIDRange.h" diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_ReadCalibChipNoiseCondAlg.cxx b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_ReadCalibChipNoiseCondAlg.cxx index 994750929aef59ca7c54327ea6dc3ff106eb5228..aad199e05509f7e3b7f80ca6f9baceb8fe7ae6cf 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_ReadCalibChipNoiseCondAlg.cxx +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_ReadCalibChipNoiseCondAlg.cxx @@ -9,7 +9,7 @@ #include "Identifier/IdentifierHash.h" #include "TrackerIdentifier/FaserSCT_ID.h" #include "FaserSCT_ConditionsData/FaserSCT_ConditionsParameters.h" -#include "SCT_ConditionsTools/SCT_ReadCalibChipDefs.h" +#include "FaserSCT_ConditionsTools/SCT_ReadCalibChipDefs.h" #include "GaudiKernel/EventIDRange.h" diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_SiliconHVCondAlg.h b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_SiliconHVCondAlg.h index 0807e65e233bfa4012ed9acde51b8fbe8ba19fe3..c52138bded34496e7dabfe16a9c6fd0348121349 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_SiliconHVCondAlg.h +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_SiliconHVCondAlg.h @@ -11,7 +11,7 @@ #include "StoreGate/WriteCondHandleKey.h" #include "FaserSCT_ConditionsData/FaserSCT_DCSStatCondData.h" #include "FaserSCT_ConditionsData/FaserSCT_DCSFloatCondData.h" -#include "SCT_ConditionsTools/ISCT_DCSConditionsTool.h" +#include "FaserSCT_ConditionsTools/ISCT_DCSConditionsTool.h" #include "GaudiKernel/ICondSvc.h" diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_SiliconTempCondAlg.h b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_SiliconTempCondAlg.h index 4bb0d561ec5d165f34e86c211737f2991df65d32..90dede90979650039cf6d750d77957b8d099bef7 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_SiliconTempCondAlg.h +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsAlgorithms/src/FaserSCT_SiliconTempCondAlg.h @@ -9,7 +9,7 @@ #include "FaserSCT_ConditionsData/FaserSCT_DCSStatCondData.h" #include "FaserSCT_ConditionsData/FaserSCT_DCSFloatCondData.h" -#include "SCT_ConditionsTools/ISCT_DCSConditionsTool.h" +#include "FaserSCT_ConditionsTools/ISCT_DCSConditionsTool.h" #include "StoreGate/ReadCondHandleKey.h" #include "StoreGate/WriteCondHandleKey.h" diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/CMakeLists.txt b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/CMakeLists.txt index 9ba04a720a084e1f5f67ad99992e6974b4eb8355..b19cee24e9260527698b0040339c7560a97feb49 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/CMakeLists.txt +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/CMakeLists.txt @@ -14,17 +14,15 @@ find_package( GMock ) # Component(s) in the package: atlas_add_component ( FaserSCT_ConditionsTools src/components/*.cxx - src/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GeoModelUtilities GeoModelFaserUtilities GaudiKernel AthenaBaseComps StoreGateLib SGtests xAODEventInfo FaserSCT_ConditionsData InDetByteStreamErrors TrackerIdentifier TrackerReadoutGeometry SCT_CablingLib FaserSiPropertiesToolLib SCT_ConditionsToolsLib InDetConditionsSummaryService ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel FaserSCT_ConditionsToolsLib Identifier GeoModelUtilities GeoModelFaserUtilities GaudiKernel AthenaBaseComps StoreGateLib SGtests xAODEventInfo FaserSCT_ConditionsData InDetByteStreamErrors TrackerIdentifier TrackerReadoutGeometry FaserSiPropertiesToolLib InDetConditionsSummaryService ) -#atlas_add_library( FaserSCT_ConditionsToolsLib -# src/*.cxx -# #PUBLIC_HEADERS FaserSCT_ConditionsTools -# NO_PUBLIC_HEADERS -# INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} -# LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GeoModelUtilities GeoModelFaserUtilities GaudiKernel AthenaBaseComps StoreGateLib SGtests xAODEventInfo FaserSCT_ConditionsData SCT_ConditionsTools FaserSiPropertiesToolLib InDetByteStreamErrors TrackerIdentifier TrackerReadoutGeometry SCT_CablingLib EventContainers InDetConditionsSummaryService ) +atlas_add_library( FaserSCT_ConditionsToolsLib + src/*.cxx + PUBLIC_HEADERS FaserSCT_ConditionsTools + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GeoModelUtilities GeoModelFaserUtilities GaudiKernel AthenaBaseComps StoreGateLib SGtests xAODEventInfo FaserSCT_ConditionsData FaserSiPropertiesToolLib InDetByteStreamErrors TrackerIdentifier TrackerReadoutGeometry SCT_CablingLib EventContainers InDetConditionsSummaryService ) # Add unit tests #atlas_add_test( SCT_RODVetoTool_test diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ATLAS_CHECK_THREAD_SAFETY b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..449e2c2ce6f7baa57f8a568a2f2778840f89b7d5 --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Tracker/TrackerConditions/FaserSCT_ConditionsTools diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ChargeTrappingTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ChargeTrappingTool.h new file mode 100644 index 0000000000000000000000000000000000000000..10640ca78b31f11ed1373a8e09c977edd0989562 --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ChargeTrappingTool.h @@ -0,0 +1,45 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_ChargeTrappingTool.h + * @note primary author for Pixels: Carolina Deluca (carolina.deluca.silberberg@cern.ch) + * @author for SCT: Peter Vankov (peter.vankov@cern.ch) + * Marco Filipuzzi (marco.filipuzzi@cern.ch) + **/ + +#ifndef ISCT_ChargeTrappingTool_h +#define ISCT_ChargeTrappingTool_h + +//Athena include +#include "SCT_ConditionsData/SCT_ChargeTrappingCondData.h" + +//Gaudi Includes +#include "GaudiKernel/EventContext.h" +#include "GaudiKernel/IAlgTool.h" + +//forward declarations +class IdentifierHash; + +/** + * @class ISCT_ChargeTrappingTool + * Interface class for tool providing the charge trapping probability + * for each charge position + **/ +class ISCT_ChargeTrappingTool: virtual public IAlgTool +{ + public: + virtual ~ISCT_ChargeTrappingTool() = default; + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_ChargeTrappingTool, 1, 0); + + virtual SCT_ChargeTrappingCondData getCondData(const IdentifierHash& elementHash, double pos, const EventContext& ctx) const =0; + virtual SCT_ChargeTrappingCondData getCondData(const IdentifierHash& elementHash, double pos) const =0; + virtual void getHoleTransport(double& x0, double& y0, double& xfin, double& yfin, double& Q_m2, double& Q_m1, double& Q_00, double& Q_p1, double& Q_p2, const EventContext& ctx) const =0; + virtual void getHoleTransport(double& x0, double& y0, double& xfin, double& yfin, double& Q_m2, double& Q_m1, double& Q_00, double& Q_p1, double& Q_p2) const =0; + +}; + +#endif // ISCT_ChargeTrappingTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ConditionsParameterTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ConditionsParameterTool.h new file mode 100644 index 0000000000000000000000000000000000000000..d14b82470f8ef2847fb68c99b2eaeda521e81e7c --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ConditionsParameterTool.h @@ -0,0 +1,85 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_ConditionsParameterTool.h + * header file for baseclass of SCT conditions parameter tool + * @author shaun.roe@cern.ch + **/ + +#ifndef ISCT_ConditionsParameterTool_h +#define ISCT_ConditionsParameterTool_h + +//Athena includes +#include "SCT_ConditionsData/SCT_CondParameterData.h" +#include "Identifier/IdentifierHash.h" + +//Gaudi Includes +#include "GaudiKernel/EventContext.h" +#include "GaudiKernel/IAlgTool.h" + +//STL includes +#include <vector> + +/** + * @class ISCT_ConditionsParameterSvc + * Base class to give a numerical value from conditions for each detector element (module side) + **/ +class ISCT_ConditionsParameterTool: virtual public IAlgTool { + public: + virtual ~ISCT_ConditionsParameterTool() = default; + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_ConditionsParameterTool, 1, 0); + + ///Is the required parameter available? + virtual bool available(const SCT_CondParameterData::ParameterIndex iparam, const EventContext& ctx) const =0; + virtual bool available(const SCT_CondParameterData::ParameterIndex iparam) const =0; + + ///Give the indicated value for a module identifier hash + virtual float value(const IdentifierHash& idHash, const SCT_CondParameterData::ParameterIndex iparam, const EventContext& ctx) const =0; + virtual float value(const IdentifierHash& idHash, const SCT_CondParameterData::ParameterIndex iparam) const =0; + + ///Measure of how many valid values went to calculate it. Should be 1 but if, say, 3 chip values were valid out of 6, it could be less (0.5 in this case) + virtual float validity(const IdentifierHash& idHash, const SCT_CondParameterData::ParameterIndex iparam, const EventContext& ctx) const =0; + virtual float validity(const IdentifierHash& idHash, const SCT_CondParameterData::ParameterIndex iparam) const =0; + + ///Is a given value within acceptable limits? + virtual bool isValid(const float parameterValue, const SCT_CondParameterData::ParameterIndex iparam, const EventContext& ctx) const =0; + virtual bool isValid(const float parameterValue, const SCT_CondParameterData::ParameterIndex iparam) const =0; + + ///What is the default error value for this parameter? + virtual float invalid(const unsigned int iparam, const EventContext& ctx) const =0; + virtual float invalid(const unsigned int iparam) const =0; + + ///Maximum value read in from the database + virtual float max(const SCT_CondParameterData::ParameterIndex iparam, const EventContext& ctx) const =0; + virtual float max(const SCT_CondParameterData::ParameterIndex iparam) const =0; + + ///Minimum value read in from the database + virtual float min(const SCT_CondParameterData::ParameterIndex iparam, const EventContext& ctx) const =0; + virtual float min(const SCT_CondParameterData::ParameterIndex iparam) const =0; + + ///Average value + virtual float avg(const SCT_CondParameterData::ParameterIndex iparam, const EventContext& ctx) const =0; + virtual float avg(const SCT_CondParameterData::ParameterIndex iparam) const =0; + + ///Standard deviation + virtual float sd(const SCT_CondParameterData::ParameterIndex iparam, const EventContext& ctx) const =0; + virtual float sd(const SCT_CondParameterData::ParameterIndex iparam) const =0; + + ///Number of values read in + virtual unsigned int n(const SCT_CondParameterData::ParameterIndex iparam, const EventContext& ctx) const =0; + virtual unsigned int n(const SCT_CondParameterData::ParameterIndex iparam) const =0; + + ///Fill a user-provided vector with the values (hopefully won't be needed?) + virtual void getValues(std::vector<float>& userVector, const SCT_CondParameterData::ParameterIndex iparam, const EventContext& ctx) const =0; + virtual void getValues(std::vector<float>& userVector, const SCT_CondParameterData::ParameterIndex iparam) const =0; + + ///Report whether the structure was filled + virtual bool filled(const EventContext& ctx) const =0; + virtual bool filled() const =0; +}; + +#endif // ISCT_ConditionsParameterTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ConditionsTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ConditionsTool.h new file mode 100644 index 0000000000000000000000000000000000000000..4e3370836f668867f63f1d7ff7bfd21e64d00eb7 --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ConditionsTool.h @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_ConditionsTool.h + * header file for baseclass of SCT conditions tools + * @author Susumu.Oda@cern.ch + **/ + +#ifndef ISCT_ConditionsTool_h +#define ISCT_ConditionsTool_h + +//Athena includes +#include "Identifier/Identifier.h" +#include "Identifier/IdentifierHash.h" +#include "InDetConditionsSummaryService/InDetHierarchy.h" + +//Gaudi Includes +#include "GaudiKernel/IAlgTool.h" +#include "GaudiKernel/EventContext.h" + +/** + * @class ISCT_ConditionsTool + * Base class for SCT conditions tools so they can be used in the summary tool + **/ +class ISCT_ConditionsTool: virtual public IAlgTool { + public: + virtual ~ISCT_ConditionsTool() = default; + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_ConditionsTool, 1, 0); + + ///Return whether this service can report on the hierarchy level (e.g. module, chip...) + virtual bool canReportAbout(InDetConditions::Hierarchy h) const =0; + + ///Summarise the result from the service as good/bad + virtual bool isGood(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const =0; + virtual bool isGood(const Identifier& elementId, const EventContext& ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const =0; + + //@todo introduce hash identifier method + virtual bool isGood(const IdentifierHash& hashId) const =0; + virtual bool isGood(const IdentifierHash& hashId, const EventContext& ctx) const =0; +}; + +#endif // ISCT_ConditionsTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ConfigurationConditionsTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ConfigurationConditionsTool.h new file mode 100644 index 0000000000000000000000000000000000000000..597047503e59fdbf179b02eb95ddc4cc4b777358 --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ConfigurationConditionsTool.h @@ -0,0 +1,73 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_ConfigurationConditionsTool.h + * interface file for service that keeps track of configuration conditions + * @author gwilliam@mail.cern.ch + **/ + +#ifndef ISCT_ConfigurationConditionsTool_h +#define ISCT_ConfigurationConditionsTool_h + +#include <set> +#include <map> + +#include "InDetConditionsSummaryService/InDetHierarchy.h" +#include "FaserSCT_ConditionsTools/ISCT_ConditionsTool.h" + +class Identifier; +class IdentifierHash; + +/** + * @class SCT_ConfigurationConditionsTool + * Service that keeps track of configuration conditions + **/ + +class ISCT_ConfigurationConditionsTool: virtual public ISCT_ConditionsTool { + + public: + //@name Service methods + //@{ + + virtual ~ISCT_ConfigurationConditionsTool() = default; + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_ConfigurationConditionsTool, 1, 0); + + //@} + + /** Set of bad module Identifiers */ + virtual const std::set<Identifier>* badModules(const EventContext& ctx) const =0; + virtual const std::set<Identifier>* badModules() const =0; + + /** Map of link status for all modules with at least one bad link (true = good, false = bad)*/ + virtual const std::map<IdentifierHash, std::pair<bool, bool> >* badLinks(const EventContext& ctx) const =0; + virtual const std::map<IdentifierHash, std::pair<bool, bool> >* badLinks() const =0; + /** Link status for a particluar module (true = good, false = bad)*/ + virtual std::pair<bool, bool> badLinks(const IdentifierHash& hash, const EventContext& ctx) const =0; + virtual std::pair<bool, bool> badLinks(const IdentifierHash& hash) const =0; + + /** Map of chips status for all modules with at least one bad chip (packed as 1st 12 bits of unsigned int)*/ + virtual const std::map<Identifier, unsigned int>* badChips(const EventContext& ctx) const =0; + virtual const std::map<Identifier, unsigned int>* badChips() const =0; + /** Chips status for a particular module (packed as 1st 12 bits of unsigned int)*/ + virtual unsigned int badChips(const Identifier& moduleId, const EventContext& ctx) const =0; + virtual unsigned int badChips(const Identifier& moduleId) const =0; + + /** Set of bad strip Identifiers */ + virtual void badStrips(std::set<Identifier>& strips, const EventContext& ctx, bool ignoreBadModules=false, bool ignoreBadChips=false) const =0; + virtual void badStrips(std::set<Identifier>& strips, bool ignoreBadModules=false, bool ignoreBadChips=false) const =0; + /** Set of bad strip Identifiers for a particular module*/ + virtual void badStrips(const Identifier& moduleId, std::set<Identifier>& strips, const EventContext& ctx, bool ignoreBadModules=false, bool ignoreBadChips=false) const =0; + virtual void badStrips(const Identifier& moduleId, std::set<Identifier>& strips, bool ignoreBadModules=false, bool ignoreBadChips=false) const =0; + + /** Get the chip number containing a particular strip*/ + virtual int getChip(const Identifier& stripId, const EventContext& ctx) const =0; + virtual int getChip(const Identifier& stripId) const =0; + + private: +}; + +#endif // ISCT_ConfigurationConditionsTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_DCSConditionsTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_DCSConditionsTool.h new file mode 100644 index 0000000000000000000000000000000000000000..2edfa04643f0fd18691a9963f21b73430133160a --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_DCSConditionsTool.h @@ -0,0 +1,59 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_DCSConditionsTool.h + * interface file for service that keeps track of errors in the bytestream. + * @author timothy.robert.andeen@cern.ch + **/ + +#ifndef ISCT_DCSConditionsTool_h +#define ISCT_DCSConditionsTool_h + +#include "InDetConditionsSummaryService/InDetHierarchy.h" +#include "FaserSCT_ConditionsTools/ISCT_ConditionsTool.h" + +class Identifier; +class IdentifierHash; + +/** + * @class SCT_DCSConditionsTool + * Tool that returns DCS info about a module + **/ + +class ISCT_DCSConditionsTool: virtual public ISCT_ConditionsTool { + + public: + //@name Tool methods + //@{ + + virtual ~ISCT_DCSConditionsTool() = default; + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_DCSConditionsTool, 1, 0); + + //@} + virtual float modHV(const Identifier& elementId, const EventContext& ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const =0; + virtual float modHV(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const =0; + //Does the same for hashIds + virtual float modHV(const IdentifierHash& hashId, const EventContext& ctx) const =0; + virtual float modHV(const IdentifierHash& hashId) const =0; + //Returns temp0 (0 if there is no information) + virtual float hybridTemperature(const Identifier& elementId, const EventContext& ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const =0; + virtual float hybridTemperature(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const =0; + //Does the same for hashIds + virtual float hybridTemperature(const IdentifierHash& hashId, const EventContext& ctx) const =0; + virtual float hybridTemperature(const IdentifierHash& hashId) const =0; + //Returns temp0 + correction for Lorentz angle calculation (0 if there is no information) + virtual float sensorTemperature(const Identifier& elementId, const EventContext& ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const =0; + virtual float sensorTemperature(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const =0; + //Does the same for hashIds + virtual float sensorTemperature(const IdentifierHash& hashId, const EventContext& ctx) const =0; + virtual float sensorTemperature(const IdentifierHash& hashId) const =0; + + private: + +}; + +#endif // ISCT_DCSConditionsTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_DetectorLevelConditionsTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_DetectorLevelConditionsTool.h new file mode 100644 index 0000000000000000000000000000000000000000..c553b6f1a6dbacd20764f0ac08a2a6fd6449dd4e --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_DetectorLevelConditionsTool.h @@ -0,0 +1,51 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_DetectorLevelConditionsTool.h + * interface file for tools that report on the detector or ECC/B/ECA level + * @author gwilliam@mail.cern.ch + **/ + +#ifndef ISCT_DetectorLevelConditionsTool_h +#define ISCT_DetectorLevelConditionsTool_h + +#include "GaudiKernel/IAlgTool.h" +#include "GaudiKernel/EventContext.h" + +#include <list> + +class StatusCode; + +/** + * @class SCT_DetectorLevelConditionsTool + * Interface for tools that report on the detector or ECC/B/ECA level + **/ + +class ISCT_DetectorLevelConditionsTool: virtual public IAlgTool { + + public: + //@name Service methods + //@{ + + virtual ~ISCT_DetectorLevelConditionsTool() = default; + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_DetectorLevelConditionsTool, 1, 0); + //@} + + ///Summarise the result of the detector as good/bad + virtual bool isGood() const =0; + virtual bool isGood(const EventContext& ctx) const =0; + + ///Summarise the result of the barrel/endcap as good/bad + //BEC = -2/0/2 for ECC/B/ECA + virtual bool isGood(int bec) const =0; + virtual bool isGood(int bec, const EventContext& ctx) const =0; + + private: + +}; + +#endif // ISCT_DetectorLevelConditionsTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ElectricFieldTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ElectricFieldTool.h new file mode 100644 index 0000000000000000000000000000000000000000..332bcc60608b9acad1d26df9d21790aa05d8969a --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ElectricFieldTool.h @@ -0,0 +1,39 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_ElectricFieldTool.h + * @note primary author for Pixels Carolina Deluca (carolina.deluca.silberberg@cern.ch) + * @author for SCT Peter Vankov (peter.vankov@cern.ch) + **/ + +#ifndef ISCT_ElectricFieldTool_h +#define ISCT_ElectricFieldTool_h + +//Gaudi Includes +#include "GaudiKernel/IAlgTool.h" + +/** + * @class ISCT_ElectricFieldTool + * Interface class for tool providing Electric Field + **/ +class ISCT_ElectricFieldTool: virtual public IAlgTool +{ + public: + virtual ~ISCT_ElectricFieldTool() = default; + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_ElectricFieldTool, 1, 0); + + /// Get the Ramo potential for a given detector element (x,y,z)-dependent + /// Assumes the center of the detector + virtual double getElectricField(double positionZ, + double fluence, + double depletionVoltage, + double sensorThickness, + double biasVoltage) const =0; + +}; + +#endif // ISCT_ElectricFieldTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_MonitorConditionsTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_MonitorConditionsTool.h new file mode 100644 index 0000000000000000000000000000000000000000..2334dc4dfac5ca08f8a61174489c1dda7ada7c78 --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_MonitorConditionsTool.h @@ -0,0 +1,54 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_MonitorConditionsTool.h + * interface file for service that keeps track of errors caught by the monitoring. + * @author gwilliam@mail.cern.ch + **/ + +#ifndef ISCT_MonitorConditionsTool_h +#define ISCT_MonitorConditionsTool_h + +#include <set> +#include <string> + +#include "InDetConditionsSummaryService/InDetHierarchy.h" +#include "FaserSCT_ConditionsTools/ISCT_ConditionsTool.h" + +class Identifier; + +/** + * @class ISCT_MonitorConditionsTool + Tool that keeps track of errors caught by the monitoring + **/ + +class ISCT_MonitorConditionsTool: virtual public ISCT_ConditionsTool { + + public: + //@name Service methods + //@{ + + virtual ~ISCT_MonitorConditionsTool() = default; + + //@} + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_MonitorConditionsTool, 1, 0); + + /// Return a list of bad stip Identifiers + virtual void badStrips(std::set<Identifier>& strips) const =0; + virtual void badStrips(std::set<Identifier>& strips, const EventContext& ctx) const =0; + /// Return a list of bad stip Identifiers for a given module + virtual void badStrips(const Identifier& moduleId, std::set<Identifier>& strips) const =0; + virtual void badStrips(const Identifier& moduleId, std::set<Identifier>& strips, const EventContext& ctx) const =0; + /// Return a (space-separated) string of bad stip numbers (including hyphanated ranges) as they are written to the DB + virtual std::string badStripsAsString(const Identifier& moduleId) const =0; + virtual std::string badStripsAsString(const Identifier& moduleId, const EventContext& ctx) const =0; + + private: + +}; + +#endif // ISCT_MonitorConditionsTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_RadDamageSummaryTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_RadDamageSummaryTool.h new file mode 100644 index 0000000000000000000000000000000000000000..72e40dd887f2ed8d65e4a806be23de7143bec20b --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_RadDamageSummaryTool.h @@ -0,0 +1,44 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_RadDamageSummaryTool.h + * @note primary author for Pixels: Carolina Deluca (carolina.deluca.silberberg@cern.ch) + * @author for SCT: Peter Vankov (peter.vankov@cern.ch) + * Marco Filipuzzi (marco.filipuzzi@cern.ch) + **/ + +#ifndef ISCT_RadDamageSummaryTool_h +#define ISCT_RadDamageSummaryTool_h + +//Athena include +#include "SCT_ConditionsData/SCT_ChargeTrappingCondData.h" + +//Gaudi Includes +#include "GaudiKernel/EventContext.h" +#include "GaudiKernel/IAlgTool.h" + +//forward declarations +class IdentifierHash; + +/** + * @class ISCT_RadDamageSummaryTool + * Interface class for tool providing Trapping Probability + * for each charge in the digitization package. + **/ +class ISCT_RadDamageSummaryTool: virtual public IAlgTool +{ + public: + virtual ~ISCT_RadDamageSummaryTool() = default; + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_RadDamageSummaryTool, 1, 0); + + virtual void holeTransport(double& x0, double& y0, double& xfin, double& yfin, double& Q_m2, double& Q_m1, double& Q_00, double& Q_p1, double& Q_p2, const EventContext& ctx) const =0; + virtual void holeTransport(double& x0, double& y0, double& xfin, double& yfin, double& Q_m2, double& Q_m1, double& Q_00, double& Q_p1, double& Q_p2) const =0; + virtual SCT_ChargeTrappingCondData getCondData(const IdentifierHash& elementHash, const double& zpos, const EventContext& ctx) const =0; + virtual SCT_ChargeTrappingCondData getCondData(const IdentifierHash& elementHash, const double& zpos) const =0; +}; + +#endif // ISCT_RadDamageSummaryTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ReadCalibChipDataTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ReadCalibChipDataTool.h new file mode 100644 index 0000000000000000000000000000000000000000..66f21ff7ff429ad486e61eaf96a628e63c4926f3 --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ReadCalibChipDataTool.h @@ -0,0 +1,40 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** @file ISCT_ReadCalibDataTool.h Interface file for SCT_ReadCalibDataTool. + */ + +// Multiple inclusion protection +#ifndef ISCT_READ_CALIB_CHIP_DATA_TOOL +#define ISCT_READ_CALIB_CHIP_DATA_TOOL + +//STL includes +#include <vector> + +// Include top level interface +#include "InDetConditionsSummaryService/InDetHierarchy.h" +#include "FaserSCT_ConditionsTools/ISCT_ConditionsTool.h" + +class ISCT_ReadCalibChipDataTool: virtual public ISCT_ConditionsTool { + + public: + + //----------Public Member Functions----------// + // Structors + virtual ~ISCT_ReadCalibChipDataTool() = default; //!< Destructor + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_ReadCalibChipDataTool, 1, 0); + + // Methods to return calibration data + //PJ change to wafer hash id?! + virtual std::vector<float> getNPtGainData(const Identifier& moduleId, const int side, const std::string& datatype, const EventContext& ctx) const =0; //!<Get NPtGain data per wafer + virtual std::vector<float> getNPtGainData(const Identifier& moduleId, const int side, const std::string& datatype) const =0; //!<Get NPtGain data per wafer + virtual std::vector<float> getNoiseOccupancyData(const Identifier& moduleId, const int side, const std::string& datatype, const EventContext& ctx) const =0; //!<Get NoiseOccupancy data wafer + virtual std::vector<float> getNoiseOccupancyData(const Identifier& moduleId, const int side, const std::string& datatype) const =0; //!<Get NoiseOccupancy data wafer + +}; + +//---------------------------------------------------------------------- +#endif // ISCT_READ_CALIB_CHIP_DATA_TOOL diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ReadCalibDataTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ReadCalibDataTool.h new file mode 100644 index 0000000000000000000000000000000000000000..ce243fb6244fd7c527f4e39e49f047ce13609328 --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ReadCalibDataTool.h @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** @file ISCT_ReadCalibDataTool.h Interface file for SCT_ReadCalibDataTool. + */ + +// Multiple inclusion protection +#ifndef ISCT_READ_CALIB_DATA_TOOL +#define ISCT_READ_CALIB_DATA_TOOL + +//STL includes +#include <vector> +#include <list> +#include <string> + +// Include SCT calibration data map objects +//needed for typedef +#include "SCT_ConditionsData/SCT_CalibDefectData.h" + +// Include top level interface +#include "InDetConditionsSummaryService/InDetHierarchy.h" +#include "FaserSCT_ConditionsTools/ISCT_ConditionsTool.h" + +class Identifier; +class IdentifierHash; +class StatusCode; + +class ISCT_ReadCalibDataTool: virtual public ISCT_ConditionsTool { + + public: + + typedef struct { + std::vector<std::string> scan; + std::vector<std::string> defect; + std::vector<float> value; + } CalibDefectType; + + //----------Public Member Functions----------// + // Structors + virtual ~ISCT_ReadCalibDataTool() = default; //!< Destructor + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_ReadCalibDataTool, 1, 0); + + // Methods to return calibration defect type and summary + virtual ISCT_ReadCalibDataTool::CalibDefectType defectType(const Identifier& stripId, const EventContext& ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const = 0; //!<Return summary of defect type and values for a strip + virtual ISCT_ReadCalibDataTool::CalibDefectType defectType(const Identifier& stripId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const = 0; //!<Return summary of defect type and values for a strip + virtual SCT_CalibDefectData::CalibModuleDefects defectsSummary(const Identifier& moduleId, const std::string& scan, const EventContext& ctx) const = 0; //!<Returns module summary of defect + virtual SCT_CalibDefectData::CalibModuleDefects defectsSummary(const Identifier& moduleId, const std::string& scan) const = 0; //!<Returns module summary of defect + virtual std::list<Identifier> defectList(const std::string& defect, const EventContext& ctx) const = 0; //!<Returns module summary of defect + virtual std::list<Identifier> defectList(const std::string& defect) const = 0; //!<Returns module summary of defect + +}; + +//---------------------------------------------------------------------- +#endif // ISCT_READ_CALIB_DATA_TOOL diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ReadoutTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ReadoutTool.h new file mode 100644 index 0000000000000000000000000000000000000000..3c32ec3902c1566fb979bb8aa58ffa5c8270f36e --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_ReadoutTool.h @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_ReadoutTool.h + * Interface file for the SCT_ReadoutTool class + * @author Carl Gwilliam <gwilliam@mail.cern.ch> + */ + +#ifndef SCT_ConditionTools_ISCT_ReadoutTool_h +#define SCT_ConditionTools_ISCT_ReadoutTool_h + +//STL +#include <vector> + +// Gaudi +#include "GaudiKernel/IAlgTool.h" + +// Athena +#include "Identifier/Identifier.h" + +// Forward declarations +class SCT_Chip; + +/** + * @class ISCT_ReadoutTool + * Interface for SCT_ReadoutTool + * Class to determine which chips are in the readout and spot misconfigurations + */ + +class ISCT_ReadoutTool : virtual public IAlgTool { + public: + + virtual ~ISCT_ReadoutTool() = default; + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_ReadoutTool, 1, 0); + + /** Determine which chips are in the readout for a module of a particular type by Identifier*/ + virtual StatusCode determineReadout(const Identifier& moduleId, std::vector<SCT_Chip>& chips, bool link0ok, bool link1ok) const =0; + /** Determine which chips are in the readout for a module of a particular type by truncated serial number*/ + virtual StatusCode determineReadout(const int truncatedSerialNumber, std::vector<SCT_Chip>& chips, bool link0ok, bool link1ok) const =0; +}; + +#endif // SCT_ConditionTools_ISCT_ReadoutTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_SensorsTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_SensorsTool.h new file mode 100644 index 0000000000000000000000000000000000000000..d9e5fa2b6cfc68a0ff0adbfd1d57d891410209cc --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/ISCT_SensorsTool.h @@ -0,0 +1,49 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ISCT_SensorsTool.h + * header file for baseclass of SCT conditions tool + * @author shaun.roe@cern.ch + **/ + +#ifndef ISCT_SensorsTool_h +#define ISCT_SensorsTool_h + +//STL includes +#include <list> +#include <string> +#include <vector> + +//Gaudi Includes +#include "GaudiKernel/EventContext.h" +#include "GaudiKernel/IAlgTool.h" + +//fwd declarations + +class SCT_SensorCondData; + +/** + * @class ISCT_SensorsTool + * Base class to give a Vdep, crystal orientation and Mfr from conditions for each sensor in a module + **/ +class ISCT_SensorsTool: virtual public IAlgTool { + public: + virtual ~ISCT_SensorsTool() = default; + + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ISCT_SensorsTool, 1, 0); + + ///Fill vector with sensors info + virtual void getSensorsData(std::vector<std::string>& userVector, const EventContext& ctx) const =0; + virtual void getSensorsData(std::vector<std::string>& userVector) const =0; + virtual const SCT_SensorCondData* getSensorsData(const unsigned int truncatedSerialNumber, const EventContext& ctx) const =0; + virtual const SCT_SensorCondData* getSensorsData(const unsigned int truncatedSerialNumber) const =0; + virtual std::string getManufacturer(unsigned int truncatedSerialNumber, const EventContext& ctx) const =0; + virtual std::string getManufacturer(unsigned int truncatedSerialNumber) const =0; + virtual void printManufacturers(const EventContext& ctx) const =0; + virtual void printManufacturers() const =0; +}; + +#endif // ISCT_SensorsTool_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/SCT_ReadCalibChipDefs.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/SCT_ReadCalibChipDefs.h new file mode 100644 index 0000000000000000000000000000000000000000..25d7fc12efa67456e0e0f0e5088c2e21cb1da078 --- /dev/null +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/FaserSCT_ConditionsTools/SCT_ReadCalibChipDefs.h @@ -0,0 +1,29 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SCT_ReadCalibDataDefs_h +#define SCT_ReadCalibDataDefs_h + +// Include STL stuff +#include <array> +#include <string> + +#include "FaserSCT_ConditionsData/FaserSCT_ConditionsParameters.h" + +namespace SCT_ReadCalibChipDefs { + const std::array<std::string, FaserSCT_ConditionsData::N_NPTGAIN> nPtGainDbParameterNames{ + {"gainByChip", "gainRMSByChip", "offsetByChip", "offsetRMSByChip", "noiseByChip", "noiseRMSByChip"} + }; + const std::array<std::string, FaserSCT_ConditionsData::N_NPTGAIN> nPtGainParameterNames{ + {"GainByChip", "GainRMSByChip", "OffsetByChip", "OffsetRMSByChip", "NoiseByChip", "NoiseRMSByChip"} + }; + const std::array<std::string, FaserSCT_ConditionsData::N_NOISEOCC> noiseOccDbParameterNames{ + {"occupancyByChip", "occupancyRMSByChip", "offsetByChip", "noiseByChip"} + }; + const std::array<std::string, FaserSCT_ConditionsData::N_NOISEOCC> noiseOccParameterNames{ + {"OccupancyByChip", "OccupancyRMSByChip", "OffsetByChip", "NoiseByChip"} + }; +} // end of namespace + +#endif // SCT_ReadCalibDataDefs_h diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_DCSConditionsTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_DCSConditionsTool.h index 0b454182971dbd72101ab42c920cd197bea2b632..23fdb8ad42d5d635acdf1e3d86e6f93fc8acb8b5 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_DCSConditionsTool.h +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_DCSConditionsTool.h @@ -17,7 +17,7 @@ // Athena #include "AthenaBaseComps/AthAlgTool.h" -#include "SCT_ConditionsTools/ISCT_DCSConditionsTool.h" +#include "FaserSCT_ConditionsTools/ISCT_DCSConditionsTool.h" #include "InDetConditionsSummaryService/InDetHierarchy.h" #include "Identifier/Identifier.h" diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_ReadCalibChipDataTool.cxx b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_ReadCalibChipDataTool.cxx index 0479bdeb0a2eaa91bfff9849ea3e39c4210980ff..00743211ed1f42fa1f6944e0c164ecbd4b61dd73 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_ReadCalibChipDataTool.cxx +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_ReadCalibChipDataTool.cxx @@ -14,7 +14,7 @@ #include "FaserSCT_ConditionsData/FaserSCT_ModuleCalibParameter.h" #include "FaserSCT_ConditionsData/FaserSCT_ModuleGainCalibData.h" #include "FaserSCT_ConditionsData/FaserSCT_ModuleNoiseCalibData.h" -#include "SCT_ConditionsTools/SCT_ReadCalibChipDefs.h" +#include "FaserSCT_ConditionsTools/SCT_ReadCalibChipDefs.h" using namespace FaserSCT_ConditionsData; using namespace SCT_ReadCalibChipDefs; diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_ReadCalibChipDataTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_ReadCalibChipDataTool.h index 5ab77816cd31f49f2810f7aec92b78b79fcf5942..2dfea3f6aaa55aa424ecf2cf3e05ee9c96f95069 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_ReadCalibChipDataTool.h +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_ReadCalibChipDataTool.h @@ -14,7 +14,7 @@ // Include interface class #include "AthenaBaseComps/AthAlgTool.h" -#include "SCT_ConditionsTools/ISCT_ReadCalibChipDataTool.h" +#include "FaserSCT_ConditionsTools/ISCT_ReadCalibChipDataTool.h" // Include Athena stuff #include "FaserSCT_ConditionsData/FaserSCT_ConditionsParameters.h" diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_SiliconConditionsTool.cxx b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_SiliconConditionsTool.cxx index 91e5000c7061d257d1569e3d29044fa305271c37..ab36739472cec1c06ac20fc633c23eb33d86c43c 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_SiliconConditionsTool.cxx +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_SiliconConditionsTool.cxx @@ -60,26 +60,26 @@ StatusCode FaserSCT_SiliconConditionsTool::finalize() { } // Silicon temperature (by Identifier) -float FaserSCT_SiliconConditionsTool::temperature(const Identifier& elementId) const { +float FaserSCT_SiliconConditionsTool::temperature(const Identifier& elementId, const EventContext& ctx) const { const IdentifierHash elementHash{m_sct_id->wafer_hash(elementId)}; - return temperature(elementHash); + return temperature(elementHash, ctx); } // Silicon bias voltage (by Identifier) -float FaserSCT_SiliconConditionsTool::biasVoltage(const Identifier& elementId) const { +float FaserSCT_SiliconConditionsTool::biasVoltage(const Identifier& elementId, const EventContext& ctx) const { const IdentifierHash elementHash{m_sct_id->wafer_hash(elementId)}; - return biasVoltage(elementHash); + return biasVoltage(elementHash, ctx); } // Silicon depletion voltage (by Identifier) -float FaserSCT_SiliconConditionsTool::depletionVoltage(const Identifier& /*elementId*/) const { +float FaserSCT_SiliconConditionsTool::depletionVoltage(const Identifier& /*elementId*/, const EventContext& /*ctx*/) const { return m_defaultDepletionVoltage; } // Silicon temperature (by IdentifierHash) -float FaserSCT_SiliconConditionsTool::temperature(const IdentifierHash& elementHash) const { +float FaserSCT_SiliconConditionsTool::temperature(const IdentifierHash& elementHash, const EventContext& ctx) const { if (m_useDB and (not m_useGeoModel)) { - const FaserSCT_DCSFloatCondData* data{getCondDataTemp()}; + const FaserSCT_DCSFloatCondData* data{getCondDataTemp(ctx)}; if (data==nullptr) return m_defaultTemperature; float temperature{m_defaultTemperature}; if (not data->getValue(elementHash, temperature)) return m_defaultTemperature; @@ -93,10 +93,10 @@ float FaserSCT_SiliconConditionsTool::temperature(const IdentifierHash& elementH } // Silicon bias voltage (by IdentifierHash) -float FaserSCT_SiliconConditionsTool::biasVoltage(const IdentifierHash& elementHash) const { +float FaserSCT_SiliconConditionsTool::biasVoltage(const IdentifierHash& elementHash, const EventContext& ctx) const { if (m_useDB and (not m_useGeoModel)) { - const FaserSCT_DCSFloatCondData* data{getCondDataHV()}; + const FaserSCT_DCSFloatCondData* data{getCondDataHV(ctx)}; if (data==nullptr) return m_defaultBiasVoltage; float hv{m_defaultBiasVoltage}; if (not data->getValue(elementHash, hv)) return m_defaultBiasVoltage; @@ -110,7 +110,7 @@ float FaserSCT_SiliconConditionsTool::biasVoltage(const IdentifierHash& elementH } // Silicon deplition voltage (by IdentifierHash) -float FaserSCT_SiliconConditionsTool::depletionVoltage(const IdentifierHash& /*elementHash*/) const { +float FaserSCT_SiliconConditionsTool::depletionVoltage(const IdentifierHash& /*elementHash*/, const EventContext& /*ctx*/) const { return m_defaultDepletionVoltage; } @@ -158,8 +158,8 @@ FaserSCT_SiliconConditionsTool::setConditionsFromGeoModel() } -const FaserSCT_DCSFloatCondData* FaserSCT_SiliconConditionsTool::getCondDataHV() const { - SG::ReadCondHandle<FaserSCT_DCSFloatCondData> condData{m_condKeyHV}; +const FaserSCT_DCSFloatCondData* FaserSCT_SiliconConditionsTool::getCondDataHV(const EventContext& ctx) const { + SG::ReadCondHandle<FaserSCT_DCSFloatCondData> condData{m_condKeyHV, ctx}; if (not condData.isValid()) { ATH_MSG_ERROR("Failed to get " << m_condKeyHV.key()); return nullptr; @@ -167,8 +167,8 @@ const FaserSCT_DCSFloatCondData* FaserSCT_SiliconConditionsTool::getCondDataHV() return *condData; } -const FaserSCT_DCSFloatCondData* FaserSCT_SiliconConditionsTool::getCondDataTemp() const { - SG::ReadCondHandle<FaserSCT_DCSFloatCondData> condData{m_condKeyTemp}; +const FaserSCT_DCSFloatCondData* FaserSCT_SiliconConditionsTool::getCondDataTemp(const EventContext& ctx) const { + SG::ReadCondHandle<FaserSCT_DCSFloatCondData> condData{m_condKeyTemp, ctx}; if (not condData.isValid()) { ATH_MSG_ERROR("Failed to get " << m_condKeyTemp.key()); return nullptr; diff --git a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_SiliconConditionsTool.h b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_SiliconConditionsTool.h index 91dd8de1afab1915363369d93a6911cb8060d418..318a83024106e9d731dc8d3ece716e041ae72ccb 100644 --- a/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_SiliconConditionsTool.h +++ b/Tracker/TrackerConditions/FaserSCT_ConditionsTools/src/FaserSCT_SiliconConditionsTool.h @@ -17,6 +17,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/EventContext.h" #include "InDetConditionsSummaryService/ISiliconConditionsTool.h" #include "FaserSCT_ConditionsData/FaserSCT_DCSFloatCondData.h" @@ -47,18 +48,18 @@ class FaserSCT_SiliconConditionsTool: public extends<AthAlgTool, ISiliconConditi virtual StatusCode finalize() override; /** Silicon temperature by Identifier */ - virtual float temperature(const Identifier& elementId) const override; + virtual float temperature(const Identifier& elementId, const EventContext& ctx) const override; /** Silicon bias voltage by Identifier */ - virtual float biasVoltage(const Identifier& elementId) const override; + virtual float biasVoltage(const Identifier& elementId, const EventContext& ctx) const override; /** Silicon depletion voltage by Identifier */ - virtual float depletionVoltage(const Identifier& elementId) const override; + virtual float depletionVoltage(const Identifier& elementId, const EventContext& ctx) const override; /** Silicon temperature by IdentifierHash */ - virtual float temperature(const IdentifierHash& elementHash) const override; + virtual float temperature(const IdentifierHash& elementHash, const EventContext& ctx) const override; /** Silicon bias voltage by IdentifierHash */ - virtual float biasVoltage(const IdentifierHash& elementHash) const override; + virtual float biasVoltage(const IdentifierHash& elementHash, const EventContext& ctx) const override; /** Silicon depletion voltage by IdentifierHash */ - virtual float depletionVoltage(const IdentifierHash& elementHash) const override; + virtual float depletionVoltage(const IdentifierHash& elementHash, const EventContext& ctx) const override; private: @@ -84,8 +85,8 @@ class FaserSCT_SiliconConditionsTool: public extends<AthAlgTool, ISiliconConditi const FaserSCT_ID* m_sct_id{nullptr}; - const FaserSCT_DCSFloatCondData* getCondDataHV() const; - const FaserSCT_DCSFloatCondData* getCondDataTemp() const; + const FaserSCT_DCSFloatCondData* getCondDataHV(const EventContext& ctx) const; + const FaserSCT_DCSFloatCondData* getCondDataTemp(const EventContext& ctx) const; }; #endif // FaserSCT_SiliconConditionsTool_h diff --git a/Tracker/TrackerConditions/FaserSiLorentzAngleTool/src/FaserSCT_SiLorentzAngleCondAlg.cxx b/Tracker/TrackerConditions/FaserSiLorentzAngleTool/src/FaserSCT_SiLorentzAngleCondAlg.cxx index dc6fbd524fbdbedd59b64d3ab09fb3a1135521c7..a2f2da9dbbf77f8131c7222953bf8ccf3d61d0ce 100644 --- a/Tracker/TrackerConditions/FaserSiLorentzAngleTool/src/FaserSCT_SiLorentzAngleCondAlg.cxx +++ b/Tracker/TrackerConditions/FaserSiLorentzAngleTool/src/FaserSCT_SiLorentzAngleCondAlg.cxx @@ -220,9 +220,9 @@ StatusCode FaserSCT_SiLorentzAngleCondAlg::execute(const EventContext& ctx) cons deplVoltage = m_deplVoltage.value() * CLHEP::volt; biasVoltage = m_biasVoltage.value() * CLHEP::volt; } else { - temperatureC = m_siConditionsTool->temperature(elementHash); - deplVoltage = m_siConditionsTool->depletionVoltage(elementHash) * CLHEP::volt; - biasVoltage = m_siConditionsTool->biasVoltage(elementHash) * CLHEP::volt; + temperatureC = m_siConditionsTool->temperature(elementHash, ctx); + deplVoltage = m_siConditionsTool->depletionVoltage(elementHash, ctx) * CLHEP::volt; + biasVoltage = m_siConditionsTool->biasVoltage(elementHash, ctx) * CLHEP::volt; ATH_MSG_DEBUG("SCT Hash = " << elementHash << " Temperature = " << temperatureC << " [deg C], BiasV = " << biasVoltage << " DeplV = " << deplVoltage); } diff --git a/Tracker/TrackerConditions/FaserSiPropertiesTool/FaserSiPropertiesTool/IFaserSiPropertiesTool.h b/Tracker/TrackerConditions/FaserSiPropertiesTool/FaserSiPropertiesTool/IFaserSiPropertiesTool.h index 91827d6f9354598308049da58d9bfaa19b70b830..a30e0de06054a311957d6d0dbacc5deb987b2aa5 100644 --- a/Tracker/TrackerConditions/FaserSiPropertiesTool/FaserSiPropertiesTool/IFaserSiPropertiesTool.h +++ b/Tracker/TrackerConditions/FaserSiPropertiesTool/FaserSiPropertiesTool/IFaserSiPropertiesTool.h @@ -13,6 +13,7 @@ #include "GaudiKernel/IAlgTool.h" #include "FaserSiPropertiesTool/FaserSiliconProperties.h" #include "Identifier/IdentifierHash.h" +class EventContext; /** * @class IFaserSiPropertiesTool @@ -29,7 +30,7 @@ class IFaserSiPropertiesTool: virtual public IAlgTool DeclareInterfaceID(IFaserSiPropertiesTool, 1, 0); /// Get Silicon properties for a given detector element. - virtual const Tracker::FaserSiliconProperties& getSiProperties(const IdentifierHash& elementHash) const = 0; + virtual const Tracker::FaserSiliconProperties& getSiProperties(const IdentifierHash& elementHash, const EventContext& ctx) const = 0; }; #endif // IFaserSiPropertiesTool_h diff --git a/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSCT_SiPropertiesCondAlg.cxx b/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSCT_SiPropertiesCondAlg.cxx index fab907731e7f2a26ded0d61c10cb3b0c1e3633f0..e5251713d19e8bf41058801ffcf6c3bae30467bd 100644 --- a/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSCT_SiPropertiesCondAlg.cxx +++ b/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSCT_SiPropertiesCondAlg.cxx @@ -113,7 +113,7 @@ StatusCode FaserSCT_SiPropertiesCondAlg::execute(const EventContext& ctx) const for (FaserSCT_ID::size_type hash{0}; hash<wafer_hash_max; hash++) { const IdentifierHash elementHash{static_cast<IdentifierHash::value_type>(hash)}; - double temperatureC{m_siCondTool->temperature(elementHash)}; + double temperatureC{m_siCondTool->temperature(elementHash, ctx)}; if (not ((temperatureC>m_temperatureMin) and (temperatureC<m_temperatureMax))) { ATH_MSG_DEBUG("Invalid temperature: " @@ -124,8 +124,8 @@ StatusCode FaserSCT_SiPropertiesCondAlg::execute(const EventContext& ctx) const } double temperature{temperatureC + 273.15}; - double deplVoltage{m_siCondTool->depletionVoltage(elementHash) * CLHEP::volt}; - double biasVoltage{m_siCondTool->biasVoltage(elementHash) * CLHEP::volt}; + double deplVoltage{m_siCondTool->depletionVoltage(elementHash, ctx) * CLHEP::volt}; + double biasVoltage{m_siCondTool->biasVoltage(elementHash, ctx) * CLHEP::volt}; const TrackerDD::SiDetectorElement* element{elements->getDetectorElement(elementHash)}; double depletionDepth{element->thickness()}; diff --git a/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSiPropertiesTool.cxx b/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSiPropertiesTool.cxx index d889c3f29d42d573049063c02afbb9b7e1e9baee..feede3adc24dfefedf1f1d4ad0f06301535d7f28 100644 --- a/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSiPropertiesTool.cxx +++ b/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSiPropertiesTool.cxx @@ -33,8 +33,8 @@ FaserSiPropertiesTool::finalize() } const Tracker::FaserSiliconProperties& -FaserSiPropertiesTool::getSiProperties(const IdentifierHash& elementHash) const { - SG::ReadCondHandle<Tracker::FaserSiliconPropertiesVector> handle{m_propertiesVector}; +FaserSiPropertiesTool::getSiProperties(const IdentifierHash& elementHash, const EventContext& ctx) const { + SG::ReadCondHandle<Tracker::FaserSiliconPropertiesVector> handle{m_propertiesVector, ctx}; if (handle.isValid()) { const Tracker::FaserSiliconPropertiesVector* vector{*handle}; if (vector) { diff --git a/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSiPropertiesTool.h b/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSiPropertiesTool.h index b737bf78f1e6d18abb5ddc17479465a1b9698fbe..277df5d617cf90dec74635a1dd24b146d9ad6f2e 100644 --- a/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSiPropertiesTool.h +++ b/Tracker/TrackerConditions/FaserSiPropertiesTool/src/FaserSiPropertiesTool.h @@ -14,6 +14,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "FaserSiPropertiesTool/FaserSiliconPropertiesVector.h" #include "StoreGate/ReadCondHandleKey.h" +#include "GaudiKernel/EventContext.h" /** * @class FaserSiPropertiesTool @@ -30,7 +31,7 @@ public: virtual StatusCode finalize() override; /// Get properties for the detector element. - virtual const Tracker::FaserSiliconProperties& getSiProperties(const IdentifierHash& elementHash) const override; + virtual const Tracker::FaserSiliconProperties& getSiProperties(const IdentifierHash& elementHash, const EventContext& ctx) const override; private: // Properties diff --git a/Tracker/TrackerDetDescr/DipoleGeoModel/CMakeLists.txt b/Tracker/TrackerDetDescr/DipoleGeoModel/CMakeLists.txt index 8a77884583308a5d1cd995afe112fd572eb7257a..534b6608385732a05d0ff479bd05ba154c15b8ef 100644 --- a/Tracker/TrackerDetDescr/DipoleGeoModel/CMakeLists.txt +++ b/Tracker/TrackerDetDescr/DipoleGeoModel/CMakeLists.txt @@ -9,14 +9,14 @@ atlas_subdir( DipoleGeoModel ) find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( DipoleGeoModel src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelFaserUtilities GeoModelUtilities GaudiKernel TrackerGeoModelUtils SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions GeometryDBSvcLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelFaserUtilities GaudiKernel TrackerGeoModelUtils SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions GeometryDBSvcLib ) atlas_add_test( DipoleGMConfig_test SCRIPT test/DipoleGMConfig_test.py diff --git a/Tracker/TrackerDetDescr/DipoleGeoModel/DipoleGeoModel/DipoleTool.h b/Tracker/TrackerDetDescr/DipoleGeoModel/DipoleGeoModel/DipoleTool.h index a0463830d384e1cc7b19b0830545bf4981d35c56..bc8b7e9cfa9af8618959dbcba0e911176a398210 100644 --- a/Tracker/TrackerDetDescr/DipoleGeoModel/DipoleGeoModel/DipoleTool.h +++ b/Tracker/TrackerDetDescr/DipoleGeoModel/DipoleGeoModel/DipoleTool.h @@ -5,7 +5,7 @@ #ifndef DIPOLEGEOMODEL_DIPOLETOOL_H #define DIPOLEGEOMODEL_DIPOLETOOL_H -#include "GeoModelUtilities/GeoModelTool.h" +#include "GeoModelFaserUtilities/GeoModelTool.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" diff --git a/Tracker/TrackerDetDescr/DipoleGeoModel/src/DipoleFactory.cxx b/Tracker/TrackerDetDescr/DipoleGeoModel/src/DipoleFactory.cxx index 84f4052b2ab788c058add43fc62d24f711dd4585..44a3416863e0c3c2e07cbce0782cb867b7900854 100644 --- a/Tracker/TrackerDetDescr/DipoleGeoModel/src/DipoleFactory.cxx +++ b/Tracker/TrackerDetDescr/DipoleGeoModel/src/DipoleFactory.cxx @@ -7,14 +7,6 @@ #include "DipoleGeoModel/DipoleDataBase.h" #include "DipoleGeoModel/DipoleGeneralParameters.h" -// Pixel, SCT and TRT factories -// #include "InDetServMatGeoModel/PixelServMatFactory.h" -// #include "InDetServMatGeoModel/SCT_ServMatFactory.h" -// #include "InDetServMatGeoModel/TRT_ServMatFactory.h" -// #include "InDetServMatGeoModel/EndPlateFactory.h" -// #include "InDetServMatGeoModel/SupportRailFactory.h" -// #include "InDetServMatGeoModel/SquirrelCageFactory.h" - // Extra material #include "TrackerGeoModelUtils/DistortedMaterialManager.h" #include "TrackerGeoModelUtils/ExtraMaterial.h" diff --git a/Tracker/TrackerDetDescr/DipoleGeoModel/src/DipoleTool.cxx b/Tracker/TrackerDetDescr/DipoleGeoModel/src/DipoleTool.cxx index dc81501ccbe623d018b08716550c485826e92a13..535c63ef409ada5cac9b9ca7a49982d802c1afde 100644 --- a/Tracker/TrackerDetDescr/DipoleGeoModel/src/DipoleTool.cxx +++ b/Tracker/TrackerDetDescr/DipoleGeoModel/src/DipoleTool.cxx @@ -7,7 +7,7 @@ #include "DipoleGeoModel/DipoleGeoModelAthenaComps.h" #include "GeometryDBSvc/IGeometryDBSvc.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "GeoModelInterfaces/IGeoDbTagSvc.h" #include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" #include "StoreGate/StoreGateSvc.h" diff --git a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/CMakeLists.txt b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/CMakeLists.txt index 8d34e37999091aaf5c01c3646e14c9e895f86b83..0e660cf5b312e99f4281267236dda3cc5506cd48 100644 --- a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/CMakeLists.txt +++ b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/CMakeLists.txt @@ -9,17 +9,18 @@ atlas_subdir( FaserSCT_GeoModel ) find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( FaserSCT_GeoModel src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelFaserUtilities GeoModelUtilities GaudiKernel TrackerGeoModelUtils TrackerReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions Identifier TrackerIdentifier GeometryDBSvcLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelFaserUtilities GaudiKernel TrackerGeoModelUtils TrackerReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions Identifier TrackerIdentifier GeometryDBSvcLib ) atlas_add_test( FaserSCT_GMConfig_test - SCRIPT test/FaserSCT_GMConfig_test.py + SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/test/FaserSCT_GMConfig_test.py + PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR} PROPERTIES TIMEOUT 300 ) # Install files from the package: diff --git a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/FaserSCT_GeoModel/FaserSCT_DetectorTool.h b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/FaserSCT_GeoModel/FaserSCT_DetectorTool.h index 45011c9bbbcd565c8cad2ca482e34f5698f00bae..895e0a58737bb6e496ee76c01ab71ccecf1b2d33 100644 --- a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/FaserSCT_GeoModel/FaserSCT_DetectorTool.h +++ b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/FaserSCT_GeoModel/FaserSCT_DetectorTool.h @@ -5,7 +5,7 @@ #ifndef FASERSCT_GEOMODEL_SCT_DETECTORTOOL_H #define FASERSCT_GEOMODEL_SCT_DETECTORTOOL_H -#include "GeoModelUtilities/GeoModelTool.h" +#include "GeoModelFaserUtilities/GeoModelTool.h" #include "FaserSCT_GeoModel/SCT_GeoModelAthenaComps.h" #include "GeometryDBSvc/IGeometryDBSvc.h" diff --git a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/doc/packagedoc.h b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/doc/packagedoc.h index 79faf688d1e2fd0d8872acd06c06be941a98929f..b53068cfa773e6d6889d05ba322658f597a2e193 100644 --- a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/doc/packagedoc.h +++ b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/doc/packagedoc.h @@ -13,7 +13,7 @@ This package contains the factories for building the GeoModel Detector Description of the SCT. It builds both the material geometry using the GeoModelKernel and the readout geometry using classes in -InDetReadoutGeometry. +TrackerReadoutGeometry. The creation of the geometry is initiated by the DetectorTool (SCT_DetectorTool) which is called from GeoModelSvc. The DetectorTool diff --git a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py index 0bb74e31f60e015bbe8246dece4c867acf2c2c48..50af73d47bd06e49d030dffd0289b962cab5ff55 100644 --- a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py +++ b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py @@ -38,12 +38,12 @@ def FaserSCT_GeometryCfg( flags ): # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer")) print("FaserSCT dynamic align flag is not supported!") else: - if (not flags.Detector.SimulateFaserSCT) or flags.Detector.OverlaySCT: + if (not flags.Detector.SimulateFaserSCT) : acc.merge(addFoldersSplitOnline(flags,"SCT","/Tracker/Onl/Align","/Tracker/Align",className="AlignableTransformContainer")) # else: # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align")) if flags.Common.Project != "AthSimulation": # Protection for AthSimulation builds - if (not flags.Detector.SimulateFaserSCT) or flags.Detector.OverlaySCT: + if (not flags.Detector.SimulateFaserSCT) : FaserSCT_AlignCondAlg = CompFactory.FaserSCT_AlignCondAlg sctAlignCondAlg = FaserSCT_AlignCondAlg(name = "FaserSCT_AlignCondAlg", UseDynamicAlignFolders = flags.GeoModel.Align.Dynamic) diff --git a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/src/FaserSCT_DetectorTool.cxx b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/src/FaserSCT_DetectorTool.cxx index b364a791993d2733a5d6ce50acbc60b2df80c77c..91958660cb9e1a8d697e7a59f6825f0539df7a14 100644 --- a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/src/FaserSCT_DetectorTool.cxx +++ b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/src/FaserSCT_DetectorTool.cxx @@ -12,7 +12,7 @@ #include "TrackerReadoutGeometry/SCT_DetectorManager.h" #include "DetDescrConditions/AlignableTransformContainer.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" #include "StoreGate/DataHandle.h" #include "RDBAccessSvc/IRDBRecord.h" diff --git a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/CMakeLists.txt b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/CMakeLists.txt index 66b62f64f4634b76e5a2ba46acbc1fdbdc3a64ac..4cdcd1360676afea04a1edf2496c49471bc16780 100644 --- a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/CMakeLists.txt +++ b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/CMakeLists.txt @@ -9,7 +9,7 @@ atlas_subdir( TrackerGeoModelUtils ) find_package( Boost COMPONENTS filesystem thread system ) find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( TrackerGeoModelUtils @@ -17,6 +17,6 @@ atlas_add_library( TrackerGeoModelUtils PUBLIC_HEADERS TrackerGeoModelUtils INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GaudiKernel StoreGateLib SGtests GeoPrimitives - PRIVATE_LINK_LIBRARIES GeoModelUtilities GeoModelFaserUtilities GeometryDBSvcLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GaudiKernel StoreGateLib SGtests GeoPrimitives + PRIVATE_LINK_LIBRARIES GeoModelFaserUtilities GeometryDBSvcLib ) diff --git a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/README b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/README index 07f49158881b02dec6ade9c17dd996090fdeaed8..98b0ad5eb56ed1c3f6490f1891679239954d2121 100755 --- a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/README +++ b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/README @@ -1,9 +1,9 @@ This package held code common to PixelGeoModel, SCT_GeoModel, TRT_GeoModel and InDetServMatGeoModel -Package: offline/InnerDetector/InDetDetDescr/InDetGeoModelUtils +Package: offline/Tracker/TrackerDetDescr/TrackerGeoModelUtils -Responsible: Grant Gorfine <Grant.Gorfine@cern.ch> +Original author: Grant Gorfine <Grant.Gorfine@cern.ch> diff --git a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/TopLevelPlacements.cxx b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/TopLevelPlacements.cxx index f7261834bf14574167ce3d7b051eaae3f5257a13..2b539f3bafab001d4ed0016c064d91b6ef99e034 100755 --- a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/TopLevelPlacements.cxx +++ b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/TopLevelPlacements.cxx @@ -93,22 +93,44 @@ TopLevelPlacements::partTransform(const IRDBRecord* record) const { ixyz3 = 2; } + GeoTrf::Transform3D rotation(GeoTrf::Translate3D::Identity()); + std::vector<int> order { ixyz1 , ixyz2, ixyz3 }; + for (int ixyz : order) + { + switch (ixyz) + { + case 0: + if (rotX != 0) rotation = GeoTrf::RotateX3D{rotX} * rotation; + break; + case 1: + if (rotY != 0) rotation = GeoTrf::RotateY3D{rotY} * rotation; + break; + case 2: + if (rotZ != 0) rotation = GeoTrf::RotateZ3D{rotZ} * rotation; + break; + } + } + + // This segfaults at runtime when deleting the pointers, + // I think because the base class of Transform3D + // does not have a virtual destructor + // // List of the three transforms - GeoTrf::Transform3D* xformList[3] = { - 0, 0, 0 - }; - if (rotX != 0) xformList[0] = new GeoTrf::RotateX3D(rotX); - if (rotY != 0) xformList[1] = new GeoTrf::RotateY3D(rotY); - if (rotZ != 0) xformList[2] = new GeoTrf::RotateZ3D(rotZ); - - GeoTrf::Transform3D rotation(GeoTrf::Transform3D::Identity()); - if (xformList[ixyz1]) rotation = *(xformList[ixyz1]) * rotation; - if (xformList[ixyz2]) rotation = *(xformList[ixyz2]) * rotation; - if (xformList[ixyz3]) rotation = *(xformList[ixyz3]) * rotation; - - delete xformList[0]; - delete xformList[1]; - delete xformList[2]; + // GeoTrf::Transform3D* xformList[] = { nullptr, nullptr, nullptr }; + // if (rotX != 0) xformList[0] = new GeoTrf::RotateX3D(rotX); + // if (rotY != 0) xformList[1] = new GeoTrf::RotateY3D(rotY); + // if (rotZ != 0) xformList[2] = new GeoTrf::RotateZ3D(rotZ); + + // GeoTrf::Transform3D rotation(GeoTrf::Transform3D::Identity()); + // if (xformList[ixyz1] != nullptr) rotation = *(xformList[ixyz1]) * rotation; + // if (xformList[ixyz2] != nullptr) rotation = *(xformList[ixyz2]) * rotation; + // if (xformList[ixyz3] != nullptr) rotation = *(xformList[ixyz3]) * rotation; + // if (xformList[0] != nullptr) + // delete xformList[0]; + // if (xformList[1] != nullptr) + // delete xformList[1]; + // if (xformList[2] != nullptr) + // delete xformList[2]; return transform * rotation; } diff --git a/Tracker/TrackerDetDescr/TrackerReadoutGeometry/CMakeLists.txt b/Tracker/TrackerDetDescr/TrackerReadoutGeometry/CMakeLists.txt index 7efb5919b032c5442e939879a627c43c7b5d4888..799df773701ac00439f0307c4f85ed6845fcf7f3 100644 --- a/Tracker/TrackerDetDescr/TrackerReadoutGeometry/CMakeLists.txt +++ b/Tracker/TrackerDetDescr/TrackerReadoutGeometry/CMakeLists.txt @@ -8,7 +8,7 @@ atlas_subdir( TrackerReadoutGeometry ) # External dependencies: find_package( CLHEP ) find_package( Eigen ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( TrackerReadoutGeometry @@ -16,6 +16,6 @@ atlas_add_library( TrackerReadoutGeometry PUBLIC_HEADERS TrackerReadoutGeometry INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel CxxUtils FaserDetDescr GeoModelUtilities GeoModelFaserUtilities GeoPrimitives Identifier GaudiKernel TrackerIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions InDetCondTools + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel CxxUtils FaserDetDescr GeoModelFaserUtilities GeoPrimitives Identifier GaudiKernel TrackerIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions InDetCondTools PRIVATE_LINK_LIBRARIES AthenaPoolUtilities IdDictDetDescr ) diff --git a/Tracker/TrackerDetDescr/TrackerReadoutGeometry/TrackerReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY b/Tracker/TrackerDetDescr/TrackerReadoutGeometry/TrackerReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY index e7b2f6455b3d494d5f0e1dacb0168ca892f4e59f..b67e4ca72523be5a98ddbb79ac506f28957a608f 100644 --- a/Tracker/TrackerDetDescr/TrackerReadoutGeometry/TrackerReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY +++ b/Tracker/TrackerDetDescr/TrackerReadoutGeometry/TrackerReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY @@ -1 +1 @@ -InnerDetector/InDetDetDescr/InDetReadoutGeometry +Tracker/TrackerDetDescr/TrackerReadoutGeometry diff --git a/Tracker/TrackerDetDescr/TrackerReadoutGeometry/src/SiDetectorElement.cxx b/Tracker/TrackerDetDescr/TrackerReadoutGeometry/src/SiDetectorElement.cxx index d9325aabfe527c2d3df54ebe24a3e8d29c762582..776fb48b7b0866a7f06724dae36d3256dd595cca 100644 --- a/Tracker/TrackerDetDescr/TrackerReadoutGeometry/src/SiDetectorElement.cxx +++ b/Tracker/TrackerDetDescr/TrackerReadoutGeometry/src/SiDetectorElement.cxx @@ -14,7 +14,7 @@ #include "FaserDetDescr/FaserDetectorID.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" #include "GeoModelKernel/GeoVFullPhysVol.h" -#include "GeoModelUtilities/GeoAlignmentStore.h" +#include "GeoModelFaserUtilities/GeoAlignmentStore.h" #include "TrackerIdentifier/FaserSCT_ID.h" #include "TrackerReadoutGeometry/SCT_ModuleSideDesign.h" #include "TrackerReadoutGeometry/SiReadoutCellId.h" diff --git a/Tracker/TrackerDigitization/FaserSCT_Digitization/CMakeLists.txt b/Tracker/TrackerDigitization/FaserSCT_Digitization/CMakeLists.txt index 0677e28566402909c3c3c4c4dd16fd4a278ecd8a..417ffa67ae980fc9067d71b5132b6d37126f657d 100644 --- a/Tracker/TrackerDigitization/FaserSCT_Digitization/CMakeLists.txt +++ b/Tracker/TrackerDigitization/FaserSCT_Digitization/CMakeLists.txt @@ -15,7 +15,8 @@ atlas_add_component( FaserSCT_Digitization src/*.cxx src/*.h src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib Identifier xAODEventInfo GaudiKernel FaserSiDigitization TrackerRawData TrackerSimEvent HitManagement GeneratorObjects FaserSiPropertiesToolLib TrackerIdentifier TrackerReadoutGeometry TrackerSimData SCT_ConditionsToolsLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib Identifier xAODEventInfo GaudiKernel FaserSiDigitization TrackerRawData TrackerSimEvent HitManagement GeneratorObjects + FaserSCT_ConditionsToolsLib FaserSiPropertiesToolLib TrackerIdentifier TrackerReadoutGeometry TrackerSimData ) #atlas_add_test( SCT_DigitizationMT_test # SCRIPT Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --DataRunNumber 222525 --outputRDOFile mc15_2015_ttbar.RDO.pool.root --preInclude HITtoRDO:SimulationJobOptions/preInclude.SCTOnlyConfig.py,Digitization/ForceUseOfAlgorithms.py --postInclude Digitization/FixDataDependenciesForMT.py --skipEvents 0 --maxEvents 100 --athenaopts=--threads=10 diff --git a/Tracker/TrackerDigitization/FaserSCT_Digitization/FaserSCT_Digitization/ISCT_SurfaceChargesGenerator.h b/Tracker/TrackerDigitization/FaserSCT_Digitization/FaserSCT_Digitization/ISCT_SurfaceChargesGenerator.h index 9188844d716ab40eab7ff8fe924a240a0dee6a64..76f6709d18a54bc258eac8899cb176ddab602a95 100644 --- a/Tracker/TrackerDigitization/FaserSCT_Digitization/FaserSCT_Digitization/ISCT_SurfaceChargesGenerator.h +++ b/Tracker/TrackerDigitization/FaserSCT_Digitization/FaserSCT_Digitization/ISCT_SurfaceChargesGenerator.h @@ -21,6 +21,7 @@ #include "GaudiKernel/IAlgTool.h" class FaserSiHit; +class EventContext; namespace TrackerDD { class SiDetectorElement; @@ -53,7 +54,9 @@ class ISCT_SurfaceChargesGenerator : virtual public IAlgTool { virtual void process(const TrackerDD::SiDetectorElement* ele, const TimedHitPtr<FaserSiHit>& phit, - const ISiSurfaceChargesInserter& inserter, CLHEP::HepRandomEngine * rndmEngine) const =0; + const ISiSurfaceChargesInserter& inserter, + CLHEP::HepRandomEngine * rndmEngine, + const EventContext& ctx) const =0; virtual void setFixedTime(float fixedTime) =0; }; diff --git a/Tracker/TrackerDigitization/FaserSCT_Digitization/python/FaserSCT_DigitizationConfigNew.py b/Tracker/TrackerDigitization/FaserSCT_Digitization/python/FaserSCT_DigitizationConfigNew.py index 75dd5793b1614eceb9f556b4a02598efa1cc011a..5b7438529ccc6aac610162cdc1322c59c3767431 100644 --- a/Tracker/TrackerDigitization/FaserSCT_Digitization/python/FaserSCT_DigitizationConfigNew.py +++ b/Tracker/TrackerDigitization/FaserSCT_Digitization/python/FaserSCT_DigitizationConfigNew.py @@ -142,7 +142,7 @@ def FaserSCT_SurfaceChargesGeneratorCfg(flags, name="FaserSCT_SurfaceChargesGene kwargs.setdefault("SmallStepLength", 5) kwargs.setdefault("DepletionVoltage", 70) kwargs.setdefault("BiasVoltage", 150) - kwargs.setdefault("isOverlay", flags.Detector.Overlay) + kwargs.setdefault("isOverlay", False) # obsolete(?) Overlay flag # kwargs.setdefault("doTrapping", True) # ATL-INDET-INT-2016-019 # experimental SCT_DetailedSurfaceChargesGenerator config dropped here FaserSCT_SurfaceChargesGenerator=CompFactory.FaserSCT_SurfaceChargesGenerator @@ -185,7 +185,7 @@ def FaserSCT_FrontEndCfg(flags, name="FaserSCT_FrontEnd", **kwargs): kwargs.setdefault("NoiseOn", True) kwargs.setdefault("AnalogueNoiseOn", True) # In overlay MC, only analogue noise is on. Noise hits are not added. - if flags.Detector.Overlay and flags.Input.isMC: + if False and flags.Input.isMC: # obsolete(?) Overlay flag kwargs["NoiseOn"] = False kwargs["AnalogueNoiseOn"] = True # Use Calibration data from Conditions DB, still for testing purposes only @@ -196,14 +196,14 @@ def FaserSCT_FrontEndCfg(flags, name="FaserSCT_FrontEnd", **kwargs): # DataCompressionMode: 1 is level mode x1x (default), 2 is edge mode 01x, 3 is expanded any hit xxx if flags.Digitization.PileUpPremixing: kwargs.setdefault("DataCompressionMode", 3) - elif flags.Detector.Overlay and flags.Input.isMC: + elif False and flags.Input.isMC: # obsolete(?) Overlay flag kwargs.setdefault("DataCompressionMode", 2) elif flags.Beam.BunchSpacing <= 50: kwargs.setdefault("DataCompressionMode", 1) else: kwargs.setdefault("DataCompressionMode", 3) # DataReadOutMode: 0 is condensed mode and 1 is expanded mode - if flags.Detector.Overlay and flags.Input.isMC: + if False and flags.Input.isMC: # obsolete(?) Overlay flag kwargs.setdefault("DataReadOutMode", 0) else: kwargs.setdefault("DataReadOutMode", 1) diff --git a/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_DigitizationTool.cxx b/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_DigitizationTool.cxx index 04adc01f65057b3fac63129f2abc55304dfe6411..55e3ed647991a73d3c8f428c9c21b5717d79cd46 100644 --- a/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_DigitizationTool.cxx +++ b/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_DigitizationTool.cxx @@ -425,7 +425,7 @@ bool FaserSCT_DigitizationTool::digitizeElement(const EventContext& ctx, SiCharg phit->getModule(), phit->getSensor()))); ATH_MSG_DEBUG("calling process() for all methods"); - m_sct_SurfaceChargesGenerator->process(sielement, phit, SiDigitizationSurfaceChargeInserter(sielement, chargedDiodes), rndmEngine); + m_sct_SurfaceChargesGenerator->process(sielement, phit, SiDigitizationSurfaceChargeInserter(sielement, chargedDiodes), rndmEngine, ctx); ATH_MSG_DEBUG("charges filled!"); } } @@ -621,7 +621,6 @@ FaserSCT_RDO_Collection* FaserSCT_DigitizationTool::createRDO(SiChargedDiodeColl // Under the current scheme time bin and ERRORS are hard-coded to // default values. int ERRORS{0}; - static std::vector<int> dummyvector; for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) { unsigned int flagmask{static_cast<unsigned int>((*i_chargedDiode).second.flag() & 0xFE)}; @@ -671,7 +670,7 @@ FaserSCT_RDO_Collection* FaserSCT_DigitizationTool::createRDO(SiChargedDiodeColl } unsigned int SCT_Word{static_cast<unsigned int>(groupSize | (stripIn11bits << 11) | (tbin << 22) | (ERRORS << 25))}; - FaserSCT3_RawData *p_rdo{new FaserSCT3_RawData(id_readout, SCT_Word, &dummyvector)}; + FaserSCT3_RawData *p_rdo{new FaserSCT3_RawData(id_readout, SCT_Word, std::vector<int>{})}; if (p_rdo) { p_rdocoll->push_back(p_rdo); } diff --git a/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_FrontEnd.h b/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_FrontEnd.h index 5fd95c66e8c2ff8835d1df59291243e36402871b..2810020dd821d2ed07fd650e8f73c9a737ecaa70 100644 --- a/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_FrontEnd.h +++ b/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_FrontEnd.h @@ -33,7 +33,7 @@ // Athena #include "FaserSiDigitization/SiChargedDiodeCollection.h" -#include "SCT_ConditionsTools/ISCT_ReadCalibChipDataTool.h" +#include "FaserSCT_ConditionsTools/ISCT_ReadCalibChipDataTool.h" // Gaudi #include "GaudiKernel/ToolHandle.h" diff --git a/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_SurfaceChargesGenerator.cxx b/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_SurfaceChargesGenerator.cxx index 3978d87d8c8e896b5230b6ccaa1de6eca6f8793f..ea353da6c61a80535c20a3f92f3598a227b65b0f 100644 --- a/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_SurfaceChargesGenerator.cxx +++ b/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_SurfaceChargesGenerator.cxx @@ -176,7 +176,7 @@ StatusCode FaserSCT_SurfaceChargesGenerator::finalize() { // ---------------------------------------------------------------------- // perpandicular Drift time calculation // ---------------------------------------------------------------------- -float FaserSCT_SurfaceChargesGenerator::driftTime(float zhit, const SiDetectorElement* element) const { +float FaserSCT_SurfaceChargesGenerator::driftTime(float zhit, const SiDetectorElement* element, const EventContext& ctx) const { if (element==nullptr) { ATH_MSG_ERROR("FaserSCT_SurfaceChargesGenerator::process element is nullptr"); return -2.0; @@ -198,8 +198,8 @@ float FaserSCT_SurfaceChargesGenerator::driftTime(float zhit, const SiDetectorEl float biasVoltage{0.}; if (m_useSiCondDB) { // ATH_MSG_FATAL("Conditions DB voltages not supported."); - depletionVoltage = m_siConditionsTool->depletionVoltage(hashId) * CLHEP::volt; - biasVoltage = m_siConditionsTool->biasVoltage(hashId) * CLHEP::volt; + depletionVoltage = m_siConditionsTool->depletionVoltage(hashId, ctx) * CLHEP::volt; + biasVoltage = m_siConditionsTool->biasVoltage(hashId, ctx) * CLHEP::volt; } else { depletionVoltage = m_vdepl * CLHEP::volt; biasVoltage = m_vbias * CLHEP::volt; @@ -219,23 +219,23 @@ float FaserSCT_SurfaceChargesGenerator::driftTime(float zhit, const SiDetectorEl } float t_drift{log((depletionVoltage + biasVoltage) / denominator)}; - t_drift *= thickness * thickness / (2.0 * m_siPropertiesTool->getSiProperties(hashId).holeDriftMobility() * depletionVoltage); + t_drift *= thickness * thickness / (2.0 * m_siPropertiesTool->getSiProperties(hashId, ctx).holeDriftMobility() * depletionVoltage); return t_drift; } // ---------------------------------------------------------------------- // Sigma diffusion calculation // ---------------------------------------------------------------------- -float FaserSCT_SurfaceChargesGenerator::diffusionSigma(float zhit, const SiDetectorElement* element) const { +float FaserSCT_SurfaceChargesGenerator::diffusionSigma(float zhit, const SiDetectorElement* element, const EventContext& ctx) const { if (element==nullptr) { ATH_MSG_ERROR("FaserSCT_SurfaceChargesGenerator::diffusionSigma element is nullptr"); return 0.0; } const IdentifierHash hashId{element->identifyHash()}; - const float t{driftTime(zhit, element)}; // in ns + const float t{driftTime(zhit, element, ctx)}; // in ns if (t > 0.0) { - const float sigma{static_cast<float>(sqrt(2. * m_siPropertiesTool->getSiProperties(hashId).holeDiffusionConstant() * t))}; // in mm + const float sigma{static_cast<float>(sqrt(2. * m_siPropertiesTool->getSiProperties(hashId, ctx).holeDiffusionConstant() * t))}; // in mm return sigma; } else { return 0.0; @@ -245,10 +245,10 @@ float FaserSCT_SurfaceChargesGenerator::diffusionSigma(float zhit, const SiDetec // ---------------------------------------------------------------------- // Maximum drift time // ---------------------------------------------------------------------- -float FaserSCT_SurfaceChargesGenerator::maxDriftTime(const SiDetectorElement* element) const { +float FaserSCT_SurfaceChargesGenerator::maxDriftTime(const SiDetectorElement* element, const EventContext& ctx) const { if (element) { const float sensorThickness{static_cast<float>(element->thickness())}; - return driftTime(sensorThickness, element); + return driftTime(sensorThickness, element, ctx); } else { ATH_MSG_INFO("Error: SiDetectorElement not set!"); return 0.; @@ -258,10 +258,10 @@ float FaserSCT_SurfaceChargesGenerator::maxDriftTime(const SiDetectorElement* el // ---------------------------------------------------------------------- // Maximum Sigma difusion // ---------------------------------------------------------------------- -float FaserSCT_SurfaceChargesGenerator::maxDiffusionSigma(const SiDetectorElement* element) const { +float FaserSCT_SurfaceChargesGenerator::maxDiffusionSigma(const SiDetectorElement* element, const EventContext& ctx) const { if (element) { const float sensorThickness{static_cast<float>(element->thickness())}; - return diffusionSigma(sensorThickness, element); + return diffusionSigma(sensorThickness, element, ctx); } else { ATH_MSG_INFO("Error: SiDetectorElement not set!"); return 0.; @@ -299,9 +299,11 @@ float FaserSCT_SurfaceChargesGenerator::surfaceDriftTime(float ysurf) const { // ------------------------------------------------------------------------------------------- void FaserSCT_SurfaceChargesGenerator::process(const SiDetectorElement* element, const TimedHitPtr<FaserSiHit>& phit, - const ISiSurfaceChargesInserter& inserter, CLHEP::HepRandomEngine * rndmEngine) const { + const ISiSurfaceChargesInserter& inserter, + CLHEP::HepRandomEngine * rndmEngine, + const EventContext& ctx) const { ATH_MSG_VERBOSE("FaserSCT_SurfaceChargesGenerator::process starts"); - processSiHit(element, *phit, inserter, phit.eventTime(), phit.eventId(), rndmEngine); + processSiHit(element, *phit, inserter, phit.eventTime(), phit.eventId(), rndmEngine, ctx); return; } @@ -313,7 +315,9 @@ void FaserSCT_SurfaceChargesGenerator::processSiHit(const SiDetectorElement* ele const FaserSiHit& phit, const ISiSurfaceChargesInserter& inserter, float p_eventTime, - unsigned short p_eventId, CLHEP::HepRandomEngine * rndmEngine) const { + unsigned short p_eventId, + CLHEP::HepRandomEngine * rndmEngine, + const EventContext& ctx) const { const SCT_ModuleSideDesign* design{dynamic_cast<const SCT_ModuleSideDesign*>(&(element->design()))}; if (design==nullptr) { ATH_MSG_ERROR("FaserSCT_SurfaceChargesGenerator::process can not get " << design); @@ -354,7 +358,7 @@ void FaserSCT_SurfaceChargesGenerator::processSiHit(const SiDetectorElement* ele const int numberOfSteps{static_cast<int>(LargeStep / m_smallStepLength) + 1}; const float steps{static_cast<float>(m_numberOfCharges * numberOfSteps)}; const float e1{static_cast<float>(phit.energyLoss() / steps)}; - const float q1{static_cast<float>(e1 * m_siPropertiesTool->getSiProperties(hashId).electronHolePairsPerEnergy())}; + const float q1{static_cast<float>(e1 * m_siPropertiesTool->getSiProperties(hashId, ctx).electronHolePairsPerEnergy())}; // in the following, to test the code, we will use the original coordinate // system of the SCTtest3SurfaceChargesGenerator x is eta y is phi z is depth @@ -379,7 +383,9 @@ void FaserSCT_SurfaceChargesGenerator::processSiHit(const SiDetectorElement* ele // check the status of truth information for this SiHit // some Truth information is cut for pile up events - const HepMcParticleLink trklink{HepMcParticleLink(phit.trackNumber(), p_eventId)}; + const EBC_EVCOLL evColl = EBC_MAINEVCOLL; + const HepMcParticleLink::PositionFlag idxFlag = (p_eventId==0) ? HepMcParticleLink::IS_POSITION: HepMcParticleLink::IS_INDEX; + const HepMcParticleLink trklink{HepMcParticleLink(phit.trackNumber(), p_eventId, evColl, idxFlag, ctx)}; SiCharge::Process hitproc{SiCharge::track}; if (phit.trackNumber() != 0) { if (not trklink.isValid()) { @@ -402,7 +408,7 @@ void FaserSCT_SurfaceChargesGenerator::processSiHit(const SiDetectorElement* ele // m_h_spess->Fill(spess); // } - float t_drift{driftTime(zReadout, element)}; // !< t_drift: perpandicular drift time + float t_drift{driftTime(zReadout, element, ctx)}; // !< t_drift: perpandicular drift time if (t_drift>-2.0000002 and t_drift<-1.9999998) { ATH_MSG_DEBUG("Checking for rounding errors in compression"); if ((fabs(z1) - 0.5 * thickness) < 0.000010) { @@ -415,7 +421,7 @@ void FaserSCT_SurfaceChargesGenerator::processSiHit(const SiDetectorElement* ele // set new coordinate to be 0.5nm inside wafer volume. } zReadout = 0.5 * thickness - design->readoutSide() * z1; - t_drift = driftTime(zReadout, element); + t_drift = driftTime(zReadout, element, ctx); if (t_drift>-2.0000002 and t_drift<-1.9999998) { ATH_MSG_WARNING("Attempt failed. Making no correction."); } else { @@ -429,7 +435,7 @@ void FaserSCT_SurfaceChargesGenerator::processSiHit(const SiDetectorElement* ele const float x1{xhit + StepX * dstep}; float y1{yhit + StepY * dstep}; y1 += tanLorentz * zReadout; // !< Taking into account the magnetic field - const float sigma{diffusionSigma(zReadout, element)}; + const float sigma{diffusionSigma(zReadout, element, ctx)}; for (int i{0}; i < m_numberOfCharges; ++i) { const float rx{CLHEP::RandGaussZiggurat::shoot(rndmEngine)}; diff --git a/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_SurfaceChargesGenerator.h b/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_SurfaceChargesGenerator.h index d43fdb8917a26fcc0c6028901fa7abd6ce12d731..b84f584c52ad1ac182f237d62a7639aeb0fe2f13 100644 --- a/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_SurfaceChargesGenerator.h +++ b/Tracker/TrackerDigitization/FaserSCT_Digitization/src/FaserSCT_SurfaceChargesGenerator.h @@ -39,7 +39,7 @@ #include "Identifier/IdentifierHash.h" #include "InDetConditionsSummaryService/ISiliconConditionsTool.h" #include "InDetCondTools/ISiLorentzAngleTool.h" -// #include "SCT_ConditionsTools/ISCT_RadDamageSummaryTool.h" +// #include "FaserSCT_ConditionsTools/ISCT_RadDamageSummaryTool.h" // #include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" #include "FaserSiPropertiesTool/IFaserSiPropertiesTool.h" @@ -47,6 +47,7 @@ #include "GaudiKernel/ITHistSvc.h" // for ITHistSvc #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/EventContext.h" #include <iostream> @@ -90,15 +91,15 @@ class FaserSCT_SurfaceChargesGenerator : public extends<AthAlgTool, ISCT_Surface virtual void setFixedTime(float fixedTime) {m_tfix = fixedTime;} /** create a list of surface charges from a hit */ - virtual void process(const TrackerDD::SiDetectorElement* element, const TimedHitPtr<FaserSiHit>& phit, const ISiSurfaceChargesInserter& inserter, CLHEP::HepRandomEngine * rndmEngine) const; - void processSiHit(const TrackerDD::SiDetectorElement* element, const FaserSiHit& phit, const ISiSurfaceChargesInserter& inserter, float eventTime, unsigned short eventID, CLHEP::HepRandomEngine * rndmEngine) const; + virtual void process(const TrackerDD::SiDetectorElement* element, const TimedHitPtr<FaserSiHit>& phit, const ISiSurfaceChargesInserter& inserter, CLHEP::HepRandomEngine * rndmEngine, const EventContext& ctx) const; + void processSiHit(const TrackerDD::SiDetectorElement* element, const FaserSiHit& phit, const ISiSurfaceChargesInserter& inserter, float eventTime, unsigned short eventID, CLHEP::HepRandomEngine * rndmEngine, const EventContext& ctx) const; // some diagnostics methods are needed here too - float driftTime(float zhit, const TrackerDD::SiDetectorElement* element) const; //!< calculate drift time perpandicular to the surface for a charge at distance zhit from mid gap - float diffusionSigma(float zhit, const TrackerDD::SiDetectorElement* element) const; //!< calculate diffusion sigma from a gaussian dist scattered charge + float driftTime(float zhit, const TrackerDD::SiDetectorElement* element, const EventContext& ctx) const; //!< calculate drift time perpandicular to the surface for a charge at distance zhit from mid gap + float diffusionSigma(float zhit, const TrackerDD::SiDetectorElement* element, const EventContext& ctx) const; //!< calculate diffusion sigma from a gaussian dist scattered charge float surfaceDriftTime(float ysurf) const; //!< Calculate of the surface drift time - float maxDriftTime(const TrackerDD::SiDetectorElement* element) const; //!< max drift charge equivalent to the detector thickness - float maxDiffusionSigma(const TrackerDD::SiDetectorElement* element) const; //!< max sigma diffusion + float maxDriftTime(const TrackerDD::SiDetectorElement* element, const EventContext& ctx) const; //!< max drift charge equivalent to the detector thickness + float maxDiffusionSigma(const TrackerDD::SiDetectorElement* element, const EventContext& ctx) const; //!< max sigma diffusion // trap_pos and drift_time are updated based on spess. // bool chargeIsTrapped(double spess, const TrackerDD::SiDetectorElement* element, double& trap_pos, double& drift_time) const; diff --git a/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/CMakeLists.txt b/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/CMakeLists.txt index 960328270ec11ed861ad7647386693a72ccbf5c8..28b10b5347425b02e7f99a368bdd427d2cd47ed9 100644 --- a/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/CMakeLists.txt +++ b/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/CMakeLists.txt @@ -9,7 +9,8 @@ atlas_subdir( TrackerPrepRawDataFormation ) atlas_add_component( TrackerPrepRawDataFormation src/*.cxx src/*.h src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests Identifier GaudiKernel TrackerRawData TrackerPrepRawData FaserSiClusterizationToolLib FaserDetDescr TrackerIdentifier TrackerReadoutGeometry AthViews SCT_ConditionsData InDetConditionsSummaryService ) + LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests Identifier GaudiKernel TrackerRawData TrackerPrepRawData FaserSiClusterizationToolLib FaserDetDescr TrackerIdentifier + TrkSpacePoint TrackerReadoutGeometry AthViews FaserSCT_ConditionsData InDetConditionsSummaryService ) # Install files from the package: #atlas_install_headers( TrackerPrepRawDataFormation ) diff --git a/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/python/TrackerPrepRawDataFormationConfig.py b/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/python/TrackerPrepRawDataFormationConfig.py index 295281a01081fa5490b5691ad5f1be5c35ac58c2..4d0786c4c586945e790fe9dded5038ea8b5fc51e 100644 --- a/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/python/TrackerPrepRawDataFormationConfig.py +++ b/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/python/TrackerPrepRawDataFormationConfig.py @@ -39,7 +39,7 @@ def FaserSCT_ClusterizationBasicCfg(flags, **kwargs): kwargs.setdefault("SCT_ClusteringTool", clusterTool) kwargs.setdefault("DataObjectName", "SCT_RDOs") kwargs.setdefault("ClustersName", "SCT_ClusterContainer") - kwargs.setdefault("SCT_FlaggedCondData", "SCT_Flags") + # kwargs.setdefault("SCT_FlaggedCondData", "SCT_Flags") Tracker__FaserSCT_Clusterization=CompFactory.Tracker.FaserSCT_Clusterization acc.addEventAlgo(Tracker__FaserSCT_Clusterization(**kwargs)) return acc diff --git a/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/src/FaserSCT_Clusterization.cxx b/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/src/FaserSCT_Clusterization.cxx index 7061951d8b7272faf977740438fb14eb349f9300..04568b0e9f0c277ba54c7faf068d0c3107b58b5d 100644 --- a/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/src/FaserSCT_Clusterization.cxx +++ b/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/src/FaserSCT_Clusterization.cxx @@ -52,7 +52,7 @@ StatusCode FaserSCT_Clusterization::initialize() { ATH_CHECK(m_clusterContainerKey.initialize()); ATH_CHECK(m_clusterContainerLinkKey.initialize()); ATH_CHECK(m_clusterContainerCacheKey.initialize(not m_clusterContainerCacheKey.key().empty())); - ATH_CHECK(m_flaggedCondDataKey.initialize()); + // ATH_CHECK(m_flaggedCondDataKey.initialize()); // Get the clustering tool ATH_CHECK(m_clusteringTool.retrieve()); @@ -80,8 +80,8 @@ StatusCode FaserSCT_Clusterization::execute(const EventContext& ctx) const { ATH_CHECK(clusterContainer.isValid()); ATH_MSG_DEBUG("FaserSCT clusters '" << clusterContainer.name() << "' symlinked in StoreGate"); - SG::WriteHandle<SCT_FlaggedCondData> flaggedCondData{m_flaggedCondDataKey, ctx}; - ATH_CHECK(flaggedCondData.record(std::make_unique<SCT_FlaggedCondData>())); + // SG::WriteHandle<SCT_FlaggedCondData> flaggedCondData{m_flaggedCondDataKey, ctx}; + // ATH_CHECK(flaggedCondData.record(std::make_unique<SCT_FlaggedCondData>())); // First, we have to retrieve and access the container, not because we want to // use it, but in order to generate the proxies for the collections, if they @@ -100,7 +100,7 @@ StatusCode FaserSCT_Clusterization::execute(const EventContext& ctx) const { unsigned int totalFiredStrips{0}; for (; rdoCollections != rdoCollectionsEnd; ++rdoCollections) { for (const FaserSCT_RDORawData* rdo: **rdoCollections) { - totalFiredStrips += rdo->getGroupSize(); + totalFiredStrips += rdo->getGroupSize(); } } //iterator is now at the end //reset the iterator @@ -130,10 +130,10 @@ StatusCode FaserSCT_Clusterization::execute(const EventContext& ctx) const { ++m_numberOfRDO; nFiredStrips += rdo->getGroupSize(); } - if (nFiredStrips > m_maxFiredStrips.value()) { - flaggedCondData->insert(std::make_pair(rd->identifyHash(), moduleFailureReason)); - continue; - } + // if (nFiredStrips > m_maxFiredStrips.value()) { + // flaggedCondData->insert(std::make_pair(rd->identifyHash(), moduleFailureReason)); + // continue; + // } } // Use one of the specific clustering AlgTools to make clusters //FaserSCT_ClusterCollection* clusterCollection{m_clusteringTool->clusterize(*rd, *m_idHelper)}; diff --git a/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/src/FaserSCT_Clusterization.h b/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/src/FaserSCT_Clusterization.h index 790e4aee22c55a3c6f1ec25a0475faa9178b5494..01dfac4dba6e153501a6aaf5975d9ed1abdcf62f 100644 --- a/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/src/FaserSCT_Clusterization.h +++ b/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/src/FaserSCT_Clusterization.h @@ -18,7 +18,7 @@ #include "TrackerPrepRawData/FaserSCT_ClusterContainer.h" #include "TrackerPrepRawData/TrackerClusterContainer.h" #include "TrackerRawData/FaserSCT_RDO_Container.h" -#include "SCT_ConditionsData/SCT_FlaggedCondData.h" +// #include "FaserSCT_ConditionsData/SCT_FlaggedCondData.h" #include "InDetConditionsSummaryService/IInDetConditionsTool.h" #include "FaserSiClusterizationTool/IFaserSCT_ClusteringTool.h" @@ -76,7 +76,7 @@ class FaserSCT_Clusterization : public AthReentrantAlgorithm { SG::ReadHandleKey<FaserSCT_RDO_Container> m_rdoContainerKey{this, "DataObjectName", "FaserSCT_RDOs", "FaserSCT RDOs"}; SG::WriteHandleKey<FaserSCT_ClusterContainer> m_clusterContainerKey{this, "ClustersName", "SCT_ClusterContainer", "FaserSCT cluster container"}; SG::WriteHandleKey<TrackerClusterContainer> m_clusterContainerLinkKey{this, "ClustersLinkName_", "SCT_ClusterContainer", "Tracker cluster container link name (don't set this)"}; - SG::WriteHandleKey<SCT_FlaggedCondData> m_flaggedCondDataKey{this, "SCT_FlaggedCondData", "SCT_FlaggedCondData", "SCT flagged conditions data"}; + // SG::WriteHandleKey<FaserSCT_FlaggedCondData> m_flaggedCondDataKey{this, "SCT_FlaggedCondData", "SCT_FlaggedCondData", "SCT flagged conditions data"}; SG::UpdateHandleKey<FaserSCT_ClusterContainerCache> m_clusterContainerCacheKey; UnsignedIntegerProperty m_maxFiredStrips{this, "maxFiredStrips", 384, "Threshold of number of fired strips per wafer"}; // 0 disables the per-wafer cut diff --git a/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/CMakeLists.txt b/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/CMakeLists.txt index d55a82a36f73a19105d0fc2a747959ae8b14baad..0089a37f444fda45fc5cbbedbe19b1ae138f0998 100644 --- a/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/CMakeLists.txt +++ b/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/CMakeLists.txt @@ -19,7 +19,8 @@ find_package( Eigen ) atlas_add_component( TruthSeededTrackFinder src/components/*.cxx src/*.cxx src/*.h INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthContainers GeoPrimitives Identifier GaudiKernel TrackerReadoutGeometry TrackerRawData TrackerSimData GeneratorObjects TrackerSimEvent TrackerSpacePoint VxVertex FaserDetDescr xAODEventInfo TrackerIdentifier TrackerPrepRawData AthenaMonitoringKernelLib) + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthContainers GeoPrimitives Identifier GaudiKernel TrackerReadoutGeometry TrackerRawData TrackerSimData GeneratorObjects TrackerSimEvent + TrackerSpacePoint FaserDetDescr xAODEventInfo TrackerIdentifier TrackerPrepRawData AthenaMonitoringKernelLib) atlas_install_python_modules( python/*.py ) atlas_install_scripts( test/*.py ) diff --git a/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/src/TruthSeededTrackFinder.cxx b/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/src/TruthSeededTrackFinder.cxx index 7464461b9799451564a567c73fefeb92d4834047..90228db2ef2cf233968ae6a481df1e64858b5214 100755 --- a/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/src/TruthSeededTrackFinder.cxx +++ b/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/src/TruthSeededTrackFinder.cxx @@ -33,8 +33,9 @@ //#include "Acts/EventData/TrackParameters.hpp" #include "TrackerReadoutGeometry/SCT_DetectorManager.h" #include "Acts/Utilities/detail/periodic.hpp" -#include "Acts/Utilities/Definitions.hpp" -#include "Acts/Utilities/Units.hpp" +#include "Acts/Definitions/Common.hpp" +#include "Acts/Definitions/Algebra.hpp" +#include "Acts/Definitions/Units.hpp" using namespace Acts::UnitLiterals; //!!!!!!!!!!!!!!!!!!!!!!!! namespace Tracker @@ -443,12 +444,12 @@ namespace Tracker std::cout<<"!!!!!!!!!!! N_1_0 = "<<N_1_0<<", N_1_1 = "<<N_1_1<<", N_1_2 = "<<N_1_2<<", N_2_0 = "<<N_2_0<<", N_2_1 = "<<N_2_1<<", N_2_2 = "<<N_2_2<<std::endl; std::cout<<"!!!!!!!!!!! match_N_1_0 = "<<match_N_1_0<<", match_N_1_1 = "<<match_N_1_1<<", match_N_1_2 = "<<match_N_1_2<<", match_N_2_0 = "<<match_N_2_0<<", match_N_2_1 = "<<match_N_2_1<<", match_N_2_2 = "<<match_N_2_2<<std::endl; if ( (N_1_0==1 && match_N_1_0==1) && (N_1_1==1 && match_N_1_1==1) && (N_1_2==1 && match_N_1_2==1) && (N_2_0==1 && match_N_2_0==1) && (N_2_1==1 && match_N_2_1==1) && (N_2_2==1 && match_N_2_2==1)) { - Acts::Vector3D pos1_0(0., 0., 0.); - Acts::Vector3D pos1_1(0., 0., 0.); - Acts::Vector3D pos1_2(0., 0., 0.); - Acts::Vector3D pos2_0(0., 0., 0.); - Acts::Vector3D pos2_1(0., 0., 0.); - Acts::Vector3D pos2_2(0., 0., 0.); + Acts::Vector3 pos1_0(0., 0., 0.); + Acts::Vector3 pos1_1(0., 0., 0.); + Acts::Vector3 pos1_2(0., 0., 0.); + Acts::Vector3 pos2_0(0., 0., 0.); + Acts::Vector3 pos2_1(0., 0., 0.); + Acts::Vector3 pos2_2(0., 0., 0.); SpacePointContainer::const_iterator it = sct_spcontainer->begin(); SpacePointContainer::const_iterator itend = sct_spcontainer->end(); @@ -471,12 +472,12 @@ namespace Tracker for (; sp_begin != sp_end; ++sp_begin){ const Trk::SpacePoint* sp=&(**sp_begin); Amg::Vector3D gloPos=sp->globalPosition(); - if ( ((istation-1)*3+ilayer) == 0 ) pos1_0 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); - if ( ((istation-1)*3+ilayer) == 1 ) pos1_1 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); - if ( ((istation-1)*3+ilayer) == 2 ) pos1_2 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); - if ( ((istation-1)*3+ilayer) == 3 ) pos2_0 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); - if ( ((istation-1)*3+ilayer) == 4 ) pos2_1 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); - if ( ((istation-1)*3+ilayer) == 5 ) pos2_2 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); + if ( ((istation-1)*3+ilayer) == 0 ) pos1_0 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); + if ( ((istation-1)*3+ilayer) == 1 ) pos1_1 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); + if ( ((istation-1)*3+ilayer) == 2 ) pos1_2 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); + if ( ((istation-1)*3+ilayer) == 3 ) pos2_0 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); + if ( ((istation-1)*3+ilayer) == 4 ) pos2_1 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); + if ( ((istation-1)*3+ilayer) == 5 ) pos2_2 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); } } } @@ -490,10 +491,10 @@ namespace Tracker double charge = 1; double B = 0.57; - // const Acts::Vector3D pos = pos1_0; + // const Acts::Vector3 pos = pos1_0; /* - Acts::Vector3D d1 = pos1_2 - pos1_0; - Acts::Vector3D d2 = pos2_2 - pos2_0; + Acts::Vector3 d1 = pos1_2 - pos1_0; + Acts::Vector3 d2 = pos2_2 - pos2_0; */ // the least square of three space pionts @@ -509,7 +510,7 @@ namespace Tracker // calculate the slope double kxz1 = (Sxz1 - 3*Ax1*Az1) / (Szz1 - 3*Az1*Az1); double kyz1 = (Syz1 - 3*Ay1*Az1) / (Szz1 - 3*Az1*Az1); - Acts::Vector3D d1( kxz1, kyz1, 1.0); + Acts::Vector3 d1( kxz1, kyz1, 1.0); // calculate the averages double Ax2 = (pos2_0.x() + pos2_1.x() +pos2_2.x()) / 3; double Ay2 = (pos2_0.y() + pos2_1.y() +pos2_2.y()) / 3; @@ -521,14 +522,14 @@ namespace Tracker // calculate the slope double kxz2 = (Sxz2 - 3*Ax2*Az2) / (Szz2 - 3*Az2*Az2); double kyz2 = (Syz2 - 3*Ay2*Az2) / (Szz2 - 3*Az2*Az2); - Acts::Vector3D d2( kxz2, kyz2, 1.0); + Acts::Vector3 d2( kxz2, kyz2, 1.0); // // the direction of momentum in the first station - Acts::Vector3D direct1 = d1.normalized(); + Acts::Vector3 direct1 = d1.normalized(); std::cout<<"!!!!!!!!!!! direct1 = ("<<direct1.x()<<", "<<direct1.y()<<", "<<direct1.z()<<") "<<std::endl; // the direction of momentum in the second station - Acts::Vector3D direct2 = d2.normalized(); + Acts::Vector3 direct2 = d2.normalized(); std::cout<<"!!!!!!!!!!! direct2 = ("<<direct2.x()<<", "<<direct2.y()<<", "<<direct2.z()<<") "<<std::endl; // the vector pointing from the center of circle to the particle at layer 2 in Y-Z plane double R1_z = charge * direct1.y() / std::sqrt(direct1.y()*direct1.y() + direct1.z()*direct1.z()); @@ -547,7 +548,7 @@ namespace Tracker double p_y = p_yz * direct1.y() / std::sqrt(direct1.y()*direct1.y() + direct1.z()*direct1.z()); double p_x = direct1.x() * p_z / direct1.z(); // total momentum at the layer 0 - const Acts::Vector3D mom(p_x, p_y, p_z); + const Acts::Vector3 mom(p_x, p_y, p_z); double p = mom.norm(); std::cout<<"!!!!!!!!!!! InitTrack momentum on layer 0: ( "<<mom.x()*1000<<", "<<mom.y()*1000<<", "<<mom.z()*1000<<", "<<p*1000<<") "<<std::endl; std::cout<<"!!!!!!!!!!! truth momentum: ( "<<truthmom.px()<<", "<<truthmom.py()<<", "<<truthmom.pz()<<", "<<truthmom.m()<<" ) "<<std::endl; diff --git a/Tracker/TrackerRecTools/FaserSiClusterizationTool/CMakeLists.txt b/Tracker/TrackerRecTools/FaserSiClusterizationTool/CMakeLists.txt index 3d927a4bc83d984f49be89548c74593df1428a21..3e22c8a99050cf977d76fc3c7dd21c482188fc41 100644 --- a/Tracker/TrackerRecTools/FaserSiClusterizationTool/CMakeLists.txt +++ b/Tracker/TrackerRecTools/FaserSiClusterizationTool/CMakeLists.txt @@ -18,10 +18,10 @@ atlas_add_library( FaserSiClusterizationToolLib PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives Identifier EventPrimitives GaudiKernel TrackerSimData TrackerIdentifier - TrackerReadoutGeometry TrackerRawData TrackerPrepRawData InDetRecToolInterfaces + TrackerReadoutGeometry TrackerRawData TrackerPrepRawData TrkParameters CxxUtils PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaPoolUtilities FileCatalog FaserDetDescr - TrkSurfaces TrkEventPrimitives VxVertex ) + TrkSurfaces TrkEventPrimitives ) atlas_add_component( FaserSiClusterizationTool src/components/*.cxx diff --git a/Tracker/TrackerRecTools/FaserSiClusterizationTool/src/FaserSCT_ClusteringTool.h b/Tracker/TrackerRecTools/FaserSiClusterizationTool/src/FaserSCT_ClusteringTool.h index 8267f778ad64047fc7ec174081be8de51b97748e..94a307a69bb6b79d1dbbe898039febf61f3150c0 100644 --- a/Tracker/TrackerRecTools/FaserSiClusterizationTool/src/FaserSCT_ClusteringTool.h +++ b/Tracker/TrackerRecTools/FaserSiClusterizationTool/src/FaserSCT_ClusteringTool.h @@ -12,7 +12,7 @@ //Athena #include "AthenaBaseComps/AthAlgTool.h" #include "Identifier/Identifier.h" -//#include "SCT_ConditionsTools/ISCT_DCSConditionsTool.h" +//#include "FaserSCT_ConditionsTools/ISCT_DCSConditionsTool.h" #include "InDetCondTools/ISiLorentzAngleTool.h" #include "TrackerReadoutGeometry/SiDetectorElementCollection.h" #include "FaserSiClusterizationTool/IFaserSCT_ClusteringTool.h" diff --git a/Tracker/TrackerRecTools/TruthSeededTrackFinderTool/CMakeLists.txt b/Tracker/TrackerRecTools/TruthSeededTrackFinderTool/CMakeLists.txt index 6b02af22a8306bfe2605c1c4edc49cd0ac536abc..bb87a96a2621fc35140f0de39fd5b7c8e924ebc6 100644 --- a/Tracker/TrackerRecTools/TruthSeededTrackFinderTool/CMakeLists.txt +++ b/Tracker/TrackerRecTools/TruthSeededTrackFinderTool/CMakeLists.txt @@ -5,27 +5,13 @@ # Declare the package name: atlas_subdir( TruthSeededTrackFinderTool) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Control/AthenaKernel - DetectorDescription/GeoPrimitives - Tracker/TrackerRecEvent/TrackerPrepRawData - DetectorDescription/Identifier - PRIVATE - GaudiKernel - Tracker/TrackerDetDescr/TrackerReadoutGeometry - Tracker/TrackerDetDescr/TrackerIdentifier - Tracker/TrackerRecEvent/TrackerSpacePoint - ) - # External dependencies: find_package( Eigen ) # Component(s) in the package: atlas_add_library( TruthSeededTrackFinderToolLib TruthSeededTrackFinderTool/*.h src/*.cxx src/*.h - PUBLIC_HEADERS TruthSeededTrackFinderTool + PUBLIC_HEADERS TruthSeededTrackFinderTool INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives TrackerPrepRawData PRIVATE_LINK_LIBRARIES GaudiKernel TrackerIdentifier TrackerReadoutGeometry TrackerSpacePoint ) @@ -33,5 +19,6 @@ atlas_add_library( TruthSeededTrackFinderToolLib atlas_add_component( TruthSeededTrackFinderTool src/components/*.cxx INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives TrackerPrepRawData GaudiKernel TrackerIdentifier TrackerReadoutGeometry TrackerSpacePoint TruthSeededTrackFinderToolLib ) + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives TrackerPrepRawData GaudiKernel + TrackerIdentifier TrackerReadoutGeometry TrackerSpacePoint TruthSeededTrackFinderToolLib ) diff --git a/Tracking/Acts/FaserActsGeometry/CMakeLists.txt b/Tracking/Acts/FaserActsGeometry/CMakeLists.txt index 28b8c22ea0ff95f5f150c1e0b7c92eedb05c6dd0..bd4c0658954dc8c5e1fb0adde80e36c2e2b0583d 100755 --- a/Tracking/Acts/FaserActsGeometry/CMakeLists.txt +++ b/Tracking/Acts/FaserActsGeometry/CMakeLists.txt @@ -11,56 +11,57 @@ find_package( nlohmann_json ) find_package( Acts COMPONENTS Core ) atlas_add_library( FaserActsGeometryLib - src/FaserActsSurfaceMappingTool.cxx - src/FaserActsMaterialMapping.cxx - src/FaserActsAlignmentStore.cxx - src/FaserActsDetectorElement.cxx - src/FaserActsLayerBuilder.cxx - src/CuboidVolumeBuilder.cxx - src/FaserActsJsonGeometryConverter.cxx - src/util/*.cxx - PUBLIC_HEADERS FaserActsGeometry - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${BOOST_LIBRARIES} nlohmann_json::nlohmann_json - TrackerIdentifier - TrackerReadoutGeometry - ActsInteropLib - FaserActsGeometryInterfacesLib - AthenaKernel - ActsCore - ActsGeometryLib - ActsGeometryInterfacesLib - MagFieldInterfaces - MagFieldElements - MagFieldConditions - TrackerRawData - TrackerSimData - GeneratorObjects - TrackerSimEvent - TrackerSpacePoint - TrackerIdentifier - TrackerPrepRawData - TrkSpacePoint - TrkGeometry + src/FaserActsSurfaceMappingTool.cxx + src/FaserActsMaterialMapping.cxx + src/FaserActsAlignmentStore.cxx + src/FaserActsDetectorElement.cxx + src/FaserActsLayerBuilder.cxx + src/CuboidVolumeBuilder.cxx + src/FaserActsJsonGeometryConverter.cxx + src/util/*.cxx + PUBLIC_HEADERS FaserActsGeometry + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${BOOST_LIBRARIES} nlohmann_json::nlohmann_json + TrackerIdentifier + TrackerReadoutGeometry + ActsInteropLib + FaserActsGeometryInterfacesLib + AthenaKernel + ActsCore + GeoModelFaserUtilities + ActsGeometryLib + ActsGeometryInterfacesLib + MagFieldInterfaces + MagFieldElements + MagFieldConditions + TrackerRawData + TrackerSimData + GeneratorObjects + TrackerSimEvent + TrackerSpacePoint + TrackerIdentifier + TrackerPrepRawData + TrkSpacePoint + TrkGeometry ) # Component(s) in the package: atlas_add_component( FaserActsGeometry ##src/*.cxx - src/FaserActsSurfaceMappingTool.cxx - src/FaserActsMaterialMapping.cxx - src/FaserActsMaterialJsonWriterTool.cxx - src/FaserActsJsonGeometryConverter.cxx - src/FaserActsTrackingGeometrySvc.cxx - src/FaserActsTrackingGeometryTool.cxx - src/FaserActsWriteTrackingGeometry.cxx - src/FaserActsObjWriterTool.cxx - src/FaserActsExtrapolationAlg.cxx - src/FaserActsExtrapolationTool.cxx - src/FaserActsPropStepRootWriterSvc.cxx - src/FaserActsAlignmentCondAlg.cxx - src/NominalAlignmentCondAlg.cxx + src/FaserActsSurfaceMappingTool.cxx + src/FaserActsMaterialMapping.cxx + src/FaserActsMaterialJsonWriterTool.cxx + src/FaserActsJsonGeometryConverter.cxx + src/FaserActsTrackingGeometrySvc.cxx + src/FaserActsTrackingGeometryTool.cxx + src/FaserActsWriteTrackingGeometry.cxx + src/FaserActsObjWriterTool.cxx + src/FaserActsExtrapolationAlg.cxx + src/FaserActsExtrapolationTool.cxx + src/FaserActsPropStepRootWriterSvc.cxx + src/FaserActsAlignmentCondAlg.cxx + src/NominalAlignmentCondAlg.cxx #src/FaserActsKalmanFilterAlg.cxx src/FaserActsVolumeMappingTool.cxx src/components/*.cxx @@ -73,12 +74,13 @@ atlas_add_component( FaserActsGeometry FaserActsGeometryLib ActsInteropLib FaserActsGeometryInterfacesLib - ActsCore - ActsGeometryLib - ActsGeometryInterfacesLib - MagFieldInterfaces - MagFieldElements - MagFieldConditions + ActsCore + ActsGeometryLib + ActsGeometryInterfacesLib + GeoModelFaserUtilities + MagFieldInterfaces + MagFieldElements + MagFieldConditions TrackerRawData TrackerSimData GeneratorObjects @@ -87,7 +89,7 @@ atlas_add_component( FaserActsGeometry TrackerIdentifier TrackerPrepRawData TrkSpacePoint - TrkGeometry + TrkGeometry ) diff --git a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/CuboidVolumeBuilder.h b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/CuboidVolumeBuilder.h index 44170eb23fe9152f2786fee8e7d06ce78fee5a5b..87cd8e0ae88a02a54de7e003d72be19b9f703d9f 100644 --- a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/CuboidVolumeBuilder.h +++ b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/CuboidVolumeBuilder.h @@ -13,7 +13,8 @@ #include <vector> #include "Acts/Geometry/GeometryContext.hpp" #include "Acts/Geometry/ITrackingVolumeBuilder.hpp" -#include "Acts/Utilities/Definitions.hpp" +#include "Acts/Definitions/Common.hpp" +#include "Acts/Definitions/Algebra.hpp" #include "Acts/Geometry/GenericApproachDescriptor.hpp" namespace Acts{ @@ -42,9 +43,9 @@ class CuboidVolumeBuilder : public Acts::ITrackingVolumeBuilder { /// PlaneSurface struct SurfaceConfig { // Center position - Acts::Vector3D position; + Acts::Vector3 position; // Rotation - Acts::RotationMatrix3D rotation = Acts::RotationMatrix3D::Identity(); + Acts::RotationMatrix3 rotation = Acts::RotationMatrix3::Identity(); // Bounds std::shared_ptr<const Acts::RectangleBounds> rBounds = nullptr; // Attached material @@ -53,7 +54,7 @@ class CuboidVolumeBuilder : public Acts::ITrackingVolumeBuilder { double thickness = 0.; // Constructor function for optional detector elements // Arguments are transform, rectangle bounds and thickness. - std::function<Acts::DetectorElementBase*(std::shared_ptr<const Acts::Transform3D>, + std::function<Acts::DetectorElementBase*(std::shared_ptr<const Acts::Transform3>, std::shared_ptr<const Acts::RectangleBounds>, double)> detElementConstructor; @@ -81,9 +82,9 @@ class CuboidVolumeBuilder : public Acts::ITrackingVolumeBuilder { /// TrackingVolume with a given number of PlaneLayers struct VolumeConfig { // Center position - Acts::Vector3D position; + Acts::Vector3 position; // Lengths in x,y,z - Acts::Vector3D length; + Acts::Vector3 length; // Configurations of its layers std::vector<LayerConfig> layerCfg; // Stored layers @@ -101,9 +102,9 @@ class CuboidVolumeBuilder : public Acts::ITrackingVolumeBuilder { /// @brief This struct stores the configuration of the tracking geometry struct Config { // Center position - Acts::Vector3D position = Acts::Vector3D(0., 0., 0.); + Acts::Vector3 position = Acts::Vector3(0., 0., 0.); // Length in x,y,z - Acts::Vector3D length = Acts::Vector3D(0., 0., 0.); + Acts::Vector3 length = Acts::Vector3(0., 0., 0.); // Configuration of its volumes std::vector<VolumeConfig> volumeCfg = {}; }; diff --git a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FASERMagneticFieldWrapper.h b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FASERMagneticFieldWrapper.h index b6700c291ca5a08e0ad703f8015a4bc255568319..908c57444d5796b620ccd2f6f9c4dacf13045c6d 100644 --- a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FASERMagneticFieldWrapper.h +++ b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FASERMagneticFieldWrapper.h @@ -8,8 +8,9 @@ #include "GaudiKernel/PhysicalConstants.h" #include "MagFieldConditions/FaserFieldCacheCondObj.h" #include "MagFieldElements/FaserFieldCache.h" -#include "Acts/Utilities/Definitions.hpp" -#include "Acts/Utilities/Units.hpp" +#include "Acts/Definitions/Common.hpp" +#include "Acts/Definitions/Algebra.hpp" +#include "Acts/Definitions/Units.hpp" #include "Acts/MagneticField/MagneticFieldContext.hpp" class FASERMagneticFieldWrapper @@ -30,28 +31,28 @@ class FASERMagneticFieldWrapper FASERMagneticFieldWrapper() = default; - Acts::Vector3D - getField(const Acts::Vector3D& pos, Cache& cache) const + Acts::Vector3 + getField(const Acts::Vector3& pos, Cache& cache) const { double pos0[]{pos.x(), pos.y(), pos.z()}; double bfield0[]{0., 0., 0.}; cache.fieldCache.getField(pos0, bfield0); - Acts::Vector3D bfield(bfield0[0], bfield0[1], bfield0[2]); + Acts::Vector3 bfield(bfield0[0], bfield0[1], bfield0[2]); bfield *= m_bFieldUnit; // kT -> T; return bfield; } - Acts::Vector3D - getFieldGradient(const Acts::Vector3D& position, Acts::ActsMatrixD<3, 3>& gradient, Cache& cache) const + Acts::Vector3 + getFieldGradient(const Acts::Vector3& position, Acts::ActsMatrix<3, 3>& gradient, Cache& cache) const { double position0[]{position.x(), position.y(), position.z()}; double bfield0[]{0., 0., 0.}; double grad[9]; cache.fieldCache.getField(position0, bfield0, grad); - Acts::Vector3D bfield(bfield0[0], bfield0[1], bfield0[2]); - Acts::ActsMatrixD<3, 3> tempGrad; + Acts::Vector3 bfield(bfield0[0], bfield0[1], bfield0[2]); + Acts::ActsMatrix<3, 3> tempGrad; tempGrad << grad[0], grad[1], grad[2], grad[3], grad[4], grad[5], grad[6], grad[7], grad[8]; gradient = tempGrad; diff --git a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsAlignmentStore.h b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsAlignmentStore.h index 5566b42c71f6dd052a939bcfa47b50c35796a811..0edb3d3fd4f62e029301049415f190c36916218d 100644 --- a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsAlignmentStore.h +++ b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsAlignmentStore.h @@ -5,12 +5,12 @@ #ifndef FASERACTSGEOMETRY_ACTSALIGNMENTSTORE_H #define FASERACTSGEOMETRY_ACTSALIGNMENTSTORE_H -#include "GeoModelUtilities/GeoAlignmentStore.h" -#include "GeoModelUtilities/TransformMap.h" +#include "GeoModelFaserUtilities/GeoAlignmentStore.h" +#include "GeoModelFaserUtilities/TransformMap.h" #include "AthenaKernel/CLASS_DEF.h" #include "AthenaKernel/CondCont.h" -#include "Acts/Utilities/Definitions.hpp" +#include "Acts/Definitions/Common.hpp" #include <stdexcept> @@ -22,13 +22,13 @@ class FaserActsAlignmentStore : public GeoAlignmentStore FaserActsAlignmentStore() {} FaserActsAlignmentStore(const GeoAlignmentStore& gas); - void setTransform(const FaserActsDetectorElement* key, const Acts::Transform3D&); - const Acts::Transform3D* getTransform(const FaserActsDetectorElement* key) const; + void setTransform(const FaserActsDetectorElement* key, const Acts::Transform3&); + const Acts::Transform3* getTransform(const FaserActsDetectorElement* key) const; void append(const GeoAlignmentStore& gas); private: - TransformMap<FaserActsDetectorElement, Acts::Transform3D> m_transforms; + TransformMap<FaserActsDetectorElement, Acts::Transform3> m_transforms; }; CLASS_DEF(FaserActsAlignmentStore, 58650257, 1) diff --git a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsDetectorElement.h b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsDetectorElement.h index 9d985df94d31f2afdad19757126114d605a06291..c65bdb69bb6b2f27918c2927fdfd80f2c2d09cb3 100644 --- a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsDetectorElement.h +++ b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsDetectorElement.h @@ -47,7 +47,7 @@ public: void storeTransform(FaserActsAlignmentStore* gas) const; - virtual const Acts::Transform3D & + virtual const Acts::Transform3 & transform(const Acts::GeometryContext &gctx) const final override; @@ -69,7 +69,7 @@ private: /// For silicon detectors it is calulated from GM, and stored. Thus the method /// is not const. The store is mutexed. - const Acts::Transform3D& + const Acts::Transform3& getDefaultTransformMutexed() const; /// Detector element @@ -85,14 +85,14 @@ private: // this is pretty much only used single threaded, so // the mutex does not hurt mutable std::mutex m_cacheMutex; - mutable std::shared_ptr<const Acts::Transform3D> m_defTransform; + mutable std::shared_ptr<const Acts::Transform3> m_defTransform; const FaserActsTrackingGeometrySvc* m_trackingGeometrySvc; Identifier m_explicitIdentifier; // this is threadsafe! - //mutable Gaudi::Hive::ContextSpecificData<Acts::Transform3D> m_ctxSpecificTransform; + //mutable Gaudi::Hive::ContextSpecificData<Acts::Transform3> m_ctxSpecificTransform; }; diff --git a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsExtrapolationTool.h b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsExtrapolationTool.h index bb8e780b6f425aaece17fa55c77cdca57153a52c..ee765dd235b4d139d336edabb21a1605169fc483 100644 --- a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsExtrapolationTool.h +++ b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsExtrapolationTool.h @@ -35,7 +35,7 @@ #include "Acts/MagneticField/ConstantBField.hpp" #include "Acts/MagneticField/MagneticFieldContext.hpp" #include "Acts/Utilities/Result.hpp" -#include "Acts/Utilities/Units.hpp" +#include "Acts/Definitions/Units.hpp" #include "Acts/Utilities/Helpers.hpp" #include "Acts/Utilities/Logger.hpp" diff --git a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsGeometryContext.h b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsGeometryContext.h index 5ff79e737b8ee67c215c647981c3c9a060eca73a..6165e29203d93be6f4160ed54560d72a145faa3b 100644 --- a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsGeometryContext.h +++ b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsGeometryContext.h @@ -25,7 +25,7 @@ struct FaserActsGeometryContext { Acts::GeometryContext any() const { - return {this}; + return Acts::GeometryContext {this}; } }; diff --git a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsJsonGeometryConverter.h b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsJsonGeometryConverter.h index 2936c9d327beb61033ab4a975d2386e1fd7ee5eb..f665a57565ea1cf26cb278f02f8c476da56b286e 100644 --- a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsJsonGeometryConverter.h +++ b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsJsonGeometryConverter.h @@ -13,7 +13,7 @@ #include "Acts/Material/IVolumeMaterial.hpp" #include "Acts/Material/MaterialSlab.hpp" #include "Acts/Utilities/BinUtility.hpp" -#include "Acts/Utilities/Definitions.hpp" +#include "Acts/Definitions/Common.hpp" #include "Acts/Utilities/Logger.hpp" #include <Acts/Geometry/TrackingVolume.hpp> #include <Acts/Surfaces/Surface.hpp> @@ -221,7 +221,7 @@ class FaserActsJsonGeometryConverter { BinUtility jsonToBinUtility(const nlohmann::json& bin); /// Create the local to global transform for from Json - Transform3D jsonToTransform(const nlohmann::json& transfo); + Transform3 jsonToTransform(const nlohmann::json& transfo); /// Create Json from a detector represenation nlohmann::json detectorRepToJson(const DetectorRep& detRep); diff --git a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsLayerBuilder.h b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsLayerBuilder.h index 69843abf30e7ec18f6201f4686c5f3525177e4c2..efd0afbdfb2b07f6c46332048d7ed5580121dca3 100644 --- a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsLayerBuilder.h +++ b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsLayerBuilder.h @@ -16,8 +16,9 @@ #include "Acts/Geometry/ILayerBuilder.hpp" #include "Acts/Utilities/Logger.hpp" #include "Acts/Utilities/BinningType.hpp" -#include "Acts/Utilities/Definitions.hpp" -#include "Acts/Utilities/Units.hpp" +#include "Acts/Definitions/Common.hpp" +#include "Acts/Definitions/Algebra.hpp" +#include "Acts/Definitions/Units.hpp" #include "FaserActsGeometry/CuboidVolumeBuilder.h" using namespace Acts::UnitLiterals; @@ -104,9 +105,9 @@ private: double m_ModuleLength; /// configruation object Config m_cfg; - Acts::Vector3D m_worldDimensions = { 400.0_mm, 400.0_mm, 6000.0_mm }; - Acts::Vector3D m_worldCenter = {0.0, 0.0, 1276.0_mm}; - Acts::Vector3D m_trackerDimensions = { 400.0_mm, 400.0_mm, 1200.0_mm }; + Acts::Vector3 m_worldDimensions = { 400.0_mm, 400.0_mm, 6000.0_mm }; + Acts::Vector3 m_worldCenter = {0.0, 0.0, 1276.0_mm}; + Acts::Vector3 m_trackerDimensions = { 400.0_mm, 400.0_mm, 1200.0_mm }; /// Private access to the logger const Acts::Logger& diff --git a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsTrackingGeometrySvc.h b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsTrackingGeometrySvc.h index 28ef43bd3e51d8ecbb307182d25e9984f1756849..65d61f8b54563b098432351c78a0804536e0a467 100644 --- a/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsTrackingGeometrySvc.h +++ b/Tracking/Acts/FaserActsGeometry/FaserActsGeometry/FaserActsTrackingGeometrySvc.h @@ -12,8 +12,8 @@ // ACTS #include "Acts/Geometry/GeometryContext.hpp" -#include "Acts/Utilities/Definitions.hpp" -#include "Acts/Utilities/Units.hpp" +#include "Acts/Definitions/Common.hpp" +#include "Acts/Definitions/Units.hpp" // PACKAGE #include "FaserActsGeometryInterfaces/IFaserActsTrackingGeometrySvc.h" diff --git a/Tracking/Acts/FaserActsGeometry/src/CuboidVolumeBuilder.cxx b/Tracking/Acts/FaserActsGeometry/src/CuboidVolumeBuilder.cxx index 1f93d658f2aed73883bee5d6b31bbba1e83f00af..76416ff7b7a917a9e47a18a87ac125686b6d386a 100644 --- a/Tracking/Acts/FaserActsGeometry/src/CuboidVolumeBuilder.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/CuboidVolumeBuilder.cxx @@ -13,6 +13,7 @@ #include "Acts/Geometry/LayerArrayCreator.hpp" #include "Acts/Geometry/LayerCreator.hpp" #include "Acts/Geometry/PlaneLayer.hpp" +#include "Acts/Geometry/SurfaceArrayCreator.hpp" #include "Acts/Geometry/TrackingGeometry.hpp" #include "Acts/Geometry/TrackingVolume.hpp" #include "Acts/Geometry/detail/DefaultDetectorElementBase.hpp" @@ -24,7 +25,10 @@ #include "Acts/Surfaces/SurfaceArray.hpp" #include "Acts/Utilities/BinnedArray.hpp" #include "Acts/Utilities/BinnedArrayXD.hpp" -#include "Acts/Utilities/Definitions.hpp" +#include "Acts/Definitions/Common.hpp" +#include "Acts/Definitions/Units.hpp" +#include "Acts/Definitions/Algebra.hpp" + namespace FaserActs{ @@ -35,14 +39,14 @@ CuboidVolumeBuilder::buildSurface( std::shared_ptr<Acts::PlaneSurface> surface; // Build transformation - Acts::Transform3D trafo(Acts::Transform3D::Identity() * cfg.rotation); + Acts::Transform3 trafo(Acts::Transform3::Identity() * cfg.rotation); trafo.translation() = cfg.position; // Create and store surface if (cfg.detElementConstructor) { surface = Acts::Surface::makeShared<Acts::PlaneSurface>( cfg.rBounds, - *(cfg.detElementConstructor(std::make_shared<const Acts::Transform3D>(trafo), + *(cfg.detElementConstructor(std::make_shared<const Acts::Transform3>(trafo), cfg.rBounds, cfg.thickness))); } else { surface = Acts::Surface::makeShared<Acts::PlaneSurface>( @@ -60,7 +64,7 @@ std::shared_ptr<const Acts::Layer> CuboidVolumeBuilder::buildLayer( cfg.surface = buildSurface(gctx, cfg.surfaceCfg); } // Build transformation centered at the surface position - Acts::Transform3D trafo(Acts::Transform3D::Identity() * cfg.surfaceCfg.rotation); + Acts::Transform3 trafo(Acts::Transform3::Identity() * cfg.surfaceCfg.rotation); trafo.translation() = cfg.surfaceCfg.position; Acts::LayerCreator::Config lCfg; @@ -109,7 +113,7 @@ std::shared_ptr<Acts::TrackingVolume> CuboidVolumeBuilder::buildVolume( const Acts::GeometryContext& gctx, CuboidVolumeBuilder::VolumeConfig& cfg) const { // Build transformation - Acts::Transform3D trafo(Acts::Transform3D::Identity()); + Acts::Transform3 trafo(Acts::Transform3::Identity()); trafo.translation() = cfg.position; // Set bounds auto bounds = std::make_shared<const Acts::CuboidVolumeBounds>( @@ -120,9 +124,9 @@ std::shared_ptr<Acts::TrackingVolume> CuboidVolumeBuilder::buildVolume( SurfaceConfig sCfg; sCfg.position = cfg.position; // Rotation of the surfaces: +pi/2 around axis y - Acts::Vector3D xPos(0., 0., 1.); - Acts::Vector3D yPos(0., 1., 0.); - Acts::Vector3D zPos(-1., 0., 0.); + Acts::Vector3 xPos(0., 0., 1.); + Acts::Vector3 yPos(0., 1., 0.); + Acts::Vector3 zPos(-1., 0., 0.); sCfg.rotation.col(0) = xPos; sCfg.rotation.col(1) = yPos; sCfg.rotation.col(2) = zPos; @@ -193,7 +197,7 @@ Acts::MutableTrackingVolumePtr CuboidVolumeBuilder::trackingVolume( } // Translation - Acts::Transform3D trafo(Acts::Transform3D::Identity()); + Acts::Transform3 trafo(Acts::Transform3::Identity()); trafo.translation() = m_cfg.position; // Size of the volume @@ -201,7 +205,7 @@ Acts::MutableTrackingVolumePtr CuboidVolumeBuilder::trackingVolume( m_cfg.length.x() * 0.5, m_cfg.length.y() * 0.5, m_cfg.length.z() * 0.5); // Build vector of confined volumes - std::vector<std::pair<Acts::TrackingVolumePtr, Acts::Vector3D>> tapVec; + std::vector<std::pair<Acts::TrackingVolumePtr, Acts::Vector3>> tapVec; tapVec.reserve(m_cfg.volumeCfg.size()); for (auto& tVol : volumes) { tapVec.push_back(std::make_pair(tVol, tVol->center())); diff --git a/Tracking/Acts/FaserActsGeometry/src/FaserActsAlignmentCondAlg.cxx b/Tracking/Acts/FaserActsGeometry/src/FaserActsAlignmentCondAlg.cxx index 66cfdc7bd6b0fd92654fa1a4f45c2c79704084b7..8c913b6ad5e1667a83c1f29aedcb650c2ab84c56 100644 --- a/Tracking/Acts/FaserActsGeometry/src/FaserActsAlignmentCondAlg.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/FaserActsAlignmentCondAlg.cxx @@ -25,7 +25,7 @@ #include "Acts/Geometry/DetectorElementBase.hpp" #include "Acts/Geometry/TrackingGeometry.hpp" #include "Acts/Surfaces/Surface.hpp" -#include "Acts/Utilities/Definitions.hpp" +#include "Acts/Definitions/Common.hpp" // STL #include <memory> diff --git a/Tracking/Acts/FaserActsGeometry/src/FaserActsAlignmentStore.cxx b/Tracking/Acts/FaserActsGeometry/src/FaserActsAlignmentStore.cxx index 1abb7d734075c8ad1892ad315f516d3ed32dcc74..992e48f801c1561c189817d44040a14f168c37b1 100644 --- a/Tracking/Acts/FaserActsGeometry/src/FaserActsAlignmentStore.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/FaserActsAlignmentStore.cxx @@ -6,7 +6,7 @@ #include "FaserActsGeometry/FaserActsDetectorElement.h" -#include "Acts/Utilities/Definitions.hpp" +#include "Acts/Definitions/Common.hpp" FaserActsAlignmentStore::FaserActsAlignmentStore(const GeoAlignmentStore &gas){ @@ -17,14 +17,14 @@ FaserActsAlignmentStore::FaserActsAlignmentStore(const GeoAlignmentStore &gas){ } void FaserActsAlignmentStore::setTransform(const FaserActsDetectorElement *ade, - const Acts::Transform3D &xf) { + const Acts::Transform3 &xf) { if (!m_transforms.setTransform(ade, xf)) { throw ExcAlignmentStore( "Attempted to overwrite Delta in the Alignment Store"); } } -const Acts::Transform3D * +const Acts::Transform3 * FaserActsAlignmentStore::getTransform(const FaserActsDetectorElement *ade) const { return m_transforms.getTransform(ade); } diff --git a/Tracking/Acts/FaserActsGeometry/src/FaserActsDetectorElement.cxx b/Tracking/Acts/FaserActsGeometry/src/FaserActsDetectorElement.cxx index 622f1d0b87a505fd4be48c79ba06795c65df38b8..b911380d6e579a90fd22f7da11a59df282a92ce1 100644 --- a/Tracking/Acts/FaserActsGeometry/src/FaserActsDetectorElement.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/FaserActsDetectorElement.cxx @@ -23,12 +23,12 @@ #include "Acts/Surfaces/RectangleBounds.hpp" #include "Acts/Surfaces/TrapezoidBounds.hpp" #include "Acts/Geometry/GeometryContext.hpp" -#include "Acts/Utilities/Units.hpp" +#include "Acts/Definitions/Units.hpp" // STL #include <mutex> -using Acts::Transform3D; +using Acts::Transform3; using Acts::Surface; using namespace Acts::UnitLiterals; @@ -87,7 +87,7 @@ FaserActsDetectorElement::identityHelper() const return IdentityHelper(m_detElement); } -const Acts::Transform3D& +const Acts::Transform3& FaserActsDetectorElement::transform(const Acts::GeometryContext& anygctx) const { // any cast to known context type @@ -109,7 +109,7 @@ FaserActsDetectorElement::transform(const Acts::GeometryContext& anygctx) const // get the correct cached transform // units should be fine here since we converted at construction - const Transform3D* cachedTrf = alignmentStore->getTransform(this); + const Transform3* cachedTrf = alignmentStore->getTransform(this); assert(cachedTrf != nullptr); @@ -133,7 +133,7 @@ FaserActsDetectorElement::storeTransform(FaserActsAlignmentStore* gas) const } -const Acts::Transform3D& +const Acts::Transform3& FaserActsDetectorElement::getDefaultTransformMutexed() const { Amg::Transform3D g2l @@ -149,7 +149,7 @@ FaserActsDetectorElement::getDefaultTransformMutexed() const } // transform not yet set m_defTransform - = std::make_shared<const Transform3D>( g2l ); + = std::make_shared<const Acts::Transform3>( g2l ); return *m_defTransform; } diff --git a/Tracking/Acts/FaserActsGeometry/src/FaserActsExtrapolationAlg.cxx b/Tracking/Acts/FaserActsGeometry/src/FaserActsExtrapolationAlg.cxx index a259675a425be89ce3a12354e08cec04402a3136..0fb4c07c6295d9c173cae6c5aff1fabf340d2c43 100755 --- a/Tracking/Acts/FaserActsGeometry/src/FaserActsExtrapolationAlg.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/FaserActsExtrapolationAlg.cxx @@ -14,7 +14,8 @@ // ACTS #include "Acts/Utilities/Helpers.hpp" #include "Acts/Propagator/detail/SteppingLogger.hpp" -#include "Acts/Utilities/Units.hpp" +#include "Acts/Definitions/Units.hpp" +#include "Acts/Definitions/Algebra.hpp" #include "Acts/Utilities/Logger.hpp" #include "Acts/Surfaces/PerigeeSurface.hpp" @@ -88,7 +89,7 @@ StatusCode FaserActsExtrapolationAlg::execute(const EventContext& ctx) const double pt = rngEngine->flat() * std::abs(ptMax - ptMin) + ptMin; - Acts::Vector3D momentum( + Acts::Vector3 momentum( pt * std::cos(phi), pt * std::sin(phi), pt * std::sinh(eta)); double theta = Acts::VectorHelpers::theta(momentum); @@ -98,7 +99,7 @@ StatusCode FaserActsExtrapolationAlg::execute(const EventContext& ctx) const double qop = charge / momentum.norm(); std::shared_ptr<Acts::PerigeeSurface> surface - = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3D(0, 0, 0)); + = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3(0, 0, 0)); double t = 0; diff --git a/Tracking/Acts/FaserActsGeometry/src/FaserActsJsonGeometryConverter.cxx b/Tracking/Acts/FaserActsGeometry/src/FaserActsJsonGeometryConverter.cxx index 1984993b9ce69666daa2a5dc5e78865cd667eee8..c707a004396881bce6589e8f84f0ebf590d3e213 100644 --- a/Tracking/Acts/FaserActsGeometry/src/FaserActsJsonGeometryConverter.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/FaserActsJsonGeometryConverter.cxx @@ -29,6 +29,8 @@ #include <Acts/Surfaces/CylinderBounds.hpp> #include <Acts/Surfaces/RadialBounds.hpp> #include <Acts/Surfaces/SurfaceBounds.hpp> +#include <Acts/Definitions/Algebra.hpp> + #include <cstdio> #include <fstream> @@ -443,7 +445,7 @@ const Acts::IVolumeMaterial* Acts::FaserActsJsonGeometryConverter::jsonToVolumeM vMaterial = new Acts::HomogeneousVolumeMaterial(mmat[0]); } else { if (bUtility.dimensions() == 2) { - std::function<Acts::Vector2D(Acts::Vector3D)> transfoGlobalToLocal; + std::function<Acts::Vector2(Acts::Vector3)> transfoGlobalToLocal; Acts::Grid2D grid = createGrid2D(bUtility, transfoGlobalToLocal); Acts::Grid2D::point_t min = grid.minPosition(); @@ -464,7 +466,7 @@ const Acts::IVolumeMaterial* Acts::FaserActsJsonGeometryConverter::jsonToVolumeM new Acts::InterpolatedMaterialMap<MaterialMapper<MaterialGrid2D>>( std::move(matMap), bUtility); } else if (bUtility.dimensions() == 3) { - std::function<Acts::Vector3D(Acts::Vector3D)> transfoGlobalToLocal; + std::function<Acts::Vector3(Acts::Vector3)> transfoGlobalToLocal; Acts::Grid3D grid = createGrid3D(bUtility, transfoGlobalToLocal); Acts::Grid3D::point_t min = grid.minPosition(); @@ -728,8 +730,8 @@ json Acts::FaserActsJsonGeometryConverter::surfaceMaterialToJson( smj[binkeys[ibin]] = binj; } std::vector<double> transfo; - Acts::Transform3D transfo_matrix = bUtility->transform(); - if (not transfo_matrix.isApprox(Acts::Transform3D::Identity())) { + Acts::Transform3 transfo_matrix = bUtility->transform(); + if (not transfo_matrix.isApprox(Acts::Transform3::Identity())) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { transfo.push_back(transfo_matrix(j, i)); @@ -840,7 +842,7 @@ json Acts::FaserActsJsonGeometryConverter::volumeMaterialToJson( smj[binkeys[ibin]] = binj; } std::vector<double> transfo; - Acts::Transform3D transfo_matrix = bUtility->transform(); + Acts::Transform3 transfo_matrix = bUtility->transform(); for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { transfo.push_back(transfo_matrix(j, i)); @@ -928,9 +930,9 @@ Acts::BinUtility Acts::FaserActsJsonGeometryConverter::jsonToBinUtility( } /// Create the local to global transform -Acts::Transform3D Acts::FaserActsJsonGeometryConverter::jsonToTransform( +Acts::Transform3 Acts::FaserActsJsonGeometryConverter::jsonToTransform( const json& transfo) { - Transform3D transform; + Transform3 transform; int i = 0; int j = 0; for (auto& element : transfo) { diff --git a/Tracking/Acts/FaserActsGeometry/src/FaserActsLayerBuilder.cxx b/Tracking/Acts/FaserActsGeometry/src/FaserActsLayerBuilder.cxx index 4f21342cdc44f11e519c2fb28f08e4dd38fd2dd2..df260a0f6e8da85b268940795f33775f54b60d5b 100644 --- a/Tracking/Acts/FaserActsGeometry/src/FaserActsLayerBuilder.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/FaserActsLayerBuilder.cxx @@ -22,13 +22,14 @@ #include "Acts/Geometry/ProtoLayer.hpp" #include "Acts/Geometry/LayerCreator.hpp" #include "Acts/Geometry/GeometryContext.hpp" -#include "Acts/Utilities/Units.hpp" -#include "Acts/Utilities/Definitions.hpp" +#include "Acts/Definitions/Common.hpp" +#include "Acts/Definitions/Algebra.hpp" +#include "Acts/Definitions/Units.hpp" #include "Acts/Utilities/BinningType.hpp" using Acts::Surface; -using Acts::Transform3D; -using Acts::Translation3D; +using Acts::Transform3; +using Acts::Translation3; using namespace Acts::UnitLiterals; @@ -74,10 +75,10 @@ FaserActs::CuboidVolumeBuilder::Config FaserActsLayerBuilder::buildVolume(const layerConfigs.push_back(layercfg); if (iPlane == 1) { - volumeConfig.position = Acts::Vector3D(0, 0, surfacecfg.position.z()); + volumeConfig.position = Acts::Vector3(0, 0, surfacecfg.position.z()); } if (iStation == 0 && iPlane == 1) { - cvbConfig.position = Acts::Vector3D(0, 0, surfacecfg.position.z()); + cvbConfig.position = Acts::Vector3(0, 0, surfacecfg.position.z()); } } @@ -141,17 +142,17 @@ FaserActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx, double layerZInner = layerZ - layerThickness/2.; double layerZOuter = layerZ + layerThickness/2.; - surfacecfg.position = Acts::Vector3D(0, 0, layerZ); + surfacecfg.position = Acts::Vector3(0, 0, layerZ); if (std::abs(layerZInner) > std::abs(layerZOuter)) std::swap(layerZInner, layerZOuter); auto rBounds = std::make_shared<const Acts::RectangleBounds>( 0.5*layercfg.binsY*m_ModuleWidth, 0.5*layercfg.binsX*m_ModuleLength ) ; - Transform3D transformNominal(Translation3D(0., 0., layerZ)); + Transform3 transformNominal(Translation3(0., 0., layerZ)); - Transform3D transformInner(Translation3D(0., 0., layerZInner)); + Transform3 transformInner(Translation3(0., 0., layerZInner)); - Transform3D transformOuter(Translation3D(0., 0., layerZOuter)); + Transform3 transformOuter(Translation3(0., 0., layerZOuter)); std::shared_ptr<Acts::PlaneSurface> innerBoundary = Acts::Surface::makeShared<Acts::PlaneSurface>(transformInner, rBounds); diff --git a/Tracking/Acts/FaserActsGeometry/src/FaserActsMaterialMapping.cxx b/Tracking/Acts/FaserActsGeometry/src/FaserActsMaterialMapping.cxx index 70a2ccec59d4d37ef5b76dfd2b20274e5cbdea37..37031b416dca13ce8755914aa89b14dae9fee3ab 100644 --- a/Tracking/Acts/FaserActsGeometry/src/FaserActsMaterialMapping.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/FaserActsMaterialMapping.cxx @@ -14,7 +14,7 @@ // ACTS #include "Acts/Propagator/detail/SteppingLogger.hpp" #include "Acts/Utilities/Helpers.hpp" -#include "Acts/Utilities/Units.hpp" +#include "Acts/Definitions/Units.hpp" // PACKAGE #include "FaserActsGeometry/FaserActsGeometryContext.h" diff --git a/Tracking/Acts/FaserActsGeometry/src/FaserActsTrackingGeometrySvc.cxx b/Tracking/Acts/FaserActsGeometry/src/FaserActsTrackingGeometrySvc.cxx index fe4e3a99fc7604fac4b523cf6413e2a0239886fb..744700aa995f525914b84d257e7be4ba936f3f80 100644 --- a/Tracking/Acts/FaserActsGeometry/src/FaserActsTrackingGeometrySvc.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/FaserActsTrackingGeometrySvc.cxx @@ -24,7 +24,7 @@ //#include "Acts/Geometry/CuboidVolumeBuilder.hpp" #include "FaserActsGeometry/CuboidVolumeBuilder.h" #include "Acts/ActsVersion.hpp" -#include "Acts/Utilities/Units.hpp" +#include "Acts/Definitions/Units.hpp" // PACKAGE #include "FaserActsGeometry/FaserActsLayerBuilder.h" diff --git a/Tracking/Acts/FaserActsGeometry/src/FaserNominalAlignmentCondAlg.cxx b/Tracking/Acts/FaserActsGeometry/src/FaserNominalAlignmentCondAlg.cxx index b63cf8d48290c78204ed0a04670a412047a05b18..5edcda8c1acef4f087e1e15c307a32e9560145e3 100644 --- a/Tracking/Acts/FaserActsGeometry/src/FaserNominalAlignmentCondAlg.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/FaserNominalAlignmentCondAlg.cxx @@ -17,7 +17,7 @@ #include "FaserActsGeometry/FaserActsGeometryContext.h" // ACTS -#include "Acts/Utilities/Definitions.hpp" +#include "Acts/Definitions/Common.hpp" #include "Acts/Geometry/TrackingGeometry.hpp" #include "Acts/Surfaces/Surface.hpp" diff --git a/Tracking/Acts/FaserActsGeometry/src/util/ObjHelper.cxx b/Tracking/Acts/FaserActsGeometry/src/util/ObjHelper.cxx index 66181d9810cb614df41406f8df5ebe45d5dc134e..99c311f192ae6eebddfca77dcdf18b55b0e1f7d9 100644 --- a/Tracking/Acts/FaserActsGeometry/src/util/ObjHelper.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/util/ObjHelper.cxx @@ -12,7 +12,7 @@ void ObjHelper::writeVTN(std::ofstream& stream, VtnCounter& vtnCounter, double scalor, - const Acts::Vector3D& vertex, + const Acts::Vector3& vertex, const std::string& vtntype, bool point) { @@ -69,7 +69,7 @@ void ObjHelper::writePlanarFace(std::ofstream& stream, VtnCounter& vtnCounter, double scalor, - const std::vector<Acts::Vector3D>& vertices, + const std::vector<Acts::Vector3>& vertices, double thickness, const std::vector<unsigned int>& vsides) { @@ -78,9 +78,9 @@ ObjHelper::writePlanarFace(std::ofstream& stream, // the first vertex unsigned int fvertex = vtnCounter.vcounter + 1; // lets create the normal vector first - Acts::Vector3D sideOne = vertices[1] - vertices[0]; - Acts::Vector3D sideTwo = vertices[2] - vertices[1]; - Acts::Vector3D nvector(sideTwo.cross(sideOne).normalized()); + Acts::Vector3 sideOne = vertices[1] - vertices[0]; + Acts::Vector3 sideTwo = vertices[2] - vertices[1]; + Acts::Vector3 nvector(sideTwo.cross(sideOne).normalized()); // write the normal vector writeVTN(stream, vtnCounter, scalor, nvector, "n"); // thickness or not thickness @@ -115,7 +115,7 @@ ObjHelper::writeTube(std::ofstream& stream, VtnCounter& vtnCounter, double scalor, unsigned int nSegments, - const Acts::Transform3D& transform, + const Acts::Transform3& transform, double r, double hZ, double thickness) @@ -139,7 +139,7 @@ ObjHelper::writeTube(std::ofstream& stream, double phi = -M_PI + iphi * phistep; for (auto iflip : flip) { // create the vertex - Acts::Vector3D point(transform * Acts::Vector3D((r + t) * cos(phi), + Acts::Vector3 point(transform * Acts::Vector3((r + t) * cos(phi), (r + t) * sin(phi), iflip * hZ)); // write the normal vector @@ -166,7 +166,7 @@ ObjHelper::writeTube(std::ofstream& stream, } // construct the sides at the end when all vertices are done - Acts::Vector3D nvectorSide = transform.rotation().col(2); + Acts::Vector3 nvectorSide = transform.rotation().col(2); // write the normal vector @todo flip sides writeVTN(stream, vtnCounter, scalor, nvectorSide, "n"); std::string ntphr = "//" + std::to_string(vtnCounter.ncounter); diff --git a/Tracking/Acts/FaserActsGeometry/src/util/ObjHelper.h b/Tracking/Acts/FaserActsGeometry/src/util/ObjHelper.h index 2c55113fc96b4a257267c1074f7a5e409e64bd87..fdf75f4140a6aab2f5b110edc4b19c82537ace4a 100644 --- a/Tracking/Acts/FaserActsGeometry/src/util/ObjHelper.h +++ b/Tracking/Acts/FaserActsGeometry/src/util/ObjHelper.h @@ -8,8 +8,8 @@ #include <fstream> #include <vector> -#include "Acts/Utilities/Definitions.hpp" - +#include "Acts/Definitions/Common.hpp" +#include "Acts/Definitions/Algebra.hpp" namespace ObjHelper { @@ -29,7 +29,7 @@ namespace ObjHelper { writeVTN(std::ofstream& stream, VtnCounter& vtnCounter, double scalor, - const Acts::Vector3D& vertex, + const Acts::Vector3& vertex, const std::string& vtntype = "v", bool point = false); @@ -51,7 +51,7 @@ namespace ObjHelper { writePlanarFace(std::ofstream& stream, VtnCounter& vtnCounter, double scalor, - const std::vector<Acts::Vector3D>& vertices, + const std::vector<Acts::Vector3>& vertices, double thickness = 0., const std::vector<unsigned int>& vsides = {}); @@ -63,7 +63,7 @@ namespace ObjHelper { VtnCounter& vtnCounter, double scalor, unsigned int nSegments, - const Acts::Transform3D& transform, + const Acts::Transform3& transform, double r, double hZ, double thickness = 0.); diff --git a/Tracking/Acts/FaserActsGeometry/src/util/ObjSurfaceWriter.cxx b/Tracking/Acts/FaserActsGeometry/src/util/ObjSurfaceWriter.cxx index 4de54887c0cf14e9d4ab8b33c5af29ec24288a93..0e89733fc2f7897fa1f2307ab34d2eaf450c758d 100644 --- a/Tracking/Acts/FaserActsGeometry/src/util/ObjSurfaceWriter.cxx +++ b/Tracking/Acts/FaserActsGeometry/src/util/ObjSurfaceWriter.cxx @@ -20,6 +20,7 @@ #include "Acts/Geometry/Polyhedron.hpp" #include "Acts/Surfaces/CylinderSurface.hpp" #include "Acts/Surfaces/StrawSurface.hpp" +#include "Acts/Definitions/Algebra.hpp" namespace { // this method went away in acts 0.19.0. Porting over this code to use IVisualization seems @@ -113,11 +114,11 @@ Acts::ObjSurfaceWriter::write(const Acts::GeometryContext &gctx, // get the vertices auto planarVertices = planarBounds->vertices(); // loop over the vertices - std::vector<Acts::Vector3D> vertices; + std::vector<Acts::Vector3> vertices; vertices.reserve(planarVertices.size()); for (auto pv : planarVertices) { // get the point in 3D - Acts::Vector3D v3D(sTransform * Acts::Vector3D(pv.x(), pv.y(), 0.)); + Acts::Vector3 v3D(sTransform * Acts::Vector3(pv.x(), pv.y(), 0.)); vertices.push_back(v3D); } // get the thickness and vertical faces diff --git a/Tracking/Acts/FaserActsKalmanFilter/CMakeLists.txt b/Tracking/Acts/FaserActsKalmanFilter/CMakeLists.txt.disabled similarity index 98% rename from Tracking/Acts/FaserActsKalmanFilter/CMakeLists.txt rename to Tracking/Acts/FaserActsKalmanFilter/CMakeLists.txt.disabled index 2e4f94741746e376b7f79ea1da16cb2921f825a3..2feb67193700e480376545dd8d14d05d22c71b83 100755 --- a/Tracking/Acts/FaserActsKalmanFilter/CMakeLists.txt +++ b/Tracking/Acts/FaserActsKalmanFilter/CMakeLists.txt.disabled @@ -41,7 +41,7 @@ atlas_add_component(FaserActsKalmanFilter TrkPrepRawData TrackerPrepRawData TrackerSpacePoint - GeoModelUtilities + GeoModelFaserUtilities GeneratorObjects TrackerIdentifier TrackerReadoutGeometry diff --git a/Tracking/Acts/FaserActsKalmanFilter/FaserActsKalmanFilter/FaserActsKalmanFilterAlg.h b/Tracking/Acts/FaserActsKalmanFilter/FaserActsKalmanFilter/FaserActsKalmanFilterAlg.h index 484774be95907b94985ca48aa63b2169afc86037..b007b6054c41028b6dac7ef7d5773423add1bcb2 100755 --- a/Tracking/Acts/FaserActsKalmanFilter/FaserActsKalmanFilter/FaserActsKalmanFilterAlg.h +++ b/Tracking/Acts/FaserActsKalmanFilter/FaserActsKalmanFilter/FaserActsKalmanFilterAlg.h @@ -36,7 +36,7 @@ #include "Acts/EventData/TrackParameters.hpp" #include "Acts/Geometry/GeometryIdentifier.hpp" #include "Acts/Utilities/Helpers.hpp" -#include "Acts/Utilities/Definitions.hpp" +#include "Acts/Definitions/Common.hpp" // PACKAGE #include "FaserActsGeometry/FASERMagneticFieldWrapper.h" diff --git a/Tracking/Acts/FaserActsKalmanFilter/FaserActsKalmanFilter/FaserActsRecSourceLink.h b/Tracking/Acts/FaserActsKalmanFilter/FaserActsKalmanFilter/FaserActsRecSourceLink.h index fcf3b57b364b82e85687741f0b4656dd61720f3c..4e0cbe7e62e601126d86a46f1ac73fc666bea2ea 100644 --- a/Tracking/Acts/FaserActsKalmanFilter/FaserActsKalmanFilter/FaserActsRecSourceLink.h +++ b/Tracking/Acts/FaserActsKalmanFilter/FaserActsKalmanFilter/FaserActsRecSourceLink.h @@ -2,7 +2,7 @@ // ACTS #include "Acts/EventData/Measurement.hpp" -#include "Acts/Utilities/ParameterDefinitions.hpp" +#include "TrackParameterization.hpp" // ATHENA #include "TrkSpacePoint/SpacePoint.h" @@ -32,6 +32,11 @@ public: }; } + Acts::GeometryIdentifier geometryId() const + { + return m_surface->geometryId(); + } + private: Acts::BoundVector m_values; Acts::BoundMatrix m_cov; @@ -41,4 +46,9 @@ private: friend constexpr bool operator==(const RecSourceLink& lhs, const RecSourceLink& rhs) { return lhs.m_spacePoint == rhs.m_spacePoint; } + friend constexpr bool operator!=(const RecSourceLink& lhs, const RecSourceLink& rhs) { + return !(lhs == rhs); + } + + }; diff --git a/Tracking/Acts/FaserActsKalmanFilter/src/FaserActsKalmanFilterAlg.cxx b/Tracking/Acts/FaserActsKalmanFilter/src/FaserActsKalmanFilterAlg.cxx index 0c92d253024d2153b06bc7a4de9e73a013f89a8b..9374b5dd74f01fffd0efad57e016d504337dd118 100755 --- a/Tracking/Acts/FaserActsKalmanFilter/src/FaserActsKalmanFilterAlg.cxx +++ b/Tracking/Acts/FaserActsKalmanFilter/src/FaserActsKalmanFilterAlg.cxx @@ -32,12 +32,13 @@ #include "Acts/Surfaces/PlaneSurface.hpp" #include "Acts/Surfaces/PerigeeSurface.hpp" #include "Acts/Surfaces/RectangleBounds.hpp" -#include "Acts/Utilities/Units.hpp" +#include "Acts/Definitions/Units.hpp" #include "Acts/Utilities/Logger.hpp" #include "Acts/Utilities/Helpers.hpp" #include "Acts/Utilities/detail/periodic.hpp" -#include "Acts/Utilities/Definitions.hpp" -#include "Acts/Utilities/ParameterDefinitions.hpp" +#include "Acts/Definitions/Common.hpp" +#include "Acts/Definitions/Algebra.hpp" +#include "Acts/Definitions/TrackParameterization.hpp" #include "Acts/Utilities/CalibrationContext.hpp" #include "Acts/EventData/TrackParameters.hpp" #include "Acts/EventData/MultiTrajectoryHelpers.hpp" @@ -185,12 +186,12 @@ StatusCode FaserActsKalmanFilterAlg::execute() static const TrackerDD::SCT_DetectorManager *s_sct; if(detStore()->retrieve(s_sct,"SCT").isFailure()) s_sct = 0; int N_1_0=0, N_1_1=0, N_1_2=0, N_2_0=0, N_2_1=0, N_2_2=0; - Acts::Vector3D pos1_0(0., 0., 0.); - Acts::Vector3D pos1_1(0., 0., 0.); - Acts::Vector3D pos1_2(0., 0., 0.); - Acts::Vector3D pos2_0(0., 0., 0.); - Acts::Vector3D pos2_1(0., 0., 0.); - Acts::Vector3D pos2_2(0., 0., 0.); + Acts::Vector3 pos1_0(0., 0., 0.); + Acts::Vector3 pos1_1(0., 0., 0.); + Acts::Vector3 pos1_2(0., 0., 0.); + Acts::Vector3 pos2_0(0., 0., 0.); + Acts::Vector3 pos2_1(0., 0., 0.); + Acts::Vector3 pos2_2(0., 0., 0.); HepMC::FourVector truthmom; HepMC::FourVector pv; //!!!!!!!!!!!!!!!!!!!! @@ -233,7 +234,7 @@ StatusCode FaserActsKalmanFilterAlg::execute() int plane = m_idHelper->layer(id); if (station==1 && plane==0) { N_1_0++; - pos1_0 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); + pos1_0 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); // Construct a plane surface as the target surface const TrackerDD::SiDetectorDesign &design = siSpElement->design(); double hlX = design.width()/2. * 1_mm; @@ -246,23 +247,23 @@ StatusCode FaserActsKalmanFilterAlg::execute() } if (station==1 && plane==1) { N_1_1++; - pos1_1 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); + pos1_1 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); } if (station==1 && plane==2) { N_1_2++; - pos1_2 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); + pos1_2 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); } if (station==2 && plane==0) { N_2_0++; - pos2_0 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); + pos2_0 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); } if (station==2 && plane==1) { N_2_1++; - pos2_1 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); + pos2_1 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); } if (station==2 && plane==2) { N_2_2++; - pos2_2 = Acts::Vector3D(gloPos.x(), gloPos.y(), gloPos.z()); + pos2_2 = Acts::Vector3(gloPos.x(), gloPos.y(), gloPos.z()); } //!!!!!!!!!!!!!!!!!!!! @@ -298,14 +299,14 @@ StatusCode FaserActsKalmanFilterAlg::execute() //@FIXME: change the hard codes in future double charge = 1; double B = 0.55; - //const Acts::Vector3D pos = pos1_0; - const Acts::Vector3D pos(pos1_0.x(), pos1_0.y(), pos1_0.z()-1); - Acts::Vector3D d1 = pos1_2 - pos1_0; - Acts::Vector3D d2 = pos2_2 - pos2_0; + //const Acts::Vector3 pos = pos1_0; + const Acts::Vector3 pos(pos1_0.x(), pos1_0.y(), pos1_0.z()-1); + Acts::Vector3 d1 = pos1_2 - pos1_0; + Acts::Vector3 d2 = pos2_2 - pos2_0; // the direction of momentum in the first station - Acts::Vector3D direct1 = d1.normalized(); + Acts::Vector3 direct1 = d1.normalized(); // the direction of momentum in the second station - Acts::Vector3D direct2 = d2.normalized(); + Acts::Vector3 direct2 = d2.normalized(); // the vector pointing from the center of circle to the particle at layer 2 in Y-Z plane double R1_z = charge * direct1.y() / std::sqrt(direct1.y()*direct1.y() + direct1.z()*direct1.z()); // double R1_y = -charge * direct1.z() / std::sqrt(direct1.y()*direct1.y() + direct1.z()*direct1.z()); @@ -320,7 +321,7 @@ StatusCode FaserActsKalmanFilterAlg::execute() double p_y = p_yz * direct1.y() / std::sqrt(direct1.y()*direct1.y() + direct1.z()*direct1.z()); double p_x = direct1.x() * p_z / direct1.z(); // total momentum at the layer 0 - const Acts::Vector3D mom(p_x, p_y, p_z); + const Acts::Vector3 mom(p_x, p_y, p_z); double p = mom.norm(); std::cout<<"!!!!!!!!!!! InitTrack momentum on layer 0: ( "<<mom.x()*1000<<", "<<mom.y()*1000<<", "<<mom.z()*1000<<", "<<p*1000<<") "<<std::endl; // build the track covariance matrix using the smearing sigmas @@ -341,34 +342,34 @@ StatusCode FaserActsKalmanFilterAlg::execute() //Acts::CurvilinearTrackParameters InitTrackParam(std::make_optional(std::move(cov)), pos, mom, charge, time); // calculated initial parameters // Smearing truth parameters as initial parameters - Acts::Vector3D pPos(pv.x(), pv.y(), pv.z()); - Acts::Vector3D pMom(truthmom.x()/1000., truthmom.y()/1000., truthmom.z()/1000.); + Acts::Vector3 pPos(pv.x(), pv.y(), pv.z()); + Acts::Vector3 pMom(truthmom.x()/1000., truthmom.y()/1000., truthmom.z()/1000.); std::random_device rd; std::default_random_engine rng {rd()}; std::normal_distribution<> norm; // mu: 0 sigma: 1 - Acts::Vector3D deltaPos(sigmaU*norm(rng), sigmaU*norm(rng), sigmaU*norm(rng)); + Acts::Vector3 deltaPos(sigmaU*norm(rng), sigmaU*norm(rng), sigmaU*norm(rng)); auto theta = Acts::VectorHelpers::theta(pMom.normalized()); auto phi = Acts::VectorHelpers::phi(pMom.normalized()); auto angles = Acts::detail::ensureThetaBounds(phi + sigmaPhi*norm(rng), theta + sigmaTheta*norm(rng)); - Acts::Vector3D dir(std::sin(angles.second) * std::cos(angles.first), + Acts::Vector3 dir(std::sin(angles.second) * std::cos(angles.first), std::sin(angles.second) * std::sin(angles.first), std::cos(angles.second)); - const Acts::Vector3D deltaMom = ( pMom.norm()*(1 + 0.01*norm(rng)) ) * dir - pMom; + const Acts::Vector3 deltaMom = ( pMom.norm()*(1 + 0.01*norm(rng)) ) * dir - pMom; std::cout << "deltaPos: " << deltaPos << std::endl; std::cout << "deltaMom: " << deltaMom << std::endl; const Acts::Vector4D posTime ((pPos+deltaPos).x(), (pPos+deltaPos).y(), (pPos+deltaPos).z(), time); - const Acts::Vector3D momentum = pMom+deltaMom; - const Acts::Vector3D momentum_dir = momentum.normalized(); + const Acts::Vector3 momentum = pMom+deltaMom; + const Acts::Vector3 momentum_dir = momentum.normalized(); double momentum_abs = momentum.norm(); Acts::CurvilinearTrackParameters InitTrackParam(posTime, momentum_dir, momentum_abs, charge, std::make_optional(std::move(cov))); // the surface which the production point is bound to - Acts::Vector3D center(0, 0, pPos.z()); - Acts::Vector3D normal(0, 0, 1); + Acts::Vector3 center(0, 0, pPos.z()); + Acts::Vector3 normal(0, 0, 1); std::shared_ptr<const Acts::Surface> initSurface = Acts::Surface::makeShared<Acts::PlaneSurface>(center, normal); // extrapolate the particle from production point to the first layer const Acts::Vector4D truthPosTime (pPos.x(), pPos.y(), pPos.z(), time); - const Acts::Vector3D truthMomentum_dir = pMom.normalized(); + const Acts::Vector3 truthMomentum_dir = pMom.normalized(); double truthMomentum_abs = pMom.norm(); Acts::BoundTrackParameters startParameters(initSurface, geoctx, truthPosTime, truthMomentum_dir, truthMomentum_abs, charge, std::nullopt); auto truthParam = m_extrapolationTool->propagate(Gaudi::Hive::currentContext(), startParameters, *pSurface); @@ -384,7 +385,7 @@ StatusCode FaserActsKalmanFilterAlg::execute() // Construct a perigee surface as the target surface //auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>( - // Acts::Vector3D{0., 0., 0.}); + // Acts::Vector3{0., 0., 0.}); // Set the KalmanFitter options std::unique_ptr<const Acts::Logger> logger = Acts::getDefaultLogger("KalmanFitter", Acts::Logging::VERBOSE); @@ -788,10 +789,10 @@ void FaserActsKalmanFilterAlg::fillFitResult( Acts::Vector2D local(meas.parameters()[Acts::eBoundLoc0], meas.parameters()[Acts::eBoundLoc1]); /// Get global position - Acts::Vector3D global(0, 0, 0); + Acts::Vector3 global(0, 0, 0); /// This is an arbitrary vector. Doesn't matter in coordinate transformation /// in Acts code - Acts::Vector3D mom(1, 1, 1); + Acts::Vector3 mom(1, 1, 1); global = meas.referenceObject().localToGlobal(geoctx, local, mom); /// Get measurement covariance diff --git a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/CMakeLists.txt b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/CMakeLists.txt index db96f84e33f1e1d08076b14bed9ca553eab71aef..d0954eca41a083ba4f26d5af8855597c34c26f73 100644 --- a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/CMakeLists.txt +++ b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/CMakeLists.txt @@ -10,7 +10,7 @@ atlas_subdir( VTI12GeometrySystems ) find_package( CLHEP ) find_package( Coin3D ) find_package( Qt5 COMPONENTS Core Gui Widgets Sql ) -find_package( GeoModelCore ) +find_package( GeoModel ) if( APPLE ) find_package(OpenGL REQUIRED) endif() @@ -33,9 +33,9 @@ set( CMAKE_AUTORCC ON ) atlas_add_library( VTI12GeometrySystems VTI12GeometrySystems/*.h src/*.cxx PUBLIC_HEADERS VTI12GeometrySystems - INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} + INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${COIN3D_LIBRARIES} ${GEOMODELCORE_LIBRARIES} TruthUtils xAODTruth VP1Base GL Qt5::Core Qt5::Widgets - PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelUtilities GeoModelFaserUtilities VP1HEPVis VTI12Utils Qt5::Gui ) + LINK_LIBRARIES ${COIN3D_LIBRARIES} ${GEOMODEL_LIBRARIES} TruthUtils xAODTruth VP1Base GL Qt5::Core Qt5::Widgets + PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelFaserUtilities VP1HEPVis VTI12Utils Qt5::Gui ) diff --git a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/VTI12GeometrySystems/VP1GeometrySystem.h b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/VTI12GeometrySystems/VP1GeometrySystem.h index 15017454c9684025a0201a810549b5566783ade5..224e2d5f015f9f6b3ebaa454d9bc9330a48fc7e6 100644 --- a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/VTI12GeometrySystems/VP1GeometrySystem.h +++ b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/VTI12GeometrySystems/VP1GeometrySystem.h @@ -40,8 +40,6 @@ public: //Method that channel can use to override defaults: void setGeometrySelectable(bool); void setZoomToVolumeOnClick(bool); - void setOrientViewToMuonChambersOnClick(bool); - QWidget * buildController(); @@ -53,11 +51,8 @@ public: QByteArray saveState(); void restoreFromState(QByteArray); - void enableMuonChamberLabels(bool, bool);//!< first is t0s, 2nd is hits signals: - void appropriateMDTProjectionsChanged(int);//To give hints to prd/track/segment systems about - //0: No projections, 1: Project to end of tubes, 2: Project to end of chamber volume. void plotSpectrum(QStack<QString>&, int copyNumber=-1); // Send information about selected volume to the VP1UtilitySystems::PartSpectSystem //The stack represents the path to the selected volume. The entries of this patch have form Volname::CopyNo //The Volname is either physical volume name, or, in case the former is absent, the logical volume name diff --git a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/VTI12GeometrySystems/VolumeHandle.h b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/VTI12GeometrySystems/VolumeHandle.h index 8ea6993589ae0ba38b8957830b84de74b0cdc424..5642fdfca940f4f97c362e4d784b251ff28814fb 100644 --- a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/VTI12GeometrySystems/VolumeHandle.h +++ b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/VTI12GeometrySystems/VolumeHandle.h @@ -22,18 +22,8 @@ class GeoMaterial; class VolumeHandle { public: - enum MuonChamberState { NONMUONCHAMBER,//Default - MUONCHAMBERCHILD,//Top-level parent is muon chamber - MUONCHAMBER,//Muon chamber, adjusted to event data - MUONCHAMBER_DIRTY };//Muon chamber, not adjusted to event data - inline bool isInMuonChamber() const;//Muon chamber volume or muon chamber offspring - inline bool isMuonChamber() const;//Muon chamber volume (top-level volume) - inline void setMuonChamberDirty(bool);//Don't call unless isMuonChamber() - inline bool muonChamberDirty() const;//if is a muon chamber volume which is dirty - inline MuonChamberState muonChamberState() const; - VolumeHandle(VolumeHandleSharedData * ,VolumeHandle * parent, const GeoPVConstLink&,int childNumber, - const MuonChamberState& mcs = NONMUONCHAMBER, const SbMatrix& accumTrans = SbMatrix() ); + const SbMatrix& accumTrans = SbMatrix() ); virtual ~VolumeHandle();//lots of stuff to do here! //Used (recursively) upon deletion (never delete before children are deleted). @@ -111,7 +101,6 @@ public: // For labels virtual QString getDescriptiveName() const; - virtual QString muonChamberT0(unsigned int=0) const; public: class Imp;//For once this is declared public. This is to avoid @@ -127,7 +116,6 @@ private: //Here for inline methods: const int m_childNumber;//0 if the first child of parent, 1 if the second, etc. const unsigned m_nchildren;//cached for efficiency. - MuonChamberState m_muonChamberState; VolumeHandle * m_parent; VolumeHandleList m_children; @@ -151,11 +139,6 @@ inline unsigned VolumeHandle::nChildren() const { return m_nchildren; } inline VolumeHandle * VolumeHandle::child(int index) const { return m_children.at(index); } inline int VolumeHandle::childNumber() const { return m_childNumber; } inline VP1GeoFlags::VOLSTATE VolumeHandle::state() const { return m_state; } -inline bool VolumeHandle::isInMuonChamber() const { return m_muonChamberState!=NONMUONCHAMBER; } -inline bool VolumeHandle::isMuonChamber() const { return m_muonChamberState==MUONCHAMBER || m_muonChamberState==MUONCHAMBER_DIRTY; } -inline VolumeHandle::MuonChamberState VolumeHandle::muonChamberState() const { return m_muonChamberState; } -inline void VolumeHandle::setMuonChamberDirty(bool b) { if (isMuonChamber()) m_muonChamberState = b?MUONCHAMBER_DIRTY:MUONCHAMBER; } -inline bool VolumeHandle::muonChamberDirty() const { return m_muonChamberState==MUONCHAMBER_DIRTY; } inline void VolumeHandle::reset() { setState( VP1GeoFlags::CONTRACTED ); contractDaughtersRecursively(); @@ -166,9 +149,4 @@ inline QString VolumeHandle::getDescriptiveName() const { return name; } -inline QString VolumeHandle::muonChamberT0(unsigned int /**i*/) const { - return QString(); -} - - #endif diff --git a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VP1GeoTreeView.cxx b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VP1GeoTreeView.cxx index 84d1bc4be08a3513af412e4df1d0c4337db71094..ff383c6167b5e4686718a0578b35a658abeeefb2 100644 --- a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VP1GeoTreeView.cxx +++ b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VP1GeoTreeView.cxx @@ -66,5 +66,6 @@ void VP1GeoTreeView::scheduleUpdateOfAllNonHiddenIndices() { if (m_d->updatescheduled) return; + m_d->updatescheduled = true; QTimer::singleShot(0, this, SLOT(updateAllNonHiddenIndices())); } diff --git a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VP1GeometrySystem.cxx b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VP1GeometrySystem.cxx index 64f40c1ce43053364999abeeddc7d118ecc4bd20..31252be92ee66a900cf4c9209633432249b63409 100644 --- a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VP1GeometrySystem.cxx +++ b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VP1GeometrySystem.cxx @@ -47,7 +47,7 @@ #include "GeoModelKernel/GeoVolumeCursor.h" #include "GeoModelKernel/GeoPrintGraphAction.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #ifndef BUILDVP1LIGHT #include "VTI12Utils/VP1JobConfigInfo.h" @@ -88,7 +88,6 @@ public: class SubSystemInfo { public: // "geomodellocation" contains name of tree tops, - // or possible a bit more complex info in case of muons. SubSystemInfo( QCheckBox* cb,const QRegExp& the_geomodeltreetopregexp, bool the_negatetreetopregexp, const QRegExp& the_geomodelchildrenregexp, bool the_negatechildrenregexp, VP1GeoFlags::SubSystemFlag the_flag, const std::string& the_matname, @@ -852,9 +851,8 @@ void VP1GeometrySystem::Imp::buildSystem(SubSystemInfo* si) controller->zappedVolumeListModel(),controller->volumeTreeBrowser(), m_textSep); SbMatrix matr; VP1LinAlgUtils::transformToMatrix(it->xf,matr); - VolumeHandle * vh = new VolumeHandle(volhandle_subsysdata,0,it->pV,ichild++,VolumeHandle::NONMUONCHAMBER,matr); + VolumeHandle * vh = new VolumeHandle(volhandle_subsysdata,0,it->pV,ichild++,matr); si->vollist.push_back(vh); - // std::cout<<"Non muon chamber VH="<<vh<<std::endl; } } else { //Loop over the children of the physical volumes of the treetops that we previously selected: @@ -892,8 +890,7 @@ void VP1GeometrySystem::Imp::buildSystem(SubSystemInfo* si) // si->dump(); // std::cout<<"---"<<std::endl; - vh = new VolumeHandle(volhandle_subsysdata,0,pVD,ichild++, - VolumeHandle::NONMUONCHAMBER,matr); + vh = new VolumeHandle(volhandle_subsysdata,0,pVD,ichild++,matr); // std::cout<<"Does not have muon chamber (weird one) VH="<<vh<<std::endl; // DEBUG diff --git a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VisAttributes.cxx b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VisAttributes.cxx index 7cf8c316e1ec9b82cf4669f411fe06d46680fec1..44621c5f4bce1ec72301bf43fd8a96e34b25524d 100644 --- a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VisAttributes.cxx +++ b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VisAttributes.cxx @@ -183,7 +183,7 @@ DetVisAttributes::DetVisAttributes() { { SoMaterial *material = new SoMaterial; material->ambientColor.setValue(0, .157811, .187004); - material->diffuseColor.setValue(1, 0, 0); + material->diffuseColor.setValue(0.5, 0, 0.1); material->specularColor.setValue(.915152, .915152, .915152); material->shininess.setValue(0.642424); @@ -436,6 +436,7 @@ MatVisAttributes::MatVisAttributes() { add("Lead",m); add("Thinabs",m); add("Thickabs",m); + add("_dd_Materials_Ecal_EcalPb",m); } { @@ -455,6 +456,9 @@ MatVisAttributes::MatVisAttributes() { m->specularColor.setValue(0.963636, 0.963636, 0.963636); m->shininess.setValue(0.981818); add("Scintillator",m); + add("_dd_Materials_Ecal_EcalSc", m); + add("_dd_Materials_Ecal_EcalFiber", m); + add("_dd_Materials_Ecal_EcalFiberPb", m); } { @@ -464,6 +468,8 @@ MatVisAttributes::MatVisAttributes() { m->specularColor.setValue(0.981818, 0.981818, 0.981818); m->shininess.setValue(0.721212); add("Epoxy",m); + add("_dd_Materials_Ecal_EcalPlasticBC", m); + add("_dd_Materials_Ecal_EcalPlasticOutFC", m); } { @@ -473,6 +479,7 @@ MatVisAttributes::MatVisAttributes() { m->specularColor.setValue(0.168, 0.168, 0.168); m->shininess.setValue(0.153696); add("Stainless",m); + add("_dd_Materials_Ecal_EcalSteel",m); } { // Liquid Argon diff --git a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VolumeHandle.cxx b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VolumeHandle.cxx index 1d0c3e800f00bd742ca87f2669f455fe24f3364b..47d82a9672fcb12609f835ba7212f3767b75183f 100644 --- a/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VolumeHandle.cxx +++ b/graphics/VTI12/VTI12Systems/VTI12GeometrySystems/src/VolumeHandle.cxx @@ -89,8 +89,8 @@ QDataStream & operator>> ( QDataStream & in, VolumeHandle::Imp::VolState & vs ) } //____________________________________________________________________ -VolumeHandle::VolumeHandle(VolumeHandleSharedData * cd,VolumeHandle * parent, const GeoPVConstLink& pV, int childNumber, const MuonChamberState& mcs, const SbMatrix& accumTrans) - : m_d(new Imp(cd,pV,accumTrans)), m_childNumber(childNumber), m_nchildren(childNumber>=0?pV->getNChildVols():0), m_muonChamberState(mcs), m_parent(parent), +VolumeHandle::VolumeHandle(VolumeHandleSharedData * cd,VolumeHandle * parent, const GeoPVConstLink& pV, int childNumber, const SbMatrix& accumTrans) + : m_d(new Imp(cd,pV,accumTrans)), m_childNumber(childNumber), m_nchildren(childNumber>=0?pV->getNChildVols():0), m_parent(parent), m_state(VP1GeoFlags::CONTRACTED) { // std::cout<<"VolumeHandle ctor for "<<this<<" with parent="<<parent<<" and GeoPVConstLink @"<<&pV<<std::endl; @@ -145,7 +145,7 @@ void VolumeHandle::initialiseChildren() SbMatrix matr; VP1LinAlgUtils::transformToMatrix(Amg::EigenTransformToCLHEP(av.getTransform()), matr); matr.multRight(m_d->accumTrans); - m_children.push_back(new VolumeHandle(m_d->commondata,this,av.getVolume(),ichild++,(isInMuonChamber()?MUONCHAMBERCHILD:NONMUONCHAMBER),matr)); + m_children.push_back(new VolumeHandle(m_d->commondata,this,av.getVolume(),ichild++,matr)); //std::cout << "initialised: " << av.getName() << " - " << m_children.back()->getName().toStdString() << " - " << m_children.back() << std::endl; av.next(); } @@ -347,13 +347,6 @@ void VolumeHandle::setState( const VP1GeoFlags::VOLSTATE& state ) if (m_state==state) return; - //Mark muon chamber as dirty. - if (isInMuonChamber()) { - VolumeHandle *tp = topLevelParent(); - if (tp->m_muonChamberState == MUONCHAMBER) - tp->m_muonChamberState = MUONCHAMBER_DIRTY; - } - //Update state flag and presence in GUI lists: VP1GeoFlags::VOLSTATE oldstate = m_state; m_state = state; @@ -506,7 +499,7 @@ const GeoMaterial * VolumeHandle::geoMaterial() const { //____________________________________________________________________ bool VolumeHandle::isEther() const { - return !isMuonChamber() && QString(geoMaterial()->getName().c_str()).endsWith("Ether"); + return QString(geoMaterial()->getName().c_str()).endsWith("Ether"); } //____________________________________________________________________ @@ -683,29 +676,6 @@ void VolumeHandle::updateLabels() { text << name; } - // only one label selected - must be better way to do this! - bool singleLabel = (labels&0x2 && !(labels&0x4) && !(labels&0x8)) - || (labels&0x4 && !(labels&0x2) && !(labels&0x8)) - || (labels&0x8 && !(labels&0x2) && !(labels&0x4)); - if (isInMuonChamber() && labels&0xE){ - for (unsigned int i=0; i<3 ;++i){ - // Check to see which label we use. - unsigned int mask=1<<(i+1); - if (!(labels&mask)) continue; // bits 1,2,3 are used for labels - - QString output; - if ( singleLabel ) { - output+="t0="; - } else { - if (i==0) output+="Moore t0="; - if (i==1) output+="Mboy t0="; - if (i==2) output+="<unknown>="; - } - output += muonChamberT0(i); - text << output; - } - } - unsigned int row=0; foreach(QString str, text){ QByteArray array = str.toLatin1(); diff --git a/graphics/VTI12/VTI12Systems/VTI12RawDataSystems/CMakeLists.txt b/graphics/VTI12/VTI12Systems/VTI12RawDataSystems/CMakeLists.txt index 6003a0b4ffe66ca2b4bae5e918819a6473862ffe..74282987d83190a4ff3d55799a33d8e903a87755 100644 --- a/graphics/VTI12/VTI12Systems/VTI12RawDataSystems/CMakeLists.txt +++ b/graphics/VTI12/VTI12Systems/VTI12RawDataSystems/CMakeLists.txt @@ -9,7 +9,7 @@ atlas_subdir( VTI12RawDataSystems ) find_package( Coin3D ) find_package( Eigen ) find_package( Qt5 COMPONENTS Core Gui Widgets ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Generate UI files automatically: set( CMAKE_AUTOUIC TRUE ) @@ -24,8 +24,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # Component(s) in the package: atlas_add_library( VTI12RawDataSystems VTI12RawDataSystems/*.h src/*.h src/*.cxx src/*.qrc PUBLIC_HEADERS VTI12RawDataSystems - INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoPrimitives VP1Base GL - PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${GEOMODELCORE_LIBRARIES} EventPrimitives GaudiKernel TrackerIdentifier TrackerReadoutGeometry TrackerRawData VP1HEPVis VTI12Utils ) + PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${GEOMODEL_LIBRARIES} EventPrimitives GaudiKernel TrackerIdentifier TrackerReadoutGeometry TrackerRawData VP1HEPVis VTI12Utils ) diff --git a/graphics/VTI12/VTI12Systems/VTI12RawDataSystems/src/VP1RawDataHandle_SCT_RDO.cxx b/graphics/VTI12/VTI12Systems/VTI12RawDataSystems/src/VP1RawDataHandle_SCT_RDO.cxx index 8f7669a4cfaccefb921a06926020cf7400a6abb9..8e03efa0304a2ed7a25fc0e851865d5bff52d2d2 100644 --- a/graphics/VTI12/VTI12Systems/VTI12RawDataSystems/src/VP1RawDataHandle_SCT_RDO.cxx +++ b/graphics/VTI12/VTI12Systems/VTI12RawDataSystems/src/VP1RawDataHandle_SCT_RDO.cxx @@ -23,7 +23,6 @@ #include "TrackerReadoutGeometry/SCT_DetectorManager.h" #include "TrackerReadoutGeometry/SiDetectorElement.h" -//#include "InDetReadoutGeometry/InDetReadoutGeometry/SCT_ModuleSideDesign.h" // old CMT #include "TrackerReadoutGeometry/SCT_ModuleSideDesign.h" // new CMake #include "TrackerRawData/FaserSCT_RDORawData.h" diff --git a/graphics/VTI12/VTI12Systems/VTI12SimHitSystems/CMakeLists.txt b/graphics/VTI12/VTI12Systems/VTI12SimHitSystems/CMakeLists.txt index 36394224bad28bb9cb84ee69c4fffeacac579168..bcb9cacd1fcd55200b78edde0f2399d024642248 100644 --- a/graphics/VTI12/VTI12Systems/VTI12SimHitSystems/CMakeLists.txt +++ b/graphics/VTI12/VTI12Systems/VTI12SimHitSystems/CMakeLists.txt @@ -24,5 +24,5 @@ atlas_add_library( VTI12SimHitSystems VTI12SimHitSystems/*.h src/*.h src/*.cxx s PUBLIC_HEADERS VTI12SimHitSystems PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} LINK_LIBRARIES VP1Base Qt5::Core Qt5::Widgets GL StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${EIGEN_LIBRARIES} GeoAdaptors GeoPrimitives ScintSimEvent TrackerSimEvent VTI12Utils ) + PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${EIGEN_LIBRARIES} FaserGeoAdaptors GeoPrimitives ScintSimEvent FaserCaloSimEvent TrackerSimEvent VTI12Utils ) diff --git a/graphics/VTI12/VTI12Systems/VTI12SimHitSystems/src/VP1SimHitSystem.cxx b/graphics/VTI12/VTI12Systems/VTI12SimHitSystems/src/VP1SimHitSystem.cxx index 3ac3e5063293a14e642f450dbe39fbdac333e86a..60a7cda9735e87ec9f62eca4bbc7839c541206df 100755 --- a/graphics/VTI12/VTI12Systems/VTI12SimHitSystems/src/VP1SimHitSystem.cxx +++ b/graphics/VTI12/VTI12Systems/VTI12SimHitSystems/src/VP1SimHitSystem.cxx @@ -19,12 +19,13 @@ #include <Inventor/nodes/SoPointSet.h> #include <Inventor/SbColor.h> +#include "FaserCaloSimEvent/CaloHitCollection.h" #include "ScintSimEvent/ScintHitCollection.h" -#include "GeoAdaptors/GeoScintHit.h" +#include "FaserGeoAdaptors/GeoScintHit.h" #include "TrackerSimEvent/FaserSiHitCollection.h" -// #include "InDetSimEvent/TRTUncompressedHitCollection.h" -// #include "GeoAdaptors/GeoTRTUncompressedHit.h" -#include "GeoAdaptors/GeoFaserSiHit.h" +#include "FaserGeoAdaptors/GeoFaserSiHit.h" +#include "FaserGeoAdaptors/GeoFaserCaloHit.h" + #include "VTI12Utils/VP1SGContentsHelper.h" @@ -241,6 +242,25 @@ void VP1SimHitSystem::buildHitTree(const QString& detector) else message("Unable to retrieve Preshower Hits"); } + else if(detector=="Ecal" || detector =="Calorimeter") + { + // + // Ecal: + // + const DataHandle<CaloHitCollection> t_collection; + if(sg->retrieve(t_collection,"EcalHits")==StatusCode::SUCCESS) + { + for(CaloHitConstIterator i_hit=t_collection->begin();i_hit!=t_collection->end();++i_hit) + { + GeoFaserCaloHit ghit(*i_hit); + if(!ghit) continue; + Amg::Vector3D u = Amg::Hep3VectorToEigen(ghit.getGlobalPosition()); + hitVtxProperty->vertex.set1Value(hitCount++,u.x(),u.y(), u.z() ); + } + } + else + message("Unable to retrieve Ecal Hits"); + } else if (detector=="Tracker") { const FaserSiHitCollection* p_collection = nullptr; diff --git a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/CMakeLists.txt b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/CMakeLists.txt index 76da90929f8e89b9510fa893b111cf465179a68a..8c6fd2c60e1c9893fb2e7ed17e52f8c7c4f335f9 100644 --- a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/CMakeLists.txt +++ b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/CMakeLists.txt @@ -10,7 +10,7 @@ atlas_subdir( VTI12TrackSystems ) find_package( CLHEP ) find_package( Coin3D ) find_package( Qt5 COMPONENTS Core Gui Widgets ) -find_package( GeoModelCore ) +find_package( GeoModel ) # Generate UI files automatically: # Note: add the "Widgets" component to "find_package( Qt5 ...)" if you have UI files, otherwise UIC, even if CMAKE_AUTOUIC is set to ON, is not run @@ -23,7 +23,7 @@ atlas_add_library( VTI12TrackSystems VTI12TrackSystems/*.h src/*.cxx PUBLIC_HEADERS VTI12TrackSystems PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} - LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GeoPrimitives Identifier + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} GeoPrimitives Identifier #xAODTracking GaudiKernel GeneratorObjects TrkDetDescrInterfaces TrkSurfaces TrkEventPrimitives TrkParameters VP1Base VTI12Utils StoreGateLib SGtests @@ -32,12 +32,12 @@ atlas_add_library( VTI12TrackSystems VTI12TrackSystems/*.h src/*.cxx AtlasHepMCLib AthContainers FaserDetDescr EventPrimitives ScintIdentifier ScintSimEvent ScintReadoutGeometry TrackerIdentifier TrackerReadoutGeometry TrackerSimEvent + FaserCaloIdentifier CaloReadoutGeometry FaserCaloSimEvent #InDetPrepRawData InDetRIO_OnTrack Particle TrkDetDescrUtils TrkDetElementBase TrkVolumes TrkCompetingRIOsOnTrack TrkMaterialOnTrack TrkMeasurementBase TrkPrepRawData TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkSegment TrkTrack TrkTrackSummary TrkExInterfaces TrkFitterInterfaces VP1HEPVis - VP1GuideLineSystems #VP1PRDSystems ) diff --git a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/VTI12TrackSystems/SimHitHandle_CaloHit.h b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/VTI12TrackSystems/SimHitHandle_CaloHit.h new file mode 100644 index 0000000000000000000000000000000000000000..3a20aec970e2b15be2f2563d4428e44517d5a694 --- /dev/null +++ b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/VTI12TrackSystems/SimHitHandle_CaloHit.h @@ -0,0 +1,50 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + + +//////////////////////////////////////////////////////////////// +// // +// Header file for class SimHitHandle_CaloHit // +// // +// Description: Handle for CaloHit's // +// // +// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) // +// Initial version: March 2008 // +// // +//////////////////////////////////////////////////////////////// + +#ifndef SIMHITHANDLE_CALOHIT_H +#define SIMHITHANDLE_CALOHIT_H + +#include "VTI12TrackSystems/SimHitHandleBase.h" + +#include "GeoPrimitives/GeoPrimitives.h" +#include "TrkParameters/TrackParameters.h" + +class CaloHit; +class SimHitHandle_CaloHit : public SimHitHandleBase { +public: + + SimHitHandle_CaloHit( const CaloHit * ); + virtual ~SimHitHandle_CaloHit(); + + QString type() const { return "CaloHit"; }; + + Amg::Vector3D momentumDirection() const; + Amg::Vector3D posStart() const; + Amg::Vector3D posEnd() const; + double hitTime() const; + + const HepMcParticleLink& particleLink() const; + + Trk::TrackParameters * createTrackParameters() const; + +private: + + class Imp; + Imp * m_d; + +}; + +#endif diff --git a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/VTI12TrackSystems/TrackHandleBase.h b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/VTI12TrackSystems/TrackHandleBase.h index bd8e9905eaf289118dc6cf83789ab265bbbf6faf..af1985583ddd4ead227901aca0586270e8b20c83 100644 --- a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/VTI12TrackSystems/TrackHandleBase.h +++ b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/VTI12TrackSystems/TrackHandleBase.h @@ -74,8 +74,8 @@ public: virtual QStringList clicked() const = 0; virtual Amg::Vector3D momentum() const { return Amg::Vector3D(0,0,0); } - virtual const Amg::Vector3D * startPoint() const;//!< returns 0 if can't find start point. - virtual const Amg::Vector3D * endPoint() const;//!< returns 0 if can't find start point. + virtual std::optional<Amg::Vector3D> startPoint() const;//!< returns 0 if can't find start point. + virtual std::optional<Amg::Vector3D> endPoint() const;//!< returns 0 if can't find start point. virtual int pdgCode() const { return 0; }//!< 0 means unknown //Default implementation of the following two methods will based on diff --git a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/SimHitHandle_CaloHit.cxx b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/SimHitHandle_CaloHit.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c676125b4ab261fe3d8bdbaa91e31f3c11ad29c6 --- /dev/null +++ b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/SimHitHandle_CaloHit.cxx @@ -0,0 +1,168 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + + +//////////////////////////////////////////////////////////////// +// // +// Implementation of class SimHitHandle_CaloHit // +// // +// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) // +// Initial version: March 2008 // +// // +//////////////////////////////////////////////////////////////// + +#include "VTI12TrackSystems/SimHitHandle_CaloHit.h" +#include "VP1Base/VP1Msg.h" +#include "VTI12Utils/VP1DetInfo.h" +#include "VTI12Utils/VP1ParticleData.h" + +#include "FaserCaloSimEvent/CaloHit.h" +#include "CaloReadoutGeometry/CaloDetectorElement.h" +#include "CaloReadoutGeometry/EcalDetectorManager.h" +// #include "CaloReadoutGeometry/TriggerDetectorManager.h" +// #include "CaloReadoutGeometry/PreshowerDetectorManager.h" +#include "FaserCaloIdentifier/EcalID.h" +// #include "CaloIdentifier/TriggerID.h" +// #include "CaloIdentifier/PreshowerID.h" +#include "VTI12TrackSystems/VP1TrackSanity.h" + +//____________________________________________________________________ +class SimHitHandle_CaloHit::Imp { +public: + Imp( const CaloHit * h ) : thehit(h),detelem(0) {} + const CaloHit * thehit; + mutable const CaloDD::CaloDetectorElement * detelem; + bool ensureDetElemInit() const; + Amg::Vector3D localToGlobal(const HepGeom::Point3D<double>&) const; +}; + + +//____________________________________________________________________ +SimHitHandle_CaloHit::SimHitHandle_CaloHit(const CaloHit * h) + : SimHitHandleBase(), m_d(new Imp(h)) +{ + if (!h) + VP1Msg::message("SimHitHandle_CaloHit constructor ERROR: Received null hit pointer"); +} + +//____________________________________________________________________ +SimHitHandle_CaloHit::~SimHitHandle_CaloHit() +{ + delete m_d; +} + +//____________________________________________________________________ +bool SimHitHandle_CaloHit::Imp::ensureDetElemInit() const +{ + if (detelem) + return true; + int Row = thehit->getRow(); + + Identifier id = VP1DetInfo::ecalIDHelper()->module_id( Row, thehit->getModule() ); + //fixme: id is_valid ? + detelem = VP1DetInfo::ecalDetMgr()->getDetectorElement(id); + // } else if (theHit->isTrigger()) { + // Identifier id = VP1DetInfo::triggerIDHelper()->plate_id( Station, + // thehit->getPlate() ); + // //fixme: id is_valid ? + // detelem = VP1DetInfo::triggerDetMgr()->getDetectorElement(id); + // } else if (theHit->isPreshower()) { + // Identifier id = VP1DetInfo::preshowerIDHelper()->plate_id( Station, + // thehit->getPlate() ); + // } + //Fixme : Handle case where detelem can not be found gracefully. And check pointers from VP1DetInfo!! + if (!detelem) + VP1Msg::messageDebug("SimHitHandle_CaloHit ERROR: Could not get detector element for hit!"); + return detelem!=0; +} + +//____________________________________________________________________ +Amg::Vector3D SimHitHandle_CaloHit::momentumDirection() const +{ + if (VP1Msg::verbose()&&m_d->thehit->localEndPosition()==m_d->thehit->localStartPosition()) + VP1Msg::messageVerbose("SimHitHandle_CaloHit::momentumDirection() ERROR: posStart()==posEnd()"); + return (posEnd()-posStart()).unit(); +} + +//____________________________________________________________________ +Amg::Vector3D SimHitHandle_CaloHit::Imp::localToGlobal( const HepGeom::Point3D<double>& local ) const +{ + if (!ensureDetElemInit()) + return Amg::Vector3D(0,0,0); + return Amg::Vector3D(Amg::EigenTransformToCLHEP(detelem->transformHit()) * local); +} + +//____________________________________________________________________ +Amg::Vector3D SimHitHandle_CaloHit::posStart() const +{ + return m_d->localToGlobal(m_d->thehit->localStartPosition()); +} + +//____________________________________________________________________ +Amg::Vector3D SimHitHandle_CaloHit::posEnd() const +{ + return m_d->localToGlobal(m_d->thehit->localEndPosition()); +} + +//____________________________________________________________________ +double SimHitHandle_CaloHit::hitTime() const +{ + return m_d->thehit->meanTime(); +} + +//____________________________________________________________________ +const HepMcParticleLink& SimHitHandle_CaloHit::particleLink() const +{ + return m_d->thehit->particleLink(); +} + +//____________________________________________________________________ +Trk::TrackParameters * SimHitHandle_CaloHit::createTrackParameters() const +{ + //Find charge and magnitude of momentum: + double c; + if ( !hasCharge() ) { + bool ok; + c = VP1ParticleData::particleCharge(pdg(),ok); + if (!ok) { + VP1Msg::message("SimHitHandle_CaloHit::createTrackParameters ERROR: Could not find particle charge (pdg=" + +QString::number(pdg())+"). Assuming charge=+1."); + c = +1.0; + } else { + if (VP1Msg::verbose()) + VP1Msg::messageVerbose("Looked up particle charge for scintillator simhit with pdg code "+VP1Msg::str(pdg())+": "+VP1Msg::str(c)); + } + const_cast<SimHitHandle_CaloHit*>(this)->setCharge(c); + } else { + c = charge(); + } + + double mom = momentum(); + if (mom<=0) { + VP1Msg::message("SimHitHandle_CaloHit::createTrackParameters ERROR: Unknown momentum. Using 1 GeV"); + mom = 1*CLHEP::GeV; + } + + ////We could in principle get a surface like this: + // if (!m_d->ensureDetElemInit()) { + // VP1Msg::messageDebug("SimHitHandle_CaloHit WARNING: Could not get detector element!"); + // return 0; + // } + // const Trk::PlaneSurface * surf + // = dynamic_cast<const Trk::PlaneSurface *>( &(m_d->detelem->surface())); + // if (!surf) { + // VP1Msg::message("SimHitHandle_CaloHit::createTrackParameters ERROR: could not get Trk::PlaneSurface"); + // return 0; + // } + ////And then proceed to construct a new AtaPlane parameter with that + ////surface. However, that gives some problems, so instead we simply + ////create a perigee: + + const Amg::Vector3D globpos = posStart(); + +// const Trk::GlobalMomentum u(momentumDirection()); + const Amg::Vector3D u(momentumDirection()); + + return new Trk::Perigee(0, 0, u.phi(), u.theta(), c/mom, globpos); +} diff --git a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackCollHandleBase.cxx b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackCollHandleBase.cxx index 3b55a54922aeb41d8655cb97cba5ffdc508923e0..f36256e23acf7d939432d9f84308cbed0319c8df 100644 --- a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackCollHandleBase.cxx +++ b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackCollHandleBase.cxx @@ -21,7 +21,7 @@ #include "VTI12TrackSystems/TrackCollectionSettingsButton.h" #include "VP1Base/VP1ExtraSepLayerHelper.h" -#include "VP1Utils/VP1LinAlgUtils.h" +#include "VTI12Utils/VP1LinAlgUtils.h" #include "VP1Base/IVP13DSystem.h" #include "VP1Base/VP1QtInventorUtils.h" #include "VP1Base/VP1Serialise.h" diff --git a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackCollHandle_TruthTracks.cxx b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackCollHandle_TruthTracks.cxx index 222b15debe036aaf9fbd7b1a7acba2c47ebcbab9..05c3f75b3b7ffa76bfb55539930a8331507469ed 100644 --- a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackCollHandle_TruthTracks.cxx +++ b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackCollHandle_TruthTracks.cxx @@ -18,6 +18,7 @@ #include "VTI12TrackSystems/SimHitHandle_TrackRecord.h" #include "VTI12TrackSystems/SimHitHandle_ScintHit.h" #include "VTI12TrackSystems/SimHitHandle_FaserSiHit.h" +#include "VTI12TrackSystems/SimHitHandle_CaloHit.h" #include "VTI12TrackSystems/SimBarCode.h" #include "VTI12TrackSystems/TrackSystemController.h" #include "VP1Base/IVP1System.h" @@ -37,6 +38,7 @@ #include "ScintSimEvent/ScintHitCollection.h" #include "TrackerSimEvent/FaserSiHitCollection.h" +#include "FaserCaloSimEvent/CaloHitCollection.h" #include "CLHEP/Units/PhysicalConstants.h" @@ -67,6 +69,7 @@ public: static SimHitHandleBase * createHitHandle( const TrackRecord& h ) { return new SimHitHandle_TrackRecord(&h); } static SimHitHandleBase * createHitHandle( const ScintHit& h ) { return new SimHitHandle_ScintHit(&h); } static SimHitHandleBase * createHitHandle( const FaserSiHit& h ) { return new SimHitHandle_FaserSiHit(&h); } + static SimHitHandleBase * createHitHandle( const CaloHit& h) { return new SimHitHandle_CaloHit(&h); } static QString nameHepMCAugmentedEnd; static QString nameAugmentedOnly; @@ -114,7 +117,7 @@ QStringList TrackCollHandle_TruthTracks::availableCollections( IVP1System*sys ) QStringList mcevent_keys = sgcont.getKeys<McEventCollection>(); QStringList trackrecord_keys = sgcont.getKeys<TrackRecordCollection>(); - QStringList keys_siliconhits,keys_scintillatorhits; + QStringList keys_siliconhits,keys_scintillatorhits,keys_calorimeterhits; if (VP1JobConfigInfo::hasVetoGeometry() || VP1JobConfigInfo::hasTriggerGeometry() || @@ -122,6 +125,8 @@ QStringList TrackCollHandle_TruthTracks::availableCollections( IVP1System*sys ) keys_scintillatorhits = sgcont.getKeys<ScintHitCollection>();//"VetoHits", "TriggerHits" and "PreshowerHits" if (VP1JobConfigInfo::hasSCTGeometry()) keys_siliconhits = sgcont.getKeys<FaserSiHitCollection>();//"SCT_Hits" + if (VP1JobConfigInfo::hasEcalGeometry()) + keys_calorimeterhits = sgcont.getKeys<CaloHitCollection>(); bool extrainfo = ! ( keys_scintillatorhits.empty() && keys_siliconhits.empty() && @@ -257,6 +262,8 @@ bool TrackCollHandle_TruthTracks::Imp::loadHitLists(std::map<SimBarCode,SimHitLi addHitCollections<ScintHitCollection>(hitLists); if (VP1JobConfigInfo::hasSCTGeometry()) addHitCollections<FaserSiHitCollection>(hitLists); + if (VP1JobConfigInfo::hasEcalGeometry()) + addHitCollections<CaloHitCollection>(hitLists); if (VP1Msg::verbose()) theclass->messageVerbose( "Found " + str( hitLists.size() ) + " lists of sim. hits."); diff --git a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackHandleBase.cxx b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackHandleBase.cxx index 96f1ce6eaf10fb324185c7e3c1a2616aca6a1bb2..be99be51812f3a25848b52255256d4962169c07d 100644 --- a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackHandleBase.cxx +++ b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/TrackHandleBase.cxx @@ -1385,7 +1385,7 @@ QStringList TrackHandleBase::baseInfo() const } //____________________________________________________________________ -const Amg::Vector3D * TrackHandleBase::startPoint() const +std::optional<Amg::Vector3D> TrackHandleBase::startPoint() const { m_d->ensureLoadPathInfo(); if (m_d->pathInfo_TrkTrack) { @@ -1395,17 +1395,17 @@ const Amg::Vector3D * TrackHandleBase::startPoint() const if (common()->trackSanityHelper()->isSafe(*tsos_iter)) { const Trk::TrackParameters* trackParam = (*tsos_iter)->trackParameters(); if (common()->trackSanityHelper()->isSafe(trackParam)) - return &(trackParam->position()); + return trackParam->position(); } } } else if (m_d->pathInfo_Points&&!m_d->pathInfo_Points->empty()) { - return &(m_d->pathInfo_Points->at(0)); + return m_d->pathInfo_Points->at(0); } - return 0; + return {}; } //____________________________________________________________________ -const Amg::Vector3D * TrackHandleBase::endPoint() const +std::optional<Amg::Vector3D> TrackHandleBase::endPoint() const { m_d->ensureLoadPathInfo(); if (m_d->pathInfo_TrkTrack) { @@ -1417,16 +1417,16 @@ const Amg::Vector3D * TrackHandleBase::endPoint() const if (common()->trackSanityHelper()->isSafe(trackParam)) { // std::cout << "endPoint returning (1): " << trackParam->position() << std::endl; - return &(trackParam->position()); + return trackParam->position(); } } } } else if (m_d->pathInfo_Points&&!m_d->pathInfo_Points->empty()) { // std::cout << "endPoint returning (2): " << m_d->pathInfo_Points->back() << std::endl; - return &(m_d->pathInfo_Points->back()); + return m_d->pathInfo_Points->back(); } // std::cout << "endPoint returning (3) (null position)" << std::endl; - return 0; + return {}; } //____________________________________________________________________ diff --git a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/VP1TrackSystem.cxx b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/VP1TrackSystem.cxx index fab021647a824765b1bffab4037a3eeac690b757..b13efcc28c38dffbc825c3782867de227bddf1fe 100644 --- a/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/VP1TrackSystem.cxx +++ b/graphics/VTI12/VTI12Systems/VTI12TrackSystems/src/VP1TrackSystem.cxx @@ -86,8 +86,8 @@ #include "TrkMeasurementBase/MeasurementBase.h" #include "TrkParameters/TrackParameters.h" #include "TrkPrepRawData/PrepRawData.h" -#include "VP1Utils/VP1ToolAccessHelper.h" -#include "VP1Utils/VP1AvailableToolsHelper.h" +#include "VTI12Utils/VP1ToolAccessHelper.h" +#include "VTI12Utils/VP1AvailableToolsHelper.h" //////////////////////////////////////////////////////// @@ -590,7 +590,7 @@ unsigned VP1TrackSystem::Imp::calcTotalMomentumOfSelectedHandles(Amg::Vector3D& if (mom.mag2()==0.0) continue; //Fixme: Get actual position of perigee!! - const Amg::Vector3D * pos = handle->startPoint(); + std::optional<Amg::Vector3D> pos = handle->startPoint(); if (!pos) continue; ++nused; diff --git a/graphics/VTI12/VTI12Utils/CMakeLists.txt b/graphics/VTI12/VTI12Utils/CMakeLists.txt index 0587a8ca8e2560e92cbe9efd5d5ce0e513577135..ae7736791d02deefd6b896ce785b595765dac2d2 100644 --- a/graphics/VTI12/VTI12Utils/CMakeLists.txt +++ b/graphics/VTI12/VTI12Utils/CMakeLists.txt @@ -14,7 +14,7 @@ find_package( Coin3D ) find_package( Eigen ) find_package( HepPDT ) find_package( Qt5 COMPONENTS Core REQUIRED) -find_package( GeoModelCore ) +find_package( GeoModel ) # Generate MOC files automatically: set( CMAKE_AUTOMOC ON ) @@ -26,13 +26,14 @@ atlas_add_library( VTI12Utils VTI12Utils/*.h src/*.cxx src/*.cpp PRIVATE_INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${COIN3D_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODELCORE_LIBRARIES} EventPrimitives + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} EventPrimitives GaudiKernel VP1Base StoreGateLib SGtests AthDSoCallBacks GeoPrimitives Qt5::Core PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${COIN3D_LIBRARIES} ${EIGEN_LIBRARIES} CxxUtils FaserDetDescr - GeoModelUtilities GeoModelFaserUtilities GeoSpecialShapes Identifier + GeoModelFaserUtilities Identifier ScintIdentifier ScintReadoutGeometry TrackerIdentifier TrackerReadoutGeometry + FaserCaloIdentifier CaloReadoutGeometry #InDetRIO_OnTrack TrkSurfaces TrkRIO_OnTrack VP1HEPVis ) diff --git a/graphics/VTI12/VTI12Utils/VTI12Utils/VP1DetInfo.h b/graphics/VTI12/VTI12Utils/VTI12Utils/VP1DetInfo.h index 6f797da4e15c4547b076f61ce6785a53c7bc0439..1adebf82ae7687211cd24cdd0cfaceb6b50f492d 100644 --- a/graphics/VTI12/VTI12Utils/VTI12Utils/VP1DetInfo.h +++ b/graphics/VTI12/VTI12Utils/VTI12Utils/VP1DetInfo.h @@ -24,6 +24,7 @@ namespace TrackerDD { class SCT_DetectorManager; } namespace ScintDD { class VetoDetectorManager; } namespace ScintDD { class TriggerDetectorManager; } namespace ScintDD { class PreshowerDetectorManager; } +namespace CaloDD { class EcalDetectorManager; } class FaserDetectorID; class ScintDetectorID; @@ -31,6 +32,7 @@ class VetoID; class TriggerID; class PreshowerID; class FaserSCT_ID; +class EcalID; class Identifier; @@ -49,6 +51,8 @@ public: static const TrackerDD::SCT_DetectorManager * sctDetMgr(); + static const CaloDD::EcalDetectorManager * ecalDetMgr(); + //Base identifier helper: static const FaserDetectorID * faserIDHelper(); @@ -59,6 +63,9 @@ public: static const PreshowerID * preshowerIDHelper(); static const FaserSCT_ID * sctIDHelper(); + + static const EcalID * ecalIDHelper(); + //Todo: Add more as needed. //Combines use of the atlasIDHelper and VP1JobConfigInfo to spot diff --git a/graphics/VTI12/VTI12Utils/VTI12Utils/VP1JobConfigInfo.h b/graphics/VTI12/VTI12Utils/VTI12Utils/VP1JobConfigInfo.h index 6e13b37701a031f03161232c15fd0a2b85f407fe..d9ad784cc3b3d46c3a6e38ee3195ddb3a66c0cfd 100644 --- a/graphics/VTI12/VTI12Utils/VTI12Utils/VP1JobConfigInfo.h +++ b/graphics/VTI12/VTI12Utils/VTI12Utils/VP1JobConfigInfo.h @@ -36,9 +36,9 @@ public: static bool hasTriggerGeometry(); static bool hasPreshowerGeometry(); - // static bool hasPixelGeometry(); static bool hasSCTGeometry(); - // static bool hasTRTGeometry(); + + static bool hasEcalGeometry(); //Top geomodel volume link (not strictly "JobConfig", but here it is): static const GeoPVConstLink * geoModelWorld();//might return 0 diff --git a/graphics/VTI12/VTI12Utils/src/SoVisualizeAction.cxx b/graphics/VTI12/VTI12Utils/src/SoVisualizeAction.cxx index f078915fe4d4bde84c86f44176d1c201107bb038..4e251295d9571979f169933e93dbd449a5aa5a7a 100644 --- a/graphics/VTI12/VTI12Utils/src/SoVisualizeAction.cxx +++ b/graphics/VTI12/VTI12Utils/src/SoVisualizeAction.cxx @@ -14,17 +14,12 @@ #include "GeoModelKernel/GeoTessellatedSolid.h" #include "GeoModelKernel/GeoFacet.h" #include "GeoModelKernel/GeoGenericTrap.h" -#ifndef BUILDVP1LIGHT - #include "GeoSpecialShapes/LArCustomShape.h" - #include "GeoSpecialShapes/LArWheelCalculator.h" -#endif #include "VP1HEPVis/nodes/SoTubs.h" #include "VP1HEPVis/nodes/SoCons.h" #include "VP1HEPVis/nodes/SoGenericBox.h" #include "VP1HEPVis/nodes/SoPcons.h" #include "VP1HEPVis/nodes/SoTessellated.h" #include "VP1HEPVis/SbPolyhedron.h" -#include "VP1HEPVis/nodes/SoLAr.h" #include "VP1HEPVis/nodes/SoPolyhedron.h" #include "VP1HEPVis/VP1HEPVisUtils.h" #include "VTI12Utils/SbPolyhedrizeAction.h" diff --git a/graphics/VTI12/VTI12Utils/src/VP1DetInfo.cxx b/graphics/VTI12/VTI12Utils/src/VP1DetInfo.cxx index 0415dbaedf907ab8293164586bdb2f77de80b5a3..6f5a72e9c193b18c2a8306a9f734aeb2afd0d5fe 100644 --- a/graphics/VTI12/VTI12Utils/src/VP1DetInfo.cxx +++ b/graphics/VTI12/VTI12Utils/src/VP1DetInfo.cxx @@ -28,6 +28,8 @@ #include "TrackerReadoutGeometry/SCT_DetectorManager.h" +#include "CaloReadoutGeometry/EcalDetectorManager.h" + #include "FaserDetDescr/FaserDetectorID.h" #include "ScintIdentifier/VetoID.h" @@ -36,6 +38,8 @@ #include "TrackerIdentifier/FaserSCT_ID.h" +#include "FaserCaloIdentifier/EcalID.h" + #include "Identifier/Identifier.h" //____________________________________________________________________ @@ -53,15 +57,17 @@ public: static const TrackerDD::SCT_DetectorManager * m_sctDetMgr; + static const CaloDD::EcalDetectorManager * m_ecalDetMgr; + static const FaserDetectorID * m_faserIDHelper; static const VetoID * m_vetoIDHelper; static const TriggerID * m_triggerIDHelper; static const PreshowerID * m_preshowerIDHelper; - // static const PixelID * m_pixelIDHelper; static const FaserSCT_ID * m_sctIDHelper; - // static const TRT_ID * m_trtIDHelper; + + static const EcalID * m_ecalIDHelper; }; bool VP1DetInfo::Imp::m_initialised = false; @@ -73,6 +79,8 @@ const ScintDD::PreshowerDetectorManager * VP1DetInfo::Imp::m_preshowerDetMgr = 0 const TrackerDD::SCT_DetectorManager * VP1DetInfo::Imp::m_sctDetMgr = 0; +const CaloDD::EcalDetectorManager * VP1DetInfo::Imp::m_ecalDetMgr = 0; + const FaserDetectorID * VP1DetInfo::Imp::m_faserIDHelper = 0; const VetoID * VP1DetInfo::Imp::m_vetoIDHelper = 0; @@ -81,6 +89,8 @@ const PreshowerID * VP1DetInfo::Imp::m_preshowerIDHelper = 0; const FaserSCT_ID * VP1DetInfo::Imp::m_sctIDHelper = 0; +const EcalID * VP1DetInfo::Imp::m_ecalIDHelper = 0; + //____________________________________________________________________ template <class T> const T * VP1DetInfo::Imp::cachedRetrieve(const T*& cachedPtr, const char* preferredKey, const bool& configallows ) { @@ -125,6 +135,8 @@ const ScintDD::PreshowerDetectorManager * VP1DetInfo::preshowerDetMgr() { return const TrackerDD::SCT_DetectorManager * VP1DetInfo::sctDetMgr() { return Imp::cachedRetrieve(Imp::m_sctDetMgr,"SCT",VP1JobConfigInfo::hasSCTGeometry()); } +const CaloDD::EcalDetectorManager * VP1DetInfo::ecalDetMgr() { return Imp::cachedRetrieve(Imp::m_ecalDetMgr,"Ecal",VP1JobConfigInfo::hasEcalGeometry()); } + const FaserDetectorID * VP1DetInfo::faserIDHelper() { return Imp::cachedRetrieve(Imp::m_faserIDHelper,"FaserID",true); } const VetoID * VP1DetInfo::vetoIDHelper() { return Imp::cachedRetrieve(Imp::m_vetoIDHelper,"VetoID",VP1JobConfigInfo::hasVetoGeometry()); } @@ -133,6 +145,8 @@ const PreshowerID * VP1DetInfo::preshowerIDHelper() { return Imp::cachedRetrieve const FaserSCT_ID * VP1DetInfo::sctIDHelper() { return Imp::cachedRetrieve(Imp::m_sctIDHelper,"FaserSCT_ID",VP1JobConfigInfo::hasSCTGeometry()); } +const EcalID * VP1DetInfo::ecalIDHelper() { return Imp::cachedRetrieve(Imp::m_ecalIDHelper,"EcalID",VP1JobConfigInfo::hasEcalGeometry()); } + //____________________________________________________________________ bool VP1DetInfo::isUnsafe( const Identifier& id ) { @@ -153,5 +167,11 @@ bool VP1DetInfo::isUnsafe( const Identifier& id ) { if (!VP1JobConfigInfo::hasSCTGeometry() && idhelper->is_sct(id)) return true; } + + if (idhelper->is_calo(id)) { + if (!VP1JobConfigInfo::hasEcalGeometry() && idhelper->is_ecal(id)) + return true; + } + return false; } diff --git a/graphics/VTI12/VTI12Utils/src/VP1JobConfigInfo.cxx b/graphics/VTI12/VTI12Utils/src/VP1JobConfigInfo.cxx index 3cb7089466bb7bf5cfa6e94eb6739eac574bafcb..0449af3927f264f14afdfebf5dd42c88f7710237 100644 --- a/graphics/VTI12/VTI12Utils/src/VP1JobConfigInfo.cxx +++ b/graphics/VTI12/VTI12Utils/src/VP1JobConfigInfo.cxx @@ -21,7 +21,7 @@ #include "VP1Base/VP1AthenaPtrs.h" #include "GeoModelKernel/GeoVolumeCursor.h" -#include "GeoModelUtilities/GeoModelExperiment.h" +#include "GeoModelFaserUtilities/GeoModelExperiment.h" #include "StoreGate/DataHandle.h" #include <QString> @@ -88,9 +88,9 @@ void VP1JobConfigInfo::Imp::ensureInit() VP1Msg::messageVerbose("VTI12JobConfigInfo => hasTriggerGeometry = "+QString(hasTriggerGeometry?"On":"Off")); VP1Msg::messageVerbose("VTI12JobConfigInfo => hasPreshowerGeometry = "+QString(hasPreshowerGeometry?"On":"Off")); - // VP1Msg::messageVerbose("VP1JobConfigInfo => hasPixelGeometry = "+QString(hasPixelGeometry?"On":"Off")); - VP1Msg::messageVerbose("VP1JobConfigInfo => hasSCTGeometry = "+QString(hasSCTGeometry?"On":"Off")); - // VP1Msg::messageVerbose("VP1JobConfigInfo => hasTRTGeometry = "+QString(hasTRTGeometry?"On":"Off")); + VP1Msg::messageVerbose("VTI12JobConfigInfo => hasSCTGeometry = "+QString(hasSCTGeometry?"On":"Off")); + + VP1Msg::messageVerbose("VTI12JobConfigInfo => hasEcalGeometry = "+QString(hasEcalGeometry?"On":"Off")); } } @@ -101,9 +101,9 @@ bool VP1JobConfigInfo::hasVetoGeometry() { if (!Imp::initialised) Imp::ensureIni bool VP1JobConfigInfo::hasTriggerGeometry() { if (!Imp::initialised) Imp::ensureInit(); return Imp::hasTriggerGeometry; } bool VP1JobConfigInfo::hasPreshowerGeometry() { if (!Imp::initialised) Imp::ensureInit(); return Imp::hasPreshowerGeometry; } -// bool VP1JobConfigInfo::hasPixelGeometry() { if (!Imp::initialised) Imp::ensureInit(); return Imp::hasPixelGeometry; } bool VP1JobConfigInfo::hasSCTGeometry() { if (!Imp::initialised) Imp::ensureInit(); return Imp::hasSCTGeometry; } -// bool VP1JobConfigInfo::hasTRTGeometry() { if (!Imp::initialised) Imp::ensureInit(); return Imp::hasTRTGeometry; } + +bool VP1JobConfigInfo::hasEcalGeometry() { if (!Imp::initialised) Imp::ensureInit(); return Imp::hasEcalGeometry; } //____________________________________________________________________ bool VP1JobConfigInfo::Imp::actualInit( StoreGateSvc* detStore ) @@ -151,11 +151,12 @@ bool VP1JobConfigInfo::Imp::actualInit( StoreGateSvc* detStore ) while (!av.atEnd()) { std::string name = av.getName(); - // VP1Msg::message( QString { name.c_str() } ); + VP1Msg::message( QString { name.c_str() } ); if ( !hasVetoGeometry && name=="Veto") hasVetoGeometry = true; if ( !hasTriggerGeometry && name=="Trigger") hasTriggerGeometry = true; if ( !hasPreshowerGeometry && name=="Preshower") hasPreshowerGeometry = true; if ( !hasSCTGeometry && name=="SCT") hasSCTGeometry = true; + if ( !hasEcalGeometry && name=="Ecal") hasEcalGeometry = true; //FIXME: Look for CavernInfra as well!!! diff --git a/version.txt b/version.txt index e7efe3421ba225a99d20587239c44dea5f11e0db..6c5fa89eac24b43b94c16331a49837b435ce09c9 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -22.0.19 +22.0.29