Rev 37 | Rev 47 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 37 | Rev 40 | ||
|---|---|---|---|
| Line 73... | Line 73... | ||
| 73 | TH2D* h_correctedTDC = (TH2D*) h_3D->Project3D("xz"); |
73 | TH2D* h_correctedTDC = (TH2D*) h_3D->Project3D("xz"); |
| 74 | h_correctedTDC->SetTitle("; t [ns]; Channel"); |
74 | h_correctedTDC->SetTitle("; t [ns]; Channel"); |
| 75 | h_correctedTDC->Draw("colz"); |
75 | h_correctedTDC->Draw("colz"); |
| 76 | TCanvas* canvas3 = new TCanvas("canvas3","canvas3",800,800); |
76 | TCanvas* canvas3 = new TCanvas("canvas3","canvas3",800,800); |
| 77 | canvas2->cd(2); |
77 | canvas2->cd(2); |
| - | 78 | TH1D* h_allTDCbins = h_correctedTDC->ProjectionX("", 1, 64); |
|
| - | 79 | h_allTDCbins->Draw(); |
|
| - | 80 | /* |
|
| 78 | int binY = map[chX][chY]; |
81 | int binY = map[chX][chY]; |
| 79 | TH1D* channelY = h_correctedTDC->ProjectionX("",binY+1,binY+1); |
82 | TH1D* channelY = h_correctedTDC->ProjectionX("",binY+1,binY+1); |
| 80 |
|
83 | channelY->SetStats(0); |
| 81 | 84 | |
|
| 82 | char title[256]; |
85 | char title[256]; |
| 83 | sprintf(title,"Channel %d;t [ns];Events", binY); |
86 | sprintf(title,"Channel %d;t [ns];Events", binY); |
| 84 | channelY->SetTitle(title); |
87 | channelY->SetTitle(title); |
| 85 | channelY->GetYaxis()->SetTitleOffset(1.7); |
88 | channelY->GetYaxis()->SetTitleOffset(1.7); |
| 86 |
|
89 | TAxis* xAxis = h_correctedTDC->GetXaxis(); |
| 87 |
|
90 | int range = xAxis->GetBinUpEdge(xAxis->GetLast()+1); |
| 88 |
|
91 | channelY->GetXaxis()->SetRangeUser(-range, range); |
| 89 | channelY->Draw(); |
92 | channelY->Draw(); |
| 90 | /* |
93 | |
| 91 | TF1* f_gaus1 = new TF1("f_gaus1","[0] + gaus(1)", rangeLeft,rangeRight); |
94 | TF1* f_gaus1 = new TF1("f_gaus1","[0] + gaus(1)", rangeLeft,rangeRight); |
| 92 | TF1* f_gaus2 = new TF1("f_gaus2","[0] + gaus(1) + gaus(4)",-8,8); |
95 | TF1* f_gaus2 = new TF1("f_gaus2","[0] + gaus(1) + gaus(4)",-8,8); |
| 93 | f_gaus1->SetParNames("Linear","Norm","#mu","#sigma"); |
96 | f_gaus1->SetParNames("Linear","Norm","#mu","#sigma"); |
| 94 | f_gaus2->SetParNames("Linear","Norm1","Mean1","Sigma1","Norm2","Mean2","Sigma2"); |
97 | f_gaus2->SetParNames("Linear","Norm1","Mean1","Sigma1","Norm2","Mean2","Sigma2"); |
| 95 | Int_t n = channelY->GetMaximum(); |
98 | Int_t n = channelY->GetMaximum(); |