From: Benjamin Linnik Date: Mon, 18 Sep 2017 11:06:55 +0000 (+0200) Subject: Analyzer: adjustments for Ali X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=077aac125e58656955d587f7d16a20b848c84543;p=radhard.git Analyzer: adjustments for Ali --- diff --git a/MABS_run_analyzer/ChargeSpektrumFunctions.c b/MABS_run_analyzer/ChargeSpektrumFunctions.c index ff13df5..44496b2 100644 --- a/MABS_run_analyzer/ChargeSpektrumFunctions.c +++ b/MABS_run_analyzer/ChargeSpektrumFunctions.c @@ -504,9 +504,13 @@ Bool_t CompareHistograms(vector* ptCompareHistogramVector, TString title { TH1F* curhistogramclone = (TH1F*) ptCompareHistogramVector->at(histogrami)->Clone(); heighestval1 = (curhistogramclone->GetMaximum()>heighestval1?curhistogramclone->GetMaximum():heighestval1); - lastbin1 = (curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,2))>lastbin1)?curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,2)):lastbin1; canvastitle+= Form("_%s",getRunnumberAtBegin(curhistogramclone->GetName()).Data()); } + for (UInt_t histogrami=0; histogrami < ptCompareHistogramVector->size(); histogrami++) + { + TH1F* curhistogramclone = (TH1F*) ptCompareHistogramVector->at(histogrami)->Clone(); + lastbin1 = (curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,heighestval1/100))>lastbin1)?curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,heighestval1/100)):lastbin1; + } TCanvas* canvas = new TCanvas(canvasname, canvastitle, 1200, 800); TPad *grid = new TPad("grid","",0,0,1,1); grid->Draw(); @@ -801,7 +805,7 @@ Bool_t plotAllRuns(vector* ptCompareHistogramClassVector) curhistogramclone->GetXaxis()->UnZoom(); curhistogramclone->GetXaxis()->SetRange(curhistogramclone->GetXaxis()->FindBin(curhistogramclassp->noisethresholdborder),curhistogramclone->GetXaxis()->FindBin(posMaxValHist)); // look only for maxima with x greater than noiseborder, cut away noise heighestval1 = (curhistogramclone->GetMaximum()>heighestval1?curhistogramclone->GetMaximum():heighestval1); - lastbin1 = (curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,2))>lastbin1)?curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,2)):lastbin1; + lastbin1 = (curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,3))>lastbin1)?curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,3)):lastbin1; // cout << "Last bin: " << colorcyan << lastbin1 << endlr; // cout << "curhistogramclone->GetMaximum(): " << colorcyan << curhistogramclone->GetMaximum() << endlr; @@ -812,14 +816,14 @@ Bool_t plotAllRuns(vector* ptCompareHistogramClassVector) heighestval2 = (curhistogramclone->GetMaximum()>heighestval2?curhistogramclone->GetMaximum():heighestval2); - lastbin2 = (curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,2))>lastbin2)?curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,2)):lastbin2; + lastbin2 = (curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,3))>lastbin2)?curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,3)):lastbin2; curhistogramclone = (TH1F*) curhistogramclassp->Veto->Clone(); posMaxValHist = curhistogramclone->GetXaxis()->GetXmax(); curhistogramclone->GetXaxis()->UnZoom(); curhistogramclone->GetXaxis()->SetRange(curhistogramclone->GetXaxis()->FindBin(curhistogramclassp->noisethresholdborder),curhistogramclone->GetXaxis()->FindBin(posMaxValHist)); // look only for maxima with x greater than noiseborder, cut away noise heighestval3 = (curhistogramclone->GetMaximum()>heighestval3?curhistogramclone->GetMaximum():heighestval3); - lastbin3 = (curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,2))>lastbin3)?curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,2)):lastbin3; + lastbin3 = (curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,3))>lastbin3)?curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,3)):lastbin3; // cout << "heighestval3: " << colorcyan << heighestval3 << endlr; // cout << "curhistogramclone->GetMaximum(): " << colorcyan << curhistogramclone->GetMaximum() << endlr;