]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliKFVertex.h
Update MC pt shape syst
[u/mrichter/AliRoot.git] / STEER / AliKFVertex.h
index 656a50e2bd2deeeba6baf6ee6977029476be5f08..9f3fa58fc94fab2482773bc5ae6cd8b535dd0cd4 100644 (file)
 #define ALIKFVERTEX_H
 
 #include "AliKFParticle.h"
-#include "AliESDVertex.h"
+#include "AliVVertex.h"
 
-
-class AliKFVertex :public AliKFParticle
+class AliKFVertex : public AliKFParticle
 {
   
  public:
@@ -33,20 +32,24 @@ class AliKFVertex :public AliKFParticle
 
   //* 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 
@@ -64,28 +67,35 @@ class AliKFVertex :public AliKFParticle
 
   void operator -=( const AliKFParticle &Daughter );  
 
+  //* Set beam constraint to the primary vertex
+
+  void SetBeamConstraint( Double_t X, Double_t Y, Double_t Z, 
+                         Double_t ErrX, Double_t ErrY, Double_t ErrZ );
+
+  //* Set beam constraint off
+
+  void SetBeamConstraintOff();
+
   //* Construct vertex with selection of tracks (primary vertex)
 
   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 
-{
-  AliKFVertex vTmp=*this;
-  v = AliESDVertex( vTmp.fP, vTmp.fC, vTmp.fChi2, (vTmp.fNDF +3)/2 );
-}
 
 inline void AliKFVertex::operator +=( const AliKFParticle &Daughter )
 {