]> jspc29.x-matter.uni-frankfurt.de Git - radhard.git/commitdiff
Letzter Status Vergleich vergleichMathematicaRoot
authorDennis Doering <doering@physik.uni-frankfurt.de>
Tue, 12 May 2015 08:43:25 +0000 (10:43 +0200)
committerDennis Doering <doering@physik.uni-frankfurt.de>
Tue, 12 May 2015 08:43:25 +0000 (10:43 +0200)
MABS_run_analyzer/ChargeSpektrum.c
MABS_run_analyzer/MAPS.c
MABS_run_analyzer/Run.c

index dccc79728e581964b9dbccca9b1ac60d4319eec0..4f9dd43274d307a914471cdc7e78ebb752e9bbcc 100644 (file)
@@ -85,7 +85,8 @@ void ChargeSpektrum(Int_t runnumber = -1)
         runs[runi]->setResultsPath("./results/");
         runs[runi]->setPlotStyle(runi);
         runs[runi]->useDynamicalNoise(true);
-        runs[runi]->analyzeRun(true); // creates or opens .root file, can analyze the RAW data
+//        runs[runi]->analyzeRun(true); // creates or opens .root file, can analyze the RAW data
+ runs[runi]->analyzeFrame(422); 
 //         gROOT->SetBatch(kTRUE);
 //           runs[runi]->plotSeed();
 //         runs[runi]->plotSum();
