Also user identifier facility introduced for AliJet and AliVertex.
12-jul-2001 NvE Memberfunction GetDistance() introduced for AliPosition and support for
point of closest approach introduced in AliTrack.
// The max. number of tracks is set to the initial value again
fNtrk=0;
fQ=0;
+ fUserId=0;
Double_t a[4]={0,0,0,0};
SetVector(a,"sph");
if (fNtinit > 0) SetNtinit(fNtinit);
void AliJet::Info(TString f)
{
// Provide jet information within the coordinate frame f
- cout << " *AliJet::Info* Invmass : " << GetInvmass() << " Charge : " << fQ
+ cout << " *AliJet::Info* Id : " << fUserId << " Invmass : " << GetInvmass() << " Charge : " << fQ
<< " Momentum : " << GetMomentum() << " Ntracks : " << fNtrk << endl;
cout << " ";
Ali4Vector::Info(f);
}
}
///////////////////////////////////////////////////////////////////////////
+AliTrack* AliJet::GetIdTrack(Int_t id)
+{
+// Return the track with user identifier "id" of this jet
+ AliTrack* tx=0;
+ AliTrack* t=0;
+ if (!fTracks)
+ {
+ cout << " *AliJet*::GetIdTrack* No tracks present." << endl;
+ return 0;
+ }
+ else
+ {
+ for (Int_t i=0; i<fNtrk; i++)
+ {
+ tx=(AliTrack*)fTracks->At(i);
+ if (id == tx->GetId()) t=tx;
+ }
+ return t;
+ }
+}
+///////////////////////////////////////////////////////////////////////////
Double_t AliJet::GetPt()
{
// Provide trans. momentum value w.r.t. z-axis.
return fTrackCopy;
}
///////////////////////////////////////////////////////////////////////////
+void AliJet::SetId(Int_t id)
+{
+// Set a user defined identifier for this jet.
+ fUserId=id;
+}
+///////////////////////////////////////////////////////////////////////////
+Int_t AliJet::GetId()
+{
+// Provide the user defined identifier of this jet.
+ return fUserId;
+}
+///////////////////////////////////////////////////////////////////////////
Float_t GetCharge(); // Provide the total charge of the jet
Int_t GetNtracks(); // Return the number of tracks in the jet
AliTrack* GetTrack(Int_t i); // Provide i-th track of the jet (1=first track)
+ AliTrack* GetIdTrack(Int_t id); // Provide the track with user identifier "id"
Double_t GetPt(); // Provide trans. momentum w.r.t. z-axis
Double_t GetPl(); // Provide long. momentum w.r.t. z-axis
Double_t GetEt(); // Provide trans. energy w.r.t. z-axis
Double_t GetRapidity(); // Provide rapidity value w.r.t. z-axis
void SetTrackCopy(Int_t j); // (De)activate creation of private copies in fTracks
Int_t GetTrackCopy(); // Provide TrackCopy flag value
+ void SetId(Int_t id); // Set the user defined identifier
+ Int_t GetId(); // Provide the user defined identifier
protected:
void SetNtinit(Int_t n=2); // Set the initial max. number of tracks for this Jet
Int_t fNtrk; // The number of tracks in the jet
TObjArray* fTracks; // Array to hold the pointers to the tracks of the jet
Int_t fTrackCopy; // Flag to denote creation of private copies in fTracks
+ Int_t fUserId; // The user defined identifier
ClassDef(AliJet,1) // Creation and investigation of a jet of particle tracks.
};
GetErrors(r,f);
}
///////////////////////////////////////////////////////////////////////////
+Double_t AliPosition::GetDistance(AliPosition& p)
+{
+// Provide distance to position p.
+// The error on the result can be obtained as usual by invoking
+// GetResultError() afterwards.
+ Ali3Vector d=(Ali3Vector)((*this)-p);
+ Double_t dist=d.GetNorm();
+ fDresult=d.GetResultError();
+ return dist;
+}
+///////////////////////////////////////////////////////////////////////////
virtual void GetPosition(Float_t* r,TString f); // Provide position r in frame f
AliPosition& GetPosition(); // Provide position
virtual void SetPosition(Ali3Vector& r); // Store position r
-
+ Double_t GetDistance(AliPosition& p); // Provide distance to position p
virtual void SetPositionErrors(Double_t* r,TString f); // Store position r in frame f
virtual void GetPositionErrors(Double_t* r,TString f); // Provide position r in frame f
virtual void SetPositionErrors(Float_t* r,TString f); // Store position r in frame f
{
// Reset all variables to 0 and delete all auto-generated decay tracks.
fQ=0;
+ fUserId=0;
fNdec=0;
fNsig=0;
fNmasses=0;
Double_t b[3]={0,0,0};
fBegin.SetPosition(b,"sph");
fEnd.SetPosition(b,"sph");
+ fImpactXY.SetPosition(b,"sph");
+ fImpactXZ.SetPosition(b,"sph");
+ fImpactYZ.SetPosition(b,"sph");
+ fClosest.SetPosition(b,"sph");
if (fMasses)
{
delete fMasses;
// Provide track information within the coordinate frame f
Double_t m=GetMass();
Double_t dm=GetResultError();
- cout << " *AliTrack::Info* Mass : " << m
+ cout << " *AliTrack::Info* Id : " << fUserId << " Mass : " << m
<< " error : " << dm << " Charge : " << fQ
<< " Momentum : " << GetMomentum() << " Nmass hyp. : " << fNmasses
<< " Ntracks : " << fNdec << " Nsignals : " << fNsig << endl;
return y;
}
///////////////////////////////////////////////////////////////////////////
+void AliTrack::SetImpactPoint(AliPosition p,TString q)
+{
+// Store the position of the impact-point in the plane "q=0".
+// Here q denotes one of the axes X, Y or Z.
+// Note : The character to denote the axis may be entered in lower or
+// in uppercase.
+ Int_t axis=0;
+ if (q=="x" || q=="X") axis=1;
+ if (q=="y" || q=="Y") axis=2;
+ if (q=="z" || q=="Z") axis=3;
+
+ switch (axis)
+ {
+ case 1: // Impact-point in the plane X=0
+ fImpactYZ=p;
+ break;
+
+ case 2: // Impact-point in the plane Y=0
+ fImpactXZ=p;
+ break;
+
+ case 3: // Impact-point in the plane Z=0
+ fImpactXY=p;
+ break;
+
+ default: // Unsupported axis
+ cout << "*AliTrack::SetImpactPoint* Unsupported axis : " << q << endl
+ << " Possible axes are 'X', 'Y' and 'Z'." << endl;
+ break;
+ }
+}
+///////////////////////////////////////////////////////////////////////////
+AliPosition AliTrack::GetImpactPoint(TString q)
+{
+// Provide the position of the impact-point in the plane "q=0".
+// Here q denotes one of the axes X, Y or Z.
+// Note : The character to denote the axis may be entered in lower or
+// in uppercase.
+ AliPosition dummy;
+ Int_t axis=0;
+ if (q=="x" || q=="X") axis=1;
+ if (q=="y" || q=="Y") axis=2;
+ if (q=="z" || q=="Z") axis=3;
+
+ switch (axis)
+ {
+ case 1: // Impact-point in the plane X=0
+ return fImpactYZ;
+
+ case 2: // Impact-point in the plane Y=0
+ return fImpactXZ;
+
+ case 3: // Impact-point in the plane Z=0
+ return fImpactXY;
+
+ default: // Unsupported axis
+ cout << "*AliTrack::GetImpactPoint* Unsupported axis : " << q << endl
+ << " Possible axes are 'X', 'Y' and 'Z'." << endl;
+ return dummy;
+ }
+}
+///////////////////////////////////////////////////////////////////////////
+void AliTrack::SetId(Int_t id)
+{
+// Set a user defined identifier for this track.
+ fUserId=id;
+}
+///////////////////////////////////////////////////////////////////////////
+Int_t AliTrack::GetId()
+{
+// Provide the user defined identifier of this track.
+ return fUserId;
+}
+///////////////////////////////////////////////////////////////////////////
+void AliTrack::SetClosestPoint(AliPosition p)
+{
+// Set position p as the point of closest approach w.r.t. some reference
+ fClosest=p;
+}
+///////////////////////////////////////////////////////////////////////////
+AliPosition AliTrack::GetClosestPoint()
+{
+// Provide the point of closest approach w.r.t. some reference
+ return fClosest;
+}
+///////////////////////////////////////////////////////////////////////////
Double_t GetMt(); // Provide trans. mass w.r.t. z-axis
Double_t GetMt(Int_t j); // Provide trans. mass w.r.t. z-axis and jth mass hypothesis
Double_t GetRapidity(); // Provide rapidity value w.r.t. z-axis
+ void SetImpactPoint(AliPosition p,TString q); // Set the impact-point in plane "q=0"
+ AliPosition GetImpactPoint(TString q); // Provide the impact-point in plane "q=0"
+ void SetId(Int_t id); // Set the user defined identifier
+ Int_t GetId(); // Provide the user defined identifier
+ void SetClosestPoint(AliPosition p); // Set position p as point of closest approach w.r.t. some reference
+ AliPosition GetClosestPoint(); // Provide point of closest approach w.r.t. some reference
protected:
- Float_t fQ; // The charge of the particle
- Int_t fNdec; // The number of decay products
- TObjArray* fDecays; // The array of decay produced tracks
- Int_t fNsig; // The number of related AliSignals
- TObjArray* fSignals; // The array of related AliSignals
- AliPosition fBegin; // The begin-point of the track
- AliPosition fEnd; // The end-point of the track
- Int_t fNmasses; // The number of mass hypotheses
- TArrayD* fMasses; // The various mass hypotheses
- TArrayD* fDmasses; // The errors on the various masses
- TArrayD* fPmasses; // The probabilities of the various mass hypotheses
+ Float_t fQ; // The charge of the particle
+ Int_t fNdec; // The number of decay products
+ TObjArray* fDecays; // The array of decay produced tracks
+ Int_t fNsig; // The number of related AliSignals
+ TObjArray* fSignals; // The array of related AliSignals
+ AliPosition fBegin; // The begin-point of the track
+ AliPosition fEnd; // The end-point of the track
+ Int_t fNmasses; // The number of mass hypotheses
+ TArrayD* fMasses; // The various mass hypotheses
+ TArrayD* fDmasses; // The errors on the various masses
+ TArrayD* fPmasses; // The probabilities of the various mass hypotheses
+ AliPosition fImpactXY; // The (extrapolated) impact-point in the plane z=0
+ AliPosition fImpactXZ; // The (extrapolated) impact-point in the plane y=0
+ AliPosition fImpactYZ; // The (extrapolated) impact-point in the plane x=0
+ Int_t fUserId; // The user defined identifier
+ AliPosition fClosest; // The (extrapolated) point of closest approach w.r.t some reference
private:
void Dump(AliTrack* t,Int_t n,TString f); // Recursively print all decay levels
Double_t v2=v.GetInvariant();
Double_t dv2=v.Ali4Vector::GetResultError();
- AliTrack* t=new AliTrack;
+ AliTrack* t=new AliTrack();
t->SetBeginPoint(r1);
t->SetEndPoint(r2);
t->SetCharge(q);
void AliVertex::Info(TString f)
{
// Provide vertex information within the coordinate frame f
- cout << " *AliVertex::Info* Invmass : " << GetInvmass()
+ cout << " *AliVertex::Info* Id : " << fUserId << " Invmass : " << GetInvmass()
<< " Charge : " << GetCharge() << " Momentum : " << GetMomentum()
<< " Ntracks : " << GetNtracks() << " Nvertices : " << fNvtx
<< " Njets : " << fNjets << endl;
}
}
///////////////////////////////////////////////////////////////////////////
+AliVertex* AliVertex::GetIdVertex(Int_t id)
+{
+// Return the (sec.) vertex with user identifier "id"
+ AliVertex* vx=0;
+ AliVertex* v=0;
+ if (!fVertices)
+ {
+ cout << " *AliVertex*::GetIdVertex* No (secondary) vertices present." << endl;
+ return 0;
+ }
+ else
+ {
+ for (Int_t i=0; i<fNvtx; i++)
+ {
+ vx=(AliVertex*)fVertices->At(i);
+ if (id == vx->GetId()) v=vx;
+ }
+ return v;
+ }
+}
+///////////////////////////////////////////////////////////////////////////
void AliVertex::SetVertexCopy(Int_t j)
{
// (De)activate the creation of private copies of the added vertices.
}
}
///////////////////////////////////////////////////////////////////////////
+AliJet* AliVertex::GetIdJet(Int_t id)
+{
+// Return the jet with user identifier "id"
+ AliJet* jx=0;
+ AliJet* j=0;
+ if (!fJets)
+ {
+ cout << " *AliVertex*::GetIdJet* No jets present." << endl;
+ return 0;
+ }
+ else
+ {
+ for (Int_t i=0; i<fNjets; i++)
+ {
+ jx=(AliJet*)fJets->At(i);
+ if (id == jx->GetId()) j=jx;
+ }
+ return j;
+ }
+}
+///////////////////////////////////////////////////////////////////////////
void AliVertex::SetJetCopy(Int_t j)
{
// (De)activate the creation of private copies of the added jets.
void ListAll(TString f="car"); // Print prim. + sec. vertex full track info for coord. frame f
Int_t GetNvertices(); // Return the number of (secondary) vertices
AliVertex* GetVertex(Int_t i); // Provide i-th (secondary) vertex
+ AliVertex* GetIdVertex(Int_t id); // Provide the vertex with user identifier "id"
void SetNvmax(Int_t n=2); // Set the initial max. number of (secondary) vertices
void SetVertexCopy(Int_t j); // (De)activate creation of private copies in fVertices
Int_t GetVertexCopy(); // Provide VertexCopy flag value
Int_t GetNjets(); // Return the number of jets
AliJet* GetJet(Int_t i); // Provide i-th jet
+ AliJet* GetIdJet(Int_t id); // Provide the jet with user identifier "id"
void SetNjmax(Int_t n=2); // Set the initial max. number of jets
void SetJetCopy(Int_t j); // (De)activate creation of private copies in fJets
Int_t GetJetCopy(); // Provide JetCopy flag value
AliTrack etc... storage in AliEvent & co.
Also (Ali4Vector&) casting stmt. in AliVertex::ResetVertices() changed
to make it ANSI compatible for all compilers/platforms.
+09-jul-2001 NvE Support for impact points and user identifier introduced in AliTrack.
+ Also user identifier facility introduced for AliJet and AliVertex.
+12-jul-2001 NvE Memberfunction GetDistance() introduced for AliPosition and support for
+ point of closest approach introduced in AliTrack.