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
0ca0b60d
Commit
0ca0b60d
authored
Jan 16, 2017
by
Muzalevsky I.A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
method for obtaining EdgeSlope and EdgeBorders added for class AEvent
parent
89696c5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
1 deletion
+51
-1
AEvent.cpp
dataClasses/AEvent.cpp
+42
-1
AEvent.h
dataClasses/AEvent.h
+9
-0
No files found.
dataClasses/AEvent.cpp
View file @
0ca0b60d
...
...
@@ -74,7 +74,7 @@ void AEvent::ProcessEvent() {
fTimeAmpMax
=
maxAmpT
;
SetGraphs
();
FindFrontProperties
();
SetCFD
();
SetChargeCFD
();
...
...
@@ -90,6 +90,9 @@ void AEvent::Reset() {
fAmpCFD
[
i
]
=
0
;
}
EdgeSlope
=
0.
;
t_10
=
0.
;
t_90
=
0.
;
fAmpMax
=
0.
;
fTimeAmpMax
=
0.
;
fTimeCFD
=
0.
;
...
...
@@ -176,7 +179,33 @@ void AEvent::SetCFD() {
}
}
}
/////// trying to create method
void
AEvent
::
FindFrontProperties
()
{
if
(
!
fGraphSignal
)
{
Warning
(
"AEvent::FindZeroLevel"
,
"Graph was not set"
);
return
;
}
Int_t
NumM
=
fTimeAmpMax
*
10
;
for
(
Int_t
i
=
NumM
;
i
>
0
;
i
--
)
{
if
(
fAmpPos
[
i
]
<
0.1
*
fAmpMax
)
{
t_10
=
fTime
[
i
+
1
];
break
;}
}
for
(
Int_t
i
=
NumM
;
i
>
0
;
i
--
)
{
if
(
fAmpPos
[
i
]
<
0.9
*
fAmpMax
)
{
t_90
=
fTime
[
i
+
1
];
break
;}
}
TF1
*
fit1
=
new
TF1
(
"fit1"
,
"[1]*x+[0]"
);
//function for one parameter fitting in the range of pmin-pmax
fit1
->
SetRange
(
t_10
,
t_90
);
fGraphSignal
->
Fit
(
fit1
,
"R"
,
"goff"
);
EdgeSlope
=
fit1
->
GetParameter
(
1
);
delete
fit1
;
}
////////
Double_t
AEvent
::
FindZeroLevel
()
{
SetGraphs
();
...
...
@@ -227,3 +256,15 @@ Double_t AEvent::GetOnefTime(Int_t i) {
Double_t
AEvent
::
GetOnefAmpPos
(
Int_t
i
)
{
return
fAmpPos
[
i
];
}
Double_t
AEvent
::
GetT_10
()
{
return
t_10
;
}
Double_t
AEvent
::
GetT_90
()
{
return
t_90
;
}
Double_t
AEvent
::
GetEdgeSlope
()
{
return
EdgeSlope
;
}
dataClasses/AEvent.h
View file @
0ca0b60d
...
...
@@ -39,6 +39,9 @@ private:
Double_t
fAmpMax
;
Double_t
fTimeAmpMax
;
Double_t
fZeroLevel
;
Double_t
EdgeSlope
;
Double_t
t_10
;
Double_t
t_90
;
TArrayD
fAmpCFD
;
//array for CFD amplitudes (attenuated, inversed and delayed)
Double_t
fTimeCFD
;
//zero-crossing time
...
...
@@ -60,6 +63,10 @@ public:
AEvent
(
const
Int_t
npoints
);
virtual
~
AEvent
();
ClassDef
(
AEvent
,
1
);
Double_t
GetT_10
();
Double_t
GetT_90
();
Double_t
GetEdgeSlope
();
Double_t
GetfCFD
();
Double_t
GetOnefTime
(
Int_t
i
);
Double_t
GetOnefAmpPos
(
Int_t
i
);
...
...
@@ -91,6 +98,8 @@ public:
}
//draws signal shape graphs
void
FindFrontProperties
();
Double_t
FindZeroLevel
();
//for zero level correction. one parameter fit between pmin and pmax
//returns fit parameter i.e. number on which amplitude should be corrected
...
...
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