/************************************************************************* * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /************************************** * analysis task for Q-cumulants * * * * authors: Naomi van der Kolk * * (kolk@nikhef.nl) * * Raimond Snellings * * (snelling@nikhef.nl) * * Ante Bilandzic * * (anteb@nikhef.nl) * * ***********************************/ #include "Riostream.h" #include "TChain.h" #include "TTree.h" #include "TFile.h" #include "TList.h" #include "TH1.h" #include "TGraph.h" #include "TProfile.h" #include "TProfile2D.h" #include "TProfile3D.h" #include "TBits.h" #include "AliAnalysisTask.h" #include "AliAnalysisDataSlot.h" #include "AliAnalysisDataContainer.h" #include "AliAnalysisManager.h" #include "AliFlowEventSimple.h" #include "AliAnalysisTaskQCumulants.h" #include "AliFlowAnalysisWithQCumulants.h" #include "AliFlowCumuConstants.h" #include "AliFlowCommonConstants.h" #include "AliFlowCommonHist.h" #include "AliFlowCommonHistResults.h" ClassImp(AliAnalysisTaskQCumulants) //================================================================================================================ AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants(const char *name, Bool_t useWeights): AliAnalysisTask(name,""), fEvent(NULL), fQCA(NULL), // Q-cumulant Analysis (QCA) object fListHistos(NULL), fUseWeights(useWeights), fUsePhiWeights(kFALSE), fUsePtWeights(kFALSE), fUseEtaWeights(kFALSE), fListWeights(NULL) { // constructor cout<<"AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants(const char *name)"<Init(); //weights: if(fUseWeights) { //pass the flags to class: if(fUsePhiWeights) fQCA->SetUsePhiWeights(fUsePhiWeights); if(fUsePtWeights) fQCA->SetUsePtWeights(fUsePtWeights); if(fUseEtaWeights) fQCA->SetUseEtaWeights(fUseEtaWeights); //get data from input slot #1 which is used for weights: if(GetNinputs()==2) { fListWeights = (TList*)GetInputData(1); } //pass the list with weights to class: if(fListWeights) fQCA->SetWeightsList(fListWeights); } if(fQCA->GetHistList()) { fListHistos = fQCA->GetHistList(); //fListHistos->Print(); } else { Printf(" ERROR: Could not retrieve histogram list (QC, Task::COO)"); } //PostData(0,fListHistos); } //================================================================================================================ void AliAnalysisTaskQCumulants::Exec(Option_t *) { // main loop (called for each event) fEvent = dynamic_cast(GetInputData(0)); // Q-cumulants if(fEvent) { fQCA->Make(fEvent); }else { cout<<" WARNING: No input data (QC, Task::E) !!!"<Print(); fQCA = new AliFlowAnalysisWithQCumulants(); if (fListHistos) { fQCA->GetOutputHistograms(fListHistos); fQCA->Finish(); } else { cout<<" WARNING: histogram list pointer is empty (QC, Task::Terminate())"<