From: snelling Date: Wed, 29 Apr 2009 18:40:20 +0000 (+0000) Subject: fix memory leak and funny multiplicity X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=28ece29bddd41554781bd8e224e3c5f008188700;p=u%2Fmrichter%2FAliRoot.git fix memory leak and funny multiplicity --- diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx index 876eb163d82..61dba5c5174 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx +++ b/PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx @@ -86,9 +86,8 @@ AliFlowEventSimple* AliFlowEventSimpleMakerOnTheFly::CreateEventOnTheFly() fPtSpectra = new TF1("fPtSpectra","[0]*x*TMath::Exp(-x*x)",dPtMin,dPtMax); fPtSpectra->SetParName(0,"Multiplicity of RPs"); // sampling the multiplicity: - fMultiplicityOfRP = fMyTRandom3->Gaus(fMultiplicityOfRP,fMultiplicitySpreadOfRP); - fPtSpectra->SetParameter(0,fMultiplicityOfRP); - + Int_t fNewMultiplicityOfRP = fMyTRandom3->Gaus(fMultiplicityOfRP,fMultiplicitySpreadOfRP); + fPtSpectra->SetParameter(0,fNewMultiplicityOfRP); // phi: @@ -114,7 +113,7 @@ AliFlowEventSimple* AliFlowEventSimpleMakerOnTheFly::CreateEventOnTheFly() Int_t iGoodTracks = 0; Int_t iSelParticlesRP = 0; Int_t iSelParticlesPOI = 0; - for(Int_t i=0;iSetPt(fPtSpectra->GetRandom()); pTrack->SetEta(fMyTRandom3->Uniform(dEtaMin,dEtaMax)); @@ -140,7 +139,9 @@ AliFlowEventSimple* AliFlowEventSimpleMakerOnTheFly::CreateEventOnTheFly() cout<<" # of POI selected tracks = "<