]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenHIJINGpara.cxx
VertexerTracks will treat in a same way the bunch crossing info from
[u/mrichter/AliRoot.git] / EVGEN / AliGenHIJINGpara.cxx
index 65f33b3936e08e4c0f2e88f2e6450a6064508891..e630b8ee74a37b6684af27ea9952ee9d2523e310 100644 (file)
 ClassImp(AliGenHIJINGpara)
 
 
-AliGenHIJINGpara::AliGenHIJINGpara(const AliGenHIJINGpara & para):
-    AliGenerator(para)
-{
-// Copy constructor
-    para.Copy(*this);
-}
 
 //_____________________________________________________________________________
-static Double_t ptpi(Double_t *px, Double_t *)
+static Double_t ptpi(const Double_t *px, const Double_t *)
 {
   //
   //     PT-PARAMETERIZATION CDF, PRL 61(88) 1819
@@ -164,42 +158,46 @@ static Double_t etakac( Double_t *py, Double_t *)
 
 //_____________________________________________________________________________
 AliGenHIJINGpara::AliGenHIJINGpara()
-  :AliGenerator()
+    :AliGenerator(),
+       fNt(-1),
+       fNpartProd(0),
+       fPi0Decays(kFALSE),
+       fPtWgtPi(0.),
+       fPtWgtKa(0.),
+       fPtpi(0),
+       fPtka(0),
+       fETApic(0),
+       fETAkac(0),
+       fDecayer(0)
 {
     //
     // Default constructor
     //
-    fPtpi    =  0;
-    fPtka    =  0;
-    fETApic  =  0;
-    fETAkac  =  0;
-    fDecayer =  0;
-    fNt      = -1;
-    fNpartProd = 0;
     SetCutVertexZ();
     SetPtRange();
-    SetPi0Decays();
 }
 
 //_____________________________________________________________________________
 AliGenHIJINGpara::AliGenHIJINGpara(Int_t npart)
-  :AliGenerator(npart)
+    :AliGenerator(npart),
+       fNt(-1),
+       fNpartProd(npart),
+       fPi0Decays(kFALSE),
+       fPtWgtPi(0.),
+       fPtWgtKa(0.),
+       fPtpi(0),
+       fPtka(0),
+       fETApic(0),
+       fETAkac(0),
+       fDecayer(0)
 {
   // 
   // Standard constructor
   //
     fName="HIJINGpara";
     fTitle="HIJING Parametrisation Particle Generator";
-    fPtpi    =  0;
-    fPtka    =  0;
-    fETApic  =  0;
-    fETAkac  =  0;
-    fDecayer =  0;
-    fNt      = -1;
-    fNpartProd = npart;
     SetCutVertexZ();
     SetPtRange();
-    SetPi0Decays();
 }
 
 //_____________________________________________________________________________
@@ -283,6 +281,13 @@ void AliGenHIJINGpara::Init()
 //
     if (fPi0Decays && gMC)
        fDecayer = gMC->GetDecayer();
+
+    if (fPi0Decays)
+    {
+       fDecayer->SetForceDecay(kNeutralPion);
+       fDecayer->Init();
+    }
+    
 }
 
 
@@ -423,7 +428,7 @@ void AliGenHIJINGpara::DecayPi0(Float_t* orig, Float_t * p)
     Float_t polar[3] = {0., 0., 0.};
     Int_t np = fDecayer->ImportParticles(particles);
     fNpartProd += (np-1);
-    Int_t nt;    
+    Int_t nt = 0;    
     for (Int_t i = 1; i < np; i++)
     {
        TParticle* iParticle =  (TParticle *) particles->At(i);
@@ -438,12 +443,6 @@ void AliGenHIJINGpara::DecayPi0(Float_t* orig, Float_t * p)
     fNt = nt;
 }
 
-void AliGenHIJINGpara::Copy(TObject &) const
-{
-  Fatal("Copy","Not implemented!\n");
-}
-
-
 void AliGenHIJINGpara::Draw( const char * /*opt*/)
 {
     //