ROOT logo
//---------------------------------------------------------------------------------
// The AliKFVertex class
// .
// @author  S.Gorbunov, I.Kisel
// @version 1.0
// @since   13.05.07
// 
// Class to reconstruct and store primary and secondary vertices.
// The method is described in CBM-SOFT note 2007-003, 
// ``Reconstruction of decayed particles based on the Kalman filter'', 
// http://www.gsi.de/documents/DOC-2007-May-14-1.pdf
//
// This class is ALICE interface to general mathematics in AliKFParticleBase
// 
//  -= Copyright &copy ALICE HLT Group =-
//_________________________________________________________________________________

#ifndef ALIKFVERTEX_H
#define ALIKFVERTEX_H

#include "AliKFParticle.h"
#include "AliVVertex.h"

class AliKFVertex : public AliKFParticle
{
  
 public:

  //*
  //*  INITIALIZATION
  //*

  //* Constructor (empty)

  AliKFVertex():AliKFParticle(),fIsConstrained(0){ } 

  //* Destructor (empty)

  ~AliKFVertex(){}

  //* Initialisation from VVertex 

  AliKFVertex( const AliVVertex &vertex );


  //*
  //*  ACCESSORS
  //*

  //* Number of tracks composing the vertex

  Int_t GetNContributors() const { return fIsConstrained ?fNDF/2:(fNDF+3)/2; }

  //* 
  //* CONSTRUCTION OF THE VERTEX BY ITS DAUGHTERS 
  //* USING THE KALMAN FILTER METHOD
  //*


  //* Simple way to construct vertices ex. D0 = Pion + Kaon;   

  void operator +=( const AliKFParticle &Daughter );  

  //* Subtract particle from vertex

  AliKFVertex operator -( const AliKFParticle &Daughter ) const;

  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::operator +=( const AliKFParticle &Daughter )
{
  AliKFParticle::operator +=( Daughter );
}
  

inline void AliKFVertex::operator -=( const AliKFParticle &Daughter )
{
  Daughter.SubtractFromVertex( *this );
}
  
inline AliKFVertex AliKFVertex::operator -( const AliKFParticle &Daughter ) const 
{
  AliKFVertex tmp = *this;
  Daughter.SubtractFromVertex( tmp );
  return tmp;
}


#endif 
 AliKFVertex.h:1
 AliKFVertex.h:2
 AliKFVertex.h:3
 AliKFVertex.h:4
 AliKFVertex.h:5
 AliKFVertex.h:6
 AliKFVertex.h:7
 AliKFVertex.h:8
 AliKFVertex.h:9
 AliKFVertex.h:10
 AliKFVertex.h:11
 AliKFVertex.h:12
 AliKFVertex.h:13
 AliKFVertex.h:14
 AliKFVertex.h:15
 AliKFVertex.h:16
 AliKFVertex.h:17
 AliKFVertex.h:18
 AliKFVertex.h:19
 AliKFVertex.h:20
 AliKFVertex.h:21
 AliKFVertex.h:22
 AliKFVertex.h:23
 AliKFVertex.h:24
 AliKFVertex.h:25
 AliKFVertex.h:26
 AliKFVertex.h:27
 AliKFVertex.h:28
 AliKFVertex.h:29
 AliKFVertex.h:30
 AliKFVertex.h:31
 AliKFVertex.h:32
 AliKFVertex.h:33
 AliKFVertex.h:34
 AliKFVertex.h:35
 AliKFVertex.h:36
 AliKFVertex.h:37
 AliKFVertex.h:38
 AliKFVertex.h:39
 AliKFVertex.h:40
 AliKFVertex.h:41
 AliKFVertex.h:42
 AliKFVertex.h:43
 AliKFVertex.h:44
 AliKFVertex.h:45
 AliKFVertex.h:46
 AliKFVertex.h:47
 AliKFVertex.h:48
 AliKFVertex.h:49
 AliKFVertex.h:50
 AliKFVertex.h:51
 AliKFVertex.h:52
 AliKFVertex.h:53
 AliKFVertex.h:54
 AliKFVertex.h:55
 AliKFVertex.h:56
 AliKFVertex.h:57
 AliKFVertex.h:58
 AliKFVertex.h:59
 AliKFVertex.h:60
 AliKFVertex.h:61
 AliKFVertex.h:62
 AliKFVertex.h:63
 AliKFVertex.h:64
 AliKFVertex.h:65
 AliKFVertex.h:66
 AliKFVertex.h:67
 AliKFVertex.h:68
 AliKFVertex.h:69
 AliKFVertex.h:70
 AliKFVertex.h:71
 AliKFVertex.h:72
 AliKFVertex.h:73
 AliKFVertex.h:74
 AliKFVertex.h:75
 AliKFVertex.h:76
 AliKFVertex.h:77
 AliKFVertex.h:78
 AliKFVertex.h:79
 AliKFVertex.h:80
 AliKFVertex.h:81
 AliKFVertex.h:82
 AliKFVertex.h:83
 AliKFVertex.h:84
 AliKFVertex.h:85
 AliKFVertex.h:86
 AliKFVertex.h:87
 AliKFVertex.h:88
 AliKFVertex.h:89
 AliKFVertex.h:90
 AliKFVertex.h:91
 AliKFVertex.h:92
 AliKFVertex.h:93
 AliKFVertex.h:94
 AliKFVertex.h:95
 AliKFVertex.h:96
 AliKFVertex.h:97
 AliKFVertex.h:98
 AliKFVertex.h:99
 AliKFVertex.h:100
 AliKFVertex.h:101
 AliKFVertex.h:102
 AliKFVertex.h:103
 AliKFVertex.h:104
 AliKFVertex.h:105
 AliKFVertex.h:106
 AliKFVertex.h:107
 AliKFVertex.h:108
 AliKFVertex.h:109
 AliKFVertex.h:110
 AliKFVertex.h:111
 AliKFVertex.h:112
 AliKFVertex.h:113
 AliKFVertex.h:114
 AliKFVertex.h:115
 AliKFVertex.h:116
 AliKFVertex.h:117
 AliKFVertex.h:118
 AliKFVertex.h:119