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 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 **************************************************************************/
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
21 // lu@physi.uni-heidelberg.de
25 #include "AliExternalTrackParam.h"
26 #include "AliESDCosmicTrack.h"
28 ClassImp(AliESDCosmicTrack);
30 AliESDCosmicTrack::AliESDCosmicTrack():
31 AliExternalTrackParam()
33 , fLowerTrackParam(0x0)
34 , fX0UpperTrackParam(0x0)
35 , fX0LowerTrackParam(0x0)
36 , fInnerClusterUpper(0x0)
37 , fInnerClusterLower(0x0)
41 , fChi2PerCluster(-999)
45 , fFindableRatio(-999)
48 // default constructor
49 // important to have default constructor in TTree
51 for(Int_t ii=0; ii<2; ii++)
52 fESDtrackIndex[ii] = 0;
55 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, const TVector3 innerclusterupper, const TVector3 innerclusterlower):
56 AliExternalTrackParam(*trkparUp)
57 , fLowerTrackParam(new AliExternalTrackParam(*trkparLow))
58 , fX0UpperTrackParam(new AliExternalTrackParam(*parx0Up))
59 , fX0LowerTrackParam(new AliExternalTrackParam(*parx0Low))
60 , fInnerClusterUpper(new TVector3(innerclusterupper))
61 , fInnerClusterLower(new TVector3(innerclusterlower))
64 , fChi2PerCluster(chi2)
68 , fFindableRatio(findable)
73 fESDtrackIndex[0] = idUp;
74 fESDtrackIndex[1] = idLow;
77 AliESDCosmicTrack::AliESDCosmicTrack(const AliESDCosmicTrack & costrk):
78 AliExternalTrackParam(costrk)
79 , fLowerTrackParam(new AliExternalTrackParam(*costrk.fLowerTrackParam))
80 , fX0UpperTrackParam(new AliExternalTrackParam(*costrk.fX0UpperTrackParam))
81 , fX0LowerTrackParam(new AliExternalTrackParam(*costrk.fX0LowerTrackParam))
82 , fInnerClusterUpper(new TVector3(*costrk.fInnerClusterUpper))
83 , fInnerClusterLower(new TVector3(*costrk.fInnerClusterLower))
84 , fNCluster(costrk.fNCluster)
85 , fLeverArm(costrk.fLeverArm)
86 , fChi2PerCluster(costrk.fChi2PerCluster)
87 , fImpactD(costrk.fImpactD)
88 , fImpactZ(costrk.fImpactZ)
89 , fIsReuse(costrk.fIsReuse)
90 , fFindableRatio(costrk.fFindableRatio)
95 for(Int_t ii=0; ii<2; ii++){
96 fESDtrackIndex[ii] = costrk.fESDtrackIndex[ii];
100 AliESDCosmicTrack &AliESDCosmicTrack::operator=(const AliESDCosmicTrack & costrk)
103 // assignment operator
105 if(&costrk == this) return *this;
106 AliExternalTrackParam::operator=(costrk);
107 fLowerTrackParam = new AliExternalTrackParam(*costrk.fLowerTrackParam);
108 fX0UpperTrackParam = new AliExternalTrackParam(*costrk.fX0UpperTrackParam);
109 fX0LowerTrackParam = new AliExternalTrackParam(*costrk.fX0LowerTrackParam);
110 fInnerClusterUpper = new TVector3(*costrk.fInnerClusterUpper);
111 fInnerClusterLower = new TVector3(*costrk.fInnerClusterLower);
112 fNCluster = costrk.fNCluster;
113 fLeverArm = costrk.fLeverArm;
114 fChi2PerCluster = costrk.fChi2PerCluster;
115 fImpactD = costrk.fImpactD;
116 fImpactZ = costrk.fImpactZ;
117 fIsReuse = costrk.fIsReuse;
118 fFindableRatio = costrk.fFindableRatio;
120 for(Int_t ii=0; ii<2; ii++){
121 fESDtrackIndex[ii] = costrk.fESDtrackIndex[ii];
126 AliESDCosmicTrack::~AliESDCosmicTrack()
128 delete fLowerTrackParam;
129 delete fX0UpperTrackParam;
130 delete fX0LowerTrackParam;
132 delete fInnerClusterUpper;
133 delete fInnerClusterLower;