ROOT logo
/**************************************************************************
 * Copyright(c) 2009-2010, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/* $Id$ */

/////////////////////////////////////////////////////////////////////
// Helper class for 3D primary vertexing                           //
// Used by AliITSSortTrkl                                          //
// In each object the labels of the 2 paired tracklets             //
// are stored. DCA and crossing point coordinates are also stored. //
// Origin M.Masera (masera@to.infn.it)                             //
/////////////////////////////////////////////////////////////////////

#include <TMath.h>
#include "AliITSTracklPairs.h"

ClassImp(AliITSTracklPairs)

//______________________________________________________________________
AliITSTracklPairs::AliITSTracklPairs():TObject(),
fTrack1(0),
fTrack2(0),
fDCA(0.) {
  // Default constructor

  for(Int_t i=0;i<3;i++)fCross[i]=0.;
}

//______________________________________________________________________
AliITSTracklPairs::AliITSTracklPairs(Int_t t1, Int_t t2, Double_t dca, Double_t *coo):TObject(),
fTrack1(t1),
fTrack2(t2),
fDCA(dca) {
  // Standard constructor

  for(Int_t i=0;i<3;i++)fCross[i]=coo[i];
}

//______________________________________________________________________
AliITSTracklPairs::~AliITSTracklPairs(){
  // destructor
}

//______________________________________________________________________
Double_t AliITSTracklPairs::GetDistance(const AliITSTracklPairs& pair) const {
  // Get distance between the crossing point of pair and this
  Double_t point1[3];
  pair.GetCrossCoord(point1);
  Double_t dist = 0.;
  for(Int_t i=0; i<3; i++)dist+=(point1[i]-fCross[i])*(point1[i]-fCross[i]);
  dist=TMath::Sqrt(dist);
  return dist;
}
 AliITSTracklPairs.cxx:1
 AliITSTracklPairs.cxx:2
 AliITSTracklPairs.cxx:3
 AliITSTracklPairs.cxx:4
 AliITSTracklPairs.cxx:5
 AliITSTracklPairs.cxx:6
 AliITSTracklPairs.cxx:7
 AliITSTracklPairs.cxx:8
 AliITSTracklPairs.cxx:9
 AliITSTracklPairs.cxx:10
 AliITSTracklPairs.cxx:11
 AliITSTracklPairs.cxx:12
 AliITSTracklPairs.cxx:13
 AliITSTracklPairs.cxx:14
 AliITSTracklPairs.cxx:15
 AliITSTracklPairs.cxx:16
 AliITSTracklPairs.cxx:17
 AliITSTracklPairs.cxx:18
 AliITSTracklPairs.cxx:19
 AliITSTracklPairs.cxx:20
 AliITSTracklPairs.cxx:21
 AliITSTracklPairs.cxx:22
 AliITSTracklPairs.cxx:23
 AliITSTracklPairs.cxx:24
 AliITSTracklPairs.cxx:25
 AliITSTracklPairs.cxx:26
 AliITSTracklPairs.cxx:27
 AliITSTracklPairs.cxx:28
 AliITSTracklPairs.cxx:29
 AliITSTracklPairs.cxx:30
 AliITSTracklPairs.cxx:31
 AliITSTracklPairs.cxx:32
 AliITSTracklPairs.cxx:33
 AliITSTracklPairs.cxx:34
 AliITSTracklPairs.cxx:35
 AliITSTracklPairs.cxx:36
 AliITSTracklPairs.cxx:37
 AliITSTracklPairs.cxx:38
 AliITSTracklPairs.cxx:39
 AliITSTracklPairs.cxx:40
 AliITSTracklPairs.cxx:41
 AliITSTracklPairs.cxx:42
 AliITSTracklPairs.cxx:43
 AliITSTracklPairs.cxx:44
 AliITSTracklPairs.cxx:45
 AliITSTracklPairs.cxx:46
 AliITSTracklPairs.cxx:47
 AliITSTracklPairs.cxx:48
 AliITSTracklPairs.cxx:49
 AliITSTracklPairs.cxx:50
 AliITSTracklPairs.cxx:51
 AliITSTracklPairs.cxx:52
 AliITSTracklPairs.cxx:53
 AliITSTracklPairs.cxx:54
 AliITSTracklPairs.cxx:55
 AliITSTracklPairs.cxx:56
 AliITSTracklPairs.cxx:57
 AliITSTracklPairs.cxx:58
 AliITSTracklPairs.cxx:59
 AliITSTracklPairs.cxx:60
 AliITSTracklPairs.cxx:61
 AliITSTracklPairs.cxx:62
 AliITSTracklPairs.cxx:63
 AliITSTracklPairs.cxx:64
 AliITSTracklPairs.cxx:65