From b3ddd8eb4eb6bcd28122b11663596efbd00ff396 Mon Sep 17 00:00:00 2001 From: "Kostyleva D.A" Date: Thu, 12 Jan 2017 15:14:25 +0300 Subject: [PATCH] Readme with logbook information is added, some warnings are eliminated --- convertDRS4/README.txt | 2 +- convertDRS4/read_binary.cpp | 8 +++----- data/rawDataDSR4/README.md | 20 +++++++++++++++++++- dataClasses/AEvent.cpp | 15 ++++----------- dataClasses/AEvent.h | 3 +-- macros/analyse.C | 4 ++-- makefile | 7 +++---- 7 files changed, 33 insertions(+), 26 deletions(-) diff --git a/convertDRS4/README.txt b/convertDRS4/README.txt index 1467860..5c95af0 100644 --- a/convertDRS4/README.txt +++ b/convertDRS4/README.txt @@ -2,7 +2,7 @@ Application for convertation of binary files acquired by DRS4 to ROOT file. 1. read_binary.cpp complies within makefile (commaned make clean, then make in Neurad_test) and makes object file read_binary in current directory 2. To convert binary file to root file do: -./read_binary_DRS4 ./data/rawDataDSR4/input_file_name.dat ../data/rawDataDSR4/output_file_name.root +./read_binary_DRS4 ../data/rawDataDSR4/input_file_name.dat ../data/rawDataDSR4/output_file_name.root !both input and output files should be specified! diff --git a/convertDRS4/read_binary.cpp b/convertDRS4/read_binary.cpp index 8cf0650..35ec034 100644 --- a/convertDRS4/read_binary.cpp +++ b/convertDRS4/read_binary.cpp @@ -333,11 +333,9 @@ int main(int argc, const char * argv[]) rfile->Write(); rfile->Close(); -// delete event; - printf("error1\n"); - delete[] event; - printf("error2\n"); - + for (Int_t i = 0; i < 4; i ++) { + delete event[i]; + } return 1; } diff --git a/data/rawDataDSR4/README.md b/data/rawDataDSR4/README.md index bbc5d21..2a84200 100644 --- a/data/rawDataDSR4/README.md +++ b/data/rawDataDSR4/README.md @@ -1 +1,19 @@ -Raw data. Both in binary and root format. +Raw data. Both in binary and root format. + +Logbook + +File name | Num of events | Comment +------------------------|---------------|---------------------------------------------------------------------| +NeuRad_test_071216_1.dat| 500 | +NeuRad_test_071216_2.dat| 500 | collimated gamma source; ch0 and ch1 have coincidence; ?trigger ch0?| +NeuRad_test_071216_3.dat| | neutron source Cf | +NeuRad_test_071216_4.dat| 2000 | source 60Co; trigger ch1; ch1-front, ch2,ch3,ch4 - back | +NeuRad_test_071216_5.dat| 2000 | source 60Co; trigger ch1; ch1-front, ch2,ch3,ch4 - back | +NeuRad_test_071216_6.dat| 2000 | source 60Co; trigger ch1; ch1-front, ch2,ch3,ch4 - back | +NeuRad_test_071216_7.dat| 2000 | source 60Co; trigger ch1; ch1-front, ch2,ch3,ch4 - back | + *** +Change of PMT amplification: increasing voltage up to 1100 mV, threshold 25 mV + *** +NeuRad_test_071216_8.dat| 10000 | source 60Co; trigger ch1; ch1-front, ch2,ch3,ch4 - back | +NeuRad_test_081216_1.dat| | trigger ch3 | +NeuRad_test_081216_2.dat| | collimated gamma source; two channels only: ch1 and ch2 | diff --git a/dataClasses/AEvent.cpp b/dataClasses/AEvent.cpp index 84a0b51..565fb94 100644 --- a/dataClasses/AEvent.cpp +++ b/dataClasses/AEvent.cpp @@ -55,11 +55,8 @@ void AEvent::ProcessEvent() { fTime[j] = time[j]; } -// SetGraphs(); const Double_t zeroLevel = FindZeroLevel(); -// const Double_t zeroLevel = 0; for(Int_t j = 0; j < fNPoints; j++) { - //fAmpPos[j] = amp[j]*(-1.) - zeroLevel; fAmpPos[j] = fAmpPos[j] - zeroLevel; } @@ -176,26 +173,22 @@ void AEvent::SetCFD() { Double_t AEvent::FindZeroLevel(Int_t pmin, Int_t pmax) { -// fGraphZero->Set(fNPoints); -// const Double_t *amp = fInputEvent->GetAmp(); -// const Double_t *time = fInputEvent->GetTime(); SetGraphs(); Double_t correction = 0; - TF1 *fit1 = new TF1("fit1","[0]"); + TF1 *fit1 = new TF1("fit1","[0]"); //function for one parameter fitting in the range of pmin-pmax fit1->SetRange(pmin,pmax); -// Warning("AEvent::FindZeroLevel", "Graph was not set"); if (!fGraphSignal) { Warning("AEvent::FindZeroLevel", "Graph was not set"); return 0; } -// fGraphSignal->Print(); + fGraphSignal->Fit(fit1,"RQN","goff"); -// fGraphSignal->Fit(fit1,"QR","goff"); correction = fit1->GetParameter(0); -// printf("zero level %f\n", correction); + delete fit1; return correction; +} Double_t AEvent::GetfCFD() { return fCFD; diff --git a/dataClasses/AEvent.h b/dataClasses/AEvent.h index b3fb76c..b3aff58 100644 --- a/dataClasses/AEvent.h +++ b/dataClasses/AEvent.h @@ -85,8 +85,7 @@ public: //draws signal shape graphs Double_t FindZeroLevel(Int_t pmin = 10, Int_t pmax = 100); - //for zero level correction - //one parameter fit between pmin and pmax + //for zero level correction. one parameter fit between pmin and pmax //returns fit parameter i.e. number on which amplitude should be corrected private: diff --git a/macros/analyse.C b/macros/analyse.C index abde307..cfab8c1 100644 --- a/macros/analyse.C +++ b/macros/analyse.C @@ -2,7 +2,7 @@ void analyse() { gSystem->Load("../libData.so"); - TFile *f = new TFile("../data/rawDataDSR4/NeuRad_test_07_1.root"); + TFile *f = new TFile("../data/rawDataDSR4/NeuRad_test_07_3.root"); TTree *tr = (TTree*)f->Get("rtree"); const Int_t noBranches = 4; @@ -19,7 +19,7 @@ void analyse() // tr->SetMakeClass(1); - TFile *fw = new TFile("../data/dataDSR4/analysis_07_1.root", "RECREATE"); //create .root file with somehow analyzed data + TFile *fw = new TFile("../data/dataDSR4/analysis_07_3.root", "RECREATE"); //create .root file with somehow analyzed data TTree *tw = new TTree("atree", "title of drs4 analysis tree"); //create analysis tree atree in it AEvent *wevent[noBranches]; // pointer to the array (of AEvent class) in which analyzed data for each channel will be put diff --git a/makefile b/makefile index bf7ba1a..8c45406 100755 --- a/makefile +++ b/makefile @@ -29,10 +29,9 @@ CONVERTRAWTOANALYZED = $(PWD)/convertRawToAnalyzed -include $(DATA)/Data.mk -all: libData.so \ - read_binary_DRS4 \ - convertTektronix \ - convertRawToAnalyzed +all: libData.so \ + read_binary_DRS4 \ + convertTektronix #ROOT html documentation, it will be done as a program which will be alsa compiled by this makefile, program will be as a last condition after all of the libraries -- 2.18.1