/************************************************************************* * 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 mixed harmomics * * * * authors: Naomi van der Kolk * * (kolk@nikhef.nl) * * Raimond Snellings * * (snelling@nikhef.nl) * * Ante Bilandzic * * (anteb@nikhef.nl) * * ***********************************/ class TFile; class TList; class AliAnalysisTaskSE; #include "Riostream.h" #include "AliFlowEventSimple.h" #include "AliAnalysisTaskMixedHarmonics.h" #include "AliFlowAnalysisWithMixedHarmonics.h" ClassImp(AliAnalysisTaskMixedHarmonics) //================================================================================================================ AliAnalysisTaskMixedHarmonics::AliAnalysisTaskMixedHarmonics(const char *name, Bool_t useParticleWeights): AliAnalysisTaskSE(name), fEvent(NULL), fMH(NULL), fListHistos(NULL), fHarmonic(1), fNoOfMultipicityBins(100), fMultipicityBinWidth(1.), fMinMultiplicity(3.), fOppositeChargesPOI(kFALSE), fEvaluateDifferential3pCorrelator(kFALSE), fCorrectForDetectorEffects(kFALSE), fPrintOnTheScreen(kTRUE), fCalculateVsM(kFALSE), fShowBinLabelsVsM(kFALSE), fUseParticleWeights(useParticleWeights), fUsePhiWeights(kFALSE), fUsePtWeights(kFALSE), fUseEtaWeights(kFALSE), fWeightsList(NULL) { // constructor cout<<"AliAnalysisTaskMixedHarmonics::AliAnalysisTaskMixedHarmonics(const char *name, Bool_t useParticleWeights)"<SetHarmonic(fHarmonic); fMH->SetNoOfMultipicityBins(fNoOfMultipicityBins); fMH->SetMultipicityBinWidth(fMultipicityBinWidth); fMH->SetMinMultiplicity(fMinMultiplicity); fMH->SetOppositeChargesPOI(fOppositeChargesPOI); fMH->SetEvaluateDifferential3pCorrelator(fEvaluateDifferential3pCorrelator); fMH->SetCorrectForDetectorEffects(fCorrectForDetectorEffects); fMH->SetPrintOnTheScreen(fPrintOnTheScreen); fMH->SetCalculateVsM(fCalculateVsM); fMH->SetShowBinLabelsVsM(fShowBinLabelsVsM); if(fUseParticleWeights) { // Pass the flags to class: if(fUsePhiWeights) fMH->SetUsePhiWeights(fUsePhiWeights); if(fUsePtWeights) fMH->SetUsePtWeights(fUsePtWeights); if(fUseEtaWeights) fMH->SetUseEtaWeights(fUseEtaWeights); // Get data from input slot #1 which is used for weights: if(GetNinputs()==2) { fWeightsList = (TList*)GetInputData(1); } // Pass the list with weights to class: if(fWeightsList) fMH->SetWeightsList(fWeightsList); } fMH->Init(); if(fMH->GetHistList()) { fListHistos = fMH->GetHistList(); // fListHistos->Print(); } else { Printf("ERROR: Could not retrieve histogram list (MH, Task::UserCreateOutputObjects()) !!!!"); } PostData(1,fListHistos); } // end of void AliAnalysisTaskMixedHarmonics::UserCreateOutputObjects() //================================================================================================================ void AliAnalysisTaskMixedHarmonics::UserExec(Option_t *) { // main loop (called for each event) fEvent = dynamic_cast(GetInputData(0)); // Mixed Harmonics: if(fEvent) { fMH->Make(fEvent); } else { cout<<"WARNING: No input data (MH, Task::UserExec()) !!!!"<GetOutputHistograms(fListHistos); fMH->Finish(); PostData(1,fListHistos); } else { cout<<" WARNING: histogram list pointer is empty (MH, Task::Terminate()) !!!!"<