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
Admin message
Gitlab has been updated. More info
here
.
Show more breadcrumbs
np
nptool
Commits
3f3fac1e
Commit
3f3fac1e
authored
9 years ago
by
de Séréville Nicolas
Browse files
Options
Downloads
Patches
Plain Diff
+ remove old code in NPFunction.cxx
parent
ef9672e6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NPLib/Physics/NPFunction.cxx
+1
-18
1 addition, 18 deletions
NPLib/Physics/NPFunction.cxx
Projects/MUGAST/Analysis.cxx
+0
-1
0 additions, 1 deletion
Projects/MUGAST/Analysis.cxx
Projects/MUGAST/ShowResults.C
+10
-1
10 additions, 1 deletion
Projects/MUGAST/ShowResults.C
with
11 additions
and
20 deletions
NPLib/Physics/NPFunction.cxx
+
1
−
18
View file @
3f3fac1e
...
@@ -48,21 +48,6 @@ TH1F* Read1DProfile(string filename,string HistName)
...
@@ -48,21 +48,6 @@ TH1F* Read1DProfile(string filename,string HistName)
// variable buffer
// variable buffer
double
xb
,
wb
;
double
xb
,
wb
;
// Read the file
/* while(!ASCII.eof()){
getline(ASCII,LineBuffer);
stringstream LineStream(LineBuffer);
// ignore comment lines
if (LineBuffer.compare(0,1,"%")!=0 &&
LineBuffer.compare(0,1,"#")!=0 &&
LineBuffer.compare(0,1,"@")!=0) {
LineStream >> xb >> wb ;
cout << xb << "\t" << wb << endl;
x.push_back(xb);
w.push_back(wb);
}
}
*/
// read the file
// read the file
Double_t
xmin
=
200
;
Double_t
xmin
=
200
;
Double_t
xmax
=
-
200
;
Double_t
xmax
=
-
200
;
...
@@ -80,12 +65,10 @@ TH1F* Read1DProfile(string filename,string HistName)
...
@@ -80,12 +65,10 @@ TH1F* Read1DProfile(string filename,string HistName)
mysize
++
;
mysize
++
;
}
}
Double_t
dx
=
(
xmax
-
xmin
)
/
(
mysize
);
Double_t
dx
=
(
xmax
-
xmin
)
/
(
mysize
);
// cout << xmin << "\t" << xmax << "\t" << size << "\t" << dx << endl;
// cout << xmin << "\t" << xmax << "\t" <<
my
size << "\t" << dx << endl;
// fill histo
// fill histo
// h = new TH1F(HistName.c_str(), HistName.c_str(), size, xmin-dx/2, xmax+dx/2);
h
=
new
TH1F
(
HistName
.
c_str
(),
HistName
.
c_str
(),
mysize
,
xmin
,
xmax
+
dx
);
h
=
new
TH1F
(
HistName
.
c_str
(),
HistName
.
c_str
(),
mysize
,
xmin
,
xmax
+
dx
);
// h = new TH1F(HistName.c_str(), HistName.c_str(), size, xmin, xmax);
for
(
unsigned
int
i
=
0
;
i
<
mysize
;
i
++
)
{
for
(
unsigned
int
i
=
0
;
i
<
mysize
;
i
++
)
{
int
bin
=
h
->
FindBin
(
x
[
i
]);
int
bin
=
h
->
FindBin
(
x
[
i
]);
h
->
SetBinContent
(
bin
,
w
[
i
]);
h
->
SetBinContent
(
bin
,
w
[
i
]);
...
...
This diff is collapsed.
Click to expand it.
Projects/MUGAST/Analysis.cxx
+
0
−
1
View file @
3f3fac1e
...
@@ -52,7 +52,6 @@ void Analysis::Init() {
...
@@ -52,7 +52,6 @@ void Analysis::Init() {
// get reaction information
// get reaction information
myReaction
=
new
NPL
::
Reaction
();
myReaction
=
new
NPL
::
Reaction
();
myReaction
->
ReadConfigurationFile
(
NPOptionManager
::
getInstance
()
->
GetReactionFile
());
myReaction
->
ReadConfigurationFile
(
NPOptionManager
::
getInstance
()
->
GetReactionFile
());
TargetThickness
=
m_DetectorManager
->
GetTargetThickness
()
*
micrometer
;
OriginalBeamEnergy
=
myReaction
->
GetBeamEnergy
();
OriginalBeamEnergy
=
myReaction
->
GetBeamEnergy
();
// target thickness
// target thickness
...
...
This diff is collapsed.
Click to expand it.
Projects/MUGAST/ShowResults.C
+
10
−
1
View file @
3f3fac1e
...
@@ -48,6 +48,7 @@ using namespace std;
...
@@ -48,6 +48,7 @@ using namespace std;
// nptool headers
// nptool headers
#include
"TInitialConditions.h"
#include
"TInitialConditions.h"
#include
"TInteractionCoordinates.h"
#include
"TInteractionCoordinates.h"
//#include "NPDetectorManager.h"
#include
"Reaction.h"
#include
"Reaction.h"
using
namespace
NPL
;
using
namespace
NPL
;
...
@@ -78,14 +79,22 @@ void ShowResults()
...
@@ -78,14 +79,22 @@ void ShowResults()
}
}
void
CountingRates
(
Double_t
ibeam
,
Double_t
ubt
)
void
CountingRates
(
Double_t
ibeam
=
1e5
,
Double_t
ubt
=
30
)
{
{
// load event generator file
// load event generator file
NPL
::
Reaction
*
reaction
=
new
NPL
::
Reaction
();
NPL
::
Reaction
*
reaction
=
new
NPL
::
Reaction
();
Reaction
*
reaction
=
new
Reaction
();
reaction
->
ReadConfigurationFile
(
"30Pdp.reaction"
);
reaction
->
ReadConfigurationFile
(
"30Pdp.reaction"
);
// reaction->ReadConfigurationFile("11Be_d3He.reaction");
// reaction->ReadConfigurationFile("11Be_d3He.reaction");
// get angular distribution
// get angular distribution
TH1F
*
dsig
=
reaction
->
GetCrossSectionHist
();
TH1F
*
dsig
=
reaction
->
GetCrossSectionHist
();
dsig
->
Draw
();
dsig
->
Draw
();
// calculate total cross section
Double_t
stot
=
reaction
->
GetTotalCrossSection
();
cout
<<
"total cross section = "
<<
reaction
->
GetTotalCrossSection
()
<<
" mb"
<<
endl
;
cout
<<
"total cross section = "
<<
reaction
->
GetTotalCrossSection
()
<<
" mb"
<<
endl
;
// get target thickness
// NPL::DetectorManager* myDetector = new NPL::DetectorManager();
// myDetector->ReadConfigurationFile("MUGAST_Manu.detector");
}
}
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