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
af2bd41c
Commit
af2bd41c
authored
Jan 24, 2017
by
Kostyleva D.A
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://er.jinr.ru:90/vratislav.chudoba/NeuRad_tests
Conflicts: macros/testShowGraphs.cxx
parents
f4399fb1
09d9ad17
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
26 deletions
+118
-26
AEvent.cpp
dataClasses/AEvent.cpp
+37
-6
AEvent.h
dataClasses/AEvent.h
+9
-2
histCorr.C
macros/histCorr.C
+56
-17
testShowGraphs.cxx
macros/testShowGraphs.cxx
+16
-1
unname.gif
macros/unname.gif
+0
-0
No files found.
dataClasses/AEvent.cpp
View file @
af2bd41c
...
@@ -55,7 +55,8 @@ void AEvent::ProcessEvent() {
...
@@ -55,7 +55,8 @@ void AEvent::ProcessEvent() {
SetLED
();
SetLED
();
// SetGraphs();
// SetGraphs();
SetCFD
();
SetCFD
();
SetChargeCFD
();
// SetChargeCFD();
SetChargeLED
();
return
;
return
;
...
@@ -68,7 +69,7 @@ void AEvent::Reset() {
...
@@ -68,7 +69,7 @@ void AEvent::Reset() {
fTime
[
i
]
=
0
;
fTime
[
i
]
=
0
;
fAmpCFD
[
i
]
=
0
;
fAmpCFD
[
i
]
=
0
;
}
}
fTimeLED
=
0.
;
fEdgeSlope
=
0.
;
fEdgeSlope
=
0.
;
fEdgeXi
=
0.
;
fEdgeXi
=
0.
;
fEdgeSlope
=-
100.
;
fEdgeSlope
=-
100.
;
...
@@ -79,6 +80,7 @@ void AEvent::Reset() {
...
@@ -79,6 +80,7 @@ void AEvent::Reset() {
fTimeCFD
=
0.
;
fTimeCFD
=
0.
;
fZeroLevel
=
0.
;
fZeroLevel
=
0.
;
fChargeCFD
=
0.
;
fChargeCFD
=
0.
;
fChargeLED
=
0.
;
}
}
void
AEvent
::
SetInputEvent
(
RawEvent
**
event
)
{
void
AEvent
::
SetInputEvent
(
RawEvent
**
event
)
{
...
@@ -219,7 +221,7 @@ Double_t AEvent::FindZeroLevel() {
...
@@ -219,7 +221,7 @@ Double_t AEvent::FindZeroLevel() {
return
correction
;
return
correction
;
}
}
void
AEvent
::
SetChargeCFD
(
Int_t
tmin
,
Int_t
tmax
)
{
void
AEvent
::
SetChargeCFD
(
Int_t
tmin
,
Int_t
tmax
)
{
// tmin = -3, tmax = 17
Double_t
integral
=
0.
;
//voltage
Double_t
integral
=
0.
;
//voltage
Double_t
time_sig
=
0
;
//approximate signal duration in seconds
Double_t
time_sig
=
0
;
//approximate signal duration in seconds
...
@@ -237,6 +239,34 @@ void AEvent::SetChargeCFD(Int_t tmin, Int_t tmax) {
...
@@ -237,6 +239,34 @@ void AEvent::SetChargeCFD(Int_t tmin, Int_t tmax) {
}
}
void
AEvent
::
SetChargeLED
(
Int_t
tmin
,
Int_t
tmax
)
{
// tmin = -3, tmax = 17
Double_t
integral
=
0.
;
//voltage
Double_t
time_sig
=
0
;
//approximate signal duration in seconds
const
Double_t
res
=
50.
;
//resistance 50 Om
time_sig
=
(
double
)(
-
tmin
+
tmax
)
*
(
1e-9
);
/* for(Int_t i = 0; i < fNPoints; i++) {
if( fTime[i] > (fTimeLED + tmin) && fTime[i] < (fTimeLED + tmax) ) {
integral = integral + fAmpPos[i];
}
}*/
Int_t
imin
=
0
,
imax
=
0
;
Int_t
i
=
0
;
while
(
fTime
[
i
]
<
(
fTimeLED
+
tmin
)
&&
(
i
<
(
fGraphSignal
->
GetN
()
-
1
))
)
{
imin
=
i
;
i
++
;
}
i
=
0
;
while
(
fTime
[
i
]
<
(
fTimeLED
+
tmax
)
&&
(
i
<
(
fGraphSignal
->
GetN
()
-
1
))
)
{
imax
=
i
;
i
++
;
}
integral
=
fGraphSignal
->
Integral
(
imin
,
imax
);
fChargeLED
=
integral
*
time_sig
/
res
;
return
;
}
Double_t
AEvent
::
GetfCFD
()
{
Double_t
AEvent
::
GetfCFD
()
{
return
fTimeCFD
;
return
fTimeCFD
;
}
}
...
@@ -284,11 +314,12 @@ void AEvent::SetMaxAmplitudes() {
...
@@ -284,11 +314,12 @@ void AEvent::SetMaxAmplitudes() {
void
AEvent
::
SetLED
(
Double_t
threshold
)
{
void
AEvent
::
SetLED
(
Double_t
threshold
)
{
Double_t
time
=
0
;
Double_t
time
=
0
;
const
Double_t
timeStep
=
0.
1
;
const
Double_t
timeStep
=
0.
05
;
while
(
time
<
200.
&&
fGraphSignal
->
Eval
(
time
)
<=
threshold
)
{
while
(
time
<
fTimeAmpMax
&&
fGraphSignal
->
Eval
(
time
)
<=
threshold
)
{
fTimeLED
=
time
;
fTimeLED
=
time
;
time
=
time
+
timeStep
;
time
=
time
+
timeStep
;
}
}
//fTimeLED = time;
//fTimeLED = time; найти номера точек которые лежат на 3 нс раньше и на 20 нс позже чем точка с временем timeled (искать точки в пределах условных)
// сделать через функцию getpoint и цикл по точкам от
}
}
dataClasses/AEvent.h
View file @
af2bd41c
...
@@ -46,7 +46,8 @@ private:
...
@@ -46,7 +46,8 @@ private:
TArrayD
fAmpCFD
;
//array for CFD amplitudes (attenuated, inversed and delayed)
TArrayD
fAmpCFD
;
//array for CFD amplitudes (attenuated, inversed and delayed)
Double_t
fTimeCFD
;
//zero-crossing time
Double_t
fTimeCFD
;
//zero-crossing time
Double_t
fChargeCFD
;
//charge of the signal in Coulomb
Double_t
fChargeCFD
;
//!
Double_t
fChargeLED
;
//charge of the signal in Coulomb
Double_t
fTimeLED
;
//time of LED threshold crossing
Double_t
fTimeLED
;
//time of LED threshold crossing
...
@@ -122,7 +123,13 @@ public:
...
@@ -122,7 +123,13 @@ public:
//in range of (tmin,tmax) in ns)
//in range of (tmin,tmax) in ns)
//CFD time is taken as a start point
//CFD time is taken as a start point
void
SetLED
(
Double_t
threshold
=
0
.
015
);
void
SetChargeLED
(
Int_t
tmin
=
-
3
,
Int_t
tmax
=
17
);
//void SetLED(Double_t threshold = 0.001);
void
SetLED
(
Double_t
threshold
=
0
.
002
);
//leading edge discriminator
//leading edge discriminator
private
:
private
:
...
...
macros/histCorr.C
View file @
af2bd41c
//#include "TCanvas.h"
//#include "TCanvas.h"
void
histCorr
(
void
histCorr
(
// const char *filename = "
analysis_07_8
.root",
// const char *filename = "
Neurad_7_08_NEW
.root",
const
char
*
filename
=
"analysis_08_2.root"
,
const
char
*
filename
=
"analysis_08_2.root"
,
//
const char *foldername = "7_8",
const
char
*
foldername
=
"7_8"
,
const
char
*
foldername
=
"8_2"
,
//
const char *foldername = "8_2",
// const char *ext = ".eps",
// const char *ext = ".eps",
const
char
*
ext
=
".gif"
,
const
char
*
ext
=
".gif"
,
const
Bool_t
can1
=
0
,
const
Bool_t
can2
=
0
,
const
Bool_t
can3
=
0
,
const
Bool_t
can4
=
0
,
const
Bool_t
can5
=
1
)
const
Bool_t
can1
=
0
,
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
)
{
{
gSystem
->
Load
(
"../libData.so"
);
gSystem
->
Load
(
"../libData.so"
);
TFile
*
f
=
new
TFile
(
Form
(
"../data/dataDSR4/%s"
,
filename
));
TFile
*
f
=
new
TFile
(
Form
(
"../data/dataDSR4/%s"
,
filename
));
...
@@ -156,7 +156,7 @@ void histCorr(
...
@@ -156,7 +156,7 @@ void histCorr(
TCanvas
*
c4
=
new
TCanvas
(
"c4"
,
"Correlation pictures: XiSquares"
);
TCanvas
*
c4
=
new
TCanvas
(
"c4"
,
"Correlation pictures: XiSquares"
);
TH2F
*
h11
=
new
TH2F
(
"h11"
,
"Time difference between two channels vs XiSquare of edge"
,
100
,
-
0
.,
5
.,
100
,
0
.,
0
.
005
);
TH2F
*
h11
=
new
TH2F
(
"h11"
,
"Time difference between two channels vs XiSquare of edge"
,
100
,
-
0
.,
5
.,
100
,
0
.,
0
.
005
);
t
->
Draw
(
"Ach
1.fEdgeXi : (Ach1.fTime90 - Ach1
.fTime10) >> h11"
,
""
,
"col"
);
t
->
Draw
(
"Ach
0.fEdgeXi : (Ach0.fTime90 - Ach0
.fTime10) >> h11"
,
""
,
"col"
);
//t->Draw("Ach1.fEdgeXi : (Ach1.fTime90 - Ach1.fTime10) >> h11","(Ach1.fTime90 - Ach1.fTime10)>0","col");
//t->Draw("Ach1.fEdgeXi : (Ach1.fTime90 - Ach1.fTime10) >> h11","(Ach1.fTime90 - Ach1.fTime10)>0","col");
//x
//x
h11
->
GetXaxis
()
->
SetTitle
(
"
\\
Delta
\\
tau_{1}^{(rise)} [ns]"
);
h11
->
GetXaxis
()
->
SetTitle
(
"
\\
Delta
\\
tau_{1}^{(rise)} [ns]"
);
...
@@ -201,24 +201,63 @@ void histCorr(
...
@@ -201,24 +201,63 @@ void histCorr(
c5
->
Update
();
c5
->
Update
();
//c5->Print(Form("../macros/picsDRS4/file%s/TimeDiffCFD_0.7_3%s", foldername, ext));
//c5->Print(Form("../macros/picsDRS4/file%s/TimeDiffCFD_0.7_3%s", foldername, ext));
}
}
if
(
can5
)
{
if
(
can6
)
{
TCanvas
*
c5
=
new
TCanvas
(
"c5"
,
"Sigma"
);
TCanvas
*
c6
=
new
TCanvas
(
"c6"
,
"leading edge vs charge"
);
c5
->
cd
();
c6
->
Divide
(
2
,
2
);
TH1F
*
h11
=
new
TH1F
(
"h11"
,
"sigma"
,
1023
,
-
10
,
10
);
t
->
Draw
(
"Ach1.fAmpPos >> h11"
,
"Ach1.fTime >0"
,
"col"
);
c6
->
cd
(
1
);
//TH2F *h13 = new TH2F("h13", "leading edge vs charge",100, 130., 145., 100, -2e-9, 6e-9);
TH1F
*
h20
=
new
TH1F
(
"h20"
,
"hist led - cfd"
,
100
,
-
5
,
200
.);
//t->Draw("Ach0.fTimeCFD - Ach0.fTimeLED >> h20","Ach0.fTimeCFD - Ach0.fTimeLED > 0.3 && Ach0.fTimeCFD - Ach0.fTimeLED <1.3","");
t
->
Draw
(
"Ach0.fTimeLED >> h20"
,
"Ach0.fTimeLED > 120 && Ach0.fTimeLED < 150"
);
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x
//x
//h10->GetXaxis()->SetTitle("\\Delta \\tau_{1}^{(rise)} [ns]
");
/* h13->GetYaxis()->SetTitle("fChargeCFD
");
//h10->GetX
axis()->CenterTitle();
h13->GetY
axis()->CenterTitle();
//y
//y
//h10->GetYaxis()->SetTitle("fEdgeXi");
h13->GetXaxis()->SetTitle("fTimeLED");
//h10->GetYaxis()->CenterTitle();
h13->GetXaxis()->CenterTitle();*/
c5
->
Update
();
c6
->
Update
();
c6
->
cd
(
3
);
TH2F
*
h14
=
new
TH2F
(
"h14"
,
"fTIMECFD vs fTIMELED"
,
100
,
110
.,
140
.,
100
,
110
,
160
);
t
->
Draw
(
"Ach0.fTimeCFD : Ach0.fTimeLED >> h14"
,
""
,
"col"
);
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x
h14
->
GetYaxis
()
->
SetTitle
(
"fTimeCFD"
);
h14
->
GetYaxis
()
->
CenterTitle
();
//y
h14
->
GetXaxis
()
->
SetTitle
(
"fTimeLED"
);
h14
->
GetXaxis
()
->
CenterTitle
();
c6
->
Update
();
c6
->
cd
(
2
);
TH2F
*
h15
=
new
TH2F
(
"h15"
,
"leading edge vs charge"
,
100
,
100
.,
180
.,
100
,
-
0.02e-10
,
1e-10
);
t
->
Draw
(
"Ach1.fChargeCFD : Ach1.fTimeLED >> h15"
,
"Ach1.fChargeCFD>0"
,
"col"
);
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x
h15
->
GetYaxis
()
->
SetTitle
(
"fChargeCFD"
);
h15
->
GetYaxis
()
->
CenterTitle
();
//y
h15
->
GetXaxis
()
->
SetTitle
(
"fTimeLED"
);
h15
->
GetXaxis
()
->
CenterTitle
();
c6
->
Update
();
c6
->
cd
(
4
);
TH2F
*
h16
=
new
TH2F
(
"h16"
,
"FtimeCFD vs charge"
,
100
,
100
.,
180
.,
100
,
0
,
1e-10
);
t
->
Draw
(
"Ach1.fChargeCFD : Ach1.fTimeCFD >> h16"
,
"Ach1.fChargeCFD>3e-12"
,
"col"
);
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x
h16
->
GetYaxis
()
->
SetTitle
(
"fChargeCFD"
);
h16
->
GetYaxis
()
->
CenterTitle
();
//y
h16
->
GetXaxis
()
->
SetTitle
(
"fTimeCFD"
);
h16
->
GetXaxis
()
->
CenterTitle
();
c6
->
Update
();
//c4->Print(Form("../macros/picsDRS4/file%s/XiSquares%s", foldername, ext));
//c4->Print(Form("../macros/picsDRS4/file%s/XiSquares%s", foldername, ext));
}
}
}
}
macros/testShowGraphs.cxx
View file @
af2bd41c
...
@@ -5,13 +5,19 @@ void testShowGraphs()
...
@@ -5,13 +5,19 @@ void testShowGraphs()
const
Long64_t
kFirstEvent
=
128
;
const
Long64_t
kFirstEvent
=
128
;
TFile
fr
(
"../data/dataDSR4/analysis_08_2.root"
);
TFile
fr
(
"../data/dataDSR4/Neurad_7_08_NEW.root"
);
// TFile fr("../data/dataDSR4/analysis_07_8.root");
// TFile fr("../data/dataDSR4/analysis_07_8.root");
<<<<<<<
HEAD
// TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root");
// TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root");
// TFile fr("../data/dataTektronix/exp18.root");
// TFile fr("../data/dataTektronix/exp18.root");
=======
// TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root");
// TFile fr("../data/dataTektronix/exp18.root");
>>>>>>>
09
d9ad17f40ac0af9d228137f715f25ee9ea15ae
// TFile fr("../data/dataTektronix/analysisExp7.root");
// TFile fr("../data/dataTektronix/analysisExp7.root");
TTree
*
tr
=
(
TTree
*
)
fr
.
Get
(
"atree"
);
TTree
*
tr
=
(
TTree
*
)
fr
.
Get
(
"atree"
);
...
@@ -49,19 +55,28 @@ void testShowGraphs()
...
@@ -49,19 +55,28 @@ void testShowGraphs()
// cout << "warning 3" << endl;
// cout << "warning 3" << endl;
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"test"
,
10
,
10
,
1000
,
600
);
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"test"
,
10
,
10
,
1000
,
600
);
<<<<<<<
HEAD
//c1->Divide(3,2);
//c1->Divide(3,2);
c1
->
Divide
(
3
,
4
);
c1
->
Divide
(
3
,
4
);
=======
//c1->Divide(3,2);
c1
->
Divide
(
3
,
4
);
>>>>>>>
09
d9ad17f40ac0af9d228137f715f25ee9ea15ae
TF1
*
f1
=
new
TF1
(
"f1name"
,
"[0]+x*[1]"
);
TF1
*
f1
=
new
TF1
(
"f1name"
,
"[0]+x*[1]"
);
// TF1 *f1 = new TF1("pol1", );
// TF1 *f1 = new TF1("pol1", );
<<<<<<<
HEAD
for
(
Int_t
k
=
0
;
k
<
6
;
k
++
)
{
for
(
Int_t
k
=
0
;
k
<
6
;
k
++
)
{
// for (Int_t k = 0; k < 12; k++) {
// for (Int_t k = 0; k < 12; k++) {
=======
for
(
Int_t
k
=
0
;
k
<
12
;
k
++
)
{
>>>>>>>
09
d9ad17f40ac0af9d228137f715f25ee9ea15ae
c1
->
cd
(
k
+
1
);
c1
->
cd
(
k
+
1
);
gr
[
k
]
->
Draw
(
"AL*"
);
gr
[
k
]
->
Draw
(
"AL*"
);
...
...
macros/unname.gif
deleted
100644 → 0
View file @
f4399fb1
25.2 KB
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