]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPHIC/AliGenTPHIC.cxx
Header file forgotten in prev commit
[u/mrichter/AliRoot.git] / TPHIC / AliGenTPHIC.cxx
index 79c5b69734e300096138cac46ac9eccbb195a7f2..7d841a3e757b940bfe9857368af3bd498d7b4f57 100644 (file)
 
 /* $Id$ */
 
-/*
-$Log$
-*/
-
 // Event generator of two-photon processes
 // in ultra-peripheral ion collisions.
 // 5 two-photon process are implemented, see comments to SetProcess().
@@ -60,6 +56,8 @@ $Log$
 #include <TParticle.h>
 #include <TParticlePDG.h>
 #include <TDatabasePDG.h>
+#include <TClonesArray.h>
+
 #include "AliPythia.h"
 #include "AliRun.h"
 #include <AliGenTPHIC.h>
@@ -70,7 +68,15 @@ ClassImp(AliGenTPHIC)
 
 //------------------------------------------------------------
 
-AliGenTPHIC::AliGenTPHIC()
+AliGenTPHIC::AliGenTPHIC() :
+  AliGenMC(),
+  fTPHICgen(0x0),
+  fPythia(0x0),
+  fParticles(0x0),
+  fEvent(-1),
+  fDebug(0),
+  fDebugEventFirst(-1),
+  fDebugEventLast(-1)
 {
   // Constructor: create generator instance,
   // create particle array
@@ -94,13 +100,6 @@ AliGenTPHIC::AliGenTPHIC()
   SetKfOnium   ();
 }
 
-//____________________________________________________________
-AliGenTPHIC::AliGenTPHIC(const AliGenTPHIC & gen)
-{
-  // copy constructor
-  gen.Copy(*this);
-}
-
 //____________________________________________________________
 AliGenTPHIC::~AliGenTPHIC()
 {
@@ -131,8 +130,9 @@ void AliGenTPHIC::Generate()
   // The event differectial cross section is assigned as a weight
   // to each track of the event.
 
-  Float_t polar[3]= {0,0,0};
-  Float_t origin0[3],origin[3];
+  Float_t polar[3]   = {0,0,0};
+  Float_t origin0[3] = {0,0,0};
+  Float_t origin[3]  = {0,0,0};
   Float_t p[3], tof;
   Double_t weight;
 
@@ -179,7 +179,7 @@ void AliGenTPHIC::Generate()
     tof     = kconv*iparticle->T();
     if (ks == 1) trackIt = 1;
     else         trackIt = 0;
-    SetTrack(fTrackIt*trackIt,iparent,kf,p,origin,polar,tof,kPPrimary,nt,weight,ks);
+    PushTrack(fTrackIt*trackIt,iparent,kf,p,origin,polar,tof,kPPrimary,nt,weight,ks);
     KeepTrack(nt); 
 
     if (fDebug == 2)
@@ -362,20 +362,20 @@ void AliGenTPHIC::SetProcess       (Int_t   proc  )
 {
   // Get 4-momentum of the first recoil nucleus after
   // the 2-photon process.
-  return TLorentzVector(fTPHICgen->GetPTAG1(1),
+  return TLorentzVector(fTPHICgen->GetPTAG1(0),
+                       fTPHICgen->GetPTAG1(1),
                        fTPHICgen->GetPTAG1(2),
-                       fTPHICgen->GetPTAG1(3),
-                       fTPHICgen->GetPTAG1(4));
+                       fTPHICgen->GetPTAG1(3));
 }
 //____________________________________________________________
   TLorentzVector AliGenTPHIC::MomentumRecNucl2()
 {
   // Get 4-momentum of the first recoil nucleus after
   // the 2-photon process.
-  return TLorentzVector(fTPHICgen->GetPTAG2(1),
+  return TLorentzVector(fTPHICgen->GetPTAG2(0),
+                       fTPHICgen->GetPTAG2(1),
                        fTPHICgen->GetPTAG2(2),
-                       fTPHICgen->GetPTAG2(3),
-                       fTPHICgen->GetPTAG2(4));
+                       fTPHICgen->GetPTAG2(3));
 }
 //____________________________________________________________
   Float_t AliGenTPHIC::GetXSectionCurrent()