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
fcf14ea5
Commit
fcf14ea5
authored
Jan 18, 2017
by
Muzalevsky I.A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CFD method was modified
parent
65a1372a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
AEvent.cpp
dataClasses/AEvent.cpp
+16
-4
No files found.
dataClasses/AEvent.cpp
View file @
fcf14ea5
...
@@ -133,17 +133,19 @@ void AEvent::SetGraphs() {
...
@@ -133,17 +133,19 @@ void AEvent::SetGraphs() {
void
AEvent
::
SetCFD
()
{
void
AEvent
::
SetCFD
()
{
Double_t
level
=
100.
;
//is necessary to find cfd amplitude value closest to zero
Double_t
level
=
100.
;
//is necessary to find cfd amplitude value closest to zero
Double_t
time
=
0
;
fGraphCFD
->
Set
(
fNPoints
);
fGraphCFD
->
Set
(
fNPoints
);
//working variables
//working variables
Double_t
maxCFD
=
0.
,
minCFD
=
0.
;
Double_t
maxCFD
=
0.
,
minCFD
=
0.
;
Double_t
TmaxCFD
=
0.
,
TminCFD
=
0.
;
Int_t
imax
=
0
,
imin
=
0
;
Int_t
imax
=
0
,
imin
=
0
;
const
Double_t
timeStep
=
0.05
;
for
(
Int_t
i
=
0
;
i
<
fNPoints
;
i
++
)
{
for
(
Int_t
i
=
0
;
i
<
fNPoints
;
i
++
)
{
//CFD method
//CFD method
if
(
i
>
fCFtimeDelay
)
{
if
(
i
>
fCFtimeDelay
)
{
// условие, чтобы не выскочить из размера массива ( обрезает границы на fCFtimeDelay)
fAmpCFD
[
i
]
=
fAmpPos
[
i
]
*
fCFratio
*
(
-
1
);
fAmpCFD
[
i
]
=
fAmpPos
[
i
]
*
fCFratio
*
(
-
1
);
fAmpCFD
[
i
]
=
fAmpCFD
[
i
]
+
fAmpPos
[
i
-
fCFtimeDelay
];
fAmpCFD
[
i
]
=
fAmpCFD
[
i
]
+
fAmpPos
[
i
-
fCFtimeDelay
];
fGraphCFD
->
SetPoint
(
i
,
fTime
[
i
],
fAmpCFD
[
i
]);
fGraphCFD
->
SetPoint
(
i
,
fTime
[
i
],
fAmpCFD
[
i
]);
...
@@ -152,26 +154,36 @@ void AEvent::SetCFD() {
...
@@ -152,26 +154,36 @@ void AEvent::SetCFD() {
//point for max CFD amplitude
//point for max CFD amplitude
if
(
fAmpCFD
[
i
]
>
maxCFD
)
{
if
(
fAmpCFD
[
i
]
>
maxCFD
)
{
maxCFD
=
fAmpCFD
[
i
];
maxCFD
=
fAmpCFD
[
i
];
TmaxCFD
=
fTime
[
i
];
imax
=
i
;
imax
=
i
;
}
}
//point for min CFD amplitude
//point for min CFD amplitude
if
(
fAmpCFD
[
i
]
<
minCFD
)
{
if
(
fAmpCFD
[
i
]
<
minCFD
)
{
minCFD
=
fAmpCFD
[
i
];
minCFD
=
fAmpCFD
[
i
];
TminCFD
=
fTime
[
i
];
imin
=
i
;
imin
=
i
;
}
}
}
}
//finding "zero" of CFD amplitude
/*
//finding "zero" of CFD amplitude
for(Int_t j = imin; j < imax; j++) {
for(Int_t j = imin; j < imax; j++) {
if(abs(fAmpCFD[j]) < level) {
if(abs(fAmpCFD[j]) < level) {
level = abs(fAmpCFD[j]);
level = abs(fAmpCFD[j]);
fTimeCFD = fTime[j];
fTimeCFD = fTime[j];
}
}
}
}
*/
//I want to find zero of CFD using graph and eval
time
=
TminCFD
;
while
(
(
fGraphCFD
->
Eval
(
time
)
<=
0
)
&&
(
time
<=
TmaxCFD
)
&&
(
time
>=
TminCFD
)
)
{
fTimeCFD
=
time
;
time
=
time
+
timeStep
;
}
}
}
/////// trying to create method
void
AEvent
::
FindFrontProperties
()
{
void
AEvent
::
FindFrontProperties
()
{
//in percents
//in percents
...
...
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