X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWG2%2FFLOW%2FAliFlowCommon%2FAliFlowAnalysisWithMCEventPlane.cxx;h=c6051afb38fe47f885488d3648b53bc109266aed;hb=929098e4589a25c61c0564ede67c5cc1f8a82a27;hp=6acbfe7b4279c02476c2d27437e5e2561f60d63b;hpb=ad87ae62e9477d1adb2dbbff5569a3b25a55c7c3;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx index 6acbfe7b427..c6051afb38f 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx +++ b/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx @@ -12,33 +12,33 @@ * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ +// AliFlowAnalysisWithMCEventPlane: +// Description: Maker to analyze Flow from the generated MC reaction plane. +// This class is used to get the real value of the flow +// to compare the other methods to when analysing simulated events +// author: N. van der Kolk (kolk@nikhef.nl) #define AliFlowAnalysisWithMCEventPlane_cxx -#include "Riostream.h" //needed as include -#include "TFile.h" //needed as include -#include "TProfile.h" //needed as include -#include "TProfile2D.h" -#include "TComplex.h" //needed as include +#include "Riostream.h" +#include "TFile.h" +#include "TProfile.h" +#include "TProfile2D.h" #include "TList.h" +#include "TH1F.h" +#include "TMath.h" +#include "TVector2.h" -class TH1F; - -#include "AliFlowCommonConstants.h" //needed as include +#include "AliFlowCommonConstants.h" #include "AliFlowEventSimple.h" #include "AliFlowTrackSimple.h" #include "AliFlowCommonHist.h" #include "AliFlowCommonHistResults.h" #include "AliFlowAnalysisWithMCEventPlane.h" +#include "AliFlowVector.h" class AliFlowVector; -// AliFlowAnalysisWithMCEventPlane: -// Description: Maker to analyze Flow from the generated MC reaction plane. -// This class is used to get the real value of the flow -// to compare the other methods to when analysing simulated events -// author: N. van der Kolk (kolk@nikhef.nl) - ClassImp(AliFlowAnalysisWithMCEventPlane) //----------------------------------------------------------------------- @@ -60,7 +60,7 @@ ClassImp(AliFlowAnalysisWithMCEventPlane) fHistProDiffFlowPtPOI(NULL), fHistProDiffFlowEtaPOI(NULL), fHistSpreadOfFlow(NULL), - fHarmonic(2) + fHarmonic(2) { // Constructor. @@ -123,6 +123,12 @@ void AliFlowAnalysisWithMCEventPlane::Init() { //Define all histograms cout<<"---Analysis with the real MC Event Plane---"<GetNbinsPt(); Double_t dPtMin = AliFlowCommonConstants::GetMaster()->GetPtMin(); Double_t dPtMax = AliFlowCommonConstants::GetMaster()->GetPtMax(); @@ -187,6 +193,7 @@ void AliFlowAnalysisWithMCEventPlane::Init() { fEventNumber = 0; //set number of events to zero + TH1::AddDirectory(oldHistAddStatus); } //----------------------------------------------------------------------- @@ -332,7 +339,7 @@ void AliFlowAnalysisWithMCEventPlane::Finish() { Int_t iNbinsEta = AliFlowCommonConstants::GetMaster()->GetNbinsEta(); // access harmonic: - if(fCommonHists && fCommonHists->GetHarmonic()) + if(fCommonHists && fCommonHists->GetHarmonic()) { fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1); // to be improved (moved somewhere else?) } @@ -367,7 +374,8 @@ void AliFlowAnalysisWithMCEventPlane::Finish() { dErrVRP += dYieldPtRP*dYieldPtRP*dErrvPtRP*dErrvPtRP; } } - if (dSumRP != 0. ) { + + if (!(TMath::AreEqualAbs(dSumRP, 0.0, 1e-10)) ) { dVRP /= dSumRP; //because pt distribution should be normalised dErrVRP /= (dSumRP*dSumRP); dErrVRP = TMath::Sqrt(dErrVRP); @@ -413,7 +421,8 @@ void AliFlowAnalysisWithMCEventPlane::Finish() { } }//end of for(Int_t b=0;b