]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliVertex.cxx
The default thickness of the chips is set to 150 mkm (D.Elia). Removing some obsolete...
[u/mrichter/AliRoot.git] / STEER / AliVertex.cxx
1 /**************************************************************************
2  * Copyright(c) 2006-2008, 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 //-----------------------------------------------------------------
17 //           Implementation of the base Vertex class
18 //           This class contains the Secondary Vertex
19 //           of a set of tracks
20 //           And it is the base class for primary vertices
21 // Origin: F.Prino, Torino, prino@to.infn.it
22 //-----------------------------------------------------------------
23
24 #include "AliVertex.h"
25
26
27 ClassImp(AliVertex)
28
29 //--------------------------------------------------------------------------
30 AliVertex::AliVertex() : TNamed() {
31 //
32 // Default Constructor, set everything to 0
33 //
34   for(Int_t k=0;k<3;k++) fPosition[k]   = 0;
35   fSigma = 0;
36   fNContributors=0;
37 }
38
39 //--------------------------------------------------------------------------
40 AliVertex::AliVertex(Double_t position[3],Double_t dispersion,
41                 Int_t nContributors): TNamed() {
42   //
43   // Standard Constructor
44   //
45
46   for(Int_t k=0;k<3;k++) fPosition[k]   = position[k];
47   fSigma         = dispersion;
48   fNContributors = nContributors;
49   SetName("BaseVertex");
50
51 }
52
53 //--------------------------------------------------------------------------
54 AliVertex::AliVertex(const AliVertex &source): TNamed(source) {
55   //
56   // Copy constructor
57   //
58   for(Int_t i=0;i<3;i++)fPosition[i] = source.fPosition[i];
59   fSigma = source.GetDispersion();
60   fNContributors = source.GetNContributors();
61 }
62
63 //--------------------------------------------------------------------------
64 AliVertex &AliVertex::operator=(const AliVertex &source){
65   //
66   // assignment operator
67   //
68   if(&source == this) return *this;
69   this->SetName(source.GetName());
70   this->SetTitle(source.GetTitle());
71   for(Int_t i=0;i<3;i++)fPosition[i] = source.fPosition[i];
72   fSigma = source.GetDispersion();
73   fNContributors = source.GetNContributors();
74   return *this;
75 }
76
77
78 //--------------------------------------------------------------------------
79 AliVertex::~AliVertex() {
80 //  
81 // Default Destructor
82 //
83
84 }
85 //--------------------------------------------------------------------------
86 void AliVertex::GetXYZ(Double_t position[3]) const {
87 //
88 // Return position of the vertex in global frame
89 //
90   position[0] = fPosition[0];
91   position[1] = fPosition[1];
92   position[2] = fPosition[2];
93
94   return;
95 }
96 //--------------------------------------------------------------------------
97 void AliVertex::Print(Option_t* /*option*/) const {
98 //
99 // Print out information on all data members
100 //
101   printf("Vertex position:\n");
102   printf("   x = %f\n",fPosition[0]);
103   printf("   y = %f\n",fPosition[1]);
104   printf("   z = %f\n",fPosition[2]);
105   printf(" Dispersion = %f\n",fSigma);
106   printf(" # tracks = %d\n",fNContributors);
107
108   return;
109 }
110
111
112
113