Correct phi creation and initialization of gRandom in Toy model
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 27 Feb 2012 10:24:56 +0000 (10:24 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 27 Feb 2012 10:24:56 +0000 (10:24 +0000)
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskToyModel.cxx

index 55aa625..70f592f 100755 (executable)
@@ -86,6 +86,10 @@ AliAnalysisTaskToyModel::~AliAnalysisTaskToyModel() {
 //________________________________________________________________________\r
 void AliAnalysisTaskToyModel::Init() {\r
   //Initialize objects\r
+  //==============gRandom Seed=======================//\r
+  gRandom->SetSeed(0);  //seed is set to a random value (depending on machine clock)\r
+  //==============gRandom Seed=======================//\r
+\r
   //==============Particles and spectra==============//\r
   TParticle *pion = new TParticle();\r
   pion->SetPdgCode(211);\r
@@ -432,7 +436,7 @@ void AliAnalysisTaskToyModel::Run(Int_t nEvents) {
       }\r
       else {\r
        v_pt = fPtSpectraAllCharges->GetRandom();\r
-       v_phi = TMath::RadToDeg()*fAzimuthalAngleAllCharges->GetRandom();\r
+       v_phi = fAzimuthalAngleAllCharges->GetRandom();\r
       }\r
       \r
       v_p[0] = v_pt*TMath::Cos(v_phi);\r
@@ -620,7 +624,7 @@ void AliAnalysisTaskToyModel::Run(Int_t nEvents) {
       }\r
       gNumberOfAcceptedParticles += 1;\r
     }//generated negative particle loop\r
-   \r
+    \r
     //Dynamical correlations\r
     Double_t v_chargePrime = 0;\r
     Double_t v_yPrime = 0.0;\r