X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=macros%2Fmcminiesd.C;h=2915a2ee7f57cc3cb5a46cccebf56ece2d99a378;hb=b340141d337396316cc0942e4fc9f28099d37b7c;hp=a3fd5c841d41e3a514bd8824cc8fe0057536f4ca;hpb=c84a5e9ecfc66e0f4160f70af30c503c47cebf12;p=u%2Fmrichter%2FAliRoot.git diff --git a/macros/mcminiesd.C b/macros/mcminiesd.C index a3fd5c841d4..2915a2ee7f5 100644 --- a/macros/mcminiesd.C +++ b/macros/mcminiesd.C @@ -63,24 +63,26 @@ void copyGeneralESDInfo(AliESD* esdIn, AliESD* esdOut) { esdOut->SetRunNumber(esdIn->GetRunNumber()); // Trigger - esdOut->SetTrigger(esdIn->GetTrigger()); + esdOut->SetTriggerMask(esdIn->GetTriggerMask()); // Magnetic field esdOut->SetMagneticField(esdIn->GetMagneticField()); // Copy ESD vertex const AliESDVertex * vtxIn = esdIn->GetVertex(); - Double_t pos[3]; - vtxIn->GetXYZ(pos); - Double_t cov[6]; - vtxIn->GetCovMatrix(cov); + AliESDVertex * vtxOut = 0x0; + if (vtxIn) { + Double_t pos[3]; + vtxIn->GetXYZ(pos); + Double_t cov[6]; + vtxIn->GetCovMatrix(cov); - AliESDVertex * vtxOut = new AliESDVertex(pos,cov, - vtxIn->GetChi2(), - vtxIn->GetNContributors()); - Double_t tp[3]; - vtxIn->GetTruePos(tp); - vtxOut->SetTruePos(tp); + vtxOut = new AliESDVertex(pos,cov, + vtxIn->GetChi2(), + vtxIn->GetNContributors()); + } + else + vtxOut = new AliESDVertex(); esdOut->SetVertex(vtxOut); } @@ -101,7 +103,7 @@ void selectMiniESD(AliESD* esdIn, AliESD* &esdOut) { // Copy the general information copyGeneralESDInfo(esdIn, esdOut); - + // Select tracks Int_t ntrk = esdIn->GetNumberOfTracks();