From 182bd8697c3808c773d8aa438696c181693c7bfe Mon Sep 17 00:00:00 2001 From: "Kostyleva D.A" Date: Wed, 1 Feb 2017 15:57:45 +0300 Subject: [PATCH] In AEvent class the point where front fit crosses zero level (fTimeFront) is added --- convertRawToAnalyzed/analyse.cpp | 2 +- dataClasses/AEvent.cpp | 21 +++++++++++++++++++++ dataClasses/AEvent.h | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/convertRawToAnalyzed/analyse.cpp b/convertRawToAnalyzed/analyse.cpp index 174cef2..9fa88d3 100644 --- a/convertRawToAnalyzed/analyse.cpp +++ b/convertRawToAnalyzed/analyse.cpp @@ -86,7 +86,7 @@ int main(int argc, char* argv[]) for(Long64_t i = 0; i < nentries; i++) { tr->GetEntry(i); - //cout<<" i "<Reset(); wevent[j]->ProcessEvent(); //here all the analysis is going on so far diff --git a/dataClasses/AEvent.cpp b/dataClasses/AEvent.cpp index 70b5f98..06fa805 100644 --- a/dataClasses/AEvent.cpp +++ b/dataClasses/AEvent.cpp @@ -81,6 +81,7 @@ void AEvent::Reset() { fZeroLevel = 0.; fChargeCFD = -10.; fChargeLED = -10.; + fTimeFront = -100.; } void AEvent::SetInputEvent(RawEvent** event) { @@ -173,6 +174,7 @@ void AEvent::FindFrontProperties() { const Double_t timeStep = 0.05; //in ns Double_t time = 0; //in ns + Double_t mytime = 0.; if (!fGraphSignal) { Warning("AEvent::FindFrontProperties", "Graph was not set"); @@ -196,9 +198,28 @@ void AEvent::FindFrontProperties() { fit1->SetRange(fTime10,fTime90); fGraphSignal->Fit(fit1,"RQN","goff"); + fEdgeSlope = fit1->GetParameter(1); fEdgeXi = fit1->GetChisquare(); + //adding point where fit function crosses zero + Double_t a = 0, b = 0; + TF1 *line = new TF1("line","[1]*x + [0]"); + a = fit1->GetParameter(1); + b = fit1->GetParameter(0); + line->SetParameter(0,b); + line->SetParameter(1,a); + //cout<<"par 0 "<Eval(mytime) <= 0 && mytime <= 200.) { + //cout<< "mytime "<