if(!pStack->IsPhysicalPrimary(i)) continue;
TParticle *pTrack=pStack->Particle(i);
if(pTrack->GetPDG()->Charge()==0) continue;
+ Printf("track n. %i",i);
AliESDtrack trk(pTrack);
Float_t xPc,yPc,xRa,yRa,thRa,phRa;
Int_t iCh=pTracker.IntTrkCha(&trk,xPc,yPc,xRa,yRa,thRa,phRa); //get chamber intersected by this track
if(phRa<0) phRa += TMath::TwoPi(); // to be verified
- trk.SetHMPIDtrk(xRa,yRa,thRa,phRa); //store initial infos
+ trk.SetHMPIDtrk(xPc,yPc,thRa,phRa); //store initial infos
pEsd->AddTrack(&trk);
Int_t status;
else {
Printf(Form("Cannot determine the beam type from %s, assume no LHC magnet field",beamtype));
}
-
+ Printf("------------------------------");
+ Printf(" Summary for B: %s",s.Data());
+ Printf("------------------------------");
AliMagF* fld = new AliMagF("MagneticFieldMap", s.Data(), 2, fcL3, fcDip, 10., map, path,
btype,beamenergy);
TGeoGlobalMagField::Instance()->SetField( fld );