New method UserExecMixed
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskSE.h
1 #ifndef ALIANALYSISTASKSE_H
2 #define ALIANALYSISTASKSE_H
3  
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 #include "AliAnalysisTask.h"
10 #include "AliVEvent.h"
11
12 class AliAODEvent;
13 class AliAODHeader;
14 class AliAODTracklets;
15 class AliAODCaloCells;
16 class AliMCEvent;
17 class AliMCEventHandler;
18 class AliInputEventHandler;
19 class AliMultiInputEventHandler;
20 class AliAnalysisCuts;
21 class AliESDfriend;
22 class AliEventTag;
23
24 class TTree;
25 class TList;
26
27
28 class AliAnalysisTaskSE : public AliAnalysisTask
29 {
30  public:
31     AliAnalysisTaskSE();
32     AliAnalysisTaskSE(const char* name);
33     AliAnalysisTaskSE(const AliAnalysisTaskSE& obj);
34     AliAnalysisTaskSE& operator=(const AliAnalysisTaskSE& other);
35     virtual ~AliAnalysisTaskSE() {;}
36     // Implementation of interface methods
37     virtual void   ConnectInputData(Option_t *option = "");
38     virtual void   CreateOutputObjects();
39     virtual void   Exec(Option_t* option);
40     virtual void   SetDebugLevel(Int_t level) {fDebug = level;}
41     virtual void   Init() {;}
42     virtual Bool_t Notify();
43     // To be implemented by user
44     virtual void   UserCreateOutputObjects()  {;}
45     virtual void   UserExec(Option_t* /*option*/) {;}
46     virtual void   UserExecMix(Option_t *option = "") {;}
47     virtual Bool_t UserNotify() {return kTRUE;}
48     virtual void   NotifyRun()  {;}
49     
50     // Helpers for adding branches to the AOD
51     virtual void   AddAODBranch(const char* cname, void* addobj, const char *fname="");
52     // Event Selection
53     virtual void   SelectCollisionCandidates(UInt_t offlineTriggerMask = AliVEvent::kMB) {fOfflineTriggerMask = offlineTriggerMask;}
54     // Loading the declared input branches
55     void           LoadBranches() const;
56  // Getters
57     virtual Int_t         DebugLevel()  {return fDebug;     }
58     virtual AliVEvent*    InputEvent()  {return fInputEvent;}
59     virtual AliESDfriend* ESDfriend()   {return fESDfriend; }
60     virtual AliAODEvent*  AODEvent()    {return fOutputAOD; }
61     virtual TTree*        OutputTree()  {return fTreeA;     }
62     virtual AliMCEvent*   MCEvent()     {return fMCEvent;   }
63     virtual Long64_t      Entry()       {return fEntry;     }
64     virtual const AliEventTag *EventTag() const;
65     virtual const char*   CurrentFileName();
66     virtual Bool_t        IsStandardAOD() const;
67     virtual TList*        GetQAHistos()   const {return fHistosQA;}
68     virtual Bool_t        IsEventInBinZero() { return kFALSE;}
69  protected:
70     void ConnectMultiHandler();
71     void DisconnectMultiHandler();
72
73   protected:
74     Int_t                 fDebug;           //  Debug flag
75     // IO
76     Int_t                 fEntry;           //  Current entry in the chain
77     AliVEvent*            fInputEvent;      //! VEvent Input
78     AliESDfriend*         fESDfriend;       //! ESD friend
79     AliInputEventHandler* fInputHandler;    //! Input Handler
80     AliAODEvent*          fOutputAOD;       //! AOD out 
81     AliMCEvent*           fMCEvent;         //! MC
82     TTree*                fTreeA;           //  AOD output Tree
83     Int_t                 fCurrentRunNumber;//! Current run number
84     // Output histos for QA
85     TList*                fHistosQA;        //! Output histos for QA
86     // Provisions for replication
87     static AliAODHeader*    fgAODHeader;        //! Header for replication
88     static TClonesArray*    fgAODTracks;        //! Tracks for replication
89     static TClonesArray*    fgAODVertices;      //! Vertices for replication
90     static TClonesArray*    fgAODV0s;           //! V0s for replication
91     static TClonesArray*    fgAODPMDClusters;   //! PMDClusters for replication
92     static TClonesArray*    fgAODJets;          //! Jets for replication
93     static TClonesArray*    fgAODFMDClusters;   //! FMDClusters for replication
94     static TClonesArray*    fgAODCaloClusters;  //! CaloClusters for replication
95     static TClonesArray*    fgAODMCParticles;   //! MC Particles for replicatio
96     static AliAODTracklets* fgAODTracklets;     //! Tracklets for replication
97     static AliAODCaloCells* fgAODEmcalCells;    //! Emcal Cell replication
98     static AliAODCaloCells* fgAODPhosCells;     //! Phos  Cell replication
99     static TClonesArray*    fgAODDimuons;       //! Dimuons replication
100     // Event Selection
101     UInt_t fOfflineTriggerMask;   //  Task processes collision candidates only
102     // Event Mixing
103     AliMultiInputEventHandler *fMultiInputHandler;  //! pointer to multihandler
104     AliMCEventHandler         *fMCEventHandler;     //! pointer to MCEventHandler
105     ClassDef(AliAnalysisTaskSE, 4); // Analysis task for standard jet analysis
106 };
107  
108 #endif