Fix for report #77549: Update of AliKFParticle contructor
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Feb 2011 13:29:16 +0000 (13:29 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Feb 2011 13:29:16 +0000 (13:29 +0000)
STEER/AliKFParticle.cxx
STEER/AliKFParticle.h

index 76bd984..8abd1a0 100644 (file)
@@ -26,6 +26,17 @@ ClassImp(AliKFParticle)
 
 Double_t AliKFParticle::fgBz = -5.;  //* Bz compoment of the magnetic field
 
+AliKFParticle::AliKFParticle( const AliKFParticle &d1, const AliKFParticle &d2, Bool_t gamma )
+{
+  if (!gamma) {
+    AliKFParticle mother;
+    mother+= d1;
+    mother+= d2;
+    *this = mother;
+  } else
+    ConstructGamma(d1, d2);
+}
+
 void AliKFParticle::Create( const Double_t Param[], const Double_t Cov[], Int_t Charge, Int_t PID )
 {
   // Constructor from "cartesian" track, PID hypothesis should be provided
index b3a39cc..0a988e1 100644 (file)
@@ -47,7 +47,7 @@ class AliKFParticle :public AliKFParticleBase
 
   //* Construction of mother particle by its 2-3-4 daughters
 
-  AliKFParticle( const AliKFParticle &d1, const AliKFParticle &d2 );
+  AliKFParticle( const AliKFParticle &d1, const AliKFParticle &d2, Bool_t gamma = kFALSE );
 
   AliKFParticle( const AliKFParticle &d1, const AliKFParticle &d2, 
                 const AliKFParticle &d3 );
@@ -342,16 +342,6 @@ inline void AliKFParticle::SetField( Double_t Bz )
   fgBz = Bz;
 }
 
-
-inline AliKFParticle::AliKFParticle( const AliKFParticle &d1, 
-                                    const AliKFParticle &d2 )
-{
-  AliKFParticle mother;
-  mother+= d1;
-  mother+= d2;
-  *this = mother;
-}
-
 inline AliKFParticle::AliKFParticle( const AliKFParticle &d1, 
                                     const AliKFParticle &d2, 
                                     const AliKFParticle &d3 )