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
d3787933
Commit
d3787933
authored
Jan 11, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Class AEvent modified. Second constructor added.
parent
580c6137
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
12 deletions
+25
-12
AEvent.cpp
dataClasses/AEvent.cpp
+14
-4
AEvent.h
dataClasses/AEvent.h
+7
-4
RawEvent.cpp
dataClasses/RawEvent.cpp
+2
-2
RawEvent.h
dataClasses/RawEvent.h
+2
-2
No files found.
dataClasses/AEvent.cpp
View file @
d3787933
...
@@ -8,17 +8,23 @@
...
@@ -8,17 +8,23 @@
#include "AEvent.h"
#include "AEvent.h"
AEvent
::
AEvent
()
:
fNPoints
(
1024
)
{
//fNPoints is number of points in one event, 1024 or 1000
AEvent
::
AEvent
()
:
fNPoints
(
1024
)
{
//fNPoints is number of points in one event, 1024 or 1000
// TODO Auto-generated constructor stub
Init
();
Init
();
Reset
();
Reset
();
}
}
AEvent
::
AEvent
(
const
Int_t
npoints
)
:
fNPoints
(
npoints
)
{
Init
();
Reset
();
}
AEvent
::~
AEvent
()
{
AEvent
::~
AEvent
()
{
// TODO Auto-generated destructor stub
// TODO Auto-generated destructor stub
delete
gSignal
;
delete
gSignal
;
delete
gCFD
;
delete
gCFD
;
delete
fInputEvent
;
}
}
void
AEvent
::
SetRawDataFile
(
const
char
*
inprawfile
,
const
char
*
treename
)
{
void
AEvent
::
SetRawDataFile
(
const
char
*
inprawfile
,
const
char
*
treename
)
{
...
@@ -44,7 +50,7 @@ void AEvent::ProcessEvent() {
...
@@ -44,7 +50,7 @@ void AEvent::ProcessEvent() {
const
Double_t
*
amp
=
fInputEvent
->
GetAmp
();
const
Double_t
*
amp
=
fInputEvent
->
GetAmp
();
const
Double_t
*
time
=
fInputEvent
->
GetTime
();
const
Double_t
*
time
=
fInputEvent
->
GetTime
();
for
(
Int_t
j
=
0
;
j
<
NCELLS
;
j
++
)
{
for
(
Int_t
j
=
0
;
j
<
fNPoints
;
j
++
)
{
fAmpPos
[
j
]
=
amp
[
j
]
*
(
-
1.
);
fAmpPos
[
j
]
=
amp
[
j
]
*
(
-
1.
);
fTime
[
j
]
=
time
[
j
];
fTime
[
j
]
=
time
[
j
];
}
}
...
@@ -53,7 +59,7 @@ void AEvent::ProcessEvent() {
...
@@ -53,7 +59,7 @@ void AEvent::ProcessEvent() {
Double_t
maxAmpT
=
0.
;
Double_t
maxAmpT
=
0.
;
maxAmp
=
fAmpPos
[
0
];
maxAmp
=
fAmpPos
[
0
];
for
(
Int_t
j
=
0
;
j
<
NCELLS
;
j
++
)
{
for
(
Int_t
j
=
0
;
j
<
fNPoints
;
j
++
)
{
if
(
fAmpPos
[
j
]
>
maxAmp
)
{
if
(
fAmpPos
[
j
]
>
maxAmp
)
{
maxAmp
=
fAmpPos
[
j
];
maxAmp
=
fAmpPos
[
j
];
maxAmpT
=
fTime
[
j
];
maxAmpT
=
fTime
[
j
];
...
@@ -72,7 +78,7 @@ void AEvent::ProcessEvent() {
...
@@ -72,7 +78,7 @@ void AEvent::ProcessEvent() {
void
AEvent
::
Reset
()
{
void
AEvent
::
Reset
()
{
for
(
Int_t
i
=
0
;
i
<
NCELLS
;
i
++
)
{
for
(
Int_t
i
=
0
;
i
<
fNPoints
;
i
++
)
{
fAmpPos
[
i
]
=
0
;
fAmpPos
[
i
]
=
0
;
fTime
[
i
]
=
0
;
fTime
[
i
]
=
0
;
fAmpCFD
[
i
]
=
0
;
fAmpCFD
[
i
]
=
0
;
...
@@ -93,6 +99,10 @@ void AEvent::SetInputEvent(RawEvent** event) {
...
@@ -93,6 +99,10 @@ void AEvent::SetInputEvent(RawEvent** event) {
void
AEvent
::
Init
()
{
void
AEvent
::
Init
()
{
fAmpPos
.
Set
(
fNPoints
);
fTime
.
Set
(
fNPoints
);
fAmpCFD
.
Set
(
fNPoints
);
gSignal
=
new
TGraph
();
gSignal
=
new
TGraph
();
gCFD
=
new
TGraph
();
gCFD
=
new
TGraph
();
fInputEvent
=
0
;
fInputEvent
=
0
;
...
...
dataClasses/AEvent.h
View file @
d3787933
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include "RawEvent.h"
#include "RawEvent.h"
#define NCELLS 1024
//
#define NCELLS 1024
using
std
::
cout
;
using
std
::
cout
;
using
std
::
endl
;
using
std
::
endl
;
...
@@ -32,11 +32,13 @@ class AEvent {
...
@@ -32,11 +32,13 @@ class AEvent {
private
:
private
:
const
Int_t
fNPoints
;
//!
const
Int_t
fNPoints
;
//!
Double_t
fAmpPos
[
NCELLS
];
//array for raw amplitudes
TArrayD
fAmpPos
;
//array for raw amplitudes
Double_t
fTime
[
NCELLS
];
//array for raw times
TArrayD
fTime
;
//array for raw times
Double_t
fAmpMax
;
Double_t
fAmpMax
;
Double_t
fTimeAmpMax
;
Double_t
fTimeAmpMax
;
Double_t
fAmpCFD
[
NCELLS
];
//array for CFD amplitudes (attenuated, inversed and delayed)
TArrayD
fAmpCFD
;
//array for CFD amplitudes (attenuated, inversed and delayed)
Double_t
fCFD
;
//zero-crossing time
Double_t
fCFD
;
//zero-crossing time
TGraph
*
gSignal
;
TGraph
*
gSignal
;
...
@@ -46,6 +48,7 @@ private:
...
@@ -46,6 +48,7 @@ private:
public
:
public
:
AEvent
();
AEvent
();
AEvent
(
const
Int_t
npoints
);
virtual
~
AEvent
();
virtual
~
AEvent
();
ClassDef
(
AEvent
,
1
);
ClassDef
(
AEvent
,
1
);
...
...
dataClasses/RawEvent.cpp
View file @
d3787933
...
@@ -65,11 +65,11 @@ void RawEvent::SetTime(Double_t t, Int_t i) {
...
@@ -65,11 +65,11 @@ void RawEvent::SetTime(Double_t t, Int_t i) {
return
;
return
;
}
}
double
RawEvent
::
GetTime
(
Int_t
i
)
{
Double_t
RawEvent
::
GetTime
(
Int_t
i
)
{
return
fTime
[
i
];
return
fTime
[
i
];
}
}
double
RawEvent
::
GetAmp
(
Int_t
i
)
{
Double_t
RawEvent
::
GetAmp
(
Int_t
i
)
{
return
fAmp
[
i
];
return
fAmp
[
i
];
}
}
//void RawEvent::SetGraphs() {
//void RawEvent::SetGraphs() {
...
...
dataClasses/RawEvent.h
View file @
d3787933
...
@@ -62,9 +62,9 @@ public:
...
@@ -62,9 +62,9 @@ public:
void
PrintTime
(
Int_t
i
);
void
PrintTime
(
Int_t
i
);
double
GetTime
(
Int_t
i
);
Double_t
GetTime
(
Int_t
i
);
double
GetAmp
(
Int_t
i
);
Double_t
GetAmp
(
Int_t
i
);
// void InvertAmp(Double_t a, Int_t i);
// void InvertAmp(Double_t a, Int_t i);
//Inverts the amplitudes i.e. makes from negative singals
//Inverts the amplitudes i.e. makes from negative singals
...
...
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