/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ //------------------------------------------------------------------------- // Implementation of the AliESDfriendTrack class // This class keeps complementary to the AliESDtrack information // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch //------------------------------------------------------------------------- #include "AliTrackPointArray.h" #include "AliESDfriendTrack.h" #include "TObjArray.h" #include "AliKalmanTrack.h" ClassImp(AliESDfriendTrack) AliESDfriendTrack::AliESDfriendTrack(): TObject(), f1P(0), fnMaxITScluster(12), fnMaxTPCcluster(160), fnMaxTRDcluster(180), fITSindices(0x0), fTPCindices(0x0), fTRDindices(0x0), fPoints(0), fCalibContainer(0), fITStrack(0), fTRDtrack(0), fTPCOut(0), fITSOut(0), fTRDIn(0) { // // Default constructor // fITSindices = new Int_t[fnMaxITScluster]; fTPCindices = new Int_t[fnMaxTPCcluster]; fTRDindices = new Int_t[fnMaxTRDcluster]; Int_t i; for (i=0; iGetEntriesFast(); for (i=0; iAt(i); fCalibContainer->AddLast(o->Clone()); } } if (t.fTPCOut) fTPCOut = new AliExternalTrackParam(*(t.fTPCOut)); if (t.fITSOut) fITSOut = new AliExternalTrackParam(*(t.fITSOut)); if (t.fTRDIn) fTRDIn = new AliExternalTrackParam(*(t.fTRDIn)); } AliESDfriendTrack::~AliESDfriendTrack() { // // Simple destructor // if (fPoints) delete fPoints; if (fCalibContainer) { fCalibContainer->Delete(); delete fCalibContainer; } if (fITStrack) delete fITStrack; if (fTRDtrack) delete fTRDtrack; if (fTPCOut) delete fTPCOut; if (fITSOut) delete fITSOut; if (fTRDIn) delete fTRDIn; if (fITSindices) delete [] fITSindices; if (fTPCindices) delete [] fTPCindices; if (fTRDindices) delete [] fTRDindices; } void AliESDfriendTrack::AddCalibObject(TObject * calibObject){ // // add calibration object to array - // track is owner of the objects in the container // if (!fCalibContainer) fCalibContainer = new TObjArray(5); fCalibContainer->AddLast(calibObject); } TObject * AliESDfriendTrack::GetCalibObject(Int_t index){ // // // if (!fCalibContainer) return 0; if (index>=fCalibContainer->GetEntriesFast()) return 0; return fCalibContainer->At(index); } void AliESDfriendTrack::SetTPCOut(const AliExternalTrackParam ¶m) { // // backup TPC out track // delete fTPCOut; fTPCOut=new AliExternalTrackParam(param); } void AliESDfriendTrack::SetITSOut(const AliExternalTrackParam ¶m) { // // backup ITS out track // delete fITSOut; fITSOut=new AliExternalTrackParam(param); } void AliESDfriendTrack::SetTRDIn(const AliExternalTrackParam ¶m) { // // backup TRD in track // delete fTRDIn; fTRDIn=new AliExternalTrackParam(param); } /* //______________________________________________________________________________ void AliESDfriendTrack::Streamer(TBuffer &R__b) { // Streamer to take into account old ESDfriend objects and new ones. if (R__b.IsReading()) { UInt_t R__s, R__c; Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v > 3) { R__b.ReadClassBuffer(AliESDfriendTrack::Class(),this,R__v,R__s,R__c); return; } // reading ESDfriendTrack with version < 3 TObject::Streamer(R__b); R__b >> f1P; R__b.ReadStaticArray((int*)fITSindex); R__b.ReadStaticArray((int*)fTPCindex); R__b.ReadStaticArray((int*)fTRDindex); R__b >> fPoints; R__b >> fCalibContainer; R__b >> fTPCOut; R__b >> fITSOut; R__b >> fTRDIn; R__b.CheckByteCount(R__s, R__c, AliESDfriendTrack::IsA()); } else { R__b.WriteClassBuffer(AliESDfriendTrack::Class(),this); } } */