Major update of the CMake compilation:
[u/mrichter/AliRoot.git] / PWG0 / AliPWG0Helper.h
CommitLineData
04a7657f 1/* $Id$ */
2
3#ifndef ALIPWG0HELPER_H
4#define ALIPWG0HELPER_H
5
6#include <TObject.h>
7
8// static helper functions
9
770a1f1d 10class AliESDEvent;
116083b1 11class AliESDVertex;
04a7657f 12class TParticle;
dd367a14 13class TH1;
14class TH2;
25db2d85 15class TH3;
116083b1 16class AliHeader;
6b62a9c7 17class AliGenEventHeader;
116083b1 18class AliStack;
9cd015f7 19class TTree;
ff8c4f30 20class AliOfflineTrigger;
04a7657f 21
22class AliPWG0Helper : public TObject
23{
24 public:
7a11141c 25 enum Trigger { kAcceptAll = 1, kMB1 = 2, kMB2, kMB3, kSPDGFO, kV0A, kV0C, kZDC, kZDCA, kZDCC, kFMDA, kFMDC, kFPANY, kStartOfFlags = 0x0100, kOfflineFlag = 0x8000 }; // MB1, MB2, MB3 definition from ALICE-INT-2005-025
a7f69e56 26 enum AnalysisMode { kInvalid = -1, kSPD = 0x1, kTPC = 0x2, kTPCITS = 0x4, kFieldOn = 0x8 };
6b62a9c7 27 // in case we want to use bitmaps...
1c15d51a 28 enum MCProcessType { kInvalidProcess = -1, kND = 0x1, kDD = 0x2, kSD = 0x4 };
e9c3977b 29
69b09e3b 30 static Bool_t IsEventTriggered(const AliESDEvent* aEsd, Trigger trigger);
31 static Bool_t IsEventTriggered(ULong64_t triggerMask, Trigger trigger);
32 static const AliESDVertex* GetVertex(AliESDEvent* aEsd, AnalysisMode analysisMethod, Bool_t debug = kFALSE, Bool_t bRedoTPC = kFALSE);
a6e0ebfe 33 static Bool_t TestVertex(const AliESDVertex* vertex, AnalysisMode analysisMode, Bool_t debug = kFALSE);
ff8c4f30 34
7584d357 35 static Bool_t IsPrimaryCharged(TParticle* aParticle, Int_t aTotalPrimaries, Bool_t adebug = kFALSE);
36
1c15d51a 37 static AliPWG0Helper::MCProcessType GetEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE);
38 static AliPWG0Helper::MCProcessType GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
39 static AliPWG0Helper::MCProcessType GetDPMjetEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
a67484a6 40 static Int_t GetLastProcessType() { return fgLastProcessType; }
6b62a9c7 41
116083b1 42 static TParticle* FindPrimaryMother(AliStack* stack, Int_t label);
43 static Int_t FindPrimaryMotherLabel(AliStack* stack, Int_t label);
44
29771dc8 45 static void CreateProjections(TH3* hist, Bool_t save = kFALSE);
46 static void CreateDividedProjections(TH3* hist, TH3* hist2, const char* axis = 0, Bool_t putErrors = kFALSE, Bool_t save = kFALSE);
4c351225 47 static const char* GetAxisTitle(TH3* hist, const char axis);
116083b1 48
dd367a14 49 static void NormalizeToBinWidth(TH1* hist);
50 static void NormalizeToBinWidth(TH2* hist);
51
ff8c4f30 52 static const char* GetTriggerName(Trigger trigger);
d1f50534 53 static void PrintConf(AnalysisMode analysisMode, Trigger trigger);
ff8c4f30 54
55 static AliOfflineTrigger* GetOfflineTrigger();
d1f50534 56
04a7657f 57 protected:
a67484a6 58 static Int_t fgLastProcessType; // stores the raw value of the last process type extracnted
ff8c4f30 59 static AliOfflineTrigger* fgOfflineTrigger; // class that implemenents the offline trigger logic
a67484a6 60
04a7657f 61 ClassDef(AliPWG0Helper, 0)
61385583 62
63 private:
64 AliPWG0Helper(const AliPWG0Helper&);
65 AliPWG0Helper& operator=(const AliPWG0Helper&);
04a7657f 66};
67
68#endif
69