]> jspc29.x-matter.uni-frankfurt.de Git - radhard.git/commitdiff
Run analyzer: added a suffix to runcode and humanreadable string, is set automaticall...
authorBenjamin Linnik <blinnik@jspc28.x-matter.uni-frankfurt.de>
Tue, 1 Sep 2015 14:33:01 +0000 (16:33 +0200)
committerBenjamin Linnik <blinnik@jspc28.x-matter.uni-frankfurt.de>
Tue, 1 Sep 2015 14:33:01 +0000 (16:33 +0200)
MABS_run_analyzer/Run.c
MABS_run_analyzer/Run.h

index 05b30f6faa3958d751cb16b6b8257fbac50ebe2c..536be77eaaebb534fa6476b7bb10d08903a90a4e 100644 (file)
@@ -492,6 +492,7 @@ Bool_t Run::generateReadableRunCode()
     else
         runcode+= Form("Rn0%.0f",labbook.radDoseNonIon);
     runcode+= labbook.matrix;
+    runcode+= runcodesuffix;
     if (labbook.resistivity > 0)
         runcode+= Form("HR%d",labbook.resistivity);
     string tempstring = labbook.source.Data();  
@@ -591,20 +592,31 @@ void Run::setMatrixSpecificParameters()
 }
 
 
-void Run::setSubMatrixBorders(u_int x_start, u_int x_end, u_int y_start, u_int y_end)
+void Run::setSubMatrixBorders(u_int x_start, u_int x_end, u_int y_start, u_int y_end, Bool_t addtoruncodesuffix)
 {    
     submatrix_x_start = x_start;
     submatrix_x_end = x_end;
     submatrix_y_start = y_start;
     submatrix_y_end = y_end;
+    if (addtoruncodesuffix)
+    {
+        runcodesuffix += Form("_row%u-%u_colu%u-%u_", x_start, x_end, y_start, y_end);
+        humanreadablesuffix += Form("Row: %u - %u, Column: %u - %u, ", x_start, x_end, y_start, y_end);
+    }
 }
 
 void Run::selectSubMatrixFSBB(TString matrixname)
 {    
-    if (matrixname.EqualTo("A0"))
-        setSubMatrixBorders(0, sensorinfocur.columns, 0, sensorinfocur.rows/2-2);
-    else if (matrixname.EqualTo("A1"))
-        setSubMatrixBorders(0, sensorinfocur.columns, sensorinfocur.rows/2+2, sensorinfocur.rows);   
+    if (matrixname.EqualTo("A0"))    {
+        setSubMatrixBorders(0, sensorinfocur.columns, 0, sensorinfocur.rows/2-2, false);
+        runcodesuffix += "_A0_";
+        humanreadablesuffix += "A0, ";
+    }
+    else if (matrixname.EqualTo("A1")) {
+        setSubMatrixBorders(0, sensorinfocur.columns, sensorinfocur.rows/2+2, sensorinfocur.rows, false);   
+        runcodesuffix += "_A1_";
+        humanreadablesuffix += "A1, ";
+    }
     else
         cout << colorred << "Error in selectSubMatrixFSBB(), given submatrix with name: " << matrixname << " not known. " << endlr;
 }
@@ -1877,7 +1889,8 @@ void Run::initHistograms(histogramstruct* histogramstructpointer, TString suffix
     initHistogram(histogramstructpointer->Veto, "Veto" + suffix);
     
     TString prefix = "Noise" + suffix;
-    TString humanreadablestr = Form("%s, %s spectrum, %s, chip %s, %s, T=%.1f",prefix.Data(), labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), labbook.temp);
+    
+    TString humanreadablestr = Form("%s, %s spectrum, %s, chip %s, %s, %sT=%.1f",prefix.Data(), labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), humanreadablesuffix.Data(), labbook.temp);
     if (suffix.Contains("threshold"))
     {
         histogramstructpointer->thresholdcluster = 1;
@@ -1900,7 +1913,7 @@ void Run::initHistograms(histogramstruct* histogramstructpointer, TString suffix
 
 void Run::initHistogram(TH1F* &histogrampointer, TString prefix)
 {
-    TString humanreadablestr = Form("%s, %s spectrum, %s, chip %s, %s, T=%.1f",prefix.Data(), labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), labbook.temp);
+    TString humanreadablestr = Form("%s, %s spectrum, %s, chip %s, %s, %sT=%.1f",prefix.Data(), labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), humanreadablesuffix.Data(), labbook.temp);
     histogrampointer=new TH1F(prefix.Data(), humanreadablestr.Data(), systemparamcur.nbins, 0, systemparamcur.maxbin);  
     histogrampointer->SetLineStyle(rootlinestyle[plotStyle]);
     histogrampointer->SetLineColor(rootcolors[plotStyle]);
@@ -1932,7 +1945,7 @@ void Run::initClusters(Float_t xcoord_min_step, Float_t xcoord_abs_min, Float_t
 void Run::initCluster(histogramstruct* histogramstructpointer, TString suffix, Float_t xcoord_min_step, Float_t xcoord_abs_min, Float_t xcoord_abs_max, Float_t ycoord_min_step, Float_t ycoord_abs_min, Float_t ycoord_abs_max)
 {    
     TString prefix = "Cluster" + suffix;
-    TString humanreadablestr = Form("%s, %s cluster, %s, chip %s, %s, T=%.1f",prefix.Data(), labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), labbook.temp);
+    TString humanreadablestr = Form("%s, %s cluster, %s, chip %s, %s %sT=%.1f",prefix.Data(), labbook.source.Data(), labbook.chipGen.Data(), labbook.chip.Data(), labbook.matrix.Data(), humanreadablesuffix.Data(), labbook.temp);
     Int_t sizearrrotx= (int)((xcoord_abs_max-xcoord_abs_min)/xcoord_min_step+0.5);
     Int_t sizearrroty = (int)((ycoord_abs_max-ycoord_abs_min)/ycoord_min_step+0.5);
 //     cout << "xcoord_abs_min: " << xcoord_abs_min << ", xcoord_abs_max: " << xcoord_abs_max << ", xcoord_min_step: " << xcoord_min_step << endl;
index d6d92ba97103c6576a8631ecf533ec16c4da1084..590248d68470e8686acc15688aac2d364953307e 100644 (file)
@@ -479,7 +479,7 @@ public:
     void setSystemSpecificParameters();
     
     /** @brief sets boundaries for submatrix analysis, sets #Run::submatrix_x_start, #Run::submatrix_x_end, #Run::submatrix_y_start and #Run::submatrix_y_end to default values to given values */
-    void setSubMatrixBorders(u_int x_start, u_int x_end, u_int y_start, u_int y_end);
+    void setSubMatrixBorders(u_int x_start, u_int x_end, u_int y_start, u_int y_end, Bool_t addtoruncodesuffix=true);
     
     /** @brief calls #Run::setSubMatrixBorders() with the correct boundaries for FSBB submatrix A0 or A1 */
     void selectSubMatrixFSBB(TString matrixname);
@@ -609,10 +609,15 @@ public:
     Double_t sr90IntegralVal = -1;
     Double_t sr90IntegralErr = -1;
     
-    
-    /// specific string wich encodes the database information of the run
+    /** @brief specific string wich encodes the database information of the run */
     TString runcode="";
     
+    /** @brief other information to include in the #Run::runcode, not set automatically or gathered by the database  */
+    TString runcodesuffix="";
+    
+    /** @brief other information to include in the #Run::humanreadable, not set automatically or gathered by the database  */
+    TString humanreadablesuffix="";
+    
     /** @brief Converting string to numbers */
     Float_t stringToNumber ( string );