Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NeuRad_tests
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vratislav Chudoba
NeuRad_tests
Commits
a596d4e9
Commit
a596d4e9
authored
Jan 16, 2017
by
Kostyleva D.A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Script histCorr.C is complemented
parent
8d9c0875
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
48 deletions
+77
-48
histCorr.C
macros/histCorr.C
+77
-48
No files found.
macros/histCorr.C
View file @
a596d4e9
//#include "TCanvas.h"
void
histCorr
()
void
histCorr
(
const
Bool_t
can1
=
1
,
const
Bool_t
can2
=
1
)
{
gSystem
->
Load
(
"../libData.so"
);
TFile
*
f
=
new
TFile
(
"../data/dataDSR4/analysis_07_8.root"
);
TTree
*
t
=
(
TTree
*
)
f
->
Get
(
"atree"
);
TCanvas
*
c1
=
new
TCanvas
(
"canvas"
,
"Correlation pictures"
);
c1
->
Divide
(
2
,
2
);
// TH2F *h1 = new TH2F("h1", "Time difference between two channels vs an integral of the first channel",500,-150.,150.,500,0.,5e-9);
TH2F
*
h1
=
new
TH2F
(
"h1"
,
"Time difference between two channels vs an integral of the first channel"
,
125
,
-
50
.,
50
.,
125
,
0
.,
5e-9
);
TH2F
*
h2
=
new
TH2F
(
"h2"
,
"Time difference between two channels vs an integral of the second channel"
,
125
,
-
50
.,
50
.,
125
,
0e-9
,
5e-9
);
// TH2F *h3 = new TH2F("h3", "Integral of the first channel vs integral of the second channel",500,0.,5e-9,500,0.,5e-9);
TH2F
*
h3
=
new
TH2F
(
"h3"
,
"Integral of the first channel vs integral of the second channel"
,
500
,
0
.,
2e-9
,
500
,
0
.,
2e-9
);
TH2F
*
h4
=
new
TH2F
(
"h4"
,
"Time difference between two channels vs amplitude of the first channel"
,
100
,
10
,
1e-10
,
100
,
-
300
,
300
);
c1
->
cd
(
1
);
t
->
Draw
(
"Ach0.fChargeCFD : ( Ach0.fTimeCFD - Ach2.fTimeCFD ) >> h1"
,
""
,
"col"
);
//x
h1
->
GetXaxis
()
->
SetTitle
(
"
\\
Delta
\\
tau_{0-2} [ns]"
);
h1
->
GetXaxis
()
->
CenterTitle
();
//y
h1
->
GetYaxis
()
->
SetTitle
(
"Q_{0} [C]"
);
h1
->
GetYaxis
()
->
CenterTitle
();
c1
->
cd
(
2
);
t
->
Draw
(
"Ach2.fChargeCFD : ( Ach0.fTimeCFD - Ach2.fTimeCFD ) >> h2"
,
""
,
"col"
);
h2
->
GetXaxis
()
->
SetTitle
(
"
\\
Delta
\\
tau_{0-2} [ns]"
);
h2
->
GetXaxis
()
->
CenterTitle
();
//y
h2
->
GetYaxis
()
->
SetTitle
(
"Q_{2} [C]"
);
h2
->
GetYaxis
()
->
CenterTitle
();
c1
->
cd
(
3
);
t
->
Draw
(
"Ach0.fChargeCFD:Ach2.fChargeCFD >> h3"
,
""
,
"col"
);
//x
h3
->
GetXaxis
()
->
SetTitle
(
"Q_{2} [C]"
);
h3
->
GetXaxis
()
->
CenterTitle
();
//y
h3
->
GetYaxis
()
->
SetTitle
(
"Q_{0} [C]"
);
h3
->
GetYaxis
()
->
CenterTitle
();
c1
->
cd
(
4
);
//TCanvas *c2 = new TCanvas("Correlations 2");
//c2->Divide(1,2);
if
(
can1
)
{
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"Correlation pictures: delta t from CFD vs something"
);
c1
->
Divide
(
2
,
2
);
TH2F
*
h1
=
new
TH2F
(
"h1"
,
"Time difference between two channels vs an integral of the first channel"
,
125
,
-
50
.,
50
.,
125
,
0
.,
5e-9
);
TH2F
*
h2
=
new
TH2F
(
"h2"
,
"Time difference between two channels vs an integral of the second channel"
,
125
,
-
50
.,
50
.,
125
,
0e-9
,
5e-9
);
TH2F
*
h3
=
new
TH2F
(
"h3"
,
"Time difference between two channels vs amplitude of the first channel"
,
125
,
-
100
.,
100
.,
125
,
0
.,
0
.
5
);
TH2F
*
h4
=
new
TH2F
(
"h4"
,
"Time difference between two channels vs amplitude of the second channel"
,
125
,
-
100
.,
100
.,
125
,
0
.,
0
.
5
);
c1
->
cd
(
1
);
t
->
Draw
(
"Ach0.fChargeCFD : ( Ach0.fTimeCFD - Ach2.fTimeCFD ) >> h1"
,
""
,
"col"
);
//x
h1
->
GetXaxis
()
->
SetTitle
(
"
\\
Delta
\\
tau_{0-2} [ns]"
);
h1
->
GetXaxis
()
->
CenterTitle
();
//y
h1
->
GetYaxis
()
->
SetTitle
(
"Q_{0} [C]"
);
h1
->
GetYaxis
()
->
CenterTitle
();
c1
->
cd
(
2
);
t
->
Draw
(
"Ach2.fChargeCFD : ( Ach0.fTimeCFD - Ach2.fTimeCFD ) >> h2"
,
""
,
"col"
);
h2
->
GetXaxis
()
->
SetTitle
(
"
\\
Delta
\\
tau_{0-2} [ns]"
);
h2
->
GetXaxis
()
->
CenterTitle
();
//y
h2
->
GetYaxis
()
->
SetTitle
(
"Q_{2} [C]"
);
h2
->
GetYaxis
()
->
CenterTitle
();
c1
->
cd
(
3
);
t
->
Draw
(
"Ach0.fAmpMax: ( Ach0.fTimeCFD - Ach2.fTimeCFD ) >> h3"
,
""
,
"col"
);
//x
h3
->
GetXaxis
()
->
SetTitle
(
"
\\
Delta
\\
tau_{0-2} [ns]"
);
h3
->
GetXaxis
()
->
CenterTitle
();
//y
h3
->
GetYaxis
()
->
SetTitle
(
"Max_ampl_{0} [V]"
);
h3
->
GetYaxis
()
->
CenterTitle
();
c1
->
cd
(
4
);
t
->
Draw
(
"Ach2.fAmpMax: ( Ach0.fTimeCFD - Ach2.fTimeCFD ) >> h4"
,
""
,
"col"
);
//x
h4
->
GetXaxis
()
->
SetTitle
(
"
\\
Delta
\\
tau_{0-2} [ns]"
);
h4
->
GetXaxis
()
->
CenterTitle
();
//y
h4
->
GetYaxis
()
->
SetTitle
(
"Max_ampl_{2} [V]"
);
h4
->
GetYaxis
()
->
CenterTitle
();
c1
->
Show
();
c1
->
Update
();
}
if
(
can2
)
{
TCanvas
*
c2
=
new
TCanvas
(
"c2"
,
"Correlation pictures: Integrals and amplitudes"
);
c2
->
Divide
(
1
,
2
);
TH2F
*
h5
=
new
TH2F
(
"h5"
,
"Integral of the first channel vs integral of the second channel"
,
300
,
0
.,
2e-9
,
300
,
0
.,
2e-9
);
TH2F
*
h6
=
new
TH2F
(
"h6"
,
"Amplitude of the first channel vs amplitude of the second channel"
,
300
,
10
,
1e-10
,
300
,
10
,
1e-10
);
c2
->
cd
(
1
);
t
->
Draw
(
"Ach0.fChargeCFD : Ach2.fChargeCFD >> h5"
,
""
,
"col"
);
//x
h5
->
GetXaxis
()
->
SetTitle
(
"Q_{2} [C]"
);
h5
->
GetXaxis
()
->
CenterTitle
();
//y
h5
->
GetYaxis
()
->
SetTitle
(
"Q_{0} [C]"
);
h5
->
GetYaxis
()
->
CenterTitle
();
c2
->
cd
(
2
);
t
->
Draw
(
"Ach0.fAmpMax : Ach2.fAmpMax >> h6"
,
""
,
"col"
);
//x
h6
->
GetXaxis
()
->
SetTitle
(
"Max_ampl_{2} [V]"
);
h6
->
GetXaxis
()
->
CenterTitle
();
//y
h6
->
GetYaxis
()
->
SetTitle
(
"Max_ampl_{0} [V]"
);
h6
->
GetYaxis
()
->
CenterTitle
();
c2
->
Update
();
}
}
/*Time difference between two channels vs an integral of the first channel,
2. Time difference between two channels vs an integral of the second channel,
3. Integral of the first channel vs integral of the second channel,
4. Time difference between two channels vs amplitude of the first channel,
5. Time difference between two channels vs amplitude of the second channel,
6. Amplitude of the first channel vs amplitude of the second channel
*/
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