BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesPip Class Reference

#include <BesPip.hh>

Inheritance diagram for BesPip:

Public Member Functions

 BesPip ()
virtual ~BesPip ()
void Construct (G4LogicalVolume *logicbes)
void DefineMaterial ()
Public Member Functions inherited from BesSubdetector
 BesSubdetector ()
virtual ~BesSubdetector ()
G4LogicalVolume * FindLogicalVolume (const G4String &vn)
 BesSubdetector ()
virtual ~BesSubdetector ()
G4LogicalVolume * FindLogicalVolume (const G4String &vn)
 BesSubdetector ()
virtual ~BesSubdetector ()
G4LogicalVolume * FindLogicalVolume (const G4String &vn)

Additional Inherited Members

Protected Attributes inherited from BesSubdetector
SAXProcessor m_sxp
ProcessingConfigurator m_config

Detailed Description

Definition at line 19 of file BesPip.hh.

Constructor & Destructor Documentation

◆ BesPip()

BesPip::BesPip ( )

Definition at line 26 of file BesPip.cc.

26 {
27 pipPar = new BesPipParameter();
28 pipPar->ReadData();
29 for ( G4int i = 0; i < 3; i++ )
30 {
31 goldLayer[i] = pipPar->getGoldLayer( i );
32 innerBe[i] = pipPar->getInnerBe( i );
33 oilLayer[i] = pipPar->getOilLayer( i );
34 outerBe[i] = pipPar->getOuterBe( i );
35 }
36
37 for ( G4int i = 0; i < 5; i++ )
38 {
39 innerBeSide[i] = pipPar->getInnerBeSide( i );
40 innerAl[i] = pipPar->getInnerAl( i );
41 AlRing[i] = pipPar->getAlRing( i );
42 outerAl[i] = pipPar->getOuterAl( i );
43 AgLayer[i] = pipPar->getAgLayer( i );
44 CuLayer[i] = pipPar->getCuLayer( i );
45 AlCover[i] = pipPar->getAlCover( i );
46 }
47
48 logicalPip = 0;
49 physicalPip = 0;
50
51 logicalgoldLayer = 0;
52 physicalgoldLayer = 0;
53
54 logicalinnerBe = 0;
55 physicalinnerBe = 0;
56
57 logicaloilLayer = 0;
58 physicaloilLayer = 0;
59
60 logicalouterBe = 0;
61 physicalouterBe = 0;
62
63 logicalinnerBeSide = 0;
64 physicalinnerBeSide = 0;
65
66 logicalinnerAl = 0;
67 physicalinnerAl = 0;
68
69 logicalAlRing = 0;
70 physicalAlRing = 0;
71
72 logicalouterAl = 0;
73 physicalouterAl = 0;
74
75 logicalAgLayer = 0;
76 physicalAgLayer = 0;
77
78 logicalCuLayer = 0;
79 physicalCuLayer = 0;
80
81 logicalAlCover = 0;
82 physicalAlCover = 0;
83
84 Au = 0;
85 Ag = 0;
86 Oil = 0;
87}

◆ ~BesPip()

virtual BesPip::~BesPip ( )
inlinevirtual

Definition at line 22 of file BesPip.hh.

22{ ; }

Member Function Documentation

◆ Construct()

void BesPip::Construct ( G4LogicalVolume * logicbes)
virtual

Implements BesSubdetector.

Definition at line 114 of file BesPip.cc.

