]> jspc29.x-matter.uni-frankfurt.de Git - radhard.git/commitdiff
Run analyzer: Reverted changes for FSBB (locally)
authorBenjamin Linnik <blinnik@jspc28.x-matter.uni-frankfurt.de>
Wed, 29 Jul 2015 13:04:42 +0000 (15:04 +0200)
committerBenjamin Linnik <blinnik@jspc28.x-matter.uni-frankfurt.de>
Wed, 29 Jul 2015 13:04:42 +0000 (15:04 +0200)
MABS_run_analyzer/ChargeSpektrumFunctions.c
MABS_run_analyzer/MAPS.c
MABS_run_analyzer/Run.c
MABS_run_analyzer/Run.h

index 52fe9a3aad354c7d0d6ed761465f434f7c8e9539..a504d01a9f3a07a7d77b4d534ccd1bb60897eb10 100644 (file)
@@ -131,11 +131,11 @@ Bool_t writeObservableToFile()
             {
                 plothistogrampointer = *runs[runi]->plothistogrampointer;
                 runnumberListe+=Form("%d_",runs[runi]->labbook.runnumber);
-                header+=Form("%d\t%s\t", runs[runi]->labbook.runnumber, plothistogrampointer->GetName());
+                header+=Form("%d\t%s\t\t\t", runs[runi]->labbook.runnumber, plothistogrampointer->GetName());
             }
         }
     }
-    TString filename= runs[0]->savepathresults + "/" + runnumberListe + "histograms.dat";
+    TString filename= runs[0]->savepathresults + "/Excel/" + runnumberListe + "histograms.dat";
     fstream* fout = new fstream(filename,ios::out);
     *fout << headerInfo << endl;
     *fout << header << endl;
@@ -149,7 +149,14 @@ Bool_t writeObservableToFile()
                 {
                     plothistogrampointer = *runs[runi]->plothistogrampointer;
                     TString outline;
-                    outline=Form("%.1f\t%.1f\t",plothistogrampointer->GetBinCenter(bini),plothistogrampointer->GetBinContent(bini));
+                                       Double_t binContentNorm=plothistogrampointer->GetBinContent(bini)/runs[runi]->labbook.frames_foundDB*10000000;
+                                       Double_t binSumme=0.0;
+                                       for(Int_t binSummei=bini;binSummei<plothistogrampointer->GetNbinsX();binSummei++)//Sum up from bini beginning (cut condition for detection eff.)
+                                       {
+                                               Double_t binContentNormInSumme=plothistogrampointer->GetBinContent(binSummei)/runs[runi]->labbook.frames_foundDB*10000000;
+                                               binSumme=binSumme+binContentNormInSumme;
+                                       }
+                                       outline=Form("%.1f\t%.1f\t%.1f\t%.1f\t",plothistogrampointer->GetBinCenter(bini),plothistogrampointer->GetBinContent(bini),binContentNorm,binSumme);
                     *fout<<outline;
                 }
             }
