]>
Commit | Line | Data |
---|---|---|
1 | /* $Id$ */ | |
2 | ||
3 | #ifndef ALIPWG0HELPER_H | |
4 | #define ALIPWG0HELPER_H | |
5 | ||
6 | #include <TObject.h> | |
7 | ||
8 | // static helper functions | |
9 | ||
10 | class AliESD; | |
11 | class AliESDEvent; | |
12 | class AliESDVertex; | |
13 | class TParticle; | |
14 | class TH1; | |
15 | class TH2; | |
16 | class TH3; | |
17 | class AliHeader; | |
18 | class AliStack; | |
19 | class TTree; | |
20 | ||
21 | class AliPWG0Helper : public TObject | |
22 | { | |
23 | public: | |
24 | enum Trigger { kMB1 = 0, kMB2 }; // definition from ALICE-INT-2005-025 | |
25 | enum AnalysisMode { kSPD = 0, kTPC, kTPCITS }; | |
26 | ||
27 | static Bool_t IsEventTriggered(const AliESD* aEsd, Trigger trigger = kMB2); | |
28 | static Bool_t IsEventTriggered(ULong64_t triggerMask, Trigger trigger = kMB2); | |
29 | static Bool_t IsVertexReconstructed(const AliESD* aEsd); | |
30 | static Bool_t IsVertexReconstructed(const AliESDVertex* vtxESD); | |
31 | static const AliESDVertex* GetVertex(const AliESDEvent* aEsd, AnalysisMode analysisMethod, Bool_t debug = kFALSE); | |
32 | ||
33 | static Bool_t IsPrimaryCharged(TParticle* aParticle, Int_t aTotalPrimaries, Bool_t adebug = kFALSE); | |
34 | ||
35 | static Int_t GetPythiaEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE); | |
36 | static TParticle* FindPrimaryMother(AliStack* stack, Int_t label); | |
37 | static Int_t FindPrimaryMotherLabel(AliStack* stack, Int_t label); | |
38 | ||
39 | static void CreateProjections(TH3* hist, Bool_t save = kFALSE); | |
40 | static void CreateDividedProjections(TH3* hist, TH3* hist2, const char* axis = 0, Bool_t putErrors = kFALSE, Bool_t save = kFALSE); | |
41 | static const char* GetAxisTitle(TH3* hist, const char axis); | |
42 | ||
43 | static void SetBranchStatusRecursive(TTree* tree, char *bname, Bool_t status, Bool_t debug = kFALSE); | |
44 | ||
45 | static void NormalizeToBinWidth(TH1* hist); | |
46 | static void NormalizeToBinWidth(TH2* hist); | |
47 | ||
48 | protected: | |
49 | ClassDef(AliPWG0Helper, 0) | |
50 | ||
51 | private: | |
52 | AliPWG0Helper(const AliPWG0Helper&); | |
53 | AliPWG0Helper& operator=(const AliPWG0Helper&); | |
54 | }; | |
55 | ||
56 | #endif | |
57 |