- chi2ndf part of constructor (but what should be put there ??)
[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
10class AliESD;
770a1f1d 11class AliESDEvent;
116083b1 12class AliESDVertex;
04a7657f 13class TParticle;
dd367a14 14class TH1;
15class TH2;
25db2d85 16class TH3;
116083b1 17class AliHeader;
6b62a9c7 18class AliGenEventHeader;
116083b1 19class AliStack;
9cd015f7 20class TTree;
04a7657f 21
22class AliPWG0Helper : public TObject
23{
24 public:
e9c3977b 25 enum Trigger { kMB1 = 0, kMB2 }; // definition from ALICE-INT-2005-025
745d6088 26 enum AnalysisMode { kInvalid = -1, kSPD = 0, kTPC, kTPCITS };
6b62a9c7 27 // in case we want to use bitmaps...
28 enum MCProcessType { kInvalidProcess = -1, kND = 0x1, kDD = 0x2, kSD = 0x4 };
e9c3977b 29
116083b1 30 static Bool_t IsEventTriggered(const AliESD* aEsd, Trigger trigger = kMB2);
31 static Bool_t IsEventTriggered(ULong64_t triggerMask, Trigger trigger = kMB2);
32 static Bool_t IsVertexReconstructed(const AliESD* aEsd);
33 static Bool_t IsVertexReconstructed(const AliESDVertex* vtxESD);
ebf31fda 34 static const AliESDVertex* GetVertex(const AliESDEvent* aEsd, AnalysisMode analysisMethod, Bool_t debug = kFALSE);
770a1f1d 35
7584d357 36 static Bool_t IsPrimaryCharged(TParticle* aParticle, Int_t aTotalPrimaries, Bool_t adebug = kFALSE);
37
6b62a9c7 38 static Int_t GetEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE);
39 static Int_t GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
40 static Int_t GetDPMjetEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
a67484a6 41 static Int_t GetLastProcessType() { return fgLastProcessType; }
6b62a9c7 42
116083b1 43 static TParticle* FindPrimaryMother(AliStack* stack, Int_t label);
44 static Int_t FindPrimaryMotherLabel(AliStack* stack, Int_t label);
45
29771dc8 46 static void CreateProjections(TH3* hist, Bool_t save = kFALSE);
47 static void CreateDividedProjections(TH3* hist, TH3* hist2, const char* axis = 0, Bool_t putErrors = kFALSE, Bool_t save = kFALSE);
4c351225 48 static const char* GetAxisTitle(TH3* hist, const char axis);
116083b1 49
9cd015f7 50 static void SetBranchStatusRecursive(TTree* tree, char *bname, Bool_t status, Bool_t debug = kFALSE);
51
dd367a14 52 static void NormalizeToBinWidth(TH1* hist);
53 static void NormalizeToBinWidth(TH2* hist);
54
d1f50534 55 static void PrintConf(AnalysisMode analysisMode, Trigger trigger);
56
04a7657f 57 protected:
a67484a6 58 static Int_t fgLastProcessType; // stores the raw value of the last process type extracnted
59
04a7657f 60 ClassDef(AliPWG0Helper, 0)
61385583 61
62 private:
63 AliPWG0Helper(const AliPWG0Helper&);
64 AliPWG0Helper& operator=(const AliPWG0Helper&);
04a7657f 65};
66
67#endif
68