]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliGenPythiaPlus.cxx
adding option for ITS-TPC hybdrid track sets, the aod track are flagged for separatio...
[u/mrichter/AliRoot.git] / PYTHIA6 / AliGenPythiaPlus.cxx
index 8184b87c7d52a639ad03bb3100a2f689b531cc31..0bf7a359a43b4c16333095b831e4746e159454f4 100644 (file)
@@ -497,9 +497,9 @@ void AliGenPythiaPlus::Generate()
     
     fDecayer->ForceDecay();
 
-    Float_t polar[3]   =   {0,0,0};
-    Float_t origin[3]  =   {0,0,0};
-    Float_t p[4];
+    Double_t polar[3]   =   {0,0,0};
+    Double_t origin[3]  =   {0,0,0};
+    Double_t p[4];
 //  converts from mm/c to s
     const Float_t kconv=0.001/2.999792458e8;
 //
@@ -856,8 +856,10 @@ Int_t  AliGenPythiaPlus::GenerateMB()
            }
        }
       }
-      if(!ok)
-       return 0;
+      if(!ok){
+         delete [] pParent;
+         return 0;
+      }
     }
     
     
@@ -891,8 +893,10 @@ Int_t  AliGenPythiaPlus::GenerateMB()
       if(!okd && iphcand != -1) // execute rotation in phi 
           RotatePhi(iphcand,okd);
       
-      if(!okd)
-       return 0;
+      if(!okd) {
+         delete[] pParent;
+         return 0;
+      }
     }
     
     if (fTriggerParticle) {
@@ -1013,6 +1017,7 @@ Int_t  AliGenPythiaPlus::GenerateMB()
            //
            // Special Treatment to store color-flow
            //
+           /*
            if (ks == 3 || ks == 13 || ks == 14) {
                TParticle* particle = 0;
                if (fStack) {
@@ -1020,10 +1025,10 @@ Int_t  AliGenPythiaPlus::GenerateMB()
                } else {
                    particle = AliRunLoader::Instance()->Stack()->Particle(nt);
                }
-//             particle->SetFirstDaughter(fPythia->GetK(2, i));
-//             particle->SetLastDaughter(fPythia->GetK(3, i));         
+               particle->SetFirstDaughter(fPythia->GetK(2, i));
+               particle->SetLastDaughter(fPythia->GetK(3, i));         
            }
-           
+           */  
            KeepTrack(nt);
            pParent[i] = nt;
            SetHighWaterMark(nt);
@@ -1137,8 +1142,9 @@ void AliGenPythiaPlus::MakeHeader()
 // Store quenching parameters
 //
     if (fQuench){
-       Double_t z[4];
-       Double_t xp, yp;
+        Double_t z[4] = {0.};
+       Double_t xp = 0.;
+       Double_t yp = 0.;
        if (fQuench == 1) {
            // Pythia::Quench()
            fPythia->GetQuenchingParameters(xp, yp, z);
@@ -1166,7 +1172,7 @@ void AliGenPythiaPlus::MakeHeader()
     fHeader = 0x0;
 }
 
-Bool_t AliGenPythiaPlus::CheckTrigger(TParticle* jet1, TParticle* jet2)
+Bool_t AliGenPythiaPlus::CheckTrigger(const TParticle* jet1, const TParticle* jet2)
 {
 // Check the kinematic trigger condition
 //
@@ -1335,7 +1341,7 @@ void AliGenPythiaPlus::GetSubEventTime()
 
 
 
-Bool_t AliGenPythiaPlus::IsInEMCAL(Float_t phi, Float_t eta)
+Bool_t AliGenPythiaPlus::IsInEMCAL(Float_t phi, Float_t eta) const
 {
   // Is particle in EMCAL acceptance? 
   // phi in degrees, etamin=-etamax
@@ -1346,7 +1352,7 @@ Bool_t AliGenPythiaPlus::IsInEMCAL(Float_t phi, Float_t eta)
     return kFALSE;
 }
 
-Bool_t AliGenPythiaPlus::IsInPHOS(Float_t phi, Float_t eta)
+Bool_t AliGenPythiaPlus::IsInPHOS(Float_t phi, Float_t eta) const
 {
   // Is particle in PHOS acceptance? 
   // Acceptance slightly larger considered.