VMC Examples Version 6.6
Loading...
Searching...
No Matches
Ex01DetectorConstructionOld Class Reference

The old (deprecated) detector construction class. More...

#include <Ex01DetectorConstructionOld.h>

Inheritance diagram for Ex01DetectorConstructionOld:

Public Member Functions

 Ex01DetectorConstructionOld ()
 
virtual ~Ex01DetectorConstructionOld ()
 
void ConstructMaterials ()
 
void ConstructVolumes ()
 

Private Attributes

Int_t fImedAr
 The Argon medium Id.
 
Int_t fImedAl
 The Aluminium medium Id.
 
Int_t fImedPb
 The Lead medium Id.
 

Detailed Description

The old (deprecated) detector construction class.

Geometry definition via VMC (for testing purposes only). The recomended way of geometry definition is using TGeo geometry modeller.

Date
21/04/2002 Separated from Ex01MCAopplication, 08/12/2006
Author
I. Hrivnacova; IPN, Orsay

Definition at line 37 of file Ex01DetectorConstructionOld.h.

Constructor & Destructor Documentation

◆ Ex01DetectorConstructionOld()

Ex01DetectorConstructionOld::Ex01DetectorConstructionOld ( )

Default constructor

Definition at line 33 of file Ex01DetectorConstructionOld.cxx.

34 : TObject(), fImedAr(0), fImedAl(0), fImedPb(0)
35{
36 /// Default constructor
37}
Int_t fImedAl
The Aluminium medium Id.

◆ ~Ex01DetectorConstructionOld()

Ex01DetectorConstructionOld::~Ex01DetectorConstructionOld ( )
virtual

Destructor

Definition at line 40 of file Ex01DetectorConstructionOld.cxx.

41{
42 /// Destructor
43}

Member Function Documentation

◆ ConstructMaterials()

void Ex01DetectorConstructionOld::ConstructMaterials ( )

Construct materials using VMC functions

Definition at line 46 of file Ex01DetectorConstructionOld.cxx.

47{
48 /// Construct materials using VMC functions
49
50 Double_t a;
51 Double_t z;
52 Double_t density;
53 Double_t radl;
54 Double_t absl;
55 Float_t* ubuf = 0;
56
57 a = 39.95;
58 z = 18.;
59 density = 1.782e-03;
60 radl = 0.1;
61 absl = 0.1;
62 Int_t imatAr;
63 gMC->Material(imatAr, "ArgonGas", a, z, density, radl, absl, ubuf, 0);
64
65 a = 26.98;
66 z = 13.;
67 density = 2.7;
68 radl = 0.1;
69 absl = 0.1;
70 Int_t imatAl;
71 gMC->Material(imatAl, "Aluminium", a, z, density, radl, absl, ubuf, 0);
72 // user defined parameters (only for test)
73 // Float_t ubuf2[3];
74 // ubuf2[0]=5.5; ubuf2[1]=6.5; ubuf2[2] = 7.5;
75 // gMC->Material(imatAl, "Aluminium", a, z, density, radl, absl, ubuf2, 3);
76
77 a = 207.19;
78 z = 82.;
79 density = 11.35;
80 radl = 0.1;
81 absl = 0.1;
82 Int_t imatLead;
83 gMC->Material(imatLead, "Lead", a, z, density, radl, absl, ubuf, 0);
84
85 // Polyethylene
86 // Mixture defined with the negative number of component, to test updating
87 // wmat. (If nlmat < 0 then wmat contains the number of atoms of a given kind
88 // into the molecule of the compound. In this case, wmat in output is changed
89 // to relative weights.)
90 Float_t apoly[2] = { 12.01, 1. };
91 Float_t zpoly[2] = { 6., 1. };
92 Float_t wpoly[2] = { .33, .67 };
93 Int_t imatPoly;
94 cout << "imatPoly"
95 << " wpoly: " << wpoly[0] << ", " << wpoly[1] << endl;
96 gMC->Mixture(imatPoly, "POLYETHYLEN0$", apoly, zpoly, .95, -2, wpoly);
97 cout << "imatPoly"
98 << " wpoly: " << wpoly[0] << ", " << wpoly[1] << endl;
99
100 //
101 // Tracking medias
102 //
103
104 Int_t ifield = 0; // No magnetic field
105 Double_t fieldm = 0.; //
106 Double_t epsil = .001; // Tracking precision,
107 Double_t stemax = -0.01; // Maximum displacement for multiple scat
108 Double_t tmaxfd = -20.; // Maximum angle due to field deflection
109 Double_t deemax = -.3; // Maximum fractional energy loss, DLS
110 Double_t stmin = -.8;
111 gMC->Medium(fImedAr, "ArgonGas", imatAr, 0, ifield, fieldm, tmaxfd, stemax,
112 deemax, epsil, stmin, ubuf, 0);
113 gMC->Medium(fImedAl, "Aluminium", imatAl, 0, ifield, fieldm, tmaxfd, stemax,
114 deemax, epsil, stmin, ubuf, 0);
115 gMC->Medium(fImedPb, "Lead", imatLead, 0, ifield, fieldm, tmaxfd, stemax,
116 deemax, epsil, stmin, ubuf, 0);
117}

