src/modules/GeometryBuilderGeant4/GeometryConstructionG4.hpp

Defines the internal Geant4 geometry construction. More…

Namespaces

Name
allpix
Helper class to hold support layers for a detector model.

Classes

Name
class allpix::GeometryConstructionG4
Constructs the Geant4 geometry during Geant4 initialization.

Detailed Description

Defines the internal Geant4 geometry construction.

Copyright: Copyright (c) 2017-2024 CERN and the Allpix Squared authors. This software is distributed under the terms of the MIT License, copied verbatim in the file “LICENSE.md”. In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. SPDX-License-Identifier: MIT

Source code


#ifndef ALLPIX_MODULE_GEOMETRY_CONSTRUCTION_H
#define ALLPIX_MODULE_GEOMETRY_CONSTRUCTION_H

#include <memory>
#include <utility>

#include <G4Material.hh>
#include <G4VSolid.hh>
#include <G4VUserDetectorConstruction.hh>

#include "DetectorConstructionG4.hpp"
#include "PassiveMaterialConstructionG4.hpp"
#include "core/geometry/GeometryManager.hpp"

namespace allpix {
    class GeometryConstructionG4 : public G4VUserDetectorConstruction {

    public:
        GeometryConstructionG4(GeometryManager* geo_manager, Configuration& config);

        G4VPhysicalVolume* Construct() override;

    private:
        GeometryManager* geo_manager_;
        Configuration& config_;

        void check_overlaps() const;

        void verify_transforms() const;

        std::unique_ptr<DetectorConstructionG4> detector_builder_;
        std::unique_ptr<PassiveMaterialConstructionG4> passive_builder_;

        // Storage of internal objects
        std::vector<std::shared_ptr<G4VSolid>> solids_;

        std::shared_ptr<G4LogicalVolume> world_log_;
        std::unique_ptr<G4VPhysicalVolume> world_phys_;
    };
} // namespace allpix

#endif /* ALLPIX_MODULE_GEOMETRY_CONSTRUCTION_H */

Updated on 2024-12-13 at 08:31:37 +0000