#define ALIKFVERTEX_H
#include "AliKFParticle.h"
-#include "AliESDVertex.h"
+#include "AliVVertex.h"
-
-class AliKFVertex :public AliKFParticle
+class AliKFVertex : public AliKFParticle
{
public:
//* Constructor (empty)
- AliKFVertex():AliKFParticle(){}
+ AliKFVertex():AliKFParticle(),fIsConstrained(0){ }
//* Destructor (empty)
~AliKFVertex(){}
- //* Initialisation from ESD vertex
+ //* Initialisation from VVertex
+
+ AliKFVertex( const AliVVertex &vertex );
- AliKFVertex( const AliESDVertex &vertex );
- //* Copy vertex part to ESD vertex
+ //*
+ //* ACCESSORS
+ //*
- void CopyToESDVertex( AliESDVertex &Vtx ) const ;
+ //* Number of tracks composing the vertex
+ Int_t GetNContributors() const { return fIsConstrained ?fNDF/2:(fNDF+3)/2; }
//*
//* CONSTRUCTION OF THE VERTEX BY ITS DAUGHTERS
//*
+ //* Simple way to construct vertices ex. D0 = Pion + Kaon;
+
+ void operator +=( const AliKFParticle &Daughter );
//* Subtract particle from vertex
void operator -=( const AliKFParticle &Daughter );
- //* Construct vertex with selection of tracks (primary vertex)
+ //* Set beam constraint to the primary vertex
- void ConstructPrimaryVertex( const AliKFParticle *vDaughters[], int NDaughters,
- Double_t ChiCut=3.5 );
+ void SetBeamConstraint( Double_t X, Double_t Y, Double_t Z,
+ Double_t ErrX, Double_t ErrY, Double_t ErrZ );
-private:
+ //* Set beam constraint off
- //* Simple way to construct vertices ex. D0 = Pion + Kaon - NOT IMPLEMENTED
+ void SetBeamConstraintOff();
- AliKFParticle operator +( const AliKFParticle &Daughter ) const;
+ //* Construct vertex with selection of tracks (primary vertex)
- void operator +=( const AliKFParticle &Daughter );
+ void ConstructPrimaryVertex( const AliKFParticle *vDaughters[], int NDaughters,
+ Bool_t vtxFlag[], Double_t ChiCut=3.5 );
+
+ protected:
+
+ Bool_t fIsConstrained; // Is the beam constraint set
ClassDef( AliKFVertex, 1 );
};
-
//---------------------------------------------------------------------
//
// Inline implementation of the AliKFVertex methods
//
//---------------------------------------------------------------------
-inline void AliKFVertex::CopyToESDVertex( AliESDVertex &v ) const
+
+inline void AliKFVertex::operator +=( const AliKFParticle &Daughter )
{
- AliKFVertex vTmp=*this;
- v = AliESDVertex( vTmp.fP, vTmp.fC, vTmp.fChi2, (vTmp.fNDF +3)/2 );
+ AliKFParticle::operator +=( Daughter );
}
-
+
inline void AliKFVertex::operator -=( const AliKFParticle &Daughter )
{