]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/JetTasks/AliAnalysisHelperJetTasks.h
Added fit macro from M. Putis
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnalysisHelperJetTasks.h
CommitLineData
f3050824 1#ifndef ALIANALYSISHELPERJETTASKS_H
2#define ALIANALYSISHELPERJETTASKS_H
f3050824 3#include "TObject.h"
6f3f79de 4
f3050824 5class AliMCEvent;
db6bcb0e 6class AliAODJet;
59543510 7class AliVEvent;
519378fb 8class TString;
c74e9b54 9class TArrayI;
f3050824 10class AliGenPythiaEventHeader;
6f3f79de 11class TVector3;
955d29ba 12class AliGenEventHeader;
f3050824 13
14// Helper Class that contains a lot of usefull static functions (i.e. for Flavor selection.
15
16class AliAnalysisHelperJetTasks : public TObject {
17 public:
18 AliAnalysisHelperJetTasks() : TObject() {;}
19 virtual ~AliAnalysisHelperJetTasks(){;}
383d44fd 20
21
3dc5a1a4 22 enum {kMaxJets = 6}; // needed for array size not to fragemnt memory on the heap by many new/delete
45a11aef 23
24
25 enum { kNone = 1<<0,
26 kBunchBunch = 1<<1,
27 kBunchEmpty = 1<<2,
28 kEmptyEmpty= 1<<3,
3493c3a9 29 kV0A=1<<4,
30 kV0C=1<<5,
31 kNoV0BG=1<<6,
32 kSPDFO=1<<7,
33 kPhysicsSelection = 1<<8,
34 kVertexIn = 1<<9,
35 kIsCosmic = 1<<10,
36 kIsPileUp = 1<<11,
37 kIsMCND=1<<12,
38 kIsMCDD=1<<13,
39 kIsMCSD=1<<14,
40 kTotalSelections = (1<<15) - 1};
59543510 41
7fa8b2da 42 enum Trigger {kAcceptAll = 0,kMB1,kMB2,kMB3,kSPDGFO,kTrigger}; //
955d29ba 43 // same as in PWG0Helper
44 enum MCProcessType { kInvalidProcess = -1, kND = 0x1, kDD = 0x2, kSD = 0x4, kOnePart = 0x8 };
45
955d29ba 46 static AliGenPythiaEventHeader* GetPythiaEventHeader(AliMCEvent *mcEvent);
47 static void PrintStack(AliMCEvent *mcEvent,Int_t iFirst = 0,Int_t iLast = 0,Int_t iMaxPrint = 10);
48 static void GetClosestJets(AliAODJet *genJets,
49 const Int_t &kGenJets,
50 AliAODJet *recJets,
51 const Int_t &kRecJets,
52 Int_t *iGenIndex,
53 Int_t *iRecIndex,
c74e9b54 54 Int_t iDebug = 0, Float_t maxDist = 0.3);
55
56 static void GetClosestJets(TList *genJetsList,const Int_t &kGenJets,
57 TList *recJetsList,const Int_t &kRecJets,
58 TArrayI &iGenIndex,TArrayI &iRecIndex,
59 Int_t iDebug = 0,Float_t maxDist = 0.3);
60
955d29ba 61
57cd3e7c 62 static void MergeOutputDirs(const char* cFiles,const char* cPattern,const char *cOutFile,Bool_t bUpdate = false); // merges all directories containing the pattern
c6049d04 63
955d29ba 64 static void MergeOutput(char* cFiles, char* cDir = "",char *cList = "",char* cOutFile ="allpt.root",Bool_t bUpdate = false); // Merges the files in the input text file needs the two histograms fh1PtHard_Trials, fh1Xsec and the name of the input list
65 static Bool_t PythiaInfoFromFile(const char* currFile,Float_t &fXsec,Float_t &fTrials);// get the cross section and the trails either from pyxsec.root or from pysec_hists.root
66 static Bool_t PrintDirectorySize(const char* currFile); // print the size of the output on a given file
67 static Bool_t GetEventShapes(TVector3 &n01, TVector3 * pTrack, Int_t nTracks, Double_t * eventShapes);
68
69 static MCProcessType GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
70 static MCProcessType GetDPMjetEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
71 static Int_t GetLastProcessType() { return fgLastProcessType; }
59543510 72
73 static Bool_t Selected(Bool_t bSet = kFALSE,Bool_t bNew = kTRUE); // static function to store the state of selection from service task
f2dd0695 74
75 static Bool_t IsPileUp(); // Wrapper for SelectInfo with PileUp
76 static Bool_t IsCosmic(); // Wrapper for SelectInfo with cosmic
45a11aef 77 static Bool_t TestSelectInfo(UInt_t iMask); // Wrapper for testing the SelectInfo bitmask
f4132e7d 78 static Bool_t TestEventClass(Int_t iClass); // Wrapper for testing the SelectInfo bitmask
f2dd0695 79
80 static UInt_t SelectInfo(Bool_t bSet = kFALSE,UInt_t iNew = 0); // static function to store the state bitmask of the selection from service task
f4132e7d 81 static Int_t EventClass(Bool_t bSet = kFALSE,Int_t iNew = 0); // static function to store the event class of the selection from service task
59543510 82
83 // these methods have been essentially copied from PWG0/AliTriggerAnalysis and expanded to use with AOD
84 static Bool_t IsTriggerFired(const AliVEvent* aEsd, Trigger trigger);
59543510 85
f3050824 86 private:
87
955d29ba 88 static Int_t fgLastProcessType; // stores the raw value of the last process type extracted
89
f4132e7d 90 ClassDef(AliAnalysisHelperJetTasks, 4)
f3050824 91};
92
93#endif // ALIANALYSISHELPERJETTASKS_H