index cf53a83896f418909eefb66297f9e16b06988386..c1b8236169fe84638e03790151641ca188cc2408 100644 (file)
@@ -1148,7 +1148,7 @@ void MAPS::hitana() {
         Bool_t bordercluster=false;
         Float_t noisesumincluster=0;
         Float_t chargesumincluster=0;
-        
+               
         for(Int_t i=0; i<fPixels; i++)
         {
             fHittedPixel[i] = 0;
@@ -1158,7 +1158,7 @@ void MAPS::hitana() {
                 HITNR++;
                 HITS.Set(HITNR);
                 HITS.AddAt(i,(HITNR-1));
-//                 cout << "Frame: " << fFrameNumber  << " Candidate at pixel: " << i  << " with ADC: " << (1.*fCdsmatrix[i]-fPedestals[i]) << endl;
+           //      cout << "Frame: " << fFrameNumber  << " Candidate at pixel: " << i  << " with ADC: " << (1.*fCdsmatrix[i]-fPedestals[i]) << endl;
                 
                 if(fSave)   {
                     hint2->Fill(i%fColumns+0.1, (int)(i/fColumns)+0.1); // counts up in 2dimensional pixel matrix
@@ -1267,17 +1267,17 @@ void MAPS::hitana() {
 //             cout << coloryellow << "Noise     für Cluster: " << noisesumincluster << endlr;
 //             cout << coloryellow << "ChargeSum für Cluster: " << chargesumincluster << endlr;
 //             debug
-//             for(Int_t row=0; row<5; row++)
-//             {
-//                 for(Int_t column=0; column<5; column++)
-//                 {
-//                     std::cout.width(10);
-//                     std::cout << std::fixed;
-//                     std::cout << std::left << std::setprecision(2) << pixelchargeincluster[row*5+column];
-//                 }
-//                 cout << endl;
-//             }
-//             cout << endl;
+            // for(Int_t row=0; row<5; row++)
+            // {
+                // for(Int_t column=0; column<5; column++)
+                // {
+                    // std::cout.width(10);
+                    // std::cout << std::fixed;
+                    // std::cout << std::left << std::setprecision(2) << pixelchargeincluster[row*5+column];
+                // }
+                // cout << endl;
+            // }
+            // cout << endl;
             
             //Check seeds (whether highest entry in cluster):
             for(Int_t i=6; i<19; i++) // why not over full cluster? (I=0 i<25 TODO
@@ -1340,15 +1340,22 @@ void MAPS::hitana() {
                     fFrameInfo.pixel[fHits] = Hitlist[hit];
                     for(int clupos=0; clupos<25; clupos++)
                     {
+                                       
                         fFrameInfo.p [clupos][fHits] = pixelchargeincluster[clupos];
                     }
                     
                     // if cluster charge > clusternoise * const
-                    if (1.0*chargesumincluster > noisesumincluster*3.0)
-                        fFrameInfo.pixelthreshold[fHits] = Hitlist[hit];
+                               //      cout<<"ClusterSum"<<chargesumincluster<<"Noisesum"<<noisesumincluster<<"3*mal"<<noisesumincluster*3.0<<endl;
+                    if (1.0*chargesumincluster > noisesumincluster*1.0)
+                        {
+                                               
+                                               fFrameInfo.pixelthreshold[fHits] = Hitlist[hit];
+                                               
+                                               }
                     else
-                        fFrameInfo.pixelthreshold[fHits] = 0;
-                        
+                                               {
+                                                fFrameInfo.pixelthreshold[fHits] = 0;
+                                               }    
                     if(fSave) {
                         hint1->Fill( Hitlist[hit]%fColumns, (int)(Hitlist[hit]/fColumns) );
                     }
@@ -1447,7 +1454,8 @@ void MAPS::plotFrame(Int_t FrameNumber) {
         
         cout<<"Hitted pixel discriminator matrix:"<<endl;
         debugStream<>(fHittedPixel, fPixels, fColumns, 1, 1);
-        
+        cout<<"CDS of PIXEL 233 is:::"<<fCdsmatrix[233]<<endl;
+        cout<<"CDS of 5 PIXEL around 233 is:::"<<","<<fCdsmatrix[230]<<","<<fCdsmatrix[231]<<","<<fCdsmatrix[232]<<","<<fCdsmatrix[233]<<","<<fCdsmatrix[234]<<","<<fCdsmatrix[235]<<endl;
         TCanvas* cm1;
         cm1 = new TCanvas("cm1","Matrix",50,100,1200,800);
         cm1->Divide(2,3);
index 0d82e87c5d08fc5cbaa36fe492537b311c00383e..7fdb408ea216dd355a72bebb36dd3897cf4be7c7 100644 (file)
@@ -1005,12 +1005,12 @@ Bool_t Run::writeAllHistogramsToFile()
     fstream* fout = new fstream(filename,ios::out);
     
     TString header = Form("#bin [ADU]\tbin [e]\tSeed\tSum\tVeto\tSeed thrsh\tSum thrsh\tbin noise [ADU]\tbin noise [e]\tnoise\n");
-    header += Form("#posVeto, run: %.1f, DB: %.1f, Fe55 DB (%d, %.1f): %.1f\n", histogram.posVeto, labbook.posVetoDB, Fe55run.posVetorunnumber, Fe55run.temperature, Fe55run.posVeto);
-    header += Form("#posSeed, run: %.1f, DB: %.1f\n", histogram.posSeed, labbook.posSeedDB);
-    header += Form("#posSum, run: %.1f, DB: %.1f\n", histogram.posSum, labbook.posSumDB);
-    header += Form("#Noise [ADU]: %.2f +%.2f -%.2f\n", histogram.avgNoise, histogram.avgNoisePlus, histogram.avgNoiseMinus );
+    //header += Form("#posVeto, run: %.1f, DB: %.1f, Fe55 DB (%d, %.1f): %.1f\n", histogram.posVeto, labbook.posVetoDB, Fe55run.posVetorunnumber, Fe55run.temperature, Fe55run.posVeto);
+    //header += Form("#posSeed, run: %.1f, DB: %.1f\n", histogram.posSeed, labbook.posSeedDB);
+    //header += Form("#posSum, run: %.1f, DB: %.1f\n", histogram.posSum, labbook.posSumDB);
+    //header += Form("#Noise [ADU]: %.2f +%.2f -%.2f\n", histogram.avgNoise, histogram.avgNoisePlus, histogram.avgNoiseMinus );
     if (histogramCalibrated.calibrated)
-        header += Form("#Noise [e]: %.2f +%.2f -%.2f",histogramCalibrated.avgNoise, histogramCalibrated.avgNoisePlus, histogramCalibrated.avgNoiseMinus );
+      //  header += Form("#Noise [e]: %.2f +%.2f -%.2f",histogramCalibrated.avgNoise, histogramCalibrated.avgNoisePlus, histogramCalibrated.avgNoiseMinus );
     *fout << header << endl;
     
     TString outline;