Commit 3e6b297c authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'rquaglia_ConsPassiveModel' into 'master'

Add passive model: Cone

See merge request allpix-squared/allpix-squared!1110
parents 245dd5ac bdd1ce8f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ The following authors, in alphabetical order, have developed or contributed to A
* Marko Petric, CERN, [mpetric](https://gitlab.cern.ch/mpetric)
* Florian Michael Pitters, HEPHY, [fpipper](https://gitlab.cern.ch/fpipper)
* Radek Privara, Palacky University Olomouc, [rprivara](https://gitlab.cern.ch/rprivara)
* Renato Quagliani, CERN, [rquaglia](https://gitlab.cern.ch/rquaglia)
* Nashad Rahman, The Ohio State University, [nashadroid](https://github.com/nashadroid)
* Sabita Rao, GSDocs2020 Student, [srao](https://gitlab.cern.ch/srao)
* Daniil Rastorguev, DESY, [drastorg](https://gitlab.cern.ch/drastorg)
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ description: "Simulation example with passive volumes in the geometry file"
This example showcases the definition of passive volumes in the geometry file.

The file `example_detector_passive.conf` contains a detector of the type `test`, as well as several passive objects, identified via the key-parameter pair `role = "passive"`.
The example shows the three basic objects implemented, while for the volume "sphere1" the "box1" is defined as `mother_volume`.
The example shows the four basic objects implemented, while for the volume "sphere1" the "box1" is defined as `mother_volume`.
This implies that the sphere is integrated into the box and that the given position (and orientation, if applicable) are interpreted as specifications relative to the position and orientation of the box mother volume.

Optionally, the `VisualizationGeant4` can be used to visualize these objects.
+15 −0
Original line number Diff line number Diff line
@@ -29,3 +29,18 @@ position = 0 0 50mm
orientation = 0 0 0
material = "copper"
role = "passive"


[cone1]
type = "cone"
outer_radius_end = 10mm
inner_radius_end =  9mm
outer_radius_begin = 20mm
inner_radius_begin =  9mm
starting_angle   = 0deg
arc_length       = 180deg
length = 30mm
position = 0 0 10mm
orientation = 0 0 0
material = "beryllium"
role = "passive"
+3 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include "MaterialManager.hpp"
#include "PassiveMaterialModel.hpp"
#include "passive_models/BoxModel.hpp"
#include "passive_models/ConeModel.hpp"
#include "passive_models/CylinderModel.hpp"
#include "passive_models/GDMLModel.hpp"
#include "passive_models/SphereModel.hpp"
@@ -43,6 +44,8 @@ std::shared_ptr<PassiveMaterialModel> allpix::PassiveMaterialModel::factory(cons
        return std::make_shared<CylinderModel>(config, geo_manager);
    } else if(type == "sphere") {
        return std::make_shared<SphereModel>(config, geo_manager);
    } else if(type == "cone") {
        return std::make_shared<ConeModel>(config, geo_manager);
    } else if(type == "gdml") {
#ifdef Geant4_GDML
        return std::make_shared<GDMLModel>(config, geo_manager);
+15 −0
Original line number Diff line number Diff line
@@ -57,6 +57,21 @@ The necessary module errors and warnings have been included to make sure the use

Note: If the VisualizationGeant4 module is used in conjunction with and `arc_length_theta` different from 180deg, the Visualization GUI will show an error "Inconsistency in bounding boxes for solid". The origin of this error is unknown but the error can be ignored.

#### Cone:
A cone or partly made cone with an inner and an outer radius defined at the begin (negative z) and end (positive z) each.
                starting_angle   : start-angle ( default 0)
                arc_length       : length-of the arc (360 deg default)
A cone or partly made cone with an inner and an outer radius defined at the begin (negative z) and end (positive z) each.

* The `outer_radius_begin` of the cone is the outer radius at the begin (negative z) of the cone
* (Optional) The `inner_radius_begin` of the cone is the inner radius at the begin (negative z) of the cone. Defaults to 0mm.
* The `outer_radius_end` of the cone is the outer radius at the end (positive z) of the cone
* (Optional) The `inner_radius_end` of the cone is the inner radius at the end (positive z) of the cone. Defaults to 0mm.
* The `length`  of the cone is the total length of the cone
* (Optional) The `starting_angle` of the cone is the azimuthal angle at which circumference of the cone will start in the XY-plane. 0 degrees refers to the point along the positive x-axis and the angle moves counter clockwise. Defaults to 0deg.
* (Optional) The `arc_length` of the cone is the arc-length of the cone that will be created
Note that `arc_length` works the same as the `arc_length` from the cylinder

#### GDML:
This model allows to load arbitrary GDML files \[[@gdml]\] as passive materials. All volumes from the GDML file which are contained within the world volume are processed and added to the geometry of the simulation.
The only parameter specific to this model is `file_name` which should provide the path to the GDML file to be read.
Loading