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
8f6e3e68
Commit
8f6e3e68
authored
Dec 28, 2016
by
Kostyleva D.A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New class to DRS4 analysis is added
parent
ff68d4c9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
170 additions
and
4 deletions
+170
-4
read_binary.cpp
convertDRS4/read_binary.cpp
+1
-0
NeuRad_test_07_1.root
data/rawDataDSR4/NeuRad_test_07_1.root
+0
-0
AnalyzeData.cpp
dataClasses/AnalyzeData.cpp
+71
-0
AnalyzeData.h
dataClasses/AnalyzeData.h
+72
-0
Data.mk
dataClasses/Data.mk
+6
-1
RawData.cpp
dataClasses/RawData.cpp
+9
-0
RawData.h
dataClasses/RawData.h
+9
-2
linkdef.h
dataClasses/linkdef.h
+2
-1
No files found.
convertDRS4/read_binary.cpp
View file @
8f6e3e68
...
...
@@ -254,6 +254,7 @@ int main(int argc, const char * argv[])
if
(
chn_index
==
0
)
{
amp_ch1
[
i
]
=
waveform
[
b
][
chn_index
][
i
];
event
->
SetAmp
(
waveform
[
b
][
chn_index
][
i
],
i
);
event
->
InvertAmp
(
waveform
[
b
][
chn_index
][
i
],
i
);
/*printf("old ampl %f ",amp_ch1[i]);
event->PrintAmp(i);
printf("\n");*/
...
...
data/rawDataDSR4/NeuRad_test_07_1.root
View file @
8f6e3e68
No preview for this file type
dataClasses/AnalyzeData.cpp
0 → 100644
View file @
8f6e3e68
/*
* AnalyzeData.cpp
*
* Created on: Dec 28, 2016
* Author: daria
*/
#include "AnalyzeData.h"
AnalyzeData
::
AnalyzeData
()
{
// TODO Auto-generated constructor stub
TGraph
gr
;
}
AnalyzeData
::~
AnalyzeData
()
{
// TODO Auto-generated destructor stub
}
Bool_t
AnalyzeData
::
SetRawDataFile
(
const
char
*
inprawfile
,
const
char
*
treename
)
{
TString
iFileName
=
inprawfile
;
TFile
*
fraw
=
new
TFile
(
iFileName
.
Data
());
if
(
!
fraw
->
IsOpen
()
)
{
Error
(
"SetRawDataFile"
,
"File %s was not opened and won't be processed"
,
iFileName
.
Data
());
return
0
;
}
TTree
*
traw
=
(
TTree
*
)
fraw
->
Get
(
treename
);
if
(
!
traw
)
{
Error
(
"SetRawDataFile"
,
"Tree %s was not found in file %s"
,
treename
,
iFileName
.
Data
());
return
0
;
}
//traw->Draw
}
/*
void RawData::Reset() {
for (Int_t i = 0; i < NCELLS; i++) {
Amp[i] = 0;
Time[i] = 0;
}
}
void RawData::PrintTime(Int_t i) {
cout << Time[i] << endl;
}
void RawData::PrintAmp(Int_t i) {
cout << Amp[i] << endl;
}
void RawData::SetAmp(Double_t a, Int_t i) {
if (i >=NCELLS) {
cout << "Error: array with raw amplitudes is overloaded!" << endl;
return;
}
Amp[i] = a;
return;
}
void RawData::SetTime(Double_t t, Int_t i) {
if (i >=NCELLS) {
cout << "Error: array with raw times is overloaded!" << endl;
return;
}
Time[i] = t;
return;
}*/
dataClasses/AnalyzeData.h
0 → 100644
View file @
8f6e3e68
/*
* AnalyzeData.h
*
* Created on: Dec 28, 2016
* Author: daria
*/
#ifndef DATACLASSES_ANALYZEDATA_H_
#define DATACLASSES_ANALYZEDATA_H_
#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include "TGraph.h"
#include <TObject.h>
#include <TFile.h>
#include <TTree.h>
#include <TH1I.h>
#include <TPolyMarker.h>
#include <TF1.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TCanvas.h>
#include <TMath.h>
#include <TGraph.h>
#include <TObjArray.h>
#include <THStack.h>
#include <TString.h>
#include <TSpectrum.h>
#define NCELLS 1024
using
std
::
cout
;
using
std
::
endl
;
class
AnalyzeData
{
private
:
/* Double_t Amp[NCELLS]; //array for raw amplitudes
Double_t Time[NCELLS]; //array for raw times*/
public
:
AnalyzeData
();
virtual
~
AnalyzeData
();
ClassDef
(
AnalyzeData
,
1
);
Bool_t
SetRawDataFile
(
const
char
*
inprawfile
,
const
char
*
treename
);
// void Integral()
/* void Reset();
//Resets arrays to zeros
const Double_t* GetAmp() const {
return Amp;
}
const Double_t* GetTime() const {
return Time;
}
void SetAmp(Double_t a, Int_t i);
//Takes amplitude (raw data, voltage from binary file)
//and places it in the array Amp[NCELLS]
void SetTime(Double_t t, Int_t i);
//Takes time (raw data, times from binary file)
//and places it in the array Time[NCELLS]
void PrintAmp(Int_t i);
void PrintTime(Int_t i);*/
};
#endif
/* DATACLASSES_ANALYZEDATA_H_ */
dataClasses/Data.mk
View file @
8f6e3e68
...
...
@@ -7,16 +7,21 @@ DATALIBS := -lHist #-lCore #-lCint -lRIO -lTree -lNet -lThread -lMatrix -lMathCo
# Add inputs and outputs from these tool invocations to the build variables
DATA_HEADERS += \
$(DATA)/RawData.h \
$(DATA)/AnalyzeData.h \
$(DATA)/linkdef.h
DATACPP_SRCS += \
$(DATA)/RawData.cpp \
$(DATA)/AnalyzeData.cpp \
$(DATA)/DataCint.cpp
DATAOBJS += \
$(DATA)/RawData.o \
$(DATA)/AnalyzeData.o \
$(DATA)/DataCint.o
DATACPP_DEPS += \
$(DATA)/RawData.d \
$(DATA)/DataCint.d
\ No newline at end of file
$(DATA)/AnalyzeData.d \
$(DATA)/DataCint.d
dataClasses/RawData.cpp
View file @
8f6e3e68
...
...
@@ -53,3 +53,12 @@ void RawData::SetTime(Double_t t, Int_t i) {
return
;
}
void
RawData
::
InvertAmp
(
Double_t
a
,
Int_t
i
)
{
if
(
i
>=
NCELLS
)
{
cout
<<
"Error: array with raw amplitudes for turn over is overloaded!"
<<
endl
;
return
;
}
Amplitude
[
i
]
=
a
*
(
-
1.
);
return
;
}
dataClasses/RawData.h
View file @
8f6e3e68
...
...
@@ -19,7 +19,7 @@ class RawData {
private
:
Double_t
Amp
[
NCELLS
];
//array for raw amplitudes
Double_t
Time
[
NCELLS
];
//array for raw times
Double_t
Amplitude
[
NCELLS
];
//array for inverted amplitudes
public
:
RawData
();
virtual
~
RawData
();
...
...
@@ -31,7 +31,7 @@ public:
const
Double_t
*
GetAmp
()
const
{
return
Amp
;
}
const
Double_t
*
GetTime
()
const
{
return
Time
;
}
...
...
@@ -45,7 +45,14 @@ public:
//and places it in the array Time[NCELLS]
void
PrintAmp
(
Int_t
i
);
//Prints i amplitudes (to make sense i shold be NCELLS)
void
PrintTime
(
Int_t
i
);
void
InvertAmp
(
Double_t
a
,
Int_t
i
);
//Inverts the amplitudes i.e. makes from negative singals
//posititve signals and vise versa.
};
#endif
/* DATACLASSES_RAWDATA_H_ */
dataClasses/linkdef.h
View file @
8f6e3e68
...
...
@@ -3,7 +3,8 @@
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class RawData;
#pragma link C++ class RawData;
#pragma link C++ class AnalyzeData;
//#pragma link C++ class ConfigDictionary;
...
...
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