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
5eb9075c
Commit
5eb9075c
authored
Mar 22, 2017
by
DariaKostyleva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to apply manual time-amplitude correction, script walk_corr.C
parent
7aa6b255
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
180 additions
and
20 deletions
+180
-20
histCorrNew01.C
macros/histCorrNew01.C
+70
-12
histCorrNew02.C
macros/histCorrNew02.C
+5
-5
histPresent.C
macros/histPresent.C
+1
-1
integralFormSignal.cpp
macros/integralFormSignal.cpp
+1
-1
testShowGraphs.cxx
macros/testShowGraphs.cxx
+21
-1
walk_corr.C
macros/walk_corr.C
+82
-0
No files found.
macros/histCorrNew01.C
View file @
5eb9075c
...
...
@@ -5,16 +5,16 @@
void
histCorrNew01
(
//01 means it is used for channels 0 and 1
//
const char *filename = "analysis_07_8.root", //considered non-collimated
const
char
*
filename
=
"analysis_07_8.root"
,
//considered non-collimated
// const char *filename = "analysis_07_2.root", //collimated?
// const char *filename = "analysis_07_4.root",
const
char
*
filename
=
"analysis_08_2.root"
,
//
const char *filename = "analysis_08_2.root",
const
char
*
foldername
=
"7_8/chpair01"
,
// const char *ext = ".eps",
const
char
*
ext
=
".gif"
,
const
Bool_t
can1
=
0
,
const
Bool_t
can2
=
0
,
const
Bool_t
can3
=
0
,
const
Bool_t
can4
=
1
)
const
Bool_t
can1
=
1
,
const
Bool_t
can2
=
0
,
const
Bool_t
can3
=
0
,
const
Bool_t
can4
=
0
)
//const Bool_t can5 = 0, const Bool_t can6 = 0)
{
using
std
::
cout
;
...
...
@@ -29,11 +29,12 @@ void histCorrNew01 (
if
(
can1
){
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"Correlation pictures for non-collimated data: delta t and integrals"
);
c1
->
Divide
(
2
,
2
);
//
c1->Divide(2,2);
c1
->
cd
(
1
);
TH2F
*
h1
=
new
TH2F
(
"h1"
,
"front time tau vs charge TF 0 "
,
200
,
0
,
0.5e-9
,
100
,
5
,
15
);
t
->
Draw
(
" Ach0.fTimeFront - Ach1.fTimeFront : Ach0.fChargeTF >> h1"
,
""
,
"col"
);
/* c1->cd(1);
TH2F *h1 = new TH2F("h1", "front time tau vs charge TF 0 ", 200, 0 ,1.0e-9, 200, -40, 40 );
// t->Draw(" Ach0.fTimeFront - Ach1.fTimeFront : Ach0.fChargeTF >> h1","","col");
t->Draw(" Ach0.fTimeLED - Ach1.fTimeLED : Ach0.fChargeLED >> h1","","col");
//x
h1->GetXaxis()->SetTitle("Charge [C]");
h1->GetXaxis()->CenterTitle();
...
...
@@ -44,8 +45,9 @@ void histCorrNew01 (
c1->Update();
c1->cd(2);
TH2F
*
h2
=
new
TH2F
(
"h2"
,
"front time tau vs charge TF 1 "
,
200
,
0
,
0.5e-9
,
200
,
5
,
15
);
t
->
Draw
(
" Ach0.fTimeFront - Ach1.fTimeFront : Ach1.fChargeTF >> h2"
,
""
,
"col"
);
TH2F *h2 = new TH2F("h2", "front time tau vs charge TF 1 ", 200, 0, 0.5e-9, 200, -20 ,30);
// t->Draw(" Ach0.fTimeFront - Ach1.fTimeFront : Ach1.fChargeTF >> h2","","col");
t->Draw(" Ach0.fTimeLED - Ach1.fTimeLED : Ach1.fChargeLED >> h2","","col");
//x
h2->GetXaxis()->SetTitle("Charge [C]");
h2->GetXaxis()->CenterTitle();
...
...
@@ -56,8 +58,9 @@ void histCorrNew01 (
c1->Update();
c1->cd(3);
TH2F
*
h3
=
new
TH2F
(
"h3"
,
"charge TF 1 vs charge TF 0"
,
200
,
0
,
0.5e-9
,
200
,
0
,
0.5e-9
);
t
->
Draw
(
" Ach0.fChargeTF : Ach1.fChargeTF >> h3"
,
""
,
"col"
);
TH2F *h3 = new TH2F("h3", "charge TF 1 vs charge TF 0", 400, 0.02 ,0.7e-9, 400, 0.06, 0.5e-9);
// t->Draw(" Ach0.fChargeTF : Ach1.fChargeTF >> h3","","col");
t->Draw(" Ach0.fChargeLED : Ach1.fChargeLED >> h3","","col");
//x
h3->GetXaxis()->SetTitle("Charge_0 [C]");
h3->GetXaxis()->CenterTitle();
...
...
@@ -66,7 +69,62 @@ void histCorrNew01 (
h3->GetYaxis()->CenterTitle();
c1->Update();
*/
//pictures for latex report, LED
c1
->
Divide
(
2
,
1
);
c1
->
cd
(
1
);
TH2F
*
h2
=
new
TH2F
(
"h2"
,
"time difference (LED method) vs charge of non-trigger channel "
,
100
,
-
12
,
5
,
100
,
0
,
0.17e-9
);
// t->Draw(" Ach0.fTimeFront - Ach1.fTimeFront : Ach1.fChargeTF >> h2","","col");
t
->
Draw
(
" Ach1.fChargeLED : Ach0.fTimeLED - Ach1.fTimeLED >> h2"
,
""
,
"col"
);
//x
h2
->
GetXaxis
()
->
SetTitle
(
"time [ns]"
);
h2
->
GetXaxis
()
->
CenterTitle
();
//y
h2
->
GetYaxis
()
->
SetTitle
(
"Q [C]"
);
h2
->
GetYaxis
()
->
CenterTitle
();
c1
->
Update
();
c1
->
cd
(
2
);
TH2F
*
h3
=
new
TH2F
(
"h3"
,
"charge of trigger channel vs charge of non-trigger channel"
,
400
,
0
.
02
,
0.7e-9
,
400
,
0
.
06
,
0.5e-9
);
// t->Draw(" Ach0.fChargeTF : Ach1.fChargeTF >> h3","","col");
t
->
Draw
(
" Ach0.fChargeLED : Ach1.fChargeLED >> h3"
,
""
,
"col"
);
//x
h3
->
GetXaxis
()
->
SetTitle
(
"Q_{0} [C]"
);
h3
->
GetXaxis
()
->
CenterTitle
();
//y
h3
->
GetYaxis
()
->
SetTitle
(
"Q_{1} [C]"
);
h3
->
GetYaxis
()
->
CenterTitle
();
c1
->
Update
();
//pictures for latex report, CFD
/* c1->Divide(2,1);
c1->cd(1);
TH2F *h2 = new TH2F("h2", "time difference (CFD method) vs charge of non-trigger channel ", 100, -12 ,5, 100, 0, 0.17e-9);
// t->Draw(" Ach0.fTimeFront - Ach1.fTimeFront : Ach1.fChargeTF >> h2","","col");
t->Draw(" Ach1.fChargeCFD : Ach0.fTimeCFD - Ach1.fTimeCFD >> h2","","col");
//x
h2->GetXaxis()->SetTitle("time [ns]");
h2->GetXaxis()->CenterTitle();
//y
h2->GetYaxis()->SetTitle("Q [C]");
h2->GetYaxis()->CenterTitle();
c1->Update();
c1->cd(2);
TH2F *h3 = new TH2F("h3", "charge of trigger channel vs charge of non-trigger channel", 400, 0.02 ,0.7e-9, 400, 0.06, 0.5e-9);
// t->Draw(" Ach0.fChargeTF : Ach1.fChargeTF >> h3","","col");
t->Draw(" Ach0.fChargeCFD : Ach1.fChargeCFD >> h3","","col");
//x
h3->GetXaxis()->SetTitle("Q_{0} [C]");
h3->GetXaxis()->CenterTitle();
//y
h3->GetYaxis()->SetTitle("Q_{1} [C]");
h3->GetYaxis()->CenterTitle();
*/
c1
->
Update
();
// c1->Print(Form("../macros/picsDRS4/file%s/time_front_corr1%s", foldername, ext));
}
...
...
macros/histCorrNew02.C
View file @
5eb9075c
...
...
@@ -10,9 +10,9 @@ void histCorrNew02 (
// 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
,
const
Bool_t
can3
=
0
,
const
Bool_t
can4
=
0
,
const
Bool_t
can5
=
0
,
const
Bool_t
can6
=
1
)
const
Bool_t
can5
=
0
,
const
Bool_t
can6
=
0
)
{
using
std
::
cout
;
using
std
::
endl
;
...
...
@@ -29,7 +29,7 @@ void histCorrNew02 (
c1
->
Divide
(
2
,
2
);
c1
->
cd
(
1
);
TH2F
*
h1
=
new
TH2F
(
"h1"
,
"front time tau vs charge TF 0 "
,
200
,
0
,
0.5e-9
,
100
,
5
,
15
);
TH2F
*
h1
=
new
TH2F
(
"h1"
,
"front time tau vs charge TF 0 "
,
200
,
0
,
1.0e-9
,
200
,
-
40
,
40
);
t
->
Draw
(
" Ach0.fTimeFront - Ach2.fTimeFront : Ach0.fChargeTF >> h1"
,
""
,
"col"
);
//x
h1
->
GetXaxis
()
->
SetTitle
(
"Charge [C]"
);
...
...
@@ -41,7 +41,7 @@ void histCorrNew02 (
c1
->
Update
();
c1
->
cd
(
2
);
TH2F
*
h2
=
new
TH2F
(
"h2"
,
"front time tau vs charge TF 2 "
,
200
,
0
,
0.5e-9
,
200
,
5
,
15
);
TH2F
*
h2
=
new
TH2F
(
"h2"
,
"front time tau vs charge TF 2 "
,
200
,
0
,
0.5e-9
,
200
,
-
20
,
30
);
t
->
Draw
(
" Ach0.fTimeFront - Ach2.fTimeFront : Ach2.fChargeTF >> h2"
,
""
,
"col"
);
//x
h2
->
GetXaxis
()
->
SetTitle
(
"Charge [C]"
);
...
...
@@ -53,7 +53,7 @@ void histCorrNew02 (
c1
->
Update
();
c1
->
cd
(
3
);
TH2F
*
h3
=
new
TH2F
(
"h3"
,
"charge TF 2 vs charge TF 0"
,
200
,
0
,
0.5e-9
,
200
,
0
,
0.5
e-9
);
TH2F
*
h3
=
new
TH2F
(
"h3"
,
"charge TF 2 vs charge TF 0"
,
200
,
0
,
2.0e-9
,
200
,
0
,
2.0
e-9
);
t
->
Draw
(
" Ach0.fChargeTF : Ach2.fChargeTF >> h3"
,
""
,
"col"
);
//x
h3
->
GetXaxis
()
->
SetTitle
(
"Charge_0 [C]"
);
...
...
macros/histPresent.C
View file @
5eb9075c
...
...
@@ -12,7 +12,7 @@ void histPresent (
// const char *ext = ".eps",
const
char
*
ext
=
".pdf"
,
const
Bool_t
can1
=
0
,
const
Bool_t
can2
=
0
,
const
Bool_t
can1
=
1
,
const
Bool_t
can2
=
1
,
const
Bool_t
can3
=
1
,
const
Bool_t
can4
=
0
)
//const Bool_t can5 = 0/*, const Bool_t can6 = 0*/)
{
...
...
macros/integralFormSignal.cpp
View file @
5eb9075c
{
gSystem
->
Load
(
"../libData.so"
);
TFile
*
f
=
new
TFile
(
"../data/dataDSR4/
Neurad_081216_2NEW
.root"
);
TFile
*
f
=
new
TFile
(
"../data/dataDSR4/
analysis_07_8
.root"
);
TTree
*
tr
=
(
TTree
*
)
f
->
Get
(
"atree"
);
const
Int_t
nP
=
1024
;
...
...
macros/testShowGraphs.cxx
View file @
5eb9075c
...
...
@@ -19,7 +19,7 @@ void testShowGraphs()
gSystem
->
Load
(
"../libData.so"
);
const
Long64_t
kFirstEvent
=
1
4
0
;
const
Long64_t
kFirstEvent
=
1
1
0
;
// TFile fr("../data/dataDSR4/Neurad_7_08_NEW.root");
TFile
fr
(
"../data/dataDSR4/analysis_07_8.root"
);
...
...
@@ -98,4 +98,24 @@ void testShowGraphs()
//c1->Print(Form("../macros/picsDRS4/%s/Signal_shapes_with_fit%s", foldername, ext));
*/
// picture for TDR
/*
c1->Divide(1,2);
c1->cd(1);
gr[2]->GetXaxis()->SetRangeUser(130, 175);
gr[2]->GetXaxis()->SetTitle("Time [ns]");
gr[2]->GetXaxis()->CenterTitle();
gr[2]->GetYaxis()->SetTitle("Signal [V]");
gr[2]->GetYaxis()->CenterTitle();
gr[2]->Draw("AL*");
c1->cd(2);
gr[3]->GetXaxis()->SetRangeUser(130, 175);
gr[3]->GetXaxis()->SetTitle("Time [ns]");
gr[3]->GetXaxis()->CenterTitle();
gr[3]->GetYaxis()->SetTitle("Signal [V]");
gr[3]->GetYaxis()->CenterTitle();
gr[3]->Draw("AL*");
*/
}
macros/walk_corr.C
0 → 100644
View file @
5eb9075c
#include "TH2F.h"
#include "TH3F.h"
#include "TStyle.h"
void
walk_corr
(
//01 means it is used for channels 0 and 1
const
char
*
filename
=
"analysis_07_8.root"
,
//considered non-collimated
// const char *filename = "analysis_08_2.root",
const
Bool_t
can1
=
1
)
{
using
std
::
cout
;
using
std
::
endl
;
gSystem
->
Load
(
"../libData.so"
);
TFile
*
f
=
new
TFile
(
Form
(
"../data/dataDSR4/%s"
,
filename
));
TTree
*
t
=
(
TTree
*
)
f
->
Get
(
"atree"
);
if
(
can1
){
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"Trying to correct the walk effect"
);
//pictures for latex report, LED
/* c1->Divide(2,1);
c1->cd(1);
TH2F *h2 = new TH2F("h2", "time difference (LED method) vs charge of non-trigger channel ", 100, -12 ,5, 100, 0, 0.14e-9);
t->Draw(" Ach1.fChargeLED : Ach0.fTimeLED - Ach1.fTimeLED >> h2","","col");
//x
h2->GetXaxis()->SetTitle("time [ns]");
h2->GetXaxis()->CenterTitle();
//y
h2->GetYaxis()->SetTitle("Q [C]");
h2->GetYaxis()->CenterTitle();
// c1->cd(2);
TProfile *prof1 = new TProfile("prof1","Profile of y vs x",100, -12, 5, 0, 0.17e-9);
prof1 = h2->ProfileX();
// prof1->Fit("pol2","","",-6,0);
prof1->Draw("same");
*/
//pictures for latex report, CFD
c1
->
Divide
(
2
,
2
);
c1
->
cd
(
1
);
TH2F
*
h2
=
new
TH2F
(
"h2"
,
"time difference (CFD method) vs charge of non-trigger channel "
,
100
,
-
12
,
5
,
100
,
0
,
0.17e-9
);
t
->
Draw
(
" Ach1.fChargeCFD : Ach0.fTimeCFD - Ach1.fTimeCFD >> h2"
,
""
,
"col"
);
//x
h2
->
GetXaxis
()
->
SetTitle
(
"time [ns]"
);
h2
->
GetXaxis
()
->
CenterTitle
();
//y
h2
->
GetYaxis
()
->
SetTitle
(
"Q [C]"
);
h2
->
GetYaxis
()
->
CenterTitle
();
h2
->
SetMaximum
(
10
);
c1
->
Update
();
c1
->
cd
(
2
);
//TProfile *prof1 = new TProfile("prof1","Profile of y vs x"/*,100, -12, 5, 0, 0.17e-9, "o"*/);
TProfile
*
prof1
=
h2
->
ProfileX
();
//prof1 = h2->ProfileY();
TF1
*
myfit
=
new
TF1
(
"myfit"
,
"[0] - [1]*exp([2]/sqrt(x))"
);
myfit
->
SetRange
(
0
.
0
,
0
.
08
);
prof1
->
Fit
(
"pol1"
,
""
,
""
,
-
4
,
0
);
//prof1->Fit("myfit","R");//,0,0.06);
prof1
->
Draw
();
c1
->
cd
(
3
);
TH2F
*
h3
=
new
TH2F
(
"h3"
,
"time difference (CFD method) vs charge of non-trigger channel AFTER CORRECTION"
,
100
,
-
12
,
5
,
100
,
0
,
0.17e-9
);
h3
->
SetMaximum
(
10
);
t
->
Draw
(
"Ach1.fChargeCFD : (Ach0.fTimeCFD - Ach1.fTimeCFD) + 0.550*1.58e-11/Ach1.fChargeCFD >> h3"
,
""
,
"col"
);
c1
->
cd
(
4
);
TH1F
*
h4
=
new
TH1F
(
"h4"
,
"time difference AFTER CORRECTION"
,
50
,
-
8
,
8
);
t
->
Draw
(
" (Ach0.fTimeCFD - Ach1.fTimeCFD) + 0.550*1.58e-11/Ach1.fChargeCFD >> h4"
,
"Ach0.fTimeCFD>100. && Ach0.fTimeCFD<160 && Ach1.fTimeCFD>100. && Ach1.fTimeCFD<160"
,
""
);
h4
->
GetXaxis
()
->
SetTitle
(
"Time difference [ns]"
);
h4
->
GetXaxis
()
->
CenterTitle
();
//h4->Fit("gaus","","",-3,1);
h4
->
Fit
(
"gaus"
,
""
,
""
,
-
2
,
1
.
5
);
gStyle
->
SetOptFit
();
}
}
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