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
0823abad
Commit
0823abad
authored
Nov 05, 2018
by
Adrien Matta
☠
Browse files
* Fixing various warning in NPSimulation
parent
a6fca307
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
33 deletions
+31
-33
NPSimulation/Core/Chamber.cc
NPSimulation/Core/Chamber.cc
+2
-0
NPSimulation/Detectors/Dali/Dali.cc
NPSimulation/Detectors/Dali/Dali.cc
+4
-4
NPSimulation/Detectors/LightPipe/LightPipe.cc
NPSimulation/Detectors/LightPipe/LightPipe.cc
+6
-6
NPSimulation/Detectors/Miniball/Miniball.cc
NPSimulation/Detectors/Miniball/Miniball.cc
+1
-1
NPSimulation/Detectors/beam_dump/cmake_install.cmake
NPSimulation/Detectors/beam_dump/cmake_install.cmake
+6
-1
Projects/e748/Analysis.cxx
Projects/e748/Analysis.cxx
+12
-21
No files found.
NPSimulation/Core/Chamber.cc
View file @
0823abad
...
...
@@ -2157,7 +2157,9 @@ void Chamber::ConstructDetector(G4LogicalVolume* world)
case
0
:
break
;
case
1
:
yPos
-=
(
7.0
*
mm
+
connectorW
);
break
;
case
2
:
yPos
-=
(
15.0
*
mm
+
connectorW
);
break
;
case
3
:
yPos
-=
(
7.0
*
mm
+
connectorW
);
break
;
}
...
...
NPSimulation/Detectors/Dali/Dali.cc
View file @
0823abad
...
...
@@ -137,7 +137,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Element
*
H
=
new
G4Element
(
"Hydrogen"
,
"H"
,
1.
,
1.01
*
g
/
mole
);
//
G4Element* H = new G4Element("Hydrogen","H" , 1., 1.01*g/mole);
G4Isotope
*
Mg24
=
new
G4Isotope
(
"Mg24"
,
12
,
24
,
23.985041
*
g
/
mole
);
G4Isotope
*
Mg25
=
new
G4Isotope
(
"Mg25"
,
12
,
25
,
24.985836
*
g
/
mole
);
...
...
@@ -196,7 +196,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){
G4ThreeVector
positionnull
=
G4ThreeVector
(
0
,
0
,
0
);
// MgO Volume -
G4PVPlacement
*
physi_MgO
=
new
G4PVPlacement
(
0
,
positionnull
,
new
G4PVPlacement
(
0
,
positionnull
,
m_SquareDetector_CanMgO
,
"MgO"
,
m_SquareDetector_Can
,
...
...
@@ -207,7 +207,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){
// NaI Volume -
G4PVPlacement
*
physi_NaI
=
new
G4PVPlacement
(
0
,
positionnull
,
new
G4PVPlacement
(
0
,
positionnull
,
m_SquareDetector_Crystal
,
"Crystal NaI"
,
m_SquareDetector_CanMgO
,
...
...
@@ -217,7 +217,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){
m_SquareDetector_Crystal
->
SetVisAttributes
(
m_VisSquare
);
m_SquareDetector_Crystal
->
SetSensitiveDetector
(
m_DaliScorer
);
G4VPhysicalVolume
*
ArrayDali_1
=
new
G4PVReplica
(
"ArrayDali_1"
,
new
G4PVReplica
(
"ArrayDali_1"
,
m_SquareDetector_Can
,
Logic_ArrayDali_1
,
kYAxis
,
...
...
NPSimulation/Detectors/LightPipe/LightPipe.cc
View file @
0823abad
...
...
@@ -168,25 +168,25 @@ void LightPipe::ConstructDetector(G4LogicalVolume* world){
return
(
i
-
(
imax
/
2.
))
*
width
+
width
/
2.
;
};
int
i
=
0
,
j
=
0
,
k
=
0
;
//
int i=0, j=0, k=0;
int
iPipeX
=
1
,
iPipeY
=
1
,
iDet
=
1
;
int
iPipeX
=
1
,
/*
iPipeY=1,
*/
iDet
=
1
;
for
(
const
auto
&
det
:
m_Detector
)
{
const
G4int
&
nrow
=
get
<
0
>
(
det
);
const
G4int
&
ncol
=
get
<
1
>
(
det
);
const
G4int
&
nlayer
=
get
<
2
>
(
det
);
//
const G4int& nlayer = get<2>(det);
const
G4double
&
width
=
get
<
3
>
(
det
);
const
G4double
&
thickness
=
get
<
4
>
(
det
);
const
G4double
&
pipe_width
=
get
<
5
>
(
det
);
const
G4double
&
pipe_thickness
=
get
<
6
>
(
det
);
const
G4double
pd_thickness
=
1
*
mm
;
//
const G4double pd_thickness = 1*mm;
vector
<
vector
<
G4PVPlacement
*>
>
physVol
(
nrow
);
for
(
auto
&
v
:
physVol
)
{
v
.
resize
(
ncol
);
}
auto
buildRow
=
[
&
](
G4int
irow
,
G4double
z
){
G4double
rowWidthX
=
nrow
*
width
;
//
G4double rowWidthX = nrow*width;
G4double
pipe_length
=
width
*
ncol
+
1
*
cm
;
//
// Build light pipe above detectors
...
...
@@ -201,7 +201,7 @@ void LightPipe::ConstructDetector(G4LogicalVolume* world){
G4RotationMatrix
*
myRotation
=
new
G4RotationMatrix
();
myRotation
->
rotateX
(
90.
*
deg
);
// Create PV Placement
G4PVPlacement
*
pv
=
new
G4PVPlacement
(
new
G4PVPlacement
(
myRotation
,
pipePos
,
pipe
,
"LightPipe_PipeX"
,
world
,
false
,
iPipeX
++
,
warnOverlap
);
std
::
vector
<
G4PVPlacement
*>
pvRow
;
...
...
NPSimulation/Detectors/Miniball/Miniball.cc
View file @
0823abad
...
...
@@ -238,7 +238,7 @@ void Miniball::InitializeRootOutput(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Read sensitive part and fill the Root tree.
// Called at in the EventAction::EndOfEventAvtion
void
Miniball
::
ReadSensitive
(
const
G4Event
*
event
){
void
Miniball
::
ReadSensitive
(
const
G4Event
*
){
m_Event
->
Clear
();
///////////
...
...
NPSimulation/Detectors/beam_dump/cmake_install.cmake
View file @
0823abad
# Install script for directory: /
Users/valerian/Software/other_nptool_versions
/nptool/NPSimulation/Detectors/beam_dump
# Install script for directory: /
scratch
/nptool/NPSimulation/Detectors/beam_dump
# Set the install prefix
if
(
NOT DEFINED CMAKE_INSTALL_PREFIX
)
...
...
@@ -27,6 +27,11 @@ if(NOT CMAKE_INSTALL_COMPONENT)
endif
()
endif
()
# Install shared libraries without execute permission?
if
(
NOT DEFINED CMAKE_INSTALL_SO_NO_EXE
)
set
(
CMAKE_INSTALL_SO_NO_EXE
"1"
)
endif
()
# Is this installation the result of a crosscompile?
if
(
NOT DEFINED CMAKE_CROSSCOMPILING
)
set
(
CMAKE_CROSSCOMPILING
"FALSE"
)
...
...
Projects/e748/Analysis.cxx
View file @
0823abad
...
...
@@ -104,8 +104,17 @@ void Analysis::TreatEvent(){
int
TelescopeNumber
=
M2
->
TelescopeNumber
[
countMust2
];
Si_X_M2
=
X
;
Si_Y_M2
=
Y
;
if
(
TelescopeNumber
<
9
){
// Beam Energy from Cav Time of Flight //
double
BeamSpeed
=
138.898
-
14765.1
/
ModularLeaf
->
GetCalibratedValue
(
"T_CATS1_CAV"
)
;
// mm/ns
// Beam Energy before CATS1
static
double
c2
=
299.792458
*
299.792458
;
// mm/ns
double
gamma
=
1.
/
sqrt
(
1
-
BeamSpeed
*
BeamSpeed
/
c2
);
BeamEnergy
=
11200.962140
*
(
gamma
-
1
);
double
BeamAngle
=
BeamDirection
.
Angle
(
TVector3
(
0
,
0
,
1
));
double
gammaCav
=
(
BeamEnergy
+
11200.962140
)
/
11200.962140
;
double
BeamSpeedCav
=
sqrt
(
c2
*
(
1
-
1
/
(
gammaCav
*
gammaCav
)));
//cout << ModularLeaf->GetCalibratedValue("T_CATS1_CAV") << " " << BeamSpeed << " " << BeamEnergy << " " << BeamEnergy/12. << endl;
if
(
BeamEnergy
>
0
&&
TelescopeNumber
<
5
){
DetectorNumber
=
TelescopeNumber
;
/* // Part 1 : Impact Angle */
...
...
@@ -122,26 +131,8 @@ void Analysis::TreatEvent(){
Y_M2
=
M2
->
GetPositionOfInteraction
(
countMust2
).
Y
()
;
Z_M2
=
M2
->
GetPositionOfInteraction
(
countMust2
).
Z
()
;
// Beam Energy from Cav Time of Flight //
// Beam speed from Beam Energy
// double BeamSpeed = 10.8727 + ModularLeaf->GetCalibratedValue("T_CATS1_CAV")*0.276825; // mm/ns
//double BeamSpeed = 5.17952 + ModularLeaf->GetCalibratedValue("T_CATS1_CAV")*0.305315; // mm/ns
//double BeamSpeed = 11.0476 + ModularLeaf->GetCalibratedValue("T_CATS1_CAV")*0.278917; // mm/ns
//double BeamSpeed = 7.20255 + ModularLeaf->GetCalibratedValue("T_CATS1_CAV")*0.293392; // mm/ns
double
BeamSpeed
=
20.0747
+
ModularLeaf
->
GetCalibratedValue
(
"T_CATS1_CAV"
)
*
0.237811
;
// mm/ns
// Beam Energy before CATS1
static
double
c2
=
299.792458
*
299.792458
;
// mm/ns
double
gamma
=
1.
/
sqrt
(
1
-
BeamSpeed
*
BeamSpeed
/
c2
);
BeamEnergy
=
11200.962140
*
(
gamma
-
1
);
double
BeamAngle
=
BeamDirection
.
Angle
(
TVector3
(
0
,
0
,
1
));
double
gammaCav
=
(
BeamEnergy
+
11200.962140
)
/
11200.962140
;
double
BeamSpeedCav
=
sqrt
(
c2
*
(
1
-
1
/
(
gammaCav
*
gammaCav
)));
// Beam Energy and speed after CATS1
// Beam Energy and speed after CATS1
double
BeamEnergyC1
=
BeamMylar
.
Slow
(
BeamEnergy
,
1.2
*
micrometer
,
BeamAngle
);
BeamEnergyC1
=
BeamIsobutane
.
Slow
(
BeamEnergyC1
,
cm
/
3.
,
BeamAngle
);
BeamEnergyC1
=
BeamMylar
.
Slow
(
BeamEnergyC1
,
0.9
*
micrometer
,
BeamAngle
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment