2 /**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * Author: Satyajit Jena. *
6 * Contributors are mentioned in the code where appropriate. *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
17 /*-------------------------------------------------------------------------
18 * AliEbyECFAnalysisTask Class
19 * This class deals with runing Charge Fluctuation Task
20 * origin: Satyajit Jena <sjena@cern.ch>
21 * CF: Charge Fluctuation
22 *------------------------------------------------------------------------*/
34 #include "AliAnalysisManager.h"
35 #include "AliVEvent.h"
37 #include "AliESDEvent.h"
38 #include "AliAODEvent.h"
39 #include "AliEbyEEventBase.h"
40 #include "AliEbyEChargeFluctuationAnalysis.h"
41 #include "AliEbyECFAnalysisTask.h"
43 ClassImp(AliEbyECFAnalysisTask)
45 //________________________________________________________________________
46 AliEbyECFAnalysisTask::AliEbyECFAnalysisTask(const char *name)
47 : AliAnalysisTaskSE(name),
54 // DefineInput(0, TChain::Class());
55 DefineOutput(1, TList::Class());
58 //________________________________________________________________________
59 void AliEbyECFAnalysisTask::UserCreateOutputObjects() {
61 fListPhy = new TList();
63 fEvtCounter = new TH1F("hEvtCounter","Event Statistic",50,0,50);
64 fListPhy->Add(fEvtCounter);
68 fListPhy->Add(dynamic_cast<AliEbyEEventBase*>(fEbyECFBase->GetEbyEEventBaseObject())->GetQA());
69 fListPhy->Add(fEbyECFBase->GetListCFQA());
70 fListPhy->Add(fEbyECFBase->GetListMeasureCF());
72 PostData(1, fListPhy);
75 //________________________________________________________________________
76 void AliEbyECFAnalysisTask::UserExec(Option_t *) {
81 TString gAnalType = dynamic_cast<AliEbyEEventBase*>(fEbyECFBase->GetEbyEEventBaseObject())->GetAnalysisLevel();
83 if(gAnalType == "ESD")
85 AliESDEvent* gESD = dynamic_cast<AliESDEvent*>(InputEvent());
87 Printf("ERROR: gESD not available");
90 const AliESDVertex *vertex = dynamic_cast<AliEbyEEventBase*>(fEbyECFBase->GetEbyEEventBaseObject())->GetVertex(gESD,dynamic_cast<AliEbyEEventBase*>(fEbyECFBase->GetEbyEEventBaseObject())->GetAnalysisMode(),dynamic_cast<AliEbyEEventBase*>(fEbyECFBase->GetEbyEEventBaseObject())->GetVxMax(),dynamic_cast<AliEbyEEventBase*>(fEbyECFBase->GetEbyEEventBaseObject())->GetVyMax(),dynamic_cast<AliEbyEEventBase*>(fEbyECFBase->GetEbyEEventBaseObject())->GetVzMax());
93 fEbyECFBase->Analyze(gESD);
97 PostData(1, fListPhy);
101 //______________________________________________________________________//
102 void AliEbyECFAnalysisTask::Terminate(Option_t *) {
104 fListPhy = dynamic_cast<TList*> (GetOutputData(1));
106 Error("Terminate","Out Put List not available");
110 Info("AliEbyECFAnalysisTask","Charge Fluctuation Job Successfully finished");