Get it running under root 6
This commit is contained in:
parent
4eb3100f52
commit
8284174829
@ -10,6 +10,10 @@
|
|||||||
#include <TSystem.h>
|
#include <TSystem.h>
|
||||||
#include <TTree.h>
|
#include <TTree.h>
|
||||||
|
|
||||||
|
void NewSpec::Loop()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void NewSpec::CreateIO( Bool_t FigFlag, Double_t eCut )
|
void NewSpec::CreateIO( Bool_t FigFlag, Double_t eCut )
|
||||||
{
|
{
|
||||||
// Double_t eCut = 0.7; //minimum energy deposition in scintillators [MeV]
|
// Double_t eCut = 0.7; //minimum energy deposition in scintillators [MeV]
|
||||||
@ -157,6 +161,9 @@ void NewSpec::CreateIO( Bool_t FigFlag, Double_t eCut )
|
|||||||
} else {
|
} else {
|
||||||
hAsyFB -> Fit("pol0","NQ","",0.6, 13.);
|
hAsyFB -> Fit("pol0","NQ","",0.6, 13.);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TF1 *pol0;
|
||||||
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t chi2=pol0->GetChisquare();
|
Double_t chi2=pol0->GetChisquare();
|
||||||
Double_t p1=pol0->GetParameter(0);
|
Double_t p1=pol0->GetParameter(0);
|
||||||
Double_t e1=pol0->GetParError(0);
|
Double_t e1=pol0->GetParError(0);
|
||||||
@ -291,6 +298,9 @@ void NewSpec::CoinIO( Bool_t FigFlag, Double_t eCut )
|
|||||||
} else {
|
} else {
|
||||||
hAsyFB -> Fit("pol0","NQ","",0.6, 13.);
|
hAsyFB -> Fit("pol0","NQ","",0.6, 13.);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TF1 *pol0;
|
||||||
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t chi2=pol0->GetChisquare();
|
Double_t chi2=pol0->GetChisquare();
|
||||||
Double_t p1=pol0->GetParameter(0);
|
Double_t p1=pol0->GetParameter(0);
|
||||||
Double_t e1=pol0->GetParError(0);
|
Double_t e1=pol0->GetParError(0);
|
||||||
@ -434,6 +444,9 @@ void NewSpec::CoinIOUD( Bool_t FigFlag, Double_t eCut )
|
|||||||
} else {
|
} else {
|
||||||
hAsyFB -> Fit("pol0","NQ","",0.6, 13.);
|
hAsyFB -> Fit("pol0","NQ","",0.6, 13.);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TF1 *pol0;
|
||||||
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t chi2=pol0->GetChisquare();
|
Double_t chi2=pol0->GetChisquare();
|
||||||
Double_t p1=pol0->GetParameter(0);
|
Double_t p1=pol0->GetParameter(0);
|
||||||
Double_t e1=pol0->GetParError(0);
|
Double_t e1=pol0->GetParError(0);
|
||||||
@ -620,6 +633,9 @@ void NewSpec::TBLRCoinIO( Bool_t FigFlag, Double_t eCut )
|
|||||||
hSumLR->Add(hLtemp,hRtemp,1., 1.);
|
hSumLR->Add(hLtemp,hRtemp,1., 1.);
|
||||||
hAsyLR->Divide(hDifLR,hSumLR,1.,1.);
|
hAsyLR->Divide(hDifLR,hSumLR,1.,1.);
|
||||||
|
|
||||||
|
TF1 *pol0;
|
||||||
|
Double_t TBp1,TBe1,LRp1,LRe1,TBchi2,LRchi2;
|
||||||
|
|
||||||
if (FigFlag) {
|
if (FigFlag) {
|
||||||
// Top - Bottom
|
// Top - Bottom
|
||||||
TCanvas* c1= new TCanvas("c1","canvas 1");
|
TCanvas* c1= new TCanvas("c1","canvas 1");
|
||||||
@ -632,9 +648,10 @@ void NewSpec::TBLRCoinIO( Bool_t FigFlag, Double_t eCut )
|
|||||||
hAsyTB->Draw();
|
hAsyTB->Draw();
|
||||||
hAsyTB -> Fit("pol0","Q","",0.6, 13.);
|
hAsyTB -> Fit("pol0","Q","",0.6, 13.);
|
||||||
// Top - Bottom
|
// Top - Bottom
|
||||||
Double_t TBchi2=pol0->GetChisquare();
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t TBp1=pol0->GetParameter(0);
|
TBchi2 = pol0->GetChisquare();
|
||||||
Double_t TBe1=pol0->GetParError(0);
|
TBp1 = pol0->GetParameter(0);
|
||||||
|
TBe1 = pol0->GetParError(0);
|
||||||
gStyle->SetOptStat(1001111);
|
gStyle->SetOptStat(1001111);
|
||||||
gStyle->SetOptFit(0001);
|
gStyle->SetOptFit(0001);
|
||||||
gStyle->SetLineColor(2);
|
gStyle->SetLineColor(2);
|
||||||
@ -652,9 +669,9 @@ void NewSpec::TBLRCoinIO( Bool_t FigFlag, Double_t eCut )
|
|||||||
hAsyLR->Draw();
|
hAsyLR->Draw();
|
||||||
hAsyLR -> Fit("pol0","Q","",0.6, 13.);
|
hAsyLR -> Fit("pol0","Q","",0.6, 13.);
|
||||||
// Left - Right
|
// Left - Right
|
||||||
Double_t LRchi2=pol0->GetChisquare();
|
LRchi2 = pol0->GetChisquare();
|
||||||
Double_t LRp1=pol0->GetParameter(0);
|
LRp1 = pol0->GetParameter(0);
|
||||||
Double_t LRe1=pol0->GetParError(0);
|
LRe1 = pol0->GetParError(0);
|
||||||
gStyle->SetOptStat(1001111);
|
gStyle->SetOptStat(1001111);
|
||||||
gStyle->SetOptFit(0001);
|
gStyle->SetOptFit(0001);
|
||||||
gStyle->SetLineColor(2);
|
gStyle->SetLineColor(2);
|
||||||
@ -663,15 +680,17 @@ void NewSpec::TBLRCoinIO( Bool_t FigFlag, Double_t eCut )
|
|||||||
} else {
|
} else {
|
||||||
hAsyTB -> Fit("pol0","NQ","",0.6, 13.);
|
hAsyTB -> Fit("pol0","NQ","",0.6, 13.);
|
||||||
// Top - Bottom
|
// Top - Bottom
|
||||||
Double_t TBchi2=pol0->GetChisquare();
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t TBp1=pol0->GetParameter(0);
|
TBchi2 = pol0->GetChisquare();
|
||||||
Double_t TBe1=pol0->GetParError(0);
|
TBp1 = pol0->GetParameter(0);
|
||||||
|
TBe1 = pol0->GetParError(0);
|
||||||
|
|
||||||
hAsyLR -> Fit("pol0","NQ","",0.6, 13.);
|
hAsyLR -> Fit("pol0","NQ","",0.6, 13.);
|
||||||
// Left - Right
|
// Left - Right
|
||||||
Double_t LRchi2=pol0->GetChisquare();
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t LRp1=pol0->GetParameter(0);
|
LRchi2 = pol0->GetChisquare();
|
||||||
Double_t LRe1=pol0->GetParError(0);
|
LRp1 = pol0->GetParameter(0);
|
||||||
|
LRe1 = pol0->GetParError(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Double_t NDet=hDetz->GetSum();
|
Double_t NDet=hDetz->GetSum();
|
||||||
@ -862,6 +881,9 @@ void NewSpec::TBLRCoinDown( Bool_t FigFlag, Double_t eCut )
|
|||||||
hSumLR->Add(hLtemp,hRtemp,1., 1.);
|
hSumLR->Add(hLtemp,hRtemp,1., 1.);
|
||||||
hAsyLR->Divide(hDifLR,hSumLR,1.,1.);
|
hAsyLR->Divide(hDifLR,hSumLR,1.,1.);
|
||||||
|
|
||||||
|
TF1 *pol0;
|
||||||
|
Double_t TBp1,TBe1,LRp1,LRe1,TBchi2,LRchi2;
|
||||||
|
|
||||||
if (FigFlag) {
|
if (FigFlag) {
|
||||||
// Top - Bottom
|
// Top - Bottom
|
||||||
TCanvas* c1= new TCanvas("c1","canvas 1");
|
TCanvas* c1= new TCanvas("c1","canvas 1");
|
||||||
@ -874,9 +896,10 @@ void NewSpec::TBLRCoinDown( Bool_t FigFlag, Double_t eCut )
|
|||||||
hAsyTB->Draw();
|
hAsyTB->Draw();
|
||||||
hAsyTB -> Fit("pol0","Q","",0.6, 13.);
|
hAsyTB -> Fit("pol0","Q","",0.6, 13.);
|
||||||
// Top - Bottom
|
// Top - Bottom
|
||||||
Double_t TBchi2=pol0->GetChisquare();
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t TBp1=pol0->GetParameter(0);
|
TBchi2 = pol0->GetChisquare();
|
||||||
Double_t TBe1=pol0->GetParError(0);
|
TBp1 = pol0->GetParameter(0);
|
||||||
|
TBe1 = pol0->GetParError(0);
|
||||||
gStyle->SetOptStat(1001111);
|
gStyle->SetOptStat(1001111);
|
||||||
gStyle->SetOptFit(0001);
|
gStyle->SetOptFit(0001);
|
||||||
gStyle->SetLineColor(2);
|
gStyle->SetLineColor(2);
|
||||||
@ -894,9 +917,9 @@ void NewSpec::TBLRCoinDown( Bool_t FigFlag, Double_t eCut )
|
|||||||
hAsyLR->Draw();
|
hAsyLR->Draw();
|
||||||
hAsyLR -> Fit("pol0","Q","",0.6, 13.);
|
hAsyLR -> Fit("pol0","Q","",0.6, 13.);
|
||||||
// Left - Right
|
// Left - Right
|
||||||
Double_t LRchi2=pol0->GetChisquare();
|
LRchi2 = pol0->GetChisquare();
|
||||||
Double_t LRp1=pol0->GetParameter(0);
|
LRp1 = pol0->GetParameter(0);
|
||||||
Double_t LRe1=pol0->GetParError(0);
|
LRe1 = pol0->GetParError(0);
|
||||||
gStyle->SetOptStat(1001111);
|
gStyle->SetOptStat(1001111);
|
||||||
gStyle->SetOptFit(0001);
|
gStyle->SetOptFit(0001);
|
||||||
gStyle->SetLineColor(2);
|
gStyle->SetLineColor(2);
|
||||||
@ -905,15 +928,16 @@ void NewSpec::TBLRCoinDown( Bool_t FigFlag, Double_t eCut )
|
|||||||
} else {
|
} else {
|
||||||
hAsyTB -> Fit("pol0","NQ","",0.6, 13.);
|
hAsyTB -> Fit("pol0","NQ","",0.6, 13.);
|
||||||
// Top - Bottom
|
// Top - Bottom
|
||||||
Double_t TBchi2=pol0->GetChisquare();
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t TBp1=pol0->GetParameter(0);
|
TBchi2 = pol0->GetChisquare();
|
||||||
Double_t TBe1=pol0->GetParError(0);
|
TBp1 = pol0->GetParameter(0);
|
||||||
|
TBe1 = pol0->GetParError(0);
|
||||||
|
|
||||||
hAsyLR -> Fit("pol0","NQ","",0.6, 13.);
|
hAsyLR -> Fit("pol0","NQ","",0.6, 13.);
|
||||||
// Left - Right
|
// Left - Right
|
||||||
Double_t LRchi2=pol0->GetChisquare();
|
LRchi2 = pol0->GetChisquare();
|
||||||
Double_t LRp1=pol0->GetParameter(0);
|
LRp1 = pol0->GetParameter(0);
|
||||||
Double_t LRe1=pol0->GetParError(0);
|
LRe1 = pol0->GetParError(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Double_t NDet=hDetz->GetSum();
|
Double_t NDet=hDetz->GetSum();
|
||||||
@ -1105,6 +1129,9 @@ void NewSpec::TBLRCoinUp( Bool_t FigFlag, Double_t eCut )
|
|||||||
hSumLR->Add(hLtemp,hRtemp,1., 1.);
|
hSumLR->Add(hLtemp,hRtemp,1., 1.);
|
||||||
hAsyLR->Divide(hDifLR,hSumLR,1.,1.);
|
hAsyLR->Divide(hDifLR,hSumLR,1.,1.);
|
||||||
|
|
||||||
|
TF1 *pol0;
|
||||||
|
Double_t TBp1,TBe1,LRp1,LRe1,TBchi2,LRchi2;
|
||||||
|
|
||||||
if (FigFlag) {
|
if (FigFlag) {
|
||||||
// Top - Bottom
|
// Top - Bottom
|
||||||
TCanvas* c1= new TCanvas("c1","canvas 1");
|
TCanvas* c1= new TCanvas("c1","canvas 1");
|
||||||
@ -1117,9 +1144,10 @@ void NewSpec::TBLRCoinUp( Bool_t FigFlag, Double_t eCut )
|
|||||||
hAsyTB->Draw();
|
hAsyTB->Draw();
|
||||||
hAsyTB -> Fit("pol0","Q","",0.6, 13.);
|
hAsyTB -> Fit("pol0","Q","",0.6, 13.);
|
||||||
// Top - Bottom
|
// Top - Bottom
|
||||||
Double_t TBchi2=pol0->GetChisquare();
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t TBp1=pol0->GetParameter(0);
|
TBchi2 = pol0->GetChisquare();
|
||||||
Double_t TBe1=pol0->GetParError(0);
|
TBp1 = pol0->GetParameter(0);
|
||||||
|
TBe1 = pol0->GetParError(0);
|
||||||
gStyle->SetOptStat(1001111);
|
gStyle->SetOptStat(1001111);
|
||||||
gStyle->SetOptFit(0001);
|
gStyle->SetOptFit(0001);
|
||||||
gStyle->SetLineColor(2);
|
gStyle->SetLineColor(2);
|
||||||
@ -1137,9 +1165,9 @@ void NewSpec::TBLRCoinUp( Bool_t FigFlag, Double_t eCut )
|
|||||||
hAsyLR->Draw();
|
hAsyLR->Draw();
|
||||||
hAsyLR -> Fit("pol0","Q","",0.6, 13.);
|
hAsyLR -> Fit("pol0","Q","",0.6, 13.);
|
||||||
// Left - Right
|
// Left - Right
|
||||||
Double_t LRchi2=pol0->GetChisquare();
|
LRchi2 = pol0->GetChisquare();
|
||||||
Double_t LRp1=pol0->GetParameter(0);
|
LRp1 = pol0->GetParameter(0);
|
||||||
Double_t LRe1=pol0->GetParError(0);
|
LRe1 = pol0->GetParError(0);
|
||||||
gStyle->SetOptStat(1001111);
|
gStyle->SetOptStat(1001111);
|
||||||
gStyle->SetOptFit(0001);
|
gStyle->SetOptFit(0001);
|
||||||
gStyle->SetLineColor(2);
|
gStyle->SetLineColor(2);
|
||||||
@ -1148,15 +1176,16 @@ void NewSpec::TBLRCoinUp( Bool_t FigFlag, Double_t eCut )
|
|||||||
} else {
|
} else {
|
||||||
hAsyTB -> Fit("pol0","NQ","",0.6, 13.);
|
hAsyTB -> Fit("pol0","NQ","",0.6, 13.);
|
||||||
// Top - Bottom
|
// Top - Bottom
|
||||||
Double_t TBchi2=pol0->GetChisquare();
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t TBp1=pol0->GetParameter(0);
|
TBchi2 = pol0->GetChisquare();
|
||||||
Double_t TBe1=pol0->GetParError(0);
|
TBp1 = pol0->GetParameter(0);
|
||||||
|
TBe1 = pol0->GetParError(0);
|
||||||
|
|
||||||
hAsyLR -> Fit("pol0","NQ","",0.6, 13.);
|
hAsyLR -> Fit("pol0","NQ","",0.6, 13.);
|
||||||
// Left - Right
|
// Left - Right
|
||||||
Double_t LRchi2=pol0->GetChisquare();
|
LRchi2 = pol0->GetChisquare();
|
||||||
Double_t LRp1=pol0->GetParameter(0);
|
LRp1 = pol0->GetParameter(0);
|
||||||
Double_t LRe1=pol0->GetParError(0);
|
LRe1 = pol0->GetParError(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Double_t NDet=hDetz->GetSum();
|
Double_t NDet=hDetz->GetSum();
|
||||||
@ -1195,6 +1224,11 @@ void NewSpec::SCoinIO( Bool_t FigFlag, Double_t eCut )
|
|||||||
|
|
||||||
// Sigmenets histograms 1-32
|
// Sigmenets histograms 1-32
|
||||||
TH1F* h1 = new TH1F("h1","Muon arrival times in 1 (#mus)",1300,0.,13.);
|
TH1F* h1 = new TH1F("h1","Muon arrival times in 1 (#mus)",1300,0.,13.);
|
||||||
|
|
||||||
|
// Back inner histogram, i.e. all counts in segments 1-16
|
||||||
|
TH1F* hBack = new TH1F("hBack","Muon arrival times Back (#mus)",130,0.,13.);
|
||||||
|
// Forward inner histogram, i.e. all counts in segments 17-32
|
||||||
|
TH1F* hForw = new TH1F("hForw","Muon arrival times Forw (#mus)",130,0.,13.);
|
||||||
|
|
||||||
hEdeposited->Sumw2();
|
hEdeposited->Sumw2();
|
||||||
hEdepositCF->Sumw2();
|
hEdepositCF->Sumw2();
|
||||||
@ -1282,6 +1316,8 @@ void NewSpec::SCoinIO( Bool_t FigFlag, Double_t eCut )
|
|||||||
} else {
|
} else {
|
||||||
hAsyFB -> Fit("pol0","NQ","",0.6, 13.);
|
hAsyFB -> Fit("pol0","NQ","",0.6, 13.);
|
||||||
}
|
}
|
||||||
|
TF1 *pol0;
|
||||||
|
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
|
||||||
Double_t chi2=pol0->GetChisquare();
|
Double_t chi2=pol0->GetChisquare();
|
||||||
Double_t p1=pol0->GetParameter(0);
|
Double_t p1=pol0->GetParameter(0);
|
||||||
Double_t e1=pol0->GetParError(0);
|
Double_t e1=pol0->GetParError(0);
|
||||||
|
@ -127,6 +127,14 @@ public :
|
|||||||
virtual void Loop();
|
virtual void Loop();
|
||||||
virtual Bool_t Notify();
|
virtual Bool_t Notify();
|
||||||
virtual void Show(Long64_t entry = -1);
|
virtual void Show(Long64_t entry = -1);
|
||||||
|
virtual void CreateIO(Bool_t FigFlag, Double_t eCut);
|
||||||
|
virtual void CoinIO(Bool_t FigFlag, Double_t eCut);
|
||||||
|
virtual void CoinIOUD(Bool_t FigFlag, Double_t eCut);
|
||||||
|
virtual void TBLRCoinIO(Bool_t FigFlag, Double_t eCut);
|
||||||
|
virtual void TBLRCoinDown(Bool_t FigFlag, Double_t eCut);
|
||||||
|
virtual void TBLRCoinUp(Bool_t FigFlag, Double_t eCut);
|
||||||
|
virtual void SCoinIO(Bool_t FigFlag, Double_t eCut);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user