1 /**************************************************************************
2 * Copyright(c) 2009-2010, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 /////////////////////////////////////////////////////////////////////
19 // Helper class for 3D primary vertexing //
20 // Used by AliITSSortTrkl //
21 // In each object the labels of the 2 paired tracklets //
22 // are stored. DCA and crossing point coordinates are also stored. //
23 // Origin M.Masera (masera@to.infn.it) //
24 /////////////////////////////////////////////////////////////////////
27 #include "AliITSTracklPairs.h"
29 ClassImp(AliITSTracklPairs)
31 //______________________________________________________________________
32 AliITSTracklPairs::AliITSTracklPairs():TObject(),
36 // Default constructor
38 for(Int_t i=0;i<3;i++)fCross[i]=0.;
41 //______________________________________________________________________
42 AliITSTracklPairs::AliITSTracklPairs(Int_t t1, Int_t t2, Double_t dca, Double_t *coo):TObject(),
46 // Standard constructor
48 for(Int_t i=0;i<3;i++)fCross[i]=coo[i];
51 //______________________________________________________________________
52 AliITSTracklPairs::~AliITSTracklPairs(){
56 //______________________________________________________________________
57 Double_t AliITSTracklPairs::GetDistance(const AliITSTracklPairs& pair) const {
58 // Get distance between the crossing point of pair and this
60 pair.GetCrossCoord(point1);
62 for(Int_t i=0; i<3; i++)dist+=(point1[i]-fCross[i])*(point1[i]-fCross[i]);
63 dist=TMath::Sqrt(dist);