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
3a8df41e
Commit
3a8df41e
authored
Feb 04, 2017
by
Muzalevsky I.A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
script for pictures modified
parent
07c6d669
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
32 deletions
+108
-32
histCorr.C
macros/histCorr.C
+108
-32
No files found.
macros/histCorr.C
View file @
3a8df41e
#include "TH2F.h"
#include "TH3F.h"
#include "TStyle.h"
#include "TMath.h"
#include "TF1.h"
void
histCorr
(
...
...
@@ -13,10 +15,16 @@ void histCorr(
// const char *ext = ".eps",
const
char
*
ext
=
".gif"
,
const
Bool_t
can1
=
0
,
const
Bool_t
can2
=
0
,
const
Bool_t
can1
=
1
,
const
Bool_t
can2
=
0
,
// delta tLed and delta tcfd // dvumerki
const
Bool_t
can3
=
0
,
const
Bool_t
can4
=
0
,
const
Bool_t
can5
=
1
,
const
Bool_t
can6
=
1
)
const
Bool_t
can5
=
0
,
const
Bool_t
can6
=
0
)
// tLEd and CFD for colollinated and NONcollimated data
{
Double_t
rMin
[
4
];
Double_t
rMax
[
4
];
using
std
::
cout
;
using
std
::
endl
;
gSystem
->
Load
(
"../libData.so"
);
...
...
@@ -37,44 +45,66 @@ void histCorr(
c1
->
Divide
(
2
,
2
);
c1
->
cd
(
1
);
TF1
*
g1
=
new
TF1
(
"g1"
,
"gaus"
,
0
,
20
);
g1
->
SetParLimits
(
0
,
1e+2
,
1e+4
);
g1
->
SetParLimits
(
1
,
-
100
,
100
);
g1
->
SetParLimits
(
2
,
0
.
1
,
10
);
rMin
[
0
]
=
-
4
.
8
;
rMax
[
0
]
=
0
.
8
;
rMin
[
1
]
=
-
7
.
6
;
rMax
[
1
]
=
-
0
.
8
;
rMin
[
2
]
=
9
.
2
;
rMax
[
2
]
=
12
.
8
;
rMin
[
3
]
=
6
.
8
;
rMax
[
3
]
=
12
.
4
;
TH1F
*
h1
=
new
TH1F
(
"h1"
,
"delta tau_CFD for NONcollimated data"
,
1000
,
-
200
.,
200
);
//t->Draw("Ach0.fTimeCFD - Ach3.fTimeCFD >> h1","(Ach0.fTimeCFD - Ach3.fTimeCFD)>0 && (Ach0.fTimeCFD - Ach3.fTimeCFD)<8","");
t
->
Draw
(
"Ach0.fTimeCFD - Ach3.fTimeCFD >> h1"
,
""
,
""
);
h1
->
GetXaxis
()
->
SetRangeUser
(
-
65
,
8
);
t
->
Draw
(
"Ach0.fTimeCFD - Ach3.fTimeCFD >> h1"
,
"(Ach0.fTimeCFD - Ach3.fTimeCFD)>-20 && (Ach0.fTimeCFD - Ach3.fTimeCFD)<10"
,
""
);
h1
->
GetXaxis
()
->
SetRangeUser
(
-
20
,
10
);
h1
->
GetXaxis
()
->
SetTitle
(
"delta tauCFD [ns]"
);
h1
->
GetXaxis
()
->
CenterTitle
();
g1
->
SetRange
(
rMin
[
0
],
rMax
[
0
]);
h1
->
Fit
(
"g1"
,
"R"
);
cout
<<
"sigma= "
<<
g1
->
GetParameter
(
2
)
<<
endl
;
c1
->
cd
(
2
);
TH1F
*
h2
=
new
TH1F
(
"h2"
,
"delta tau_LED for NONcollimated data"
,
1000
,
-
200
.,
200
);
//t->Draw("Ach0.fTimeLED - Ach3.fTimeLED >> h2","(Ach0.fTimeLED - Ach3.fTimeLED)>0 && (Ach0.fTimeLED - Ach3.fTimeLED)<8
","");
t
->
Draw
(
"Ach0.fTimeLED - Ach3.fTimeLED >> h2"
,
""
,
""
);
h2
->
GetXaxis
()
->
SetRangeUser
(
-
65
,
8
);
t
->
Draw
(
"Ach0.fTimeLED - Ach3.fTimeLED >> h2"
,
"(Ach0.fTimeLED - Ach3.fTimeLED)>-20 && (Ach0.fTimeLED - Ach3.fTimeLED)<10
"
,
""
);
//
t->Draw("Ach0.fTimeLED - Ach3.fTimeLED >> h2","","");
h2
->
GetXaxis
()
->
SetRangeUser
(
-
20
,
10
);
h2
->
GetXaxis
()
->
SetTitle
(
"delta tauLED [ns]"
);
h2
->
GetXaxis
()
->
CenterTitle
();
g1
->
SetRange
(
rMin
[
1
],
rMax
[
1
]);
h2
->
Fit
(
"g1"
,
"R"
);
cout
<<
"sigma= "
<<
g1
->
GetParameter
(
2
)
<<
endl
;
c1
->
cd
(
3
);
TH1F
*
h3
=
new
TH1F
(
"h3"
,
"delta tau_CFD for collimated data"
,
1000
,
0
,
200
);
TH1F
*
h3
=
new
TH1F
(
"h3"
,
"delta tau_CFD for collimated data"
,
1000
,
-
20
0
,
200
);
t1
->
Draw
(
"Ach0.fTimeCFD - Ach1.fTimeCFD >> h3"
,
"(Ach0.fTimeCFD - Ach1.fTimeCFD)>0 && (Ach0.fTimeCFD - Ach1.fTimeCFD)<
15
0"
,
""
);
t1
->
Draw
(
"Ach0.fTimeCFD - Ach1.fTimeCFD >> h3"
,
"(Ach0.fTimeCFD - Ach1.fTimeCFD)>0 && (Ach0.fTimeCFD - Ach1.fTimeCFD)<
2
0"
,
""
);
//t1->Draw("Ach0.fTimeCFD - Ach1.fTimeCFD >> h3","","");
h3
->
GetXaxis
()
->
SetRangeUser
(
0
,
15
0
);
h3
->
GetXaxis
()
->
SetRangeUser
(
0
,
2
0
);
h3
->
GetXaxis
()
->
SetTitle
(
"delta tauCFD [ns]"
);
h3
->
GetXaxis
()
->
CenterTitle
();
g1
->
SetRange
(
rMin
[
2
],
rMax
[
2
]);
h3
->
Fit
(
"g1"
,
"R"
);
cout
<<
"sigma= "
<<
g1
->
GetParameter
(
2
)
<<
endl
;
c1
->
cd
(
4
);
TH1F
*
h4
=
new
TH1F
(
"h4"
,
"delta tau_LED for collimated data"
,
1000
,
-
200
.,
200
);
t1
->
Draw
(
"Ach0.fTimeLED - Ach1.fTimeLED >> h4"
,
"(Ach0.fTimeLED - Ach1.fTimeLED)>
-2 && (Ach0.fTimeLED - Ach1.fTimeLED)<15
"
,
""
);
t1
->
Draw
(
"Ach0.fTimeLED - Ach1.fTimeLED >> h4"
,
"(Ach0.fTimeLED - Ach1.fTimeLED)>
0 && (Ach0.fTimeLED - Ach1.fTimeLED)<20
"
,
""
);
//t1->Draw("Ach0.fTimeLED - Ach1.fTimeLED >> h4","","");
h4
->
GetXaxis
()
->
SetRangeUser
(
-
2
,
15
);
h4
->
GetXaxis
()
->
SetRangeUser
(
0
,
20
);
h4
->
GetXaxis
()
->
SetTitle
(
"delta tauLED [ns]"
);
h4
->
GetXaxis
()
->
CenterTitle
();
g1
->
SetRange
(
rMin
[
3
],
rMax
[
3
]);
h4
->
Fit
(
"g1"
,
"R"
);
cout
<<
"sigma= "
<<
g1
->
GetParameter
(
2
)
<<
endl
;
c1
->
Update
();
//
c1->Print(Form("../macros/picsDRS4/%s/deltaT%s", foldername, ext));
c1
->
Print
(
Form
(
"../macros/picsDRS4/%s/deltaT%s"
,
foldername
,
ext
));
}
if
(
can2
)
{
...
...
@@ -208,45 +238,78 @@ void histCorr(
c5
->
Divide
(
2
,
2
);
c5
->
cd
(
1
);
rMin
[
0
]
=
138
.
4
;
rMax
[
0
]
=
140
.
4
;
rMin
[
1
]
=
137
;
rMax
[
1
]
=
138
.
4
;
rMin
[
2
]
=
136
.
4
;
rMax
[
2
]
=
142
.
4
;
rMin
[
3
]
=
135
.
2
;
rMax
[
3
]
=
141
.
4
;
// TF1 *gaus5 = new TF1("gaus5","TMath:gaus(0)");
TF1
*
g5
=
new
TF1
(
"g5"
,
"gaus"
,
135
,
140
);
g5
->
SetParLimits
(
0
,
1e+2
,
1e+4
);
g5
->
SetParLimits
(
1
,
10
,
1000
);
g5
->
SetParLimits
(
2
,
0
.
1
,
10
);
TH1F
*
h12
=
new
TH1F
(
"h12"
,
"tau_CFD triggered channel for NONcollimated data"
,
1000
,
0
.,
200
);
t
->
Draw
(
"Ach0.fTimeCFD >> h12"
,
"Ach0.fTimeCFD>132 && Ach0.fTimeCFD<1
42
"
,
""
);
h12
->
GetXaxis
()
->
SetRangeUser
(
1
20
,
150
);
t
->
Draw
(
"Ach0.fTimeCFD >> h12"
,
"Ach0.fTimeCFD>132 && Ach0.fTimeCFD<1
50
"
,
""
);
h12
->
GetXaxis
()
->
SetRangeUser
(
1
32
,
150
);
h12
->
GetXaxis
()
->
SetTitle
(
"tauCFD_{0} [ns]"
);
h12
->
GetXaxis
()
->
CenterTitle
();
g5
->
SetRange
(
rMin
[
0
],
rMax
[
0
]);
h12
->
Fit
(
"g5"
,
"R"
);
cout
<<
"sigma= "
<<
g5
->
GetParameter
(
2
)
<<
endl
;
c5
->
cd
(
2
);
TH1F
*
h13
=
new
TH1F
(
"h13"
,
"tau LED triggered channel for NONcollimated data"
,
1000
,
0
.,
200
);
t
->
Draw
(
"Ach0.fTimeLED >> h13"
,
"Ach0.fTimeLED>132 && Ach0.fTimeLED<1
42
"
,
""
);
h13
->
GetXaxis
()
->
SetRangeUser
(
1
20
,
150
);
t
->
Draw
(
"Ach0.fTimeLED >> h13"
,
"Ach0.fTimeLED>132 && Ach0.fTimeLED<1
50
"
,
""
);
h13
->
GetXaxis
()
->
SetRangeUser
(
1
32
,
150
);
h13
->
GetXaxis
()
->
SetTitle
(
"tauLED_{0} [ns]"
);
h13
->
GetXaxis
()
->
CenterTitle
();
g5
->
SetRange
(
rMin
[
1
],
rMax
[
1
]);
h13
->
Fit
(
"g5"
,
"R"
);
cout
<<
"sigma= "
<<
g5
->
GetParameter
(
2
)
<<
endl
;
c5
->
cd
(
3
);
TH1F
*
h14
=
new
TH1F
(
"h14"
,
"tau_CFD nontriggered channel for NONcollimated data"
,
1000
,
0
.,
200
);
t
->
Draw
(
"Ach1.fTimeCFD >> h14"
,
"Ach1.fTimeCFD > 1
20 && Ach1.fTimeCFD<18
0"
,
""
);
h14
->
GetXaxis
()
->
SetRangeUser
(
1
20
,
150
);
t
->
Draw
(
"Ach1.fTimeCFD >> h14"
,
"Ach1.fTimeCFD > 1
32 && Ach1.fTimeCFD<15
0"
,
""
);
h14
->
GetXaxis
()
->
SetRangeUser
(
1
32
,
150
);
h14
->
GetXaxis
()
->
SetTitle
(
"tauCFD_{0} [ns]"
);
h14
->
GetXaxis
()
->
CenterTitle
();
g5
->
SetRange
(
rMin
[
2
],
rMax
[
2
]);
h14
->
Fit
(
"g5"
,
"R"
);
cout
<<
"sigma= "
<<
g5
->
GetParameter
(
2
)
<<
endl
;
c5
->
cd
(
4
);
TH1F
*
h15
=
new
TH1F
(
"h15"
,
"tau LED nontriggered channel for NONcollimated data"
,
1000
,
0
.,
200
);
t
->
Draw
(
"Ach1.fTimeLED >> h15"
,
"Ach1.fTimeLED>1
20 && Ach1.fTimeLED<18
0"
,
""
);
h15
->
GetXaxis
()
->
SetRangeUser
(
1
20
,
150
);
t
->
Draw
(
"Ach1.fTimeLED >> h15"
,
"Ach1.fTimeLED>1
32 && Ach1.fTimeLED<15
0"
,
""
);
h15
->
GetXaxis
()
->
SetRangeUser
(
1
32
,
150
);
h15
->
GetXaxis
()
->
SetTitle
(
"tauLED_{0} [ns]"
);
h15
->
GetXaxis
()
->
CenterTitle
();
g5
->
SetRange
(
rMin
[
3
],
rMax
[
3
]);
h15
->
Fit
(
"g5"
,
"R"
);
cout
<<
"sigma= "
<<
g5
->
GetParameter
(
2
)
<<
endl
;
c5
->
Update
();
c5
->
Print
(
Form
(
"../macros/picsDRS4/%s/NONcollimatedT%s"
,
foldername
,
ext
));
}
if
(
can6
)
{
TCanvas
*
c6
=
new
TCanvas
(
"c6"
,
"Changing CFD parameters"
);
c6
->
Divide
(
2
,
2
);
TF1
*
g6
=
new
TF1
(
"g6"
,
"gaus"
,
135
,
140
);
//g6->SetParLimits(0,1e+2,1e+4);
//g6->SetParLimits(1,10,1000);
//g6->SetParLimits(2,0.1,10);
rMin
[
0
]
=
138
.
8
;
rMax
[
0
]
=
140
.
2
;
rMin
[
1
]
=
137
.
4
;
rMax
[
1
]
=
138
.
4
;
rMin
[
2
]
=
125
.
6
;
rMax
[
2
]
=
131
.
6
;
rMin
[
3
]
=
125
.
8
;
rMax
[
3
]
=
131
.
4
;
c6
->
cd
(
1
);
TH1F
*
h16
=
new
TH1F
(
"h16"
,
"tau_CFD triggered channel for collimated data"
,
1000
,
0
.,
200
);
...
...
@@ -255,6 +318,10 @@ void histCorr(
h16
->
GetXaxis
()
->
SetRangeUser
(
120
,
150
);
h16
->
GetXaxis
()
->
SetTitle
(
"tauCFD_{0} [ns]"
);
h16
->
GetXaxis
()
->
CenterTitle
();
g6
->
SetRange
(
rMin
[
0
],
rMax
[
0
]);
h16
->
Fit
(
"g6"
,
"R"
);
cout
<<
"sigma= "
<<
g6
->
GetParameter
(
2
)
<<
endl
;
c6
->
cd
(
2
);
TH1F
*
h17
=
new
TH1F
(
"h17"
,
"tau LED triggered channel for collimated data"
,
1000
,
0
.,
200
);
...
...
@@ -263,6 +330,9 @@ void histCorr(
h17
->
GetXaxis
()
->
SetRangeUser
(
120
,
150
);
h17
->
GetXaxis
()
->
SetTitle
(
"tauLED_{0} [ns]"
);
h17
->
GetXaxis
()
->
CenterTitle
();
g6
->
SetRange
(
rMin
[
1
],
rMax
[
1
]);
h17
->
Fit
(
"g6"
,
"R"
);
cout
<<
"sigma= "
<<
g6
->
GetParameter
(
2
)
<<
endl
;
c6
->
cd
(
3
);
...
...
@@ -272,6 +342,9 @@ void histCorr(
h18
->
GetXaxis
()
->
SetRangeUser
(
120
,
150
);
h18
->
GetXaxis
()
->
SetTitle
(
"tauCFD_{0} [ns]"
);
h18
->
GetXaxis
()
->
CenterTitle
();
g6
->
SetRange
(
rMin
[
2
],
rMax
[
2
]);
h18
->
Fit
(
"g6"
,
"R"
);
cout
<<
"sigma= "
<<
g6
->
GetParameter
(
2
)
<<
endl
;
c6
->
cd
(
4
);
TH1F
*
h19
=
new
TH1F
(
"h19"
,
"tau LED nontriggered channel for collimated data"
,
1000
,
0
.,
200
);
...
...
@@ -280,6 +353,9 @@ void histCorr(
h19
->
GetXaxis
()
->
SetRangeUser
(
120
,
150
);
h19
->
GetXaxis
()
->
SetTitle
(
"tauLED_{0} [ns]"
);
h19
->
GetXaxis
()
->
CenterTitle
();
g6
->
SetRange
(
rMin
[
3
],
rMax
[
3
]);
h19
->
Fit
(
"g6"
,
"R"
);
cout
<<
"sigma= "
<<
g6
->
GetParameter
(
2
)
<<
endl
;
c6
->
Update
();
c6
->
Print
(
Form
(
"../macros/picsDRS4/%s/collimatedT%s"
,
foldername
,
ext
));
...
...
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