From: Dennis Doering Date: Thu, 24 Sep 2015 10:04:38 +0000 (+0200) Subject: Merge branch 'master' of jspc29.x-matter.uni-frankfurt.de:radhard X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=61a88fb4cb2263b8b3b98a973a40038f035aa377;p=radhard.git Merge branch 'master' of jspc29.x-matter.uni-frankfurt.de:radhard Conflicts: MABS_run_analyzer/ChargeSpektrum.c Merge branch 'master' of jspc29.x-matter.uni-frankfurt.de:radhard Conflicts: MABS_run_analyzer/ChargeSpektrum.c --- 61a88fb4cb2263b8b3b98a973a40038f035aa377 diff --cc MABS_run_analyzer/ChargeSpektrum.c index 452f09a,9029615..bbc0208 --- a/MABS_run_analyzer/ChargeSpektrum.c +++ b/MABS_run_analyzer/ChargeSpektrum.c @@@ -123,13 -123,13 +123,15 @@@ void ChargeSpektrum(TString runnumber runs[runi]->useDynamicalNoise(true); runs[runi]->useCommonModeFilter(false); runs[runi]->setFixedThresholdValueElectrons(1440); -- ++ runs[runi]->selectSubMatrixFSBB("A0"); // runs[runi]->analyzeFrame(57826); // runs[runi]->analyzeFrame(57827); --// runs[runi]->analyzeFrame(983603); -- ++ // runs[runi]->analyzeFrame(32); ++ // runs[runi]->analyzeFrame(1390); ++ runs[runi]->analyzeFrame(8229); ++ // runs[runi]->analyzeFrame(133); // creates or opens .root file, can analyze the RAW data -- runs[runi]->error=runs[runi]->analyzeRun(false); // creates or opens .root file, can analyze the RAW data ++ // runs[runi]->error=runs[runi]->analyzeRun(true); // creates or opens .root file, can analyze the RAW data if (!runs[runi]->error) { // gROOT->SetBatch(kTRUE); @@@ -143,16 -143,17 +145,22 @@@ // runs[runi]->plotNoise(); if (!isBatch) gROOT->SetBatch(kFALSE); - 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]->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]->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); - compareHistogramClassVector.push_back(runs[runi]->dennismegacut); - 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); - compareHistogramVector.push_back(runs[runi]->histogram->Seed); ++ // 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); ++ compareHistogramClassVector.push_back(runs[runi]->histogramFSBB); ++ compareHistogramClassVector.push_back(runs[runi]->histogramFSBB2); ++ // compareHistogramVector.push_back(runs[runi]->histogram->Seed); ++ // compareHistogramVector.push_back(runs[runi]->histogram->Sum); ++ compareHistogramVector.push_back(runs[runi]->histogramFSBB2->Seed); ++ compareHistogramVector.push_back(runs[runi]->histogramFSBB2->Sum); // 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"); @@@ -170,9 -171,10 +178,10 @@@ } } plotAllRuns(); ++ setCustomPath("/Excel"); + writeObservableToFile(); // plotAllRuns("seed threshold calibrated"); - setCustomPath("Excel/"); -// setCustomPath("Excel/"); -// writeObservableToFile("seed threshold calibrated"); + // writeDataToExcel(); // writeObservableToFile("seed threshold"); // writeObservableToFile("seed threshold"); // writeObservableToFile("sum threshold"); diff --cc MABS_run_analyzer/ChargeSpektrumFunctions.c index 40a43de,eabe580..1b36ac7 --- a/MABS_run_analyzer/ChargeSpektrumFunctions.c +++ b/MABS_run_analyzer/ChargeSpektrumFunctions.c @@@ -171,68 -93,29 +93,84 @@@ Bool_t writeObservableToFile( } } } - *fout<close(); - + filename+=".dat"; + fstream* fout = new fstream(filename,ios::out); + header += Form("#"); + for (vector::iterator curHistogram = compareHistogramVector.begin(); curHistogram != compareHistogramVector.end(); curHistogram++) { + header += Form("bin\t%s\t",(*curHistogram)->GetName()); + } + *fout << header << endl; + TString outline; + for(Int_t bin=1;bin<=runs[0]->cursystemparam.nbins;bin++) + { + outline =""; + for (vector::iterator curHistogram = compareHistogramVector.begin(); curHistogram != compareHistogramVector.end(); curHistogram++) { + outline+=Form("%.1f\t%.1f\t", (*curHistogram)->GetBinCenter(bin), (*curHistogram)->GetBinContent(bin)); + } + *fout<close(); + return 0; + + } 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()