Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
np
nptool
Commits
b0912db0
Commit
b0912db0
authored
Jan 10, 2022
by
Adrien Matta
☠
Browse files
Merge branch 'NPTool.2.dev' of gitlab.in2p3.fr:np/nptool into NPTool.2.dev
parents
77cea058
de8078aa
Pipeline
#156144
passed with stages
in 6 minutes and 11 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
130 additions
and
209 deletions
+130
-209
Inputs/EventGenerator/TransferInducedFission.reaction
Inputs/EventGenerator/TransferInducedFission.reaction
+6
-5
Inputs/EventGenerator/sofia.reaction
Inputs/EventGenerator/sofia.reaction
+7
-6
NPSimulation/Detectors/Sofia/CMakeLists.txt
NPSimulation/Detectors/Sofia/CMakeLists.txt
+2
-2
NPSimulation/Detectors/Sofia/SofTofW.cc
NPSimulation/Detectors/Sofia/SofTofW.cc
+68
-78
NPSimulation/Detectors/Sofia/SofTofW.hh
NPSimulation/Detectors/Sofia/SofTofW.hh
+6
-16
Projects/Sofia/sofia.detector
Projects/Sofia/sofia.detector
+4
-4
Projects/s455/Analysis.cxx
Projects/s455/Analysis.cxx
+34
-88
Projects/s455/Analysis.h
Projects/s455/Analysis.h
+3
-10
No files found.
Inputs/EventGenerator/TransferInducedFission.reaction
View file @
b0912db0
...
...
@@ -27,8 +27,9 @@ TwoBodyReaction
ShootHeavy= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FissionDecay
CompoundNucleus= 236U
FissionModel= GEF
Shoot_FF= 1
Shoot_neutron= 0
Shoot_gamma= 0
CompoundNucleus= 236U
FissionModel= GEF
VamosChargeStates= 1
Shoot_FF= 1
Shoot_neutron= 0
Shoot_gamma= 0
Inputs/EventGenerator/sofia.reaction
View file @
b0912db0
...
...
@@ -3,7 +3,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%Beam energy given in MeV ; Excitation in MeV ; emmitance in rad
Beam
Particle=
238U
Particle=
179Hg
Energy= 166000
SigmaEnergy= 2
SigmaX= 1 cm
...
...
@@ -16,10 +16,10 @@ Beam
MeanY= 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TwoBodyReaction
Beam=
238U
Target=
208Pb
Light=
208Pb
Heavy=
238U
Beam=
179Hg
Target=
12C
Light=
11C
Heavy=
180Hg
ExcitationEnergyLight= 0.0
ExcitationEnergyHeavy= 15.0
CrossSectionPath= sofia.txt CS
...
...
@@ -27,8 +27,9 @@ TwoBodyReaction
ShootHeavy= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FissionDecay
CompoundNucleus=
238U
CompoundNucleus=
180Hg
FissionModel= GEF
VamosChargeStates= 0
Shoot_FF= 1
Shoot_neutron= 0
Shoot_gamma= 0
NPSimulation/Detectors/Sofia/CMakeLists.txt
View file @
b0912db0
add_library
(
NPSSof
ia
SHARED Sof
ia
.cc
)
target_link_libraries
(
NPSSof
ia
NPSCore
${
ROOT_LIBRARIES
}
${
Geant4_LIBRARIES
}
${
NPLib_LIBRARIES
}
-lNPSofia
)
add_library
(
NPSSof
TofW
SHARED Sof
TofW
.cc
)
target_link_libraries
(
NPSSof
TofW
NPSCore
${
ROOT_LIBRARIES
}
${
Geant4_LIBRARIES
}
${
NPLib_LIBRARIES
}
-lNPSofia
)
NPSimulation/Detectors/Sofia/Sof
ia
.cc
→
NPSimulation/Detectors/Sofia/Sof
TofW
.cc
View file @
b0912db0
...
...
@@ -12,7 +12,7 @@
* Last update : *
*----------------------------------------------------------------------------*
* Decription: *
* This class describe a simple Sof
ia
setup for simulation *
* This class describe a simple Sof
TofW
setup for simulation *
* *
*----------------------------------------------------------------------------*
* Comment: *
...
...
@@ -42,7 +42,7 @@
#include "G4TransportationManager.hh"
// NPTool header
#include "Sof
ia
.hh"
#include "Sof
TofW
.hh"
#include "CalorimeterScorers.hh"
#include "InteractionScorers.hh"
#include "RootOutput.h"
...
...
@@ -58,12 +58,12 @@ using namespace CLHEP;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
namespace
Sof
ia
_NS
{
namespace
Sof
TofW
_NS
{
// Energy and time Resolution
const
double
EnergyThreshold
=
0.1
*
MeV
;
const
double
ResoTime
=
0.007
*
ns
;
const
double
ResoEnergy
=
1.0
*
MeV
;
const
double
TwinResoEnergy
=
0
*
keV
;
//
const double TwinResoEnergy = 0*keV;
const
double
tof_plastic_height
=
660
*
mm
;
const
double
tof_plastic_width
=
32
*
mm
;
const
double
tof_plastic_thickness
=
0.5
*
mm
;
...
...
@@ -73,48 +73,46 @@ namespace Sofia_NS{
const
double
GLAD_width
=
5
*
m
;
const
double
GLAD_length
=
2
*
m
;
const
double
twin_anode_width
=
10.
*
cm
;
const
double
twin_anode_height
=
10.
*
cm
;
const
double
twin_anode_thickness
=
3.1
*
cm
;
//
const double twin_anode_width = 10.*cm;
//
const double twin_anode_height = 10.*cm;
//
const double twin_anode_thickness = 3.1*cm;
const
double
twin_cathode_width
=
30
*
um
;
const
double
twin_cathode_height
=
20
*
cm
;
const
double
twin_cathode_thickness
=
50
*
cm
;
//
const double twin_cathode_width = 30*um;
//
const double twin_cathode_height = 20*cm;
//
const double twin_cathode_thickness = 50*cm;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Sof
ia
Specific Method
Sof
ia
::
Sof
ia
(){
// Sof
TofW
Specific Method
Sof
TofW
::
Sof
TofW
(){
m_Event
=
new
TSofTofWData
()
;
m_TofScorer
=
0
;
m_TwinScorer
=
0
;
m_PlasticTof
=
0
;
m_AnodeDriftArea
=
0
;
m_TwinMusic
=
0
;
//
m_AnodeDriftArea= 0;
//
m_TwinMusic= 0;
m_TofWall
=
0
;
m_Build_GLAD
=
0
;
m_GLAD_MagField
=
0
;
m_GLAD_DistanceFromTarget
=
0
;
m_Build_Twin_Music
=
0
;
m_Twin_Music_DistanceFromTarget
=
0
;
m_Twin_Music_Gas
=
"P10_1atm"
;
//
m_Build_Twin_Music= 0;
//
m_Twin_Music_DistanceFromTarget= 0;
//
m_Twin_Music_Gas= "P10_1atm";
// RGB Color + Transparency
m_VisSquare
=
new
G4VisAttributes
(
G4Colour
(
0.53
,
0.81
,
0.98
,
0.5
));
m_VisGLAD
=
new
G4VisAttributes
(
G4Colour
(
0.5
,
0.5
,
0.5
,
0.5
));
m_VisTwin
=
new
G4VisAttributes
(
G4Colour
(
0.7
,
0.5
,
0.5
,
0.5
));
}
Sof
ia
::~
Sof
ia
(){
Sof
TofW
::~
Sof
TofW
(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void
Sof
ia
::
AddDetector
(
G4ThreeVector
POS
){
void
Sof
TofW
::
AddDetector
(
G4ThreeVector
POS
){
// Convert the POS value to R theta Phi as Spherical coordinate is easier in G4
m_R
.
push_back
(
POS
.
mag
());
m_Theta
.
push_back
(
POS
.
theta
());
...
...
@@ -123,22 +121,22 @@ void Sofia::AddDetector(G4ThreeVector POS){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void
Sof
ia
::
AddDetector
(
double
R
,
double
Theta
,
double
Phi
){
void
Sof
TofW
::
AddDetector
(
double
R
,
double
Theta
,
double
Phi
){
m_R
.
push_back
(
R
);
m_Theta
.
push_back
(
Theta
);
m_Phi
.
push_back
(
Phi
);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4AssemblyVolume
*
Sof
ia
::
BuildTOFDetector
(){
G4AssemblyVolume
*
Sof
TofW
::
BuildTOFDetector
(){
m_TofWall
=
new
G4AssemblyVolume
();
if
(
!
m_PlasticTof
){
G4Box
*
box
=
new
G4Box
(
"Sof
ia
_Box"
,
Sof
ia
_NS
::
tof_plastic_height
*
0.5
,
Sof
ia
_NS
::
tof_plastic_width
*
0.5
,
Sof
ia
_NS
::
tof_plastic_thickness
*
0.5
);
G4Box
*
box
=
new
G4Box
(
"Sof
TofW
_Box"
,
Sof
TofW
_NS
::
tof_plastic_height
*
0.5
,
Sof
TofW
_NS
::
tof_plastic_width
*
0.5
,
Sof
TofW
_NS
::
tof_plastic_thickness
*
0.5
);
G4Material
*
DetectorMaterial
=
MaterialManager
::
getInstance
()
->
GetMaterialFromLibrary
(
Sof
ia
_NS
::
Material
);
m_PlasticTof
=
new
G4LogicalVolume
(
box
,
DetectorMaterial
,
"logic_Sof
ia
_Box"
,
0
,
0
,
0
);
G4Material
*
DetectorMaterial
=
MaterialManager
::
getInstance
()
->
GetMaterialFromLibrary
(
Sof
TofW
_NS
::
Material
);
m_PlasticTof
=
new
G4LogicalVolume
(
box
,
DetectorMaterial
,
"logic_Sof
TofW
_Box"
,
0
,
0
,
0
);
m_PlasticTof
->
SetVisAttributes
(
m_VisSquare
);
m_PlasticTof
->
SetSensitiveDetector
(
m_TofScorer
);
...
...
@@ -149,7 +147,7 @@ G4AssemblyVolume* Sofia::BuildTOFDetector(){
Tv
.
setZ
(
0
);
for
(
unsigned
int
i
=
0
;
i
<
28
;
i
++
){
int
k
=
-
14
+
i
;
Tv
.
setY
(
k
*
(
Sof
ia
_NS
::
tof_plastic_width
+
0.5
));
Tv
.
setY
(
k
*
(
Sof
TofW
_NS
::
tof_plastic_width
+
0.5
));
m_TofWall
->
AddPlacedVolume
(
m_PlasticTof
,
Tv
,
Rv
);
}
...
...
@@ -158,7 +156,7 @@ G4AssemblyVolume* Sofia::BuildTOFDetector(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4LogicalVolume
*
Sof
ia
::
BuildTwinMusic
(){
/*
G4LogicalVolume* Sof
TofW
::BuildTwinMusic(){
double twin_width = 21*cm;
double twin_height = 21*cm;
...
...
@@ -184,7 +182,7 @@ G4LogicalVolume* Sofia::BuildTwinMusic(){
G4LogicalVolume* LogicalSector = new G4LogicalVolume(Sectorbox, TwinMaterial, "logic_twin", 0,0,0);
LogicalSector->SetVisAttributes(G4VisAttributes::GetInvisible());
// Drift Anode Area //
G4Box
*
Anodebox
=
new
G4Box
(
"Anode_Box"
,
Sof
ia
_NS
::
twin_anode_width
*
0.5
,
Sof
ia
_NS
::
twin_anode_height
*
0.5
,
Sof
ia
_NS
::
twin_anode_thickness
*
0.5
);
G4Box* Anodebox = new G4Box("Anode_Box", Sof
TofW
_NS::twin_anode_width*0.5, Sof
TofW
_NS::twin_anode_height*0.5, Sof
TofW
_NS::twin_anode_thickness*0.5);
G4Material* DetectorMaterial = MaterialManager::getInstance()->GetMaterialFromLibrary(m_Twin_Music_Gas);
m_AnodeDriftArea = new G4LogicalVolume(Anodebox, DetectorMaterial, "logic_twin_anode", 0, 0, 0);
...
...
@@ -192,7 +190,7 @@ G4LogicalVolume* Sofia::BuildTwinMusic(){
m_AnodeDriftArea->SetSensitiveDetector(m_TwinScorer);
// Cathode plane in the middle //
G4Box
*
cathode_box
=
new
G4Box
(
"Cathode_box"
,
Sof
ia
_NS
::
twin_cathode_width
*
0.5
,
Sof
ia
_NS
::
twin_cathode_height
*
0.5
,
Sof
ia
_NS
::
twin_cathode_thickness
*
0.5
);
G4Box* cathode_box = new G4Box("Cathode_box", Sof
TofW
_NS::twin_cathode_width*0.5, Sof
TofW
_NS::twin_cathode_height*0.5, Sof
TofW
_NS::twin_cathode_thickness*0.5);
G4Material* CathodeMaterial = MaterialManager::getInstance()->GetMaterialFromLibrary("Al");
G4VisAttributes* m_VisCathode = new G4VisAttributes(G4Colour(0.7,0.4,0,1));
G4LogicalVolume* LogicalCathode = new G4LogicalVolume(cathode_box, CathodeMaterial, "logic_cathode", 0,0,0);
...
...
@@ -213,7 +211,7 @@ G4LogicalVolume* Sofia::BuildTwinMusic(){
int anode_nbr= 0;
for(unsigned int j=0; j<16; j++){
anode_nbr++;
Tv
.
setZ
(
j
*
Sof
ia
_NS
::
twin_anode_thickness
-
7.5
*
Sof
ia
_NS
::
twin_anode_thickness
);
Tv.setZ(j*Sof
TofW
_NS::twin_anode_thickness -7.5*Sof
TofW
_NS::twin_anode_thickness);
new G4PVPlacement(0,Tv,
m_AnodeDriftArea,
"Anode",
...
...
@@ -222,20 +220,20 @@ G4LogicalVolume* Sofia::BuildTwinMusic(){
for(unsigned int i=0; i<4; i++){
if(i==0){
Tv
.
setX
(
0.5
*
Sof
ia
_NS
::
twin_anode_width
+
Sof
ia
_NS
::
twin_cathode_width
);
Tv
.
setY
(
0.5
*
Sof
ia
_NS
::
twin_anode_height
);
Tv.setX(0.5*Sof
TofW
_NS::twin_anode_width+Sof
TofW
_NS::twin_cathode_width);
Tv.setY(0.5*Sof
TofW
_NS::twin_anode_height);
}
if(i==1){
Tv
.
setX
(
-
0.5
*
Sof
ia
_NS
::
twin_anode_width
-
Sof
ia
_NS
::
twin_cathode_width
);
Tv
.
setY
(
0.5
*
Sof
ia
_NS
::
twin_anode_height
);
Tv.setX(-0.5*Sof
TofW
_NS::twin_anode_width-Sof
TofW
_NS::twin_cathode_width);
Tv.setY(0.5*Sof
TofW
_NS::twin_anode_height);
}
if(i==2){
Tv
.
setX
(
-
0.5
*
Sof
ia
_NS
::
twin_anode_width
-
Sof
ia
_NS
::
twin_cathode_width
);
Tv
.
setY
(
-
0.5
*
Sof
ia
_NS
::
twin_anode_height
);
Tv.setX(-0.5*Sof
TofW
_NS::twin_anode_width-Sof
TofW
_NS::twin_cathode_width);
Tv.setY(-0.5*Sof
TofW
_NS::twin_anode_height);
}
if(i==3){
Tv
.
setX
(
0.5
*
Sof
ia
_NS
::
twin_anode_width
+
Sof
ia
_NS
::
twin_cathode_width
);
Tv
.
setY
(
-
0.5
*
Sof
ia
_NS
::
twin_anode_height
);
Tv.setX(0.5*Sof
TofW
_NS::twin_anode_width+Sof
TofW
_NS::twin_cathode_width);
Tv.setY(-0.5*Sof
TofW
_NS::twin_anode_height);
}
Tv.setZ(0);
...
...
@@ -248,13 +246,13 @@ G4LogicalVolume* Sofia::BuildTwinMusic(){
}
return m_TwinMusic;
}
}
*/
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4LogicalVolume
*
Sof
ia
::
BuildGLAD
()
G4LogicalVolume
*
Sof
TofW
::
BuildGLAD
()
{
G4Box
*
box
=
new
G4Box
(
"glad_Box"
,
Sof
ia
_NS
::
GLAD_width
*
0.5
,
Sof
ia
_NS
::
GLAD_height
*
0.5
,
Sof
ia
_NS
::
GLAD_length
*
0.5
);
G4Box
*
box
=
new
G4Box
(
"glad_Box"
,
Sof
TofW
_NS
::
GLAD_width
*
0.5
,
Sof
TofW
_NS
::
GLAD_height
*
0.5
,
Sof
TofW
_NS
::
GLAD_length
*
0.5
);
G4Material
*
GLADMaterial
=
MaterialManager
::
getInstance
()
->
GetMaterialFromLibrary
(
"Vaccuum"
);
m_GLAD
=
new
G4LogicalVolume
(
box
,
GLADMaterial
,
"logic_GLAD_Box"
,
0
,
0
,
0
);
...
...
@@ -281,27 +279,26 @@ G4LogicalVolume* Sofia::BuildGLAD()
// Read stream at Configfile to pick-up parameters of detector (Position,...)
// Called in DetecorConstruction::ReadDetextorConfiguration Method
void
Sof
ia
::
ReadConfiguration
(
NPL
::
InputParser
parser
){
vector
<
NPL
::
InputBlock
*>
blocks
=
parser
.
GetAllBlocksWithToken
(
"Sof
ia
"
);
void
Sof
TofW
::
ReadConfiguration
(
NPL
::
InputParser
parser
){
vector
<
NPL
::
InputBlock
*>
blocks
=
parser
.
GetAllBlocksWithToken
(
"Sof
TofW
"
);
if
(
NPOptionManager
::
getInstance
()
->
GetVerboseLevel
())
cout
<<
"//// "
<<
blocks
.
size
()
<<
" detectors found "
<<
endl
;
vector
<
string
>
cart
=
{
"POS"
,
"Build_GLAD"
,
"Build_Twin_Music"
};
vector
<
string
>
sphe
=
{
"R"
,
"Theta"
,
"Phi"
,
"Build_GLAD"
,
"Build_Twin_Music"
};
vector
<
string
>
cart
=
{
"POS"
,
"Build_GLAD"
};
vector
<
string
>
sphe
=
{
"R"
,
"Theta"
,
"Phi"
,
"Build_GLAD"
};
for
(
unsigned
int
i
=
0
;
i
<
blocks
.
size
()
;
i
++
){
if
(
blocks
[
i
]
->
HasTokenList
(
cart
)){
if
(
NPOptionManager
::
getInstance
()
->
GetVerboseLevel
())
cout
<<
endl
<<
"//// Sof
ia
"
<<
i
+
1
<<
endl
;
cout
<<
endl
<<
"//// Sof
TofW
"
<<
i
+
1
<<
endl
;
G4ThreeVector
Pos
=
NPS
::
ConvertVector
(
blocks
[
i
]
->
GetTVector3
(
"POS"
,
"mm"
));
m_Build_GLAD
=
blocks
[
i
]
->
GetInt
(
"Build_GLAD"
);
m_Build_Twin_Music
=
blocks
[
i
]
->
GetInt
(
"Build_Twin_Music"
);
AddDetector
(
Pos
);
}
else
if
(
blocks
[
i
]
->
HasTokenList
(
sphe
)){
if
(
NPOptionManager
::
getInstance
()
->
GetVerboseLevel
())
cout
<<
endl
<<
"//// Sof
ia
"
<<
i
+
1
<<
endl
;
cout
<<
endl
<<
"//// Sof
TofW
"
<<
i
+
1
<<
endl
;
double
R
=
blocks
[
i
]
->
GetDouble
(
"R"
,
"mm"
);
double
Theta
=
blocks
[
i
]
->
GetDouble
(
"Theta"
,
"deg"
);
double
Phi
=
blocks
[
i
]
->
GetDouble
(
"Phi"
,
"deg"
);
...
...
@@ -309,10 +306,6 @@ void Sofia::ReadConfiguration(NPL::InputParser parser){
m_GLAD_MagField
=
blocks
[
i
]
->
GetDouble
(
"GLAD_MagField"
,
"T"
);
m_GLAD_DistanceFromTarget
=
blocks
[
i
]
->
GetDouble
(
"GLAD_DistanceFromTarget"
,
"m"
);
m_Build_Twin_Music
=
blocks
[
i
]
->
GetInt
(
"Build_Twin_Music"
);
m_Twin_Music_DistanceFromTarget
=
blocks
[
i
]
->
GetDouble
(
"Twin_Music_DistanceFromTarget"
,
"m"
);
m_Twin_Music_Gas
=
blocks
[
i
]
->
GetString
(
"Twin_Music_Gas"
);
AddDetector
(
R
,
Theta
,
Phi
);
}
else
{
...
...
@@ -327,7 +320,7 @@ void Sofia::ReadConfiguration(NPL::InputParser parser){
// Construct detector and inialise sensitive part.
// Called After DetecorConstruction::AddDetector Method
void
Sof
ia
::
ConstructDetector
(
G4LogicalVolume
*
world
){
void
Sof
TofW
::
ConstructDetector
(
G4LogicalVolume
*
world
){
for
(
unsigned
short
i
=
0
;
i
<
m_R
.
size
()
;
i
++
)
{
G4double
wX
=
m_R
[
i
]
*
sin
(
m_Theta
[
i
]
)
*
cos
(
m_Phi
[
i
]
)
;
...
...
@@ -335,7 +328,7 @@ void Sofia::ConstructDetector(G4LogicalVolume* world){
G4double
wZ
=
m_R
[
i
]
*
cos
(
m_Theta
[
i
]
)
;
G4ThreeVector
Det_pos
=
G4ThreeVector
(
wX
,
wY
,
wZ
)
;
// So the face of the detector is at R instead of the middle
Det_pos
+=
Det_pos
.
unit
()
*
Sof
ia
_NS
::
tof_plastic_thickness
*
0.5
;
Det_pos
+=
Det_pos
.
unit
()
*
Sof
TofW
_NS
::
tof_plastic_thickness
*
0.5
;
// Building Detector reference frame
G4double
ii
=
cos
(
m_Theta
[
i
])
*
cos
(
m_Phi
[
i
]);
G4double
jj
=
cos
(
m_Theta
[
i
])
*
sin
(
m_Phi
[
i
]);
...
...
@@ -353,14 +346,14 @@ void Sofia::ConstructDetector(G4LogicalVolume* world){
BuildTOFDetector
()
->
MakeImprint
(
world
,
Det_pos
,
Rot
);
if
(
m_Build_GLAD
==
1
){
G4ThreeVector
GLAD_pos
=
G4ThreeVector
(
0
,
0
,
m_GLAD_DistanceFromTarget
+
0.5
*
Sof
ia
_NS
::
GLAD_length
);
G4ThreeVector
GLAD_pos
=
G4ThreeVector
(
0
,
0
,
m_GLAD_DistanceFromTarget
+
0.5
*
Sof
TofW
_NS
::
GLAD_length
);
new
G4PVPlacement
(
0
,
GLAD_pos
,
BuildGLAD
(),
"GLAD"
,
world
,
false
,
0
);
}
if
(
m_Build_Twin_Music
==
1
){
/*
if(m_Build_Twin_Music==1){
G4ThreeVector Tv = G4ThreeVector(0,0,0);
Tv.setZ(m_Twin_Music_DistanceFromTarget);
...
...
@@ -368,16 +361,16 @@ void Sofia::ConstructDetector(G4LogicalVolume* world){
BuildTwinMusic(),
"Twin",
world, false, 0);
}
}
*/
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Add Detector branch to the EventTree.
// Called After DetecorConstruction::AddDetector Method
void
Sof
ia
::
InitializeRootOutput
(){
void
Sof
TofW
::
InitializeRootOutput
(){
RootOutput
*
pAnalysis
=
RootOutput
::
getInstance
();
TTree
*
pTree
=
pAnalysis
->
GetTree
();
if
(
!
pTree
->
FindBranch
(
"Sof
ia
"
)){
if
(
!
pTree
->
FindBranch
(
"Sof
TofW
"
)){
pTree
->
Branch
(
"SofTofW"
,
"TSofTofWData"
,
&
m_Event
)
;
}
pTree
->
SetBranchAddress
(
"SofTofW"
,
&
m_Event
)
;
...
...
@@ -386,7 +379,7 @@ void Sofia::InitializeRootOutput(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Read sensitive part and fill the Root tree.
// Called at in the EventAction::EndOfEventAvtion
void
Sof
ia
::
ReadSensitive
(
const
G4Event
*
){
void
Sof
TofW
::
ReadSensitive
(
const
G4Event
*
){
m_Event
->
Clear
();
///////////
...
...
@@ -396,9 +389,9 @@ void Sofia::ReadSensitive(const G4Event* ){
unsigned
int
size
=
Scorer
->
GetMult
();
for
(
unsigned
int
i
=
0
;
i
<
size
;
i
++
){
vector
<
unsigned
int
>
level
=
Scorer
->
GetLevel
(
i
);
double
Energy
=
RandGauss
::
shoot
(
Scorer
->
GetEnergy
(
i
),
Sof
ia
_NS
::
ResoEnergy
);
if
(
Energy
>
Sof
ia
_NS
::
EnergyThreshold
){
double
Time
=
RandGauss
::
shoot
(
Scorer
->
GetTime
(
i
),
Sof
ia
_NS
::
ResoTime
);
double
Energy
=
RandGauss
::
shoot
(
Scorer
->
GetEnergy
(
i
),
Sof
TofW
_NS
::
ResoEnergy
);
if
(
Energy
>
Sof
TofW
_NS
::
EnergyThreshold
){
double
Time
=
RandGauss
::
shoot
(
Scorer
->
GetTime
(
i
),
Sof
TofW
_NS
::
ResoTime
);
int
DetectorNbr
=
level
[
0
];
int
PlasticNbr
=
level
[
1
]
-
1
;
//m_Event->SetDetectorNbr(DetectorNbr);
...
...
@@ -413,7 +406,7 @@ void Sofia::ReadSensitive(const G4Event* ){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
////////////////////////////////////////////////////////////////
void
Sof
ia
::
InitializeScorers
()
{
void
Sof
TofW
::
InitializeScorers
()
{
// This check is necessary in case the geometry is reloaded
bool
already_exist
=
false
;
m_TofScorer
=
CheckScorer
(
"TofScorer"
,
already_exist
)
;
...
...
@@ -426,15 +419,12 @@ void Sofia::InitializeScorers() {
level
.
push_back
(
1
);
level
.
push_back
(
0
);
G4VPrimitiveScorer
*
Calorimeter
=
new
CalorimeterScorers
::
PS_Calorimeter
(
"Calorimeter"
,
level
,
0
)
;
G4VPrimitiveScorer
*
TwinCalorimeter
=
new
CalorimeterScorers
::
PS_Calorimeter
(
"TwinCalorimeter"
,
level
,
0
)
;
//
G4VPrimitiveScorer* TwinCalorimeter= new CalorimeterScorers::PS_Calorimeter("TwinCalorimeter",level, 0) ;
G4VPrimitiveScorer
*
Interaction
=
new
InteractionScorers
::
PS_Interactions
(
"Interaction"
,
ms_InterCoord
,
0
)
;
//and register it to the multifunctionnal detector
m_TofScorer
->
RegisterPrimitive
(
Calorimeter
);
m_TofScorer
->
RegisterPrimitive
(
Interaction
);
G4SDManager
::
GetSDMpointer
()
->
AddNewDetector
(
m_TofScorer
)
;
m_TwinScorer
->
RegisterPrimitive
(
TwinCalorimeter
);
G4SDManager
::
GetSDMpointer
()
->
AddNewDetector
(
m_TwinScorer
)
;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
...
...
@@ -443,8 +433,8 @@ void Sofia::InitializeScorers() {
////////////////////////////////////////////////////////////////////////////////
// Construct Method to be pass to the DetectorFactory //
////////////////////////////////////////////////////////////////////////////////
NPS
::
VDetector
*
Sof
ia
::
Construct
(){
return
(
NPS
::
VDetector
*
)
new
Sof
ia
();
NPS
::
VDetector
*
Sof
TofW
::
Construct
(){
return
(
NPS
::
VDetector
*
)
new
Sof
TofW
();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
...
...
@@ -452,13 +442,13 @@ NPS::VDetector* Sofia::Construct(){
// Registering the construct method to the factory //
////////////////////////////////////////////////////////////////////////////////
extern
"C"
{
class
proxy_nps_Sof
ia
{
class
proxy_nps_Sof
TofW
{
public:
proxy_nps_Sof
ia
(){
NPS
::
DetectorFactory
::
getInstance
()
->
AddToken
(
"Sof
ia
"
,
"Sof
ia
"
);
NPS
::
DetectorFactory
::
getInstance
()
->
AddDetector
(
"Sof
ia
"
,
Sof
ia
::
Construct
);
proxy_nps_Sof
TofW
(){
NPS
::
DetectorFactory
::
getInstance
()
->
AddToken
(
"Sof
TofW
"
,
"Sof
TofW
"
);
NPS
::
DetectorFactory
::
getInstance
()
->
AddDetector
(
"Sof
TofW
"
,
Sof
TofW
::
Construct
);
}
};
proxy_nps_Sof
ia
p_nps_Sof
ia
;
proxy_nps_Sof
TofW
p_nps_Sof
TofW
;
}
NPSimulation/Detectors/Sofia/Sof
ia
.hh
→
NPSimulation/Detectors/Sofia/Sof
TofW
.hh
View file @
b0912db0
#ifndef Sof
ia
_h
#define Sof
ia
_h 1
#ifndef Sof
TofW
_h
#define Sof
TofW
_h 1
/*****************************************************************************
* Copyright (C) 2009-2020 this file is part of the NPTool Project *
* *
...
...
@@ -14,7 +14,7 @@
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class describe Sof
ia
simulation *
* This class describe Sof
TofW
simulation *
* *
*---------------------------------------------------------------------------*
* Comment: *
...
...
@@ -38,13 +38,13 @@ using namespace std;
#include "TSofTofWData.h"
#include "NPInputParser.h"
class
Sof
ia
:
public
NPS
::
VDetector
{
class
Sof
TofW
:
public
NPS
::
VDetector
{
////////////////////////////////////////////////////
/////// Default Constructor and Destructor /////////
////////////////////////////////////////////////////
public:
Sof
ia
()
;
virtual
~
Sof
ia
()
;
Sof
TofW
()
;
virtual
~
Sof
TofW
()
;
////////////////////////////////////////////////////
/////// Specific Function of this Class ///////////
...
...
@@ -58,14 +58,11 @@ class Sofia : public NPS::VDetector{
G4AssemblyVolume
*
BuildTOFDetector
();
G4LogicalVolume
*
BuildGLAD
();
G4LogicalVolume
*
BuildTwinMusic
();
private:
G4LogicalVolume
*
m_PlasticTof
;
G4LogicalVolume
*
m_GLAD
;
G4AssemblyVolume
*
m_TofWall
;
G4LogicalVolume
*
m_TwinMusic
;
G4LogicalVolume
*
m_AnodeDriftArea
;
////////////////////////////////////////////////////
////// Inherite from NPS::VDetector class /////////
...
...
@@ -93,7 +90,6 @@ class Sofia : public NPS::VDetector{
// Associated Scorer
G4MultiFunctionalDetector
*
m_TofScorer
;
G4MultiFunctionalDetector
*
m_TwinScorer
;
////////////////////////////////////////////////////
///////////Event class to store Data////////////////
////////////////////////////////////////////////////
...
...
@@ -114,15 +110,9 @@ class Sofia : public NPS::VDetector{
double
m_GLAD_MagField
;
double
m_GLAD_DistanceFromTarget
;
// Twin Music //
int
m_Build_Twin_Music
;
double
m_Twin_Music_DistanceFromTarget
;
string
m_Twin_Music_Gas
;
// Visualisation Attribute
G4VisAttributes
*
m_VisSquare
;
G4VisAttributes
*
m_VisGLAD
;
G4VisAttributes
*
m_VisTwin
;
// Needed for dynamic loading of the library
public:
...
...
Projects/Sofia/sofia.detector
View file @
b0912db0
...
...
@@ -8,15 +8,15 @@ Target
Y= 0 mm
Z= 0 m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Sof
ia
Sof
TofW
R= 8 m
THETA= -9 deg
PHI= 0 deg
Build_GLAD= 1
GLAD_DistanceFromTarget= 3.3 m
GLAD_MagField= 1.8 T
Build_Twin_Music=
1
Twin_Music_DistanceFromTarget= 1.5 m
Twin_Music_Gas= P10_1atm
Build_Twin_Music=
0
%
Twin_Music_DistanceFromTarget= 1.5 m
%
Twin_Music_Gas= P10_1atm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Projects/s455/Analysis.cxx
View file @
b0912db0
...
...
@@ -47,7 +47,6 @@ void Analysis::Init(){
InitParameter
();
InitOutputBranch
();
LoadCut
();
LoadSpline
();
}
...
...
@@ -151,29 +150,6 @@ void Analysis::FissionFragmentAnalysis(){
}
}
vector
<
double
>
good_posx
;
vector
<
double
>
good_posy
;
for
(
unsigned
int
i
=
0
;
i
<
PosX
.
size
();
i
++
){
double
tofx
=
PosX
[
i
];
double
tofy
=
PosY
[
i
];
for
(
unsigned
int
k
=
0
;
k
<
Xmwpc4
.
size
();
k
++
){
double
posx
=
Xmwpc4
[
k
];
if
(
abs
(
posx
-
tofx
)
<
100
){
good_posx
.
push_back
(
posx
);
SofFF
->
SetMwpcPosX
(
posx
);
SofFF
->
SetTofPosX
(
tofx
);
}
}
for
(
unsigned
int
p
=
0
;
p
<
Ymwpc4
.
size
();
p
++
){
double
posy
=
Ymwpc4
[
p
];
if
(
abs
(
posy
-
tofy
)
<
20
){
good_posy
.
push_back
(
posy
);
SofFF
->
SetMwpcPosY
(
posy
);
SofFF
->
SetTofPosY
(
tofy
);
}
}
}
int
mult1
=
SofTwim
->
mult1
;
int
mult2
=
SofTwim
->
mult2
;
int
mult3
=
SofTwim
->
mult3
;
...
...
@@ -364,6 +340,38 @@ void Analysis::FissionFragmentAnalysis(){
A1
=
AoQ1
*
iZ1
;
A2
=
AoQ2
*
iZ2
;
vector
<
double
>
good_posx
;
vector
<
double
>
good_posy
;
for
(
unsigned
int
i
=
0
;
i
<
PosX
.
size
();
i
++
){
double
tofx
=
PosX
[
i
];
double
tofy
=
PosY
[
i
];
for
(
unsigned
int
k
=
0
;
k
<
Xmwpc4
.
size
();
k
++
){
double
posx
=
Xmwpc4
[
k
];
if
(
abs
(
posx
-
tofx
)
<
100
){
good_posx
.
push_back
(
posx
);
//SofFF->SetMwpcPosX(posx);
//SofFF->SetTofPosX(tofx);
}
}
for
(
unsigned
int
p
=
0
;
p
<
Ymwpc4
.
size
();
p
++
){
double
posy
=
Ymwpc4
[
p
];
if
(
abs
(
posy
-
tofy
)
<
20
){
//good_posy.push_back(posy);
good_posy
.
push_back
(
tofy
);
//SofFF->SetMwpcPosY(posy);
//SofFF->SetTofPosY(tofy);
}
}
}
if
(
good_posx
.
size
()
==
2
&&
good_posy
.
size
()
==
2
){
SofFF
->
SetTofPosX
(
good_posx
[
0
]);
SofFF
->
SetTofPosX
(
good_posx
[
1
]);
SofFF
->
SetTofPosY
(
good_posy
[
0
]);
SofFF
->
SetTofPosY
(
good_posy
[
1
]);
}
//*** Filling the Fission Fragment Tree ***//
SofFF
->
SetTOF
(
TOF_left
);
SofFF
->
SetTOF
(
TOF_right
);
...
...
@@ -401,7 +409,7 @@ void Analysis::BeamAnalysis(){