AliTrack and AliJet.
Also compiler warnings activated for overloaded virtuals in installation
script for AMD Athlon in the /scripts sub-directory.
return fSelected;
}
///////////////////////////////////////////////////////////////////////////
+Double_t AliJet::GetDistance(AliPosition* p)
+{
+// Provide distance of the current jet to the position p.
+// The error on the result can be obtained as usual by invoking
+// GetResultError() afterwards.
+//
+// The distance will be provided in the unit scale of the AliPosition p.
+// As such it is possible to obtain a correctly computed distance even in case
+// the jet parameters have a different unit scale.
+// However, it is recommended to work always with one single unit scale.
+//
+// Note : In case of incomplete information, a distance value of -1 is
+// returned.
+
+ Double_t dist=-1.;
+ fDresult=0.;
+
+ if (!p) return dist;
+
+ // Obtain a defined position on this jet
+ AliPosition* rx=fRef;
+
+ if (!rx) return dist;
+
+ Ali3Vector pj=Get3Momentum();
+
+ if (pj.GetNorm() <= 0.) return dist;
+
+ AliTrack tj;
+ tj.Set3Momentum(pj);
+ tj.SetReferencePoint(*rx);
+ dist=tj.GetDistance(p);
+ fDresult=tj.GetResultError();
+ return dist;
+}
+///////////////////////////////////////////////////////////////////////////
+Double_t AliJet::GetDistance(AliTrack* t)
+{
+// Provide distance of the current jet to the track t.
+// The error on the result can be obtained as usual by invoking
+// GetResultError() afterwards.
+//
+// The distance will be provided in the unit scale of the current jet.
+// As such it is possible to obtain a correctly computed distance even in case
+// the jet and track parameters have a different unit scale.
+// However, it is recommended to work always with one single unit scale.
+//
+// Note : In case of incomplete information, a distance value of -1 is
+// returned.
+
+ Double_t dist=-1.;
+ fDresult=0.;
+
+ if (!t) return dist;
+
+ // Obtain a defined position on this jet
+ AliPosition* rx=fRef;
+
+ if (!rx) return dist;
+
+ Ali3Vector pj=Get3Momentum();
+
+ if (pj.GetNorm() <= 0.) return dist;
+
+ AliTrack tj;
+ tj.Set3Momentum(pj);
+ tj.SetReferencePoint(*rx);
+ dist=tj.GetDistance(t);
+ fDresult=tj.GetResultError();
+ return dist;
+}
+///////////////////////////////////////////////////////////////////////////
+Double_t AliJet::GetDistance(AliJet* j)
+{
+// Provide distance of the current jet to the jet j.
+// The error on the result can be obtained as usual by invoking
+// GetResultError() afterwards.
+//
+// The distance will be provided in the unit scale of the current jet.
+// As such it is possible to obtain a correctly computed distance even in case
+// the jet and track parameters have a different unit scale.
+// This implies that in such cases the results of j1.GetDistance(j2) and
+// j2.GetDistance(j1) will be numerically different.
+// However, it is recommended to work always with one single unit scale.
+//
+// Note : In case of incomplete information, a distance value of -1 is
+// returned.
+
+ Double_t dist=-1.;
+ fDresult=0.;
+
+ if (!j) return dist;
+
+ // Obtain a defined position on jet j
+ AliPosition* rx=j->GetReferencePoint();
+
+ if (!rx) return dist;
+
+ Ali3Vector pj=j->Get3Momentum();
+
+ if (pj.GetNorm() <= 0.) return dist;
+
+ AliTrack tj;
+ tj.Set3Momentum(pj);
+ tj.SetReferencePoint(*rx);
+ dist=GetDistance(tj);
+ return dist;
+}
+///////////////////////////////////////////////////////////////////////////
TObject* AliJet::Clone(const char* name) const
{
// Make a deep copy of the current object and provide the pointer to the copy.
void SetReferencePoint(AliPosition& p); // Set the jet reference-point
AliPosition* GetReferencePoint(); // Provide the jet reference-point
TObjArray* SortTracks(Int_t mode=-1,TObjArray* tracks=0); // Sort tracks by a certain observable
+ Double_t GetDistance(AliPosition* p); // Provide distance to position p
+ Double_t GetDistance(AliPosition& p) { return GetDistance(&p); }
+ Double_t GetDistance(AliTrack* t); // Provide distance to track t
+ Double_t GetDistance(AliTrack& t) { return GetDistance(&t); }
+ Double_t GetDistance(AliJet* j); // Provide distance to jet j
+ Double_t GetDistance(AliJet& j) { return GetDistance(&j); }
protected:
void Init(); // Initialisation of pointers etc...
AliPositionObj* fRef; // The reference-point of the jet
TObjArray* fSelected; //! Temp. array to hold user selected or ordered objects
- ClassDef(AliJet,16) // Creation and investigation of a jet of particle tracks.
+ ClassDef(AliJet,17) // Creation and investigation of a jet of particle tracks.
};
#endif
if (!rx) return dist;
+ Ali3Vector p1=Get3Momentum();
+
+ if (p1.GetNorm() <= 0.) return dist;
+
Ali3Vector r0=(Ali3Vector)(*rx);
Float_t tscale=rx->GetUnitScale();
// Obtain the direction unit vector of this track
Double_t vec[3];
Double_t err[3];
- Ali3Vector p1=Get3Momentum();
p1.GetVector(vec,"sph");
p1.GetErrors(err,"sph");
vec[0]=1.;
return dist;
}
///////////////////////////////////////////////////////////////////////////
+Double_t AliTrack::GetDistance(AliTrack* t)
+{
+// Provide distance of the current track to the track t.
+// The error on the result can be obtained as usual by invoking
+// GetResultError() afterwards.
+//
+// The distance will be provided in the unit scale of the current track.
+// As such it is possible to obtain a correctly computed distance even in case
+// the track parameters have a different unit scale.
+// This implies that in such cases the results of t1.GetDistance(t2) and
+// t2.GetDistance(t1) will be numerically different.
+// However, it is recommended to work always with one single unit scale.
+//
+// Note : In case of incomplete information, a distance value of -1 is
+// returned.
+
+ Double_t dist=-1.;
+ fDresult=0.;
+
+ if (!t) return dist;
+
+ // Obtain a defined position on this track
+ AliPosition* rx=fRef;
+ if (!rx) rx=fBegin;
+ if (!rx) rx=fEnd;
+
+ if (!rx) return dist;
+
+ // Obtain a defined position on track t
+ AliPosition* ry=t->GetReferencePoint();
+ if (!ry) ry=t->GetBeginPoint();
+ if (!ry) ry=t->GetEndPoint();
+
+ if (!ry) return dist;
+
+ Ali3Vector p1=Get3Momentum();
+ Ali3Vector p2=t->Get3Momentum();
+
+ if (p1.GetNorm() <= 0. || p2.GetNorm() <= 0.) return dist;
+
+ // The vector normal to both track directions
+ Ali3Vector n=p1.Cross(p2);
+
+ if (n.GetNorm() > 1.e-10)
+ {
+ // Normalise n to a unit vector
+ Double_t vec[3];
+ Double_t err[3];
+ n.GetVector(vec,"sph");
+ n.GetErrors(err,"sph");
+ vec[0]=1.;
+ err[0]=0.;
+ n.SetVector(vec,"sph");
+ n.SetErrors(err,"sph");
+ Ali3Vector r1=(Ali3Vector)(*rx);
+ Ali3Vector r2=(Ali3Vector)(*ry);
+ // Correct components of r2 in case of different unit scales
+ Float_t scale=rx->GetUnitScale();
+ Float_t tscale=ry->GetUnitScale();
+ if ((tscale/scale > 1.1) || (scale/tscale > 1.1)) r2=r2*(tscale/scale);
+ Ali3Vector r=r1-r2;
+ dist=fabs(r.Dot(n));
+ fDresult=r.GetResultError();
+ }
+ else // Parallel tracks
+ {
+ dist=t->GetDistance(rx);
+ fDresult=t->GetResultError();
+ }
+ return dist;
+}
+///////////////////////////////////////////////////////////////////////////
TObject* AliTrack::Clone(const char* name) const
{
// Make a deep copy of the current object and provide the pointer to the copy.
void RemoveTimestamp(); // Remove timestamp from this track
Double_t GetDistance(AliPosition* p); // Provide distance to position p
Double_t GetDistance(AliPosition& p) { return GetDistance(&p); }
+ Double_t GetDistance(AliTrack* t); // Provide distance to track t
+ Double_t GetDistance(AliTrack& t) { return GetDistance(&t); }
protected:
void Init(); // Initialisation of pointers etc...
private:
void Dumps(AliTrack* t,Int_t n,TString f,TString u); // Recursively print all decay levels
- ClassDef(AliTrack,16) // Handling of the attributes of a reconstructed particle track.
+ ClassDef(AliTrack,17) // Handling of the attributes of a reconstructed particle track.
};
#endif
Also copy ctor of AliHelix made complete for new datamembers.
22-mar-2006 NvE Line attribute selections for displays extended in AliHelix.
20-apr-2006 NvE Several small modifications to prevent gcc warnings.
+10-may-2006 NvE Distance determination between tracks and/or jets introduced in
+ AliTrack and AliJet.
+ Also compiler warnings activated for overloaded virtuals in installation
+ script for AMD Athlon in the /scripts sub-directory.
Also new memberfunction SetPenalty() introduced in IcePandel.
21-apr-2006 NvE TFile.h included in header files of IceCalibrate and IceXtalk to prevent
compiler error with new ROOT 5.11 version.
+10-may-2006 NvE Compiler warnings activated for overloaded virtuals in installation
+ script for AMD Athlon in the /scripts sub-directory.
08-mar-2006 NvE Time offset correction in IceF2k extended to allow also a user defined offset
to cope with Monte Carlo data.
22-mar-2006 NvE Support for selective MC track storage introduced in IceF2k.
+10-may-2006 NvE Compiler warnings activated for overloaded virtuals in installation
+ script for AMD Athlon in the /scripts sub-directory.
### The option string for GCC shared lib compilation and linking ***
### For the GCC ROOT loadable shared lib the strict requirements are ***
### dropped to avoid many warnings from the rootcint generated code ***
-gccroot="-fPIC -shared -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack -o $lib"
+gccroot="-fPIC -shared -g0 -ansi -pedantic -Wall -Wno-long-long -Woverloaded-virtual -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack -o $lib"
#
echo "lib = " $lib
echo "gcccomp = " $gcccomp
### The option string for GCC shared lib compilation and linking ***
### For the GCC ROOT loadable shared lib the strict requirements are ***
### dropped to avoid many warnings from the rootcint generated code ***
-gccroot="-fPIC -shared -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -o $lib"
+gccroot="-fPIC -shared -g0 -ansi -pedantic -Wall -Wno-long-long -Woverloaded-virtual -I$ROOTSYS/include -I$ALIROOT/RALICE -o $lib"
#
echo "lib = " $lib
echo "gccroot = " $gccroot
### The option string for GCC shared lib compilation and linking ***
### For the GCC ROOT loadable shared lib the strict requirements are ***
### dropped to avoid many warnings from the rootcint generated code ***
-gccroot="-fPIC -shared -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -o $lib"
+gccroot="-fPIC -shared -g0 -ansi -pedantic -Wall -Wno-long-long -Woverloaded-virtual -I$ROOTSYS/include -o $lib"
#
echo "lib = " $lib
echo "gccroot = " $gccroot
Also installation script macgcclib.sh for gcc on MAC systems introduced.
16-feb-2005 NvE Support for user selectable split level and buffer size of the output tree
introduced in Wa98Convert.
+10-may-2006 NvE Compiler warnings activated for overloaded virtuals in installation
+ script for AMD Athlon in the /scripts sub-directory.
### The option string for GCC shared lib compilation and linking ***
### For the GCC ROOT loadable shared lib the strict requirements are ***
### dropped to avoid many warnings from the rootcint generated code ***
-gccroot="-fPIC -shared -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -o $lib"
+gccroot="-fPIC -shared -g0 -ansi -pedantic -Wall -Wno-long-long -Woverloaded-virtual -I$ROOTSYS/include -I$ALIROOT/RALICE -o $lib"
#
echo "lib = " $lib
echo "gccroot = " $gccroot