Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Be_libraries
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vratislav Chudoba
Be_libraries
Commits
3540d8a7
Commit
3540d8a7
authored
Aug 01, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Script for PRC figures of spectra added.
parent
162c9f3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
0 deletions
+82
-0
figSpectra.cxx
macros/BeCorrPRC/figSpectra.cxx
+82
-0
No files found.
macros/BeCorrPRC/figSpectra.cxx
0 → 100755
View file @
3540d8a7
//#include "TFile.h"
//#include "TCanvas.h"
//#include "TH1F.h"
void
figSpectra
()
{
TFile
*
fr
=
new
TFile
(
"figures/spectra.root"
,
"READ"
);
// fr->ls();
TH1F
*
hExp
[
4
];
TH1F
*
hSim
[
4
];
TH1F
*
hCurr
=
0
;
TString
heName
;
TString
hsName
;
hCurr
=
(
TH1F
*
)
fr
->
Get
(
"heSpectrum4560"
);
hExp
[
0
]
=
new
TH1F
(
*
hCurr
);
hCurr
=
(
TH1F
*
)
fr
->
Get
(
"heSpectrum6075"
);
hExp
[
1
]
=
new
TH1F
(
*
hCurr
);
hCurr
=
(
TH1F
*
)
fr
->
Get
(
"heSpectrum7590"
);
hExp
[
2
]
=
new
TH1F
(
*
hCurr
);
hCurr
=
(
TH1F
*
)
fr
->
Get
(
"heSpectrum90120"
);
hExp
[
3
]
=
new
TH1F
(
*
hCurr
);
hCurr
=
(
TH1F
*
)
fr
->
Get
(
"hsSpectrum4560"
);
hSim
[
0
]
=
new
TH1F
(
*
hCurr
);
hCurr
=
(
TH1F
*
)
fr
->
Get
(
"hsSpectrum6075"
);
hSim
[
1
]
=
new
TH1F
(
*
hCurr
);
hCurr
=
(
TH1F
*
)
fr
->
Get
(
"hsSpectrum7590"
);
hSim
[
2
]
=
new
TH1F
(
*
hCurr
);
hCurr
=
(
TH1F
*
)
fr
->
Get
(
"hsSpectrum90120"
);
hSim
[
3
]
=
new
TH1F
(
*
hCurr
);
TCanvas
*
c1
=
new
TCanvas
();
c1
->
ToggleEditor
();
// c1->SetWindowSize(800, 1200);
c1
->
SetWindowSize
(
800
,
800
);
c1
->
Divide
(
2
,
2
,
.001
,
.001
);
for
(
Int_t
i
=
0
;
i
<
4
;
i
++
)
{
c1
->
cd
(
i
+
1
);
hExp
[
i
]
->
SetTitle
(
""
);
hSim
[
i
]
->
SetTitle
(
""
);
hSim
[
i
]
->
Draw
(
""
);
hExp
[
i
]
->
Draw
(
"E same"
);
}
// c1->SaveAs("figures/spectra.eps");
TCanvas
*
c2
=
new
TCanvas
();
c2
->
ToggleEditor
();
c2
->
SetWindowSize
(
800
,
800
);
c2
->
Divide
(
2
,
2
,
.001
,
.001
);
TH1F
*
diff
[
4
];
for
(
Int_t
i
=
0
;
i
<
4
;
i
++
)
{
c2
->
cd
(
i
+
1
);
diff
[
i
]
=
new
TH1F
(
*
hExp
[
i
]);
diff
[
i
]
->
Add
(
hSim
[
i
],
-
1
);
diff
[
i
]
->
Draw
();
diff
[
i
]
->
GetXaxis
()
->
SetTitle
(
""
);
diff
[
i
]
->
GetYaxis
()
->
SetTitle
(
""
);
// Double_t max = diff[i]->GetYaxis()->GetXmax();
diff
[
i
]
->
GetYaxis
()
->
SetRangeUser
(
-
100
,
3500
);
}
c2
->
SaveAs
(
"figures/spectraDiff.eps"
);
}
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