From: Dennis Doering Date: Mon, 21 Sep 2015 15:07:55 +0000 (+0200) Subject: Excelfunktion angefangen X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=a9a2e919fe10a5c30004ef277d953873d9b6173f;p=radhard.git Excelfunktion angefangen --- diff --git a/MABS_run_analyzer/ChargeSpektrum.c b/MABS_run_analyzer/ChargeSpektrum.c index 316b814..452f09a 100644 --- a/MABS_run_analyzer/ChargeSpektrum.c +++ b/MABS_run_analyzer/ChargeSpektrum.c @@ -143,16 +143,16 @@ void ChargeSpektrum(TString runnumber = "") // runs[runi]->plotNoise(); if (!isBatch) gROOT->SetBatch(kFALSE); - runs[runi]->compareHistogramClassVector.push_back(runs[runi]->histogram->calibrated); - runs[runi]->compareHistogramClassVector.push_back(runs[runi]->histogramthreshold->calibrated); - runs[runi]->compareHistogramClassVector.push_back(runs[runi]->dennismegacut->calibrated); - runs[runi]->compareHistogramClassVector.push_back(runs[runi]->histogramfixedthreshold->calibrated); + runs[runi]->compareHistogramClassVector.push_back(runs[runi]->histogram); + runs[runi]->compareHistogramClassVector.push_back(runs[runi]->histogramthreshold); + runs[runi]->compareHistogramClassVector.push_back(runs[runi]->dennismegacut); runs[runi]->plotCompareHistograms(); - runs[runi]->plotAllHistograms(runs[runi]->histogram->calibrated); - runs[runi]->plotAllHistograms(runs[runi]->dennismegacut->calibrated); - runs[runi]->plot1DHistogram(runs[runi]->histogram->calibrated, runs[runi]->histogram->Seed, "landau"); - runs[runi]->plot1DHistogram(runs[runi]->histogram->calibrated, runs[runi]->histogram->calibrated->Seed, "landau"); - compareHistogramClassVector.push_back(runs[runi]->histogram->calibrated); + // runs[runi]->plotAllHistograms(runs[runi]->histogram->calibrated); + // runs[runi]->plotAllHistograms(runs[runi]->dennismegacut->calibrated); + // runs[runi]->plot1DHistogram(runs[runi]->histogram->calibrated, runs[runi]->histogram->Seed, "landau"); + // runs[runi]->plot1DHistogram(runs[runi]->histogram->calibrated, runs[runi]->histogram->calibrated->Seed, "landau"); + compareHistogramClassVector.push_back(runs[runi]->histogram); + compareHistogramClassVector.push_back(runs[runi]->dennismegacut); // runs[runi]->integrateSr90Spectra(&runs[runi]->histogramfixedthresholdCalibrated, runs[runi]->histogramfixedthresholdCalibrated.Seed, 0); // runs[runi]->plot1DHistogram(&runs[runi]->histogramfixedthresholdCalibrated, runs[runi]->histogramfixedthresholdCalibrated.Seed, "landau"); // runs[runi]->plot1DHistogram(&runs[runi]->histogramthresholdCalibrated, runs[runi]->histogramthresholdCalibrated.Seed, "landau"); @@ -171,8 +171,8 @@ void ChargeSpektrum(TString runnumber = "") } plotAllRuns(); // plotAllRuns("seed threshold calibrated"); -// setCustomPath("Excel/"); -// writeObservableToFile("seed threshold calibrated"); + setCustomPath("Excel/"); + // writeDataToExcel(); // writeObservableToFile("seed threshold"); // writeObservableToFile("seed threshold"); // writeObservableToFile("sum threshold"); diff --git a/MABS_run_analyzer/ChargeSpektrumFunctions.c b/MABS_run_analyzer/ChargeSpektrumFunctions.c index 9362888..40a43de 100644 --- a/MABS_run_analyzer/ChargeSpektrumFunctions.c +++ b/MABS_run_analyzer/ChargeSpektrumFunctions.c @@ -177,7 +177,62 @@ Bool_t writeObservableToFile() return 0; } +Bool_t writeDataToExcel() +{ + system("mkdir "+ runs[0]->savepathresults + " -p"); + TString headerInfo = ""; + for(Int_t runi=0;runiruncode+"\t\t\t"; + } + TH1F* plothistogrampointer = runs[0]->plothistogrampointer; + TString runnumberListe=""; + TString header=""; + cout<<"komme ich hierher3"<Seed->Clone(); + runnumberListe+=Form("%d_",curhistogramclassp->labbook.runnumber); + // header+=Form("%d\t%s\t\t\t", runs[runi]->labbook.runnumber, curhistogramclone->GetTitle()); + + } + // TString filename= runs[0]->savepathresults + "/" + ownpath + runnumberListe + Form("%s",plothistogrampointer->GetName())+"histogram.dat"; + // fstream* fout = new fstream(filename,ios::out); + // *fout << headerInfo << endl; + // *fout << header << endl; + + + // for(Int_t bini=0;biniGetNbinsX();bini++) + // { + // for(Int_t runi=0;runierror) + // { + // plothistogrampointer = runs[runi]->plothistogrampointer; + // TString outline; + // Double_t binContentNorm=plothistogrampointer->GetBinContent(bini)/runs[runi]->labbook.frames_foundDB*10000000; + // Double_t binSumme=0.0; + // for(Int_t binSummei=bini;binSummeiGetNbinsX();binSummei++)//Sum up from bini beginning (cut condition for detection eff.) + // { + // Double_t binContentNormInSumme=plothistogrampointer->GetBinContent(binSummei)/runs[runi]->labbook.frames_foundDB*10000000; + // binSumme=binSumme+binContentNormInSumme; + // } + // outline=Form("%.1f\t%.1f\t%.1f\t%.1f\t",plothistogrampointer->GetBinCenter(bini),plothistogrampointer->GetBinContent(bini),binContentNorm,binSumme); + // *fout<close(); + + return 0; +} Bool_t plotAllRuns() diff --git a/MABS_run_analyzer/Run.c b/MABS_run_analyzer/Run.c index f5a3304..62ed322 100644 --- a/MABS_run_analyzer/Run.c +++ b/MABS_run_analyzer/Run.c @@ -816,7 +816,7 @@ Bool_t Run::binSeedSumVeto() histogramfixedthreshold->Veto->Fill(processed->fFrameInfo.p[12][hiti]); // histogram with the single pixel } - if (processed->fFrameInfo.pixel[hiti]>200) + if (processed->fFrameInfo.pixel[hiti]>800) { dennismegacut->numberofhits++;