Commit 2553b20f authored by Kostyleva D.A's avatar Kostyleva D.A

Merge branch 'master' of http://er.jinr.ru:90/vratislav.chudoba/NeuRad_tests

Conflicts:
	macros/testShowGraphs.cxx
parents af2bd41c 58f61cb1
...@@ -15,8 +15,8 @@ int main(int argc, char* argv[]) ...@@ -15,8 +15,8 @@ int main(int argc, char* argv[])
//to be extracted from the source as parameters //to be extracted from the source as parameters
const Int_t noBranches = 4; const Int_t noBranches = 4;
const Double_t cfRatio = 0.2; const Double_t cfRatio = 0.3;
const Double_t cfTD = 0.6; //in ns const Double_t cfTD = 1.5; //in ns
Double_t noiseMin = 5; Double_t noiseMin = 5;
Double_t noiseMax = 25; Double_t noiseMax = 25;
......
...@@ -55,7 +55,7 @@ void AEvent::ProcessEvent() { ...@@ -55,7 +55,7 @@ void AEvent::ProcessEvent() {
SetLED(); SetLED();
// SetGraphs(); // SetGraphs();
SetCFD(); SetCFD();
// SetChargeCFD(); SetChargeCFD();
SetChargeLED(); SetChargeLED();
return; return;
...@@ -69,7 +69,7 @@ void AEvent::Reset() { ...@@ -69,7 +69,7 @@ void AEvent::Reset() {
fTime[i] = 0; fTime[i] = 0;
fAmpCFD[i] = 0; fAmpCFD[i] = 0;
} }
fTimeLED = 0.; fTimeLED = -100.;
fEdgeSlope=0.; fEdgeSlope=0.;
fEdgeXi=0.; fEdgeXi=0.;
fEdgeSlope=-100.; fEdgeSlope=-100.;
...@@ -77,10 +77,10 @@ void AEvent::Reset() { ...@@ -77,10 +77,10 @@ void AEvent::Reset() {
fTime90=0.; fTime90=0.;
fAmpMax = 0.; fAmpMax = 0.;
fTimeAmpMax = 0.; fTimeAmpMax = 0.;
fTimeCFD = 0.; fTimeCFD = -100.;
fZeroLevel = 0.; fZeroLevel = 0.;
fChargeCFD = 0.; fChargeCFD = -10.;
fChargeLED = 0.; fChargeLED = -10.;
} }
void AEvent::SetInputEvent(RawEvent** event) { void AEvent::SetInputEvent(RawEvent** event) {
...@@ -228,11 +228,20 @@ void AEvent::SetChargeCFD(Int_t tmin, Int_t tmax) { // tmin = -3, tmax = 17 ...@@ -228,11 +228,20 @@ void AEvent::SetChargeCFD(Int_t tmin, Int_t tmax) { // tmin = -3, tmax = 17
const Double_t res = 50.; //resistance 50 Om const Double_t res = 50.; //resistance 50 Om
time_sig = (double)(-tmin + tmax)*(1e-9); time_sig = (double)(-tmin + tmax)*(1e-9);
for(Int_t i = 0; i < fNPoints; i++) { /*for(Int_t i = 0; i < fNPoints; i++) {
if( fTime[i] > (fTimeCFD + tmin) && fTime[i] < (fTimeCFD + tmax) ) { if( fTime[i] > (fTimeCFD + tmin) && fTime[i] < (fTimeCFD + tmax) ) {
integral = integral + fAmpPos[i]; integral = integral + fAmpPos[i];
} }
} }*/
Int_t imin = 0, imax = 0;
Int_t i = 0;
while ( fTime[i] < (fTimeCFD + tmin) && (i < (fGraphSignal->GetN()-1)) ) { imin = i; i++; }
while ( fTime[i] < (fTimeCFD + tmax) && (i < (fGraphSignal->GetN()-1)) ) { imax = i; i++; }
integral = fGraphSignal->Integral(imin, imax);
fChargeCFD = integral*time_sig/res; fChargeCFD = integral*time_sig/res;
return; return;
...@@ -256,7 +265,7 @@ void AEvent::SetChargeLED(Int_t tmin, Int_t tmax) { // tmin = -3, tmax = 17 ...@@ -256,7 +265,7 @@ void AEvent::SetChargeLED(Int_t tmin, Int_t tmax) { // tmin = -3, tmax = 17
Int_t i = 0; Int_t i = 0;
while ( fTime[i] < (fTimeLED + tmin) && (i < (fGraphSignal->GetN()-1)) ) { imin = i; i++; } while ( fTime[i] < (fTimeLED + tmin) && (i < (fGraphSignal->GetN()-1)) ) { imin = i; i++; }
i = 0; // i = 0;
while ( fTime[i] < (fTimeLED + tmax) && (i < (fGraphSignal->GetN()-1)) ) { imax = i; i++; } while ( fTime[i] < (fTimeLED + tmax) && (i < (fGraphSignal->GetN()-1)) ) { imax = i; i++; }
integral = fGraphSignal->Integral(imin, imax); integral = fGraphSignal->Integral(imin, imax);
......
...@@ -128,7 +128,7 @@ public: ...@@ -128,7 +128,7 @@ public:
//void SetLED(Double_t threshold = 0.001); //void SetLED(Double_t threshold = 0.001);
void SetLED(Double_t threshold = 0.002); void SetLED(Double_t threshold = 0.02);
//leading edge discriminator //leading edge discriminator
......
...@@ -2,13 +2,16 @@ ...@@ -2,13 +2,16 @@
void histCorr( void histCorr(
// const char *filename = "Neurad_7_08_NEW.root", // const char *filename = "Neurad_7_08_NEW.root",
const char *filename = "analysis_08_2.root", // const char *filename = "analysis_08_2.root",
const char *filename = "analysis_07_8.root",
const char *foldername = "7_8", const char *foldername = "7_8",
// const char *foldername = "8_2", // const char *foldername = "8_2",
// const char *ext = ".eps", // const char *ext = ".eps",
const char *ext = ".gif", const char *ext = ".gif",
const Bool_t can1 = 0, const Bool_t can2 = 0, const Bool_t can3 = 0, const Bool_t can4 = 0, const Bool_t can5 = 0, const Bool_t can6 = 1) const Bool_t can1 = 0, const Bool_t can2 = 0,
const Bool_t can3 = 0, const Bool_t can4 = 0,
const Bool_t can5 = 0, const Bool_t can6 = 1)
{ {
gSystem->Load("../libData.so"); gSystem->Load("../libData.so");
TFile *f = new TFile(Form("../data/dataDSR4/%s", filename)); TFile *f = new TFile(Form("../data/dataDSR4/%s", filename));
...@@ -209,9 +212,9 @@ void histCorr( ...@@ -209,9 +212,9 @@ void histCorr(
c6->cd(1); c6->cd(1);
//TH2F *h13 = new TH2F("h13", "leading edge vs charge",100, 130., 145., 100, -2e-9, 6e-9); //TH2F *h13 = new TH2F("h13", "leading edge vs charge",100, 130., 145., 100, -2e-9, 6e-9);
TH1F *h20 = new TH1F("h20", "hist led - cfd", 100, -5, 200.); TH1F *h20 = new TH1F("h20", "delta Tau CFD", 100, -20., 0.);
//t->Draw("Ach0.fTimeCFD - Ach0.fTimeLED >> h20","Ach0.fTimeCFD - Ach0.fTimeLED > 0.3 && Ach0.fTimeCFD - Ach0.fTimeLED <1.3",""); //t->Draw("Ach0.fTimeCFD - Ach0.fTimeLED >> h20","Ach0.fTimeCFD - Ach0.fTimeLED > 0.3 && Ach0.fTimeCFD - Ach0.fTimeLED <1.3","");
t->Draw("Ach0.fTimeLED >> h20","Ach0.fTimeLED > 120 && Ach0.fTimeLED < 150"); t->Draw("Ach1.fTimeCFD - Ach0.fTimeCFD >> h20","Ach0.fTimeCFD >0. && Ach1.fTimeCFD >0.");
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");; //t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x //x
/* h13->GetYaxis()->SetTitle("fChargeCFD"); /* h13->GetYaxis()->SetTitle("fChargeCFD");
...@@ -222,38 +225,63 @@ void histCorr( ...@@ -222,38 +225,63 @@ void histCorr(
c6->Update(); c6->Update();
c6->cd(3); c6->cd(3);
TH2F *h14 = new TH2F("h14", "fTIMECFD vs fTIMELED",100, 110., 140., 100, 110, 160); // TH2F *h14 = new TH2F("h14", "fTIMECFD vs fTIMELED",100, 110., 140., 100, 110, 160);
t->Draw("Ach0.fTimeCFD : Ach0.fTimeLED >> h14","","col"); // TH1F *h14 = new TH1F("h14", "delta Tau LED", 100, -20., 0.);
TH1F *h14 = new TH1F("h14", "delta Tau LED", 50, -8., 10.);
// TH1F *h140 = new TH1F("h140", "delta Tau LED", 100, -20., 0.);
TH1F *h140 = new TH1F("h140", "delta Tau LED", 50, -8., 10.);
// t->Draw("Ach0.fTimeLED - Ach0.fTimeLED >> h14","","");
// t->Draw("Ach2.fTimeLED - Ach0.fTimeLED >> h14","","");
t->Draw("Ach1.fTimeLED - Ach0.fTimeLED >> h14","","");
// t->SetLineColor(kRed);
// cout << t->Draw("Ach0.fTimeLED - Ach0.fTimeLED >> h140","Ach1.fChargeLED > 0.04e-9","same") << endl;
// cout << t->Draw("Ach2.fTimeLED - Ach0.fTimeLED >> h140","Ach2.fChargeLED > 0.04e-9","same") << endl;
cout << t->Draw("Ach1.fTimeLED - Ach0.fTimeLED >> h140","Ach1.fChargeLED > 0.04e-9","same") << endl;
h140->SetLineColor(kRed);
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");; //t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x //x
h14->GetYaxis()->SetTitle("fTimeCFD");
h14->GetYaxis()->SetTitle("N");
h14->GetYaxis()->CenterTitle(); h14->GetYaxis()->CenterTitle();
//y //y
h14->GetXaxis()->SetTitle("fTimeLED"); h14->GetXaxis()->SetTitle("delta tau");
h14->GetXaxis()->CenterTitle(); h14->GetXaxis()->CenterTitle();
// h14->Fit("gaus", "", "", -13, -6);
// h140->Fit("gaus", "", "", -13, -6);
h14->Fit("gaus", "", "", -2, 6);
h140->Fit("gaus", "", "", -2, 6);
gStyle->SetOptFit();
c6->Update(); c6->Update();
c6->cd(2); c6->cd(2);
TH2F *h15 = new TH2F("h15", "leading edge vs charge",100, 100., 180.,100, -0.02e-10, 1e-10); TH2F *h15 = new TH2F("h15", "leading edge vs charge",50, 120., 140.,200, -0.02e-10, 4e-10);
t->Draw("Ach1.fChargeCFD : Ach1.fTimeLED >> h15","Ach1.fChargeCFD>0","col"); t->Draw("Ach1.fChargeLED : Ach1.fTimeLED >> h15","Ach1.fChargeLED>0","col");
// t->Draw("Ach1.fChargeLED : Ach1.fTimeLED","Ach1.fChargeLED>0.02e-10 && Ach1.fChargeLED<4e-10 && Ach1.fTimeLED>120. && Ach1.fTimeLED<140.","");
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");; //t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x //x
h15->GetYaxis()->SetTitle("fChargeCFD"); h15->GetYaxis()->SetTitle("fChargeLED");
h15->GetYaxis()->CenterTitle(); h15->GetYaxis()->CenterTitle();
//y //y
h15->GetXaxis()->SetTitle("fTimeLED"); h15->GetXaxis()->SetTitle("fTimeLED");
h15->GetXaxis()->CenterTitle(); h15->GetXaxis()->CenterTitle();
c6->Update(); c6->Update();
c6->cd(4); c6->cd(4);
TH2F *h16 = new TH2F("h16", "FtimeCFD vs charge", 100, 100., 180.,100, 0, 1e-10); TH2F *h16 = new TH2F("h16", "delta timeLED vs charge", 200, -20., 0.,100, 0, 10e-10);
t->Draw("Ach1.fChargeCFD : Ach1.fTimeCFD >> h16","Ach1.fChargeCFD>3e-12","col"); // t->Draw("Ach1.fChargeLED : Ach1.fTimeLED - Ach0.fTimeLED >> h16","Ach1.fChargeLED>3e-12","col");
t->Draw("Ach1.fChargeLED : Ach1.fTimeLED - Ach0.fTimeLED >> h16","Ach1.fTimeLED - Ach0.fTimeLED > -20. && Ach1.fTimeLED - Ach0.fTimeLED < 0. && Ach1.fChargeLED<10e-10","col");
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");; //t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x //x
h16->GetYaxis()->SetTitle("fChargeCFD"); h16->GetYaxis()->SetTitle("fChargeLED");
h16->GetYaxis()->CenterTitle(); h16->GetYaxis()->CenterTitle();
//y //y
h16->GetXaxis()->SetTitle("fTimeCFD"); h16->GetXaxis()->SetTitle("delta tau LED");
h16->GetXaxis()->CenterTitle(); h16->GetXaxis()->CenterTitle();
c6->Update(); c6->Update();
//c4->Print(Form("../macros/picsDRS4/file%s/XiSquares%s", foldername, ext)); //c4->Print(Form("../macros/picsDRS4/file%s/XiSquares%s", foldername, ext));
......
...@@ -5,7 +5,8 @@ void testShowCFD() ...@@ -5,7 +5,8 @@ void testShowCFD()
const Long64_t kFirstEvent = 128; const Long64_t kFirstEvent = 128;
TFile fr("../data/dataDSR4/analysis_08_2_CFD02_06.root"); // TFile fr("../data/dataDSR4/analysis_08_2_CFD02_06.root");
TFile fr("../data/dataDSR4/analysis_08_2.root");
TTree *tr = (TTree*)fr.Get("atree"); TTree *tr = (TTree*)fr.Get("atree");
AEvent *revent = new AEvent(); AEvent *revent = new AEvent();
......
...@@ -6,15 +6,19 @@ void testShowGraphs() ...@@ -6,15 +6,19 @@ void testShowGraphs()
const Long64_t kFirstEvent = 128; const Long64_t kFirstEvent = 128;
TFile fr("../data/dataDSR4/Neurad_7_08_NEW.root"); // TFile fr("../data/dataDSR4/Neurad_7_08_NEW.root");
// TFile fr("../data/dataDSR4/analysis_07_8.root"); // TFile fr("../data/dataDSR4/analysis_07_8.root");
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD
// TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root"); // TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root");
// TFile fr("../data/dataTektronix/exp18.root"); // TFile fr("../data/dataTektronix/exp18.root");
======= =======
=======
TFile fr("../data/dataDSR4/analysis_08_2.root");
>>>>>>> 58f61cb195c6b08755455386b15990ce4c27b599
// TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root"); // TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root");
// TFile fr("../data/dataTektronix/exp18.root"); // TFile fr("../data/dataTektronix/exp18.root");
>>>>>>> 09d9ad17f40ac0af9d228137f715f25ee9ea15ae >>>>>>> 09d9ad17f40ac0af9d228137f715f25ee9ea15ae
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment