diff --git a/convertDRS4/README.txt b/convertDRS4/README.txt index 1467860ef1dda7293c007f1fc61c94b6367f29fa..5c95af0f126423fe97a4004f2909e17e4e4e0a89 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 8cf0650f4e3c99b94321f8efbcaf4a9d74780ea7..35ec034916009e83d57a074173d9a157a097cb39 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 bbc5d217e78a6e5df259516f709f498c1dcd633a..2a842001b94d7040779b73431e57803f63f295a8 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 84a0b51eec5bc39846daa18ff8995c429b5903fc..565fb94a6363b0043f63e5b192d6b23db1cf227f 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 b3fb76ceb91e65c85b4ddf5e88cb7dbab7ddd4c3..b3aff58e7e5e4059b7c318d76c529e0b57f1f2b4 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 abde307df82eb13bcb421afc8bc0dfbd24016da6..cfab8c1a421cf0644293577c6d91564107619724 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 bf7ba1a95ac9b57e879e45690b9f528be16c3161..8c4540676e96a101817dfc431fd4703684af5816 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