]> jspc29.x-matter.uni-frankfurt.de Git - radhard.git/commitdiff
Analyzer: More piyels for anaylsis in Pipper2, Bugfix RTS
authorBenjamin Linnik <blinnik@jspc61.x-matter.uni-frankfurt.de>
Tue, 20 Dec 2016 15:14:53 +0000 (16:14 +0100)
committerBenjamin Linnik <blinnik@jspc61.x-matter.uni-frankfurt.de>
Tue, 20 Dec 2016 15:14:53 +0000 (16:14 +0100)
MABS_run_analyzer/ChargeSpektrum.c
MABS_run_analyzer/ChargeSpektrumFunctions.c
MABS_run_analyzer/MAPS.c
MABS_run_analyzer/Run.c

index fbfb76fe70b0ef57caf2a8d3de326ee8c11180f2..70f31f7a49a37d46598b32913631c4ba644c826c 100644 (file)
@@ -63,7 +63,7 @@ void ChargeSpektrum(TString runnumber = "")
                 //runs[runi]->setNoisethresholdborderADU(30);
 
 //                                 runs[runi]->analyzeFrame(6384);
-//                 runs[runi]->analyzeFrame(6604);
+//                 runs[runi]->analyzeFrame(6605);
 //                 runs[runi]->analyzeFrame(675);
 //                 runs[runi]->analyzeFrame(680);
 //                 runs[runi]->analyzeFrame(685);
@@ -104,13 +104,15 @@ void ChargeSpektrum(TString runnumber = "")
 //                     compareHistogramClassVector.push_back(runs[runi]->histogramwoRTS->normalized);
 //                     compareHistogramClassVector2.push_back(runs[runi]->histogramwoRTS);
                     compareHistogramClassVector.push_back(runs[runi]->histogram->normalized);
+                    compareHistogramClassVector2.push_back(runs[runi]->histogramwoRTS->normalized);
+                    runs[runi]->plot1DHistogram(runs[runi]->histogram, runs[runi]->histogramwoRTS->pixeltimefired, "", 0);
                      //compareHistogramClassVector.push_back(runs[runi]->histogramwoRTS);
 //                     compareHistogramClassVector2.push_back(runs[runi]->histogramthreshold);
                      //compareHistogramVector.push_back(runs[runi]->histogram->normalized->calibrated->Seed);
                      //compareHistogramVector2.push_back(runs[runi]->histogram->normalized->Seed);
                     //runs[runi]->plot1DHistogram(runs[runi]->histogram->normalized->calibrated, runs[runi]->histogram->normalized->calibrated->Seed, "landau", 1);
 //                     runs[runi]->plot1DHistogram(runs[runi]->histogramwoRTS->normalized->calibrated, runs[runi]->histogramwoRTS->normalized->calibrated->Seed, "landau", true);
-                     runs[runi]->plot1DHistogram(runs[runi]->histogram->normalized, runs[runi]->histogram->normalized->Seed, "gaus", true);
+//                     runs[runi]->plot1DHistogram(runs[runi]->histogramwoRTS->normalized->calibrated, runs[runi]->histogramwoRTS->normalized->calibrated->Sum, "gaus", true);
                     
 // //                     Uncomment below to do analysis without RTS pixel
 //                     compareHistogramClassVector2.push_back(runs[runi]->histogramwoRTSthreshold);
index 1999399f9edb66421383e07f372b7b4fa7c98d7e..5a283b6ca11d4a6d26ecf0906fc2dca0211a9482 100644 (file)
@@ -705,10 +705,8 @@ Bool_t plotAllRuns(vector<HistogramType*>* ptCompareHistogramClassVector)
             gPad->SetGridy(1);
             owntitle->Clear();
             if (headerStringsVector.size() > 0) {
-                cout << colorred << "Hallo1" << endlr;
                 owntitle->AddText(Form("%s, %s",trimRunnumberAtBegin(curhistogramclone->GetName()).Data(), headerStringsVector.at(1).Data()));
                 owntitle->AddText(headerStringsVector.at(2));
-                cout << colorred << "Hallo2" << endlr;
             }
             owntitle->Draw("SAME");
             
