]> jspc29.x-matter.uni-frankfurt.de Git - radhard.git/commitdiff
Analyzer: Added new anaylsis type 'signal'. MAPS object not deleted after analysis...
authorBenjamin Linnik <blinnik@jspc61.x-matter.uni-frankfurt.de>
Mon, 30 Oct 2017 16:33:32 +0000 (17:33 +0100)
committerBenjamin Linnik <blinnik@jspc61.x-matter.uni-frankfurt.de>
Mon, 30 Oct 2017 16:33:32 +0000 (17:33 +0100)
MABS_run_analyzer/ChargeSpektrum.c
MABS_run_analyzer/MAPS.c
MABS_run_analyzer/Run.c

index 2a0bb2db6585ba19338c646a184a58e93ac5801b..68ec31981c1167c2104e2e2ef3f938d063eeac8c 100644 (file)
@@ -66,6 +66,8 @@ void ChargeSpektrum(TString runnumber = "")
                 runs[runi]->useDynamicalNoise(true);
                 runs[runi]->useCommonModeFilter(false);
                 runs[runi]->fillTTreeWithMoreThenInitialNoiseValues(true);
+                
+                
 //                 if (runi == 1)
 //                     runs[runi]->setSubMatrixBorders(0,100,0,100);
 //                 if (runi == 2)
@@ -108,7 +110,8 @@ void ChargeSpektrum(TString runnumber = "")
                     //         gROOT->SetBatch(kTRUE);
                     if (!isBatch)
                         gROOT->SetBatch(kFALSE);
-                                        
+                    
+                    
                     if (analysisis.Contains("clas")) { // classic analysis
                         compareHistogramClassVector.push_back(runs[runi]->histogram->normalized);
                     }           
@@ -122,7 +125,14 @@ void ChargeSpektrum(TString runnumber = "")
                     
                     if (analysisis.Contains("cali")) { // calibrated analysis
                         compareHistogramClassVector2.push_back(runs[runi]->histogram->calibrated->normalized);
-                    }   
+                    }  
+                    
+                    if (analysisis.Contains("signal")) { // calibrated analysis
+                        // TODO Delete the following two lines
+                        runs[runi]->processed->plotSignal(1000,49000);
+                    } 
+                    
+                    
                     
                     if (analysisis.Contains("depl")) { // depletion analysis
                         compareHistogramVector.push_back(runs[runi]->histogramdynamicalthreshold->normalized->SeedPerc);
index 7d77efa18fd1ffa4a98d896125ec48e089fc9778..0c320ab37ab299555ac6a018d9c8eb2da3ba77d7 100644 (file)
@@ -1958,11 +1958,11 @@ void MAPS::plotSignal(UInt_t Start, UInt_t Frames) {
         
         TH2F *h1  = new TH2F("Frames 0 "        , "Frame 0"         ,       fPixels, 0, fPixels, 2*16384, -16384, 16384);
         TH2F *h2  = new TH2F("Frames 1"         , "Frame 1"         ,       fPixels, 0, fPixels, 2*16384, -16384, 16384);
-        TH2F *h3  = new TH2F("CDS"              , "CDS"             ,       fPixels, 0, fPixels, 2*16384, -16384, 16384);
+        TH2F *h3  = new TH2F("CDS"              , "CDS"             ,       fPixels, 0, fPixels, 2*100, -100, 100);
         
         TH1F *h4  = new TH1F("Frames 0 histo"   , "Frames 0 histo"  ,       2*16384, -16384, 16384);
         TH1F *h5  = new TH1F("Frames 1 histo"   , "Frames 1 histo"  ,       2*16384, -16384, 16384);
-        TH1F *h6  = new TH1F("CDS histo"        , "CDS histo"       ,       2*16384, -16384, 16384);
+        TH1F *h6  = new TH1F("CDS histo"        , "CDS histo"       ,       2*50, -50, 50);
         
         for(UInt_t i=Start; i<Start+Frames; i++)
         {
@@ -1981,30 +1981,30 @@ void MAPS::plotSignal(UInt_t Start, UInt_t Frames) {
             }
         }
         
-        
-        TCanvas* cm11;
-        cm11 = new TCanvas("cm11","Signal",50,100,1200,800);
+                
+        TCanvas* cm11 = new TCanvas(Form("Signal anaylsis %d", run->labbook.runnumber),Form("Signal anaylsis %d", run->labbook.runnumber),50,100,1200,800);
         cm11->Divide(3,2);
         gStyle->SetOptFit(1011);
         gStyle->SetPalette(1);
         gStyle->SetCanvasColor(0);
         gStyle->SetFrameFillColor(10);
         gStyle->SetOptStat(0);
-        
+                
         cm11->cd(1);
         h1->Draw("colz");
+        h1->SetTitle("Test1");
         h1->GetXaxis()->SetTitle("Pixel#");
-        h1->GetYaxis()->SetTitle("Signal");
+        h1->GetYaxis()->SetTitle("F0");
         
         cm11->cd(2);
         h2->Draw("colz");
         h2->GetXaxis()->SetTitle("Pixel#");
-        h2->GetYaxis()->SetTitle("Signal");
+        h2->GetYaxis()->SetTitle("F1");
         
         cm11->cd(3);
         h3->Draw("colz");
         h3->GetXaxis()->SetTitle("Pixel#");
-        h3->GetYaxis()->SetTitle("Signal");
+        h3->GetYaxis()->SetTitle("CDS");
         
         cm11->cd(4);
         h4->Draw();
@@ -2021,8 +2021,8 @@ void MAPS::plotSignal(UInt_t Start, UInt_t Frames) {
         h6->GetXaxis()->SetTitle("Signal [ADC]");
         h6->GetYaxis()->SetTitle("Counts");
         
-        cm11->DrawClone();
-        cm11->Close();
+        //cm11->DrawClone();
+        //cm11->Close();
         cm11->Update();
         cout<<"\rSIGNALS plotted!                           "<<endl;
         cout<<"-------------------"<<endl;
index ea57e6ba08fee8334a37c9f9c1c9c1f26917c8d6..fe64446347f3b2882729752c9b35a8c207c9254f 100644 (file)
@@ -522,11 +522,12 @@ Bool_t Run::analyzeRun(Bool_t force)
         rescaleHistogramClasses();
         cout << colorwhite << "updateDatabase():" << endlr;
         updateDatabase();
-        cout << colorwhite << "delete MAPS class:" << endlr;
-        delete processed;
+        
+//         cout << colorwhite << "delete MAPS class:" << endlr;
+        //delete processed;
         return 0;
     }
-    delete processed;
+    //delete processed;
     return 1;
 }
 
@@ -798,6 +799,7 @@ Bool_t Run::analyzeFrame(Int_t frame)
     return 1;
 }
 
+
 Bool_t Run::runAllreadyAnalyzed()
 {
     return (checkFileExists(storepathRAWLinux + "/rootfilecreated") && checkFileExists(storepathRootLinux + Form("/RUN_%i_i.root",labbook.runnumber)));