Line data Source code
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 172 : ClassImp(AliESDCosmicTrack);
29 :
30 : AliESDCosmicTrack::AliESDCosmicTrack():
31 4 : AliExternalTrackParam()
32 :
33 4 : , fLowerTrackParam(0x0)
34 4 : , fX0UpperTrackParam(0x0)
35 4 : , fX0LowerTrackParam(0x0)
36 4 : , fInnerClusterUpper(0x0)
37 4 : , fInnerClusterLower(0x0)
38 :
39 4 : , fNCluster(-999)
40 4 : , fLeverArm(-999)
41 4 : , fChi2PerCluster(-999)
42 4 : , fImpactD(-999)
43 4 : , fImpactZ(-999)
44 4 : , fIsReuse(-999)
45 4 : , fFindableRatio(-999)
46 20 : {
47 : //
48 : // default constructor
49 : // important to have default constructor in TTree
50 : //
51 24 : for(Int_t ii=0; ii<2; ii++)
52 8 : fESDtrackIndex[ii] = 0;
53 8 : }
54 :
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 0 : AliExternalTrackParam(*trkparUp)
57 0 : , fLowerTrackParam(new AliExternalTrackParam(*trkparLow))
58 0 : , fX0UpperTrackParam(new AliExternalTrackParam(*parx0Up))
59 0 : , fX0LowerTrackParam(new AliExternalTrackParam(*parx0Low))
60 0 : , fInnerClusterUpper(new TVector3(innerclusterupper))
61 0 : , fInnerClusterLower(new TVector3(innerclusterlower))
62 0 : , fNCluster(ncls)
63 0 : , fLeverArm(la)
64 0 : , fChi2PerCluster(chi2)
65 0 : , fImpactD(impd)
66 0 : , fImpactZ(impz)
67 0 : , fIsReuse(isreuse)
68 0 : , fFindableRatio(findable)
69 0 : {
70 : //
71 : // constructor
72 : //
73 0 : fESDtrackIndex[0] = idUp;
74 0 : fESDtrackIndex[1] = idLow;
75 0 : }
76 :
77 : AliESDCosmicTrack::AliESDCosmicTrack(const AliESDCosmicTrack & costrk):
78 0 : AliExternalTrackParam(costrk)
79 0 : , fLowerTrackParam(new AliExternalTrackParam(*costrk.fLowerTrackParam))
80 0 : , fX0UpperTrackParam(new AliExternalTrackParam(*costrk.fX0UpperTrackParam))
81 0 : , fX0LowerTrackParam(new AliExternalTrackParam(*costrk.fX0LowerTrackParam))
82 0 : , fInnerClusterUpper(new TVector3(*costrk.fInnerClusterUpper))
83 0 : , fInnerClusterLower(new TVector3(*costrk.fInnerClusterLower))
84 0 : , fNCluster(costrk.fNCluster)
85 0 : , fLeverArm(costrk.fLeverArm)
86 0 : , fChi2PerCluster(costrk.fChi2PerCluster)
87 0 : , fImpactD(costrk.fImpactD)
88 0 : , fImpactZ(costrk.fImpactZ)
89 0 : , fIsReuse(costrk.fIsReuse)
90 0 : , fFindableRatio(costrk.fFindableRatio)
91 0 : {
92 : //
93 : // copy constructor
94 : //
95 0 : for(Int_t ii=0; ii<2; ii++){
96 0 : fESDtrackIndex[ii] = costrk.fESDtrackIndex[ii];
97 : }
98 0 : }
99 :
100 : AliESDCosmicTrack &AliESDCosmicTrack::operator=(const AliESDCosmicTrack & costrk)
101 : {
102 : //
103 : // assignment operator
104 : //
105 0 : if(&costrk == this) return *this;
106 0 : AliExternalTrackParam::operator=(costrk);
107 0 : fLowerTrackParam = new AliExternalTrackParam(*costrk.fLowerTrackParam);
108 0 : fX0UpperTrackParam = new AliExternalTrackParam(*costrk.fX0UpperTrackParam);
109 0 : fX0LowerTrackParam = new AliExternalTrackParam(*costrk.fX0LowerTrackParam);
110 0 : fInnerClusterUpper = new TVector3(*costrk.fInnerClusterUpper);
111 0 : fInnerClusterLower = new TVector3(*costrk.fInnerClusterLower);
112 0 : fNCluster = costrk.fNCluster;
113 0 : fLeverArm = costrk.fLeverArm;
114 0 : fChi2PerCluster = costrk.fChi2PerCluster;
115 0 : fImpactD = costrk.fImpactD;
116 0 : fImpactZ = costrk.fImpactZ;
117 0 : fIsReuse = costrk.fIsReuse;
118 0 : fFindableRatio = costrk.fFindableRatio;
119 :
120 0 : for(Int_t ii=0; ii<2; ii++){
121 0 : fESDtrackIndex[ii] = costrk.fESDtrackIndex[ii];
122 : }
123 0 : return *this;
124 0 : }
125 :
126 : AliESDCosmicTrack::~AliESDCosmicTrack()
127 24 : {
128 4 : delete fLowerTrackParam;
129 4 : delete fX0UpperTrackParam;
130 4 : delete fX0LowerTrackParam;
131 :
132 4 : delete fInnerClusterUpper;
133 4 : delete fInnerClusterLower;
134 12 : }
135 :
|