From cf0f66c212b41980e74478e4777f79670f6345d7 Mon Sep 17 00:00:00 2001 From: belikov Date: Wed, 1 Nov 2006 14:16:37 +0000 Subject: [PATCH] Moving the array of the track points from ESDtrack to ESDfriendTrack. --- STEER/AliAlignmentTracks.cxx | 6 ++++++ STEER/AliESDtrack.cxx | 14 -------------- STEER/AliESDtrack.h | 15 ++++++++------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/STEER/AliAlignmentTracks.cxx b/STEER/AliAlignmentTracks.cxx index 140562db9e3..17ec9ece104 100644 --- a/STEER/AliAlignmentTracks.cxx +++ b/STEER/AliAlignmentTracks.cxx @@ -153,6 +153,9 @@ void AliAlignmentTracks::ProcessESD() AliESD *esd = 0; fESDChain->SetBranchAddress("ESD",&esd); + AliESDfriend *esdf = 0; + fESDChain->SetBranchStatus("ESDfriend*",1); + fESDChain->SetBranchAddress("ESDfriend.",&esdf); // Open the output file if (fPointsFilename.Data() == "") { @@ -172,6 +175,9 @@ void AliAlignmentTracks::ProcessESD() Int_t ievent = 0; while (fESDChain->GetEntry(ievent++)) { if (!esd) break; + + esd->SetESDfriend(esdf); //Attach the friend to the ESD + Int_t ntracks = esd->GetNumberOfTracks(); for (Int_t itrack=0; itrack < ntracks; itrack++) { AliESDtrack * track = esd->GetTrack(itrack); diff --git a/STEER/AliESDtrack.cxx b/STEER/AliESDtrack.cxx index 172b0c62fcc..ad495540eec 100644 --- a/STEER/AliESDtrack.cxx +++ b/STEER/AliESDtrack.cxx @@ -106,7 +106,6 @@ AliESDtrack::AliESDtrack() : fRICHmipX(-1), fRICHmipY(-1), fEMCALindex(kEMCALNoMatch), - fPoints(0), fFriendTrack(new AliESDfriendTrack()) { // @@ -185,7 +184,6 @@ AliESDtrack::AliESDtrack(const AliESDtrack& track): fRICHmipX(track.fRICHmipX), fRICHmipY(track.fRICHmipY), fEMCALindex(track.fEMCALindex), - fPoints(0), fFriendTrack(0) { // @@ -217,7 +215,6 @@ AliESDtrack::AliESDtrack(const AliESDtrack& track): if (track.fIp) fIp=new AliExternalTrackParam(*track.fIp); if (track.fOp) fOp=new AliExternalTrackParam(*track.fOp); - if (track.fPoints) fPoints=new AliTrackPointArray(*(track.fPoints)); if (track.fFriendTrack) fFriendTrack=new AliESDfriendTrack(*(track.fFriendTrack)); } @@ -231,7 +228,6 @@ AliESDtrack::~AliESDtrack(){ delete fOp; delete fCp; delete fFriendTrack; - delete fPoints; } void AliESDtrack::AddCalibObject(TObject * object){ @@ -338,7 +334,6 @@ void AliESDtrack::MakeMiniESDtrack(){ fEMCALindex = kEMCALNoMatch; delete fFriendTrack; fFriendTrack = 0; - delete fPoints; fPoints = 0; } //_______________________________________________________________________ Double_t AliESDtrack::GetMass() const { @@ -894,15 +889,6 @@ Bool_t AliESDtrack::RelateToVertex return kTRUE; } -void AliESDtrack::SetTrackPointArray(AliTrackPointArray *points) { - fPoints=points; - //fFriendTrack->SetTrackPointArray(points); -} -const AliTrackPointArray *AliESDtrack::GetTrackPointArray() const { - return fPoints; - //return fFriendTrack->GetTrackPointArray(); -} - //_______________________________________________________________________ void AliESDtrack::Print(Option_t *) const { // Prints info on the track diff --git a/STEER/AliESDtrack.h b/STEER/AliESDtrack.h index 2ca361f0c03..86a6d9c4b0d 100644 --- a/STEER/AliESDtrack.h +++ b/STEER/AliESDtrack.h @@ -226,9 +226,12 @@ public: void SetEMCALcluster(Int_t index) {fEMCALindex=index;} Bool_t IsEMCAL() const {return fFlags&kEMCALmatch;} - void SetTrackPointArray(AliTrackPointArray *points); - const AliTrackPointArray *GetTrackPointArray() const; - + void SetTrackPointArray(AliTrackPointArray *points) { + fFriendTrack->SetTrackPointArray(points); + } + const AliTrackPointArray *GetTrackPointArray() const { + return fFriendTrack->GetTrackPointArray(); + } Bool_t RelateToVertex(const AliESDVertex *vtx, Double_t b, Double_t maxd); void GetImpactParameters(Float_t &xy,Float_t &z) const {xy=fD; z=fZ;} void GetImpactParameters(Float_t p[2], Float_t cov[3]) const { @@ -339,9 +342,7 @@ protected: Float_t fRICHmipY; // y of the MIP in LORS // EMCAL related track information - Int_t fEMCALindex; // index of associated EMCAL cluster (AliESDCaloCluster) - - AliTrackPointArray *fPoints;// Array of track space points in the global frame + Int_t fEMCALindex; // index of associated EMCAL cluster (AliESDCaloCluster) AliESDfriendTrack *fFriendTrack; //! All the complementary information @@ -349,7 +350,7 @@ protected: AliESDtrack & operator=(const AliESDtrack & ) {return *this;} - ClassDef(AliESDtrack,32) //ESDtrack + ClassDef(AliESDtrack,33) //ESDtrack }; #endif -- 2.43.0