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 //-------------------------------------------------------------------------
17 // Implementation of the AliESDfriendTrack class
18 // This class keeps complementary to the AliESDtrack information
19 // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
20 //-------------------------------------------------------------------------
21 #include "AliTrackPointArray.h"
22 #include "AliESDfriendTrack.h"
23 #include "TObjArray.h"
24 #include "AliKalmanTrack.h"
26 ClassImp(AliESDfriendTrack)
28 AliESDfriendTrack::AliESDfriendTrack():
40 // Default constructor
43 for (i=0; i<kMaxITScluster; i++) fITSindex[i]=-2;
44 for (i=0; i<kMaxTPCcluster; i++) fTPCindex[i]=-2;
45 for (i=0; i<kMaxTRDcluster; i++) fTRDindex[i]=-2;
48 AliESDfriendTrack::AliESDfriendTrack(const AliESDfriendTrack &t):
63 for (i=0; i<kMaxITScluster; i++) fITSindex[i]=t.fITSindex[i];
64 for (i=0; i<kMaxTPCcluster; i++) fTPCindex[i]=t.fTPCindex[i];
65 for (i=0; i<kMaxTRDcluster; i++) fTRDindex[i]=t.fTRDindex[i];
66 if (t.fPoints) fPoints=new AliTrackPointArray(*t.fPoints);
67 if (t.fCalibContainer) {
68 fCalibContainer = new TObjArray(5);
69 Int_t no=t.fCalibContainer->GetEntriesFast();
70 for (i=0; i<no; i++) {
71 TObject *o=t.fCalibContainer->At(i);
72 fCalibContainer->AddLast(o->Clone());
76 if (t.fTPCOut) fTPCOut = new AliExternalTrackParam(*(t.fTPCOut));
77 if (t.fITSOut) fITSOut = new AliExternalTrackParam(*(t.fITSOut));
78 if (t.fTRDIn) fTRDIn = new AliExternalTrackParam(*(t.fTRDIn));
81 AliESDfriendTrack::~AliESDfriendTrack() {
86 if (fCalibContainer) fCalibContainer->Delete();
87 delete fCalibContainer;
96 void AliESDfriendTrack::AddCalibObject(TObject * calibObject){
98 // add calibration object to array -
99 // track is owner of the objects in the container
101 if (!fCalibContainer) fCalibContainer = new TObjArray(5);
102 fCalibContainer->AddLast(calibObject);
105 TObject * AliESDfriendTrack::GetCalibObject(Int_t index){
109 if (!fCalibContainer) return 0;
110 if (index>=fCalibContainer->GetEntriesFast()) return 0;
111 return fCalibContainer->At(index);
115 void AliESDfriendTrack::SetTPCOut(const AliExternalTrackParam ¶m) {
117 // backup TPC out track
120 fTPCOut=new AliExternalTrackParam(param);
122 void AliESDfriendTrack::SetITSOut(const AliExternalTrackParam ¶m) {
124 // backup ITS out track
127 fITSOut=new AliExternalTrackParam(param);
129 void AliESDfriendTrack::SetTRDIn(const AliExternalTrackParam ¶m) {
131 // backup TRD in track
134 fTRDIn=new AliExternalTrackParam(param);