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
7c3331d7
Commit
7c3331d7
authored
12 years ago
by
matta
Browse files
Options
Downloads
Plain Diff
merge of '754ce46894a8a4775cf68dca9e5c2ce099666af1'
and 'fe23b05b135b6c97ff64d2ab12fc48fce90b56fb'
parents
890229bd
269775b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NPLib/Physics/NPBeam.cxx
+13
-4
13 additions, 4 deletions
NPLib/Physics/NPBeam.cxx
NPSimulation/src/Sharc.cc
+4
-5
4 additions, 5 deletions
NPSimulation/src/Sharc.cc
with
17 additions
and
9 deletions
NPLib/Physics/NPBeam.cxx
+
13
−
4
View file @
7c3331d7
...
@@ -89,7 +89,6 @@ void Beam::ReadConfigurationFile(string Path){
...
@@ -89,7 +89,6 @@ void Beam::ReadConfigurationFile(string Path){
string
DataBuffer
;
string
DataBuffer
;
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
ifstream
ReactionFile
;
ifstream
ReactionFile
;
ReactionFile
.
open
(
Path
.
c_str
());
bool
ReadingStatus
=
false
;
bool
ReadingStatus
=
false
;
bool
check_BeamName
=
false
;
bool
check_BeamName
=
false
;
...
@@ -111,11 +110,21 @@ void Beam::ReadConfigurationFile(string Path){
...
@@ -111,11 +110,21 @@ void Beam::ReadConfigurationFile(string Path){
bool
check_AllEnergy
=
false
;
bool
check_AllEnergy
=
false
;
bool
check_AllEmittance
=
false
;
bool
check_AllEmittance
=
false
;
if
(
!
ReactionFile
.
is_open
())
{
ifstream
ReactionFile
;
cout
<<
"Error: File "
<<
Path
<<
" not found"
<<
endl
;
string
GlobalPath
=
getenv
(
"NPTOOL"
);
exit
(
1
);
string
StandardPath
=
GlobalPath
+
"/Inputs/EventGenerator/"
+
Path
;
ReactionFile
.
open
(
StandardPath
.
c_str
());
if
(
ReactionFile
.
is_open
())
{
cout
<<
"Reading Reaction File "
<<
Path
<<
endl
;}
// In case the file is not found in the standard path, the programm try to interpret the file name as an absolute or relative file path.
else
{
ReactionFile
.
open
(
Path
.
c_str
()
);
if
(
ReactionFile
.
is_open
())
{
if
(
fVerboseLevel
==
1
)
cout
<<
"Reading Reaction File "
<<
Path
<<
endl
;}
else
{
cout
<<
"Reaction File "
<<
Path
<<
" not found"
<<
endl
;
exit
(
1
);}
}
}
while
(
!
ReactionFile
.
eof
())
{
while
(
!
ReactionFile
.
eof
())
{
//Pick-up next line
//Pick-up next line
getline
(
ReactionFile
,
LineBuffer
);
getline
(
ReactionFile
,
LineBuffer
);
...
...
This diff is collapsed.
Click to expand it.
NPSimulation/src/Sharc.cc
+
4
−
5
View file @
7c3331d7
...
@@ -464,16 +464,15 @@ void Sharc::ConstructBOXDetector(G4LogicalVolume* world){
...
@@ -464,16 +464,15 @@ void Sharc::ConstructBOXDetector(G4LogicalVolume* world){
///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
// Place the detector in the world
// Place the detector in the world
// Position of the center of the PCB
// Position of the center of the PCB
G4double
Exposed_Length
=
BOX_Wafer_Length
+
BOX_PCB_Slot_Border
+
BOX_PCB_Slot_Width
;
// G4double Exposed_Length= BOX_Wafer_Length + BOX_PCB_Slot_Border + BOX_PCB_Slot_Width;
G4double
DetectorOffset
=
-
0.5
*
(
BOX_PCB_Length
-
Exposed_Length
);
// G4double DetectorOffset= -0.5*(BOX_PCB_Length-Exposed_Length);
/*FIXME*/
//////////////////////////////////////////
/*FIXME*/
//////////////////////////////////////////
G4ThreeVector
DetectorPosition
=
G4ThreeVector
DetectorPosition
=
G4ThreeVector
(
DetectorOffset
+
0.25
*
mm
,
Box_Wafer_Offset
.
y
(),
0
);
G4ThreeVector
(
0
,
Box_Wafer_Offset
.
y
(),
0
);
// Distance of the PCB to the target
// Distance of the PCB to the target
G4ThreeVector
DetectorSpacing
=
G4ThreeVector
DetectorSpacing
=
-
G4ThreeVector
(
0
,
0
,
0.5
*
Exposed_Length
);
-
G4ThreeVector
(
0
,
0
,
Box_Wafer_Offset
.
y
()
+
BOX_PCB_Slot_Position
);
// If a PAD is present, DSSD is not in the center of the Slot:
// If a PAD is present, DSSD is not in the center of the Slot:
G4ThreeVector
PAD_OFFSET
=-
G4ThreeVector
(
0.5
*
PAD_PCB_Thickness
,
0
,
0
);
G4ThreeVector
PAD_OFFSET
=-
G4ThreeVector
(
0.5
*
PAD_PCB_Thickness
,
0
,
0
);
...
...
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