114 {
116
117 // G4RotationMatrix* xRot = new G4RotationMatrix;
118 // xRot->rotateX(90*deg);
119
120 // the logical volume of beam pipe
121 G4Tubs* solidPip1 = new G4Tubs( "solidPip1", 0., 33.7, 134, 0, 360 );
122 G4Tubs* solidPip2 = new G4Tubs( "solidPip2", 0., 48, 66, 0, 360 );
123 G4UnionSolid* solidPip_tmp =
124 new G4UnionSolid( "solidPip_tmp", solidPip1, solidPip2, 0, G4ThreeVector( 0, 0, -167 ) );
125 G4UnionSolid* solidPip =
126 new G4UnionSolid( "solidPip", solidPip_tmp, solidPip2, 0, G4ThreeVector( 0, 0, 167 ) );
127 logicalPip =
128 new G4LogicalVolume( solidPip, G4Material::GetMaterial( "Beam" ), "logicalPip" );
129 physicalPip = new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalPip, "physicalPip",
130 logicalbes, false, 0 );
131
132 // the volume of gold layer
133 G4Tubs* solidgoldLayer =
134 new G4Tubs( "solidgoldLayer", goldLayer[0], goldLayer[1], goldLayer[2] / 2, 0, 360 );
135 logicalgoldLayer = new G4LogicalVolume( solidgoldLayer, Au, "logicalgoldLayer" );
136 physicalgoldLayer = new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalgoldLayer,
137 "physicalgoldLayer", logicalPip, false, 0 );
138
139 // the volume of inner Be pipe
140 G4Tubs* solidinnerBe =
141 new G4Tubs( "solidinnerBe", innerBe[0], innerBe[1], innerBe[2] / 2, 0, 360 );
142 logicalinnerBe = new G4LogicalVolume( solidinnerBe, G4Material::GetMaterial( "Beryllium" ),
143 "logicalinnerBe" );
144 physicalinnerBe = new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalinnerBe,
145 "physicalinnerBe", logicalPip, false, 0 );
146
147 // the volume of oil layer
148 G4Tubs* solidoilLayer =
149 new G4Tubs( "solidoilLayer", oilLayer[0], oilLayer[1], oilLayer[2] / 2, 0, 360 );
150 logicaloilLayer = new G4LogicalVolume( solidoilLayer, Oil, "logicaloilLayer" );
151 physicaloilLayer = new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicaloilLayer,
152 "physicaloilLayer", logicalPip, false, 0 );
153
154 // the volume of outer Be pipe
155 G4Tubs* solidouterBe =
156 new G4Tubs( "solidouterBe", outerBe[0], outerBe[1], outerBe[2] / 2, 0, 360 );
157 logicalouterBe = new G4LogicalVolume( solidouterBe, G4Material::GetMaterial( "Beryllium" ),
158 "logicalouterBe" );
159 physicalouterBe = new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalouterBe,
160 "physicalouterBe", logicalPip, false, 0 );
161
162 // the volume of inner side Be layer
163 G4Tubs* solidinnerBeSide = new G4Tubs( "solidinnerBeSide", innerBeSide[0], innerBeSide[1],
164 innerBeSide[2] / 2, 0, 360 );
165 logicalinnerBeSide = new G4LogicalVolume(
166 solidinnerBeSide, G4Material::GetMaterial( "Beryllium" ), "logicalinnerBeSide" );
167 physicalinnerBeSide =
168 new G4PVPlacement( 0, G4ThreeVector( 0, 0, innerBeSide[3] ), logicalinnerBeSide,
169 "physicalinnerBeSide1", logicalPip, false, 0 );
170 new G4PVPlacement( 0, G4ThreeVector( 0, 0, innerBeSide[4] ), logicalinnerBeSide,
171 "physicalinnerBeSide2", logicalPip, false, 1 );
172
173 // the volume of inner Al layer
174 G4Tubs* solidinnerAl =
175 new G4Tubs( "solidinnerAl", innerAl[0], innerAl[1], innerAl[2] / 2, 0, 360 );
176 logicalinnerAl = new G4LogicalVolume( solidinnerAl, G4Material::GetMaterial( "Aluminium" ),
177 "logicalinnerAl" );
178 physicalinnerAl = new G4PVPlacement( 0, G4ThreeVector( 0, 0, innerAl[3] ), logicalinnerAl,
179 "physicalinnerAl1", logicalPip, false, 0 );
180 new G4PVPlacement( 0, G4ThreeVector( 0, 0, innerAl[4] ), logicalinnerAl, "physicalinnerAl2",
181 logicalPip, false, 1 );
182
183 // the volume of Al ring
184 G4Tubs* solidAlRing =
185 new G4Tubs( "solidAlRing", AlRing[0], AlRing[1], AlRing[2] / 2, 0, 360 );
186 logicalAlRing = new G4LogicalVolume( solidAlRing, G4Material::GetMaterial( "Aluminium" ),
187 "logicalAlRing" );
188 physicalAlRing = new G4PVPlacement( 0, G4ThreeVector( 0, 0, AlRing[3] ), logicalAlRing,
189 "physicalAlRing1", logicalPip, false, 0 );
190 new G4PVPlacement( 0, G4ThreeVector( 0, 0, AlRing[4] ), logicalAlRing, "physicalAlRing2",
191 logicalPip, false, 1 );
192
193 // the volume of outer Al layer
194 G4Tubs* solidouterAl =
195 new G4Tubs( "solidouterAl", outerAl[0], outerAl[1], outerAl[2] / 2, 0, 360 );
196 logicalouterAl = new G4LogicalVolume( solidouterAl, G4Material::GetMaterial( "Aluminium" ),
197 "logicalouterAl" );
198 physicalouterAl = new G4PVPlacement( 0, G4ThreeVector( 0, 0, outerAl[3] ), logicalouterAl,
199 "physicalouterAl1", logicalPip, false, 0 );
200 new G4PVPlacement( 0, G4ThreeVector( 0, 0, outerAl[4] ), logicalouterAl, "physicalouterAl2",
201 logicalPip, false, 1 );
202
203 // the volume of Ag layer
204 G4Tubs* solidAgLayer =
205 new G4Tubs( "solidAgLayer", AgLayer[0], AgLayer[1], AgLayer[2] / 2, 0, 360 );
206 logicalAgLayer = new G4LogicalVolume( solidAgLayer, Ag, "logicalAgLayer" );
207 physicalAgLayer = new G4PVPlacement( 0, G4ThreeVector( 0, 0, AgLayer[3] ), logicalAgLayer,
208 "physicalAgLayer1", logicalPip, false, 0 );
209 new G4PVPlacement( 0, G4ThreeVector( 0, 0, AgLayer[4] ), logicalAgLayer, "physicalAgLayer2",
210 logicalPip, false, 1 );
211
212 // the volume of Cu layer
213 G4Tubs* solidCuLayer =
214 new G4Tubs( "solidCuLayer", CuLayer[0], CuLayer[1], CuLayer[2] / 2, 0, 360 );
215 logicalCuLayer = new G4LogicalVolume( solidCuLayer, G4Material::GetMaterial( "Copper" ),
216 "logicalCuLayer" );
217 physicalCuLayer = new G4PVPlacement( 0, G4ThreeVector( 0, 0, CuLayer[3] ), logicalCuLayer,
218 "physicalCuLayer1", logicalPip, false, 0 );
219 new G4PVPlacement( 0, G4ThreeVector( 0, 0, CuLayer[4] ), logicalCuLayer, "physicalCuLayer2",
220 logicalPip, false, 1 );
221
222 // the volume of Al cover
223 G4Tubs* solidAlCover =
224 new G4Tubs( "solidAlCover", AlCover[0], AlCover[1], AlCover[2] / 2, 0, 360 );
225 logicalAlCover = new G4LogicalVolume( solidAlCover, G4Material::GetMaterial( "Aluminium" ),
226 "logicalAlCover" );
227 physicalAlCover = new G4PVPlacement( 0, G4ThreeVector( 0, 0, AlCover[3] ), logicalAlCover,
228 "physicalAlCover1", logicalPip, false, 0 );
229 new G4PVPlacement( 0, G4ThreeVector( 0, 0, AlCover[4] ), logicalAlCover, "physicalAlCover2",
230 logicalPip, false, 1 );
231
232 G4VisAttributes* visPip = new G4VisAttributes( G4Colour( 0., 0., 1. ) );
233 logicalPip->SetVisAttributes( visPip );
234 // logicalPip->SetVisAttributes(G4VisAttributes::Invisible);
235 G4VisAttributes* visgold = new G4VisAttributes( G4Colour( 1., 1., 0. ) );
236 logicalgoldLayer->SetVisAttributes( visgold );
237 // logicalgoldLayer->SetVisAttributes(G4VisAttributes::Invisible);
238 G4VisAttributes* visBe = new G4VisAttributes( G4Colour( 0., 1., 0. ) );
239 logicalinnerBe->SetVisAttributes( visBe );
240 // logicalinnerBe->SetVisAttributes(G4VisAttributes::Invisible);
241 G4VisAttributes* visOil = new G4VisAttributes( G4Colour( 1., 1., 1. ) );
242 logicaloilLayer->SetVisAttributes( visOil );
243 // logicaloilLayer->SetVisAttributes(G4VisAttributes::Invisible);
244 logicalouterBe->SetVisAttributes( visBe );
245 // logicalouterBe->SetVisAttributes(G4VisAttributes::Invisible);
246 logicalinnerBeSide->SetVisAttributes( visBe );
247 // logicalinnerBeSide->SetVisAttributes(G4VisAttributes::Invisible);
248 logicalinnerAl->SetVisAttributes( visOil );
249 // logicalinnerAl->SetVisAttributes(G4VisAttributes::Invisible);
250 logicalAlRing->SetVisAttributes( visOil );
251 // logicalAlRing->SetVisAttributes(G4VisAttributes::Invisible);
252 logicalouterAl->SetVisAttributes( visOil );
253 // logicalouterAl->SetVisAttributes(G4VisAttributes::Invisible);
254 logicalAgLayer->SetVisAttributes( visBe );
255 // logicalAgLayer->SetVisAttributes(G4VisAttributes::Invisible);
256 logicalCuLayer->SetVisAttributes( visPip );
257 // logicalCuLayer->SetVisAttributes(G4VisAttributes::Invisible);
258 logicalAlCover->SetVisAttributes( visOil );
259 // logicalAlCover->SetVisAttributes(G4VisAttributes::Invisible);
260}
void DefineMaterial()
Definition BesPip.cc:89

