]> jspc29.x-matter.uni-frankfurt.de Git - radhard.git/commitdiff
Run analyzer: Added option to switch common mode filter on and off, default value...
authorBenjamin Linnik <blinnik@jspc28.x-matter.uni-frankfurt.de>
Tue, 8 Sep 2015 21:30:17 +0000 (23:30 +0200)
committerBenjamin Linnik <blinnik@jspc28.x-matter.uni-frankfurt.de>
Tue, 8 Sep 2015 21:30:17 +0000 (23:30 +0200)
MABS_run_analyzer/MAPS.c
MABS_run_analyzer/Run.c
MABS_run_analyzer/Run.h

index d0e949630bccf8d35f770142385b9dc149bf06a0..225eb524f8a858dd2c5af761c6e54f522c255fcd 100644 (file)
@@ -1767,6 +1767,7 @@ void MAPS::plotFrame(Int_t FrameNumber) {
         {
                        cdsmatrixCorrPed[i]=(float)(1.*fCdsmatrix[i]-fPedestals[i]);
                }
+               cout<<"CDS matrix minus pedestals:"<<endl;
                debugStream<>(cdsmatrixCorrPed, fPixels, fColumns, 0, 10);
                // cout<<fCdsmatrix[0]<<","<<fCdsmatrix[1]<<","<<fCdsmatrix[2]<<","<<fCdsmatrix[3]<<","<<fCdsmatrix[4]<<","<<fCdsmatrix[5]<<","<<fCdsmatrix[6]<<endl;
         cout<<"Hitted pixel discriminator matrix:"<<endl;
index f6d6d8763f2d9d8fede283dddf8b9ad0c39ada74..986a9bfdeec7e322b682987ce4e61c9fc7b1261e 100644 (file)
@@ -207,6 +207,13 @@ Bool_t Run::useDynamicalNoise(Bool_t var)
     return 0;
 }    
 
+Bool_t Run::useCommonModeFilter(Bool_t var)
+{
+    cout<<" Common mode filter    : " << colorwhite << (var?"1":"0") << colorreset << "  <-- only used if RAW files are analyzed, force analysis to make sure" << endl;    
+    commonModeFilter = var;
+    return 0;
+}   
+
 Bool_t Run::setResultsPath(TString path)
 {
     cout << "Changing save directory to '" << path << "'" << endl;
@@ -273,7 +280,8 @@ Bool_t Run::analyzeRun(Bool_t force)
             {
 //                 cout << "getframe " << i << endl;
                 processed->getFrame(i);
-               //                 processed->filterCommonMode();
+                if (commonModeFilter)
+                    processed->filterCommonMode();
 //                     cout << "hitana " << i << endl;
                 processed->hitana();
 //                 cout << "regetDynNoise " << endl;
@@ -444,7 +452,8 @@ Bool_t Run::analyzeFrame(Int_t frame)
         {
             processed->InitialDynNoise(100);
             processed->getFrame(frame);
-            // processed->filterCommonMode();
+            if (commonModeFilter)
+                processed->filterCommonMode();
             processed->hitana();
             processed->plotFrame(frame);
             delete processed;
index 590248d68470e8686acc15688aac2d364953307e..bb3a74fc71dc17471c3d961738a2fbf77eed8f4e 100644 (file)
@@ -300,7 +300,10 @@ private:
     
     void initRootParameters();
     
+    /** @brief set this variable to true, to use the dynamical noise calculation in MAPS:analyzeRun() */
     Bool_t dynamicalNoise = 1;
+    /** @brief set this variable to true, to use the common mode noise filter in MAPS:analyzeRun() */
+    Bool_t commonModeFilter = 1;
     
     const TString colorwhite = "\033[1;29m";
     const TString colorred = "\033[1;31m";
@@ -393,6 +396,9 @@ public:
     
     /** @brief Turn on or off the use of dynamical noise adjustment @c MAPS::regetDynNoise() */
     Bool_t useDynamicalNoise(Bool_t);
+    
+    /** @brief Turn on or off the use of common mode noise filter @c MAPS::regetDynNoise() */
+    Bool_t useCommonModeFilter(Bool_t);
             
     /**
      * @brief set pathwhere images and data to save to