diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx index b946d8ce208f6b86801f0f0b286cddcb82c4546f..1e083cd6c688eb4be6e6eb04ed4ab987f5317cbc 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx @@ -3,6 +3,7 @@ */ #include "FEI3SimTool.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" FEI3SimTool::FEI3SimTool(const std::string& type, const std::string& name, const IInterface* parent) : FrontEndSimTool(type, name, parent) { @@ -64,7 +65,8 @@ void FEI3SimTool::process(SiChargedDiodeCollection& chargedDiodes, PixelRDO_Coll // Merge ganged pixel InDetDD::SiCellId cellID = chargedDiodes.element()->cellIdFromIdentifier(chargedDiodes.getId( (*i_chargedDiode).first)); - InDetDD::SiCellId gangedCell = chargedDiodes.element()->gangedCell(cellID); + const InDetDD::SiDetectorElement * siDetEl = static_cast<const InDetDD::SiDetectorElement *>(chargedDiodes.element()); + InDetDD::SiCellId gangedCell = siDetEl->gangedCell(cellID); Identifier gangedID = chargedDiodes.element()->identifierFromCellId(gangedCell); if (gangedCell.isValid()) { SiChargedDiode* gangedChargeDiode = chargedDiodes.find(gangedID); diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx index 49cf21f963c3784ac42c3b4228d9a41f15cb39ed..3e2f75b7119cd442674acc85b493f215cf339b96 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx @@ -639,8 +639,7 @@ std::unique_ptr<SCT_RDO_Collection> SCT_DigitizationTool::createRDO(SiChargedDio // create new SCT RDO InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()}; int strip{roCell.strip()}; - const InDetDD::SiDetectorDesign& detDesign{collection->design()}; - const InDetDD::SCT_ModuleSideDesign& sctDesign{dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(detDesign)}; + const InDetDD::SCT_ModuleSideDesign& sctDesign{static_cast<const InDetDD::SCT_ModuleSideDesign&>(collection->design())}; int row2D{sctDesign.row(strip)}; Identifier id_readout; if (row2D < 0) { // SCT sensors @@ -816,8 +815,7 @@ void SCT_DigitizationTool::addSDO(SiChargedDiodeCollection* collection, SG::Writ if (real_particle_hit or m_createNoiseSDO) { InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()}; int strip{roCell.strip()}; - const InDetDD::SiDetectorDesign& detDesign{collection->design()}; - const InDetDD::SCT_ModuleSideDesign& sctDesign{dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(detDesign)}; + const InDetDD::SCT_ModuleSideDesign& sctDesign{dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(collection->design())}; int row2D{sctDesign.row(strip)}; Identifier id_readout; diff --git a/InnerDetector/InDetDigitization/SiDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/SiDigitization/CMakeLists.txt index 250ac67dd5dfb6912a3d305f6d8f39fb6214edbc..94f21af6e011f8e64f68386145da1f807a58d88d 100644 --- a/InnerDetector/InDetDigitization/SiDigitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/SiDigitization/CMakeLists.txt @@ -9,5 +9,5 @@ atlas_add_library( SiDigitization src/SiChargedDiodeCollection.cxx src/SiSurfaceCharge.cxx PUBLIC_HEADERS SiDigitization - LINK_LIBRARIES AthenaKernel AthAllocators Identifier GaudiKernel InDetReadoutGeometry ReadoutGeometryBase InDetSimEvent ) + LINK_LIBRARIES AthenaKernel AthAllocators Identifier GaudiKernel ReadoutGeometryBase InDetSimEvent ) diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/IAmplifier.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/IAmplifier.h new file mode 100644 index 0000000000000000000000000000000000000000..0a3c8637044f77d48768849b9900764750d0a1ef --- /dev/null +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/IAmplifier.h @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * IAmplifier.h + * Header file for abstract base class IAmplier + */ + +#ifndef SIDIGITIZATION_IAMPLIFIER_H +#define SIDIGITIZATION_IAMPLIFIER_H + +#include "GaudiKernel/IAlgTool.h" +#include "InDetSimEvent/SiTotalCharge.h" + +#include <vector> + +static const InterfaceID IID_IAmplifier("IAmplifier", 1, 0); + +class IAmplifier : virtual public IAlgTool { + + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// + public: + typedef SiTotalCharge::list_t list_t; + + //Retrieve interface ID + static const InterfaceID& interfaceID() { return IID_IAmplifier; } + + // Destructor: + virtual ~IAmplifier() {} + + /////////////////////////////////////////////////////////////////// + // Pure virtual methods: + /////////////////////////////////////////////////////////////////// + + // process the collection of charged diodes + /** main purpose: CR-RC^3 response to a list of charges with times */ + virtual float response(const list_t& Charges, const float timeOverThreshold) const =0; + virtual void response(const list_t& Charges, const float timeOverThreshold, std::vector<float>& resp) const =0; + + /** Neighbour strip cross talk response strip to a list of charges with times */ + virtual float crosstalk(const list_t& Charges, const float timeOverThreshold) const =0; + virtual void crosstalk(const list_t& Charges, const float timeOverThreshold, std::vector<float> &resp) const =0; +}; + +#endif // SIDIGITIZATION_IAMPLIFIER_H diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/IFrontEnd.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/IFrontEnd.h new file mode 100644 index 0000000000000000000000000000000000000000..261ad44e984b681d3382381782a1af2d567e3035 --- /dev/null +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/IFrontEnd.h @@ -0,0 +1,42 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * IFrontEnd.h + * Header file for interface class for FrontEnd + * (c) ATLAS Detector software + */ + +#ifndef SIDIGITIZATION_IFRONTEND_H +#define SIDIGITIZATION_IFRONTEND_H + +//Inheritance +#include "SiDigitization/ISiChargedDiodesProcessorTool.h" +#include "SiDigitization/SiChargedDiode.h" + +//methods +#include "Identifier/Identifier.h" +class SiChargedDiodeCollection; +namespace CLHEP { + class HepRandomEngine; +} + +static const InterfaceID IID_IFrontEnd("IFrontEnd", 1, 0); + +class IFrontEnd : virtual public ISiChargedDiodesProcessorTool { + + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// + public: + + //** Retrieve interface ID */ + static const InterfaceID& interfaceID() { return IID_IFrontEnd; } + + //** Destructor: */ + virtual ~IFrontEnd() {} + +}; + +#endif // SIDIGITIZATION_IFRONTEND_H diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/IRandomDisabledCellGenerator.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/IRandomDisabledCellGenerator.h new file mode 100644 index 0000000000000000000000000000000000000000..cb4a5755ebaacb8f3638a17ed350d1c2c88a9161 --- /dev/null +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/IRandomDisabledCellGenerator.h @@ -0,0 +1,42 @@ +// -*- C++ -*- + +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * IRandomDisabledCellGenerator.h + * Header file for interface class for RandomDisabledCellGenerator + * (c) ATLAS Detector software + */ + +#ifndef SIDIGITIZATION_IRANDOMDISABLEDCELLGENERATOR_H +#define SIDIGITIZATION_IRANDOMDISABLEDCELLGENERATOR_H + +//Inheritance +#include "SiDigitization/ISiChargedDiodesProcessorTool.h" + +//methods +class SiChargedDiodeCollection; +namespace CLHEP { + class HepRandomEngine; +} + +static const InterfaceID IID_IRandomDisabledCellGenerator("IRandomDisabledCellGenerator",1,0); + +class IRandomDisabledCellGenerator : virtual public ISiChargedDiodesProcessorTool { + + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// + public: + + //Retrieve interface ID + static const InterfaceID& interfaceID() { return IID_IRandomDisabledCellGenerator; } + + // Destructor: + virtual ~IRandomDisabledCellGenerator() {} + +}; + +#endif // SIDIGITIZATION_IRANDOMDISABLEDCELLGENERATOR_H diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiodeCollection.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiodeCollection.h index 6ce0ee1d42cf57de7d51cfe91169f6362dedaeb0..e1a1d8b343ea5c450e6065d59c21049d5b8e157e 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiodeCollection.h +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiodeCollection.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -30,7 +30,7 @@ #include <unordered_map> #include "SiDigitization/SiChargedDiode.h" #include "Identifier/Identifier.h" -#include "InDetReadoutGeometry/SiDetectorElement.h" +#include "ReadoutGeometryBase/SolidStateDetectorElementBase.h" // Input/output classes #include "InDetSimEvent/SiHit.h" @@ -42,8 +42,7 @@ class AtlasDetectorID; namespace InDetDD{ - class SiDetectorElement; - class SiDetectorDesign; + class DetectorDesign; class SiCellId; } @@ -117,7 +116,7 @@ class SiChargedDiodeCollection : Identifiable { // ref. to the detector element for this collection SiChargedDiodeCollection( ); - SiChargedDiodeCollection(const InDetDD::SiDetectorElement* ); + SiChargedDiodeCollection(const InDetDD::SolidStateDetectorElementBase* ); // Destructor: @@ -128,7 +127,7 @@ class SiChargedDiodeCollection : Identifiable { /////////////////////////////////////////////////////////////////// // detector element: - const InDetDD::SiDetectorElement * element() const; + const InDetDD::SolidStateDetectorElementBase * element() const; // wafer identifier for this collection virtual Identifier identify() const override final; @@ -138,7 +137,7 @@ class SiChargedDiodeCollection : Identifiable { const AtlasDetectorID* id_helper(); // detector design: - const InDetDD::SiDetectorDesign &design() const; + const InDetDD::DetectorDesign &design() const; // translation from SiReadoutCellId to Identifier Identifier getId(const InDetDD::SiCellId& id) const @@ -157,7 +156,7 @@ class SiChargedDiodeCollection : Identifiable { SiChargedDiodeMap &chargedDiodes(); // Set the SiDetectorElement - void setDetectorElement(const InDetDD::SiDetectorElement *SiElement); + void setDetectorElement(const InDetDD::SolidStateDetectorElementBase *SiElement); // Add a new SiCharge to the collection // (add or merge in an existing SiChargedDiode): @@ -200,7 +199,7 @@ class SiChargedDiodeCollection : Identifiable { SiTotalCharge::alloc_t m_allocator; SiChargedDiodeMap m_chargedDiodes; // list of SiChargedDiodes SiChargedDiodeOrderedSet m_orderedChargedDiodes; // list of SiChargedDiodes - const InDetDD::SiDetectorElement* m_sielement; // detector element + const InDetDD::SolidStateDetectorElementBase* m_sielement; // detector element }; /////////////////////////////////////////////////////////////////// @@ -208,7 +207,7 @@ class SiChargedDiodeCollection : Identifiable { /////////////////////////////////////////////////////////////////// // Set the DetectorElement -inline void SiChargedDiodeCollection::setDetectorElement(const InDetDD::SiDetectorElement *SiElement) +inline void SiChargedDiodeCollection::setDetectorElement(const InDetDD::SolidStateDetectorElementBase *SiElement) { m_sielement=SiElement; } @@ -219,13 +218,13 @@ inline SiChargedDiodeMap &SiChargedDiodeCollection::chargedDiodes() } // access to the element -inline const InDetDD::SiDetectorElement *SiChargedDiodeCollection::element() const +inline const InDetDD::SolidStateDetectorElementBase *SiChargedDiodeCollection::element() const { return m_sielement; } // access to the design -inline const InDetDD::SiDetectorDesign &SiChargedDiodeCollection::design() const +inline const InDetDD::DetectorDesign &SiChargedDiodeCollection::design() const { return m_sielement->design(); } diff --git a/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx b/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx index de52fa298ff6bb47f379aed2a98e7751342221f9..b3993828bd62201bdf5face95d28b31821a7f68d 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx +++ b/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -15,7 +15,7 @@ #include "SiDigitization/SiChargedDiodeCollection.h" // member classes #include "SiDigitization/SiHelper.h" -#include "InDetReadoutGeometry/SiDetectorDesign.h" +#include "ReadoutGeometryBase/DetectorDesign.h" #include "ReadoutGeometryBase/SiReadoutCellId.h" #include "ReadoutGeometryBase/SiCellId.h" #include "GaudiKernel/MsgStream.h" @@ -31,7 +31,7 @@ SiChargedDiodeCollection::SiChargedDiodeCollection( ) : { } -SiChargedDiodeCollection::SiChargedDiodeCollection(const InDetDD::SiDetectorElement* sielement ) : +SiChargedDiodeCollection::SiChargedDiodeCollection(const InDetDD::SolidStateDetectorElementBase* sielement ) : m_chargedDiodes(), m_sielement(sielement) {