Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
np
nptool
Commits
158d64f2
Commit
158d64f2
authored
9 years ago
by
Robert Shearman
Browse files
Options
Downloads
Patches
Plain Diff
Added extra leaves, added plastic shield
parent
776e1ea2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NPSimulation/Nana/Nana.cc
+65
-9
65 additions, 9 deletions
NPSimulation/Nana/Nana.cc
with
65 additions
and
9 deletions
NPSimulation/Nana/Nana.cc
+
65
−
9
View file @
158d64f2
...
@@ -63,7 +63,7 @@ Nana::Nana(){
...
@@ -63,7 +63,7 @@ Nana::Nana(){
m_PMTVisAtt
=
new
G4VisAttributes
(
G4Colour
(
0.1
,
0.3
,
0.5
));
m_PMTVisAtt
=
new
G4VisAttributes
(
G4Colour
(
0.1
,
0.3
,
0.5
));
// Grey wireframe
// Grey wireframe
m_DetectorCasingVisAtt
=
new
G4VisAttributes
(
G4Colour
(
0.5
,
0.5
,
0.5
,
0.
2
));
m_DetectorCasingVisAtt
=
new
G4VisAttributes
(
G4Colour
(
0.
12
5
,
0.
12
5
,
0.
12
5
,
0.
4
));
m_LogicalDetector
=
0
;
m_LogicalDetector
=
0
;
m_LaBr3Scorer
=
0
;
m_LaBr3Scorer
=
0
;
...
@@ -386,12 +386,30 @@ G4LogicalVolume* Nana::ConstructDetector(){
...
@@ -386,12 +386,30 @@ G4LogicalVolume* Nana::ConstructDetector(){
// Visualisation of PMT Strip
// Visualisation of PMT Strip
logicPMT
->
SetVisAttributes
(
m_PMTVisAtt
);
logicPMT
->
SetVisAttributes
(
m_PMTVisAtt
);
// Lead shielding
/*
// Plastic Lead shielding
//plastic definition
// LaBr3
G4int ncomponents, natoms;
G4double z, density;
G4double percent = .5;
G4Element* C = new G4Element("Carbon","C" , z= 6., 12.0107*g/mole);
G4Element* H = new G4Element("Hydrogen","H" , z= 1.,1.00794*g/mole );
G4Element* O = new G4Element("Oxygen","O" , z= 8., 15.999*g/mole);
G4Element* W = new G4Element("Tungsten","W" , z= 74., 183.84*g/mole);
density = percent * 4.5*g/cm3;
G4Material* PCA = new G4Material("PCA", density, ncomponents=4);
PCA->AddElement(C, natoms=6);
PCA->AddElement(H, natoms=8);
PCA->AddElement(O, natoms=4);
PCA->AddElement(W, natoms=1);
// A
// A
G4ThreeVector positionLeadAShield = G4ThreeVector(0, 0, LeadAShield_PosZ);
G4ThreeVector positionLeadAShield = G4ThreeVector(0, 0, LeadAShield_PosZ);
G4Tubs* solidLeadA = new G4Tubs("solidLead", 0.5*LeadAMinR, 0.5*LeadAMaxR, 0.5*LeadALength, 0.*deg, 360.*deg);
G4Tubs* solidLeadA = new G4Tubs("solidLead", 0.5*LeadAMinR, 0.5*LeadAMaxR, 0.5*LeadALength, 0.*deg, 360.*deg);
G4LogicalVolume
*
logicLeadAShield
=
new
G4LogicalVolume
(
solidLeadA
,
Lead
,
"logicLeadAShield"
,
0
,
0
,
0
);
G4LogicalVolume* logicLeadAShield = new G4LogicalVolume(solidLeadA,
PCA
, "logicLeadAShield", 0, 0, 0);
new G4PVPlacement(0,
new G4PVPlacement(0,
positionLeadAShield,
positionLeadAShield,
...
@@ -403,7 +421,7 @@ G4LogicalVolume* Nana::ConstructDetector(){
...
@@ -403,7 +421,7 @@ G4LogicalVolume* Nana::ConstructDetector(){
// B
// B
G4ThreeVector positionLeadBShield = G4ThreeVector(0, 0, LeadBShield_PosZ);
G4ThreeVector positionLeadBShield = G4ThreeVector(0, 0, LeadBShield_PosZ);
G4Tubs* solidLeadB = new G4Tubs("solidLead", 0.5*LeadBMinR, 0.5*LeadBMaxR, 0.5*LeadBLength, 0.*deg, 360.*deg);
G4Tubs* solidLeadB = new G4Tubs("solidLead", 0.5*LeadBMinR, 0.5*LeadBMaxR, 0.5*LeadBLength, 0.*deg, 360.*deg);
G4LogicalVolume
*
logicLeadBShield
=
new
G4LogicalVolume
(
solidLeadB
,
Lead
,
"logicLeadBShield"
,
0
,
0
,
0
);
G4LogicalVolume* logicLeadBShield = new G4LogicalVolume(solidLeadB,
PCA
, "logicLeadBShield", 0, 0, 0);
new G4PVPlacement(0,
new G4PVPlacement(0,
positionLeadBShield,
positionLeadBShield,
...
@@ -413,11 +431,49 @@ G4LogicalVolume* Nana::ConstructDetector(){
...
@@ -413,11 +431,49 @@ G4LogicalVolume* Nana::ConstructDetector(){
false,
false,
0);
0);
// Visualisation of PMT Strip
// Visualisation of PMT Strip
G4VisAttributes* LeadVisAtt = new G4VisAttributes(G4Colour(1., 1., 1.));
G4VisAttributes* LeadVisAtt = new G4VisAttributes(G4Colour(1., 1., 1.));
logicLeadAShield->SetVisAttributes(LeadVisAtt);
logicLeadAShield->SetVisAttributes(LeadVisAtt);
logicLeadBShield->SetVisAttributes(LeadVisAtt);
logicLeadBShield->SetVisAttributes(LeadVisAtt);
}
*/
// Lead shielding
// A
G4ThreeVector
positionLeadAShield
=
G4ThreeVector
(
0
,
0
,
LeadAShield_PosZ
);
G4Tubs
*
solidLeadA
=
new
G4Tubs
(
"solidLead"
,
0.5
*
LeadAMinR
,
0.5
*
LeadAMaxR
,
0.5
*
LeadALength
,
0.
*
deg
,
360.
*
deg
);
G4LogicalVolume
*
logicLeadAShield
=
new
G4LogicalVolume
(
solidLeadA
,
Lead
,
"logicLeadAShield"
,
0
,
0
,
0
);
new
G4PVPlacement
(
0
,
positionLeadAShield
,
logicLeadAShield
,
"Nana_LeadAShield"
,
m_LogicalDetector
,
false
,
0
);
// B
G4ThreeVector
positionLeadBShield
=
G4ThreeVector
(
0
,
0
,
LeadBShield_PosZ
);
G4Tubs
*
solidLeadB
=
new
G4Tubs
(
"solidLead"
,
0.5
*
LeadBMinR
,
0.5
*
LeadBMaxR
,
0.5
*
LeadBLength
,
0.
*
deg
,
360.
*
deg
);
G4LogicalVolume
*
logicLeadBShield
=
new
G4LogicalVolume
(
solidLeadB
,
Lead
,
"logicLeadBShield"
,
0
,
0
,
0
);
new
G4PVPlacement
(
0
,
positionLeadBShield
,
logicLeadBShield
,
"Nana_LeadBShield"
,
m_LogicalDetector
,
false
,
0
);
// Visualisation of PMT Strip
G4VisAttributes
*
LeadVisAtt
=
new
G4VisAttributes
(
G4Colour
(
.66
,
.66
,
.66
));
logicLeadAShield
->
SetVisAttributes
(
LeadVisAtt
);
logicLeadBShield
->
SetVisAttributes
(
LeadVisAtt
);
}
return
m_LogicalDetector
;
return
m_LogicalDetector
;
}
}
...
@@ -451,14 +507,14 @@ void Nana::ReadSensitive(const G4Event* event){
...
@@ -451,14 +507,14 @@ void Nana::ReadSensitive(const G4Event* event){
for
(
LaBr3_itr
=
LaBr3HitMap
->
GetMap
()
->
begin
()
;
LaBr3_itr
!=
LaBr3HitMap
->
GetMap
()
->
end
()
;
LaBr3_itr
++
){
for
(
LaBr3_itr
=
LaBr3HitMap
->
GetMap
()
->
begin
()
;
LaBr3_itr
!=
LaBr3HitMap
->
GetMap
()
->
end
()
;
LaBr3_itr
++
){
G4double
*
Info
=
*
(
LaBr3_itr
->
second
);
G4double
*
Info
=
*
(
LaBr3_itr
->
second
);
//(Info[0]/2.35)*((Info[0]*1.02)*pow((Info[0]*1.8),.5))
double
Energy
=
RandGauss
::
shoot
(
Info
[
0
],
EnergyResolution
);
//
double Energy = RandGauss::shoot(Info[0],
((Info[0]*1000*1.02/2.35)*pow((Info[0]*1000*1.8),.5))
);
double
Energy
=
RandGauss
::
shoot
(
Info
[
0
],(
Info
[
0
]
*
0.0325637
)
/
(
2.35
*
pow
(
Info
[
0
]
-
0.00975335
,
0.475759
)));
if
(
Energy
>
EnergyThreshold
){
if
(
Energy
>
EnergyThreshold
){
double
Time
=
Info
[
1
];
double
Time
=
Info
[
1
];
int
DetectorNbr
=
(
int
)
Info
[
2
];
int
DetectorNbr
=
(
int
)
Info
[
2
];
m_Event
->
SetNanaLaBr3
(
DetectorNbr
,
Energy
,
Energy
,(
unsigned
short
)
Time
,
0
);
m_Event
->
SetNanaLaBr3
(
DetectorNbr
,
Energy
,
Energy
,(
unsigned
short
)
Time
,
0
,
0
);
}
}
}
}
// clear map for next event
// clear map for next event
...
...
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