@@ -879,7 +877,6 @@ Bool_t FindGoodTitle(vector<HistogramType*>* ptCompareHistogramClassVector) {
             same_ChipGen = kFALSE;           
         if (!curlabbook.matrix.EqualTo(firstlabbook.matrix)) {
             same_Matrix = kFALSE;    
-            cout << colorred << "Not same matrix: " << curlabbook.matrix << " != " << firstlabbook.matrix << endlr;
         }
         if (firstlabbook.tempSens > 0) { // allow 10 % difference
             if (curlabbook.tempSens > firstlabbook.tempSens*1.1 || curlabbook.tempSens < firstlabbook.tempSens*0.9)
index abe296dfbb5f5372a8fe4e443c26c1a69168f502..7cca3ae6bf550ce454172b3692d2840ed78220ef 100644 (file)
@@ -1508,22 +1508,24 @@ void MAPS::hitana() {
                 }
             }
             
-//             if ( B < 10) CHANCE=0; // TODO remove me, buggy column 3 in Mi19, triing to ommit dirty?
-                
-            
-            
             
             //Begin: loop evaluate true seeds:
             if(CHANCE==100)
             {
                 if(fOrderCode=="FSBB")
+                {
+                    if (B < 2 || B > fColumns-3 || A < 1 || A > fRows-2)
+                        bordercluster = true;
+                    else
+                        bordercluster = false;
+                } else if(fOrderCode=="Pipper2") // collects very efficient in one seed
                 {
                     if (B < 2 || B > fColumns-3 || A < 1 || A > fRows-2)
                         bordercluster = true;
                     else
                         bordercluster = false;
                 }
-                else //if not FSBB
+                else //if not FSBB or Pipper2
                 {
                     if (B < 2 || B > fColumns-3 || A < 2 || A > fRows-3)
                         bordercluster = true;
@@ -1534,9 +1536,9 @@ void MAPS::hitana() {
                 {
                     for(Int_t column=0; column<5; column++)
                     {
-                        if          ( (row==0) && (A<2) )                   { }
-                        else if     ( (row==1) && (A<1) )                   { }
-                        else if     ( (row==3) && (A>= (fRows-1)) )         { }
+                        if          ( (row==0) && (A<2) )                   { } // A is the global position of the HIT on the sensor
+                        else if     ( (row==1) && (A<1) )                   { } // this procedure is to make sure, that cluster elements which are NOT part of the whole sensor
+                        else if     ( (row==3) && (A>= (fRows-1)) )         { } // will not crash the program, as these areas DO NOT exist (physically). 
                         else if     ( (row==4) && (A>= (fRows-2)) )         { }
                         else
                         {
@@ -1557,7 +1559,7 @@ void MAPS::hitana() {
                       
                 if (bordercluster)
                     fHittedPixel[Hitlist[hit]] = -2;
-                else
+                else // the hit was NOT on the border of the sensor
                 {
                     fHittedPixel[Hitlist[hit]] = 2;
                     
index 6e2380c5d8ddab965a4f1286ec3b87a2d3afcb30..714d5ee8d8d089a5865947a248f3e615c9957ab0 100644 (file)
@@ -446,10 +446,10 @@ Bool_t Run::analyzeRun(Bool_t force)
         for (vector<HistogramType*>::iterator curHistogramClass = HistogramClassVector.begin(); curHistogramClass != HistogramClassVector.end(); curHistogramClass++)  {
             cout << "Processing histograms in class: <" << colorwhite << (*curHistogramClass)->histogramdescription << colorreset << " >" << endlr;
             if ((*curHistogramClass)->maskRTSpixel) {
-                if (labbook.chipGen=="Mi19") {
+//                 if (labbook.chipGen=="Mi19") {
                     cout << colorwhite << " FindRTSPixelToMask():" << endlr;
                     FindRTSPixelToMask(*curHistogramClass);
-                }
+//                 }
             }
         }
         cout << "--------------------------------------------" << endl;
@@ -535,7 +535,7 @@ Bool_t Run::FindRTSPixelToMask(HistogramType* HistogramTypepointer)
 //             HistogramTypepointer->pixeltimefiredsorted->Fill(2000);
         }
     }   
-    TH1F* pixeltimefiredWithOverflow = ShowOverflow(HistogramTypepointer->pixeltimefiredsorted);
+//     TH1F* pixeltimefiredWithOverflow = ShowOverflow(HistogramTypepointer->pixeltimefiredsorted);
     
 //     Double_t const probabilities[] = {1-erf(HistogramTypepointer->RTSthreshold/sqrt(2)), 0.5, erf(HistogramTypepointer->RTSthreshold/sqrt(2))}; // sigma/2 from gaus to the left and to the right //{0.17, 0.5, 1-0.17};     
 //     HistogramTypepointer->pixeltimefiredsorted->GetQuantiles( 3, leakagequantiles, probabilities);
@@ -975,8 +975,8 @@ void Run::updateDatabase() {
     if (histogramthreshold->normalized->calibrated != 0)
 //         if (histogramthreshold->normalized->calibrated->avgNoiseMinus < 100)
             constructUpdateString(&sqlupdatequery, "Avg.Noise-", histogramthreshold->normalized->calibrated->avgNoiseMinus, 2);
-    constructUpdateString(&sqlupdatequery, "CCE_1",      histogram->normalized->CCE_in_Perc_1); // because histogramthreshold didn't work well with Pipper2.... why?'
-    constructUpdateString(&sqlupdatequery, "CCE_25",     histogram->normalized->CCE_in_Perc_25);
+    constructUpdateString(&sqlupdatequery, "CCE_1",      histogramthreshold->normalized->CCE_in_Perc_1);
+    constructUpdateString(&sqlupdatequery, "CCE_25",     histogramthreshold->normalized->CCE_in_Perc_25);
     constructUpdateString(&sqlupdatequery, "StoN",     histogramthreshold->normalized->StoN, 3);
 //     if (histogramthreshold->normalized->avgNoise < 100)
         constructUpdateString(&sqlupdatequery, "Avg.NoiseADC",  histogramthreshold->normalized->avgNoise);
@@ -2110,6 +2110,7 @@ TCanvas* Run::plot1DHistogram(HistogramType* HistogramTypepointer, TH1F* onehist
         if (withOverflow)
             onehistogram=ShowOverflow(onehistogram);
         onehistogram->Draw();
+        
         Double_t* parameters = (Double_t *)calloc(10, sizeof(Double_t)); // allocate 10 parameters for safety, maximum 9 used at the moment     
         Float_t maxValue = 0;
         if (fitFuncType!="")