]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/EMCALJetTasks/AliJetEmbeddingFromAODTask.h
further patch from Salvatore
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliJetEmbeddingFromAODTask.h
1 #ifndef ALIJETEMBEDDINGFROMAODTASK_H
2 #define ALIJETEMBEDDINGFROMAODTASK_H
3
4 // $Id: AliJetEmbeddingFromAODTask.h  $
5
6 class TFile;
7 class TObjArray;
8 class TClonesArray;
9 class TString;
10 class AliVCaloCells;
11 class AliVHeader;
12 class TH2;
13 class TH1;
14
15 #include "AliJetModelBaseTask.h"
16
17 class AliJetEmbeddingFromAODTask : public AliJetModelBaseTask {
18  public:
19   AliJetEmbeddingFromAODTask();
20   AliJetEmbeddingFromAODTask(const char *name, Bool_t drawqa=kFALSE); 
21   virtual ~AliJetEmbeddingFromAODTask();
22
23   void           UserCreateOutputObjects();
24   Bool_t         UserNotify();
25
26   void           SetFileList(TObjArray *list)                      { fFileList           = list  ; }
27   void           SetAODTreeName(const char *t)                     { fAODTreeName        = t     ; }
28   void           SetAODHeaderName(const char *t)                   { fAODHeaderName      = t     ; }
29   void           SetAODTracksName(const char *n)                   { fAODTrackName       = n     ; }
30   void           SetAODClusName(const char *n)                     { fAODClusName        = n     ; }
31   void           SetAODCellsName(const char *n)                    { fAODCellsName       = n     ; }
32   void           SetAODMCParticlesName(const char *n)              { fAODMCParticlesName = n     ; }
33   void           SetCentralityRange(Double_t min, Double_t max)    { fMinCentrality      = min   ; fMaxCentrality    = max ; }
34   void           SetTriggerMask(UInt_t mask)                       { fTriggerMask        = mask  ; }
35   void           SetAODfilterBits(Int_t b0 = 0, Int_t b1 = 0)      { fAODfilterBits[0]   = b0    ; fAODfilterBits[1] = b1  ; }
36   void           SetIncludeNoITS(Bool_t f)                         { fIncludeNoITS       = f     ; }
37   void           SetUseNegativeLabels(Bool_t f)                    { fUseNegativeLabels  = f     ; }
38   void           SetTrackEfficiency(Double_t eff = 0.95)           { fTrackEfficiency    = eff   ; }
39   void           SetTotalFiles(Int_t n)                            { fTotalFiles         = n     ; }
40   void           SetAttempts(Int_t n)                              { fAttempts           = n     ; }
41   void           SetRandomAccess(Bool_t r=kTRUE)                   { fRandomAccess       = r     ; }
42   void           SetMC(Bool_t a)                                   { fIsMC               = a     ; }
43
44  protected:
45   Bool_t          ExecOnce()            ;// intialize task
46   void            Run()                 ;// do jet model action
47   virtual TString GetNextFileName()     ;// get next file name from fFileList
48   virtual Bool_t  OpenNextFile()        ;// open next file
49   virtual Bool_t  GetNextEntry()        ;// get next entry in current tree
50   virtual Bool_t  IsAODEventSelected()  ;// AOD event trigger/centrality selection
51
52   TObjArray     *fFileList            ;//  List of AOD files 
53   Bool_t         fRandomAccess        ;//  Random access to file number and event
54   TString        fAODTreeName         ;//  Name of the tree in the AOD file
55   TString        fAODHeaderName       ;//  Name of the header in the AOD tree
56   TString        fAODVertexName       ;//  Name of the vertex branch in the AOD tree
57   TString        fAODTrackName        ;//  Name of the track collection branch in the AOD tree
58   TString        fAODClusName         ;//  Name of the cluster collection branch in the AOD tree
59   TString        fAODCellsName        ;//  Name of the cell collection branch in the AOD tree
60   TString        fAODMCParticlesName  ;//  Name of the cell collection branch in the AOD tree
61   Double_t       fMinCentrality       ;//  Minimum centrality
62   Double_t       fMaxCentrality       ;//  Maximum centrality
63   UInt_t         fTriggerMask         ;//  Trigger selection mask
64   Double_t       fZVertexCut          ;//  Z vertex cut
65   Int_t          fAODfilterBits[2]    ;//  AOD track filter bit map
66   Bool_t         fIncludeNoITS        ;//  True = includes tracks with failed ITS refit
67   Bool_t         fUseNegativeLabels   ;//  Whether or not should use negative MC labels
68   Double_t       fTrackEfficiency     ;//  Track efficiency
69   Bool_t         fIsMC                ;//  Whether the embedding AOD is MC or not
70   Int_t          fTotalFiles          ;//  Total number of files per pt hard bin
71   Int_t          fAttempts            ;//  Attempts to be tried before giving up in opening the next file
72   Bool_t         fEsdTreeMode         ;//! True = embed from ESD (must be a skimmed ESD!)
73   Int_t          fCurrentFileID       ;//! Current file being processed (via the event handler)
74   Int_t          fCurrentAODFileID    ;//! Current file ID
75   TFile         *fCurrentAODFile      ;//! Current open file
76   Int_t          fPicoTrackVersion    ;//! Version of the PicoTrack class (if any) in fCurrentAODFile
77   TTree         *fCurrentAODTree      ;//! Current open tree
78   AliVHeader    *fAODHeader           ;//! AOD header
79   TClonesArray  *fAODVertex           ;//! AOD vertex
80   TClonesArray  *fAODTracks           ;//! AOD track collection
81   TClonesArray  *fAODClusters         ;//! AOD cluster collection
82   AliVCaloCells *fAODCaloCells        ;//! AOD cell collection
83   TClonesArray  *fAODMCParticles      ;//! AOD MC particles collection
84   Int_t          fCurrentAODEntry     ;//! Current entry in the AOD tree
85   TH2           *fHistFileMatching    ;//! Current file ID vs. AOD file ID (to be embedded)
86   TH1           *fHistAODFileError    ;//! AOD file ID (to be embedded) error
87   TH1           *fHistNotEmbedded     ;//! File ID not embedded
88
89  private:
90   AliJetEmbeddingFromAODTask(const AliJetEmbeddingFromAODTask&);            // not implemented
91   AliJetEmbeddingFromAODTask &operator=(const AliJetEmbeddingFromAODTask&); // not implemented
92
93   ClassDef(AliJetEmbeddingFromAODTask, 5) // Jet embedding from AOD task
94 };
95 #endif