Rev 35 | Rev 37 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 35 | Rev 36 | ||
---|---|---|---|
Line 60... | Line 60... | ||
60 | TCanvas* canvas1 = new TCanvas("canvas1","canvas1",1000,1000); |
60 | TCanvas* canvas1 = new TCanvas("canvas1","canvas1",1000,1000); |
61 | TH2F* htdc = (TH2F*) rootfile->Get("htdc"); |
61 | TH2F* htdc = (TH2F*) rootfile->Get("htdc"); |
62 | canvas1->cd(); |
62 | canvas1->cd(); |
63 | htdc->Draw("colz"); |
63 | htdc->Draw("colz"); |
64 | 64 | ||
65 |
|
65 | TH3F* h_3D = (TH3F*) rootfile->Get("h_correctedTDC"); |
66 | TCanvas* canvas2 = new TCanvas("canvas2","canvas2",800,800); |
66 | TCanvas* canvas2 = new TCanvas("canvas2","canvas2",800,800); |
67 | canvas2->cd(); |
67 | canvas2->cd(); |
- | 68 | //h_correctedTDC->Draw("colz"); |
|
- | 69 | ||
- | 70 | TH2D* h_correctedTDC = (TH2D*) h_3D->Project3D("xz"); |
|
- | 71 | h_correctedTDC->SetTitle("; t [ns]; Channel"); |
|
68 | h_correctedTDC->Draw("colz"); |
72 | h_correctedTDC->Draw("colz"); |
69 |
|
73 | TCanvas* canvas3 = new TCanvas("canvas3","canvas3",800,800); |
70 | canvas2->cd(2); |
74 | canvas2->cd(2); |
71 | int binY = map[chX][chY]; |
75 | int binY = map[chX][chY]; |
72 | TH1D* channelY = h_correctedTDC->ProjectionX("",binY+1,binY+1); |
76 | TH1D* channelY = h_correctedTDC->ProjectionX("",binY+1,binY+1); |
73 | //channelY->SetStats(0); |
77 | //channelY->SetStats(0); |
74 | |
78 | |
Line 78... | Line 82... | ||
78 | channelY->GetYaxis()->SetTitleOffset(1.7); |
82 | channelY->GetYaxis()->SetTitleOffset(1.7); |
79 | //TAxis* xAxis = h_correctedTDC->GetXaxis(); |
83 | //TAxis* xAxis = h_correctedTDC->GetXaxis(); |
80 | //int range = xAxis->GetBinUpEdge(xAxis->GetLast()+1); |
84 | //int range = xAxis->GetBinUpEdge(xAxis->GetLast()+1); |
81 | //channelY->GetXaxis()->SetRangeUser(-range, range); |
85 | //channelY->GetXaxis()->SetRangeUser(-range, range); |
82 | channelY->Draw(); |
86 | channelY->Draw(); |
83 | 87 | /* |
|
84 | TF1* f_gaus1 = new TF1("f_gaus1","[0] + gaus(1)", rangeLeft,rangeRight); |
88 | TF1* f_gaus1 = new TF1("f_gaus1","[0] + gaus(1)", rangeLeft,rangeRight); |
85 | TF1* f_gaus2 = new TF1("f_gaus2","[0] + gaus(1) + gaus(4)",-8,8); |
89 | TF1* f_gaus2 = new TF1("f_gaus2","[0] + gaus(1) + gaus(4)",-8,8); |
86 | f_gaus1->SetParNames("Linear","Norm","#mu","#sigma"); |
90 | f_gaus1->SetParNames("Linear","Norm","#mu","#sigma"); |
87 | f_gaus2->SetParNames("Linear","Norm1","Mean1","Sigma1","Norm2","Mean2","Sigma2"); |
91 | f_gaus2->SetParNames("Linear","Norm1","Mean1","Sigma1","Norm2","Mean2","Sigma2"); |
88 | Int_t n = channelY->GetMaximum(); |
92 | Int_t n = channelY->GetMaximum(); |