]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWG0/AliPWG0Helper.h
Updated DAs to comply with root known problems
[u/mrichter/AliRoot.git] / PWG0 / AliPWG0Helper.h
... / ...
CommitLineData
1/* $Id$ */
2
3#ifndef ALIPWG0HELPER_H
4#define ALIPWG0HELPER_H
5
6#include <TObject.h>
7
8// static helper functions
9
10class AliESDEvent;
11class AliESDVertex;
12class TParticle;
13class TH1;
14class TH2;
15class TH3;
16class AliHeader;
17class AliGenEventHeader;
18class AliStack;
19class TTree;
20
21class AliPWG0Helper : public TObject
22{
23 public:
24 enum Trigger { kMB1 = 0, kMB2, kMB3, kSPDFASTOR, kOfflineMB1, kOfflineMB2, kOfflineMB3, kOfflineFASTOR }; // MB1, MB2, MB3 definition from ALICE-INT-2005-025
25 enum AnalysisMode { kInvalid = -1, kSPD = 0, kTPC, kTPCITS };
26 // in case we want to use bitmaps...
27 enum MCProcessType { kInvalidProcess = -1, kND = 0x1, kDD = 0x2, kSD = 0x4 };
28
29 static Bool_t IsEventTriggered(const AliESDEvent* aEsd, Trigger trigger);
30 static Bool_t IsEventTriggered(ULong64_t triggerMask, Trigger trigger);
31 static const AliESDVertex* GetVertex(AliESDEvent* aEsd, AnalysisMode analysisMethod, Bool_t debug = kFALSE, Bool_t bRedoTPC = kFALSE);
32 static Bool_t TestVertex(const AliESDVertex* vertex, AnalysisMode analysisMode, Bool_t debug = kFALSE);
33
34 static Bool_t IsPrimaryCharged(TParticle* aParticle, Int_t aTotalPrimaries, Bool_t adebug = kFALSE);
35
36 static AliPWG0Helper::MCProcessType GetEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE);
37 static AliPWG0Helper::MCProcessType GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
38 static AliPWG0Helper::MCProcessType GetDPMjetEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
39 static Int_t GetLastProcessType() { return fgLastProcessType; }
40
41 static TParticle* FindPrimaryMother(AliStack* stack, Int_t label);
42 static Int_t FindPrimaryMotherLabel(AliStack* stack, Int_t label);
43
44 static void CreateProjections(TH3* hist, Bool_t save = kFALSE);
45 static void CreateDividedProjections(TH3* hist, TH3* hist2, const char* axis = 0, Bool_t putErrors = kFALSE, Bool_t save = kFALSE);
46 static const char* GetAxisTitle(TH3* hist, const char axis);
47
48 static void NormalizeToBinWidth(TH1* hist);
49 static void NormalizeToBinWidth(TH2* hist);
50
51 static void PrintConf(AnalysisMode analysisMode, Trigger trigger);
52
53 protected:
54 static Int_t fgLastProcessType; // stores the raw value of the last process type extracnted
55
56 ClassDef(AliPWG0Helper, 0)
57
58 private:
59 AliPWG0Helper(const AliPWG0Helper&);
60 AliPWG0Helper& operator=(const AliPWG0Helper&);
61};
62
63#endif
64