/* $Id$ */
-/////////////////////////////////////////////////////////////////////////
-// //
-// Prototype ESD class //
-// //
-/////////////////////////////////////////////////////////////////////////
-
-#include "Riostream.h"
+//-----------------------------------------------------------------
+// Implementation of the ESD class
+// This is the class to deal with during the phisical analysis of data
+//
+// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+//-----------------------------------------------------------------
#include "AliESD.h"
fRunNumber(0),
fTrigger(0),
fRecoVersion(0),
- fBitDDL(0),
- fNSecVertex(0),
- fNParticipants(0),
- fNPartError(0),
- fNElectron(0),
- fNMuons(0),
- fNPions(0),
- fNKaons(0),
- fNProtons(0),
- fNPHOSPhotons(0),
- fNPHOSNeutrons(0),
- fNPHOSCCluster(0),
- fNEMCALCluster(0),
- fNPMDCluster(0),
- fTMaxClusterEnergy(0),
- fTMaxPCharged(0),
- fNCharged(0),
- fTotTranEnergy(0),
- fESDVertex(),
- fSecVertex(0),
- fNonAssTrack(0),
- fPhoton(0),
- fNeutron(0),
- fEMCALCluster(0),
- fPMDCluster(0)
-{
- Info("def ctor","Has been called\n");
-}
-
-//_______________________________________________________________________
-AliESD::AliESD(const AliESD &esd):
- TObject(esd),
- fEventNumber(0),
- fRunNumber(0),
- fTrigger(0),
- fRecoVersion(0),
- fBitDDL(0),
- fNSecVertex(0),
- fNParticipants(0),
- fNPartError(0),
- fNElectron(0),
- fNMuons(0),
- fNPions(0),
- fNKaons(0),
- fNProtons(0),
- fNPHOSPhotons(0),
- fNPHOSNeutrons(0),
- fNPHOSCCluster(0),
- fNEMCALCluster(0),
- fNPMDCluster(0),
- fTMaxClusterEnergy(0),
- fTMaxPCharged(0),
- fNCharged(0),
- fTotTranEnergy(0),
- fESDVertex(),
- fSecVertex(0),
- fNonAssTrack(0),
- fPhoton(0),
- fNeutron(0),
- fEMCALCluster(0),
- fPMDCluster(0)
-{
-}
-
-ClassImp(AliESDVertex)
-
-//_______________________________________________________________________
-AliESDVertex::AliESDVertex():
- fNPrimary(0),
- fCoordinates(3),
- fErrorMatrix(6),
- fPrimaryTracks(0),
- fEffectiveMass(0),
- fEffectiveMassError(0)
+ fTracks("AliESDtrack",15000)
+ //fV0s("AliV0vertex",200),
+ //fCascades("AliCascadeVertex",20)
{
- cout << "ESDVertex def ctor" << endl;
}
-//_______________________________________________________________________
-AliESDVertex::AliESDVertex(const AliESDVertex &esdv):
- TObject(esdv),
- fNPrimary(0),
- fCoordinates(0),
- fErrorMatrix(0),
- fPrimaryTracks(0),
- fEffectiveMass(0),
- fEffectiveMassError(0)
-{
-}
-
-ClassImp(AliESDTrack)
-
-//_______________________________________________________________________
-AliESDTrack::AliESDTrack() :
- fTrackID(0),
- fPVertex(5),
- fPEVertex(15),
- fPFMeasPoint(6),
- fPFMeasPointErr(15),
- fPLMeasPoint(6),
- fPLMeasPointErr(15),
- fTrackLength(0),
- fTrackLengthErr(0),
- fStopVertex(0),
- fNPointsITS(0),
- fNPointsTPC(0),
- fNPointsTRD(0),
- fMeanResITS(0),
- fMeanResTPC(0),
- fMeanResTRD(0),
- fGlobalChi2(0),
- fParticleType(0),
- fPIDprobPi(0),
- fPIDprobK(0),
- fPIDprobP(0),
- fPIDprobE(0)
-{
- cout << "ESDTrack def ctor" << endl;
-}
-
-//_______________________________________________________________________
-AliESDTrack::AliESDTrack(const AliESDTrack &esdt):
- TObject(esdt),
- fTrackID(0),
- fPVertex(0),
- fPEVertex(0),
- fPFMeasPoint(0),
- fPFMeasPointErr(0),
- fPLMeasPoint(0),
- fPLMeasPointErr(0),
- fTrackLength(0),
- fTrackLengthErr(0),
- fStopVertex(0),
- fNPointsITS(0),
- fNPointsTPC(0),
- fNPointsTRD(0),
- fMeanResITS(0),
- fMeanResTPC(0),
- fMeanResTRD(0),
- fGlobalChi2(0),
- fParticleType(0),
- fPIDprobPi(0),
- fPIDprobK(0),
- fPIDprobP(0),
- fPIDprobE(0)
-{
-}
-#ifndef ALIESD_H
-#define ALIESD_H
+#ifndef ALIESDEVENT_H
+#define ALIESDEVENT_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-/* $Id$ */
-
-///////////////////////////////////////////////////////////////////////////////
-// //
-// Alice ESD object //
-// //
-///////////////////////////////////////////////////////////////////////////////
+//-------------------------------------------------------------------------
+// Class AliESD
+// This is the class to deal with during the physical analysis of data
+//
+// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+//-------------------------------------------------------------------------
#include "TObject.h"
-#include "TObjArray.h"
-#include "TArrayI.h"
-#include "TArrayF.h"
-#include "TArrayD.h"
+#include "TClonesArray.h"
+#include "AliESDtrack.h"
-class AliESDTrack : public TObject
-{
+class AliESD : public TObject {
public:
- AliESDTrack();
- virtual ~AliESDTrack() {}
-
-protected:
- Int_t fTrackID; // Track number
-
- // Track parameters at Vertex
- TArrayD fPVertex; // (5) Track parameters
- TArrayD fPEVertex; // (15) Track parameter errors
-
- // Track parameters at first measured point
- TArrayD fPFMeasPoint; // (6) Track parameters
- TArrayD fPFMeasPointErr; // (15) Track parameter error
-
- // Track parameters at last measured point
- TArrayD fPLMeasPoint; // (6) Track parameters
- TArrayD fPLMeasPointErr; // (15) Track parameter error
-
- Float_t fTrackLength; // Track length
- Float_t fTrackLengthErr; // Track length error
- Int_t fStopVertex; // Index of stop vertex
-
- Int_t fNPointsITS; // Number of points in ITS
- Int_t fNPointsTPC; // Number of points in TPC
- Int_t fNPointsTRD; // Number of points in TRD
- Float_t fMeanResITS; // Mean residual in ITS
- Float_t fMeanResTPC; // Mean residual in TPC
- Float_t fMeanResTRD; // Mean residual in TRD
- Float_t fGlobalChi2; // Global chi square
- Int_t fParticleType; // PDG code
-
- Float_t fPIDprobPi; // PID probability for pi
- Float_t fPIDprobK; // PID probability for K
- Float_t fPIDprobP; // PID probability for p
- Float_t fPIDprobE; // PID probability for e
-
-private:
- AliESDTrack(const AliESDTrack & esdt);
- AliESDTrack & operator=(const AliESDTrack &) {return (*this);}
-
- ClassDef(AliESDTrack,1) //ESDTrack
-};
-
+ AliESD();
+ virtual ~AliESD() {
+ fTracks.Delete();
+ //fV0s.Delete();
+ //fCascades.Delete();
+ }
-class AliESDVertex : public TObject
-{
-public:
- AliESDVertex();
- virtual ~AliESDVertex() {}
-
-protected:
- Int_t fNPrimary; // Number of primary tracks
- TArrayF fCoordinates; // (3) Vertex coordinates
- TArrayF fErrorMatrix; // (6) Error Matrix
- TObjArray fPrimaryTracks; // List of primary tracks
- Float_t fEffectiveMass; // Effective Mass
- Float_t fEffectiveMassError; // Effective Mass Error
-private:
- AliESDVertex(const AliESDVertex & esdv);
- AliESDVertex & operator=(const AliESDVertex &) {return (*this);}
-
- ClassDef(AliESDVertex,1) //ESDVertex
-};
+ void SetEventNumber(Int_t n) {fEventNumber=n;}
-class AliESD : public TObject
-{
-public:
- AliESD();
- virtual ~AliESD() {}
+ AliESDtrack *GetTrack(Int_t i) {
+ return (AliESDtrack *)fTracks.UncheckedAt(i);
+ }
+ void AddTrack(const AliESDtrack *t) {
+ new(fTracks[fTracks.GetEntriesFast()]) AliESDtrack(*t);
+ }
- Int_t EventNumber() const {return fEventNumber;}
- Int_t RunNumber() const {return fRunNumber;}
- Long_t Trigger() const {return fTrigger;}
-
- Int_t BitDDL() const {return fBitDDL;}
- Int_t NSecVertex() const {return fNSecVertex;}
- Float_t NParticipants() const {return fNParticipants;}
+ Int_t GetEventNumber() const {return fEventNumber;}
+ Int_t GetRunNumber() const {return fRunNumber;}
+ Long_t GetTrigger() const {return fTrigger;}
+ Int_t GetNumberOfTracks() const {return fTracks.GetEntriesFast();}
+ //Int_t GetNumberOfV0s() const {return fV0s.GetEntriesFast();}
+ //Int_t GetNumberOfCascades() const {return fCascades.GetEntriesFast();}
protected:
// Event Identification
- Int_t fEventNumber; // Event Number
- Int_t fRunNumber; // Run Number
- Long_t fTrigger; // Trigger Type (cfg Transverse Energy&Max trans ch mom)
- Int_t fRecoVersion; // Version of reconstruction
-
- // Summary Information
- Int_t fBitDDL; // Bitmap of active DDL
- Int_t fNSecVertex; // Number of Secondary Vertexes
- Float_t fNParticipants; // Estimated Number of participants
- Float_t fNPartError; // N of participant error
- Int_t fNElectron; // N of electrons
- Int_t fNMuons; // N of muons
- Int_t fNPions; // N of pions
- Int_t fNKaons; // N of kaons
- Int_t fNProtons; // N of protons
- Int_t fNPHOSPhotons; // N of photons in PHOS
- Int_t fNPHOSNeutrons; // N of neutrons in PHOS
- Int_t fNPHOSCCluster; // N of charged clusters in PHOS
- Int_t fNEMCALCluster; // N of clusters in EMCAL
- Int_t fNPMDCluster; // N of clusters in PMD
- Float_t fTMaxClusterEnergy; // Transverse energy of biggest cluster
- Float_t fTMaxPCharged; // Biggest transverse momentum of charged particles
- TArrayI fNCharged; // Charged Multiplicity
- Float_t fTotTranEnergy; // Total transverse energy
-
- // Primary Vertex Object
- AliESDVertex fESDVertex; // Primary Vertex Object
- TObjArray fSecVertex; // List secondary vertexes
- TObjArray fNonAssTrack; // List of non assigned tracks
- TObjArray fPhoton; // List of photons
- TObjArray fNeutron; // List of neutrons
- TObjArray fEMCALCluster; // List of EMCAL clusters
- TObjArray fPMDCluster; // List of PMD clusters
+ Int_t fEventNumber; // Event Number
+ Int_t fRunNumber; // Run Number
+ Long_t fTrigger; // Trigger Type
+ Int_t fRecoVersion; // Version of reconstruction
-private:
- AliESD(const AliESD &esd);
- AliESD & operator=(const AliESD &) {return (*this);}
+ TClonesArray fTracks; // ESD tracks
+ //TClonesArray fV0s; // V0 vertices
+ //TClonesArray fCascades; // Cascade vertices
- ClassDef(AliESD,1) //ESD
+ ClassDef(AliESD,1) //ESD class
};
#endif
--- /dev/null
+//********************************************************************
+// Example (very basic for the moment) of the data analysis
+// using the ESD classes
+//
+// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+//********************************************************************
+
+#ifndef __CINT__
+ #include <Riostream.h>
+ #include "TKey.h"
+ #include "TFile.h"
+ #include "TH2F.h"
+ #include "TCanvas.h"
+ #include "TStopwatch.h"
+
+ #include "AliESD.h"
+#endif
+
+Int_t AliESDanalysis(Int_t nev=1) {
+ TH2F *tpcHist=new TH2F("tpcHist","dE/dX vs momentum",50,0.,2.,50,0.,400.);
+ TH2F *itsHist=new TH2F("itsHits","dE/dX vs momentum",50,0.,2.,50,0.,200.);
+
+ TFile *ef=TFile::Open("AliESDs.root");
+ if (!ef->IsOpen()) {cerr<<"Can't AliESDs.root !\n"; return 1;}
+
+ TStopwatch timer;
+ Int_t rc=0,n=0;
+ TKey *key=0;
+ TIter next(ef->GetListOfKeys());
+
+ //******* The loop over events
+ while ((key=(TKey*)next())!=0) {
+ cerr<<"Processing event number : "<<n++<<endl;
+ AliESD *event=(AliESD*)key->ReadObj();
+
+ Int_t ntrk=event->GetNumberOfTracks();
+ cerr<<"Number of ESD tracks : "<<ntrk<<endl;
+ //****** The loop over tracks
+ while (ntrk--) {
+ AliESDtrack *t=event->GetTrack(ntrk);
+ Double_t p=t->GetP();
+ if (t->GetStatus()&AliESDtrack::kTPCin) {
+ Double_t dedx=t->GetTPCsignal();
+ tpcHist->Fill(p,dedx,1);
+ }
+ if (t->GetStatus()&AliESDtrack::kITSin) {
+ Double_t dedx=t->GetITSsignal();
+ itsHist->Fill(p,dedx,1);
+ }
+ }
+ delete event;
+ }
+ timer.Stop(); timer.Print();
+
+ TCanvas *c1=new TCanvas("c1","",0,0,600,1200);
+ c1->Divide(1,2);
+
+ c1->cd(1);
+ tpcHist->Draw();
+ c1->cd(2);
+ itsHist->Draw();
+
+ ef->Close();
+
+ return rc;
+}
--- /dev/null
+//********************************************************************
+// Example of the reconstruction that generates the ESD
+// Input files:
+// a) AliTPCclusters.root containing the TPC clusters
+// (the AliTPCFindClusters.C macro can be used to generate it)
+// b) AliITSclustersV2.root containing the ITS clusters
+// (the AliITSFindClustersV2.C macro can be used to generate it)
+// Ouput file:
+// AliESDs.root containing the ESD events
+//
+// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+//********************************************************************
+
+#ifndef __CINT__
+ #include <Riostream.h>
+ #include "TFile.h"
+ #include "TStopwatch.h"
+
+ #include "AliESD.h"
+ #include "AliTPCParam.h"
+ #include "AliTPCtracker.h"
+ #include "AliITSgeom.h"
+ #include "AliITStrackerV2.h"
+#endif
+
+Int_t AliESDtest(Int_t nev=1) {
+ //File with the TPC clusters
+ TFile *tpccf=TFile::Open("AliTPCclusters.root");
+ if (!tpccf->IsOpen()) {
+ cerr<<"Can't open AliTPCclusters.root !\n";
+ return 2;
+ }
+ AliTPCParam *par=(AliTPCParam*)tpccf->Get("75x40_100x60_150x60");
+ if (!par) {cerr<<"Can't get TPC parameters !\n"; return 3;}
+
+ //An instance of the TPC tracker
+ AliTPCtracker tpcTracker(par);
+
+
+ //File with the ITS clusters
+ TFile *itscf=TFile::Open("AliITSclustersV2.root");
+ if (!itscf->IsOpen()) {
+ cerr<<"Can't open AliITSclustersV2.root !\n";
+ return 4;
+ }
+ AliITSgeom *geom=(AliITSgeom*)itscf->Get("AliITSgeom");
+ if (!geom) {cerr<<"Can't get AliITSgeom !\n"; return 5;}
+
+ //An instance of the ITS tracker
+ AliITStrackerV2 itsTracker(geom);
+
+ TFile *ef=TFile::Open("AliESDs.root","new");
+ if (!ef->IsOpen()) {cerr<<"Can't AliESDs.root !\n"; return 1;}
+
+ TStopwatch timer;
+ Int_t rc=0;
+ //The loop over events
+ for (Int_t i=0; i<nev; i++) {
+ cerr<<"\n\nProcessing event number : "<<i<<endl;
+ AliESD *event=new AliESD();
+
+ tpcTracker.SetEventNumber(i);
+ tpcTracker.LoadClusters(tpccf);
+
+ itsTracker.SetEventNumber(i);
+ itsTracker.LoadClusters(itscf);
+
+ rc+=tpcTracker.Clusters2Tracks(event);
+
+ rc+=itsTracker.Clusters2Tracks(event);
+
+ rc+=itsTracker.PropagateBack(event);
+ itsTracker.UnloadClusters();
+
+ rc+=tpcTracker.PropagateBack(event);
+ tpcTracker.UnloadClusters();
+
+ if (rc==0) {
+ Char_t ename[100];
+ sprintf(ename,"%d",i);
+ if (!event->Write(ename)) rc++;
+ }
+ if (rc) {
+ cerr<<"Something bad happened...\n";
+ }
+ delete event;
+ }
+ timer.Stop(); timer.Print();
+
+ delete geom;
+ itscf->Close();
+ delete par;
+ tpccf->Close();
+ ef->Close();
+
+ return rc;
+}
--- /dev/null
+/**************************************************************************
+ * 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 ESD track class
+// This is the class to deal with during the phisical analysis of data
+//
+// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+//-----------------------------------------------------------------
+
+#include "TMath.h"
+
+#include "AliESDtrack.h"
+#include "AliKalmanTrack.h"
+
+ClassImp(AliESDtrack)
+
+//_______________________________________________________________________
+AliESDtrack::AliESDtrack() :
+fFlags(0),
+fITSncls(0),
+fTPCncls(0)
+{
+ //
+ // The default ESD constructor
+ //
+ for (Int_t i=0; i<kSPECIES; i++) fR[i]=0.;
+}
+
+//_______________________________________________________________________
+Float_t AliESDtrack::GetMass() const {
+ Float_t max=0.;
+ Int_t k=-1;
+ for (Int_t i=0; i<kSPECIES; i++) {
+ if (fR[i]>max) {k=i; max=fR[i];}
+ }
+ if (k==0) return 0.00051;
+ if (k==1) return 0.10566;
+ if (k==2||k==-1) return 0.13957;
+ if (k==3) return 0.49368;
+ if (k==4) return 0.93827;
+ Warning("GetMass()","Undefined mass !");
+ return 0.13957;
+}
+
+//_______________________________________________________________________
+Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags) {
+ //
+ // This function updates track's running parameters
+ //
+ switch (flags) {
+ case kITSin: case kITSout: case kITSrefit:
+ fITSncls=t->GetNumberOfClusters();
+ fITSchi2=t->GetChi2();
+ for (Int_t i=0;i<fITSncls;i++) fITSindex[i]=t->GetClusterIndex(i);
+ fITSsignal=t->GetPIDsignal();
+ break;
+ case kTPCin: case kTPCout: case kTPCrefit:
+ fTPCncls=t->GetNumberOfClusters();
+ fTPCchi2=t->GetChi2();
+ for (Int_t i=0;i<fTPCncls;i++) fTPCindex[i]=t->GetClusterIndex(i);
+ fTPCsignal=t->GetPIDsignal();
+ {Double_t mass=t->GetMass(); // preliminary mass setting
+ if (mass>0.5) fR[4]=1.; // used by
+ else if (mass<0.4) fR[2]=1.; // the ITS reconstruction
+ else fR[3]=1.;} //
+ break;
+ default:
+ Error("UpdateTrackParams()","Wrong flag !\n");
+ return kFALSE;
+ }
+
+ SetStatus(flags);
+ fLabel=t->GetLabel();
+
+ if (t->IsStartedTimeIntegral()) {
+ SetStatus(kTIME);
+ Double_t times[10];t->GetIntegratedTimes(times); SetIntegratedTimes(times);
+ SetIntegratedLength(t->GetIntegratedLength());
+ }
+
+ fRalpha=t->GetAlpha();
+ t->GetExternalParameters(fRx,fRp);
+ t->GetExternalCovariance(fRc);
+ return kTRUE;
+}
+
+//_______________________________________________________________________
+void AliESDtrack::GetExternalParameters(Double_t &x, Double_t p[5]) const {
+ //---------------------------------------------------------------------
+ // This function returns external representation of the track parameters
+ //---------------------------------------------------------------------
+ x=fRx;
+ for (Int_t i=0; i<5; i++) p[i]=fRp[i];
+}
+
+Double_t AliESDtrack::GetP() const {
+ //---------------------------------------------------------------------
+ // This function returns the track momentum
+ //---------------------------------------------------------------------
+ Double_t lam=TMath::ATan(fRp[3]);
+ Double_t pt=1./TMath::Abs(fRp[4]);
+ return pt/TMath::Cos(lam);
+}
+
+void AliESDtrack::GetPxPyPz(Double_t *p) const {
+ //---------------------------------------------------------------------
+ // This function returns the global track momentum components
+ //---------------------------------------------------------------------
+ Double_t phi=TMath::ASin(fRp[2]) + fRalpha;
+ Double_t pt=1./TMath::Abs(fRp[4]);
+ p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fRp[3];
+}
+
+void AliESDtrack::GetXYZ(Double_t *xyz) const {
+ //---------------------------------------------------------------------
+ // This function returns the global track position
+ //---------------------------------------------------------------------
+ Double_t phi=TMath::ASin(fRp[2]) + fRalpha;
+ Double_t r=TMath::Sqrt(fRx*fRx + fRp[0]*fRp[0]);
+ xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fRp[1];
+}
+
+//_______________________________________________________________________
+void AliESDtrack::GetExternalCovariance(Double_t c[15]) const {
+ //---------------------------------------------------------------------
+ // This function returns external representation of the cov. matrix
+ //---------------------------------------------------------------------
+ for (Int_t i=0; i<15; i++) c[i]=fRc[i];
+}
+
+//_______________________________________________________________________
+void AliESDtrack::GetIntegratedTimes(Double_t *times) const {
+ for (Int_t i=0; i<kSPECIES; i++) times[i]=fTrackTime[i];
+}
+
+//_______________________________________________________________________
+void AliESDtrack::SetIntegratedTimes(const Double_t *times) {
+ for (Int_t i=0; i<kSPECIES; i++) fTrackTime[i]=times[i];
+}
+
+//_______________________________________________________________________
+Int_t AliESDtrack::GetITSclusters(UInt_t *idx) const {
+ //---------------------------------------------------------------------
+ // This function returns indices of the assgined ITS clusters
+ //---------------------------------------------------------------------
+ for (Int_t i=0; i<fITSncls; i++) idx[i]=fITSindex[i];
+ return fITSncls;
+}
+
+//_______________________________________________________________________
+Int_t AliESDtrack::GetTPCclusters(UInt_t *idx) const {
+ //---------------------------------------------------------------------
+ // This function returns indices of the assgined ITS clusters
+ //---------------------------------------------------------------------
+ for (Int_t i=0; i<fTPCncls; i++) idx[i]=fTPCindex[i];
+ return fTPCncls;
+}
--- /dev/null
+#ifndef ALIESDTRACK_H
+#define ALIESDTRACK_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+//-------------------------------------------------------------------------
+// Class AliESDtrack
+// This is the class to deal with during the physical analysis of data
+//
+// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+//-------------------------------------------------------------------------
+#include "TObject.h"
+
+class AliKalmanTrack;
+
+class AliESDtrack : public TObject {
+public:
+ AliESDtrack();
+ virtual ~AliESDtrack() {}
+ void SetStatus(ULong_t flags) {fFlags|=flags;}
+ void ResetStatus(ULong_t flags) {fFlags&=~flags;}
+ Bool_t UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags);
+ void SetIntegratedLength(Double_t l) {fTrackLength=l;}
+ void SetIntegratedTimes(const Double_t *times);
+
+ ULong_t GetStatus() const {return fFlags;}
+ Int_t GetLabel() const {return fLabel;}
+ Double_t GetAlpha() const {return fRalpha;}
+ void GetExternalParameters(Double_t &x, Double_t p[5]) const;
+ void GetExternalCovariance(Double_t cov[15]) const;
+ Double_t GetIntegratedLength() const {return fTrackLength;}
+ void GetIntegratedTimes(Double_t *times) const;
+ Float_t GetMass() const;
+ Double_t GetP() const;
+ void GetPxPyPz(Double_t *p) const;
+ void GetXYZ(Double_t *r) const;
+
+ Float_t GetTPCsignal() const {return fTPCsignal;}
+ Int_t GetTPCclusters(UInt_t *idx) const;
+
+ Float_t GetITSsignal() const {return fITSsignal;}
+ Int_t GetITSclusters(UInt_t *idx) const;
+
+ enum {
+ kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSPID=0x0008,
+ kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCPID=0x0080,
+ kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDPID=0x0800,
+ kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFPID=0x8000,
+ kTIME=0x80000000
+ };
+ enum {kSPECIES=5}; // Number of particle species recognized by the PID
+
+protected:
+ ULong_t fFlags; // Reconstruction status flags
+ Int_t fLabel; // Track label
+
+ Float_t fTrackLength; // Track length
+ Float_t fTrackTime[kSPECIES]; // TOFs estimated by the tracking
+ Float_t fR[kSPECIES]; // combined "detector response probability"
+
+ Int_t fStopVertex; // Index of stop vertex
+
+//Running track parameters
+ Double_t fRalpha; // track rotation angle
+ Double_t fRx; // X-coordinate of the track reference plane
+ Double_t fRp[5]; // external track parameters
+ Double_t fRc[15]; // external cov. matrix of the track parameters
+
+//Track parameters at the innermost measured point
+ //Double_t fIalpha,fIx,fIp[5],fIc[15];
+
+//Track parameters at the outermost measured point
+ //Double_t fOalpha,fOx,fOp[5],fOc[15];
+
+ // ITS related track information
+ Float_t fITSchi2; // chi2 in the ITS
+ Int_t fITSncls; // number of clusters assigned in the ITS
+ UInt_t fITSindex[6]; //! indices of the assigned ITS clusters
+ Float_t fITSsignal; // detector's PID signal
+ Float_t fITSr[kSPECIES]; //! "detector response probabilities" (for the PID)
+
+ // TPC related track information
+ Float_t fTPCchi2; // chi2 in the TPC
+ Int_t fTPCncls; // number of clusters assigned in the TPC
+ UInt_t fTPCindex[180]; //! indices of the assigned TPC clusters
+ Float_t fTPCsignal; // detector's PID signal
+ Float_t fTPCr[kSPECIES]; //! "detector response probabilities" (for the PID)
+
+ // TRD related track information
+ // TOF related track information
+ // HMPID related track information
+
+ ClassDef(AliESDtrack,1) //ESDtrack
+};
+
+#endif
+
--- /dev/null
+/**************************************************************************
+ * 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$ */
+
+/////////////////////////////////////////////////////////////////////////
+// //
+// Prototype ESD class //
+// //
+/////////////////////////////////////////////////////////////////////////
+
+#include "Riostream.h"
+
+#include "AliESDvertex.h"
+
+ClassImp(AliESDvertex)
+
+//_______________________________________________________________________
+AliESDvertex::AliESDvertex():
+ fNPrimary(0),
+ fCoordinates(3),
+ fErrorMatrix(6),
+ fPrimaryTracks(0),
+ fEffectiveMass(0),
+ fEffectiveMassError(0)
+{
+ cout << "ESDvertex def ctor" << endl;
+}
+
+//_______________________________________________________________________
+AliESDvertex::AliESDvertex(const AliESDvertex &esdv):
+ TObject(esdv),
+ fNPrimary(0),
+ fCoordinates(0),
+ fErrorMatrix(0),
+ fPrimaryTracks(0),
+ fEffectiveMass(0),
+ fEffectiveMassError(0)
+{
+}
+
+
--- /dev/null
+#ifndef ALIESDVERTEX_H
+#define ALIESDVERTEX_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Alice ESD vertex object //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TObject.h"
+#include "TObjArray.h"
+#include "TArrayI.h"
+#include "TArrayF.h"
+#include "TArrayD.h"
+
+
+class AliESDvertex : public TObject
+{
+public:
+ AliESDvertex();
+ virtual ~AliESDvertex() {}
+
+protected:
+ Int_t fNPrimary; // Number of primary tracks
+ TArrayF fCoordinates; // (3) Vertex coordinates
+ TArrayF fErrorMatrix; // (6) Error Matrix
+ TObjArray fPrimaryTracks; // List of primary tracks
+ Float_t fEffectiveMass; // Effective Mass
+ Float_t fEffectiveMassError; // Effective Mass Error
+private:
+ AliESDvertex(const AliESDvertex & esdv);
+ AliESDvertex & operator=(const AliESDvertex &) {return (*this);}
+
+ ClassDef(AliESDvertex,1) //ESDvertex
+};
+
+
+#endif
+
GetExternalParameters(localX, par);
return 1. / TMath::Abs(par[4] * TMath::Sin(TMath::ATan(par[3])));
}
-//_______________________________________________________________________
-TVector3 AliKalmanTrack::Momentum() const
-{
-// return track momentum vector
-
- Double_t par[5];
- Double_t localX = GetX();
- GetExternalParameters(localX, par);
- Double_t phi = TMath::ASin(par[2]) + GetAlpha();
- return TVector3(TMath::Cos(phi) / TMath::Abs(par[4]),
- TMath::Sin(phi) / TMath::Abs(par[4]),
- par[3] / TMath::Abs(par[4]));
-}
-
//_______________________________________________________________________
void AliKalmanTrack::StartTimeIntegral()
{
Warning(":GetIntegratedTime","Particle type [%d] not found", pdg);
return 0;
}
+
+void AliKalmanTrack::GetIntegratedTimes(Double_t *times) const {
+ for (Int_t i=0; i<fgkTypes; i++) times[i]=fIntegratedTime[i];
+}
+
+void AliKalmanTrack::SetIntegratedTimes(const Double_t *times) {
+ for (Int_t i=0; i<fgkTypes; i++) fIntegratedTime[i]=times[i];
+}
+
//_______________________________________________________________________
void AliKalmanTrack::PrintTime() const
//-------------------------------------------------------------------------
#include <TObject.h>
-#include <TVector3.h>
class AliCluster;
Warning("GetClusterIndex(Int_t)","Method must be overloaded !\n");
return 0;
}
+ virtual Double_t GetPIDsignal() const {
+ Warning("GetPIDsignal()","Method must be overloaded !\n");
+ return 0.;
+ }
virtual Double_t GetDCA(const AliKalmanTrack *,Double_t &,Double_t &) const;
virtual
virtual Double_t Pt() const;
virtual Double_t SigmaPt() const;
virtual Double_t P() const;
- virtual TVector3 Momentum() const;
virtual Double_t GetPredictedChi2(const AliCluster *) const {return 0.;}
virtual
// Time integration (S.Radomski@gsi.de)
void StartTimeIntegral();
+ void SetIntegratedLength(Double_t l) {fIntegratedLength=l;}
+ void SetIntegratedTimes(const Double_t *times);
+
Bool_t IsStartedTimeIntegral() const {return fStartTimeIntegral;}
void AddTimeStep(Double_t length);
+ void GetIntegratedTimes(Double_t *times) const;
Double_t GetIntegratedTime(Int_t pdg) const;
Double_t GetIntegratedLength() const {return fIntegratedLength;}
void PrintTime() const;
protected:
-
void SetChi2(Double_t chi2) {fChi2=chi2;}
void SetMass(Double_t mass) {fMass=mass;}
void SetNumberOfClusters(Int_t n) {fN=n;}
+ private:
Int_t fLab; // track label
Double_t fChi2; // total chi2 value for this track
Double_t fMass; // mass hypothesis
// variables for time integration (S.Radomski@gsi.de)
static const Int_t fgkTypes = 5; // Number of track types (e,mu,pi,k,p)
Bool_t fStartTimeIntegral; // indicator wether integrate time
- Float_t fIntegratedTime[5]; // intgrated time
+ Float_t fIntegratedTime[5]; // integrated time
Float_t fIntegratedLength; // integrated length
-
- public:
ClassDef(AliKalmanTrack,2) // Reconstructed track
};
#pragma link C++ class AliGausCorr+;
#pragma link C++ class AliTrackReference+;
#pragma link C++ class AliESD+;
-#pragma link C++ class AliESDTrack+;
-#pragma link C++ class AliESDVertex+;
+#pragma link C++ class AliESDtrack+;
+#pragma link C++ class AliESDvertex+;
#pragma link C++ class AliTrackMap+;
#pragma link C++ class AliTrackMapper+;
#pragma link C++ class AliCollisionGeometry+;
AliMergeCombi.cxx AliMagFMaps.cxx AliFieldMap.cxx \
AliGausCorr.cxx AliTrackReference.cxx AliESD.cxx \
AliTrackMap.cxx AliTrackMapper.cxx AliCollisionGeometry.cxx \
-AliMemoryWatcher.cxx AliBarrelTrack.cxx
+AliMemoryWatcher.cxx AliBarrelTrack.cxx \
+AliESDtrack.cxx AliESDvertex.cxx
HDRS:= $(SRCS:.cxx=.h)