]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/EMCALJetTasks/AliJetEmbeddingFromPYTHIATask.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliJetEmbeddingFromPYTHIATask.h
1 #ifndef ALIJETEMBEDDINGFROMPYTHIATASK_H
2 #define ALIJETEMBEDDINGFROMPYTHIATASK_H
3
4 #include "AliJetEmbeddingFromAODTask.h"
5 #include <TArrayD.h>
6
7 template<class T> 
8 class TParameter;
9
10 class TString;
11 class TH1;
12 class THashTable;
13
14 class AliJetEmbeddingFromPYTHIATask : public AliJetEmbeddingFromAODTask {
15  public:
16   AliJetEmbeddingFromPYTHIATask();
17   AliJetEmbeddingFromPYTHIATask(const char *name, Bool_t drawqa=kFALSE); 
18   virtual ~AliJetEmbeddingFromPYTHIATask();
19
20   Bool_t         UserNotify();
21   void           UserCreateOutputObjects();
22
23   void           SetPYTHIAPath(const char* p)                      { fPYTHIAPath                                = p ; }
24   void           SetPtHardBinScaling(Int_t n, Double_t *scaling)   { new (&fPtHardBinScaling) TArrayD(n, scaling)   ; }
25   void           SetAnchorRun(Int_t r)                             { fAnchorRun                                 = r ; }
26   void           SetLHC11hAnchorRuns(Bool_t a=kTRUE)               { fLHC11hAnchorRun                           = a ; }
27   void           SetFileTable(THashTable *t)                       { fFileTable                                 = t ; }
28   void           SetUseAsVetoTable(Bool_t v)                       { fUseAsVetoTable                            = v ; }
29   void           SetMinEntriesPerPtHardBin(Int_t r)                { fMinEntriesPerPtHardBin                    = r ; }
30
31  protected:
32   Bool_t           ExecOnce()               ;// intialize task
33   Bool_t           GetNextEntry()           ;// get next entry in current tree
34   Int_t            GetRandomPtHardBin()     ;// get a radnom pt hard bin according to fPtHardBinScaling
35   TFile           *GetNextFile()            ;// get next file
36
37   TString          fPYTHIAPath              ;// Path of the PYTHIA production
38   TArrayD          fPtHardBinScaling        ;// Pt hard bin scaling
39   Bool_t           fLHC11hAnchorRun         ;// LHC11h anchor runs
40   Int_t            fAnchorRun               ;// Anchor run
41   THashTable      *fFileTable               ;// Table of allowed/vetoed files
42   Bool_t           fUseAsVetoTable          ;// Use fFileTable as a veto table
43   Int_t            fMinEntriesPerPtHardBin  ;// Minimum number of embedded events before changing pt hard bin, if < 0 change pt hard bin only when reach eof 
44   Int_t            fCurrentPtHardBin        ;//!Pt hard bin of the current open file
45   TParameter<int> *fPtHardBinParam          ;//!Pt hard bin param
46   Int_t            fPtHardBinCount          ;//!Number of event embedded from the current pt hard bin
47
48   TH1             *fHistPtHardBins          ;//!Embeded pt hard bin distribution
49
50  private:
51   AliJetEmbeddingFromPYTHIATask(const AliJetEmbeddingFromPYTHIATask&);            // not implemented
52   AliJetEmbeddingFromPYTHIATask &operator=(const AliJetEmbeddingFromPYTHIATask&); // not implemented
53
54   ClassDef(AliJetEmbeddingFromPYTHIATask, 4) // Jet embedding from PYTHIA task
55 };
56 #endif