From 24de2d6d2e84c059fae3e25b5920c6a5871180ec Mon Sep 17 00:00:00 2001 From: hristov Date: Wed, 3 Nov 2004 12:32:48 +0000 Subject: [PATCH] Removing AliBarrelTrack class (Yu.Belikov) --- STEER/AliBarrelTrack.cxx | 149 --------------------------------------- STEER/AliBarrelTrack.h | 123 -------------------------------- STEER/STEERLinkDef.h | 1 - STEER/libSTEER.pkg | 2 +- TPC/AliTPCtrack.cxx | 46 +----------- TPC/AliTPCtrack.h | 15 +--- TPC/AliTPCtracker.cxx | 101 -------------------------- TPC/AliTPCtracker.h | 14 +--- TRD/AliTRDtrack.cxx | 28 -------- TRD/AliTRDtrack.h | 2 - TRD/AliTRDtracker.cxx | 84 ---------------------- TRD/AliTRDtracker.h | 11 +-- 12 files changed, 6 insertions(+), 570 deletions(-) delete mode 100644 STEER/AliBarrelTrack.cxx delete mode 100644 STEER/AliBarrelTrack.h diff --git a/STEER/AliBarrelTrack.cxx b/STEER/AliBarrelTrack.cxx deleted file mode 100644 index 21e4726c907..00000000000 --- a/STEER/AliBarrelTrack.cxx +++ /dev/null @@ -1,149 +0,0 @@ -/************************************************************************** - * 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. * - **************************************************************************/ - -/* $Id$ */ - - -//////////////////////////////////////////////////////////////////////////////// -// -// AliBarrelTrack is a snapshot of the TPC or TRD track. -// The barrel track is stored by tracker every time a track is crossing -// reference plane. -// -// Barrel track have -// - state vactor in "external represenantion" -// - diagonal elements of covariance matric -// - auxiliary paramrters: -// chi2, number of clusters, number of sector srossed -// - methods to compare with track references -// -// Barrel track can be directly compared with AliTrackReferences, -// TPC and TRD tracks can be compared using the same macro. -// -// S. Radomski, [GSI] mail: S.Radomski@gsi.de -// 07.04.2003 -// -//////////////////////////////////////////////////////////////////////////////// - -#include "AliBarrelTrack.h" - -ClassImp(AliBarrelTrack) - -//////////////////////////////////////////////////////////////////////////////// - -AliBarrelTrack:: AliBarrelTrack() : TObject() { - // - // Standard constructor - // reset all data-members - // - - fLabel = fRefPlane = fIsIn = 0; - fX = fAlpha = 0.0; - fZ = fY = fTgLambda = fSnPhi = f1Pt = 0.0; - - for(Int_t i=0; i<5; i++) fTimeHypothesis[i] = 0; - - fLength = 0.0; - fNClusters = fNWrong = fNRotate = 0; - fChi2 = 0.0; - fMass = fdEdX = 0; - - fCy = fCz = fCtg = fCpt = fCphi = 0.0; -} - -//////////////////////////////////////////////////////////////////////////////// - -void AliBarrelTrack::SetLabel(Int_t label) { - // - // Sets the label - // - - fLabel = label; -} - -//////////////////////////////////////////////////////////////////////////////// - -void AliBarrelTrack::SetX(Double_t x, Double_t alpha) { - // - - fX = x; - fAlpha = alpha; -} - -//////////////////////////////////////////////////////////////////////////////// - -void AliBarrelTrack::SetRefPlane(Int_t nRefPlane, Int_t isIn) -{ - // - // Define the reference plane - // - fRefPlane = nRefPlane; - fIsIn = isIn; -} - -//////////////////////////////////////////////////////////////////////////////// - -void AliBarrelTrack::SetNClusters(Int_t nClusters, Double_t chi2) -{ - // - // Set number of cluster - // - fNClusters = nClusters; - fChi2 = chi2; -} - -//////////////////////////////////////////////////////////////////////////////// - -void AliBarrelTrack::SetTime(Double_t time[5], Double_t length) -{ - // - // Set time for a track - // - for(Int_t i=0; i<5; i++) - fTimeHypothesis[i] = time[i]; - - fLength = length; -} - -//////////////////////////////////////////////////////////////////////////////// - -void AliBarrelTrack::SetStateVector(Double_t vec[5]) { - // - // Set State Vector from external representation - // - - - fY = vec[0]; - fZ = vec[1]; - fTgLambda = vec[3]; - fSnPhi = vec[2]; - f1Pt = vec[4]; -} - -//////////////////////////////////////////////////////////////////////////////// - -void AliBarrelTrack::SetCovarianceMatrix(Double_t vec[15]) { - // - // Set Covariance Matrix from external represenatation - // - - fCy = vec[0]; - fCz = vec[2]; - fCtg = vec[9]; - fCphi = vec[5]; - fCpt = vec[14]; -} - -//////////////////////////////////////////////////////////////////////////////// diff --git a/STEER/AliBarrelTrack.h b/STEER/AliBarrelTrack.h deleted file mode 100644 index 45cc682b95f..00000000000 --- a/STEER/AliBarrelTrack.h +++ /dev/null @@ -1,123 +0,0 @@ -#ifndef AliBarrelTrack_H -#define AliBarrelTrack_H - -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ - -/* $Id$ */ - -// -// General class for barrel tracks -// This class contains all the information -// to describe the tracks detected by the barre detectors (ITS, TPC, TRD, TOF) -// - -#include "TObject.h" -#include "TMath.h" - -class AliBarrelTrack : public TObject { - -public: - - AliBarrelTrack(); - ~AliBarrelTrack() {} - - // Setters - - void SetLabel(Int_t label); - void SetX(Double_t x, Double_t alpha); - void SetRefPlane(Int_t nRefPlane, Int_t isIn); - void SetNClusters(Int_t nClusters, Double_t chi2); - void SetTime(Double_t time[5], Double_t length); - void SetStateVector(Double_t vec[5]); // external parameters - void SetCovarianceMatrix(Double_t vec[15]); // external parameters - - void SetNWrongClusters(Int_t n) {fNWrong = n;} - void SetNRotate(Int_t n) {fNRotate = n;} - - void SetMass(Double_t mass) {fMass = mass;} - void SetdEdX(Double_t dEdX) {fdEdX = dEdX;} - - // Getters - - // standard - Int_t GetLabel() const {return fLabel;} - Int_t GetNClusters() const {return fNClusters;} - Int_t GetNWrongClusters() const {return fNWrong;} - Int_t GetNRotate() const {return fNRotate;} - - Int_t GetRefPlane() const {return fRefPlane;} - - Double_t GetX() const {return fX;} - Double_t Y() const {return fY;} - Double_t Z() const {return fZ;} - - Double_t GetMass() const {return fMass;} - - // track oriented variables - Double_t Pt() const {return (f1Pt==0)? 0 : 1./f1Pt;} - Double_t TgLambda() const {return fTgLambda;} - Double_t Eta() const {return -TMath::Log(TMath::Tan(0.25 *TMath::Pi()-0.5*Lambda()));} - Double_t Phi() const {return TMath::ASin(fSnPhi);} - - - // uncertainties - Double_t DeltaY() const {return TMath::Sqrt(fCy);} - Double_t DeltaZ() const {return TMath::Sqrt(fCz);} - Double_t DeltaTgLambda() const {return TMath::Sqrt(fCtg);} - Double_t DeltaSnPhi() const {return TMath::Sqrt(fCphi);} - Double_t DeltaPt() const {return Pt() - 1./(Pt() + TMath::Sqrt(fCpt));} - - - // reference oriented variables - Double_t Px() const {return TMath::Cos(Phi()+fAlpha) * Pt();} - Double_t Py() const {return TMath::Sin(Phi()+fAlpha) * Pt();} - Double_t Pz() const {return fTgLambda*Pt();} - Double_t P() const {return Pt()*(fTgLambda+1);} - - Double_t Lambda() const {return TMath::ATan(fTgLambda);} - -protected: - - Int_t fLabel; // kine tree index - - Int_t fRefPlane; // id of the reference plane - Int_t fIsIn; // direction - - Double_t fX; // Kalman Time - Double_t fAlpha; // sector angle - - // state vector - Double_t fZ; // Z in global cs - Double_t fY; // Y in local cs corresponds to r-phi - Double_t fTgLambda; // Tangent of the dip angle - Double_t fSnPhi; // Sin - Double_t f1Pt; // inverse of momentum - - - // covariance matrix - Double_t fCz; // z element of covariance matrix - Double_t fCy; // y element of covariance matrix - Double_t fCtg; // tangent element of covariance matrix - Double_t fCphi; // phi element of covariance matrix - Double_t fCpt; // pt element of covariance matrix - - - // track time/length - Double_t fTimeHypothesis[5]; // time for all hypoptheses - Double_t fLength; // track length - - // performance info - Int_t fNClusters; // Number of clusters - Int_t fNWrong; // Number of wrong clusters - Double_t fChi2; // Chi 2 - Int_t fNRotate; // number of rotations / sector crossing - - Double_t fMass; // mass hypothesis - Double_t fdEdX; // dE/dX - - ClassDef(AliBarrelTrack,1) -}; - - -#endif diff --git a/STEER/STEERLinkDef.h b/STEER/STEERLinkDef.h index e1cc459abe3..af1d1cee4ae 100644 --- a/STEER/STEERLinkDef.h +++ b/STEER/STEERLinkDef.h @@ -68,7 +68,6 @@ #pragma link C++ class AliTrackMapper+; #pragma link C++ class AliCollisionGeometry+; #pragma link C++ class AliMemoryWatcher+; -#pragma link C++ class AliBarrelTrack+; #pragma link C++ class AliMC+; #pragma link C++ class AliSimulation+; #pragma link C++ class AliReconstruction+; diff --git a/STEER/libSTEER.pkg b/STEER/libSTEER.pkg index cb649c724d3..8ae10d78b98 100644 --- a/STEER/libSTEER.pkg +++ b/STEER/libSTEER.pkg @@ -15,7 +15,7 @@ AliRunDigitizer.cxx AliDigitizer.cxx AliStream.cxx \ AliMergeCombi.cxx AliMagFMaps.cxx AliFieldMap.cxx \ AliGausCorr.cxx AliTrackReference.cxx \ AliTrackMap.cxx AliTrackMapper.cxx AliCollisionGeometry.cxx \ -AliMemoryWatcher.cxx AliBarrelTrack.cxx \ +AliMemoryWatcher.cxx \ AliVertexer.cxx \ AliMC.cxx AliSimulation.cxx AliReconstruction.cxx AliVertexGenFile.cxx \ AliReconstructor.cxx diff --git a/TPC/AliTPCtrack.cxx b/TPC/AliTPCtrack.cxx index 0f04422f6f1..f514d185c27 100644 --- a/TPC/AliTPCtrack.cxx +++ b/TPC/AliTPCtrack.cxx @@ -25,7 +25,6 @@ #include "AliTPCtrack.h" #include "AliCluster.h" -#include "AliBarrelTrack.h" #include "AliESDtrack.h" ClassImp(AliTPCtrack) @@ -38,7 +37,7 @@ AliTPCtrack::AliTPCtrack(): AliKalmanTrack() //------------------------------------------------- fX = fP0 = fP1 = fP2 = fP3 = fP3 = fP4 = 0.0; fAlpha = fdEdx = 0.0; - fNWrong = fNRotation = fNumber = 0; // [SR, 01.04.2003] + fNumber = 0; // [SR, 01.04.2003] for (Int_t i=0; i<3;i++) fKinkIndexes[i]=0; } @@ -167,39 +166,7 @@ AliTPCtrack::AliTPCtrack(const AliTPCtrack& t) : AliKalmanTrack(t) { fLab2 = t.fLab2; for (Int_t i=0; i<3;i++) fKinkIndexes[i]=t.fKinkIndexes[i]; } -//_____________________________________________________________________________ - -void AliTPCtrack::GetBarrelTrack(AliBarrelTrack *track) const{ - // - // Create a Barrel Track out of this track - // Current track is propagated to the reference plane - // by the tracker - // - // [SR, 01.04.2003] - - if (!track) return; - Double_t xr, vec[5], cov[15]; - - track->SetLabel(GetLabel()); - track->SetX(fX, fAlpha); - track->SetNClusters(GetNumberOfClusters(), GetChi2()); - Double_t times[10]; - GetIntegratedTimes(times); - track->SetTime(times, GetIntegratedLength()); - - track->SetMass(GetMass()); - track->SetdEdX(GetdEdx()); - - track->SetNWrongClusters(fNWrong); - track->SetNRotate(fNRotation); - GetExternalParameters(xr, vec); - track->SetStateVector(vec); - - GetExternalCovariance(cov); - track->SetCovarianceMatrix(cov); - -} //_____________________________________________________________________________ Int_t AliTPCtrack::Compare(const TObject *o) const { //----------------------------------------------------------------- @@ -402,14 +369,6 @@ Int_t AliTPCtrack::Update(const AliCluster *c, Double_t chisq, UInt_t index) { //----------------------------------------------------------------- // This function associates a cluster with this track. //----------------------------------------------------------------- - - // update the number of wrong SR[20.03.2003] - Int_t absLabel = TMath::Abs(GetLabel()); - if ( (c->GetLabel(0) != absLabel) && - (c->GetLabel(0) != absLabel) && - (c->GetLabel(0) != absLabel)) fNWrong++; - // - Double_t r00=c->GetSigmaY2(), r01=0., r11=c->GetSigmaZ2(); r00+=fC00; r01+=fC10; r11+=fC11; Double_t det=r00*r11 - r01*r01; @@ -468,9 +427,6 @@ Int_t AliTPCtrack::Rotate(Double_t alpha) //----------------------------------------------------------------- // This function rotates this track. //----------------------------------------------------------------- - - if (alpha != 0) fNRotation++; // [SR, 01.04.2003] - fAlpha += alpha; if (fAlpha<-TMath::Pi()) fAlpha += 2*TMath::Pi(); if (fAlpha>=TMath::Pi()) fAlpha -= 2*TMath::Pi(); diff --git a/TPC/AliTPCtrack.h b/TPC/AliTPCtrack.h index e05077a6bc9..c339ce07d00 100644 --- a/TPC/AliTPCtrack.h +++ b/TPC/AliTPCtrack.h @@ -26,7 +26,6 @@ #include "AliTPCreco.h" #include "AliExternalTrackParam.h" -class AliBarrelTrack; class AliESDtrack; //_____________________________________________________________________________ @@ -74,15 +73,6 @@ public: void GetExternalCovariance(Double_t cov[15]) const ; // [SR, 01.04.2003] - - void GetBarrelTrack(AliBarrelTrack *track)const; - - void ResetNWrong() {fNWrong = 0;} - void ResetNRotation() {fNRotation = 0;} - - Int_t GetNWrong() const {return fNWrong;} - Int_t GetNRotation() const {return fNRotation;} - Int_t GetNumber() const {return fNumber;} void SetNumber(Int_t n) {fNumber = n;} // @@ -142,8 +132,6 @@ protected: Int_t fIndex[kMaxRow]; // indices of associated clusters Float_t fPoints[4]; //first, max dens row end points of the track and max density //[SR, 01.04.2003] - Int_t fNWrong; // number of wrong clusters - Int_t fNRotation; // number of rotations Int_t fNumber; // magic number used for number of clusters // MI addition Float_t fSdEdx; // sigma of dedx @@ -159,7 +147,8 @@ protected: AliExternalTrackParam fReference; // track parameters at the middle of the chamber Float_t fKinkPoint[12]; //radius, of kink, dfi and dtheta Int_t fKinkIndexes[3]; // kink indexes - minus = mother + daughter - ClassDef(AliTPCtrack,1) // Time Projection Chamber reconstructed tracks + + ClassDef(AliTPCtrack,2) // Time Projection Chamber reconstructed tracks }; inline diff --git a/TPC/AliTPCtracker.cxx b/TPC/AliTPCtracker.cxx index 051d718b352..e5891f865a0 100644 --- a/TPC/AliTPCtracker.cxx +++ b/TPC/AliTPCtracker.cxx @@ -51,13 +51,6 @@ AliTracker(), fkNIS(par->GetNInnerSector()/2), fkNOS(par->GetNOuterSector()/2) fParam = (AliTPCParam*) par; fSeeds=0; - // [SR 17.03.2003] - - fBarrelFile = 0; - fBarrelTree = 0; - fBarrelArray = 0; - fBarrelTrack = 0; - } //_____________________________________________________________________________ @@ -71,99 +64,8 @@ AliTPCtracker::~AliTPCtracker() { fSeeds->Delete(); delete fSeeds; } - - // [SR, 01.04.2003] - if (fBarrelFile) { - fBarrelFile->Close(); - delete fBarrelFile; - } -} - -//_____________________________________________________________________________ - -void AliTPCtracker::SetBarrelTree(const char *mode) { - // - // Creates a tree for BarrelTracks - // mode = "back" or "refit" - // - // [SR, 01.04.2003] - // - - if (!IsStoringBarrel()) return; - - TDirectory *sav = gDirectory; - if (!fBarrelFile) fBarrelFile = new TFile("AliBarrelTracks.root", "UPDATE"); - - char buff[40]; - sprintf(buff, "BarrelTPC_%d_%s", GetEventNumber(), mode); - - fBarrelFile->cd(); - fBarrelTree = new TTree(buff, "Barrel TPC tracks"); - - if (!fBarrelArray) fBarrelArray = new TClonesArray("AliBarrelTrack", 4); - for(Int_t i=0; i<4; i++) new((*fBarrelArray)[i]) AliBarrelTrack(); - - fBarrelTree->Branch("tracks", &fBarrelArray); - - sav->cd(); -} -//_____________________________________________________________________________ - -void AliTPCtracker::StoreBarrelTrack(AliTPCtrack *ps, Int_t refPlane, Int_t isIn) { - // - // Stores Track at a given reference plane - // - // refPlane: 1-4 - // isIn: 1 - backward, 2 - refit - // - - if (!IsStoringBarrel()) return; - if (refPlane < 0 || refPlane > 4) return; - if (isIn > 2) return; - - static Int_t nClusters; - static Int_t nWrong; - static Double_t chi2; - static Int_t index; - - Int_t newClusters, newWrong; - Double_t newChi2; - - if ( (refPlane == 1 && isIn == kTrackBack) || - (refPlane == 4 && isIn == kTrackRefit) ) { - - fBarrelArray->Clear(); - nClusters = nWrong = 0; - chi2 = 0.0; - index = 0; - } - - // propagate - Double_t refX = 0; - if (refPlane == 1) refX = fParam->GetInnerRadiusLow(); - if (refPlane == 2) refX = fParam->GetInnerRadiusUp(); - if (refPlane == 3) refX = fParam->GetOuterRadiusLow(); - if (refPlane == 4) refX = fParam->GetOuterRadiusUp(); - - ps->PropagateTo(refX); - - fBarrelTrack = (AliBarrelTrack*)(*fBarrelArray)[index++]; - ps->GetBarrelTrack(fBarrelTrack); - - newClusters = ps->GetNumberOfClusters() - nClusters; - newWrong = ps->GetNWrong() - nWrong; - newChi2 = ps->GetChi2() - chi2; - - nClusters = ps->GetNumberOfClusters(); - nWrong = ps->GetNWrong(); - chi2 = ps->GetChi2(); - - fBarrelTrack->SetNClusters(newClusters, newChi2); - fBarrelTrack->SetNWrongClusters(newWrong); - fBarrelTrack->SetRefPlane(refPlane, isIn); } - //_____________________________________________________________________________ Double_t f1(Double_t x1,Double_t y1, Double_t x2,Double_t y2, @@ -790,9 +692,6 @@ Int_t AliTPCtracker::PropagateBack(AliESD *event) { if ( (status & AliESDtrack::kITSout) == 0 ) s.ResetCovariance(); - s.ResetNWrong(); - s.ResetNRotation(); - Int_t nc=t.GetNumberOfClusters(); s.SetNumber(nc); //set number of the cluster to start with diff --git a/TPC/AliTPCtracker.h b/TPC/AliTPCtracker.h index 3f5be434014..1c6ebd86200 100644 --- a/TPC/AliTPCtracker.h +++ b/TPC/AliTPCtracker.h @@ -14,7 +14,6 @@ #include "AliTPCtrack.h" #include "AliTPCreco.h" #include "AliTPCcluster.h" -#include "AliBarrelTrack.h" class TFile; class TTree; @@ -171,18 +170,7 @@ private: AliTPCParam *fParam; //! TPC parameters for outer reference plane [SR, GSI, 18.02.2003] TObjArray *fSeeds; //array of track seeds - // [SR, 01.04.2003] - void SetBarrelTree(const char *mode); - void StoreBarrelTrack(AliTPCtrack *ps, Int_t refPlane, Int_t isIn); - - // [SR, 01.04.2003] - TFile *fBarrelFile; // file with "barrel" tracks - TTree *fBarrelTree; // tree with "barrel" tracks - TBranch *fBarrelBranch; - TClonesArray *fBarrelArray; - AliBarrelTrack *fBarrelTrack; - - ClassDef(AliTPCtracker,1) // Time Projection Chamber tracker + ClassDef(AliTPCtracker,2) // Time Projection Chamber tracker }; #endif diff --git a/TRD/AliTRDtrack.cxx b/TRD/AliTRDtrack.cxx index d0498f7d2bf..27a88d8292c 100644 --- a/TRD/AliTRDtrack.cxx +++ b/TRD/AliTRDtrack.cxx @@ -278,35 +278,7 @@ AliTRDtrack::~AliTRDtrack() fBackupTrack=0; } - -//_____________________________________________________________________________ -void AliTRDtrack::GetBarrelTrack(AliBarrelTrack *track) { - // - // - // - - if (!track) return; - Double_t xr, vec[5], cov[15]; - - track->SetLabel(GetLabel()); - track->SetX(fX, fAlpha); - track->SetNClusters(GetNumberOfClusters(), GetChi2()); - track->SetNWrongClusters(fNWrong); - track->SetNRotate(fNRotate); - Double_t times[10]; - GetIntegratedTimes(times); - track->SetTime(times, GetIntegratedLength()); - - track->SetMass(GetMass()); - track->SetdEdX(GetdEdx()); - - GetExternalParameters(xr, vec); - track->SetStateVector(vec); - - GetExternalCovariance(cov); - track->SetCovarianceMatrix(cov); -} //____________________________________________________________________________ void AliTRDtrack::GetExternalParameters(Double_t& xr, Double_t x[5]) const { // diff --git a/TRD/AliTRDtrack.h b/TRD/AliTRDtrack.h index 042dcab1e45..3f54667d90c 100644 --- a/TRD/AliTRDtrack.h +++ b/TRD/AliTRDtrack.h @@ -7,7 +7,6 @@ #include #include -#include "AliBarrelTrack.h" #include "AliTRDgeometry.h" #include "TVector2.h" @@ -113,7 +112,6 @@ public: Double_t h01, Int_t plane); // - void GetBarrelTrack(AliBarrelTrack *track); void AddNWrong() {fNWrong++;} Int_t GetNWrong() const {return fNWrong;} diff --git a/TRD/AliTRDtracker.cxx b/TRD/AliTRDtracker.cxx index 54e37f65919..ecfd71fa81c 100644 --- a/TRD/AliTRDtracker.cxx +++ b/TRD/AliTRDtracker.cxx @@ -32,7 +32,6 @@ #include "AliTRDgeometryHole.h" #include "AliTRDcluster.h" #include "AliTRDtrack.h" -#include "AliBarrelTrack.h" #include "AliESD.h" #include "AliTRDtracker.h" @@ -190,14 +189,6 @@ AliTRDtracker::AliTRDtracker(const TFile *geomfile):AliTracker() fVocal = kFALSE; - - // Barrel Tracks [SR, 03.04.2003] - - fBarrelFile = 0; - fBarrelTree = 0; - fBarrelArray = 0; - fBarrelTrack = 0; - savedir->cd(); } @@ -230,81 +221,6 @@ AliTRDtracker::~AliTRDtracker() //_____________________________________________________________________ -void AliTRDtracker::SetBarrelTree(const char *mode) { - // - // - // - - if (!IsStoringBarrel()) return; - - TDirectory *sav = gDirectory; - if (!fBarrelFile) fBarrelFile = new TFile("AliBarrelTracks.root", "UPDATE"); - - char buff[40]; - sprintf(buff, "BarrelTRD_%d_%s", GetEventNumber(), mode); - - fBarrelFile->cd(); - fBarrelTree = new TTree(buff, "Barrel TPC tracks"); - - Int_t nRefs = fgkLastPlane - fgkFirstPlane + 1; - - if (!fBarrelArray) fBarrelArray = new TClonesArray("AliBarrelTrack", nRefs); - for(Int_t i=0; iBranch("tracks", &fBarrelArray); - sav->cd(); -} - -//_____________________________________________________________________ - -void AliTRDtracker::StoreBarrelTrack(AliTRDtrack *ps, Int_t refPlane, Int_t isIn) { - // - // - // - - if (!IsStoringBarrel()) return; - - static Int_t nClusters; - static Int_t nWrong; - static Double_t chi2; - static Int_t index; - static Bool_t wasLast = kTRUE; - - Int_t newClusters, newWrong; - Double_t newChi2; - - if (wasLast) { - - fBarrelArray->Clear(); - nClusters = nWrong = 0; - chi2 = 0.0; - index = 0; - wasLast = kFALSE; - } - - fBarrelTrack = (AliBarrelTrack*)(*fBarrelArray)[index++]; - ps->GetBarrelTrack(fBarrelTrack); - - newClusters = ps->GetNumberOfClusters() - nClusters; - newWrong = ps->GetNWrong() - nWrong; - newChi2 = ps->GetChi2() - chi2; - - nClusters = ps->GetNumberOfClusters(); - nWrong = ps->GetNWrong(); - chi2 = ps->GetChi2(); - - if (refPlane != fgkLastPlane) { - fBarrelTrack->SetNClusters(newClusters, newChi2); - fBarrelTrack->SetNWrongClusters(newWrong); - } else { - wasLast = kTRUE; - } - - fBarrelTrack->SetRefPlane(refPlane, isIn); -} - -//_____________________________________________________________________ - Bool_t AliTRDtracker::AdjustSector(AliTRDtrack *track) { // // Rotates the track when necessary diff --git a/TRD/AliTRDtracker.h b/TRD/AliTRDtracker.h index b54f4d7cc02..73ec38c094d 100644 --- a/TRD/AliTRDtracker.h +++ b/TRD/AliTRDtracker.h @@ -16,7 +16,6 @@ class AliTRDgeometry; class AliTRDparameter; class AliTRDtrack; class AliTRDcluster; -class AliBarrelTrack; class AliESD; const unsigned kMaxLayersPerSector = 1000; @@ -245,14 +244,6 @@ class AliTRDtracker : public AliTracker { static const Int_t fgkFirstPlane; // Id of the first (innermost) reference plane static const Int_t fgkLastPlane; // Id of the last (outermost) reference plane - - void SetBarrelTree(const char *mode); - void StoreBarrelTrack(AliTRDtrack *ps, Int_t refPlane, Int_t isIn); - - TFile *fBarrelFile; // Some kind of barrel file - TTree *fBarrelTree; // And a barrel tree - TClonesArray *fBarrelArray; // Wow, there even an array for that barrel - AliBarrelTrack *fBarrelTrack; // And, finally, the track private: @@ -271,7 +262,7 @@ class AliTRDtracker : public AliTracker { Double_t ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt) const; Double_t ExpectedSigmaZ2(Double_t r, Double_t tgl) const; - ClassDef(AliTRDtracker,1) // manager base class + ClassDef(AliTRDtracker,2) // manager base class }; -- 2.43.0