]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliESDCosmicTrack.cxx
Coverity warnings removed
[u/mrichter/AliRoot.git] / TPC / AliESDCosmicTrack.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 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 //  derived from AliExternalTrackParam, itself is the trackpar at the upper end of the cosmic ray in TPC
17 //  its lower partner is fLowerTrackParam
18 //  number of cluster of the whole cosmic ray, its lever arm, chi2/ncls and impact parameters(D, Z) are also stored as important information of the combined TPC track quality
19 //           
20 //  Xianguo Lu 
21 //  lu@physi.uni-heidelberg.de
22 //  Xianguo.Lu@cern.ch
23 //           
24
25 #include "AliExternalTrackParam.h"
26 #include "AliESDCosmicTrack.h"
27
28 ClassImp(AliESDCosmicTrack);
29
30 AliESDCosmicTrack::AliESDCosmicTrack():
31   AliExternalTrackParam()
32   , fNCluster(-999)
33   , fLeverArm(-999)
34   , fChi2PerCluster(-999)
35   , fImpactD(-999)
36   , fImpactZ(-999)
37   , fIsReuse(-999)
38   , fFindableRatio(-999)
39 {
40   //
41   // default constructor
42   //
43   for(Int_t ii=0; ii<2; ii++)
44     fESDtrackIndex[ii] = 0;
45 }
46
47 AliESDCosmicTrack::AliESDCosmicTrack(const Int_t idUp, const Int_t idLow, const AliExternalTrackParam * trkparUp, const AliExternalTrackParam * trkparLow, const AliExternalTrackParam * parx0Up, const AliExternalTrackParam * parx0Low, const Int_t ncls, const Double_t la, const Double_t chi2, const Double_t impd, const Double_t impz, const Bool_t isreuse, const Double_t findable): 
48   AliExternalTrackParam(*trkparUp)
49   , fLowerTrackParam(*trkparLow)
50   , fX0UpperTrackParam(*parx0Up)
51   , fX0LowerTrackParam(*parx0Low)
52   , fNCluster(ncls)
53   , fLeverArm(la)
54   , fChi2PerCluster(chi2)
55   , fImpactD(impd)
56   , fImpactZ(impz)
57   , fIsReuse(isreuse)
58   , fFindableRatio(findable)
59 {
60   //
61   // constructor
62   //
63   fESDtrackIndex[0] = idUp;
64   fESDtrackIndex[1] = idLow;
65 }
66
67 AliESDCosmicTrack::AliESDCosmicTrack(const AliESDCosmicTrack & costrk):
68   AliExternalTrackParam(costrk),
69   fLowerTrackParam(costrk.fLowerTrackParam)
70   , fX0UpperTrackParam(costrk.fX0UpperTrackParam)
71   , fX0LowerTrackParam(costrk.fX0LowerTrackParam)
72   , fNCluster(costrk.fNCluster)
73   , fLeverArm(costrk.fLeverArm)
74   , fChi2PerCluster(costrk.fChi2PerCluster)
75   , fImpactD(costrk.fImpactD)
76   , fImpactZ(costrk.fImpactZ)
77   , fIsReuse(costrk.fIsReuse)
78   , fFindableRatio(costrk.fFindableRatio)
79 {
80   //
81   // copy constructor
82   //
83   for(Int_t ii=0; ii<2; ii++){
84     fESDtrackIndex[ii] = costrk.fESDtrackIndex[ii];
85   }
86 }
87
88 AliESDCosmicTrack AliESDCosmicTrack::operator=(const AliESDCosmicTrack & costrk)
89 {
90   //
91   // assignment operator
92   //
93   for(Int_t ii=0; ii<2; ii++){
94     fESDtrackIndex[ii] = costrk.fESDtrackIndex[ii];
95   }
96
97   AliExternalTrackParam::operator=(costrk);
98   fLowerTrackParam = costrk.fLowerTrackParam;
99   fX0UpperTrackParam = costrk.fX0UpperTrackParam;
100   fX0LowerTrackParam = costrk.fX0LowerTrackParam;
101   fNCluster = costrk.fNCluster;
102   fLeverArm = costrk.fLeverArm;
103   fChi2PerCluster = costrk.fChi2PerCluster;
104   fImpactD = costrk.fImpactD;
105   fImpactZ = costrk.fImpactZ;
106   fIsReuse = costrk.fIsReuse;
107   fFindableRatio = costrk.fFindableRatio;
108
109   return *this;
110 }