Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Proyecto de Maestria Yessica
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yessica Dominguez
Proyecto de Maestria Yessica
Commits
371ecfe7
Commit
371ecfe7
authored
1 year ago
by
Yessica Dominguez
Browse files
Options
Downloads
Patches
Plain Diff
Delete construction.cc
parent
37aeec5f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CODE/construction.cc
+0
-144
0 additions, 144 deletions
CODE/construction.cc
with
0 additions
and
144 deletions
CODE/construction.cc
deleted
100644 → 0
+
0
−
144
View file @
37aeec5f
#include
"construction.hh"
MyDetectorConstruction
::
MyDetectorConstruction
()
{
//************************//
// Number of layer //
nCols
=
10
;
nRows
=
10
;
fMessenger
=
new
G4GenericMessenger
(
this
,
"/detector/"
,
"Detector Construction"
);
fMessenger
->
DeclareProperty
(
"nCols"
,
nCols
,
"Number of cols"
);
fMessenger
->
DeclareProperty
(
"nRows"
,
nRows
,
"Number of rows"
);
fMessenger
->
DeclareProperty
(
"atmosphere"
,
isAtmosphere
,
"Construct Atmosphere"
);
DefineMaterials
();
isAtmosphere
=
true
;
//************************//
//Dimensions of Atmosphere//
xWorld
=
1000.
*
m
;
yWorld
=
1000.
*
m
;
zWorld
=
1000.
*
m
;
}
MyDetectorConstruction
::~
MyDetectorConstruction
()
{}
//***********************************//
// Materials //
void
MyDetectorConstruction
::
DefineMaterials
()
{
G4NistManager
*
nist
=
G4NistManager
::
Instance
();
worldMat
=
nist
->
FindOrBuildMaterial
(
"G4_AIR"
);
//**********************//
G4double
density0
=
1.29
*
kg
/
m3
;
//Set it molar mass of elemets in the Atmosphere//
G4double
aN
=
14.01
*
g
/
mole
;
G4double
aO
=
16.00
*
g
/
mole
;
G4double
aAr
=
39.95
*
g
/
mole
;
//************************//
//G4Element("Name of element", "Abreviation", atomic number, atomic masa) //
G4Element
*
elN
=
new
G4Element
(
"Nitrogen"
,
"N"
,
7
,
aN
);
G4Element
*
elO
=
new
G4Element
(
"Oxygen"
,
"O"
,
8
,
aO
);
G4Element
*
elAr
=
new
G4Element
(
"Argon"
,
"Ar"
,
18
,
aAr
);
//**********************//
//Set it Constants //
G4double
f
=
3
;
//degrees of freedom
G4double
R
=
8.3144626181532
;
// Universal constant of gas
G4double
g0
=
9.81
;
// Gravity
G4double
kappa
=
(
f
+
2
)
/
f
;
// parametrization
G4double
T
=
293.15
;
// Standard temperatur at sea level
G4double
M
=
(
0.23
*
14.01
+
0.76
*
16.0
+
0.01
*
39.95
)
/
1000.
;
// Average molar mass of atmosphere
//*****************************//
// Creating the air
for
(
G4int
i
=
0
;
i
<
10
;
i
++
)
{
std
::
stringstream
stri
;
stri
<<
i
;
G4double
h
=
2.e3
/
10.
*
i
;
//h is the heught of each layer
//Divide by 5 because is the number of layers
G4double
density
=
density0
*
pow
((
1
-
(
kappa
-
1
)
/
kappa
*
M
*
g0
*
h
/
(
R
*
T
)),
(
1
/
(
kappa
-
1
)));
Air
[
i
]
=
new
G4Material
(
"G4_AIR_"
+
stri
.
str
(),
density
,
3
);
//("G4_AIR_" + stri.str() is the name of the material. It uses a string that combines "G4_AIR_" with the value of stri.str() to create unique names for each material.)
// Add the elements and their amount
Air
[
i
]
->
AddElement
(
elN
,
76
*
perCent
);
Air
[
i
]
->
AddElement
(
elO
,
23
*
perCent
);
Air
[
i
]
->
AddElement
(
elAr
,
1
*
perCent
);
}
}
//MATERIAL SESSION END
//********************************//
//ATMOSPHERE SET UP
void
MyDetectorConstruction
::
ConstructAtmosphere
()
{
solidAir
=
new
G4Box
(
"solidAir"
,
xWorld
,
yWorld
,
zWorld
/
10.
);
//*********************************//
// IT create layer : Air[0],Air[1]..., Air[4]
for
(
G4int
i
=
0
;
i
<
10
;
i
++
)
{
logicAir
[
i
]
=
new
G4LogicalVolume
(
solidAir
,
Air
[
i
],
"logicAir"
);
physAir
[
i
]
=
new
G4PVPlacement
(
0
,
G4ThreeVector
(
0
,
0
,
zWorld
/
10.
*
2.
*
i
-
zWorld
+
zWorld
/
10.
),
logicAir
[
i
],
"physAir"
,
logicWorld
,
false
,
i
,
true
);
}
}
//********************************//
//END ATMOSPHERE
//
//************************************//
G4VPhysicalVolume
*
MyDetectorConstruction
::
Construct
()
{
// CREATE THE WORLD
solidWorld
=
new
G4Box
(
"solidWorld"
,
xWorld
,
yWorld
,
zWorld
);
logicWorld
=
new
G4LogicalVolume
(
solidWorld
,
worldMat
,
"logicWorld"
);
physWorld
=
new
G4PVPlacement
(
0
,
G4ThreeVector
(
0.
,
0.
,
0.
),
logicWorld
,
"physWorld"
,
0
,
false
,
0
,
true
);
// CREATE ATMOSPHERE
if
(
isAtmosphere
)
ConstructAtmosphere
();
return
physWorld
;
}
void
MyDetectorConstruction
::
ConstructSDandField
()
{}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment