]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliAODRecoDecay.h
Setter added.
[u/mrichter/AliRoot.git] / STEER / AliAODRecoDecay.h
index 08652ced24608772550e4f6e9ffa1f33744930b7..853efaa83a8b891d9480228fb2f5ffdd6c8028e3 100644 (file)
@@ -144,6 +144,7 @@ class AliAODRecoDecay : public AliVTrack {
   Double_t Getd0Prong(Int_t ip) const {return fd0[ip];}
   Double_t Prodd0d0(Int_t ip1=0,Int_t ip2=0) const {return fd0[ip1]*fd0[ip2];} 
   void     SetPxPyPzProngs(Int_t nprongs,Double_t *px,Double_t *py,Double_t *pz);
+  void     Setd0Prongs(Int_t nprongs,Double_t *d0);
   Double_t PxProng(Int_t ip) const {return fPx[ip];}
   Double_t PyProng(Int_t ip) const {return fPy[ip];}
   Double_t PzProng(Int_t ip) const {return fPz[ip];}
@@ -334,6 +335,22 @@ inline Double_t AliAODRecoDecay::QtProngFlightLine(Int_t ip,AliAODVertex *vtx1)
   return QtProngFlightLine(ip,v);
 }
 
+inline void AliAODRecoDecay::Setd0Prongs(Int_t nprongs,Double_t *d0) 
+{
+  if(nprongs!=GetNProngs()) { 
+    printf("Wrong number of momenta, must be nProngs");
+    return;
+  }
+  if(!fd0) {
+    fd0 = new Double32_t[nprongs];
+  }
+  for(Int_t i=0;i<nprongs;i++) {
+    fd0[i] = d0[i]; 
+  }
+
+  return;
+}
+
 inline void AliAODRecoDecay::SetPxPyPzProngs(Int_t nprongs,Double_t *px,Double_t *py,Double_t *pz) 
 {
   if(nprongs!=GetNProngs()) {