Commit 1f2e4d36 authored by Kostyleva D.A's avatar Kostyleva D.A

AEvent::FindFrontProperties is being tested

parent 87dabea9
...@@ -198,10 +198,14 @@ void AEvent::FindFrontProperties() { ...@@ -198,10 +198,14 @@ void AEvent::FindFrontProperties() {
fTime90 = time; fTime90 = time;
time = time - timeStep; time = time - timeStep;
} }
// cout << "Found time90 " << fTime90 << endl;
// cout<< "Time90 - time10 "<< fTime90 - fTime10 << endl;
// if(fTime90 - fTime10 == 0.25 ) { cout<< "Zero !!"<<endl; }
TF1 *fit1 = new TF1("fit1","[1]*x+[0]"); //function for one parameter fitting in the range of pmin-pmax TF1 *fit1 = new TF1("fit1","[1]*x+[0]"); //function for one parameter fitting in the range of pmin-pmax
fit1->SetRange(fTime10,fTime90); fit1->SetRange(fTime10,fTime90);
fGraphSignal->Fit(fit1,"RQN","goff"); fGraphSignal->Fit(fit1,"RQ","goff");
fEdgeSlope = fit1->GetParameter(1); fEdgeSlope = fit1->GetParameter(1);
delete fit1; delete fit1;
......
// now raw .root to analyzed .root conversion
// is taking place in
// ./convertRawToAnalyzed/analyse.cpp
// it is compiled within makefile
void analyse() void analyse()
{ {
gSystem->Load("../libData.so"); gSystem->Load("../libData.so");
......
...@@ -3,11 +3,11 @@ void testShowGraphs() ...@@ -3,11 +3,11 @@ void testShowGraphs()
gSystem->Load("../libData.so"); gSystem->Load("../libData.so");
const Long64_t kFirstEvent = 128; const Long64_t kFirstEvent = 50;
// TFile fr("../data/dataDSR4/analysis_07_1.root"); // TFile fr("../data/dataDSR4/analysis_07_1.root");
// TFile fr("../data/dataDSR4/analysis_07_8.root"); TFile fr("../data/dataDSR4/analysis_07_8.root");
TFile fr("../data/dataTektronix/analysisExp7.root"); // TFile fr("../data/dataTektronix/analysisExp7.root");
TTree *tr = (TTree*)fr.Get("atree"); TTree *tr = (TTree*)fr.Get("atree");
AEvent *revent = new AEvent(); AEvent *revent = new AEvent();
...@@ -15,22 +15,22 @@ void testShowGraphs() ...@@ -15,22 +15,22 @@ void testShowGraphs()
TGraph *gr[10]; TGraph *gr[10];
cout << "warning" << endl; // cout << "warning" << endl;
cout << tr->GetEntries() << endl; cout << tr->GetEntries() << endl;
//loop over events //loop over events
for (Long64_t i = 0; i < 10; i++) { for (Long64_t i = 0; i < 10; i++) {
gr[i] = 0; gr[i] = 0;
cout << "warning 1" << endl; // cout << "warning 1" << endl;
cout << i+kFirstEvent << endl; cout << i+kFirstEvent << endl;
// tr->GetEntry(i+kFirstEvent); tr->GetEntry(i+kFirstEvent);
tr->GetEntry(i); // tr->GetEntry(i);
cout << "warning 2" << endl; // cout << "warning 2" << endl;
gr[i] = new TGraph(*revent->GetGraphSignal()); gr[i] = new TGraph(*revent->GetGraphSignal());
}//for over events }//for over events
cout << "warning 3" << endl; // cout << "warning 3" << endl;
TCanvas *c1 = new TCanvas("c1","test",10,10,1000,600); TCanvas *c1 = new TCanvas("c1","test",10,10,1000,600);
c1->Divide(3,2); c1->Divide(3,2);
......
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