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
9eebe8b9
Commit
9eebe8b9
authored
Jan 13, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finding of zero levels modified.
parent
13088ecc
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
11 deletions
+31
-11
analyse.cpp
convertRawToAnalyzed/analyse.cpp
+15
-5
analysisExp7.root
data/dataTektronix/analysisExp7.root
+0
-0
AEvent.cpp
dataClasses/AEvent.cpp
+5
-2
AEvent.h
dataClasses/AEvent.h
+7
-1
integralFormSignal.cpp
macros/integralFormSignal.cpp
+2
-2
testShowGraphs.cxx
macros/testShowGraphs.cxx
+2
-1
No files found.
convertRawToAnalyzed/analyse.cpp
View file @
9eebe8b9
...
...
@@ -12,6 +12,17 @@
int
main
(
int
argc
,
char
*
argv
[])
{
//to be extracted from the source as parameters
const
Int_t
noBranches
=
4
;
const
Double_t
cfRatio
=
0.5
;
const
Int_t
cfTD
=
5
;
Double_t
noiseMin
=
5
;
Double_t
noiseMax
=
25
;
if
(
(
argc
<
3
)
||
(
argc
>
4
)
)
{
// Tell the user how to run the program
std
::
cerr
<<
"Usage: "
<<
argv
[
0
]
<<
" [list with input files] [outputfile] [number of points in one event (1000)]"
<<
std
::
endl
;
...
...
@@ -28,6 +39,8 @@ int main(int argc, char* argv[])
if
(
argc
==
3
)
{
kEventSize
=
1024
;
noiseMin
=
10.
;
noiseMax
=
100.
;
Info
(
"convertRawToAnalyzed"
,
"Event size was set to %d"
,
kEventSize
);
}
if
(
argc
==
4
)
{
...
...
@@ -41,10 +54,6 @@ int main(int argc, char* argv[])
TFile
*
f
=
new
TFile
(
infiles
.
Data
());
TTree
*
tr
=
(
TTree
*
)
f
->
Get
(
"rtree"
);
const
Int_t
noBranches
=
4
;
const
Double_t
cfRatio
=
0.5
;
const
Int_t
cfTD
=
5
;
TString
bName
;
RawEvent
*
revent
[
noBranches
];
for
(
Int_t
j
=
0
;
j
<
noBranches
;
j
++
)
{
...
...
@@ -65,6 +74,7 @@ int main(int argc, char* argv[])
wevent
[
j
]
->
SetInputEvent
(
&
revent
[
j
]);
//takes raw event from RawEvent
wevent
[
j
]
->
SetCFratio
(
cfRatio
);
wevent
[
j
]
->
SetCFtimeDelay
(
cfTD
);
wevent
[
j
]
->
SetNoiseRange
(
noiseMin
,
noiseMax
);
tw
->
Bronch
(
bName
.
Data
(),
"AEvent"
,
&
wevent
[
j
]);
// create branches in atree to hold analyzed data
}
//----event loop in tr input tree
...
...
@@ -85,7 +95,7 @@ int main(int argc, char* argv[])
}
//----end of event loop
printf
(
"%d events are processed
\n
"
,
nentries
);
printf
(
"%
ll
d events are processed
\n
"
,
nentries
);
tw
->
Write
();
fw
->
Close
();
...
...
data/dataTektronix/analysisExp7.root
0 → 100644
View file @
9eebe8b9
File added
dataClasses/AEvent.cpp
View file @
9eebe8b9
...
...
@@ -119,6 +119,9 @@ void AEvent::Init() {
fCFratio
=
0.
;
fCFtimeDelay
=
0.
;
fNoiseRangeMin
=
0.
;
fNoiseRangeMax
=
1.
;
}
void
AEvent
::
SetGraphs
()
{
...
...
@@ -174,12 +177,12 @@ void AEvent::SetCFD() {
}
}
Double_t
AEvent
::
FindZeroLevel
(
Int_t
pmin
,
Int_t
pmax
)
{
Double_t
AEvent
::
FindZeroLevel
()
{
SetGraphs
();
Double_t
correction
=
0
;
TF1
*
fit1
=
new
TF1
(
"fit1"
,
"[0]"
);
//function for one parameter fitting in the range of pmin-pmax
fit1
->
SetRange
(
pmin
,
pm
ax
);
fit1
->
SetRange
(
fNoiseRangeMin
,
fNoiseRangeM
ax
);
if
(
!
fGraphSignal
)
{
Warning
(
"AEvent::FindZeroLevel"
,
"Graph was not set"
);
...
...
dataClasses/AEvent.h
View file @
9eebe8b9
...
...
@@ -52,6 +52,9 @@ private:
Double_t
fCFratio
;
//!
Double_t
fCFtimeDelay
;
//!
Double_t
fNoiseRangeMin
;
//!
Double_t
fNoiseRangeMax
;
//!
public
:
AEvent
();
AEvent
(
const
Int_t
npoints
);
...
...
@@ -70,6 +73,9 @@ public:
void
SetCFtimeDelay
(
Double_t
timeDelay
)
{
fCFtimeDelay
=
timeDelay
;
};
//CFD set time delay (in points)
void
SetNoiseRange
(
Double_t
min
,
Double_t
max
)
{
fNoiseRangeMin
=
min
;
fNoiseRangeMax
=
max
;
};
//Set noise range to be used in FindZeroLevel()
void
Reset
();
//Resets arrays to zeros
...
...
@@ -85,7 +91,7 @@ public:
}
//draws signal shape graphs
Double_t
FindZeroLevel
(
Int_t
pmin
=
10
,
Int_t
pmax
=
100
);
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
...
...
macros/integralFormSignal.cpp
View file @
9eebe8b9
//
void integralFormSignal()
void
integralFormSignal
()
{
gSystem
->
Load
(
"../libData.so"
);
TFile
*
f
=
new
TFile
(
"../data/dataTektronix/
e
xp7.root"
);
TFile
*
f
=
new
TFile
(
"../data/dataTektronix/
analysisE
xp7.root"
);
TTree
*
tr
=
(
TTree
*
)
f
->
Get
(
"atree"
);
const
Int_t
noBranches
=
4
;
...
...
macros/testShowGraphs.cxx
View file @
9eebe8b9
...
...
@@ -6,7 +6,8 @@ void testShowGraphs()
const
Long64_t
kFirstEvent
=
128
;
// TFile fr("../data/dataDSR4/analysis_07_1.root");
TFile
fr
(
"../data/dataDSR4/analysis_07_8.root"
);
// TFile fr("../data/dataDSR4/analysis_07_8.root");
TFile
fr
(
"../data/dataTektronix/analysisExp7.root"
);
TTree
*
tr
=
(
TTree
*
)
fr
.
Get
(
"atree"
);
AEvent
*
revent
=
new
AEvent
();
...
...
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