]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliTriggerAnalysis.cxx
Adding libGui needed by libCDB
[u/mrichter/AliRoot.git] / ANALYSIS / AliTriggerAnalysis.cxx
index 9b618a38ffd3da4afac3791bb20479c904a8883d..fccbfec8c40be4d96e8080dd83f123b8df784a9c 100644 (file)
@@ -204,17 +204,25 @@ AliTriggerAnalysis::~AliTriggerAnalysis()
   }
 }
 
-void AliTriggerAnalysis::EnableHistograms()
+void AliTriggerAnalysis::EnableHistograms(Bool_t isLowFlux)
 {
-  // creates the monitoring histograms
+  // creates the monitoring histograms (dynamical range of histograms can be adapted for pp and pPb via isLowFlux flag)
   
   // do not add this hists to the directory
   Bool_t oldStatus = TH1::AddDirectoryStatus();
   TH1::AddDirectory(kFALSE);
-  
-  fHistBitsSPD = new TH2F("fHistBitsSPD", "SPD GFO;number of fired chips (offline);number of fired chips (hardware)", 1202, -1.5, 1200.5, 1202, -1.5, 1200.5);
+  //
+  Int_t nBins = isLowFlux ? 600 : 1202;
+  fHistBitsSPD = new TH2F("fHistBitsSPD", "SPD GFO;number of fired chips (offline);number of fired chips (hardware)", nBins, -1.5, -1.5 + nBins, nBins, -1.5, -1.5+nBins);
+  //
   fHistFiredBitsSPD = new TH1F("fHistFiredBitsSPD", "SPD GFO Hardware;chip number;events", 1200, -0.5, 1199.5);
-  fHistSPDClsVsTrk = new TH2F("fHistSPDClsVsTrk", "SPD Clusters vs Tracklets", 300, -0.5, 2999.5, 1000, -0.5, 9999.5);
+  //
+  Int_t nBinsX = isLowFlux ? 100  : 300;
+  Int_t nBinsY = isLowFlux ? 500  : 1000;
+  Float_t xMax = isLowFlux ? 400  : 2999.5;
+  Float_t yMax = isLowFlux ? 4000 : 9999.5;
+  fHistSPDClsVsTrk = new TH2F("fHistSPDClsVsTrk", "SPD Clusters vs Tracklets; n tracklets; n clusters", nBinsX, -0.5, xMax, nBinsY, -0.5, yMax);
+  //
   fHistV0A = new TH1F("fHistV0A", "V0A;leading time (ns);events", 400, -100, 100);
   fHistV0C = new TH1F("fHistV0C", "V0C;leading time (ns);events", 400, -100, 100);
   fHistZDC = new TH1F("fHistZDC", "ZDC;trigger bits;events", 8, -1.5, 6.5);
@@ -572,6 +580,12 @@ Int_t AliTriggerAnalysis::EvaluateTrigger(const AliESDEvent* aEsd, Trigger trigg
         AliFatal(Form("Online trigger not available for trigger %d", triggerNoFlags));
       return IsHVdipTPCEvent(aEsd);
     }
+    case kIncompleteEvent:
+    {
+      if (!offline)
+        AliFatal(Form("Online trigger not available for trigger %d", triggerNoFlags));
+      return IsIncompleteEvent(aEsd);
+    }
     case kCentral:
     {
       if (offline)
@@ -692,11 +706,26 @@ Bool_t AliTriggerAnalysis::IsHVdipTPCEvent(const AliESDEvent* esd) {
   //
   // This function flags events in which the TPC chamber HV is not at its nominal value
   //
+  if (fMC) return kFALSE; // there are no dip events in MC
   if (!esd->IsDetectorOn(AliDAQ::kTPC)) return kTRUE;
   return kFALSE;
 
 }
 
+Bool_t AliTriggerAnalysis::IsIncompleteEvent(const AliESDEvent* esd) 
+{
+  //
+  // Check whether the event is incomplete 
+  // (due to DAQ-HLT issues, it could be only part of the event was saved)
+  //
+  if (fMC) return kFALSE; // there are no incomplete events on MC
+  if ((esd->GetEventType() == 7) &&
+      (esd->GetDAQDetectorPattern() & (1<<4)) &&
+     !(esd->GetDAQAttributes() & (1<<7))) return kTRUE;
+
+  return kFALSE;
+}
+
 
 Bool_t AliTriggerAnalysis::IsOfflineTriggerFired(const AliESDEvent* aEsd, Trigger trigger)
 {
@@ -1791,8 +1820,8 @@ void AliTriggerAnalysis::SaveHistograms() const
     
   if (fHistBitsSPD) {
     fHistBitsSPD->Write();
-    fHistBitsSPD->ProjectionX();
-    fHistBitsSPD->ProjectionY();
+    //fHistBitsSPD->ProjectionX();
+    //fHistBitsSPD->ProjectionY();
   }
   else Printf("Cannot save fHistBitsSPD");
   if (fHistFiredBitsSPD) fHistFiredBitsSPD->Write();