fV0s("AliESDv0",200),
fCascades("AliESDcascade",20)
{
+ Int_t i;
+ for (i=0; i<3; i++) fVtx[i]=0.;
+ for (i=0; i<6; i++) fCovVtx[i]=0.;
}
+void AliESD::SetVertex(const Double_t *vtx, const Double_t *cvtx) {
+ //Save the primary vertex position
+ Int_t i;
+ for (i=0; i<3; i++) fVtx[i]=vtx[i];
+ if (cvtx)
+ for (i=0; i<6; i++) fCovVtx[i]=cvtx[i];
+}
+
+void AliESD::GetVertex(Double_t *vtx, Double_t *cvtx) const {
+ //Get the primary vertex position
+ Int_t i;
+ for (i=0; i<3; i++) vtx[i]=fVtx[i];
+ if (cvtx)
+ for (i=0; i<6; i++) cvtx[i]=fCovVtx[i];
+}
void SetEventNumber(Int_t n) {fEventNumber=n;}
- AliESDtrack *GetTrack(Int_t i) {
+ AliESDtrack *GetTrack(Int_t i) const {
return (AliESDtrack *)fTracks.UncheckedAt(i);
}
- AliESDCaloTrack *GetCaloTrack(Int_t i) {
+ AliESDCaloTrack *GetCaloTrack(Int_t i) const {
return (AliESDCaloTrack *)fCaloTracks.UncheckedAt(i);
}
- AliESDMuonTrack *GetMuonTrack(Int_t i) {
+ AliESDMuonTrack *GetMuonTrack(Int_t i) const {
return (AliESDMuonTrack *)fMuonTracks.UncheckedAt(i);
}
new(fMuonTracks[fMuonTracks.GetEntriesFast()]) AliESDMuonTrack(*t);
}
- AliESDv0 *GetV0(Int_t i) {
+ AliESDv0 *GetV0(Int_t i) const {
return (AliESDv0 *)fV0s.UncheckedAt(i);
}
void AddV0(const AliESDv0 *v) {
new(fV0s[fV0s.GetEntriesFast()]) AliESDv0(*v);
}
- AliESDcascade *GetCascade(Int_t i) {
+ AliESDcascade *GetCascade(Int_t i) const {
return (AliESDcascade *)fCascades.UncheckedAt(i);
}
void AddCascade(const AliESDcascade *c) {
new(fCascades[fCascades.GetEntriesFast()]) AliESDcascade(*c);
}
+ void SetVertex(const Double_t *vtx, const Double_t *cvtx=0);
+ void GetVertex(Double_t *vtx, Double_t *cvtx) const;
+
Int_t GetEventNumber() const {return fEventNumber;}
Int_t GetRunNumber() const {return fRunNumber;}
Long_t GetTrigger() const {return fTrigger;}
Long_t fTrigger; // Trigger Type
Int_t fRecoVersion; // Version of reconstruction
+ Double_t fVtx[3]; // Primary vertex position
+ Double_t fCovVtx[6]; // Cov. matrix of the primary vertex position
+
TClonesArray fTracks; // ESD tracks
TClonesArray fCaloTracks; // Calorimeters' ESD tracks
TClonesArray fMuonTracks; // MUON ESD tracks
#include "TSystem.h"
#include "TStopwatch.h"
#include "TGeant3.h"
+ #include "TArrayF.h"
#include "AliMagF.h"
#include "AliRun.h"
#include "AliRunLoader.h"
#include "AliLoader.h"
+ #include "AliHeader.h"
+ #include "AliGenEventHeader.h"
#include "AliESD.h"
#include "AliESDpid.h"
//An instance of the ITS tracker
AliITStrackerV2 itsTracker(geom);
- {Double_t xyz[]={0.,0.,0.}, ers[]={0.005, 0.005, 0.010};
- itsTracker.SetVertex(xyz,ers);}
//An instance of the ITS PID maker
Double_t parITS[]={34.,0.15,10.};
rl->GetEvent(i);
+//***** Primary vertex reconstruction (MC vertex position, for the moment)
+ TArrayF v(3);
+ rl->GetHeader()->GenEventHeader()->PrimaryVertex(v);
+ Double_t vtx[3]={v[0],v[1],v[2]};
+ Double_t cvtx[6]={
+ 0.005,
+ 0.000, 0.005,
+ 0.000, 0.000, 0.010
+ };
+ event->SetVertex(vtx,cvtx);
+ cvtx[1]=cvtx[0]; cvtx[2]=cvtx[5]; //trackers use only the diag.elements
//***** Initial path towards the primary vertex
+ tpcTracker.SetVertex(vtx,cvtx);
TTree *tpcTree=tpcl->TreeR();
if (!tpcTree) {
cerr<<"Can't get the TPC cluster tree !\n";
tpcTracker.LoadClusters(tpcTree);
rc+=tpcTracker.Clusters2Tracks(event);
+ itsTracker.SetVertex(vtx,cvtx);
TTree *itsTree=itsl->TreeR();
if (!itsTree) {
cerr<<"Can't get the ITS cluster tree !\n";
//***** Hyperon reconstruction
+ vtxer.SetVertex(vtx);
rc+=vtxer.Tracks2V0vertices(event); // V0 finding
rc+=cvtxer.V0sTracks2CascadeVertices(event); // cascade finding