src/modules/GeometryBuilderGeant4/Parameterization2DG4.hpp

Defines 2D Geant4 parameterization grid of elements. More…

Namespaces

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

Classes

Name
class allpix::Parameterization2DG4
Represents a 2D Geant4 parameterization in the X,Y plane.
class allpix::ParameterisedG4
Class to construct parameterized physical volumes allowing to switch off overlap checking.

Detailed Description

Defines 2D Geant4 parameterization grid of elements.

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_PARAMETERIZATION_2D_HH_
#define ALLPIX_MODULE_GEOMETRY_CONSTRUCTION_PARAMETERIZATION_2D_HH_

#include <memory>

#include <G4PVParameterised.hh>
#include <G4ThreeVector.hh>
#include <G4VPVParameterisation.hh>
#include <G4VPhysicalVolume.hh>

namespace allpix {
    class Parameterization2DG4 : public G4VPVParameterisation {
    public:
        Parameterization2DG4(int div_x, double size_x, double size_y, double offset_x, double offset_y, double pos_z);

        void ComputeTransformation(const G4int, G4VPhysicalVolume*) const override;

    private:
        int div_x_;
        double size_x_;
        double size_y_;
        double offset_x_;
        double offset_y_;
        double pos_z_;
    };

    class ParameterisedG4 : public G4PVParameterised {
    public:
        ParameterisedG4(const G4String& name,
                        G4LogicalVolume* logical,
                        G4LogicalVolume* mother,
                        const EAxis axis,
                        const int n_replicas,
                        G4VPVParameterisation* param,
                        bool check_overlaps);

        bool CheckOverlaps(int res, double tol, bool verbose, int max_err) override;

    private:
        bool check_overlaps_;
    };
} // namespace allpix

#endif /* ALLPIX_MODULE_GEOMETRY_CONSTRUCTION_PARAMETERIZATION_2D_HH_ */

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