#define VETO_THRESHOLD 20
#define LABORBUCH "RelevantRuns.csv"
-#define DATAPATH "/local/sstrohauer/data/data_8.8.2013_19:21/"
+// #define DATAPATH "/local/sstrohauer/data/data_15.10.2013_11:36/"
+// #define DATAPATH "/local/sstrohauer/data/data_18.10.2013_16:8/"
+// #define DATAPATH "/local/sstrohauer/data/data_22.10.2013_14:9/"
+#define DATAPATH "/local/sstrohauer/data/data_22.10.2013_18:22/"
#define USE_SEPARATE_NOISE_RUN true
#define DRAW_SINGLE_HISTOGRAMS true
-#define DRAW_SUMMED_HISTOGRAMS false
-#define DRAW_VETO_HISTOGRAMS false
+#define DRAW_SUMMED_HISTOGRAMS true
+#define DRAW_VETO_HISTOGRAMS true
#define DRAW_PIXEL_DISTRIBUTION_HISTOGRAMS true
// examples for fit functions: gaus, landau
-#define FIT_FUNC "landau"
-#define DRAW_FITS true
-#define DRAW_NOISE_HISTOGRAM true
+#define FIT_FUNC "gaus"
+#define DRAW_FITS false
+#define DRAW_NOISE_HISTOGRAM false
#define PRINT_HEADER false
void PlotGraph(Float_t selTemp, Int_t selChip, std::string selSource, Int_t selMatrix6480, Int_t selSubmatrix, Float_t selRadDose)
std::vector<TH1F*> histNtuple;
std::vector<TH1F*> histNtupleSum;
std::vector<TH1F*> histNtupleVeto;
+ std::vector<TH1F*> histPixelNumIsSeed;
std::vector<TH1F*> histPixelDistribution1;
std::vector<TH1F*> histPixelDistribution2;
std::vector<TH1F*> histNoise;
runDetails.push_back(Form("%i\t%.1f\t%.1f\t%i\t%s\t%i\t%.2E\t%i", runNo, temperature, tempSens, chip, source.c_str(), matrix6480, radDose, submatrix));
+ Int_t totalPixelNum;
+ if (matrix6480 == 64) {
+ if (submatrix < 2)
+ totalPixelNum = 48*48;
+ else
+ totalPixelNum = 48*32;
+ }
+ else if (matrix6480 == 80) {
+ if (submatrix < 2)
+ totalPixelNum = 51*64;
+ else
+ totalPixelNum = 51*32;
+ }
// open the file
TString path = TString(DATAPATH) + Form("%i/%i_0_%i.root", runNo, runNo, submatrix);
histNtuple.push_back(new TH1F(Form("hist%i",nHistNtuple), "Histogram title", 200, 0, RIGHT_BOUNDARY));
histNtupleSum.push_back(new TH1F(Form("histSum%i",nHistNtuple), "Histogram title", 200, 0, RIGHT_BOUNDARY));
histNtupleVeto.push_back(new TH1F(Form("histVeto%i",nHistNtuple), "Histogram title", 200, 0, RIGHT_BOUNDARY));
- histPixelDistribution1.push_back(new TH1F(Form("histPixelDistribution1_%i",nHistNtuple), "Histogram title", 50000, 0, 50000));
- histPixelDistribution2.push_back(new TH1F(Form("histPixelDistribution2_%i",nHistNtuple), "Histogram title", 50000, 0, 50000));
+ histPixelNumIsSeed.push_back(new TH1F(Form("histPixelNumIsSeed_%i",nHistNtuple), "Histogram title", totalPixelNum, 0, totalPixelNum));
+ histPixelDistribution1.push_back(new TH1F(Form("histPixelDistribution1_%i",nHistNtuple), "Histogram title", totalPixelNum, 0, totalPixelNum));
+ histPixelDistribution2.push_back(new TH1F(Form("histPixelDistribution2_%i",nHistNtuple), "Histogram title", totalPixelNum, 0, totalPixelNum));
// loop over all hits to fill histogram
Int_t nentries = hitNtuple->GetEntries();
// Double_t meanNotSeedSum=0;
// Int_t nhits=0;
+
+
+
+ cout << "Mittelwert Hits pro frame: " << nentries/50000.0 << endl;
+
+
+
+
+
+ for (Int_t cnt=0; cnt<nentries; cnt++) {
+ hitNtuple->GetEntry(cnt);
+ histPixelNumIsSeed[nHistNtuple]->Fill(seedPixel);
+ }
+ Float_t averageBinContent = nentries/totalPixelNum;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
for (Int_t cnt=0; cnt<nentries; cnt++) {
hitNtuple->GetEntry(cnt);
// continue;
+
+
+
+
// histogram with the single pixel
+// if (pixel[12] > 20)
+// continue;
+
+ if (histPixelNumIsSeed[nHistNtuple]->GetBinContent(histPixelNumIsSeed[nHistNtuple]->GetXaxis()->FindBin(seedPixel)) > 3*averageBinContent) {
+// cout << "seed: " << seedPixel << endl;
+ continue;
+ }
histNtuple[nHistNtuple]->Fill(pixel[12]);
+// cout << histPixelNumIsSeed[nHistNtuple]->GetBinContent(seedPixel) << endl;
+
+
+
+
+
+
+
+
+
+
// histogram with the summed pixels
Double_t pixelSum = 0;
for (Int_t i=0; i<NUMPIXELS; i++){
histNtupleSum[nHistNtuple]->Fill(pixelSum);
// search for systematics in pixel distribution
- if (pixelSum > 100 && pixelSum < 150) {
- histPixelDistribution1[nHistNtuple]->Fill(frame);
+ if (true) {
+ histPixelDistribution1[nHistNtuple]->Fill(seedPixel);
}
- else if (pixelSum > 180 && pixelSum < 300) {
- histPixelDistribution2[nHistNtuple]->Fill(frame);
+ if (135 < pixelSum and pixelSum < 150) {
+ histPixelDistribution2[nHistNtuple]->Fill(seedPixel);
}
}
}
-
// determine maximum y-value
Float_t maxY = 0;
if (DRAW_SINGLE_HISTOGRAMS){
Float_t maxFitMax = 1000;
(*it)->Fit(fitFunc, "N,Q,W", "", 20, RIGHT_BOUNDARY);
- fitMax1 = fitFunc->GetParameter(1);
+ fitMax1 = fitFunc->GetMaximumX(0,RIGHT_BOUNDARY);
fitFunc->DrawCopy("same");
- (*it)->Fit(fitFunc, "N,Q,W", "", 20, fitMax1);
- fitMax2 = fitFunc->GetParameter(1);
+ (*it)->Fit(fitFunc, "N,Q,W", "", 20, fitMax1+10);
+ fitMax2 = fitFunc->GetMaximumX(0,RIGHT_BOUNDARY);
fitFunc->SetLineColor(kBlue);
fitFunc->SetLineStyle(2); // dashed
fitFunc->DrawCopy("same");
(*it)->Fit(fitFunc, "N,Q,W", "", fitMax1, RIGHT_BOUNDARY);
- fitMax3 = fitFunc->GetParameter(1);
+ fitMax3 = fitFunc->GetMaximumX(0,RIGHT_BOUNDARY);
fitFunc->SetLineColor(kGreen);
fitFunc->DrawCopy("same");
fitFunc->SetLineStyle(1); // normal for the following fits
+
+
+
+// cout << fitMax1 << "\t" << fitMax2 << "\t" << fitMax3 << "\t" << fitFunc->GetMaximumX(0,RIGHT_BOUNDARY) << endl;
+
+
+
+
// Sort the three fits and save error estimation
minFitMax = TMath::Min(TMath::Min(fitMax1,fitMax2),fitMax3);
maxFitMax = TMath::Max(TMath::Max(fitMax1,fitMax2),fitMax3);
cout << endl << runDetailsHeader;
for (UInt_t i=0; i<runDetails.size(); ++i){
// cout << runDetails[i] << Form("\t%.2f", fitMaxPosX[i]) << Form("\t%.2f", fitMaxPosXSum[i]) << endl;
- cout << runDetails[i] << (DRAW_SINGLE_HISTOGRAMS && DRAW_FITS ? Form("\t%.2f", fitMaxPosX[i]):"") << (DRAW_SINGLE_HISTOGRAMS && DRAW_FITS && TString(FIT_FUNC)=="landau" ? Form("\t%.2f", fitLandauErrorLeft[i]):"") << (DRAW_SINGLE_HISTOGRAMS && DRAW_FITS && TString(FIT_FUNC)=="landau" ? Form("\t%.2f", fitLandauErrorRight[i]):"") << (DRAW_SUMMED_HISTOGRAMS && DRAW_FITS ? Form("\t%.2f\t", fitMaxPosXSum[i]):"") << (DRAW_VETO_HISTOGRAMS && DRAW_FITS ? Form("\t%.2f", fitMaxPosXVeto[i]):"") << Form("\t%.2f", noiseMedian[i]) << Form("\t%.2f", noiseLowest17percent[i]) << Form("\t%.2f", noiseHighest17percent[i]) << Form("\t%.2f", fitMaxPosX[i]/noiseMedian[i]) /*S/N-ratio*/ << endl;
+ cout << runDetails[i]
+ << (DRAW_SINGLE_HISTOGRAMS && DRAW_FITS ? Form("\t%.2f", fitMaxPosX[i]):"")
+ << (DRAW_SINGLE_HISTOGRAMS && DRAW_FITS && TString(FIT_FUNC)=="landau" ? Form("\t%.2f", fitLandauErrorLeft[i]):"")
+ << (DRAW_SINGLE_HISTOGRAMS && DRAW_FITS && TString(FIT_FUNC)=="landau" ? Form("\t%.2f", fitLandauErrorRight[i]):"")
+ << (DRAW_SUMMED_HISTOGRAMS && DRAW_FITS ? Form("\t%.2f\t", fitMaxPosXSum[i]):"")
+ << (DRAW_VETO_HISTOGRAMS && DRAW_FITS ? Form("\t%.2f", fitMaxPosXVeto[i]):"")
+ << Form("\t%.2f", noiseMedian[i])
+ << Form("\t%.2f", noiseLowest17percent[i])
+ << Form("\t%.2f", noiseHighest17percent[i])
+ << (DRAW_SINGLE_HISTOGRAMS && DRAW_FITS && TString(FIT_FUNC)=="landau" ? Form("\t%.2f", fitMaxPosX[i]/noiseMedian[i]):"") /*S/N-ratio*/
+ << endl;
}
29103 6/24/2013 -20 -16.0 50000 6 Sr90 80 1.00E+13 1.53 y
29104 6/24/2013 -70 -54.5 50000 6 Sr90 64 1.00E+13 1.54 y
29105 6/24/2013 -70 -55.5 50000 6 Sr90 80 1.00E+13 1.53 y
+
+29106 2013-10-17 20 21.5 50000 1 Fe55,superdimmed 64 0.00E+00 3.20 y
+29107 2013-10-17 20 21.5 50000 1 Fe55,superdimmed 80 0.00E+00 3.12 y
+29108 2013-10-18 -20 -16.0 50000 1 Fe55,superdimmed 64 0.00E+00 3.19 y BULLSHIT (eingefroren)
+29109 2013-10-18 -20 -16.5 50000 1 Fe55,superdimmed 80 0.00E+00 3.12 y BULLSHIT (eingefroren)
+29110 2013-10-18 -70 -48.5 50000 1 Fe55,superdimmed 64 0.00E+00 3.18 y BULLSHIT (eingefroren)
+29111 2013-10-18 -70 21.5 50000 1 Fe55,superdimmed 80 0.00E+00 3.10 y BULLSHIT (eingefroren)
29022 5/16/2013 -70 -57.5 50000 1 none 64 0.00E+00 3.18 y
29023 5/16/2013 -70 -59.5 50000 1 none 80 0.00E+00 3.10 y
-29024 5/21/2013 20 21.5 50000 1 Sr-90 64 0.00E+00 3.20 y
-29025 5/21/2013 20 21.5 50000 1 Sr-90 80 0.00E+00 3.12 y
-29026 5/21/2013 -20 -14.0 50000 1 Sr-90 64 0.00E+00 3.19 y
-29027 5/21/2013 -20 -14.5 50000 1 Sr-90 80 0.00E+00 3.12 y
-29028 5/21/2013 -70 -53.5 50000 1 Sr-90 64 0.00E+00 3.18 y
-29029 5/21/2013 -70 -54.5 50000 1 Sr-90 80 0.00E+00 3.10 y
-
-29030 5/27/2013 20 21.0 50000 1 Fe55, dimmed 64 0.00E+00 3.20 y same as run 29012, but dimmed
-29031 5/27/2013 20 21.0 50000 1 Fe55, dimmed 80 0.00E+00 3.12 y same as run 29013, but dimmed
-29032 5/28/2013 -20 -16.5 50000 1 Fe55, dimmed 64 0.00E+00 3.19 y same as run 29014, but dimmed
-29033 5/28/2013 -20 -16.5 50000 1 Fe55, dimmed 80 0.00E+00 3.12 y same as run 29015, but dimmed
-
-
-29034 5/29/2013 20 21.5 50000 2 Fe55, dimmed 64 1.50E+05 3.15 y 19 … 21
-29035 5/29/2013 20 21.0 50000 2 Fe55, dimmed 80 1.50E+05 3.15 y
-29036 5/29/2013 -20 -16.0 50000 2 Fe55, dimmed 64 1.50E+05 3.15 y -12 … -19
-29037 5/30/2013 -20 -16.0 50000 2 Fe55, dimmed 80 1.50E+05 3.15 y
-29038 5/30/2013 -70 -57.0 50000 2 Fe55, dimmed 64 1.50E+05 3.15 y -30 … -60
-29039 5/30/2013 -70 -56.5 50000 2 Fe55, dimmed 80 1.50E+05 3.15 y
+29024 5/21/2013 20 21.5 50000 1 Sr90 64 0.00E+00 3.20 y
+29025 5/21/2013 20 21.5 50000 1 Sr90 80 0.00E+00 3.12 y
+29026 5/21/2013 -20 -14.0 50000 1 Sr90 64 0.00E+00 3.19 y
+29027 5/21/2013 -20 -14.5 50000 1 Sr90 80 0.00E+00 3.12 y
+29028 5/21/2013 -70 -53.5 50000 1 Sr90 64 0.00E+00 3.18 y
+29029 5/21/2013 -70 -54.5 50000 1 Sr90 80 0.00E+00 3.10 y
+
+29030 5/27/2013 20 21.0 50000 1 Fe55,dimmed 64 0.00E+00 3.20 y same as run 29012, but dimmed
+29031 5/27/2013 20 21.0 50000 1 Fe55,dimmed 80 0.00E+00 3.12 y same as run 29013, but dimmed
+29032 5/28/2013 -20 -16.5 50000 1 Fe55,dimmed 64 0.00E+00 3.19 y same as run 29014, but dimmed
+29033 5/28/2013 -20 -16.5 50000 1 Fe55,dimmed 80 0.00E+00 3.12 y same as run 29015, but dimmed
+
+
+29034 5/29/2013 20 21.5 50000 2 Fe55,dimmed 64 1.50E+05 3.15 y 19 … 21
+29035 5/29/2013 20 21.0 50000 2 Fe55,dimmed 80 1.50E+05 3.15 y
+29036 5/29/2013 -20 -16.0 50000 2 Fe55,dimmed 64 1.50E+05 3.15 y -12 … -19
+29037 5/30/2013 -20 -16.0 50000 2 Fe55,dimmed 80 1.50E+05 3.15 y
+29038 5/30/2013 -70 -57.0 50000 2 Fe55,dimmed 64 1.50E+05 3.15 y -30 … -60
+29039 5/30/2013 -70 -56.5 50000 2 Fe55,dimmed 80 1.50E+05 3.15 y
29040 5/28/2013 20 21.0 50000 2 none 64 1.50E+05 3.08 y
29041 5/28/2013 20 21.0 50000 2 none 80 1.50E+05 3.08 y
29044 5/29/2013 -70 -52.5 50000 2 none 64 1.50E+05 3.08 y
29045 5/29/2013 -70 -53.5 50000 2 none 80 1.50E+05 3.08 y
-29046 5/31/2013 20 21.6 50000 2 Sr-90 64 1.50E+05 3.15 y
-29047 5/31/2013 20 21.0 50000 2 Sr-90 80 1.50E+05 3.15 y
-29048 5/31/2013 -20 -15.5 50000 2 Sr-90 64 1.50E+05 3.15 y
-29049 6/2/2013 -20 -16.0 50000 2 Sr-90 80 1.50E+05 3.15 y
-29050 6/2/2013 -70 -54.5 50000 2 Sr-90 64 1.50E+05 3.15 y
-29051 6/2/2013 -70 -54.5 50000 2 Sr-90 80 1.50E+05 3.15 y
+29046 5/31/2013 20 21.6 50000 2 Sr90 64 1.50E+05 3.15 y
+29047 5/31/2013 20 21.0 50000 2 Sr90 80 1.50E+05 3.15 y
+29048 5/31/2013 -20 -15.5 50000 2 Sr90 64 1.50E+05 3.15 y
+29049 6/2/2013 -20 -16.0 50000 2 Sr90 80 1.50E+05 3.15 y
+29050 6/2/2013 -70 -54.5 50000 2 Sr90 64 1.50E+05 3.15 y
+29051 6/2/2013 -70 -54.5 50000 2 Sr90 80 1.50E+05 3.15 y
-29052 6/7/2013 20 21.0 50000 4 Fe55, dimmed 64 1.00E+12 1.52 y 19 … 21
-29053 6/7/2013 20 21.0 50000 4 Fe55, dimmed 80 1.00E+12 1.52 y
-29054 6/7/2013 -20 -15.5 50000 4 Fe55, dimmed 64 1.00E+12 1.52 y -12 … -19
-29055 6/7/2013 -20 -16.5 50000 4 Fe55, dimmed 80 1.00E+12 1.52 y
-29056 6/7/2013 -70 -58.0 50000 4 Fe55, dimmed 64 1.00E+12 1.52 y -30 … -60
-29057 6/7/2013 -70 -58.0 50000 4 Fe55, dimmed 80 1.00E+12 1.52 y
+29052 6/7/2013 20 21.0 50000 4 Fe55,dimmed 64 1.00E+12 1.52 y 19 … 21
+29053 6/7/2013 20 21.0 50000 4 Fe55,dimmed 80 1.00E+12 1.52 y
+29054 6/7/2013 -20 -15.5 50000 4 Fe55,dimmed 64 1.00E+12 1.52 y -12 … -19
+29055 6/7/2013 -20 -16.5 50000 4 Fe55,dimmed 80 1.00E+12 1.52 y
+29056 6/7/2013 -70 -58.0 50000 4 Fe55,dimmed 64 1.00E+12 1.52 y -30 … -60
+29057 6/7/2013 -70 -58.0 50000 4 Fe55,dimmed 80 1.00E+12 1.52 y
29058 6/6/2013 20 21.5 50000 4 none 64 1.00E+12 1.52 y
29059 6/6/2013 20 21.0 50000 4 none 80 1.00E+12 1.52 y
29062 6/6/2013 -70 -54.5 50000 4 none 64 1.00E+12 1.52 y
29063 6/6/2013 -70 -56.0 50000 4 none 80 1.00E+12 1.52 y
-29064 6/10/2013 20 22.0 50000 4 Sr-90 64 1.00E+12 1.52 y
-29065 6/10/2013 20 21.5 50000 4 Sr-90 80 1.00E+12 1.52 y
-29066 6/10/2013 -20 -13.5 50000 4 Sr-90 64 1.00E+12 1.52 y
-29067 6/10/2013 -20 -14.0 50000 4 Sr-90 80 1.00E+12 1.52 y
-29068 6/10/2013 -70 -53.0 50000 4 Sr-90 64 1.00E+12 1.52 y
-29069 6/10/2013 -70 -54.0 50000 4 Sr-90 80 1.00E+12 1.52 y
+29064 6/10/2013 20 22.0 50000 4 Sr90 64 1.00E+12 1.52 y
+29065 6/10/2013 20 21.5 50000 4 Sr90 80 1.00E+12 1.52 y
+29066 6/10/2013 -20 -13.5 50000 4 Sr90 64 1.00E+12 1.52 y
+29067 6/10/2013 -20 -14.0 50000 4 Sr90 80 1.00E+12 1.52 y
+29068 6/10/2013 -70 -53.0 50000 4 Sr90 64 1.00E+12 1.52 y
+29069 6/10/2013 -70 -54.0 50000 4 Sr90 80 1.00E+12 1.52 y
-29070 6/14/2013 20 21.5 50000 5 Fe55, dimmed 64 3.00E+12 1.57 y 19 … 21
-29071 6/14/2013 20 21.0 50000 5 Fe55, dimmed 80 3.00E+12 1.55 y
-29072 6/14/2013 -20 -16.0 50000 5 Fe55, dimmed 64 3.00E+12 1.57 y -12 … -19
-29073 6/14/2013 -20 -16.5 50000 5 Fe55, dimmed 80 3.00E+12 1.55 y
-29074 6/14/2013 -70 -58.5 50000 5 Fe55, dimmed 64 3.00E+12 1.57 y -30 … -60
-29075 6/14/2013 -70 -58.5 50000 5 Fe55, dimmed 80 3.00E+12 1.55 y
+29070 6/14/2013 20 21.5 50000 5 Fe55,dimmed 64 3.00E+12 1.57 y 19 … 21
+29071 6/14/2013 20 21.0 50000 5 Fe55,dimmed 80 3.00E+12 1.55 y
+29072 6/14/2013 -20 -16.0 50000 5 Fe55,dimmed 64 3.00E+12 1.57 y -12 … -19
+29073 6/14/2013 -20 -16.5 50000 5 Fe55,dimmed 80 3.00E+12 1.55 y
+29074 6/14/2013 -70 -58.5 50000 5 Fe55,dimmed 64 3.00E+12 1.57 y -30 … -60
+29075 6/14/2013 -70 -58.5 50000 5 Fe55,dimmed 80 3.00E+12 1.55 y
29076 6/13/2013 20 20.5 50000 5 none 64 3.00E+12 1.57 y
29077 6/13/2013 20 20.5 50000 5 none 80 3.00E+12 1.55 y
29080 6/13/2013 -70 -57.0 50000 5 none 64 3.00E+12 1.57 y
29081 6/13/2013 -70 -59.5 50000 5 none 80 3.00E+12 1.55 y
-29082 6/17/2013 20 21.5 50000 5 Sr-90 64 3.00E+12 1.57 y
-29083 6/17/2013 20 21.0 50000 5 Sr-90 80 3.00E+12 1.55 y
-29084 6/17/2013 -20 -14.0 50000 5 Sr-90 64 3.00E+12 1.57 y
-29085 6/17/2013 -20 -15.0 50000 5 Sr-90 80 3.00E+12 1.55 y
-29086 6/17/2013 -70 -54.0 50000 5 Sr-90 64 3.00E+12 1.57 y
-29087 6/17/2013 -70 -54.5 50000 5 Sr-90 80 3.00E+12 1.55 y
+29082 6/17/2013 20 21.5 50000 5 Sr90 64 3.00E+12 1.57 y
+29083 6/17/2013 20 21.0 50000 5 Sr90 80 3.00E+12 1.55 y
+29084 6/17/2013 -20 -14.0 50000 5 Sr90 64 3.00E+12 1.57 y
+29085 6/17/2013 -20 -15.0 50000 5 Sr90 80 3.00E+12 1.55 y
+29086 6/17/2013 -70 -54.0 50000 5 Sr90 64 3.00E+12 1.57 y
+29087 6/17/2013 -70 -54.5 50000 5 Sr90 80 3.00E+12 1.55 y
-29088 6/20/2013 20 21.0 50000 6 Fe55, dimmed 64 1.00E+13 1.54 y 19 … 21
-29089 6/20/2013 20 21.0 50000 6 Fe55, dimmed 80 1.00E+13 1.53 y
-29090 6/20/2013 -20 -16.5 50000 6 Fe55, dimmed 64 1.00E+13 1.54 y -12 … -19
-29091 6/20/2013 -20 -16.5 50000 6 Fe55, dimmed 80 1.00E+13 1.53 y
-29092 6/20/2013 -70 -58.5 50000 6 Fe55, dimmed 64 1.00E+13 1.54 y -30 … -60
-29093 6/20/2013 -70 -59.5 50000 6 Fe55, dimmed 80 1.00E+13 1.53 y
+29088 6/20/2013 20 21.0 50000 6 Fe55,dimmed 64 1.00E+13 1.54 y 19 … 21
+29089 6/20/2013 20 21.0 50000 6 Fe55,dimmed 80 1.00E+13 1.53 y
+29090 6/20/2013 -20 -16.5 50000 6 Fe55,dimmed 64 1.00E+13 1.54 y -12 … -19
+29091 6/20/2013 -20 -16.5 50000 6 Fe55,dimmed 80 1.00E+13 1.53 y
+29092 6/20/2013 -70 -58.5 50000 6 Fe55,dimmed 64 1.00E+13 1.54 y -30 … -60
+29093 6/20/2013 -70 -59.5 50000 6 Fe55,dimmed 80 1.00E+13 1.53 y
29094 6/18/2013 20 20.5 50000 6 none 64 1.00E+13 1.54 y
29095 6/18/2013 20 20.5 50000 6 none 80 1.00E+13 1.53 y
29098 6/19/2013 -70 -60.0 50000 6 none 64 1.00E+13 1.54 y
29099 6/19/2013 -70 -60.0 50000 6 none 80 1.00E+13 1.53 y
-29100 6/24/2013 20 21.0 50000 6 Sr-90 64 1.00E+13 1.54 y
-29101 6/24/2013 20 21.0 50000 6 Sr-90 80 1.00E+13 1.53 y
-29102 6/24/2013 -20 -15.0 50000 6 Sr-90 64 1.00E+13 1.54 y
-29103 6/24/2013 -20 -16.0 50000 6 Sr-90 80 1.00E+13 1.53 y
-29104 6/24/2013 -70 -54.5 50000 6 Sr-90 64 1.00E+13 1.54 y
-29105 6/24/2013 -70 -55.5 50000 6 Sr-90 80 1.00E+13 1.53 y
+29100 6/24/2013 20 21.0 50000 6 Sr90 64 1.00E+13 1.54 y
+29101 6/24/2013 20 21.0 50000 6 Sr90 80 1.00E+13 1.53 y
+29102 6/24/2013 -20 -15.0 50000 6 Sr90 64 1.00E+13 1.54 y
+29103 6/24/2013 -20 -16.0 50000 6 Sr90 80 1.00E+13 1.53 y
+29104 6/24/2013 -70 -54.5 50000 6 Sr90 64 1.00E+13 1.54 y
+29105 6/24/2013 -70 -55.5 50000 6 Sr90 80 1.00E+13 1.53 y
+ End of first measurement phase.
+
+29106 20 50000 1 Fe55,superdimmed 64 0.00E+00 3.20
+29107 20 50000 1 Fe55,superdimmed 80 0.00E+00 3.12
+29090 -20 50000 1 Fe55,superdimmed 64 0.00E+00 3.19
+29091 -20 50000 1 Fe55,superdimmed 80 0.00E+00 3.12
+29092 -70 50000 1 Fe55,superdimmed 64 0.00E+00 3.18
+29093 -70 50000 1 Fe55,superdimmed 80 0.00E+00 3.10
+
+29094 20 50000 2 Fe55,superdimmed 64 1.50E+05 3.15
+29095 20 50000 2 Fe55,superdimmed 80 1.50E+05 3.15
+29096 -20 50000 2 Fe55,superdimmed 64 1.50E+05 3.15
+29097 -20 50000 2 Fe55,superdimmed 80 1.50E+05 3.15
+29098 -70 50000 2 Fe55,superdimmed 64 1.50E+05 3.15
+29099 -70 50000 2 Fe55,superdimmed 80 1.50E+05 3.15
+
+29100 20 50000 4 Fe55,superdimmed 64 1.00E+12 1.52
+29101 20 50000 4 Fe55,superdimmed 80 1.00E+12 1.52
+29102 -20 50000 4 Fe55,superdimmed 64 1.00E+12 1.52
+29103 -20 50000 4 Fe55,superdimmed 80 1.00E+12 1.52
+29104 -70 50000 4 Fe55,superdimmed 64 1.00E+12 1.52
+29105 -70 50000 4 Fe55,superdimmed 80 1.00E+12 1.52
+
+29106 20 50000 5 Fe55,superdimmed 64 3.00E+12 1.57
+29107 20 50000 5 Fe55,superdimmed 80 3.00E+12 1.55
+29108 -20 50000 5 Fe55,superdimmed 64 3.00E+12 1.57
+29109 -20 50000 5 Fe55,superdimmed 80 3.00E+12 1.55
+29110 -70 50000 5 Fe55,superdimmed 64 3.00E+12 1.57
+29111 -70 50000 5 Fe55,superdimmed 80 3.00E+12 1.55
+
+29112 20 50000 6 Fe55,superdimmed 64 1.00E+13 1.54
+29113 20 50000 6 Fe55,superdimmed 80 1.00E+13 1.53
+29114 -20 50000 6 Fe55,superdimmed 64 1.00E+13 1.54
+29115 -20 50000 6 Fe55,superdimmed 80 1.00E+13 1.53
+29116 -70 50000 6 Fe55,superdimmed 64 1.00E+13 1.54
+29117 -70 50000 6 Fe55,superdimmed 80 1.00E+13 1.53
delete[] fNoise;
delete[] fPedestals;
+// delete[] hint1;
+// delete[] hint2;
+
};
//####################################################################
for(int column=0; column<fColumns; column++ )
{
// CommonModeInRow += fCdsmatrix[ row*fColumns+column ];
- Arr[column] = fCdsmatrix[ row*fColumns+column ];
+// Arr[column] = fCdsmatrix[ row*fColumns+column ] - fPedestals[ row*fColumns+column ];
+ Arr[column] = fCdsmatrix[ row*fColumns+column ] - fPedestals[ row*fColumns+column ]; // Bugfix: Considered pedestals in common mode calculation
}
// CommonModeInRow = CommonModeInRow/fColumns;
#define COLMATRIX 7
#define COLDONE 10
-#define LABORBUCH "LaborbuchMi29.csv"
+#define LABORBUCH "RelevantRuns.csv"
#define INPUTDATAPATH "/jspc12_F/Mi29/"
#define OUTPUTDATAPATH_MAINFOLDER "/local/sstrohauer/data/"
now = localtime(×tamp);
std::stringstream timeSS;
timeSS << now->tm_mday << '.' << now->tm_mon+1 << '.' << now->tm_year+1900 << "_" << now->tm_hour << ':' << now->tm_min;
- cout << timeSS.str() << endl;
std::string logfileName = "logfile_" + timeSS.str() + ".txt";
+ cout << "logfile-name: " << logfileName << endl;
logfile.open(logfileName, std::ios::trunc);
logfile << "This is a log file which lists all processed entries in the lab book.\n\n";
logfile << "runNo\tmatrix\tsubmtrx\tcomment\n";
std::string outputDataPath = std::string(OUTPUTDATAPATH_MAINFOLDER) + "data_" + timeSS.str() + "/";
- mkdir(outputDataPath.c_str(), 0755); // create directory for this evaluation if not existent
+ cout << "Working directory: " << outputDataPath << endl;
+ Int_t mkdirReturnValue = mkdir(outputDataPath.c_str(), 0755);
+ if (mkdirReturnValue != 0) {
+ cout << "Can not create directory (mkdir returns " << mkdirReturnValue << ")! Possible error source: No disk space available or directory already existent.\n"; // create directory for this evaluation if not existent and raise error if directory is full
+ return;
+ }
// 1. case: Process one single run, chosen by the user while calling main()
if (processRunNo != -1){
file >> row; // read first row (header) of the laboratory book
- if (firstNoiseSecondRun == 0){
+ if (firstNoiseSecondRun == 0 && useSeperateNoiseRun){
cout << "=====================================================================\n";
cout << "=====================================================================\n";
cout << "First: Analyzing only runs WITH NO source (for noise)...\n";
}
- else{
+ else if (useSeperateNoiseRun) {
cout << "=====================================================================\n";
cout << "=====================================================================\n";
cout << "Second: Analyzing only runs WITH source...\n";
}
+ else if (firstNoiseSecondRun == 0 && !useSeperateNoiseRun){
+ cout << "=====================================================================\n";
+ cout << "=====================================================================\n";
+ cout << "Analyzing run with previous noise calculation of the same file...\n";
+ }
+ else {
+ cout << "=====================================================================\n";
+ cout << "=====================================================================\n";
+ cout << "Finished after first loop.\n";
+ break;
+ }
while(file >> row) { // for each row
try {
}
analyzeRun(INPUTDATAPATH, outputDataPath.c_str(), runNo, matrixAB, true, false, noiseRunNo, overwrite, logfileName);
}
+ else if (!useSeperateNoiseRun && firstNoiseSecondRun == 0) {
+ mkdir((outputDataPath + std::to_string(runNo) +"/").c_str(), 0755); // create directory if not existent
+ mkdir((outputDataPath + std::string("noise/")).c_str(), 0755); // create directory if not existent
+ mkdir((outputDataPath + std::string("noise/") + std::to_string(runNo) + "/").c_str(), 0755); // create directory if not existent
+ // use same run for calculating noise
+ analyzeRun(INPUTDATAPATH, outputDataPath.c_str(), runNo, matrixAB, false, false, -1, overwrite, logfileName); // noise & run
+ }
else {
cout << "==> skipped in " << firstNoiseSecondRun+1 << ". step (currently processing " << ((firstNoiseSecondRun == 0) ? "noise)":"runs)") << endl;
}
for(int column=0; column<fColumns; column++ )
{
// CommonModeInRow += fCdsmatrix[ row*fColumns+column ];
- Arr[column] = fCdsmatrix[ row*fColumns+column ];
+ Arr[column] = fCdsmatrix[ row*fColumns+column ] - fPedestals[ row*fColumns+column ]; // Bugfix: Considered pedestals in common mode calculation
}
// CommonModeInRow = CommonModeInRow/fColumns;