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
09d9ad17
Commit
09d9ad17
authored
Jan 24, 2017
by
Muzalevsky I.A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
method for fcharge in AEvent was modified
parent
d8078e99
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
28 deletions
+101
-28
AEvent.cpp
dataClasses/AEvent.cpp
+37
-6
AEvent.h
dataClasses/AEvent.h
+8
-5
histCorr.C
macros/histCorr.C
+56
-17
No files found.
dataClasses/AEvent.cpp
View file @
09d9ad17
...
@@ -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 @
09d9ad17
...
@@ -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,11 +123,13 @@ public:
...
@@ -122,11 +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
<<<<<<<
HEAD
void
SetChargeLED
(
Int_t
tmin
=
-
3
,
Int_t
tmax
=
17
);
//void SetLED(Double_t threshold = 0.001);
//void SetLED(Double_t threshold = 0.001);
=======
void
SetLED
(
Double_t
threshold
=
0
.
0
15
);
void
SetLED
(
Double_t
threshold
=
0
.
0
02
);
>>>>>>>
e3dcb40f5675931d81a3f0e102fd53689f30c581
//leading edge discriminator
//leading edge discriminator
private
:
private
:
...
...
macros/histCorr.C
View file @
09d9ad17
//#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));
}
}
}
}
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