]> jspc29.x-matter.uni-frankfurt.de Git - radhard.git/commitdiff
Fixed bugs: Correction of common mode calculation in MAPS.C. Added some
authorStefan Strohauer <sstrohauer@jspc31.x-matter.uni-frankfurt.de>
Mon, 28 Oct 2013 12:11:24 +0000 (13:11 +0100)
committerStefan Strohauer <sstrohauer@jspc31.x-matter.uni-frankfurt.de>
Mon, 28 Oct 2013 12:11:24 +0000 (13:11 +0100)
minor changes in PlotGraph.C and ProcessMeasurements.C

PlotGraph/PlotGraph.C
PlotGraph/RelevantRuns.csv
ProcessMeasurements/LaborbuchMi29.csv
ProcessMeasurements/LaborbuchMi29.xls
ProcessMeasurements/MAPS.C
ProcessMeasurements/ProcessMeasurements.C
newCOMBI/MAPS.C

index 1f1c75ad2c2f73b89199636832a0a5e0d2bce448..91869d577b9f7842d57a3fc5827f90592413c6cf 100644 (file)
 #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)
@@ -76,6 +79,7 @@ void PlotGraph(Float_t selTemp, Int_t selChip, std::string selSource, Int_t selM
   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;
@@ -135,6 +139,19 @@ void PlotGraph(Float_t selTemp, Int_t selChip, std::string selSource, Int_t selM
          
          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);
@@ -170,14 +187,44 @@ void PlotGraph(Float_t selTemp, Int_t selChip, std::string selSource, Int_t selM
          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);
            
@@ -187,9 +234,31 @@ void PlotGraph(Float_t selTemp, Int_t selChip, std::string selSource, Int_t selM
 //           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++){
@@ -198,11 +267,11 @@ void PlotGraph(Float_t selTemp, Int_t selChip, std::string selSource, Int_t selM
            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);
            }
            
            
@@ -362,7 +431,6 @@ void PlotGraph(Float_t selTemp, Int_t selChip, std::string selSource, Int_t selM
     }
   }
 
-
   // determine maximum y-value
   Float_t maxY = 0;
   if (DRAW_SINGLE_HISTOGRAMS){
@@ -422,19 +490,27 @@ void PlotGraph(Float_t selTemp, Int_t selChip, std::string selSource, Int_t selM
          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);
@@ -522,7 +598,17 @@ void PlotGraph(Float_t selTemp, Int_t selChip, std::string selSource, Int_t selM
     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;
   }
   
   
index 0a85b9aa941fd6ecdcec54f907d0a5666b793aae..953f234f234238780f7a542f39d10ca826ed5b9e 100644 (file)
@@ -112,3 +112,10 @@ Runnr.     Date    Temperature     T-sensor        Events  Chip    Source  64/80   Radiation dose  Vbo     Don
 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)
index 72da025c620dca37bf20d4f57a5c4911f2c20a98..6b9b508fe953432d3210357493f7671a590942ae 100644 (file)
@@ -19,25 +19,25 @@ Runnr.      Date    Temperature     T-sensor        Events  Chip    Source  64/80   Radiation dose  Vbo     Don
 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               
@@ -46,20 +46,20 @@ Runnr.      Date    Temperature     T-sensor        Events  Chip    Source  64/80   Radiation dose  Vbo     Don
 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               
@@ -68,20 +68,20 @@ Runnr.      Date    Temperature     T-sensor        Events  Chip    Source  64/80   Radiation dose  Vbo     Don
 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               
@@ -90,20 +90,20 @@ Runnr.      Date    Temperature     T-sensor        Events  Chip    Source  64/80   Radiation dose  Vbo     Don
 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               
@@ -112,9 +112,45 @@ Runnr.     Date    Temperature     T-sensor        Events  Chip    Source  64/80   Radiation dose  Vbo     Don
 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                    
index 15ead53c830d735a034945e043c038fd6ad89b92..3c5f8fe470334555ca00dab54ab8e2721d9212ea 100755 (executable)
Binary files a/ProcessMeasurements/LaborbuchMi29.xls and b/ProcessMeasurements/LaborbuchMi29.xls differ
index f485ce540573a870b252859d7b51c76bfbe719d1..a47bb353749eb29726a2df70f30df64e73ea82bd 100644 (file)
@@ -237,6 +237,9 @@ MAPS::~MAPS(void) {
        delete[] fNoise;
        delete[] fPedestals;
        
+//     delete[] hint1;
+//     delete[] hint2;
+       
 };
 
 //####################################################################
@@ -317,7 +320,8 @@ void MAPS::filterCommonMode() {
     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;
index 4fdb7182d4672e48058094c90e7b25e727a7d161..81efa4cfaa567bb9dc7b0ee30b08e5276d439dd7 100644 (file)
@@ -20,7 +20,7 @@
 #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/"
 
@@ -54,9 +54,9 @@ void ProcessMeasurements(Bool_t overwrite = false, Bool_t useSeperateNoiseRun =
   now = localtime(&timestamp);
   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";
@@ -65,7 +65,12 @@ void ProcessMeasurements(Bool_t overwrite = false, Bool_t useSeperateNoiseRun =
   
   
   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){
@@ -93,16 +98,27 @@ void ProcessMeasurements(Bool_t overwrite = false, Bool_t useSeperateNoiseRun =
     
     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 {
@@ -155,6 +171,13 @@ void ProcessMeasurements(Bool_t overwrite = false, Bool_t useSeperateNoiseRun =
          }
          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; 
        }
index 396d29657021be625f0c5e6ff20fa0898bba2697..c95280c3a253588762c4943db5d7dea2e2a2c8ad 100755 (executable)
@@ -781,7 +781,7 @@ void MAPS::filterCommonMode() {
                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;