]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG0/AliPWG0Helper.h
revert changes
[u/mrichter/AliRoot.git] / PWG0 / AliPWG0Helper.h
index 583e346ce5f4b8a94811ba5287822936bc1a75e8..763bba3d486810db8cdd5408b8720b4bb442bda1 100644 (file)
@@ -4,10 +4,10 @@
 #define ALIPWG0HELPER_H
 
 #include <TObject.h>
+#include <AliTriggerAnalysis.h>
 
 // static helper functions
 
-class AliESD;
 class AliESDEvent;
 class AliESDVertex;
 class TParticle;
@@ -15,24 +15,28 @@ class TH1;
 class TH2;
 class TH3;
 class AliHeader;
+class AliGenEventHeader;
 class AliStack;
 class TTree;
+class AliOfflineTrigger;
 
 class AliPWG0Helper : public TObject
 {
   public:
-    enum Trigger { kMB1 = 0, kMB2 }; // definition from ALICE-INT-2005-025
-    enum AnalysisMode { kInvalid = -1, kSPD = 0, kTPC, kTPCITS };
-
-    static Bool_t IsEventTriggered(const AliESD* aEsd, Trigger trigger = kMB2);
-    static Bool_t IsEventTriggered(ULong64_t triggerMask, Trigger trigger = kMB2);
-    static Bool_t IsVertexReconstructed(const AliESD* aEsd);
-    static Bool_t IsVertexReconstructed(const AliESDVertex* vtxESD);
-    static const AliESDVertex* GetVertex(const AliESDEvent* aEsd, AnalysisMode analysisMethod, Bool_t debug = kFALSE);
+    enum AnalysisMode { kInvalid = -1, kSPD = 0x1, kTPC = 0x2, kTPCITS = 0x4, kFieldOn = 0x8, kSPDOnlyL0 = 0x10 };
+    // in case we want to use bitmaps...
+    enum MCProcessType { kInvalidProcess = -1, kND = 0x1, kDD = 0x2, kSD = 0x4 };
 
+    static const AliESDVertex* GetVertex(AliESDEvent* aEsd, AnalysisMode analysisMethod, Bool_t debug = kFALSE);
+    static Bool_t TestVertex(const AliESDVertex* vertex, AnalysisMode analysisMode, Bool_t debug = kFALSE);
+    
     static Bool_t IsPrimaryCharged(TParticle* aParticle, Int_t aTotalPrimaries, Bool_t adebug = kFALSE);
 
-    static Int_t GetPythiaEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE);
+    static AliPWG0Helper::MCProcessType GetEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE);
+    static AliPWG0Helper::MCProcessType GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
+    static AliPWG0Helper::MCProcessType GetDPMjetEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
+    static Int_t GetLastProcessType() { return fgLastProcessType; }
+
     static TParticle* FindPrimaryMother(AliStack* stack, Int_t label);
     static Int_t FindPrimaryMotherLabel(AliStack* stack, Int_t label);
 
@@ -40,14 +44,14 @@ class AliPWG0Helper : public TObject
     static void CreateDividedProjections(TH3* hist, TH3* hist2, const char* axis = 0, Bool_t putErrors = kFALSE, Bool_t save = kFALSE);
     static const char* GetAxisTitle(TH3* hist, const char axis);
 
-    static void SetBranchStatusRecursive(TTree* tree, char *bname, Bool_t status, Bool_t debug = kFALSE);
-
     static void NormalizeToBinWidth(TH1* hist);
     static void NormalizeToBinWidth(TH2* hist);
 
-    static void PrintConf(AnalysisMode analysisMode, Trigger trigger);
-
+    static void PrintConf(AnalysisMode analysisMode, AliTriggerAnalysis::Trigger trigger);
+    
   protected:
+    static Int_t fgLastProcessType;    // stores the raw value of the last process type extracted
     ClassDef(AliPWG0Helper, 0)
 
   private: