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