index fcc3d52bb50b04f6f23f25730fb9d3d255e8c58b..64659623021b7b1bedb7e76236bbc9e409af0a8f 100644 (file)
@@ -1649,7 +1649,7 @@ void MAPS::plotFrame(Int_t FrameNumber) {
     else {
         cout <<endl <<endl << colorwhite << "---------------- FRAME " << fFrameNumber << " ----------------" << colorreset << endl << endl;
         cout<<"CDS matrix:"<<endl;
-        debugStream<>(fCdsmatrix, fPixels, fColumns, 0, 19);
+        debugStream<>(fCdsmatrix, fPixels, fColumns, 0, 39);
         
         cout<<"Hitted pixel discriminator matrix:"<<endl;
         debugStream<>(fHittedPixel, fPixels, fColumns, 1, 1);
index 103c449669f9b385b6aeead9f53f4a5cd7ebbb9c..b805a681de6753de8ef91d5269448c0a906e8442 100644 (file)
@@ -98,6 +98,7 @@ Run::Run(Int_t runnumber, Int_t loopi)
             labbook.CCE_in_Perc_1DB = (rowsql->GetField(17) != NULL)?atoi(rowsql->GetField(17)):-1;
             labbook.CCE_in_Perc_25DB = (rowsql->GetField(18) != NULL)?atoi(rowsql->GetField(18)):-1;
             labbook.frames_foundDB = (rowsql->GetField(19) != NULL)?atoi(rowsql->GetField(19)):-1;
+               //      labbook.frames_Analyzed = (rowsql->GetField(20) != NULL)?atoi(rowsql->GetField(20)):-1;
             delete res;
             if (labbook.chip.Length() > 0 && labbook.chipGen.Length() > 0) // versuche infos zum Chip aus der ChipDatenbank zu bekommen
             {
@@ -283,10 +284,11 @@ Bool_t Run::analyzeRun(Bool_t force)
         histogramthresholdCalibrated.calibrated = histogramCalibrated.calibrated;
         cout << colorwhite << "calculateCCE():" << endlr;
         calculteCCE();
-        if (labbook.source.Contains("Sr90")) {
+    /*    if (labbook.source.Contains("Sr90")) {
             cout << colorwhite << "integrateSr90Spectra():" << endlr;
             integrateSr90Spectra(histogramthresholdCalibrated.Seed);
         }
+       */      
         cout << colorwhite << "updateDatabase():" << endlr;
         updateDatabase();
         cout << colorwhite << "delete MAPS class:" << endlr;
@@ -499,7 +501,9 @@ Float_t Run::stringToNumber ( string Text )
 
 void Run::setSystemSpecificParameters()
 {    
-    if (labbook.system.EqualTo("USB")) // && labbook.chipGen.EqualTo("34") )
+    if (labbook.system.EqualTo("USB")  && labbook.chipGen.EqualTo("Mi34") )
+        systemparamcur = systemparamUSB;
+       else if (labbook.system.EqualTo("USB")  && labbook.chipGen.EqualTo("FSBB") )
         systemparamcur = systemparamUSB;
     else if (labbook.system.EqualTo("PXI")) // && labbook.chipGen.EqualTo("34") )
         systemparamcur = systemparamPXI;
@@ -514,8 +518,11 @@ void Run::setSensorInSystemParam()
     sensorinfostruct sensorinfoMi34USB( 8, 64 );
     sensorinfostruct sensorinfoMi34PXI( 16, /* rows */  64 /* columns */   );
     sensorinfostruct sensorinfoPegasus( 8, 56 );
-    if (labbook.system.EqualTo("USB")) // && labbook.chipGen.EqualTo("34") )
+       sensorinfostruct sensorinfoFSBB( 8, 208 );
+    if (labbook.system.EqualTo("USB")  && labbook.chipGen.EqualTo("Mi34") )
         sensorinfocur=sensorinfoMi34USB;
+       else if (labbook.system.EqualTo("USB")  && labbook.chipGen.EqualTo("FSBB") )
+        sensorinfocur=sensorinfoFSBB;
     else if (labbook.system.EqualTo("PXI")) // && labbook.chipGen.EqualTo("34") )
         sensorinfocur=sensorinfoMi34PXI;
     else if (labbook.system.EqualTo("Pegasus")) // && labbook.chipGen.EqualTo("34") )
index 5c48ec3f325e323d796c4086655ed4c99cb3923e..1004f75e09474587fed3d2dc704a1d95626fa6d7 100644 (file)
@@ -227,8 +227,8 @@ private:
     };
     systemparam systemparamPegasus {
         2800, // maxbin;
-        2800/1,// nbins;
-        10, //vetothreshold
+        2800/2,// nbins;
+        20, //vetothreshold
         10,
         100
     };
@@ -239,7 +239,13 @@ private:
         150,
         150
     };
-    
+        systemparam systemparamFSBB {
+        2800, // maxbin;
+        2800/4,// nbins;
+        25, //vetothreshold
+        10,
+        100
+    };
     Int_t* rootcolors;
     Int_t* rootlinestyle;