3 #ifndef ALIPWG0HELPER_H
4 #define ALIPWG0HELPER_H
7 #include <AliTriggerAnalysis.h>
9 // static helper functions
18 class AliGenEventHeader;
21 class AliOfflineTrigger;
22 class AliMultiplicity;
24 class AliPWG0Helper : public TObject
27 // kTPCSPD: tracks + tracklets not using any cluster associated to tracks
28 enum AnalysisMode { kInvalid = -1, kSPD = 0x1, kTPC = 0x2, kTPCITS = 0x4, kFieldOn = 0x8, kSPDOnlyL0 = 0x10, kTPCSPD = 0x20};
29 // in case we want to use bitmaps...
30 enum MCProcessType { kInvalidProcess = -1, kND = 0x1, kDD = 0x2, kSD = 0x4, kOnePart = 0x8 };
31 enum DiffTreatment { kMCFlags = 0, kUA5Cuts = 1, kE710Cuts, kALICEHadronLevel };
33 static const AliESDVertex* GetVertex(const AliESDEvent* aEsd, AnalysisMode analysisMethod, Bool_t debug = kFALSE);
34 static Bool_t TestVertex(const AliESDVertex* vertex, AnalysisMode analysisMode, Bool_t debug = kFALSE);
36 static Bool_t IsPrimaryCharged(TParticle* aParticle, Int_t aTotalPrimaries, Bool_t adebug = kFALSE);
38 static MCProcessType GetEventProcessType(AliESDEvent* esd, AliHeader* header, AliStack* stack, DiffTreatment diffTreatment);
39 static MCProcessType GetEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE);
40 static MCProcessType GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
41 static MCProcessType GetDPMjetEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
42 static Int_t GetLastProcessType() { return fgLastProcessType; }
44 static TParticle* FindPrimaryMother(AliStack* stack, Int_t label);
45 static Int_t FindPrimaryMotherLabel(AliStack* stack, Int_t label);
47 static void CreateProjections(TH3* hist, Bool_t save = kFALSE);
48 static void CreateDividedProjections(TH3* hist, TH3* hist2, const char* axis = 0, Bool_t putErrors = kFALSE, Bool_t save = kFALSE);
49 static const char* GetAxisTitle(TH3* hist, const char axis);
51 static void NormalizeToBinWidth(TH1* hist);
52 static void NormalizeToBinWidth(TH2* hist);
54 static void PrintConf(AnalysisMode analysisMode, AliTriggerAnalysis::Trigger trigger, DiffTreatment diffTreatment);
56 static Double_t Rapidity(Double_t pt, Double_t pz, Double_t m);
57 static Bool_t IsHadronLevelSingleDiffractive(AliStack* stack, Float_t cms, Float_t xiMin, Float_t xiMax);
60 static Int_t fgLastProcessType; // stores the raw value of the last process type extracted
62 ClassDef(AliPWG0Helper, 0)
65 AliPWG0Helper(const AliPWG0Helper&);
66 AliPWG0Helper& operator=(const AliPWG0Helper&);