]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/RESONANCES/AliRsnMiniParticle.cxx
Added trigger selection for ESD analysis in mini task + added computation of leadin...
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnMiniParticle.cxx
index 4770f4a5e49d72bc1a309c0fb71b43f04e8fc4ba..045f3cf196bb46ee45ddb0833113cae4bf9870d4 100644 (file)
@@ -6,6 +6,9 @@
 // to allow an event mixing.
 //
 
+#include <TDatabasePDG.h>
+#include <TParticlePDG.h>
+
 #include "AliRsnDaughter.h"
 #include "AliRsnMiniParticle.h"
 
@@ -50,3 +53,27 @@ void AliRsnMiniParticle::CopyDaughter(AliRsnDaughter *daughter)
       fMotherPDG = daughter->GetMotherPDG();
    }
 }
+
+
+//__________________________________________________________________________________________________
+Double_t AliRsnMiniParticle::Mass()
+{
+   //
+   // return mass of particle
+   //
+
+   TDatabasePDG *db   = TDatabasePDG::Instance();
+   TParticlePDG *part = db->GetParticle(PDG());
+   return part->Mass();
+}
+
+//__________________________________________________________________________________________________
+void AliRsnMiniParticle::Set4Vector(TLorentzVector &v, Float_t mass, Bool_t mc)
+{
+   //
+   // return 4 vector of particle
+   //
+
+   if (mass<0.0) mass = Mass();
+   v.SetXYZM(Px(mc), Py(mc), Pz(mc),mass);
+}