]>
Commit | Line | Data |
---|---|---|
2f4cac02 | 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), | |
7d365db4 | 50 | fstatus(-999), |
51 | fITSLabel(-999), | |
52 | fTPCLabel(-999) | |
2f4cac02 | 53 | { |
54 | // default constructor | |
55 | SetPID((Double_t*)NULL); | |
7d365db4 | 56 | //SetExternalDiaCovariance((Double_t*)NULL); |
2f4cac02 | 57 | } |
58 | ||
59 | //______________________________________________________________________________ | |
60 | AliJTrack::AliJTrack(const AliJTrack& a): | |
61 | AliPhJBaseTrack(a), | |
62 | fChi2perNDF(a.fChi2perNDF), | |
63 | fChi2Trig(a.fChi2Trig), | |
64 | fRecFlags(a.fRecFlags), | |
65 | fTPCdEdx(a.fTPCdEdx), | |
66 | fTPCnClust(a.fTPCnClust), | |
67 | fImapactXY(a.fImapactXY), | |
68 | fImapactZ(a.fImapactZ), | |
69 | fTPCDCAXY(a.fTPCDCAXY), | |
70 | fTPCDCAZ(a.fTPCDCAZ), | |
71 | fTPCClustPerFindClust(a.fTPCClustPerFindClust), | |
72 | fTPCChi2PerClust(a.fTPCChi2PerClust), | |
73 | fKinkIndex(a.fKinkIndex), | |
7d365db4 | 74 | fstatus(a.fstatus), |
75 | fITSLabel(a.fITSLabel), | |
76 | fTPCLabel(a.fTPCLabel) | |
2f4cac02 | 77 | { |
78 | //copy constructor | |
79 | for(Int_t i=0;i<10;i++) ftrkPID[i]=a.ftrkPID[i]; | |
7d365db4 | 80 | // for(Int_t i=0;i<5;i++) fextDiaCov[i]=a.fextDiaCov[i]; |
2f4cac02 | 81 | } |
82 | //______________________________________________________________________________ | |
83 | void AliJTrack::ConvertAliPID(){ | |
84 | ||
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. | |
88 | ||
89 | ftrkPID[kDeuteronAli] = 0.; | |
90 | ftrkPID[kTritonAli] = 0.; | |
91 | ftrkPID[kHelium3Ali] = 0.; | |
92 | ftrkPID[kAlphaAli] = 0.; | |
93 | ftrkPID[kUnknownAli] = 0.; | |
94 | ||
95 | return; | |
96 | ||
97 | } | |
98 | ||
99 | //______________________________________________________________________________ | |
100 | AliJTrack& AliJTrack::operator=(const AliJTrack& trk){ | |
101 | //operator = | |
102 | if(this != &trk){ | |
103 | AliPhJBaseTrack::operator=(trk); | |
104 | for(Int_t i=0;i<10;i++){ | |
105 | ftrkPID[i] = trk.ftrkPID[i]; | |
106 | } | |
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; | |
7d365db4 | 120 | // for(Int_t i=0; i<5; i++){ |
121 | // fextDiaCov[i] = trk.fextDiaCov[i]; | |
122 | // } | |
2f4cac02 | 123 | } |
124 | ||
125 | return *this; | |
126 | } | |
127 | ||
128 | ||
129 | //___________________________________________________________________ | |
130 | void AliJTrack::SetPID(const Double_t *pid) { | |
131 | //set pid | |
132 | if(pid) for(Int_t i=0; i<10; ++i) ftrkPID[i]=pid[i]; | |
133 | else { | |
134 | for(Int_t i=0; i<10; ftrkPID[i++]=0.){;} | |
135 | ftrkPID[kUnknownAli]=1.; | |
136 | } | |
137 | } | |
138 | ||
139 | //___________________________________________________________________ | |
7d365db4 | 140 | /*void AliJTrack::SetExternalDiaCovariance(const Double_t *ecov) { |
2f4cac02 | 141 | //set diagonal elements of the covariance matrix |
142 | if(ecov) { | |
143 | for(Int_t i=0; i<5; i++) fextDiaCov[i]=ecov[i]; | |
144 | } else { | |
145 | for(Int_t i=0; i<5;i++) fextDiaCov[i]=-999; | |
146 | } | |
7d365db4 | 147 | }*/ |