diff --git a/convertRawToAnalyzed/analyse.cpp b/convertRawToAnalyzed/analyse.cpp index 174cef2b38aadeb994f8b4316e7d97306f988309..9fa88d3c8de81db02968ecad65c5db95d3d14042 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 70b5f98f543d6b5647166f3ac5006ee12da2402c..06fa8059efd2633416b6903630cdfb2bebce5b69 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 "<