TH1F* smoothedcurce = (TH1F*)histogrampointer->Clone();
smoothedcurce->Smooth(4);
+ smoothedcurce->SetAxisRange(0,histogrampointer->GetBinCenter(histogrampointer->GetNbinsX()));
- // Int_t random = random1->Rndm()*100000;
- // TString canvastitle = Form("%s %s sdfasdf", histogrampointer->GetName(), runcode.Data());
- // TString canvasname = Form("%s %s %d dfgsdfgsdfg", histogrampointer->GetName(), runcode.Data(), random);
- // TCanvas* canvas = new TCanvas(canvasname, canvastitle, 900, 700);
- // smoothedcurce->Draw();
+// TString canvastitle = Form("%s sdfasdf", histogrampointer->GetName());
+// TString canvasname = Form("%s dfgsdfgsdfg", histogrampointer->GetName());
+// TCanvas* canvas = new TCanvas(canvasname, canvastitle, 900, 700);
+// smoothedcurce->Draw();
Int_t thresholdbincurcandidate = 0;
if (thresholdborder < 0)
{
Int_t rising = 0;
Int_t bini =smoothedcurce->GetMaximumBin();
+ thresholdbincurcandidate = bini;
Float_t curval = smoothedcurce->GetXaxis()->GetBinCenter(bini);
- // cout << "smoothedcurce->GetXaxis()->GetBinCenter(" << bini << "): " << curval << endl;
+// cout << "GetMaximumBin: smoothedcurce->GetXaxis()->GetBinCenter(" << bini << "): " << curval << endl;
do {
curval=smoothedcurce->GetBinContent(bini++);
if (curval*0.95 <= smoothedcurce->GetBinContent(bini))
{
rising++;
- // cout << "rising at " << smoothedcurce->GetXaxis()->GetBinCenter(bini) << " as " << curval << " < " << smoothedcurce->GetBinContent(bini) << endl; // debug
+// cout << "rising at " << smoothedcurce->GetXaxis()->GetBinCenter(bini) << " as " << curval << " < " << smoothedcurce->GetBinContent(bini) << endl; // debug
}
else
{
// Float_t posChargeMax= histogrampointer->GetMaximum();
noisethresholdborder = histogrampointer->GetXaxis()->GetBinUpEdge(thresholdbincurcandidate);
+// cout << "thresholdbincurcandidate: " << thresholdbincurcandidate << endl;
+// cout << "noisethresholdborder: " << noisethresholdborder << endl;
if (verbose) {
cout << " Integrating " << histogrampointer->GetTitle() << endlr;