AliDebug(1,Form("Event Number = %d",ievt));
Int_t nparticles = fRunLoader->GetHeader()->GetNtrack();
AliDebug(1,Form("Number of Particles = %d",nparticles));
- //
- // Ajay on 24th May 2009
- //No of primary
- Int_t nprimary = fRunLoader->GetHeader()->GetNprimary();
- Int_t * mtraPid = new Int_t [nprimary];
- for(Int_t i = 0; i < nprimary; i++)
- {
- mtraPid[i] = -1;
- }
+
//
fRunLoader->GetEvent(ievt);
trackpid=trackpidOld;
trackno=tracknoOld;
- mtraPid[trackno] = mtrackpid;
-
//-----------------end of modification----------------
xPos = fPMDHit->X();
yPos = fPMDHit->Y();
{
deltaE = fPRE[ism][jrow][kcol];
trno = fPRETrackNo[ism][jrow][kcol];
- trpid = mtraPid[trno]; // added
detno = 0;
}
else if (idet == 1)
{
deltaE = fCPV[ism][jrow][kcol];
trno = fCPVTrackNo[ism][jrow][kcol];
- trpid = mtraPid[trno]; // added
detno = 1;
}
if (deltaE > 0.)
{
+ // Natasha
+ TParticle *mparticle = gAlice->GetMCApp()->Particle(trno);
+ trpid = mparticle->GetPdgCode();
AddSDigit(trno,trpid,detno,ism,jrow,kcol,deltaE);
}
}
}
fPMDLoader->WriteSDigits("OVERWRITE");
ResetCellADC();
- delete [] mtraPid;
}
//____________________________________________________________________________
Int_t nparticles = fRunLoader->GetHeader()->GetNtrack();
AliDebug(1,Form("Number of Particles = %d", nparticles));
- //
- // Ajay on 24th May 2009
- //No of primary
- Int_t nprimary = fRunLoader->GetHeader()->GetNprimary();
- Int_t * mtraPid = new Int_t [nprimary];
- for(Int_t i = 0; i < nprimary; i++)
- {
- mtraPid[i] = -1;
- }
- //
-
fRunLoader->GetEvent(ievt);
// ------------------------------------------------------- //
// Pointer to specific detector hits.
trackpid=trackpidOld;
trackno=tracknoOld;
- mtraPid[mtrackno] = mtrackpid; // added by Ajay
-
//-----------------end of modification----------------
xPos = fPMDHit->X();
yPos = fPMDHit->Y();
{
deltaE = fPRE[ism][jrow][kcol];
trno = fPRETrackNo[ism][jrow][kcol];
- trpid = mtraPid[trno]; // added
detno = 0;
}
else if (idet == 1)
{
deltaE = fCPV[ism][jrow][kcol];
trno = fCPVTrackNo[ism][jrow][kcol];
- trpid = mtraPid[trno]; // added
detno = 1;
}
if (deltaE > 0.)
if (adc > 0.)
{
adc += (pedmean + 3.0*pedrms);
+ TParticle *mparticle
+ = gAlice->GetMCApp()->Particle(trno);
+ trpid = mparticle->GetPdgCode();
+
AddDigit(trno,trpid,detno,ism,jrow,kcol,adc);
}
}
fPMDLoader->WriteDigits("OVERWRITE");
ResetCellADC();
- delete [] mtraPid;
}
//____________________________________________________________________________