]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenReaderCwn.cxx
- ATO-57, ATO-71 Fixed TPC multiplicity estimator (nTotTracks -> nTotESDTracks);...
[u/mrichter/AliRoot.git] / EVGEN / AliGenReaderCwn.cxx
index fb8fee7753b9f013e77f0d3f10595b2c83432074..08444493f7e0789384f4dea67fd403af7c8c4687 100644 (file)
@@ -46,8 +46,12 @@ AliGenReaderCwn::AliGenReaderCwn():
     fE(0.)
 {
 // Default constructor
+    Int_t i;
+    for (i = 0; i <  6; i++) fRhead[i] = 0.;
+    for (i = 0; i < 12; i++) fIhead[i] = 0;
 }
 
+
 AliGenReaderCwn::AliGenReaderCwn(const AliGenReaderCwn &reader):
     AliGenReader(reader),
     fNcurrent(0),
@@ -63,6 +67,9 @@ AliGenReaderCwn::AliGenReaderCwn(const AliGenReaderCwn &reader):
     fE(0.)
 {
     // Copy constructor
+    Int_t i;
+    for (i = 0; i <  6; i++) fRhead[i] = 0.;
+    for (i = 0; i < 12; i++) fIhead[i] = 0;
     reader.Copy(*this);
 }
 
@@ -135,7 +142,7 @@ TParticle* AliGenReaderCwn::NextParticle()
     Float_t prwn;
     Float_t p[4];
 // Read the next particle
-    if (fCode == kGEANT3) fIdpart=gMC->PDGFromId(fIdpart);
+    if (fCode == kGEANT3) fIdpart=TVirtualMC::GetMC()->PDGFromId(fIdpart);
     Double_t amass = TDatabasePDG::Instance()->GetParticle(fIdpart)->Mass();
     if(fE<=amass) {
        Warning("Generate","Particle %d  E = %f mass = %f %f %f \n",