VMC Examples Version 6.8
Loading...
Searching...
No Matches
Ex03DetectorConstruction.h
Go to the documentation of this file.
1#ifndef EX03_DETECTOR_CONSTRUCTION_H
2#define EX03_DETECTOR_CONSTRUCTION_H
3
4//------------------------------------------------
5// The Virtual Monte Carlo examples
6// Copyright (C) 2014 - 2018 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
13/// \file Ex03DetectorConstruction.h
14/// \brief Definition of the Ex03DetectorConstruction class
15///
16/// Geant4 ExampleN03 adapted to Virtual Monte Carlo: \n
17/// Id: ExN03DetectorConstruction.hh,v 1.5 2002/01/09 17:24:11 ranjard Exp
18/// GEANT4 tag $Name: $
19///
20/// \author I. Hrivnacova; IPN, Orsay
21
22#include <map>
23
24#include <Riostream.h>
25#include <TObject.h>
26#include <TString.h>
27
28/// \ingroup E03
29/// \brief The detector construction (via TGeo )
30///
31/// \date 06/03/2003
32/// \author I. Hrivnacova; IPN, Orsay
33
35{
36 public:
39
40 public:
41 void ConstructMaterials();
42 void ConstructGeometry();
43 void SetCuts();
44 void SetControls();
46 // void UpdateGeometry();
47
48 // set methods
49 void SetNbOfLayers(Int_t value);
50 void SetDefaultMaterial(const TString& materialName);
51 void SetAbsorberMaterial(const TString& materialName);
52 void SetGapMaterial(const TString& materialName);
53 void SetCalorSizeYZ(Double_t value);
54 void SetAbsorberThickness(Double_t value);
55 void SetGapThickness(Double_t value);
56 void SetUseAssemblies(Bool_t value);
57
58 /// Split sensitive slabs into normal and reflected half-thickness placements.
59 void SetUseReflection(Bool_t value) { fUseReflection = value; }
60 /// Require reflected hits in every event of the optional regression test.
61 void SetRequireReflectedHits(Bool_t value) { fRequireReflectedHits = value; }
62
63 //
64 // get methods
65
66 /// \return Whether reflected sensitive placements are enabled
67 Bool_t GetUseReflection() const { return fUseReflection; }
68 /// \return Whether each event must contain reflected absorber and gap hits
70
71 /// \return The number of calorimeter layers
72 Int_t GetNbOfLayers() const { return fNbOfLayers; }
73
74 /// \return The world size x component
75 Double_t GetWorldSizeX() const { return fWorldSizeX; }
76
77 /// \return The world size y,z component
78 Double_t GetWorldSizeYZ() const { return fWorldSizeYZ; }
79
80 /// \return The calorimeter size y,z component
81 Double_t GetCalorSizeYZ() const { return fCalorSizeYZ; }
82
83 /// \return The calorimeter thickness
84 Double_t GetCalorThickness() const { return fCalorThickness; }
85
86 /// \return The absorber thickness
87 Double_t GetAbsorberThickness() const { return fAbsorberThickness; }
88
89 /// \return The gap thickness
90 Double_t GetGapThickness() const { return fGapThickness; }
91
92 /// \return Whether the alternative geometry with assemblies is enabled
93 Bool_t GetUseAssemblies() const { return fUseAssemblies; }
94
95 private:
96 // helper type for setting cuts
98 {
100 TString name, Double_t p1, Double_t p2, Double_t p3, Double_t p4)
101 : fName(name), fCUTGAM(p1), fBCUTE(p2), fCUTELE(p3), fDCUTE(p4)
102 {}
103 TString fName;
104 Double_t fCUTGAM;
105 Double_t fBCUTE;
106 Double_t fCUTELE;
107 Double_t fDCUTE;
108 };
109
110 // methods
112
113 // data members
114 Int_t fNbOfLayers; ///< The number of calorimeter layers
115 Double_t fWorldSizeX; ///< The world size x component
116 Double_t fWorldSizeYZ; ///< The world size y,z component
117 Double_t fCalorSizeYZ; ///< The calorimeter size y,z component
118 Double_t fCalorThickness; ///< The calorimeter thickness
119 Double_t fLayerThickness; ///< The calorimeter layer thickness
120 Double_t fAbsorberThickness; ///< The absorber thickness
121 Double_t fGapThickness; ///< The gap thickness
122
123 TString fDefaultMaterial; ///< The default material name
124 TString fAbsorberMaterial; ///< The absorber material name
125 TString fGapMaterial; ///< The gap material name
126
127 Bool_t fUseAssemblies; ///< Option to place the calorimeter in assemblies
128
129 Bool_t fUseReflection; ///< Enable reflected sensitive placements
130 Bool_t fRequireReflectedHits; ///< Enable the per-event regression check
131
132 ClassDef(Ex03DetectorConstruction, 1) // Ex03DetectorConstruction
133};
134
135/// Enable or disable the alternative geometry with assemblies
136/// \param value If true, place the calorimeter in nested assemblies
138{
139 fUseAssemblies = value;
140}
141
142#endif // EX03_DETECTOR_CONSTRUCTION_H
Bool_t fUseAssemblies
Option to place the calorimeter in assemblies.
Double_t fWorldSizeYZ
The world size y,z component.
Int_t fNbOfLayers
The number of calorimeter layers.
Bool_t fUseReflection
Enable reflected sensitive placements.
Double_t fGapThickness
The gap thickness.
TString fDefaultMaterial
The default material name.
void SetRequireReflectedHits(Bool_t value)
Require reflected hits in every event of the optional regression test.
void SetAbsorberThickness(Double_t value)
Bool_t fRequireReflectedHits
Enable the per-event regression check.
TString fAbsorberMaterial
The absorber material name.
Double_t fLayerThickness
The calorimeter layer thickness.
TString fGapMaterial
The gap material name.
Double_t fAbsorberThickness
The absorber thickness.
void SetUseReflection(Bool_t value)
Split sensitive slabs into normal and reflected half-thickness placements.
void SetAbsorberMaterial(const TString &materialName)
void SetDefaultMaterial(const TString &materialName)
Double_t fCalorThickness
The calorimeter thickness.
Double_t fWorldSizeX
The world size x component.
void SetGapMaterial(const TString &materialName)
Double_t fCalorSizeYZ
The calorimeter size y,z component.
MaterialCuts(TString name, Double_t p1, Double_t p2, Double_t p3, Double_t p4)