]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
small update to print the results
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 15 Nov 2009 18:09:44 +0000 (18:09 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 15 Nov 2009 18:09:44 +0000 (18:09 +0000)
PWG0/AliOfflineTrigger.cxx
PWG0/trigger/AliTriggerTask.cxx
PWG0/trigger/show.C [new file with mode: 0644]

index 202029e2fc71c217dd5d99fc98d66ce2f22026d7..eea6d1cc86e73cf4beb6ed0a957e7221dec7ea60 100644 (file)
@@ -238,21 +238,21 @@ Bool_t AliOfflineTrigger::FMDTrigger(const AliESDEvent* aEsd, AliceSide side) co
       Char_t   ring = (ir == 0 ? 'I' : 'O');
       UShort_t nsec = (ir == 0 ? 20  : 40);
       UShort_t nstr = (ir == 0 ? 512 : 256);
-      for (UShort_t sec =0; sec < nsec;  sec++)  {
-       for (UShort_t strip = 0; strip < nstr; strip++) {
-         Float_t mult = fmdData->Multiplicity(det,ring,sec,strip);
-         if (mult == AliESDFMD::kInvalidMult) continue;
-         
-         if (mult > fFMDLowCut)
-           totalMult = totalMult + mult;
-         else
-           {
-             if( totalMult > fFMDHitCut) {
-               return kTRUE;
-             }
-             else totalMult = 0 ;
-           }
-       }
+      for (UShort_t sec =0; sec < nsec;  sec++) {
+        for (UShort_t strip = 0; strip < nstr; strip++) {
+          Float_t mult = fmdData->Multiplicity(det,ring,sec,strip);
+          if (mult == AliESDFMD::kInvalidMult) continue;
+          
+          if (mult > fFMDLowCut)
+            totalMult = totalMult + mult;
+          else
+            {
+              if( totalMult > fFMDHitCut) {
+          return kTRUE;
+              }
+              else totalMult = 0 ;
+            }
+        }
       }
     }
   }
index cb2a6e3c3d5bf1dbc903640b01885b0628923af5..b46ff118f7ff6eb6802c5fcb5258b912bf5bd7a4 100644 (file)
@@ -200,7 +200,7 @@ void AliTriggerTask::Terminate(Option_t *)
     {
       c->cd(i+1);
       fStats[i]->Draw();
-      Printf("%s: %d triggers | %f %% of all triggered | Rate: %f Hz", AliPWG0Helper::GetTriggerName(fTriggerList[i]), (UInt_t) fStats[i]->Integral(), fStats[i]->Integral() / base, (length > 0) ? (fStats[i]->Integral() / length) : -1);
+      Printf("%s: %d triggers | %f %% of all triggered | Rate: %f Hz", AliPWG0Helper::GetTriggerName(fTriggerList[i]), (UInt_t) fStats[i]->Integral(), 100.0 * fStats[i]->Integral() / base, (length > 0) ? (fStats[i]->Integral() / length) : -1);
     }
 
   Printf("Writting result to trigger.root");
diff --git a/PWG0/trigger/show.C b/PWG0/trigger/show.C
new file mode 100644 (file)
index 0000000..a5db093
--- /dev/null
@@ -0,0 +1,18 @@
+void show(const char* fileName = "trigger.root")
+{
+  TFile::Open(fileName);
+  
+  Int_t count = 0;
+  while (1)
+  {
+    hist = (TH1*) gFile->Get(Form("fStats_%d", count));
+    if (!hist)
+      break;
+    
+    c = new TCanvas;
+    hist->Draw();
+    c->SaveAs(Form("trigger_%d.png", count));
+    
+    count++;
+  }
+}