]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JCORRAN/AliJTrack.cxx
excepting also empty directory for merging
[u/mrichter/AliRoot.git] / PWG4 / JCORRAN / AliJTrack.cxx
1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 notifce   *
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: AliJTrack.cxx,v 1.2 2008/01/21 11:56:39 djkim Exp $
17
18 ////////////////////////////////////////////////////
19 //
20 //  \file AliJTrack.cxx
21 //  \brief
22 //  \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla)
23 //  \email: djkim@jyu.fi
24 //  \version $Revision: 1.1 $
25 //  \date $Date: 2008/05/02 11:56:39 $
26 //  
27 // class encapsulating aliroot track information
28 ////////////////////////////////////////////////////
29
30 #include "AliPhJBaseTrack.h"
31 #include "AliJTrack.h"
32
33 //ClassImp(AliJTrack)
34
35 //______________________________________________________________________________
36 AliJTrack::AliJTrack() : 
37   AliPhJBaseTrack(),
38   fChi2perNDF(-999),
39   fChi2Trig(-999),
40   fRecFlags(-999),
41   fTPCdEdx(-999),         
42   fTPCnClust(-999),
43   fImapactXY(-999),
44   fImapactZ(-999),
45   fTPCDCAXY(-999),
46   fTPCDCAZ(-999),
47   fTPCClustPerFindClust(-999),
48   fTPCChi2PerClust(-999),
49   fKinkIndex(-999),
50   fstatus(-999)
51
52 {
53   // default constructor
54   SetPID((Double_t*)NULL);
55   SetExternalDiaCovariance((Double_t*)NULL);
56 }
57
58 //______________________________________________________________________________
59 AliJTrack::AliJTrack(const AliJTrack& a):
60   AliPhJBaseTrack(a),
61   fChi2perNDF(a.fChi2perNDF),
62   fChi2Trig(a.fChi2Trig),
63   fRecFlags(a.fRecFlags),
64   fTPCdEdx(a.fTPCdEdx),
65   fTPCnClust(a.fTPCnClust),
66   fImapactXY(a.fImapactXY),
67   fImapactZ(a.fImapactZ),
68   fTPCDCAXY(a.fTPCDCAXY),
69   fTPCDCAZ(a.fTPCDCAZ),
70   fTPCClustPerFindClust(a.fTPCClustPerFindClust),
71   fTPCChi2PerClust(a.fTPCChi2PerClust),
72   fKinkIndex(a.fKinkIndex),
73   fstatus(a.fstatus)
74
75   //copy constructor
76   for(Int_t i=0;i<10;i++) ftrkPID[i]=a.ftrkPID[i];
77   for(Int_t i=0;i<5;i++)  fextDiaCov[i]=a.fextDiaCov[i];
78 }
79 //______________________________________________________________________________
80 void AliJTrack::ConvertAliPID(){
81
82   // Converts AliPID array.
83   // The numbering scheme is the same for electrons, muons, pions, kaons, and protons.
84   // Everything else has to be set to zero.
85
86   ftrkPID[kDeuteronAli] = 0.;
87   ftrkPID[kTritonAli]   = 0.;
88   ftrkPID[kHelium3Ali]  = 0.;
89   ftrkPID[kAlphaAli]    = 0.;
90   ftrkPID[kUnknownAli]  = 0.;
91   
92   return;
93
94 }
95
96 //______________________________________________________________________________
97 AliJTrack&  AliJTrack::operator=(const AliJTrack& trk){
98   //operator = 
99   if(this != &trk){
100     AliPhJBaseTrack::operator=(trk);
101     for(Int_t i=0;i<10;i++){
102       ftrkPID[i] = trk.ftrkPID[i];
103     }
104     fChi2perNDF = trk.fChi2perNDF;
105     fChi2Trig   = trk.fChi2Trig;
106     fRecFlags   = trk.fRecFlags;
107     fTPCdEdx    = trk.fTPCdEdx;
108     fTPCnClust  = trk.fTPCnClust;
109     fImapactXY = trk.fImapactXY;
110     fImapactZ  = trk.fImapactZ;
111     fTPCDCAXY  = trk.fTPCDCAXY;
112     fTPCDCAZ   = trk.fTPCDCAZ;
113     fTPCClustPerFindClust = trk.fTPCClustPerFindClust;
114     fTPCChi2PerClust      = trk.fTPCChi2PerClust;
115     fKinkIndex  = trk.fKinkIndex;
116     fstatus     = trk.fstatus;
117     for(Int_t i=0; i<5; i++){
118       fextDiaCov[i] = trk.fextDiaCov[i];
119     }
120   }
121
122   return *this;
123 }
124
125
126 //___________________________________________________________________
127 void AliJTrack::SetPID(const Double_t *pid) {
128   //set pid
129   if(pid) for(Int_t i=0; i<10; ++i) ftrkPID[i]=pid[i];
130   else {
131     for(Int_t i=0; i<10; ftrkPID[i++]=0.){;}
132     ftrkPID[kUnknownAli]=1.;
133   }
134 }
135
136 //___________________________________________________________________
137 void AliJTrack::SetExternalDiaCovariance(const Double_t *ecov) {
138   //set diagonal elements of the covariance  matrix 
139   if(ecov) {
140     for(Int_t i=0; i<5; i++) fextDiaCov[i]=ecov[i];
141   } else {
142     for(Int_t i=0; i<5;i++) fextDiaCov[i]=-999;
143   }
144 }