◆ ConstructVolumes()

void Ex01DetectorConstructionOld::ConstructVolumes ( )

Construct volumes using VMC functions

Definition at line 120 of file Ex01DetectorConstructionOld.cxx.

121{
122 /// Construct volumes using VMC functions
123
124 //------------------------------ experimental hall (world volume)
125 //------------------------------ beam line along x axis
126
127 Double_t expHall[3];
128 expHall[0] = 300.;
129 expHall[1] = 100.;
130 expHall[2] = 100.;
131 gMC->Gsvolu("EXPH", "BOX", fImedAr, expHall, 3);
132
133 //------------------------------ a tracker tube
134
135 Double_t trackerTube[3];
136 trackerTube[0] = 0.;
137 trackerTube[1] = 60.;
138 trackerTube[2] = 50.;
139 gMC->Gsvolu("TRTU", "TUBE", fImedAl, trackerTube, 3);
140
141 Double_t posX = -100.;
142 Double_t posY = 0.;
143 Double_t posZ = 0.;
144 gMC->Gspos("TRTU", 1, "EXPH", posX, posY, posZ, 0, "ONLY");
145
146 //------------------------------ a calorimeter block
147
148 Double_t calBox[3];
149 calBox[0] = 100.;
150 calBox[1] = 50.;
151 calBox[2] = 50.;
152 gMC->Gsvolu("CALB", "BOX", fImedPb, calBox, 3);
153
154 posX = 100.;
155 posY = 0.;
156 posZ = 0.;
157 gMC->Gspos("CALB", 1, "EXPH", posX, posY, posZ, 0, "ONLY");
158
159 //------------------------------ calorimeter layers
160
161 Double_t layerBox[3];
162 layerBox[0] = 1.;
163 layerBox[1] = 40.;
164 layerBox[2] = 40.;
165 gMC->Gsvolu("LAYB", "BOX", fImedAl, layerBox, 3);
166
167 for (Int_t i = 0; i < 19; i++) {
168 posX = (i - 9) * 10.;
169 posY = 0.;
170 posZ = 0.;
171 gMC->Gspos("LAYB", i, "CALB", posX, posY, posZ, 0, "ONLY");
172 }
173}

Member Data Documentation

◆ fImedAr

Int_t Ex01DetectorConstructionOld::fImedAr
private

The Argon medium Id.

Definition at line 49 of file Ex01DetectorConstructionOld.h.

◆ fImedAl

Int_t Ex01DetectorConstructionOld::fImedAl
private

The Aluminium medium Id.

Definition at line 50 of file Ex01DetectorConstructionOld.h.

◆ fImedPb

Int_t Ex01DetectorConstructionOld::fImedPb
private

The Lead medium Id.

Definition at line 51 of file Ex01DetectorConstructionOld.h.


The documentation for this class was generated from the following files: