]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG0/AliPWG0Helper.h
Bug fix in the order of the Ds cuts (Sadhana, Francesco)
[u/mrichter/AliRoot.git] / PWG0 / AliPWG0Helper.h
index 1e008fab2579d12950a3b5928a3cd161ed634ba2..de29b5bf26dd68b8b22b23b651f7c3dd3bae7d4a 100644 (file)
@@ -4,28 +4,42 @@
 #define ALIPWG0HELPER_H
 
 #include <TObject.h>
+#include <AliTriggerAnalysis.h>
 
 // static helper functions
 
-class AliESD;
+class AliESDEvent;
 class AliESDVertex;
 class TParticle;
+class TH1;
+class TH2;
 class TH3;
 class AliHeader;
+class AliGenEventHeader;
 class AliStack;
+class TTree;
+class AliOfflineTrigger;
+class AliMultiplicity;
 
 class AliPWG0Helper : public TObject
 {
   public:
-    enum Trigger { kMB1 = 0, kMB2 }; // definition from ALICE-INT-2005-025
+    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, kOnePart = 0x8 };
+    enum DiffTreatment { kMCFlags = 0, kUA5Cuts = 1, kE710Cuts, kALICEHadronLevel };
 
-    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);
+    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 MCProcessType GetEventProcessType(AliESDEvent* esd, AliHeader* header, AliStack* stack, DiffTreatment diffTreatment);
+    static MCProcessType GetEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE);
+    static MCProcessType GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
+    static 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);
 
@@ -33,7 +47,17 @@ 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 NormalizeToBinWidth(TH1* hist);
+    static void NormalizeToBinWidth(TH2* hist);
+
+    static void PrintConf(AnalysisMode analysisMode, AliTriggerAnalysis::Trigger trigger, DiffTreatment diffTreatment);
+    
+    static Double_t Rapidity(Double_t pt, Double_t pz, Double_t m);
+    static Bool_t IsHadronLevelSingleDiffractive(AliStack* stack, Float_t cms, Float_t xiMin, Float_t xiMax);
+    
   protected:
+    static Int_t fgLastProcessType;    // stores the raw value of the last process type extracted
     ClassDef(AliPWG0Helper, 0)
 
   private: