1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //-----------------------------------------------------------------------
17 // Author : R. Vernet, Consorzio Cometa - Catania (it)
18 //-----------------------------------------------------------------------
23 #include "AliAnalysisTask.h"
28 class AliMCEventHandler;
35 class AliCFV0Task : public AliAnalysisTask {
40 kStepReconstructible = 1,
41 kStepReconstructed = 2,
46 AliCFV0Task(const Char_t* name);
47 AliCFV0Task& operator= (const AliCFV0Task& c);
48 AliCFV0Task(const AliCFV0Task& c);
49 virtual ~AliCFV0Task();
51 // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
52 void ConnectInputData(Option_t *option="");
53 void CreateOutputObjects();
54 void Exec(Option_t *option);
55 void Init(); //loads the CF manager
56 void LocalInit() {Init();} //needed for the slaves
57 void Terminate(Option_t *);
59 // CORRECTION FRAMEWORK RELATED FUNCTIONS
60 void SetCFManager(AliCFManager* io) {fCFManager = io;} // global correction manager
61 AliCFManager * GetCFManager() {return fCFManager;} // get corr manager
63 void SetRebuildV0s(Bool_t flag) {fRebuildV0s = flag;} // setter for V0 on-the-fly reconstruction
64 void SetV0PDG(Int_t code) {fV0PDG = code; } // defines the PDG code of searched V0's
65 Int_t IsMcV0(AliESDv0*, AliESDEvent*, AliStack*) const ; // checks if the AliESDv0 can be associated, returns mother label
66 Int_t GetV0Label(UInt_t, UInt_t, AliStack*) const ; // returns label of V0 given 2 daughter labels
67 static Double_t GetRapidity(Double_t, Double_t) ; // returns the rapidity of the V0 (assuming PDG code)
71 void RebuildV0s() ; // reconstructs V0's on-fly
73 Bool_t fRebuildV0s; // flag for on-the-fly V0 reconstruction
74 Int_t fV0PDG; // PDG code of searched V0's
75 TChain *fChain ; // chained files
76 AliESDEvent *fESD ; // pointer to the ESD event read
77 AliCFManager *fCFManager ; // pointer to the CF manager
81 TH1I *fHistEventsProcessed; //! simple histo for monitoring the number of events processed
83 ClassDef(AliCFV0Task,1);