◆ DefineMaterial()

void BesPip::DefineMaterial ( )

Definition at line 89 of file BesPip.cc.

89 {
90 G4double density, a, z, fractionmass;
91 G4int nel, natoms;
92 G4String name, symbol;
93
94 density = 19.32 * g / cm3;
95 a = 196.967 * g / mole;
96 Au = new G4Material( "Gold", 79, a, density );
97
98 density = 10.5 * g / cm3;
99 a = 107.9 * g / mole;
100 Ag = new G4Material( "Silver", 47, a, density );
101
102 a = 1.01 * g / mole;
103 G4Element* H = new G4Element( name = "Hydrogen", symbol = "H", z = 1., a );
104
105 a = 12.01 * g / mole;
106 G4Element* C = new G4Element( name = "Carbon", symbol = "C", z = 6., a );
107
108 density = 0.810 * g / cm3;
109 Oil = new G4Material( name = "Oil", density, nel = 2 );
110 Oil->AddElement( C, natoms = 18 );
111 Oil->AddElement( H, natoms = 38 );
112}
***************************************************************************************Pseudo Class RRes *****************************************************************************************Parameters and physical constants **Maarten sept ************************************************************************DOUBLE PRECISION xsmu **************************************************************************PARTICLE DATA all others are from PDG *Only resonances with known widths into electron pairs are sept ************************************************************************C Declarations C
Definition RRes.h:29
IMPLICIT REAL *A H
Definition myXsection.h:1

Referenced by Construct().


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