X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=PWG4%2FJetTasks%2FAliAnalysisHelperJetTasks.h;h=373787ac939e673f5f37bea56cdcdcd85484cade;hp=714f462b2a57f36cdcc880202e0bd1aa1bd4185d;hb=f4132e7dc868c54f88cc442b5b2696c92417bc1b;hpb=edfbe4768635b9975cbd89fd2a5f5524808b9afc diff --git a/PWG4/JetTasks/AliAnalysisHelperJetTasks.h b/PWG4/JetTasks/AliAnalysisHelperJetTasks.h index 714f462b2a5..373787ac939 100644 --- a/PWG4/JetTasks/AliAnalysisHelperJetTasks.h +++ b/PWG4/JetTasks/AliAnalysisHelperJetTasks.h @@ -8,6 +8,7 @@ class AliVEvent; class TString; class AliGenPythiaEventHeader; class TVector3; +class AliGenEventHeader; // Helper Class that contains a lot of usefull static functions (i.e. for Flavor selection. @@ -15,7 +16,32 @@ class AliAnalysisHelperJetTasks : public TObject { public: AliAnalysisHelperJetTasks() : TObject() {;} virtual ~AliAnalysisHelperJetTasks(){;} - + + + enum {kMaxJets = 6}; // needed for array size not to fragemnt memory on the heap by many new/delete + + + enum { kNone = 1<<0, + kBunchBunch = 1<<1, + kBunchEmpty = 1<<2, + kEmptyEmpty= 1<<3, + kV0A=1<<4, + kV0C=1<<5, + kNoV0BG=1<<6, + kSPDFO=1<<7, + kPhysicsSelection = 1<<8, + kVertexIn = 1<<9, + kIsCosmic = 1<<10, + kIsPileUp = 1<<11, + kIsMCND=1<<12, + kIsMCDD=1<<13, + kIsMCSD=1<<14, + kTotalSelections = (1<<15) - 1}; + + enum Trigger {kAcceptAll = 0,kMB1,kMB2,kMB3,kSPDGFO,kTrigger}; // + // same as in PWG0Helper + enum MCProcessType { kInvalidProcess = -1, kND = 0x1, kDD = 0x2, kSD = 0x4, kOnePart = 0x8 }; + static AliGenPythiaEventHeader* GetPythiaEventHeader(AliMCEvent *mcEvent); static void PrintStack(AliMCEvent *mcEvent,Int_t iFirst = 0,Int_t iLast = 0,Int_t iMaxPrint = 10); static void GetClosestJets(AliAODJet *genJets, @@ -26,21 +52,35 @@ class AliAnalysisHelperJetTasks : public TObject { Int_t *iRecIndex, Int_t iDebug, Float_t maxDist = 0.5); - static void MergeOutput(char* cFiles, char* cList = "pwg4spec"); // Merges the files in the input text file needs the two histograms fh1PtHard_Trials, fh1Xsec and the name of the input list + static void MergeOutputDirs(const char* cFiles,const char* cPattern,const char *cOutFile,Bool_t bUpdate = false); // merges all directories containing the pattern + + 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 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 + static Bool_t PrintDirectorySize(const char* currFile); // print the size of the output on a given file static Bool_t GetEventShapes(TVector3 &n01, TVector3 * pTrack, Int_t nTracks, Double_t * eventShapes); - enum {kMaxJets = 6}; // needed for array size not to fragemnt memory on the heap by many new/delete - enum Trigger {kAcceptAll = 0,kMB1,kMB2,kMB3,kSPDGFO,kTrigger}; // + static MCProcessType GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE); + static MCProcessType GetDPMjetEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE); + static Int_t GetLastProcessType() { return fgLastProcessType; } static Bool_t Selected(Bool_t bSet = kFALSE,Bool_t bNew = kTRUE); // static function to store the state of selection from service task + + static Bool_t IsPileUp(); // Wrapper for SelectInfo with PileUp + static Bool_t IsCosmic(); // Wrapper for SelectInfo with cosmic + static Bool_t TestSelectInfo(UInt_t iMask); // Wrapper for testing the SelectInfo bitmask + static Bool_t TestEventClass(Int_t iClass); // Wrapper for testing the SelectInfo bitmask + + 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 + 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 // these methods have been essentially copied from PWG0/AliTriggerAnalysis and expanded to use with AOD static Bool_t IsTriggerFired(const AliVEvent* aEsd, Trigger trigger); private: - ClassDef(AliAnalysisHelperJetTasks, 1) + static Int_t fgLastProcessType; // stores the raw value of the last process type extracted + + ClassDef(AliAnalysisHelperJetTasks, 4) }; #endif // ALIANALYSISHELPERJETTASKS_H