]> jspc29.x-matter.uni-frankfurt.de Git - radhard.git/commitdiff
Analyzer: Pegasus adjustments
authorBenjamin Linnik <blinnik@jspc61.x-matter.uni-frankfurt.de>
Wed, 15 Nov 2017 09:19:22 +0000 (10:19 +0100)
committerBenjamin Linnik <blinnik@jspc61.x-matter.uni-frankfurt.de>
Wed, 15 Nov 2017 09:19:22 +0000 (10:19 +0100)
MABS_run_analyzer/ChargeSpektrum.c
MABS_run_analyzer/HistogramType.c
MABS_run_analyzer/Run.c

index 6a9e1388b528347400f4850af275f3bd0c1ddb37..a30464cd2ff39d8bef1193bd06ca8181c9e42779 100644 (file)
@@ -187,10 +187,9 @@ void ChargeSpektrum(TString runnumber = "")
                             ntupleVectorDepltetion2.push_back(prop2ndpixelfire);
                             ntupleVectorVector.push_back(ntupleVectorDepltetion2);
                         }
-                        
-                        Double_t AverageCharge[9];
-                        Double_t TotalHits[9];
-                        for (UInt_t sumi = 0; sumi < 9; sumi++) {
+                        Double_t* AverageCharge = new Double_t[(*runs[runi]->histogramdynamicalthreshold->a_Sum).size()];
+                        Double_t* TotalHits = new Double_t[(*runs[runi]->histogramdynamicalthreshold->a_Sum).size()];
+                        for (UInt_t sumi = 0; sumi < (*runs[runi]->histogramdynamicalthreshold->a_Sum).size(); sumi++) {
                             AverageCharge[sumi] = 0;
                             TotalHits[sumi] = 0;
                             for (Int_t bini = 1; bini <= (*runs[runi]->histogramdynamicalthreshold->a_Sum)[sumi]->GetXaxis()->GetNbins();++bini) {
@@ -205,7 +204,7 @@ void ChargeSpektrum(TString runnumber = "")
                         numpixelincl->itsHistogramType = runs[runi]->histogram;
                         numpixelincl->xaxisTitle = "Number of pixel in cluster";
                         numpixelincl->yaxisTitle = "Average charge collected [e]";
-                        for (UInt_t sumi = 0; sumi < 9; sumi++) {
+                        for (UInt_t sumi = 0; sumi < (*runs[runi]->histogramdynamicalthreshold->a_Sum).size(); sumi++) {
                             if (!(sumi%2))
                                 compareHistogramVectorDepletionSum.push_back((*runs[runi]->histogram->normalized->a_Sum)[sumi]);
                             numpixelincl->Fill(sumi+1,AverageCharge[sumi],0,0);
index a8b0d6834b510e7cb6e357d0a4dab2ac44bc0905..751785269ad1e1b7f0886b7d1b1cf56b9f168177 100644 (file)
@@ -66,7 +66,7 @@ void HistogramType::initHistograms(Int_t gotcolor, Int_t gotstyle) {
     NoiseEnd->SetBins(cursystempar->nbinsnoise, 0, cursystempar->maxbinnoise);
 //     LeakageCurrentInPixelSorted->SetBins(cursystempar->nbinsnoise*10, 0, cursystempar->maxbinnoise*30);
     
-    if( labbook->chipGen=="FSBB" || labbook->chipGen=="Pipper2") {
+    if( labbook->chipGen.EqualTo("FSBB") || labbook->chipGen.EqualTo("Pipper2") || labbook->chipGen.EqualTo("Pegasus")) {
         Sum = &Sum9;
         a_Sum = &a_Sum9;
         a_posSum = &a_posSum9;
index c92aaec32d94509fbf7440cf18b61d6ae72796de..074af13102fb0d4ba54d27f2363556377c0e7258 100644 (file)
@@ -1030,7 +1030,7 @@ void Run::updateDatabase() {
        HistogramType* histogramclassToUseForDB = 0;
        // Add code to set the pointer histogramclassToUseForDB to class to use for database values
        // histogramclassToUseForDB = histogramthreshold;
-       if (labbook.chipGen.EqualTo("Pipper2")) {
+    if (labbook.chipGen.EqualTo("Pipper2")) {
         histogramclassToUseForDB = histogramdynamicalthreshold;
        } else {
                histogramclassToUseForDB = histogramwoRTSthreshold;
@@ -1451,7 +1451,7 @@ Bool_t Run::binSeedSumVeto()
         //                     }
         //                     cout << "......." << endl;
                             
-                        Float_t clusterArray9[9];// temp variable clusterArray necessary, because Sort only accepts 1-dim arrays
+                        Float_t clusterArray9[9]; // temp variable clusterArray necessary, because Sort only accepts 1-dim arrays
                         clusterArray9[0]=clusterArray25[6];
                         clusterArray9[1]=clusterArray25[7];
                         clusterArray9[2]=clusterArray25[8];
@@ -1461,7 +1461,6 @@ Bool_t Run::binSeedSumVeto()
                         clusterArray9[6]=clusterArray25[16];
                         clusterArray9[7]=clusterArray25[17];
                         clusterArray9[8]=clusterArray25[18];
-//                         if( labbook.chipGen=="FSBB" || labbook.chipGen=="Pipper2") {
                         
                         pixelSum9 = 0;
                         notSeedSum9 = 0;     
@@ -1486,7 +1485,7 @@ Bool_t Run::binSeedSumVeto()
                                 }
                             }
                         }
-                        if( labbook.chipGen=="FSBB" || labbook.chipGen=="Pipper2") {
+                        if( labbook.chipGen.EqualTo("FSBB") || labbook.chipGen.EqualTo("Pipper2") || labbook.chipGen.EqualTo("Pegasus") ) {
                             pixelSum     = pixelSum9;
                             notSeedSum   = notSeedSum9;
                             a_pixelSum   = &a_pixelSum9[0];
@@ -1698,7 +1697,7 @@ Bool_t Run::binSeedSumVeto()
             //             cout << (*curHistogramClass)->histogramdescription << ": " << colorcyan <<  parameters[1] << endlr;
             (*curHistogramClass)->integralVeto = parameters[6];
         }
-        if (labbook.chipGen.EqualTo("Pipper2")) 
+        if (labbook.chipGen.EqualTo("Pipper2") || labbook.chipGen.EqualTo("Pegasus")
             parameters = (*curHistogramClass)->FitPerform((*curHistogramClass)->Seed, "gaus", 0, false, (*curHistogramClass)->fixedThresholdValue);
         else
             parameters = (*curHistogramClass)->FitPerform((*curHistogramClass)->Seed, "landau");