]>
Commit | Line | Data |
---|---|---|
f3050824 | 1 | #ifndef ALIANALYSISHELPERJETTASKS_H |
2 | #define ALIANALYSISHELPERJETTASKS_H | |
f3050824 | 3 | #include "TObject.h" |
6f3f79de | 4 | |
f3050824 | 5 | class AliMCEvent; |
db6bcb0e | 6 | class AliAODJet; |
59543510 | 7 | class AliVEvent; |
519378fb | 8 | class TString; |
c74e9b54 | 9 | class TArrayI; |
f3050824 | 10 | class AliGenPythiaEventHeader; |
6f3f79de | 11 | class TVector3; |
955d29ba | 12 | class AliGenEventHeader; |
f3050824 | 13 | |
aeb249fb | 14 | |
15 | // | |
16 | // Helper Class that contains a lot of | |
17 | // usefull static functions jet matchin pythia access etc. | |
18 | // | |
19 | ||
f3050824 | 20 | |
21 | class AliAnalysisHelperJetTasks : public TObject { | |
22 | public: | |
23 | AliAnalysisHelperJetTasks() : TObject() {;} | |
24 | virtual ~AliAnalysisHelperJetTasks(){;} | |
383d44fd | 25 | |
26 | ||
3dc5a1a4 | 27 | enum {kMaxJets = 6}; // needed for array size not to fragemnt memory on the heap by many new/delete |
45a11aef | 28 | |
29 | ||
30 | enum { kNone = 1<<0, | |
31 | kBunchBunch = 1<<1, | |
32 | kBunchEmpty = 1<<2, | |
33 | kEmptyEmpty= 1<<3, | |
3493c3a9 | 34 | kV0A=1<<4, |
35 | kV0C=1<<5, | |
36 | kNoV0BG=1<<6, | |
37 | kSPDFO=1<<7, | |
38 | kPhysicsSelection = 1<<8, | |
39 | kVertexIn = 1<<9, | |
40 | kIsCosmic = 1<<10, | |
41 | kIsPileUp = 1<<11, | |
42 | kIsMCND=1<<12, | |
43 | kIsMCDD=1<<13, | |
44 | kIsMCSD=1<<14, | |
45 | kTotalSelections = (1<<15) - 1}; | |
59543510 | 46 | |
7fa8b2da | 47 | enum Trigger {kAcceptAll = 0,kMB1,kMB2,kMB3,kSPDGFO,kTrigger}; // |
955d29ba | 48 | // same as in PWG0Helper |
49 | enum MCProcessType { kInvalidProcess = -1, kND = 0x1, kDD = 0x2, kSD = 0x4, kOnePart = 0x8 }; | |
50 | ||
aeb249fb | 51 | static AliGenPythiaEventHeader* GetPythiaEventHeader(const AliMCEvent *mcEvent); |
955d29ba | 52 | static void PrintStack(AliMCEvent *mcEvent,Int_t iFirst = 0,Int_t iLast = 0,Int_t iMaxPrint = 10); |
53 | static void GetClosestJets(AliAODJet *genJets, | |
54 | const Int_t &kGenJets, | |
aeb249fb | 55 | const AliAODJet *recJets, |
955d29ba | 56 | const Int_t &kRecJets, |
57 | Int_t *iGenIndex, | |
58 | Int_t *iRecIndex, | |
c74e9b54 | 59 | Int_t iDebug = 0, Float_t maxDist = 0.3); |
60 | ||
aeb249fb | 61 | static void GetClosestJets(const TList *genJetsList,const Int_t &kGenJets, |
62 | const TList *recJetsList,const Int_t &kRecJets, | |
c74e9b54 | 63 | TArrayI &iGenIndex,TArrayI &iRecIndex, |
64 | Int_t iDebug = 0,Float_t maxDist = 0.3); | |
a7ac11bf | 65 | |
aeb249fb | 66 | static void GetJetMatching(const TList *genJetsList, const Int_t &kGenJets, |
67 | const TList *recJetsList, const Int_t &kRecJets, | |
a7ac11bf | 68 | TArrayI &iMatchIndex, TArrayF &fPtFraction, |
69 | Int_t iDebug = 0, Float_t maxDist = 0.3); | |
70 | ||
aeb249fb | 71 | static Double_t GetFractionOfJet(const AliAODJet *recJet,const AliAODJet *genJet); |
c74e9b54 | 72 | |
955d29ba | 73 | |
57cd3e7c | 74 | static void MergeOutputDirs(const char* cFiles,const char* cPattern,const char *cOutFile,Bool_t bUpdate = false); // merges all directories containing the pattern |
c6049d04 | 75 | |
955d29ba | 76 | 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 |
77 | 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 | |
1aa3886d | 78 | static Bool_t PrintDirectorySize(const char* currFile,Int_t iDetail = -1); // print the size of the output on a given file |
aeb249fb | 79 | static Bool_t GetEventShapes(TVector3 &n01,const TVector3 * pTrack, Int_t nTracks, Double_t * eventShapes); |
955d29ba | 80 | |
81 | static MCProcessType GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE); | |
82 | static MCProcessType GetDPMjetEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE); | |
83 | static Int_t GetLastProcessType() { return fgLastProcessType; } | |
59543510 | 84 | |
85 | static Bool_t Selected(Bool_t bSet = kFALSE,Bool_t bNew = kTRUE); // static function to store the state of selection from service task | |
2c7fd246 | 86 | static Double_t ReactionPlane(Bool_t bSet = kFALSE,Double_t fNew = 0); |
40445651 | 87 | static Int_t GetPhiBin(Double_t phi,Int_t fNRPbins); |
f2dd0695 | 88 | |
89 | static Bool_t IsPileUp(); // Wrapper for SelectInfo with PileUp | |
90 | static Bool_t IsCosmic(); // Wrapper for SelectInfo with cosmic | |
45a11aef | 91 | static Bool_t TestSelectInfo(UInt_t iMask); // Wrapper for testing the SelectInfo bitmask |
f4132e7d | 92 | static Bool_t TestEventClass(Int_t iClass); // Wrapper for testing the SelectInfo bitmask |
f2dd0695 | 93 | |
94 | 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 | 95 | 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 | 96 | |
97 | // these methods have been essentially copied from PWG0/AliTriggerAnalysis and expanded to use with AOD | |
98 | static Bool_t IsTriggerFired(const AliVEvent* aEsd, Trigger trigger); | |
59543510 | 99 | |
f3050824 | 100 | private: |
101 | ||
955d29ba | 102 | static Int_t fgLastProcessType; // stores the raw value of the last process type extracted |
103 | ||
aeb249fb | 104 | ClassDef(AliAnalysisHelperJetTasks, 6) |
f3050824 | 105 | }; |
106 | ||
107 | #endif // ALIANALYSISHELPERJETTASKS_H |