VMC Examples Version 6.6
Loading...
Searching...
No Matches
Ex03cDetectorConstruction.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 Ex03cDetectorConstruction.h
14/// \brief Definition of the Ex03cDetectorConstruction 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 Benedikt Volkel, CERN
21
22#include <map>
23
24#include <Riostream.h>
25#include <TObject.h>
26#include <TString.h>
27
28class TVirtualMC;
29
30/// \ingroup E03
31/// \brief The detector construction (via TGeo )
32///
33/// A variant of the Ex03DetectorConstruction class
34/// updated for multiple engine runs.
35///
36/// \date 21/08/2019
37/// \author Benedikt Volkel, CERN
38
40{
41 public:
44
45 public:
46 void ConstructMaterials();
47 void ConstructGeometry();
48 void SetCuts();
49 void SetControls();
51 // void UpdateGeometry();
52
53 // set methods
54 void SetNbOfLayers(Int_t value);
55 void SetDefaultMaterial(const TString& materialName);
56 void SetAbsorberMaterial(const TString& materialName);
57 void SetGapMaterial(const TString& materialName);
58 void SetCalorSizeYZ(Double_t value);
59 void SetAbsorberThickness(Double_t value);
60 void SetGapThickness(Double_t value);
61
62 //
63 // get methods
64
65 /// \return The number of calorimeter layers
66 Int_t GetNbOfLayers() const { return fNbOfLayers; }
67
68 /// \return The world size x component
69 Double_t GetWorldSizeX() const { return fWorldSizeX; }
70
71 /// \return The world size y,z component
72 Double_t GetWorldSizeYZ() const { return fWorldSizeYZ; }
73
74 /// \return The calorimeter size y,z component
75 Double_t GetCalorSizeYZ() const { return fCalorSizeYZ; }
76
77 /// \return The calorimeter thickness
78 Double_t GetCalorThickness() const { return fCalorThickness; }
79
80 /// \return The absorber thickness
81 Double_t GetAbsorberThickness() const { return fAbsorberThickness; }
82
83 /// \return The gap thickness
84 Double_t GetGapThickness() const { return fGapThickness; }
85
86 private:
87 // helper type for setting cuts
89 {
91 TString name, Double_t p1, Double_t p2, Double_t p3, Double_t p4)
92 : fName(name), fCUTGAM(p1), fBCUTE(p2), fCUTELE(p3), fDCUTE(p4)
93 {}
94 TString fName;
95 Double_t fCUTGAM;
96 Double_t fBCUTE;
97 Double_t fCUTELE;
98 Double_t fDCUTE;
99 };
100
101 // methods
103
104 // data members
105 Int_t fNbOfLayers; ///< The number of calorimeter layers
106 Double_t fWorldSizeX; ///< The world size x component
107 Double_t fWorldSizeYZ; ///< The world size y,z component
108 Double_t fCalorSizeYZ; ///< The calorimeter size y,z component
109 Double_t fCalorThickness; ///< The calorimeter thickness
110 Double_t fLayerThickness; ///< The calorimeter layer thickness
111 Double_t fAbsorberThickness; ///< The absorber thickness
112 Double_t fGapThickness; ///< The gap thickness
113
114 TString fDefaultMaterial; ///< The default material name
115 TString fAbsorberMaterial; ///< The absorber material name
116 TString fGapMaterial; ///< The gap material name
117
118 TVirtualMC* fMC; ///< Stored pointer to current TVirtualMC
119 Bool_t fConnectedToMCManager; ///< Set flag if fMC is connected to and
120 ///< updated by TMCManager
121
122 ClassDef(Ex03cDetectorConstruction, 1) // Ex03cDetectorConstruction
123};
124
125#endif // EX03_DETECTOR_CONSTRUCTION_H
The detector construction (via TGeo )
Int_t fNbOfLayers
The number of calorimeter layers.
TString fDefaultMaterial
The default material name.
TVirtualMC * fMC
Stored pointer to current TVirtualMC.
Double_t fAbsorberThickness
The absorber thickness.
Double_t fCalorThickness
The calorimeter thickness.
Double_t fWorldSizeX
The world size x component.
Double_t fCalorSizeYZ
The calorimeter size y,z component.
Double_t fLayerThickness
The calorimeter layer thickness.
TString fGapMaterial
The gap material name.
TString fAbsorberMaterial
The absorber material name.
Double_t fWorldSizeYZ
The world size y,z component.
Double_t fGapThickness
The gap thickness.
void SetAbsorberMaterial(const TString &materialName)
void SetDefaultMaterial(const TString &materialName)
void SetGapMaterial(const TString &materialName)
MaterialCuts(TString name, Double_t p1, Double_t p2, Double_t p3, Double_t p4)