Introduce GetOrigin function
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Jul 1999 12:29:57 +0000 (12:29 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Jul 1999 12:29:57 +0000 (12:29 +0000)
STEER/AliGenerator.h

index b5540a041f8fcd1e4cdf3d6300563bd7007ae836..bc998b7d66986528240dcd256b11ce458bd8d464 100644 (file)
@@ -7,7 +7,7 @@
 //                                                       //
 ///////////////////////////////////////////////////////////
 
-#include "TNamed.h"
+#include "TLorentzVector.h"
 #include "TArrayF.h"
 #include "TGenerator.h"
 
@@ -48,6 +48,8 @@ protected:
     virtual void Init();
     virtual void SetOrigin(Float_t ox, Float_t oy, Float_t oz)
        {fOrigin[0]=ox;fOrigin[1]=oy;fOrigin[2]=oz;}
+    virtual void SetOrigin(const TLorentzVector &o)
+       {fOrigin[0]=o[0];fOrigin[1]=o[1];fOrigin[2]=o[2];}
     virtual void SetSigma(Float_t sx, Float_t sy, Float_t sz)
        {fOsigma[0]=sx;fOsigma[1]=sy;fOsigma[2]=sz;}
     virtual void SetMomentumRange(Float_t pmin=0, Float_t pmax=1.e10)
@@ -80,6 +82,14 @@ protected:
            
     virtual void SetMC(TGenerator *theMC) 
        {if (!fgMCEvGen) fgMCEvGen =theMC;}
+
+  // Getters
+
+    virtual void GetOrigin(Float_t &ox, Float_t &oy, Float_t &oz)
+       {ox=fOrigin[0];oy=fOrigin[1];oz=fOrigin[2];}
+    virtual void GetOrigin(TLorentzVector &o)
+       {o[0]=fOrigin[0];o[1]=fOrigin[1];o[2]=fOrigin[2];o[3]=0;}
+
     ClassDef(AliGenerator,1)
 };