1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 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 **************************************************************************/
16 // $Id: AliJTrack.cxx,v 1.2 2008/01/21 11:56:39 djkim Exp $
18 ////////////////////////////////////////////////////
20 // \file AliJTrack.cxx
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 $
27 // class encapsulating aliroot track information
28 ////////////////////////////////////////////////////
30 #include "AliPhJBaseTrack.h"
31 #include "AliJTrack.h"
35 //______________________________________________________________________________
36 AliJTrack::AliJTrack() :
47 fTPCClustPerFindClust(-999),
48 fTPCChi2PerClust(-999),
54 // default constructor
55 SetPID((Double_t*)NULL);
56 //SetExternalDiaCovariance((Double_t*)NULL);
59 //______________________________________________________________________________
60 AliJTrack::AliJTrack(const AliJTrack& a):
62 fChi2perNDF(a.fChi2perNDF),
63 fChi2Trig(a.fChi2Trig),
64 fRecFlags(a.fRecFlags),
66 fTPCnClust(a.fTPCnClust),
67 fImapactXY(a.fImapactXY),
68 fImapactZ(a.fImapactZ),
69 fTPCDCAXY(a.fTPCDCAXY),
71 fTPCClustPerFindClust(a.fTPCClustPerFindClust),
72 fTPCChi2PerClust(a.fTPCChi2PerClust),
73 fKinkIndex(a.fKinkIndex),
75 fITSLabel(a.fITSLabel),
76 fTPCLabel(a.fTPCLabel)
79 for(Int_t i=0;i<10;i++) ftrkPID[i]=a.ftrkPID[i];
80 // for(Int_t i=0;i<5;i++) fextDiaCov[i]=a.fextDiaCov[i];
82 //______________________________________________________________________________
83 void AliJTrack::ConvertAliPID(){
85 // Converts AliPID array.
86 // The numbering scheme is the same for electrons, muons, pions, kaons, and protons.
87 // Everything else has to be set to zero.
89 ftrkPID[kDeuteronAli] = 0.;
90 ftrkPID[kTritonAli] = 0.;
91 ftrkPID[kHelium3Ali] = 0.;
92 ftrkPID[kAlphaAli] = 0.;
93 ftrkPID[kUnknownAli] = 0.;
99 //______________________________________________________________________________
100 AliJTrack& AliJTrack::operator=(const AliJTrack& trk){
103 AliPhJBaseTrack::operator=(trk);
104 for(Int_t i=0;i<10;i++){
105 ftrkPID[i] = trk.ftrkPID[i];
107 fChi2perNDF = trk.fChi2perNDF;
108 fChi2Trig = trk.fChi2Trig;
109 fRecFlags = trk.fRecFlags;
110 fTPCdEdx = trk.fTPCdEdx;
111 fTPCnClust = trk.fTPCnClust;
112 fImapactXY = trk.fImapactXY;
113 fImapactZ = trk.fImapactZ;
114 fTPCDCAXY = trk.fTPCDCAXY;
115 fTPCDCAZ = trk.fTPCDCAZ;
116 fTPCClustPerFindClust = trk.fTPCClustPerFindClust;
117 fTPCChi2PerClust = trk.fTPCChi2PerClust;
118 fKinkIndex = trk.fKinkIndex;
119 fstatus = trk.fstatus;
120 // for(Int_t i=0; i<5; i++){
121 // fextDiaCov[i] = trk.fextDiaCov[i];
129 //___________________________________________________________________
130 void AliJTrack::SetPID(const Double_t *pid) {
132 if(pid) for(Int_t i=0; i<10; ++i) ftrkPID[i]=pid[i];
134 for(Int_t i=0; i<10; ftrkPID[i++]=0.){;}
135 ftrkPID[kUnknownAli]=1.;
139 //___________________________________________________________________
140 /*void AliJTrack::SetExternalDiaCovariance(const Double_t *ecov) {
141 //set diagonal elements of the covariance matrix
143 for(Int_t i=0; i<5; i++) fextDiaCov[i]=ecov[i];
145 for(Int_t i=0; i<5;i++) fextDiaCov[i]=-999;