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
Open sidebar
np
nptool
Commits
afe979b1
Commit
afe979b1
authored
Jun 18, 2021
by
Charlie Paxman
Browse files
* e793s drawing simulated plots
parent
0aa3e8e9
Pipeline
#124850
passed with stages
in 3 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
8 deletions
+41
-8
Projects/e793s/macro/DrawPlots.C
Projects/e793s/macro/DrawPlots.C
+41
-8
No files found.
Projects/e793s/macro/DrawPlots.C
View file @
afe979b1
...
...
@@ -102,7 +102,7 @@ void GateOnGamma(double gamma, double width){
string
gating
=
"abs(T_MUGAST_VAMOS-2777)<600 && abs(AddBack_EDC-"
+
to_string
(
gamma
)
+
")<"
+
to_string
(
sigma
);
+
to_string
(
width
);
TCanvas
*
cEx_Gate
=
new
TCanvas
(
"cEx_Gate"
,
"cEx_Gate"
,
1000
,
1000
);
chain
->
Draw
(
"Ex>>ExGate(220,-1,10)"
,
gating
.
c_str
(),
"colz"
);
...
...
@@ -116,7 +116,7 @@ void GateOnParticle(double particle, double width){
string
gating
=
"abs(T_MUGAST_VAMOS-2777)<600 && abs(Ex-"
+
to_string
(
particle
)
+
")<"
+
to_string
(
sigma
);
+
to_string
(
width
);
TCanvas
*
cEg_Gate
=
new
TCanvas
(
"cEg_Gate"
,
"cEg_Gate"
,
1000
,
1000
);
chain
->
Draw
(
"AddBack_EDC>>EgGate(10000,0,10)"
,
gating
.
c_str
(),
"colz"
);
...
...
@@ -163,6 +163,34 @@ void CompareExsAt4MeV(){
cout
<<
" 4.3 - Violet"
<<
endl
;
}
void
CompareSimExp
(){
TCanvas
*
cSimExp
=
new
TCanvas
(
"cSimExp"
,
"cSimExp"
,
1000
,
1000
);
gStyle
->
SetOptStat
(
0
);
chain
->
Draw
(
"Ex>>hexp(70,-1,6)"
,
"abs(T_MUGAST_VAMOS-2777)<600"
,
""
);
TH1F
*
hexp
=
(
TH1F
*
)
gDirectory
->
Get
(
"hexp"
);
hexp
->
SetTitle
(
"Comparing Simulation to Experiment"
);
hexp
->
GetXaxis
()
->
SetTitle
(
"Ex [MeV]"
);
hexp
->
GetYaxis
()
->
SetTitle
(
"Counts / 0.1 MeV"
);
hexp
->
SetLineColor
(
kRed
);
TFile
*
simfile
=
new
TFile
(
"../../../Outputs/Analysis/SimTest_18June.root"
,
"READ"
);
TTree
*
simtree
=
(
TTree
*
)
simfile
->
FindObjectAny
(
"PhysicsTree"
);
simtree
->
Draw
(
"Ex>>hsim(70,-1,6)"
,
""
,
"same"
);
TH1F
*
hsim
=
(
TH1F
*
)
gDirectory
->
Get
(
"hsim"
);
hsim
->
SetLineColor
(
kBlue
);
auto
legend
=
new
TLegend
(
0
.
7
,
0
.
8
,
0
.
9
,
0
.
9
);
legend
->
AddEntry
(
hexp
,
"Experiment"
,
"l"
);
legend
->
AddEntry
(
hsim
,
"Simulation"
,
"l"
);
legend
->
Draw
();
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -185,13 +213,18 @@ void DrawPlots(){
cout
<<
"=========================================="
<<
endl
;
cout
<<
" AVAILABLE FUNCTIONS:: "
<<
endl
;
cout
<<
"
\t\t
- Draw_2DParticleGamma() "
<<
endl
;
cout
<<
"
\t\t
- Draw_1DGamma() "
<<
endl
;
cout
<<
"
\t\t
- Draw_1DParticle() "
<<
endl
;
cout
<<
"
\t\t
- GateOnGamma(gamma, width) "
<<
endl
;
cout
<<
"
\t\t
- GateOnParticle(particle, width) "
<<
endl
;
cout
<<
"
\t\t
- CompareExsAt4MeV() "
<<
endl
;
cout
<<
"
\t
- Draw_2DParticleGamma() "
<<
endl
;
cout
<<
"
\t
- Draw_1DGamma() "
<<
endl
;
cout
<<
"
\t
- Draw_1DParticle() "
<<
endl
;
cout
<<
""
<<
endl
;
cout
<<
"
\t
- GateOnGamma(gamma, width) "
<<
endl
;
cout
<<
"
\t
- GateOnParticle(particle, width) "
<<
endl
;
cout
<<
""
<<
endl
;
cout
<<
"
\t
- CompareExsAt4MeV() "
<<
endl
;
cout
<<
"
\t
- CompareSimExp() "
<<
endl
;
cout
<<
"=========================================="
<<
endl
;
...
...
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