VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E03
E03b
include
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
34
class
Ex03DetectorConstruction
:
public
TObject
35
{
36
public
:
37
Ex03DetectorConstruction
();
38
virtual
~Ex03DetectorConstruction
();
39
40
public
:
41
void
ConstructMaterials
();
42
void
ConstructGeometry
();
43
void
SetCuts
();
44
void
SetControls
();
45
void
PrintCalorParameters
();
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
57
/// Split sensitive slabs into normal and reflected half-thickness placements.
58
void
SetUseReflection
(Bool_t value) {
fUseReflection
= value; }
59
/// Require reflected hits in every event of the optional regression test.
60
void
SetRequireReflectedHits
(Bool_t value) {
fRequireReflectedHits
= value; }
61
62
//
63
// get methods
64
65
/// \return Whether reflected sensitive placements are enabled
66
Bool_t
GetUseReflection
()
const
{
return
fUseReflection
; }
67
/// \return Whether each event must contain reflected absorber and gap hits
68
Bool_t
GetRequireReflectedHits
()
const
{
return
fRequireReflectedHits
; }
69
70
/// \return The number of calorimeter layers
71
Int_t
GetNbOfLayers
()
const
{
return
fNbOfLayers
; }
72
73
/// \return The world size x component
74
Double_t
GetWorldSizeX
()
const
{
return
fWorldSizeX
; }
75
76
/// \return The world size y,z component
77
Double_t
GetWorldSizeYZ
()
const
{
return
fWorldSizeYZ
; }
78
79
/// \return The calorimeter size y,z component
80
Double_t
GetCalorSizeYZ
()
const
{
return
fCalorSizeYZ
; }
81
82
/// \return The calorimeter thickness
83
Double_t
GetCalorThickness
()
const
{
return
fCalorThickness
; }
84
85
/// \return The absorber thickness
86
Double_t
GetAbsorberThickness
()
const
{
return
fAbsorberThickness
; }
87
88
/// \return The gap thickness
89
Double_t
GetGapThickness
()
const
{
return
fGapThickness
; }
90
91
private
:
92
// helper type for setting cuts
93
struct
MaterialCuts
94
{
95
MaterialCuts
(
96
TString name, Double_t p1, Double_t p2, Double_t p3, Double_t p4)
97
:
fName
(name),
fCUTGAM
(p1),
fBCUTE
(p2),
fCUTELE
(p3),
fDCUTE
(p4)
98
{}
99
TString
fName
;
100
Double_t
fCUTGAM
;
101
Double_t
fBCUTE
;
102
Double_t
fCUTELE
;
103
Double_t
fDCUTE
;
104
};
105
106
// methods
107
void
ComputeCalorParameters
();
108
109
// data members
110
Int_t
fNbOfLayers
;
///< The number of calorimeter layers
111
Double_t
fWorldSizeX
;
///< The world size x component
112
Double_t
fWorldSizeYZ
;
///< The world size y,z component
113
Double_t
fCalorSizeYZ
;
///< The calorimeter size y,z component
114
Double_t
fCalorThickness
;
///< The calorimeter thickness
115
Double_t
fLayerThickness
;
///< The calorimeter layer thickness
116
Double_t
fAbsorberThickness
;
///< The absorber thickness
117
Double_t
fGapThickness
;
///< The gap thickness
118
119
TString
fDefaultMaterial
;
///< The default material name
120
TString
fAbsorberMaterial
;
///< The absorber material name
121
TString
fGapMaterial
;
///< The gap material name
122
123
Bool_t
fUseReflection
;
///< Enable reflected sensitive placements
124
Bool_t
fRequireReflectedHits
;
///< Enable the per-event regression check
125
126
ClassDef(
Ex03DetectorConstruction
, 1)
// Ex03DetectorConstruction
127
};
128
129
#endif
// EX03_DETECTOR_CONSTRUCTION_H
Ex03DetectorConstruction
The detector construction (via TGeo ).
Definition
Ex03DetectorConstruction.h:35
Ex03DetectorConstruction::~Ex03DetectorConstruction
virtual ~Ex03DetectorConstruction()
Ex03DetectorConstruction::fWorldSizeYZ
Double_t fWorldSizeYZ
The world size y,z component.
Definition
Ex03DetectorConstruction.h:116
Ex03DetectorConstruction::fNbOfLayers
Int_t fNbOfLayers
The number of calorimeter layers.
Definition
Ex03DetectorConstruction.h:114
Ex03DetectorConstruction::Ex03DetectorConstruction
Ex03DetectorConstruction()
Ex03DetectorConstruction::GetNbOfLayers
Int_t GetNbOfLayers() const
Definition
Ex03DetectorConstruction.h:71
Ex03DetectorConstruction::fUseReflection
Bool_t fUseReflection
Enable reflected sensitive placements.
Definition
Ex03DetectorConstruction.h:129
Ex03DetectorConstruction::GetCalorSizeYZ
Double_t GetCalorSizeYZ() const
Definition
Ex03DetectorConstruction.h:80
Ex03DetectorConstruction::SetNbOfLayers
void SetNbOfLayers(Int_t value)
Ex03DetectorConstruction::fGapThickness
Double_t fGapThickness
The gap thickness.
Definition
Ex03DetectorConstruction.h:121
Ex03DetectorConstruction::fDefaultMaterial
TString fDefaultMaterial
The default material name.
Definition
Ex03DetectorConstruction.h:123
Ex03DetectorConstruction::SetRequireReflectedHits
void SetRequireReflectedHits(Bool_t value)
Require reflected hits in every event of the optional regression test.
Definition
Ex03DetectorConstruction.h:60
Ex03DetectorConstruction::SetGapThickness
void SetGapThickness(Double_t value)
Ex03DetectorConstruction::ConstructGeometry
void ConstructGeometry()
Ex03DetectorConstruction::GetWorldSizeYZ
Double_t GetWorldSizeYZ() const
Definition
Ex03DetectorConstruction.h:77
Ex03DetectorConstruction::GetAbsorberThickness
Double_t GetAbsorberThickness() const
Definition
Ex03DetectorConstruction.h:86
Ex03DetectorConstruction::PrintCalorParameters
void PrintCalorParameters()
Ex03DetectorConstruction::SetAbsorberThickness
void SetAbsorberThickness(Double_t value)
Ex03DetectorConstruction::GetGapThickness
Double_t GetGapThickness() const
Definition
Ex03DetectorConstruction.h:89
Ex03DetectorConstruction::fRequireReflectedHits
Bool_t fRequireReflectedHits
Enable the per-event regression check.
Definition
Ex03DetectorConstruction.h:130
Ex03DetectorConstruction::fAbsorberMaterial
TString fAbsorberMaterial
The absorber material name.
Definition
Ex03DetectorConstruction.h:124
Ex03DetectorConstruction::fLayerThickness
Double_t fLayerThickness
The calorimeter layer thickness.
Definition
Ex03DetectorConstruction.h:119
Ex03DetectorConstruction::fGapMaterial
TString fGapMaterial
The gap material name.
Definition
Ex03DetectorConstruction.h:125
Ex03DetectorConstruction::GetCalorThickness
Double_t GetCalorThickness() const
Definition
Ex03DetectorConstruction.h:83
Ex03DetectorConstruction::GetUseReflection
Bool_t GetUseReflection() const
Definition
Ex03DetectorConstruction.h:66
Ex03DetectorConstruction::fAbsorberThickness
Double_t fAbsorberThickness
The absorber thickness.
Definition
Ex03DetectorConstruction.h:120
Ex03DetectorConstruction::SetUseReflection
void SetUseReflection(Bool_t value)
Split sensitive slabs into normal and reflected half-thickness placements.
Definition
Ex03DetectorConstruction.h:58
Ex03DetectorConstruction::SetAbsorberMaterial
void SetAbsorberMaterial(const TString &materialName)
Ex03DetectorConstruction::SetDefaultMaterial
void SetDefaultMaterial(const TString &materialName)
Ex03DetectorConstruction::SetControls
void SetControls()
Ex03DetectorConstruction::SetCuts
void SetCuts()
Ex03DetectorConstruction::fCalorThickness
Double_t fCalorThickness
The calorimeter thickness.
Definition
Ex03DetectorConstruction.h:118
Ex03DetectorConstruction::ConstructMaterials
void ConstructMaterials()
Ex03DetectorConstruction::GetWorldSizeX
Double_t GetWorldSizeX() const
Definition
Ex03DetectorConstruction.h:74
Ex03DetectorConstruction::ComputeCalorParameters
void ComputeCalorParameters()
Ex03DetectorConstruction::SetCalorSizeYZ
void SetCalorSizeYZ(Double_t value)
Ex03DetectorConstruction::GetRequireReflectedHits
Bool_t GetRequireReflectedHits() const
Definition
Ex03DetectorConstruction.h:68
Ex03DetectorConstruction::fWorldSizeX
Double_t fWorldSizeX
The world size x component.
Definition
Ex03DetectorConstruction.h:115
Ex03DetectorConstruction::SetGapMaterial
void SetGapMaterial(const TString &materialName)
Ex03DetectorConstruction::fCalorSizeYZ
Double_t fCalorSizeYZ
The calorimeter size y,z component.
Definition
Ex03DetectorConstruction.h:117
TObject
Ex03DetectorConstruction::MaterialCuts::fName
TString fName
Definition
Ex03DetectorConstruction.h:103
Ex03DetectorConstruction::MaterialCuts::fCUTELE
Double_t fCUTELE
Definition
Ex03DetectorConstruction.h:106
Ex03DetectorConstruction::MaterialCuts::fDCUTE
Double_t fDCUTE
Definition
Ex03DetectorConstruction.h:107
Ex03DetectorConstruction::MaterialCuts::fCUTGAM
Double_t fCUTGAM
Definition
Ex03DetectorConstruction.h:104
Ex03DetectorConstruction::MaterialCuts::MaterialCuts
MaterialCuts(TString name, Double_t p1, Double_t p2, Double_t p3, Double_t p4)
Definition
Ex03DetectorConstruction.h:95
Ex03DetectorConstruction::MaterialCuts::fBCUTE
Double_t fBCUTE
Definition
Ex03DetectorConstruction.h:105
Generated on
for VMC Examples by
1.17.0