]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSTracklPairs.cxx
Updates for pile-up vertex (F. Prino)
[u/mrichter/AliRoot.git] / ITS / AliITSTracklPairs.cxx
CommitLineData
108cb8b9 1/**************************************************************************
2 * Copyright(c) 2009-2010, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/* $Id$ */
17
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/////////////////////////////////////////////////////////////////////
25
26#include <TMath.h>
27#include "AliITSTracklPairs.h"
28
29ClassImp(AliITSTracklPairs)
30
31//______________________________________________________________________
32AliITSTracklPairs::AliITSTracklPairs():TObject(),
33fTrack1(0),
34fTrack2(0),
35fDCA(0.) {
36 // Default constructor
37
38 for(Int_t i=0;i<3;i++)fCross[i]=0.;
39}
40
41//______________________________________________________________________
42AliITSTracklPairs::AliITSTracklPairs(Int_t t1, Int_t t2, Double_t dca, Double_t *coo):TObject(),
43fTrack1(t1),
44fTrack2(t2),
45fDCA(dca) {
46 // Standard constructor
47
48 for(Int_t i=0;i<3;i++)fCross[i]=coo[i];
49}
50
51//______________________________________________________________________
52AliITSTracklPairs::~AliITSTracklPairs(){
53 // destructor
54}
55
56//______________________________________________________________________
57Double_t AliITSTracklPairs::GetDistance(const AliITSTracklPairs& pair) const {
58 // Get distance between the crossing point of pair and this
59 Double_t point1[3];
60 pair.GetCrossCoord(point1);
61 Double_t dist = 0.;
62 for(Int_t i=0; i<3; i++)dist+=(point1[i]-fCross[i])*(point1[i]-fCross[i]);
63 dist=TMath::Sqrt(dist);
64 return dist;
65}