]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
04-apr-2004 NvE SetMass() invoked from AliTrack::Set3Momentum to get also the energy...
authornick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 May 2004 15:33:04 +0000 (15:33 +0000)
committernick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 May 2004 15:33:04 +0000 (15:33 +0000)
09-apr-2004 NvE Support for specification of unit scale introduced in AliPosition.
19-apr-2004 NvE Memberfunction GetPrimed introduced for Ali3Vector.
04-may-2004 NvE Various memberfunctions declared "const" to satisfy the strict Alice coding rules
                and also to allow better compiler optimisation.

39 files changed:
RALICE/Ali3Vector.cxx
RALICE/Ali3Vector.h
RALICE/Ali4Vector.cxx
RALICE/Ali4Vector.h
RALICE/AliAttrib.cxx
RALICE/AliAttrib.h
RALICE/AliBoost.cxx
RALICE/AliBoost.h
RALICE/AliCalcluster.cxx
RALICE/AliCalcluster.h
RALICE/AliCalmodule.cxx
RALICE/AliCalmodule.h
RALICE/AliCalorimeter.cxx
RALICE/AliCalorimeter.h
RALICE/AliCollider.cxx
RALICE/AliCollider.h
RALICE/AliEvent.cxx
RALICE/AliEvent.h
RALICE/AliInvmass.cxx
RALICE/AliInvmass.h
RALICE/AliJet.cxx
RALICE/AliJet.h
RALICE/AliMath.cxx
RALICE/AliMath.h
RALICE/AliObjMatrix.cxx
RALICE/AliObjMatrix.h
RALICE/AliPosition.cxx
RALICE/AliPosition.h
RALICE/AliRandom.cxx
RALICE/AliRandom.h
RALICE/AliSample.cxx
RALICE/AliSample.h
RALICE/AliSignal.cxx
RALICE/AliSignal.h
RALICE/AliTrack.cxx
RALICE/AliTrack.h
RALICE/AliVertex.cxx
RALICE/AliVertex.h
RALICE/history.txt

index cd0e81c267fe08e17070cc8dd7284cfc742d3db1..b123d8d6dc449a2a26c054027c6d80c8a2c714ec 100644 (file)
@@ -204,7 +204,7 @@ void Ali3Vector::SetVector(Double_t* v,TString f)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-void Ali3Vector::GetVector(Double_t* v,TString f)
+void Ali3Vector::GetVector(Double_t* v,TString f) const
 {
 // Provide vector according to reference frame f
  Int_t frame=0;
@@ -255,7 +255,7 @@ void Ali3Vector::SetVector(Float_t* v,TString f)
  SetVector(vec,f);
 }
 ///////////////////////////////////////////////////////////////////////////
-void Ali3Vector::GetVector(Float_t* v,TString f)
+void Ali3Vector::GetVector(Float_t* v,TString f) const
 {
 // Provide vector according to reference frame f
  Double_t vec[3];
@@ -317,7 +317,7 @@ void Ali3Vector::SetErrors(Double_t* e,TString f)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-void Ali3Vector::GetErrors(Double_t* e,TString f)
+void Ali3Vector::GetErrors(Double_t* e,TString f) const
 {
 // Provide errors according to reference frame f
  Int_t frame=0;
@@ -428,7 +428,7 @@ void Ali3Vector::SetErrors(Float_t* e,TString f)
  SetErrors(vec,f);
 }
 ///////////////////////////////////////////////////////////////////////////
-void Ali3Vector::GetErrors(Float_t* e,TString f)
+void Ali3Vector::GetErrors(Float_t* e,TString f) const
 {
 // Provide errors according to reference frame f
  Double_t vec[3];
@@ -439,7 +439,7 @@ void Ali3Vector::GetErrors(Float_t* e,TString f)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-void Ali3Vector::Data(TString f)
+void Ali3Vector::Data(TString f) const
 {
 // Print vector components according to reference frame f
  if (f=="car" || f=="sph" || f=="cyl")
@@ -525,14 +525,14 @@ Double_t Ali3Vector::Dot(Ali3Vector& q)
  return dotpro;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t Ali3Vector::GetResultError()
+Double_t Ali3Vector::GetResultError() const
 {
 // Provide the error on the result of an operation yielding a scalar
 // E.g. GetNorm() or Dot()
  return fDresult;
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali3Vector::Cross(Ali3Vector& q)
+Ali3Vector Ali3Vector::Cross(Ali3Vector& q) const
 {
 // Provide the cross product of the current vector with vector q
 // Error propagation is performed automatically
@@ -567,7 +567,7 @@ Ali3Vector Ali3Vector::Cross(Ali3Vector& q)
  return v;
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali3Vector::operator+(Ali3Vector& q)
+Ali3Vector Ali3Vector::operator+(Ali3Vector& q) const
 {
 // Add vector q to the current vector
 // Error propagation is performed automatically
@@ -591,7 +591,7 @@ Ali3Vector Ali3Vector::operator+(Ali3Vector& q)
  return v;
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali3Vector::operator-(Ali3Vector& q)
+Ali3Vector Ali3Vector::operator-(Ali3Vector& q) const
 {
 // Subtract vector q from the current vector
 // Error propagation is performed automatically
@@ -615,7 +615,7 @@ Ali3Vector Ali3Vector::operator-(Ali3Vector& q)
  return v;
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali3Vector::operator*(Double_t s)
+Ali3Vector Ali3Vector::operator*(Double_t s) const
 {
 // Multiply the current vector with a scalar s.
 // Error propagation is performed automatically.
@@ -637,7 +637,7 @@ Ali3Vector Ali3Vector::operator*(Double_t s)
  return v;
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali3Vector::operator/(Double_t s)
+Ali3Vector Ali3Vector::operator/(Double_t s) const
 {
 // Divide the current vector by a scalar s
 // Error propagation is performed automatically
@@ -765,7 +765,7 @@ Ali3Vector& Ali3Vector::operator/=(Double_t s)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali3Vector::GetVecTrans()
+Ali3Vector Ali3Vector::GetVecTrans() const
 {
 // Provide the transverse vector w.r.t. z-axis.
 // Error propagation is performed automatically
@@ -792,7 +792,7 @@ Ali3Vector Ali3Vector::GetVecTrans()
  return v;
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali3Vector::GetVecLong()
+Ali3Vector Ali3Vector::GetVecLong() const
 {
 // Provide the longitudinal vector w.r.t. z-axis.
 // Error propagation is performed automatically
@@ -822,3 +822,30 @@ Ali3Vector Ali3Vector::GetVecLong()
  return v;
 }
 ///////////////////////////////////////////////////////////////////////////
+Ali3Vector Ali3Vector::GetPrimed(TRotMatrix* m) const
+{
+// Provide vector components (and errors) in a rotated frame.
+// The orientation of the rotated frame is described by the TRotMatrix
+// input argument.
+ Ali3Vector v=*this;
+ if (!m) return v;
+
+ Double_t* mat=m->GetMatrix();
+
+ Double_t a[3],aprim[3];
+
+ GetVector(a,"car");
+ aprim[0]=a[0]*mat[0]+a[1]*mat[1]+a[2]*mat[2];
+ aprim[1]=a[0]*mat[3]+a[1]*mat[4]+a[2]*mat[5];
+ aprim[2]=a[0]*mat[6]+a[1]*mat[7]+a[2]*mat[8];
+ v.SetVector(aprim,"car");
+
+ GetErrors(a,"car");
+ aprim[0]=sqrt(pow(a[0]*mat[0],2)+pow(a[1]*mat[1],2)+pow(a[2]*mat[2],2));
+ aprim[1]=sqrt(pow(a[0]*mat[3],2)+pow(a[1]*mat[4],2)+pow(a[2]*mat[5],2));
+ aprim[2]=sqrt(pow(a[0]*mat[6],2)+pow(a[1]*mat[7],2)+pow(a[2]*mat[8],2));
+ v.SetErrors(aprim,"car");
+
+ return v;
+}
+///////////////////////////////////////////////////////////////////////////
index 98be98ed3a4a566e6d692be1bed1b0d828f9e11e..6edf3d72ca15807f12c1e45cdb07f7b35504baf4 100644 (file)
@@ -9,6 +9,7 @@
  
 #include "TObject.h"
 #include "TString.h"
+#include "TRotMatrix.h"
  
 class Ali3Vector
 {
@@ -19,35 +20,36 @@ class Ali3Vector
   virtual void Load(Ali3Vector& q);              // Load all attributes of input Ali3Vector
   virtual void SetZero();                        // (Re)set all attributes to zero.
   void SetVector(Double_t* v,TString f);         // Store vector v in frame f
-  void GetVector(Double_t* v,TString f);         // Provide vector v in frame f
+  void GetVector(Double_t* v,TString f) const;   // Provide vector v in frame f
   void SetVector(Float_t*  v,TString f);         // Store vector v in frame f
-  void GetVector(Float_t*  v,TString f);         // Provide vector v in frame f
+  void GetVector(Float_t*  v,TString f) const;   // Provide vector v in frame f
   void SetErrors(Double_t* e,TString f);         // Store errors of vector in frame f
-  void GetErrors(Double_t* e,TString f);         // Provide errors of vector in frame f
+  void GetErrors(Double_t* e,TString f) const;   // Provide errors of vector in frame f
   void SetErrors(Float_t*  e,TString f);         // Store errors of vector in frame f
-  void GetErrors(Float_t*  e,TString f);         // Provide errors of vector in frame f
-  virtual void Data(TString f="car");            // Print vector components in frame f
+  void GetErrors(Float_t*  e,TString f) const;   // Provide errors of vector in frame f
+  virtual void Data(TString f="car") const;      // Print vector components in frame f
   Double_t GetNorm();                            // Provide norm of the vector
   Double_t Dot(Ali3Vector& q);                   // Provide dot product with q
   Double_t GetPseudoRapidity();                  // Provide the pseudorapidity w.r.t z-axis
-  Double_t GetResultError();                     // Provide error on scalar result (e.g. norm)
-  Ali3Vector Cross(Ali3Vector& q);               // Provide cross product with q
-  Ali3Vector operator+(Ali3Vector& q);           // Add vector q
-  Ali3Vector operator-(Ali3Vector& q);           // Subtract vector q
-  Ali3Vector operator*(Double_t s);              // Multiply vector with scalar s
-  Ali3Vector operator/(Double_t s);              // Divide vector by scalar s
+  Double_t GetResultError() const;               // Provide error on scalar result (e.g. norm)
+  Ali3Vector Cross(Ali3Vector& q) const;         // Provide cross product with q
+  Ali3Vector operator+(Ali3Vector& q) const;     // Add vector q
+  Ali3Vector operator-(Ali3Vector& q) const;     // Subtract vector q
+  Ali3Vector operator*(Double_t s) const;        // Multiply vector with scalar s
+  Ali3Vector operator/(Double_t s) const;        // Divide vector by scalar s
   Ali3Vector& operator+=(Ali3Vector& q);         // Add vector q
   Ali3Vector& operator-=(Ali3Vector& q);         // Subtract vector q
   Ali3Vector& operator*=(Double_t s);            // Multiply with scalar s
   Ali3Vector& operator/=(Double_t s);            // Divide by scalar s
-  Ali3Vector GetVecTrans();                      // Provide transverse vector w.r.t. z-axis
-  Ali3Vector GetVecLong();                       // Provide longitudinal vector w.r.t. z-axis
+  Ali3Vector GetVecTrans() const;                // Provide transverse vector w.r.t. z-axis
+  Ali3Vector GetVecLong() const;                 // Provide longitudinal vector w.r.t. z-axis
+  Ali3Vector GetPrimed(TRotMatrix* m) const;     // Provide vector components in a rotated frame
 
  protected:
   Double_t fV,fTheta,fPhi;    // Vector in spherical coordinates
   Double_t fDx,fDy,fDz;       // Errors on Cartesian coordinates
   Double_t fDresult;          // Error on scalar result (e.g. norm or dotproduct)
 
- ClassDef(Ali3Vector,5) // Handling of 3-vectors in various reference frames.
+ ClassDef(Ali3Vector,7) // Handling of 3-vectors in various reference frames.
 };
 #endif
index 334e554299c64ded821ee70ff75d090ccda751c6..0253a4d2bba94b98353a01ca7b9247dcaa3e4e70 100644 (file)
@@ -297,7 +297,7 @@ Double_t Ali4Vector::GetScalar()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t Ali4Vector::GetResultError()
+Double_t Ali4Vector::GetResultError() const
 {
 // Provide the error on the result of an operation yielding a scalar
 // E.g. GetScalar(), GetInvariant() or Dot()
@@ -439,7 +439,7 @@ Double_t Ali4Vector::GetInvariant()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali4Vector::Get3Vector()
+Ali3Vector Ali4Vector::Get3Vector() const
 {
 // Provide the 3-vector part
  return fV;
@@ -742,13 +742,13 @@ Ali4Vector& Ali4Vector::operator/=(Double_t s)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t Ali4Vector::GetScalarFlag()
+Int_t Ali4Vector::GetScalarFlag() const
 {
 // Provide the value of the fScalar flag (for internal use only).
  return fScalar;
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali4Vector::GetVecTrans()
+Ali3Vector Ali4Vector::GetVecTrans() const
 {
 // Provide the transverse vector part w.r.t. z-axis.
 // Error propagation is performed automatically
@@ -756,7 +756,7 @@ Ali3Vector Ali4Vector::GetVecTrans()
  return fV.GetVecTrans();
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali4Vector::GetVecLong()
+Ali3Vector Ali4Vector::GetVecLong() const
 {
 // Provide the longitudinal vector part w.r.t. z-axis.
 // Error propagation is performed automatically
@@ -820,7 +820,7 @@ Double_t Ali4Vector::GetPseudoRapidity()
  return eta;
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector Ali4Vector::GetBetaVector()
+Ali3Vector Ali4Vector::GetBetaVector() const
 {
 // Provide the beta 3-vector corresponding to this 4-vector.
  Ali3Vector beta;
index c1a1a6edb684f95a4228d8749b0f623a435b9ed8..a85186879a63d1bb2ba30b8ac3fcc69478fb6ca6 100644 (file)
@@ -28,7 +28,7 @@ class Ali4Vector
   void Set3Vector(Ali3Vector& v);                   // Set the 3-vector part of v
   void Set3Vector(Double_t* v,TString f);           // Set the 3-vector part of v in frame f
   void Set3Vector(Float_t*  v,TString f);           // Set the 3-vector part of v in frame f
-  Ali3Vector Get3Vector();                          // Provide the 3-vector part of v
+  Ali3Vector Get3Vector() const;                    // Provide the 3-vector part of v
   void SetInvariant(Double_t v2,Double_t dv2=0);    // Set the Lorentz invariant (with error)
   void SetInvariantError(Double_t dv2);             // Set error on the Lorentz invariant
   Double_t GetInvariant();                          // Provide the Lorentz invariant
@@ -38,7 +38,7 @@ class Ali4Vector
   void GetErrors(Float_t*  v,TString f);            // Provide errors of vector v^i in frame f
   virtual void Data(TString f="car");               // Print contravariant components in frame f
   Double_t Dot(Ali4Vector& q);                      // Provide dot product v^i*q_i
-  Double_t GetResultError();                        // Provide error on scalar result (e.g. Dot)
+  Double_t GetResultError() const;                  // Provide error on scalar result (e.g. Dot)
   Ali4Vector operator+(Ali4Vector& q);              // Add contravariant vector q
   Ali4Vector operator-(Ali4Vector& q);              // Subtract contravariant vector q
   Ali4Vector operator*(Double_t s);                 // Multiply contravariant vector with scalar s
@@ -47,11 +47,11 @@ class Ali4Vector
   Ali4Vector& operator-=(Ali4Vector& q);            // Subtract contravariant vector q
   Ali4Vector& operator*=(Double_t s);               // Multiply with scalar s
   Ali4Vector& operator/=(Double_t s);               // Divide by scalar s
-  Int_t GetScalarFlag();                            // Provide the fScalar flag value
-  Ali3Vector GetVecTrans();                         // Provide transverse vector part w.r.t. z-axis
-  Ali3Vector GetVecLong();                          // Provide longitudinal vector part w.r.t. z-axis
+  Int_t GetScalarFlag() const;                      // Provide the fScalar flag value
+  Ali3Vector GetVecTrans() const;                   // Provide transverse vector part w.r.t. z-axis
+  Ali3Vector GetVecLong() const;                    // Provide longitudinal vector part w.r.t. z-axis
   Double_t GetPseudoRapidity();                     // Provide pseudorapidity of vector part w.r.t z-axis
-  Ali3Vector GetBetaVector();                       // Provide the beta 3-vector
+  Ali3Vector GetBetaVector() const;                 // Provide the beta 3-vector
   Double_t GetBeta();                               // Provide the norm of the beta 3-vector, i.e. v/c
   Double_t GetGamma();                              // Provide the Lorentz gamma factor
 
@@ -66,6 +66,6 @@ class Ali4Vector
   Double_t GetScaTrans(); // Provide "transverse value" of scalar part w.r.t. z-axis
   Double_t GetScaLong();  // Provide "longitudinal value" of scalar part w.r.t. z-axis
 
- ClassDef(Ali4Vector,6) // Handling of Lorentz 4-vectors in various reference frames.
+ ClassDef(Ali4Vector,7) // Handling of Lorentz 4-vectors in various reference frames.
 };
 #endif
index 02c95d22ab83ca6c76287876dc7499033b4c84e8..2226aa340fe942301804eb095582f80e2965d493 100644 (file)
@@ -82,7 +82,7 @@ AliAttrib::~AliAttrib()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-AliAttrib::AliAttrib(AliAttrib& a)
+AliAttrib::AliAttrib(const AliAttrib& a)
 {
 // Copy constructor
  fGains=0;
@@ -123,7 +123,7 @@ AliAttrib::AliAttrib(AliAttrib& a)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliAttrib::GetNgains()
+Int_t AliAttrib::GetNgains() const
 {
 // Provide the number of specified gains for this attribute.
  Int_t n=0;
@@ -131,7 +131,7 @@ Int_t AliAttrib::GetNgains()
  return n;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliAttrib::GetNoffsets()
+Int_t AliAttrib::GetNoffsets() const
 {
 // Provide the number of specified offsets for this attribute.
  Int_t n=0;
@@ -139,7 +139,7 @@ Int_t AliAttrib::GetNoffsets()
  return n;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliAttrib::GetNcalflags()
+Int_t AliAttrib::GetNcalflags() const
 {
 // Provide the number of specified calib. flags for this attribute.
  Int_t n=0;
@@ -147,7 +147,7 @@ Int_t AliAttrib::GetNcalflags()
  return n;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliAttrib::GetNnames()
+Int_t AliAttrib::GetNnames() const
 {
 // Provide the maximum number of specified names for this attribute.
  Int_t n=0;
@@ -256,7 +256,7 @@ void AliAttrib::SetCalFlags(Int_t gainflag,Int_t offsetflag,Int_t j)
  fCalflags->AddAt(word,j-1);
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliAttrib::GetGainFlag(Int_t j)
+Int_t AliAttrib::GetGainFlag(Int_t j) const
 {
 // Provide gain flag of the j-th (default j=1) attribute slot.
 //
@@ -284,7 +284,7 @@ Int_t AliAttrib::GetGainFlag(Int_t j)
  return gflag;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliAttrib::GetOffsetFlag(Int_t j)
+Int_t AliAttrib::GetOffsetFlag(Int_t j) const
 {
 // Provide offset flag of the j-th (default j=1) attribute slot.
 //
@@ -312,7 +312,7 @@ Int_t AliAttrib::GetOffsetFlag(Int_t j)
  return oflag;
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliAttrib::GetGain(Int_t j)
+Float_t AliAttrib::GetGain(Int_t j) const
 {
 // Provide gain value of the j-th (default j=1) attribute slot.
 // The first attribute slot is at j=1.
@@ -336,7 +336,7 @@ Float_t AliAttrib::GetGain(Int_t j)
  return gain;
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliAttrib::GetOffset(Int_t j)
+Float_t AliAttrib::GetOffset(Int_t j) const
 {
 // Provide offset value of the j-th (default j=1) attribute slot.
 // The first attribute slot at j=1.
@@ -669,7 +669,7 @@ void AliAttrib::DecreaseEdgeValue(Int_t j)
  SetEdgeValue(edge-1,j);
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliAttrib::GetEdgeValue(Int_t j)
+Int_t AliAttrib::GetEdgeValue(Int_t j) const
 {
 // Provide edge value of the j-th (default j=1) attribute slot.
 // Note : The first attribute slot is at j=1.
@@ -693,7 +693,7 @@ Int_t AliAttrib::GetEdgeValue(Int_t j)
  return edge;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliAttrib::GetDeadValue(Int_t j)
+Int_t AliAttrib::GetDeadValue(Int_t j) const
 {
 // Provide dead value of the j-th (default j=1) attribute slot.
 // Note : The first attribute slot is at j=1.
@@ -749,7 +749,7 @@ void AliAttrib::SetSlotName(TString s,Int_t j)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-TString AliAttrib::GetSlotName(Int_t j)
+TString AliAttrib::GetSlotName(Int_t j) const
 {
 // Provide the user defined name for the j-th (default j=1) slot. 
 // Note : The first attribute slot is at j=1.
@@ -772,7 +772,7 @@ TString AliAttrib::GetSlotName(Int_t j)
  return s;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliAttrib::GetSlotIndex(TString name)
+Int_t AliAttrib::GetSlotIndex(TString name) const
 {
 // Provide the slot index for the matching name.
 // If no matching name is found, 0 is returned.
@@ -794,7 +794,7 @@ Int_t AliAttrib::GetSlotIndex(TString name)
  return index;
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliAttrib::List(Int_t j)
+void AliAttrib::List(Int_t j) const
 {
 // Provide attribute information for the j-th slot.
 // The first slot is at j=1.
index 7ad001dbab4e2bb5a4f001691a91a0019f1f9f07..6c21f0bd05ccdbead421072f85d54399c0c2d154 100644 (file)
@@ -16,34 +16,34 @@ class AliAttrib
  public:
   AliAttrib();                                 // Default constructor
   virtual ~AliAttrib();                        // Destructor
-  AliAttrib(AliAttrib& a);                     // Copy constructor
-  Int_t GetNgains();                           // Provide the number of specified gains
-  Int_t GetNoffsets();                         // Provide the number of specified offsets
-  Int_t GetNcalflags();                        // Provide the number of specified calib. flags
-  Int_t GetNnames();                           // Provide the maximum number of specified names
+  AliAttrib(const AliAttrib& a);               // Copy constructor
+  Int_t GetNgains() const;                     // Provide the number of specified gains
+  Int_t GetNoffsets() const;                   // Provide the number of specified offsets
+  Int_t GetNcalflags() const;                  // Provide the number of specified calib. flags
+  Int_t GetNnames() const;                     // Provide the maximum number of specified names
   void SetGain(Double_t gain,Int_t j=1);       // Set gain of the j-th attribute slot
-  Float_t GetGain(Int_t j=1);                  // Provide gain of the j-th attribute slot
+  Float_t GetGain(Int_t j=1) const;            // Provide gain of the j-th attribute slot
   void SetOffset(Double_t off,Int_t j=1);      // Set offset value of the j-th attribute slot
-  Float_t GetOffset(Int_t j=1);                // Provide offset value of the j-th attribute slot
-  Int_t GetGainFlag(Int_t j=1);                // Provide gain flag of the j-th attribute slot
-  Int_t GetOffsetFlag(Int_t j=1);              // Provide offset flag of the j-th attribute slot
+  Float_t GetOffset(Int_t j=1) const;          // Provide offset value of the j-th attribute slot
+  Int_t GetGainFlag(Int_t j=1) const;          // Provide gain flag of the j-th attribute slot
+  Int_t GetOffsetFlag(Int_t j=1) const;        // Provide offset flag of the j-th attribute slot
   void ResetGain(Int_t j=1);                   // Reset j-th gain value and flag
   void ResetOffset(Int_t j=1);                 // Reset j-th offset value and flag
   void DeleteCalibrations(Int_t mode=0);       // User selected delete of gains and/or offsets
   void SetDead(Int_t j=1);                     // Indicate j-th attribute slot as 'dead'
   void SetAlive(Int_t j=1);                    // Indicate j-th attribute slot as 'active'
-  Int_t GetDeadValue(Int_t j=1);               // Return the 'dead flag' of the j-th attribute slot
+  Int_t GetDeadValue(Int_t j=1) const;         // Return the 'dead flag' of the j-th attribute slot
   void SetEdgeOn(Int_t j=1);                   // Indicate j-th slot as 'detector edge module'
   void SetEdgeOff(Int_t j=1);                  // Indicate j-th slot as 'detector non-edge module'
   void IncreaseEdgeValue(Int_t j=1);           // Increase the edge value of the j-th slot by 1
   void DecreaseEdgeValue(Int_t j=1);           // Decrease the edge value of the j-th slot by 1
   void SetEdgeValue(Int_t val,Int_t j=1);      // Set a specific edge value for the j-th slot
-  Int_t GetEdgeValue(Int_t j=1);               // Provide the edge value of the j-th slot
-  virtual void List(Int_t j=0);                // Printout of attribute data
+  Int_t GetEdgeValue(Int_t j=1) const;         // Provide the edge value of the j-th slot
+  virtual void List(Int_t j=0) const;          // Printout of attribute data
   virtual void Load(AliAttrib& a,Int_t j=0);   // Load j-th slot or all attributes of the input AliAttrib
   void SetSlotName(TString s,Int_t j=1);       // Set user defined name for the j-th slot
-  TString GetSlotName(Int_t j=1);              // Provide user defined name for the j-th slot
-  Int_t GetSlotIndex(TString name);            // Provide the slot index of the matching name
+  TString GetSlotName(Int_t j=1) const;        // Provide user defined name for the j-th slot
+  Int_t GetSlotIndex(TString name) const;      // Provide the slot index of the matching name
 
  protected:
   void SetCalFlags(Int_t gf,Int_t of,Int_t j); // Set flags for gain and/or offset settings
@@ -52,6 +52,6 @@ class AliAttrib
   TArrayI* fCalflags;                          // Flags to mark dead, edge, and gain/offset calibrated signals
   TObjArray* fNames;                           // User defined names for the various slots
 
- ClassDef(AliAttrib,1) // Generic handling of detector signal (calibration) attributes.
+ ClassDef(AliAttrib,2) // Generic handling of detector signal (calibration) attributes.
 };
 #endif
index 19d329e2da076183332ea38ba45e5492e9fe76b9..52519aa1062bbf0d03e8f515a74324a91220e7f9 100644 (file)
@@ -81,7 +81,7 @@ AliBoost::~AliBoost()
 // Default destructor.
 }
 ///////////////////////////////////////////////////////////////////////////
-AliBoost::AliBoost(AliBoost& b) : TObject(b)
+AliBoost::AliBoost(const AliBoost& b) : TObject(b)
 {
 // Copy constructor
  fBeta=b.fBeta;
@@ -141,7 +141,7 @@ void AliBoost::Set4Momentum(Ali4Vector& p)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector AliBoost::GetBetaVector()
+Ali3Vector AliBoost::GetBetaVector() const
 {
 // Provide the beta 3-vector.
  return fBeta;
@@ -164,7 +164,7 @@ Double_t AliBoost::GetGamma()
  return fGamma;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliBoost::GetResultError()
+Double_t AliBoost::GetResultError() const
 {
 // Provide the error on the result of an operation yielding a scalar.
 // E.g. GetBeta() or GetGamma()
index 929050975869076e8733f06764849906e2dd0121..e23f9351214596d2beda2d685f67873bc5b218f9 100644 (file)
@@ -16,16 +16,16 @@ class AliBoost : public TObject
  public:
   AliBoost();                             // Default constructor
   virtual ~AliBoost();                    // Default destructor
-  AliBoost(AliBoost& b);                  // Copy constructor
+  AliBoost(const AliBoost& b);            // Copy constructor
   void SetBeta(Ali3Vector& b);            // Set boost parameters by beta 3-vector
   void Set4Momentum(Ali4Vector& p);       // Set boost parameters by 4-momentum
-  Ali3Vector GetBetaVector();             // Provide the beta 3-vector
+  Ali3Vector GetBetaVector() const;       // Provide the beta 3-vector
   Double_t GetBeta();                     // Provide norm of beta 3-vector
   Double_t GetGamma();                    // Provide gamma value
   void Data(TString f="car");             // Print boost parameter info in coord. frame f
   Ali4Vector Boost(Ali4Vector& v);        // Perform Lorentz boost on 4-vector v
   Ali4Vector Inverse(Ali4Vector& v);      // Perform inverse Lorentz boost on 4-vector v
-  Double_t GetResultError();              // Provide error on scalar result
+  Double_t GetResultError() const;        // Provide error on scalar result
  
  protected:
   Ali3Vector fBeta;  // The beta 3-vector
@@ -33,6 +33,6 @@ class AliBoost : public TObject
   Double_t fDgamma;  // Error on the gamma value
   Double_t fDresult; // Error on scalar result
  
- ClassDef(AliBoost,3) // Perform various Lorentz transformations.
+ ClassDef(AliBoost,4) // Perform various Lorentz transformations.
 };
 #endif
index 45be3ef96e5c70e7b11c21190586968ee664f09c..393df685a0a33d54eccf8aa9d00bf2af7fbe39f5 100644 (file)
@@ -73,7 +73,7 @@ AliCalcluster::~AliCalcluster()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-AliCalcluster::AliCalcluster(AliCalcluster& c) : AliSignal(c)
+AliCalcluster::AliCalcluster(const AliCalcluster& c) : AliSignal(c)
 {
 // Copy constructor
  fRow=c.fRow;
@@ -137,25 +137,25 @@ AliCalcluster::AliCalcluster(AliCalmodule& m) : AliSignal()
  SetName("AliCalcluster [sig, sig11, sig33, sig55,...]");
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalcluster::GetRow()
+Int_t AliCalcluster::GetRow() const
 {
 // Provide the row number of the cluster center
  return fRow;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalcluster::GetColumn()
+Int_t AliCalcluster::GetColumn() const
 {
 // Provide the column number of the cluster center
  return fCol;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalcluster::GetNmodules()
+Int_t AliCalcluster::GetNmodules() const
 {
 // Provide the number of modules in the cluster
  return fNmods;
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliCalcluster::GetRowDispersion()
+Float_t AliCalcluster::GetRowDispersion() const
 {
 // Provide the normalised row dispersion of the cluster.
  Float_t sig=GetSignal();
@@ -169,7 +169,7 @@ Float_t AliCalcluster::GetRowDispersion()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliCalcluster::GetColumnDispersion()
+Float_t AliCalcluster::GetColumnDispersion() const
 {
 // Provide the normalised column dispersion of the cluster
  Float_t sig=GetSignal();
@@ -347,13 +347,13 @@ void AliCalcluster::AddVetoSignal(AliSignal& s,Int_t extr)
  fNvetos++;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalcluster::GetNvetos()
+Int_t AliCalcluster::GetNvetos() const
 {
 // Provide the number of veto signals associated to the cluster
  return fNvetos;
 }
 ///////////////////////////////////////////////////////////////////////////
-AliSignal* AliCalcluster::GetVetoSignal(Int_t i)
+AliSignal* AliCalcluster::GetVetoSignal(Int_t i) const
 {
 // Provide access to the i-th veto signal of this cluster.
 // Note : The first hit corresponds to i=1.
@@ -377,7 +377,7 @@ AliSignal* AliCalcluster::GetVetoSignal(Int_t i)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliCalcluster::GetVetoLevel()
+Float_t AliCalcluster::GetVetoLevel() const
 {
 // Provide the confidence level of best associated veto signal.
  Float_t cl=0;
@@ -400,7 +400,7 @@ Float_t AliCalcluster::GetVetoLevel()
  return clmax;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalcluster::HasVetoHit(Double_t cl)
+Int_t AliCalcluster::HasVetoHit(Double_t cl) const
 {
 // Investigate if cluster has an associated veto hit with conf. level > cl.
 // Returns 1 if there is such an associated veto hit, otherwise returns 0.
index 2884df3200eaf41674b61430b0c40a8449cfb4e1..22aaf731ede4d41dcf1c6d546e31391f3261e170 100644 (file)
 class AliCalcluster : public AliSignal
 {
  public:
-  AliCalcluster();                   // Default constructor, all data initialised to 0
-  virtual ~AliCalcluster();          // Default destructor
-  AliCalcluster(AliCalcluster& c);   // Copy constructor
-  AliCalcluster(AliCalmodule& m);    // Create new cluster starting at module m
-  Int_t GetRow();                    // Return row number of cluster center
-  Int_t GetColumn();                 // Return column number of cluster center
-  Int_t GetNmodules();               // Return number of modules in cluster
-  Float_t GetRowDispersion();        // Return normalised row dispersion of cluster
-  Float_t GetColumnDispersion();     // Return normalised column dispersion of cluster
-  void Start(AliCalmodule& m);       // Reset cluster data to start with module m
-  void Add(AliCalmodule& m);         // Add module data to cluster
+  AliCalcluster();                         // Default constructor, all data initialised to 0
+  virtual ~AliCalcluster();                // Default destructor
+  AliCalcluster(const AliCalcluster& c);   // Copy constructor
+  AliCalcluster(AliCalmodule& m);          // Create new cluster starting at module m
+  Int_t GetRow() const;                    // Return row number of cluster center
+  Int_t GetColumn() const;                 // Return column number of cluster center
+  Int_t GetNmodules() const;               // Return number of modules in cluster
+  Float_t GetRowDispersion() const;        // Return normalised row dispersion of cluster
+  Float_t GetColumnDispersion() const;     // Return normalised column dispersion of cluster
+  void Start(AliCalmodule& m);             // Reset cluster data to start with module m
+  void Add(AliCalmodule& m);               // Add module data to cluster
   void AddVetoSignal(AliSignal& s,Int_t extr=1); // Associate (extrapolated) signal
   void AddVetoSignal(AliSignal* s,Int_t extr=1) { AddVetoSignal(*s,extr); }
-  AliSignal* GetVetoSignal(Int_t j); // Access to veto signal number j
-  Int_t GetNvetos();                 // Provide the number of veto signals
-  Float_t GetVetoLevel();            // Provide confidence level of best associated veto hit
-  Int_t HasVetoHit(Double_t cl);     // Check for ass. veto hit with conf. level > cl
+  AliSignal* GetVetoSignal(Int_t j) const; // Access to veto signal number j
+  Int_t GetNvetos() const;                 // Provide the number of veto signals
+  Float_t GetVetoLevel() const;            // Provide confidence level of best associated veto hit
+  Int_t HasVetoHit(Double_t cl) const;     // Check for ass. veto hit with conf. level > cl
  
  protected:
   Int_t fRow;            // Row index of the central module of the cluster
@@ -43,6 +43,6 @@ class AliCalcluster : public AliSignal
   Int_t fNvetos;         // The number of associated veto signals
   TObjArray* fVetos;     // The array of associated veto signals
  
- ClassDef(AliCalcluster,4) // Description of a cluster of calorimeter modules.
+ ClassDef(AliCalcluster,5) // Description of a cluster of calorimeter modules.
 };
 #endif
index 4fae9d32040f02acc5b05a6bc6980a4cb8182902..a503a2da1d0855284b7b6c3f4170adf634d1050d 100644 (file)
@@ -44,7 +44,7 @@ AliCalmodule::~AliCalmodule()
 // Default destructor
 }
 ///////////////////////////////////////////////////////////////////////////
-AliCalmodule::AliCalmodule(AliCalmodule& m) : AliSignal(m)
+AliCalmodule::AliCalmodule(const AliCalmodule& m) : AliSignal(m)
 {
 // Copy constructor
  fRow=m.fRow;
@@ -95,19 +95,19 @@ void AliCalmodule::SetClusteredSignal(Double_t sig)
  fSigc=sig;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalmodule::GetRow()
+Int_t AliCalmodule::GetRow() const
 {
 // Provide the row number of the module
  return fRow;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalmodule::GetColumn()
+Int_t AliCalmodule::GetColumn() const
 {
 // Provide the column number of the module
  return fCol;
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliCalmodule::GetClusteredSignal()
+Float_t AliCalmodule::GetClusteredSignal() const
 {
 // Provide the signal of the module after clustering.
  Int_t dead=GetDeadValue();
@@ -121,7 +121,7 @@ Float_t AliCalmodule::GetClusteredSignal()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliCalmodule::Clone(const char* name)
+TObject* AliCalmodule::Clone(const char* name) const
 {
 // Make a deep copy of the current object and provide the pointer to the copy.
 // This memberfunction enables automatic creation of new objects of the
index 68b94ef586f71e043fb3d67d0676637e33f3ebaf..b22d795e9e6606ea62d7968589e603ee91845dad 100644 (file)
@@ -12,23 +12,23 @@ class AliCalmodule : public AliSignal
  public:
   AliCalmodule();                                          // Default constructor
   virtual ~AliCalmodule();                                 // Default destructor
-  AliCalmodule(AliCalmodule& m);                           // Copy constructor
+  AliCalmodule(const AliCalmodule& m);                     // Copy constructor
   AliCalmodule(Int_t row,Int_t col,Double_t sig);          // Create a module and initialise data
-  virtual TObject* Clone(const char* name="");             // Make a deep copy and provide its pointer
+  virtual TObject* Clone(const char* name="") const;       // Make a deep copy and provide its pointer
   virtual void SetSignal(Double_t sig,Int_t j=1);          // Set or change data for certain module
   virtual void AddSignal(Double_t sig,Int_t j=1);          // Add signal to a certain module
   void SetRow(Int_t i);                                    // Set the row number of the module
   void SetColumn(Int_t i);                                 // Set the column number of the module
-  Int_t GetRow();                                          // Return the row number of the module
-  Int_t GetColumn();                                       // Return the column number of the module
+  Int_t GetRow() const;                                    // Return the row number of the module
+  Int_t GetColumn() const;                                 // Return the column number of the module
   void SetClusteredSignal(Double_t val);                   // Set the signal of the module after clustering
-  Float_t GetClusteredSignal();                            // Return module signal after clustering
+  Float_t GetClusteredSignal() const;                      // Return module signal after clustering
  
  protected:
   Int_t fRow;        // The current row number
   Int_t fCol;        // The current column number
   Float_t fSigc;     // The signal after clustering
  
- ClassDef(AliCalmodule,7) // Description of a module in a calorimeter system.
+ ClassDef(AliCalmodule,8) // Description of a module in a calorimeter system.
 };
 #endif
index df4711185d4a5cf444675e386878396886944412..27c1fe9f096c040fe7e7d7fa005810cb48938663 100644 (file)
@@ -167,7 +167,7 @@ AliCalorimeter::AliCalorimeter(Int_t nrow,Int_t ncol) : TNamed()
  SetTitle("Unspecified");
 }
 ///////////////////////////////////////////////////////////////////////////
-AliCalorimeter::AliCalorimeter(AliCalorimeter& c) : TNamed(c)
+AliCalorimeter::AliCalorimeter(const AliCalorimeter& c) : TNamed(c)
 {
 // Copy constructor
  fClusters=0;
@@ -247,7 +247,7 @@ AliCalorimeter::AliCalorimeter(AliCalorimeter& c) : TNamed(c)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalorimeter::GetNrows()
+Int_t AliCalorimeter::GetNrows() const
 {
 // Provide the number of rows for the calorimeter module matrix
  Int_t nrows=fNrows;
@@ -255,7 +255,7 @@ Int_t AliCalorimeter::GetNrows()
  return nrows;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalorimeter::GetNcolumns()
+Int_t AliCalorimeter::GetNcolumns() const
 {
 // Provide the number of columns for the calorimeter module matrix
  Int_t ncols=fNcolumns;
@@ -489,7 +489,7 @@ void AliCalorimeter::Reset(Int_t mode)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliCalorimeter::GetSignal(Int_t row,Int_t col,Int_t mode)
+Float_t AliCalorimeter::GetSignal(Int_t row,Int_t col,Int_t mode) const
 {
 // Provide the signal of a certain calorimeter module.
 // In case the module was marked dead, 0 is returned.
@@ -879,7 +879,7 @@ void AliCalorimeter::SetPosition(Int_t row,Int_t col,Ali3Vector& r)
  if (m) m->SetPosition(r);
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalorimeter::GetEdgeValue(Int_t row,Int_t col)
+Int_t AliCalorimeter::GetEdgeValue(Int_t row,Int_t col) const
 {
 // Provide the value of the edge flag of a certain module.
 
@@ -915,7 +915,7 @@ Int_t AliCalorimeter::GetEdgeValue(Int_t row,Int_t col)
  return edge;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalorimeter::GetDeadValue(Int_t row,Int_t col)
+Int_t AliCalorimeter::GetDeadValue(Int_t row,Int_t col) const
 {
 // Provide the value of the dead flag of a certain module
 
@@ -951,7 +951,7 @@ Int_t AliCalorimeter::GetDeadValue(Int_t row,Int_t col)
  return dead;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalorimeter::GetGainFlag(Int_t row,Int_t col)
+Int_t AliCalorimeter::GetGainFlag(Int_t row,Int_t col) const
 {
 // Provide the value of the gain flag of a certain module.
 
@@ -987,7 +987,7 @@ Int_t AliCalorimeter::GetGainFlag(Int_t row,Int_t col)
  return gf;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalorimeter::GetOffsetFlag(Int_t row,Int_t col)
+Int_t AliCalorimeter::GetOffsetFlag(Int_t row,Int_t col) const
 {
 // Provide the value of the offset flag of a certain module.
 
@@ -1023,7 +1023,7 @@ Int_t AliCalorimeter::GetOffsetFlag(Int_t row,Int_t col)
  return of;
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliCalorimeter::GetGain(Int_t row,Int_t col)
+Float_t AliCalorimeter::GetGain(Int_t row,Int_t col) const
 {
 // Provide the gain value of a certain module.
 // See the memberfunction GetSignal() for a definition of the gain value.
@@ -1071,7 +1071,7 @@ Float_t AliCalorimeter::GetGain(Int_t row,Int_t col)
  return gain;
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliCalorimeter::GetOffset(Int_t row,Int_t col)
+Float_t AliCalorimeter::GetOffset(Int_t row,Int_t col) const
 {
 // Provide the offset value of a certain module.
 // See the memberfunction GetSignal() for a definition of the offset value.
@@ -1119,7 +1119,7 @@ Float_t AliCalorimeter::GetOffset(Int_t row,Int_t col)
  return offset;
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliCalorimeter::GetPosition(Int_t row,Int_t col,Float_t* vec,TString f)
+void AliCalorimeter::GetPosition(Int_t row,Int_t col,Float_t* vec,TString f) const
 {
 // Return the position in user coordinates for a certain calorimeter module
  vec[0]=0;
@@ -1130,7 +1130,7 @@ void AliCalorimeter::GetPosition(Int_t row,Int_t col,Float_t* vec,TString f)
  if (p) p->GetVector(vec,f);
 }
 ///////////////////////////////////////////////////////////////////////////
-AliPosition* AliCalorimeter::GetPosition(Int_t row,Int_t col)
+AliPosition* AliCalorimeter::GetPosition(Int_t row,Int_t col) const
 {
 // Access to the position of a certain calorimeter module.
 
@@ -1153,7 +1153,7 @@ AliPosition* AliCalorimeter::GetPosition(Int_t row,Int_t col)
  return m;
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliCalorimeter::GetClusteredSignal(Int_t row,Int_t col)
+Float_t AliCalorimeter::GetClusteredSignal(Int_t row,Int_t col) const
 {
 // Provide the module signal after clustering.
 
@@ -1174,7 +1174,7 @@ Float_t AliCalorimeter::GetClusteredSignal(Int_t row,Int_t col)
  return sig;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalorimeter::GetNsignals()
+Int_t AliCalorimeter::GetNsignals() const
 {
 // Provide the number of modules that contain a signal
 // Note : The number of modules marked 'dead' but which had a signal
@@ -1446,7 +1446,7 @@ void AliCalorimeter::AddRing(Int_t row, Int_t col, Int_t n)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalorimeter::GetNclusters()
+Int_t AliCalorimeter::GetNclusters() const
 {
 // Provide the number of clusters
  Int_t nclu=0;
@@ -1454,7 +1454,7 @@ Int_t AliCalorimeter::GetNclusters()
  return nclu;
 }
 ///////////////////////////////////////////////////////////////////////////
-AliCalcluster* AliCalorimeter::GetCluster(Int_t j)
+AliCalcluster* AliCalorimeter::GetCluster(Int_t j) const
 {
 // Provide cluster number j
 // Note : j=1 denotes the first cluster
@@ -1473,7 +1473,7 @@ AliCalcluster* AliCalorimeter::GetCluster(Int_t j)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-AliCalmodule* AliCalorimeter::GetModule(Int_t j)
+AliCalmodule* AliCalorimeter::GetModule(Int_t j) const
 {
 // Provide 'fired' module number j
 // Note : j=1 denotes the first 'fired' module
@@ -1492,7 +1492,7 @@ AliCalmodule* AliCalorimeter::GetModule(Int_t j)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-AliCalmodule* AliCalorimeter::GetModule(Int_t row,Int_t col)
+AliCalmodule* AliCalorimeter::GetModule(Int_t row,Int_t col) const
 {
 // Provide access to module (row,col).
 // Note : first module is at (1,1).
@@ -1634,7 +1634,7 @@ void AliCalorimeter::AddVetoSignal(AliSignal& s)
  fVetos->Add(sx);
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalorimeter::GetNvetos()
+Int_t AliCalorimeter::GetNvetos() const
 {
 // Provide the number of veto signals associated to the calorimeter.
  Int_t nvetos=0;
@@ -1642,7 +1642,7 @@ Int_t AliCalorimeter::GetNvetos()
  return nvetos;
 }
 ///////////////////////////////////////////////////////////////////////////
-AliSignal* AliCalorimeter::GetVetoSignal(Int_t i)
+AliSignal* AliCalorimeter::GetVetoSignal(Int_t i) const
 {
 // Provide access to the i-th veto signal of this calorimeter
 // Note : The first hit corresponds to i=1
@@ -1674,14 +1674,14 @@ void AliCalorimeter::SetSwapMode(Int_t swap)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCalorimeter::GetSwapMode()
+Int_t AliCalorimeter::GetSwapMode() const
 {
 // Provide the swap mode for the module and position matrices.
 // For further details see the documentation of AliObjMatrix.
  return fSwap;
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliCalorimeter::Clone(const char* name)
+TObject* AliCalorimeter::Clone(const char* name) const
 {
 // Make a deep copy of the current object and provide the pointer to the copy.
 // This memberfunction enables automatic creation of new objects of the
index 639df1ceeda1c004eb613088ec229d5a666e0670..0b0daef3a7e10ae3eedac88974ecafbd69eef2df 100644 (file)
 class AliCalorimeter : public TNamed
 {
  public:
-  AliCalorimeter();                                // Default constructor
-  AliCalorimeter(Int_t nrow,Int_t ncol);           // Create a calorimeter matrix
-  virtual ~AliCalorimeter();                       // Destructor
-  AliCalorimeter(AliCalorimeter& c);               // Copy constructor
-  virtual TObject* Clone(const char* name="");     // Make a deep copy and provide pointer of the copy
-  Int_t GetNrows();                                // Return number of rows of the matrix
-  Int_t GetNcolumns();                             // Return number of columns of the matrix
-  void SetSignal(Int_t row,Int_t col,Float_t s);   // Set signal for a certain module
-  void AddSignal(Int_t row,Int_t col,Float_t s);   // Add signal to a certain module
-  void AddSignal(AliCalmodule* m);                 // Add module signal to current calorimeter
-  void Reset(Int_t row,Int_t col);                 // Reset signal for a certain module
-  void Reset(Int_t mode=0);                        // Reset the complete calorimeter
-  Float_t GetSignal(Int_t row,Int_t col,Int_t mode=0); // Provide signal of a certain module
-  Int_t GetNsignals();                             // Return number of modules with a signal
-  void Group(Int_t n=1,Int_t mode=1);              // Group modules into clusters (n rings)
-  Int_t GetNclusters();                            // Return number of clusters
-  Float_t GetClusteredSignal(Int_t row,Int_t col); // Provide module signal after clustering
-  AliCalcluster* GetCluster(Int_t j);              // Access to cluster number j
-  AliCalmodule* GetModule(Int_t j);                // Access to 'fired' module number j
-  AliCalmodule* GetModule(Int_t row,Int_t col);    // Access to module at (row,col)
-  void SetEdgeOn(Int_t row,Int_t col);             // Indicate module as 'edge module'
-  void SetEdgeOff(Int_t row,Int_t col);            // Indicate module as 'non-edge module'
-  Int_t GetEdgeValue(Int_t row,Int_t col);         // Provide the edge flag of a module
-  void SetDead(Int_t row,Int_t col);               // Indicate module as 'dead module'
-  void SetAlive(Int_t row,Int_t col);              // Indicate module as 'active module'
-  Int_t GetDeadValue(Int_t row,Int_t col);         // Provide the dead flag of a module
-  void SetGain(Int_t row,Int_t col,Float_t g);     // Set the gain value for a module
-  void SetOffset(Int_t row,Int_t col,Float_t o);   // Set the offset value for a module
-  Float_t GetGain(Int_t row,Int_t col);            // Provide the gain value of a module
-  Int_t GetGainFlag(Int_t row,Int_t col);          // Provide the gain flag value of a module
-  Float_t GetOffset(Int_t row,Int_t col);          // Provide the offset value of a module
-  Int_t GetOffsetFlag(Int_t row,Int_t col);        // Provide the offset flag value of a module
+  AliCalorimeter();                                      // Default constructor
+  AliCalorimeter(Int_t nrow,Int_t ncol);                 // Create a calorimeter matrix
+  virtual ~AliCalorimeter();                             // Destructor
+  AliCalorimeter(const AliCalorimeter& c);               // Copy constructor
+  virtual TObject* Clone(const char* name="") const;     // Make a deep copy and provide pointer of the copy
+  Int_t GetNrows() const;                                // Return number of rows of the matrix
+  Int_t GetNcolumns() const;                             // Return number of columns of the matrix
+  void SetSignal(Int_t row,Int_t col,Float_t s);         // Set signal for a certain module
+  void AddSignal(Int_t row,Int_t col,Float_t s);         // Add signal to a certain module
+  void AddSignal(AliCalmodule* m);                       // Add module signal to current calorimeter
+  void Reset(Int_t row,Int_t col);                       // Reset signal for a certain module
+  void Reset(Int_t mode=0);                              // Reset the complete calorimeter
+  Float_t GetSignal(Int_t row,Int_t col,Int_t mode=0) const; // Provide signal of a certain module
+  Int_t GetNsignals() const;                             // Return number of modules with a signal
+  void Group(Int_t n=1,Int_t mode=1);                    // Group modules into clusters (n rings)
+  Int_t GetNclusters() const;                            // Return number of clusters
+  Float_t GetClusteredSignal(Int_t row,Int_t col) const; // Provide module signal after clustering
+  AliCalcluster* GetCluster(Int_t j) const;              // Access to cluster number j
+  AliCalmodule* GetModule(Int_t j) const;                // Access to 'fired' module number j
+  AliCalmodule* GetModule(Int_t row,Int_t col) const;    // Access to module at (row,col)
+  void SetEdgeOn(Int_t row,Int_t col);                   // Indicate module as 'edge module'
+  void SetEdgeOff(Int_t row,Int_t col);                  // Indicate module as 'non-edge module'
+  Int_t GetEdgeValue(Int_t row,Int_t col) const;         // Provide the edge flag of a module
+  void SetDead(Int_t row,Int_t col);                     // Indicate module as 'dead module'
+  void SetAlive(Int_t row,Int_t col);                    // Indicate module as 'active module'
+  Int_t GetDeadValue(Int_t row,Int_t col) const;         // Provide the dead flag of a module
+  void SetGain(Int_t row,Int_t col,Float_t g);           // Set the gain value for a module
+  void SetOffset(Int_t row,Int_t col,Float_t o);         // Set the offset value for a module
+  Float_t GetGain(Int_t row,Int_t col) const;            // Provide the gain value of a module
+  Int_t GetGainFlag(Int_t row,Int_t col) const;          // Provide the gain flag value of a module
+  Float_t GetOffset(Int_t row,Int_t col) const;          // Provide the offset value of a module
+  Int_t GetOffsetFlag(Int_t row,Int_t col) const;        // Provide the offset flag value of a module
   void SetPosition(Int_t row,Int_t col,Float_t* r,TString f); // Set module position
-  void SetPosition(Int_t row,Int_t col,Ali3Vector& r); // Set module position
-  void GetPosition(Int_t row,Int_t col,Float_t* r,TString f); // Return module position
-  AliPosition* GetPosition(Int_t row,Int_t col);   // Access to module position
-  TH2F* DrawModules(Float_t thresh=0.,Int_t mode=0); // Lego plot of module (corrected) signals above threshold
-  TH2F* DrawClusters(Float_t thresh=0.);           // Lego plot of cluster signals above threshold
-  void AddVetoSignal(AliSignal& s);                // Associate (extrapolated) signal
+  void SetPosition(Int_t row,Int_t col,Ali3Vector& r);   // Set module position
+  void GetPosition(Int_t row,Int_t col,Float_t* r,TString f) const; // Return module position
+  AliPosition* GetPosition(Int_t row,Int_t col) const;   // Access to module position
+  TH2F* DrawModules(Float_t thresh=0.,Int_t mode=0);     // Lego plot of module (corr.) signals above threshold
+  TH2F* DrawClusters(Float_t thresh=0.);                 // Lego plot of cluster signals above threshold
+  void AddVetoSignal(AliSignal& s);                      // Associate (extrapolated) signal
   void AddVetoSignal(AliSignal* s) { AddVetoSignal(*s); }
-  AliSignal* GetVetoSignal(Int_t j);               // Access to veto signal number j
-  Int_t GetNvetos();                               // Provide the number of veto signals
-  void SetSwapMode(Int_t swap=1);                  // Set the swapmode for the storage of the matrices
-  Int_t GetSwapMode();                             // Provide the swapmode for the storage of the matrices
+  AliSignal* GetVetoSignal(Int_t j) const;               // Access to veto signal number j
+  Int_t GetNvetos() const;                               // Provide the number of veto signals
+  void SetSwapMode(Int_t swap=1);                        // Set the swapmode for the storage of the matrices
+  Int_t GetSwapMode() const;                             // Provide the swapmode for the storage of the matrices
  
  protected:
   Int_t fNrows;                              // The number of rows
@@ -83,6 +83,6 @@ class AliCalorimeter : public TNamed
   TObjArray* fAttributes;                    //! Matrix with module attributes (e.g. gain, offset etc...)
   AliObjMatrix* fPositions;                  //! The matrix of module position pointers
  
- ClassDef(AliCalorimeter,7) // Description of a modular calorimeter system.
+ ClassDef(AliCalorimeter,8) // Description of a modular calorimeter system.
 };
 #endif
index 033aa86303b1ff3df72386a9d5c1f1f0bcfa0d60..20d25e7fd31254e7d775bfb2e72984f686f2c878 100644 (file)
@@ -13,7 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-// $Id: AliCollider.cxx,v 1.10 2004/02/13 11:08:16 nick Exp $
+// $Id: AliCollider.cxx,v 1.11 2004/03/12 09:18:24 nick Exp $
 
 ///////////////////////////////////////////////////////////////////////////
 // Class AliCollider
 //
 //
 //--- Author: Nick van Eijndhoven 22-nov-2002 Utrecht University
-//- Modified: NvE $Date: 2004/02/13 11:08:16 $ Utrecht University
+//- Modified: NvE $Date: 2004/03/12 09:18:24 $ Utrecht University
 ///////////////////////////////////////////////////////////////////////////
 
 #include "AliCollider.h"
@@ -258,7 +258,7 @@ void AliCollider::SetVertexMode(Int_t mode)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCollider::GetVertexMode()
+Int_t AliCollider::GetVertexMode() const
 {
 // Provide the current mode for vertex structure creation.
  return fVertexmode;
@@ -273,7 +273,7 @@ void AliCollider::SetResolution(Double_t res)
  fResolution=fabs(res);
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliCollider::GetResolution()
+Double_t AliCollider::GetResolution() const
 {
 // Provide the current resolution (in cm) for resolving (sec.) vertices.
  return fResolution;
@@ -286,7 +286,7 @@ void AliCollider::SetRunNumber(Int_t run)
  fRunnum=run;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCollider::GetRunNumber()
+Int_t AliCollider::GetRunNumber() const
 {
 // Provide the user defined run number.
  return fRunnum;
@@ -299,7 +299,7 @@ void AliCollider::SetPrintFreq(Int_t n)
  fPrintfreq=n;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCollider::GetPrintFreq()
+Int_t AliCollider::GetPrintFreq() const
 {
 // Provide the user selected print frequency.
  return fPrintfreq;
@@ -875,7 +875,7 @@ void AliCollider::MakeEvent(Int_t npt,Int_t mlist,Int_t medit)
  if (fOutTree && fSelect) fOutTree->Fill();
 }
 ///////////////////////////////////////////////////////////////////////////
-AliEvent* AliCollider::GetEvent(Int_t select)
+AliEvent* AliCollider::GetEvent(Int_t select) const
 {
 // Provide pointer to the generated event structure.
 //
@@ -1010,7 +1010,7 @@ void AliCollider::SelectEvent(Int_t id)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliCollider::GetSelectionFlag()
+Int_t AliCollider::GetSelectionFlag() const
 {
 // Return the value of the selection flag for the total event.
 // When the event passed the selection criteria as specified via
@@ -1063,7 +1063,7 @@ void AliCollider::SetSpectatorPmin(Float_t pmin)
  fSpecpmin=pmin;
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliCollider::GetSpectatorPmin()
+Float_t AliCollider::GetSpectatorPmin() const
 {
 // Provide the minimal spectator momentum in GeV/c.
  return fSpecpmin;
index a0f8856e0daed61fdf30f54998bb518d88c6cfbd..58b4024f7dc50c80bc0db57cdce456e18e5d9e7b 100644 (file)
@@ -3,7 +3,7 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-// $Id: AliCollider.h,v 1.7 2004/01/12 08:23:22 nick Exp $
+// $Id: AliCollider.h,v 1.8 2004/02/13 11:08:16 nick Exp $
 
 #include "TPythia6.h"
 #include "TString.h"
@@ -21,23 +21,23 @@ class AliCollider : public TPythia6
   virtual ~AliCollider();                               // Default destructor
   void SetOutputFile(TString name);                     // Initialise the ROOT output data file
   void SetVertexMode(Int_t mode);                       // Select mode for (sec.) vertex structure creation
-  Int_t GetVertexMode();                                // Provide vertex structure creation mode
+  Int_t GetVertexMode() const;                          // Provide vertex structure creation mode
   void SetResolution(Double_t res);                     // Set resolution (in cm) for resolving (sec.) vertices
-  Double_t GetResolution();                             // Provide (sec.) vertex resolving resolution (in cm)
+  Double_t GetResolution() const;                       // Provide (sec.) vertex resolving resolution (in cm)
   void SetRunNumber(Int_t run);                         // Set user defined run number
-  Int_t GetRunNumber();                                 // Provide the user defined run number
+  Int_t GetRunNumber() const;                           // Provide the user defined run number
   void SetPrintFreq(Int_t n);                           // Set print frequency for every 'n' events
-  Int_t GetPrintFreq();                                 // Provide the print frequency
+  Int_t GetPrintFreq() const;                           // Provide the print frequency
   void Init(char* frame,char* beam,char* target,Float_t win); // Standard Pythia initialisation
   void Init(char* frame,Int_t zp,Int_t ap,Int_t zt,Int_t at,Float_t win); // Nucl-Nucl initialisation
   void SetStable(Int_t id,Int_t mode=1);                // Declare a certain particle as stable or not
   void SelectEvent(Int_t id);                           // Select only events containing specified particles
-  Int_t GetSelectionFlag();                             // Return the selection flag for this event
+  Int_t GetSelectionFlag() const;                       // Return the selection flag for this event
   void MakeEvent(Int_t npt=0,Int_t mlist=-1,Int_t medit=1);// Generate a single event with npt participant nucleons
   void EndRun();                                        // Properly close all buffers and output file
-  AliEvent* GetEvent(Int_t select=0);                   // Provide pointer to the generated event structure
+  AliEvent* GetEvent(Int_t select=0) const;             // Provide pointer to the generated event structure
   void SetSpectatorPmin(Float_t pmin);                  // Set minimal momentum for spectator track to be stored
-  Float_t GetSpectatorPmin();                           // Provide the minimal momentum for spectator tracks
+  Float_t GetSpectatorPmin() const;                     // Provide the minimal momentum for spectator tracks
 
  protected:
   Int_t fVertexmode;    // The vertex structure creation mode
@@ -70,6 +70,6 @@ class AliCollider : public TPythia6
   void GetFractions(Float_t zp,Float_t ap,Float_t zt,Float_t at); // Determine various N-N collision fractions
   TString GetPyname(Int_t kf); // Provide the correctly truncated Pythia particle name for PDG code kf  
 
- ClassDef(AliCollider,7) // Pythia based universal physics event generator
+ ClassDef(AliCollider,8) // Pythia based universal physics event generator
 };
 #endif
index 54ca223f729144fd365195138d70f9faf36825ff..cebee3dc4fc7f2132173b2dfdfb87369668f59e1 100644 (file)
@@ -13,7 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-// $Id: AliEvent.cxx,v 1.18 2004/01/12 08:23:22 nick Exp $
+// $Id: AliEvent.cxx,v 1.20 2004/02/06 15:25:07 nick Exp $
 
 ///////////////////////////////////////////////////////////////////////////
 // Class AliEvent
 // Note : All quantities are in GeV, GeV/c or GeV/c**2
 //
 //--- Author: Nick van Eijndhoven 27-may-2001 UU-SAP Utrecht
-//- Modified: NvE $Date: 2004/01/12 08:23:22 $ UU-SAP Utrecht
+//- Modified: NvE $Date: 2004/02/06 15:25:07 $ UU-SAP Utrecht
 ///////////////////////////////////////////////////////////////////////////
 
 #include "AliEvent.h"
@@ -261,7 +261,7 @@ AliEvent::~AliEvent()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-AliEvent::AliEvent(AliEvent& evt) : AliVertex(evt)
+AliEvent::AliEvent(const AliEvent& evt) : AliVertex(evt)
 {
 // Copy constructor.
  fDaytime=evt.fDaytime;
@@ -390,19 +390,19 @@ void AliEvent::SetEventNumber(Int_t evt)
  fEvent=evt;
 }
 ///////////////////////////////////////////////////////////////////////////
-TTimeStamp AliEvent::GetDayTime()
+TTimeStamp AliEvent::GetDayTime() const
 {
 // Provide the date and time stamp for this event
  return fDaytime;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliEvent::GetRunNumber()
+Int_t AliEvent::GetRunNumber() const
 {
 // Provide the run number for this event
  return fRun;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliEvent::GetEventNumber()
+Int_t AliEvent::GetEventNumber() const
 {
 // Provide the event number for this event
  return fEvent;
@@ -418,25 +418,25 @@ void AliEvent::SetProjectile(Int_t a,Int_t z,Double_t pnuc,Int_t id)
  fIdProj=id;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliEvent::GetProjectileA()
+Int_t AliEvent::GetProjectileA() const
 {
 // Provide the projectile A value.
  return fAproj;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliEvent::GetProjectileZ()
+Int_t AliEvent::GetProjectileZ() const
 {
 // Provide the projectile Z value.
  return fZproj;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliEvent::GetProjectilePnuc()
+Double_t AliEvent::GetProjectilePnuc() const
 {
 // Provide the projectile momentum value per nucleon.
  return fPnucProj;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliEvent::GetProjectileId()
+Int_t AliEvent::GetProjectileId() const
 {
 // Provide the user defined particle ID of the projectile.
  return fIdProj;
@@ -452,31 +452,31 @@ void AliEvent::SetTarget(Int_t a,Int_t z,Double_t pnuc,Int_t id)
  fIdTarg=id;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliEvent::GetTargetA()
+Int_t AliEvent::GetTargetA() const
 {
 // Provide the target A value.
  return fAtarg;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliEvent::GetTargetZ()
+Int_t AliEvent::GetTargetZ() const
 {
 // Provide the target Z value.
  return fZtarg;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliEvent::GetTargetPnuc()
+Double_t AliEvent::GetTargetPnuc() const
 {
 // Provide the target momentum value per nucleon.
  return fPnucTarg;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliEvent::GetTargetId()
+Int_t AliEvent::GetTargetId() const
 {
 // Provide the user defined particle ID of the target.
  return fIdTarg;
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliEvent::HeaderData()
+void AliEvent::HeaderData() const
 {
 // Provide event header information
  const char* name=GetName();
@@ -500,7 +500,7 @@ void AliEvent::Data(TString f)
  AliVertex::Data(f);
 } 
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliEvent::GetNdevices()
+Int_t AliEvent::GetNdevices() const
 {
 // Provide the number of stored devices
  Int_t ndevs=0;
@@ -579,7 +579,7 @@ void AliEvent::SetDevCopy(Int_t j)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliEvent::GetDevCopy()
+Int_t AliEvent::GetDevCopy() const
 {
 // Provide value of the DevCopy mode.
 // 0 ==> No private copies are made; pointers of original devices are stored.
@@ -598,7 +598,7 @@ Int_t AliEvent::GetDevCopy()
  return fDevCopy;
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliEvent::GetDevice(Int_t i)
+TObject* AliEvent::GetDevice(Int_t i) const
 {
 // Return the i-th device of this event.
 // The first device corresponds to i=1.
@@ -623,7 +623,7 @@ TObject* AliEvent::GetDevice(Int_t i)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliEvent::GetDevice(TString name)
+TObject* AliEvent::GetDevice(TString name) const
 {
 // Return the device with name tag "name"
  if (!fDevices)
@@ -648,7 +648,7 @@ TObject* AliEvent::GetDevice(TString name)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliEvent::ShowDevices()
+void AliEvent::ShowDevices() const
 {
 // Provide an overview of the available devices.
  Int_t ndevs=GetNdevices();
@@ -672,7 +672,7 @@ void AliEvent::ShowDevices()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliEvent::Clone(const char* name)
+TObject* AliEvent::Clone(const char* name) const
 {
 // Make a deep copy of the current object and provide the pointer to the copy.
 // This memberfunction enables automatic creation of new objects of the
index 0264d7bfdbf6a98c2e843bafa73ac779f61ef346..e05b98d19e39afd13bffaabc38111aa957c1b9b8 100644 (file)
@@ -3,7 +3,7 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-// $Id: AliEvent.h,v 1.13 2003/12/18 09:28:06 nick Exp $
+// $Id: AliEvent.h,v 1.15 2004/02/06 15:25:07 nick Exp $
 
 #include <math.h>
  
@@ -20,37 +20,37 @@ class AliEvent : public AliVertex
   AliEvent();                             // Default constructor
   AliEvent(Int_t n);                      // Create an event to hold initially n tracks
   virtual ~AliEvent();                    // Default destructor
-  AliEvent(AliEvent& evt);                // Copy constructor
-  virtual TObject* Clone(const char* name=""); // Make a deep copy and provide its pointer
+  AliEvent(const AliEvent& evt);          // Copy constructor
+  virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer
   virtual void SetOwner(Bool_t own=kTRUE);// Set ownership of all added objects
   void SetDayTime(TTimeStamp& stamp);     // Set the date and time stamp exactly as specified (1 ns accuracy)
   void SetDayTime(TDatime& stamp);        // Set date and time stamp interpreted as local time (1 s accuracy)
   void SetRunNumber(Int_t run);           // Set the run number
   void SetEventNumber(Int_t evt);         // Set the event number
   void SetProjectile(Int_t a,Int_t z,Double_t pnuc,Int_t id=0); // Set projectile A, Z, p per nucleon and id
-  Int_t GetProjectileA();                 // Provide A value of the projectile
-  Int_t GetProjectileZ();                 // Provide Z value of the projectile
-  Double_t GetProjectilePnuc();           // Provide the projectile momentum value per nucleon
-  Int_t GetProjectileId();                // Provide the user defined particle ID of the projectile
+  Int_t GetProjectileA() const;           // Provide A value of the projectile
+  Int_t GetProjectileZ() const;           // Provide Z value of the projectile
+  Double_t GetProjectilePnuc() const;     // Provide the projectile momentum value per nucleon
+  Int_t GetProjectileId() const;          // Provide the user defined particle ID of the projectile
   void SetTarget(Int_t a,Int_t z,Double_t pnuc,Int_t id=0); // Set target A, Z, p per nucleon and id
-  Int_t GetTargetA();                     // Provide A value of the target
-  Int_t GetTargetZ();                     // Provide Z value of the target
-  Double_t GetTargetPnuc();               // Provide the target momentum value per nucleon
-  Int_t GetTargetId();                    // Provide the user defined particle ID of the target
+  Int_t GetTargetA() const;               // Provide A value of the target
+  Int_t GetTargetZ() const;               // Provide Z value of the target
+  Double_t GetTargetPnuc() const;         // Provide the target momentum value per nucleon
+  Int_t GetTargetId() const;              // Provide the user defined particle ID of the target
   void Reset();                           // Reset all values
-  TTimeStamp GetDayTime();                // Provide the date and time stamp
-  Int_t GetRunNumber();                   // Provide the run number
-  Int_t GetEventNumber();                 // Provide the event number
-  virtual void HeaderData();              // Print the event header information
+  TTimeStamp GetDayTime() const;          // Provide the date and time stamp
+  Int_t GetRunNumber() const;             // Provide the run number
+  Int_t GetEventNumber() const;           // Provide the event number
+  virtual void HeaderData() const;        // Print the event header information
   virtual void Data(TString f="car");     // Print the event info within coordinate frame f
   void SetDevCopy(Int_t j);               // (De)activate creation of private copies of the devices
-  Int_t GetDevCopy();                     // Provide DevCopy flag value      
+  Int_t GetDevCopy() const;               // Provide DevCopy flag value      
   void AddDevice(TObject& d);             // Add a device to the event
   void AddDevice(TObject* d) { AddDevice(*d); }
-  Int_t GetNdevices();                    // Provide the number of devices
-  void ShowDevices();                     // Provide on overview of the available devices
-  TObject* GetDevice(Int_t i);            // Provide i-th device of the event
-  TObject* GetDevice(TString name);       // Provide device with name "name"
+  Int_t GetNdevices() const;              // Provide the number of devices
+  void ShowDevices() const;               // Provide on overview of the available devices
+  TObject* GetDevice(Int_t i) const;      // Provide i-th device of the event
+  TObject* GetDevice(TString name) const; // Provide device with name "name"
 
  protected:
   TTimeStamp fDaytime;      // The date and time stamp
@@ -67,6 +67,6 @@ class AliEvent : public AliVertex
   TObjArray* fDevices;      // Array to hold the pointers to the various devices
   Int_t fDevCopy;           // Flag to denote creation of private copies of the devices
 
- ClassDef(AliEvent,12) // Creation and investigation of an Alice physics event.
+ ClassDef(AliEvent,13) // Creation and investigation of an Alice physics event.
 };
 #endif
index b044dbf7672f3cceda3066976fa0b0135e8d7230..80149b2acb8a348b53d8865a78f1726caf15ab07 100644 (file)
@@ -158,19 +158,19 @@ void AliInvmass::SetPhiSwitch(Int_t i)
  if (i==0) fNewphi=0;
 }
 ////////////////////////////////////////////////////////////////////////////////
-Int_t AliInvmass::GetStorageMode()
+Int_t AliInvmass::GetStorageMode() const
 {
 // Provide mode of storage for the result arrays for inv. mass and comb. background
  return fMode;
 }
 ////////////////////////////////////////////////////////////////////////////////
-Int_t AliInvmass::GetThetaSwitch()
+Int_t AliInvmass::GetThetaSwitch() const
 {
 // Provide the theta switching flag
  return fNewtheta;
 }
 ////////////////////////////////////////////////////////////////////////////////
-Int_t AliInvmass::GetPhiSwitch()
+Int_t AliInvmass::GetPhiSwitch() const
 {
 // Provide the phi switching flag
  return fNewphi;
index c3be81bf9922e21d8f8f13186a62dd1a6ba33ba9..f3d1dca61af811da20d8d0e272a860bbad3900ec 100644 (file)
@@ -21,9 +21,9 @@ class AliInvmass : public TObject
   void SetStorageMode(Int_t m);                    // Set storage mode (1=single, 2=multiple)
   void SetThetaSwitch(Int_t i=1);                  // Enable (1/0) new theta for comb. bkg. reco.
   void SetPhiSwitch(Int_t i=1);                    // Enable (1/0) new phi for comb. bkg. reco.
-  Int_t GetStorageMode();                          // Provide storage mode
-  Int_t GetThetaSwitch();                          // Provide theta switch flag
-  Int_t GetPhiSwitch();                            // Provide phi switch flag
+  Int_t GetStorageMode() const;                    // Provide storage mode
+  Int_t GetThetaSwitch() const;                    // Provide theta switch flag
+  Int_t GetPhiSwitch() const;                      // Provide phi switch flag
   TObjArray* Invmass(TObjArray* a1,TObjArray* a2); // Two-particle inv. mass reco.
   TObjArray* CombBkg(TObjArray* a1,TObjArray* a2); // Two-particle comb. background reco.
 
@@ -40,6 +40,6 @@ class AliInvmass : public TObject
  private:
   void Combine(TObjArray* a1,TObjArray* a2); // Make two-particle combinations
 
- ClassDef(AliInvmass,1) // Construction of invariant mass and combinatorial background.
+ ClassDef(AliInvmass,2) // Construction of invariant mass and combinatorial background.
 };
 #endif
index 49538bd103b63ddaa97780586c813ce27663db9c..abb48bdfb5421c7a57e981895af08b99f2315163 100644 (file)
@@ -170,7 +170,7 @@ void AliJet::SetOwner(Bool_t own)
  fTrackCopy=mode;
 }
 ///////////////////////////////////////////////////////////////////////////
-AliJet::AliJet(AliJet& j) : TNamed(j),Ali4Vector(j)
+AliJet::AliJet(const AliJet& j) : TNamed(j),Ali4Vector(j)
 {
 // Copy constructor
  fNtinit=j.fNtinit;
@@ -351,7 +351,7 @@ void AliJet::ListAll(TString f)
  }
 } 
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliJet::GetNtracks()
+Int_t AliJet::GetNtracks() const
 {
 // Return the current number of tracks of this jet
  return fNtrk;
@@ -373,7 +373,7 @@ Double_t AliJet::GetMomentum()
  return norm;
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector AliJet::Get3Momentum()
+Ali3Vector AliJet::Get3Momentum() const
 {
 // Return the the total jet 3-momentum
  Ali3Vector p=Get3Vector();
@@ -394,13 +394,13 @@ Double_t AliJet::GetInvmass()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliJet::GetCharge()
+Float_t AliJet::GetCharge() const
 {
 // Return the total charge of the jet
  return fQ;
 }
 ///////////////////////////////////////////////////////////////////////////
-AliTrack* AliJet::GetTrack(Int_t i)
+AliTrack* AliJet::GetTrack(Int_t i) const
 {
 // Return the i-th track of this jet
  if (!fTracks)
@@ -423,7 +423,7 @@ AliTrack* AliJet::GetTrack(Int_t i)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-AliTrack* AliJet::GetIdTrack(Int_t id)
+AliTrack* AliJet::GetIdTrack(Int_t id) const
 {
 // Return the track with user identifier "id" of this jet
  AliTrack* tx=0;
@@ -566,7 +566,7 @@ void AliJet::SetTrackCopy(Int_t j)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliJet::GetTrackCopy()
+Int_t AliJet::GetTrackCopy() const
 {
 // Provide value of the TrackCopy mode.
 // 0 ==> No private copies are made; pointers of original tracks are stored.
@@ -580,13 +580,13 @@ void AliJet::SetId(Int_t id)
  fUserId=id;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliJet::GetId()
+Int_t AliJet::GetId() const
 {
 // Provide the user defined identifier of this jet.
  return fUserId;
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliJet::Clone(const char* name)
+TObject* AliJet::Clone(const char* name) const
 {
 // Make a deep copy of the current object and provide the pointer to the copy.
 // This memberfunction enables automatic creation of new objects of the
index da0e1bfacfe811b1aac495e269c190e55d387c0f..3b5bec2e8062784ac437fbdebc2ed5509baf095a 100644 (file)
@@ -19,8 +19,8 @@ class AliJet : public TNamed,public Ali4Vector
   AliJet();                                // Default constructor
   AliJet(Int_t n);                         // Create a Jet to hold initially n Tracks
   virtual ~AliJet();                       // Default destructor
-  AliJet(AliJet& j);                       // Copy constructor
-  virtual TObject* Clone(const char* name=""); // Make a deep copy and provide its pointer
+  AliJet(const AliJet& j);                 // Copy constructor
+  virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer
   virtual void SetOwner(Bool_t own=kTRUE); // Set ownership of all added objects
   virtual void Reset();                    // Reset all values
   void AddTrack(AliTrack& t);              // Add a track to the jet
@@ -30,12 +30,12 @@ class AliJet : public TNamed,public Ali4Vector
   virtual void ListAll(TString f="car");   // Print jet prim. and decay track information for coord. frame f
   Double_t GetEnergy();                    // Provide the total jet energy
   Double_t GetMomentum();                  // Provide the value of the total jet 3-momentum
-  Ali3Vector Get3Momentum();               // Provide the total jet 3-momentum
+  Ali3Vector Get3Momentum() const;         // Provide the total jet 3-momentum
   Double_t GetInvmass();                   // Provide the invariant mass  
-  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"
+  Float_t GetCharge() const;               // Provide the total charge of the jet
+  Int_t GetNtracks() const;                // Return the number of tracks in the jet
+  AliTrack* GetTrack(Int_t i) const;       // Provide i-th track of the jet (1=first track)
+  AliTrack* GetIdTrack(Int_t id) const;    // 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
@@ -43,9 +43,9 @@ class AliJet : public TNamed,public Ali4Vector
   Double_t GetMt();                        // Provide trans. mass 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      
+  Int_t GetTrackCopy() const;              // Provide TrackCopy flag value      
   void SetId(Int_t id);                    // Set the user defined identifier
-  Int_t GetId();                           // Provide the user defined identifier
+  Int_t GetId() const;                     // Provide the user defined identifier
 
  protected:
   void Init();                           // Initialisation of pointers etc...
@@ -60,6 +60,6 @@ class AliJet : public TNamed,public Ali4Vector
   Int_t fTrackCopy;                      // Flag to denote creation of private copies in fTracks
   Int_t fUserId;                         // The user defined identifier
  
- ClassDef(AliJet,8) // Creation and investigation of a jet of particle tracks.
+ ClassDef(AliJet,9) // Creation and investigation of a jet of particle tracks.
 };
 #endif
index 0c5dca572f15212aca25e08e91115909cc0d72ab..5f5489fa51b7ef4ffe9b499b90fb9d75f62bbaad 100644 (file)
@@ -49,12 +49,12 @@ AliMath::~AliMath()
 // Destructor
 }
 ///////////////////////////////////////////////////////////////////////////
-AliMath::AliMath(AliMath& m) : TObject(m)
+AliMath::AliMath(const AliMath& m) : TObject(m)
 {
 // Copy constructor
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::Gamma(Double_t z)
+Double_t AliMath::Gamma(Double_t z) const
 {
 // Computation of gamma(z) for all z>0.
 //
@@ -75,7 +75,7 @@ Double_t AliMath::Gamma(Double_t z)
  return exp(v);
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::Gamma(Double_t a,Double_t x)
+Double_t AliMath::Gamma(Double_t a,Double_t x) const
 {
 // Computation of the incomplete gamma function P(a,x)
 //
@@ -106,7 +106,7 @@ Double_t AliMath::Gamma(Double_t a,Double_t x)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::LnGamma(Double_t z)
+Double_t AliMath::LnGamma(Double_t z) const
 {
 // Computation of ln[gamma(z)] for all z>0.
 //
@@ -149,7 +149,7 @@ Double_t AliMath::LnGamma(Double_t z)
  return v;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::GamSer(Double_t a,Double_t x)
+Double_t AliMath::GamSer(Double_t a,Double_t x) const
 {
 // Computation of the incomplete gamma function P(a,x)
 // via its series representation.
@@ -190,7 +190,7 @@ Double_t AliMath::GamSer(Double_t a,Double_t x)
  return v;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::GamCf(Double_t a,Double_t x)
+Double_t AliMath::GamCf(Double_t a,Double_t x) const
 {
 // Computation of the incomplete gamma function P(a,x)
 // via its continued fraction representation.
@@ -240,7 +240,7 @@ Double_t AliMath::GamCf(Double_t a,Double_t x)
  return (1.-v);
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::Erf(Double_t x)
+Double_t AliMath::Erf(Double_t x) const
 {
 // Computation of the error function erf(x).
 //
@@ -249,7 +249,7 @@ Double_t AliMath::Erf(Double_t x)
  return (1.-Erfc(x));
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::Erfc(Double_t x)
+Double_t AliMath::Erfc(Double_t x) const
 {
 // Computation of the complementary error function erfc(x).
 //
@@ -283,7 +283,7 @@ Double_t AliMath::Erfc(Double_t x)
  return v;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::Prob(Double_t chi2,Int_t ndf,Int_t mode)
+Double_t AliMath::Prob(Double_t chi2,Int_t ndf,Int_t mode) const
 {
 // Computation of the probability for a certain Chi-squared (chi2)
 // and number of degrees of freedom (ndf).
@@ -353,7 +353,7 @@ Double_t AliMath::Prob(Double_t chi2,Int_t ndf,Int_t mode)
  return v;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::BesselI0(Double_t x)
+Double_t AliMath::BesselI0(Double_t x) const
 {
 // Computation of the modified Bessel function I_0(x) for any real x.
 //
@@ -392,7 +392,7 @@ Double_t AliMath::BesselI0(Double_t x)
  return result;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::BesselK0(Double_t x)
+Double_t AliMath::BesselK0(Double_t x) const
 {
 // Computation of the modified Bessel function K_0(x) for positive real x.
 //
@@ -435,7 +435,7 @@ Double_t AliMath::BesselK0(Double_t x)
  return result;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::BesselI1(Double_t x)
+Double_t AliMath::BesselI1(Double_t x) const
 {
 // Computation of the modified Bessel function I_1(x) for any real x.
 //
@@ -475,7 +475,7 @@ Double_t AliMath::BesselI1(Double_t x)
  return result;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::BesselK1(Double_t x)
+Double_t AliMath::BesselK1(Double_t x) const
 {
 // Computation of the modified Bessel function K_1(x) for positive real x.
 //
@@ -518,7 +518,7 @@ Double_t AliMath::BesselK1(Double_t x)
  return result;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::BesselK(Int_t n,Double_t x)
+Double_t AliMath::BesselK(Int_t n,Double_t x) const
 {
 // Computation of the Integer Order Modified Bessel function K_n(x)
 // for n=0,1,2,... and positive real x.
@@ -556,7 +556,7 @@ Double_t AliMath::BesselK(Int_t n,Double_t x)
  return bk;
 }
 ///////////////////////////////////////////////////////////////////////////
-Double_t AliMath::BesselI(Int_t n,Double_t x)
+Double_t AliMath::BesselI(Int_t n,Double_t x) const
 {
 // Computation of the Integer Order Modified Bessel function I_n(x)
 // for n=0,1,2,... and any real x.
index 8c5b310fb0f94204a657b0a81f854c6b6fb4b62c..3ff93f4d4f50ddbf3f240c1ce27c3134f8b99895 100644 (file)
 class AliMath : public TObject
 {
  public:
-  AliMath();                                           // Default constructor
-  virtual ~AliMath();                                  // Destructor
-  AliMath(AliMath& m);                                 // Copy constructor
-  Double_t Gamma(Double_t z);                          // Standard gamma function Gamma(z)
-  Double_t Gamma(Double_t a,Double_t x);               // Incomplete gamma function P(a,x)
-  Double_t LnGamma(Double_t z);                        // Compute ln[Gamma(z)]
-  Double_t Erf(Double_t x);                            // Error function erf(x)
-  Double_t Erfc(Double_t x);                           // Complementary error function erfc(x)
-  Double_t Prob(Double_t chi2,Int_t ndf,Int_t mode=1); // Compute Chi-squared probability
-  Double_t BesselI(Int_t n,Double_t x);                // Compute integer order modified Bessel function I_n(x)
-  Double_t BesselK(Int_t n,Double_t x);                // Compute integer order modified Bessel function K_n(x)
+  AliMath();                                                 // Default constructor
+  virtual ~AliMath();                                        // Destructor
+  AliMath(const AliMath& m);                                 // Copy constructor
+  Double_t Gamma(Double_t z) const;                          // Standard gamma function Gamma(z)
+  Double_t Gamma(Double_t a,Double_t x) const;               // Incomplete gamma function P(a,x)
+  Double_t LnGamma(Double_t z) const;                        // Compute ln[Gamma(z)]
+  Double_t Erf(Double_t x) const;                            // Error function erf(x)
+  Double_t Erfc(Double_t x) const;                           // Complementary error function erfc(x)
+  Double_t Prob(Double_t chi2,Int_t ndf,Int_t mode=1) const; // Compute Chi-squared probability
+  Double_t BesselI(Int_t n,Double_t x) const;                // Compute integer order mod. Bessel function I_n(x)
+  Double_t BesselK(Int_t n,Double_t x) const;                // Compute integer order mod. Bessel function K_n(x)
  
  protected:
-  Double_t GamSer(Double_t a,Double_t x); // Compute P(a,x) via serial representation
-  Double_t GamCf(Double_t a,Double_t x);  // Compute P(a,x) via continued fractions
-  Double_t BesselI0(Double_t x);          // Compute modified Bessel function I_0(x)
-  Double_t BesselK0(Double_t x);          // Compute modified Bessel function K_0(x)
-  Double_t BesselI1(Double_t x);          // Compute modified Bessel function I_1(x)
-  Double_t BesselK1(Double_t x);          // Compute modified Bessel function K_1(x)
+  Double_t GamSer(Double_t a,Double_t x) const; // Compute P(a,x) via serial representation
+  Double_t GamCf(Double_t a,Double_t x) const;  // Compute P(a,x) via continued fractions
+  Double_t BesselI0(Double_t x) const;          // Compute modified Bessel function I_0(x)
+  Double_t BesselK0(Double_t x) const;          // Compute modified Bessel function K_0(x)
+  Double_t BesselI1(Double_t x) const;          // Compute modified Bessel function I_1(x)
+  Double_t BesselK1(Double_t x) const;          // Compute modified Bessel function K_1(x)
  
- ClassDef(AliMath,2) // Various mathematical tools for physics analysis.
+ ClassDef(AliMath,3) // Various mathematical tools for physics analysis.
  
 };
 #endif
index 87173c413a25da4083cc118af092e7b943bd6031..8a5332dcdaf68df39c159da7c40eb5ed937873ec 100644 (file)
@@ -159,7 +159,7 @@ void AliObjMatrix::SetOwner(Int_t own)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliObjMatrix::GetOwner()
+Int_t AliObjMatrix::GetOwner() const
 {
 // Provide the owner flag for the stored objects.
  return fOwn;
@@ -189,7 +189,7 @@ void AliObjMatrix::SetSwapMode(Int_t swap)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliObjMatrix::GetSwapMode()
+Int_t AliObjMatrix::GetSwapMode() const
 {
 // Provide the swap mode flag for this matrix.
  return fSwap;
@@ -369,7 +369,7 @@ void AliObjMatrix::RemoveObjects(TObject* obj,Int_t row,Int_t col)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliObjMatrix::GetObject(Int_t row,Int_t col)
+TObject* AliObjMatrix::GetObject(Int_t row,Int_t col) const
 {
 // Provide a pointer to the object stored at the matrix location (row,col).
 // In case no object was stored at the indicated location or the location
@@ -396,7 +396,7 @@ TObject* AliObjMatrix::GetObject(Int_t row,Int_t col)
  return obj;
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliObjMatrix::GetObject(Int_t j)
+TObject* AliObjMatrix::GetObject(Int_t j) const
 {
 // Provide a pointer to the j-th stored object.
 // In case the index j is invalid, a value 0 will be returned.
@@ -428,19 +428,19 @@ TObjArray* AliObjMatrix::GetObjects()
  return fObjects;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliObjMatrix::GetMaxRow()
+Int_t AliObjMatrix::GetMaxRow() const
 {
 // Provide the maximum row number index.
  return fMaxrow;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliObjMatrix::GetMaxColumn()
+Int_t AliObjMatrix::GetMaxColumn() const
 {
 // Provide the maximum column number index.
  return fMaxcol;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliObjMatrix::GetNobjects()
+Int_t AliObjMatrix::GetNobjects() const
 {
 // Provide the number of stored objects.
  Int_t nobj=0;
@@ -449,7 +449,7 @@ Int_t AliObjMatrix::GetNobjects()
  return nobj;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliObjMatrix::GetNrefs(TObject* obj)
+Int_t AliObjMatrix::GetNrefs(TObject* obj) const
 {
 // Provide the number of stored references to the specified object.
 // If obj=0 the total number of stored references for all objects is returned.
@@ -466,7 +466,7 @@ Int_t AliObjMatrix::GetNrefs(TObject* obj)
  return nrefs;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliObjMatrix::GetIndices(TObject* obj,TArrayI& rows,TArrayI& cols)
+Int_t AliObjMatrix::GetIndices(TObject* obj,TArrayI& rows,TArrayI& cols) const
 {
 // Provide the (row,col) indices of all the storage locations of the
 // specified object.
@@ -528,7 +528,7 @@ Int_t AliObjMatrix::GetIndices(TObject* obj,TArrayI& rows,TArrayI& cols)
  return nrefs;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliObjMatrix::GetIndices(TObject* obj,Int_t row,TArrayI& cols)
+Int_t AliObjMatrix::GetIndices(TObject* obj,Int_t row,TArrayI& cols) const
 {
 // Provide the column indices of all the storage locations of the
 // specified object in the specified row of the matrix.
@@ -629,7 +629,7 @@ Int_t AliObjMatrix::GetIndices(TObject* obj,Int_t row,TArrayI& cols)
  return jref;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliObjMatrix::GetIndices(TObject* obj,TArrayI& rows,Int_t col)
+Int_t AliObjMatrix::GetIndices(TObject* obj,TArrayI& rows,Int_t col) const
 {
 // Provide the row indices of all the storage locations of the
 // specified object in the specified column of the matrix.
index 581d84e20b9793a1e1ee99a3322f066b8f1849b8..b60e37e444870846276706ee3a4adb93ff21938c 100644 (file)
 class AliObjMatrix : public TObject
 {
  public:
-  AliObjMatrix();                                             // Default constructor
-  virtual ~AliObjMatrix();                                    // Default destructor
-  virtual void Reset();                                       // Reset the whole matrix structure
-  virtual void SetOwner(Int_t own=1);                         // Set the owner flag for the stored objects
-  virtual Int_t GetOwner();                                   // Provide the owner flag for the stored objects
-  virtual void SetSwapMode(Int_t swap=1);                     // Set the swap mode flag for this matrix
-  virtual Int_t GetSwapMode();                                // Provide the swap mode flag for this matrix
-  virtual void EnterObject(Int_t row,Int_t col,TObject* obj); // Enter an object into the matrix
-  void RemoveObject(Int_t row,Int_t col);                     // Remove object at (row,col) from the matrix
-  void RemoveObjects(TObject* obj,Int_t row=0,Int_t col=0);   // Remove specified object(s) from the matrix
-  virtual TObject* GetObject(Int_t row,Int_t col);            // Provide an object from the matrix
-  virtual Int_t GetMaxRow();                                  // Provide the maximum row number index
-  virtual Int_t GetMaxColumn();                               // Provide the maximum column number index
-  virtual Int_t GetNobjects();                                // Provide the number of stored objects
-  virtual TObject* GetObject(Int_t j);                        // Provide pointer to the j-th object
-  virtual TObjArray* GetObjects();                            // Provide pointers of all stored onjects
-  Int_t GetNrefs(TObject* obj);                               // Provide # of stored references to this object
-  Int_t GetIndices(TObject* obj,TArrayI& rows,TArrayI& cols); // Provide all (row,col) indices of this object
-  Int_t GetIndices(TObject* obj,Int_t row,TArrayI& cols);     // Provide column indices in a specific row
-  Int_t GetIndices(TObject* obj,TArrayI& rows,Int_t col);     // Provide row indices in a specific column
+  AliObjMatrix();                                                   // Default constructor
+  virtual ~AliObjMatrix();                                          // Default destructor
+  virtual void Reset();                                             // Reset the whole matrix structure
+  virtual void SetOwner(Int_t own=1);                               // Set the owner flag for the stored objects
+  virtual Int_t GetOwner() const;                                   // Provide the owner flag for the stored objects
+  virtual void SetSwapMode(Int_t swap=1);                           // Set the swap mode flag for this matrix
+  virtual Int_t GetSwapMode() const;                                // Provide the swap mode flag for this matrix
+  virtual void EnterObject(Int_t row,Int_t col,TObject* obj);       // Enter an object into the matrix
+  void RemoveObject(Int_t row,Int_t col);                           // Remove object at (row,col) from the matrix
+  void RemoveObjects(TObject* obj,Int_t row=0,Int_t col=0);         // Remove specified object(s) from the matrix
+  virtual TObject* GetObject(Int_t row,Int_t col) const;            // Provide an object from the matrix
+  virtual Int_t GetMaxRow() const;                                  // Provide the maximum row number index
+  virtual Int_t GetMaxColumn() const;                               // Provide the maximum column number index
+  virtual Int_t GetNobjects() const;                                // Provide the number of stored objects
+  virtual TObject* GetObject(Int_t j) const;                        // Provide pointer to the j-th object
+  virtual TObjArray* GetObjects();                                  // Provide pointers of all stored onjects
+  Int_t GetNrefs(TObject* obj) const;                               // Number of stored references to this object
+  Int_t GetIndices(TObject* obj,TArrayI& rows,TArrayI& cols) const; // All (row,col) indices of this object
+  Int_t GetIndices(TObject* obj,Int_t row,TArrayI& cols) const;     // Column indices in a specific row
+  Int_t GetIndices(TObject* obj,TArrayI& rows,Int_t col) const;     // Row indices in a specific column
  
  protected:
   TObjArray* fRows;    // Pointers to the various arrays representing the matrix rows
@@ -42,6 +42,6 @@ class AliObjMatrix : public TObject
   Int_t fMaxcol;       // The maximum column number index
   TObjArray* fObjects; // Linear reference array for fast looping over the stored objects
  
- ClassDef(AliObjMatrix,4) // Handling of a matrix structure of objects.
+ ClassDef(AliObjMatrix,5) // Handling of a matrix structure of objects.
 };
 #endif
index 2691eca929bf1847d5b411cafc662329e502f6c4..a960fbc86dcfe53b4574fb4793a1502b57c9af47 100644 (file)
 //
 // All angles are in radians.
 //
+// The unit scale for the coordinates can be defined by the user
+// via the SetUnitScale() memberfunction.
+// This enables standardised expressions using numerical values of
+// physical constants by means of the GetUnitScale() memberfunction.
+// By default the unit scale is set to cm, corresponding to invokation
+// of SetUnitScale(0.01).
+//   
+//
 // Example :
 // ---------
 //
@@ -60,7 +68,9 @@ ClassImp(AliPosition) // Class implementation to enable ROOT I/O
  
 AliPosition::AliPosition()
 {
-// Creation of an AliPosition object and initialisation of parameters
+// Creation of an AliPosition object and initialisation of parameters.
+// The unit scale for position coordinates is initialised to cm.
+ fScale=0.01;
 }
 ///////////////////////////////////////////////////////////////////////////
 AliPosition::~AliPosition()
@@ -71,6 +81,7 @@ AliPosition::~AliPosition()
 AliPosition::AliPosition(const AliPosition& p) : Ali3Vector(p)
 {
 // Copy constructor
+ fScale=p.fScale;
 }
 ///////////////////////////////////////////////////////////////////////////
 void AliPosition::SetPosition(Double_t* r,TString f)
@@ -79,7 +90,7 @@ void AliPosition::SetPosition(Double_t* r,TString f)
  SetVector(r,f);
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliPosition::GetPosition(Double_t* r,TString f)
+void AliPosition::GetPosition(Double_t* r,TString f) const
 {
 // Provide position according to reference frame f
  GetVector(r,f);
@@ -91,7 +102,7 @@ void AliPosition::SetPosition(Float_t* r,TString f)
  SetVector(r,f);
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliPosition::GetPosition(Float_t* r,TString f)
+void AliPosition::GetPosition(Float_t* r,TString f) const
 {
 // Provide position according to reference frame f
  GetVector(r,f);
@@ -119,7 +130,7 @@ void AliPosition::SetPositionErrors(Double_t* r,TString f)
  SetErrors(r,f);
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliPosition::GetPositionErrors(Double_t* r,TString f)
+void AliPosition::GetPositionErrors(Double_t* r,TString f) const
 {
 // Provide position errors according to reference frame f
  GetErrors(r,f);
@@ -131,7 +142,7 @@ void AliPosition::SetPositionErrors(Float_t* r,TString f)
  SetErrors(r,f);
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliPosition::GetPositionErrors(Float_t* r,TString f)
+void AliPosition::GetPositionErrors(Float_t* r,TString f) const
 {
 // Provide position errors according to reference frame f
  GetErrors(r,f);
@@ -147,12 +158,56 @@ void AliPosition::ResetPosition()
 ///////////////////////////////////////////////////////////////////////////
 Double_t AliPosition::GetDistance(AliPosition& p)
 {
-// Provide distance to position p.
+// Provide distance of the current AliPosition to position p.
 // The error on the result can be obtained as usual by invoking
 // GetResultError() afterwards. 
- Ali3Vector d=(Ali3Vector)((*this)-p);
+//
+// In the case of two positions with different unit scales, the distance
+// will be provided in the unit scale of the current AliPosition.
+// This implies that in such cases the results of r.GetDistance(q) and
+// q.GetDistance(r) will be numerically different.
+// As such it is possible to obtain a correctly computed distance between
+// positions which have different unit scales.
+// However, it is recommended to work always with one single unit scale.
+//
+ Ali3Vector d=(Ali3Vector)p;
+ Float_t pscale=p.GetUnitScale();
+ if ((pscale/fScale > 1.1) || (fScale/pscale > 1.1)) d=d*(pscale/fScale);
+ Ali3Vector q=(Ali3Vector)(*this);
+ d=d-q;
  Double_t dist=d.GetNorm();
  fDresult=d.GetResultError();
  return dist;
 }
 ///////////////////////////////////////////////////////////////////////////
+void AliPosition::SetUnitScale(Float_t s)
+{
+// Set the unit scale for the position coordinates.
+// The scale is normalised w.r.t. the meter, so setting the unit scale
+// to 0.01 means that all position coordinates are in cm.
+// By default the unit scale is set to cm in the AliPosition constructor.
+// It is recommended to use one single unit scale throughout a complete
+// analysis and/or simulation project.
+//
+// Note : This memberfunction does not modify the numerical values of
+//        the position coordinates.
+//        It only specifies their numerical meaning.
+// 
+ if (s>0.)
+ {
+  fScale=s;
+ }
+ else
+ {
+  cout << " *AliPosition::SetUnitScale* Invalid argument s = " << s << endl;
+ }
+}
+///////////////////////////////////////////////////////////////////////////
+Float_t AliPosition::GetUnitScale() const
+{
+// Provide the unit scale for the position coordinates.
+// The scale is normalised w.r.t. the meter, so a unit scale of 0.01
+// means that all position coordinates are in cm.
+ return fScale;
+}
+///////////////////////////////////////////////////////////////////////////
index 83af0774aa30e476baea4ba2cb1139acb2c7922e..206f8840d49306895a89e9059e5b2b26d661d358 100644 (file)
@@ -19,19 +19,24 @@ class AliPosition : public Ali3Vector
   virtual ~AliPosition();                                // Destructor
   AliPosition(const AliPosition& p);                     // Copy constructor
   void SetPosition(Double_t* r,TString f);               // Store position r in frame f
-  void GetPosition(Double_t* r,TString f);               // Provide position r in frame f
+  void GetPosition(Double_t* r,TString f) const;         // Provide position r in frame f
   void SetPosition(Float_t*  r,TString f);               // Store position r in frame f
-  void GetPosition(Float_t*  r,TString f);               // Provide position r in frame f
+  void GetPosition(Float_t*  r,TString f) const;         // Provide position r in frame f
   AliPosition& GetPosition();                            // Provide position
   void SetPosition(Ali3Vector& r);                       // Store position r
   Double_t GetDistance(AliPosition& p);                  // Provide distance to position p
   Double_t GetDistance(AliPosition* p) { return GetDistance(*p); }
   void SetPositionErrors(Double_t* r,TString f);         // Store position r in frame f
-  void GetPositionErrors(Double_t* r,TString f);         // Provide position r in frame f
+  void GetPositionErrors(Double_t* r,TString f) const;   // Provide position r in frame f
   void SetPositionErrors(Float_t*  r,TString f);         // Store position r in frame f
-  void GetPositionErrors(Float_t*  r,TString f);         // Provide position r in frame f
+  void GetPositionErrors(Float_t*  r,TString f) const;   // Provide position r in frame f
   void ResetPosition();                                  // Reset position and errors to 0
+  void SetUnitScale(Float_t s);                          // Set unit scale for the position coordinates
+  Float_t GetUnitScale() const;                          // Provide unit scale for the position coordinates
 
- ClassDef(AliPosition,4) // Handling of positions in various reference frames.
+ protected:
+  Float_t fScale; // The unit scale used for the position coordinates
+
+ ClassDef(AliPosition,6) // Handling of positions in various reference frames.
 };
 #endif
index 195b92bd0bb5a8ee6313c381f62f1b591de2f808..d4864ecec5053ba55154a28db7c7f1e63dee660b 100644 (file)
@@ -300,25 +300,25 @@ void AliRandom::Unpack(Int_t seed,Int_t& i,Int_t& j,Int_t& k,Int_t& l)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliRandom::GetSeed()
+Int_t AliRandom::GetSeed() const
 {
 // Provide the current seed value
  return fSeed;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliRandom::GetCnt1()
+Int_t AliRandom::GetCnt1() const
 {
 // Provide the current value of the counter cnt1
  return fCnt1;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliRandom::GetCnt2()
+Int_t AliRandom::GetCnt2() const
 {
 // Provide the current value of the counter cnt2
  return fCnt2;
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliRandom::Data()
+void AliRandom::Data() const
 {
 // Print the current seed, cnt1 and cnt2 values
  cout << " *Random* seed = " << fSeed
index 79663689158087c1e9f8d2a65829fb257882223a..1b19843129a47df00cbd23f6b0653107f0509843 100644 (file)
@@ -16,10 +16,10 @@ class AliRandom : public TObject
   AliRandom(Int_t seed);                       // Constructor with user defined seed
   AliRandom(Int_t seed,Int_t cnt1,Int_t cnt2); // User defined starting point
   virtual ~AliRandom();                        // Destructor
-  Int_t GetSeed();                             // Provide current seed value
-  Int_t GetCnt1();                             // Provide current counter value cnt1
-  Int_t GetCnt2();                             // Provide current counter value cnt2
-  void Data();                                 // Print current seed, cnt1 and cnt2
+  Int_t GetSeed() const;                       // Provide current seed value
+  Int_t GetCnt1() const;                       // Provide current counter value cnt1
+  Int_t GetCnt2() const;                       // Provide current counter value cnt2
+  void Data() const;                           // Print current seed, cnt1 and cnt2
   Float_t Uniform();                           // Uniform dist. within <0,1>
   Float_t Uniform(Float_t a,Float_t b);        // Uniform dist. within <a,b>
   void Uniform(Float_t* vec,Int_t n);          // n uniform randoms in <0,1>
@@ -47,6 +47,6 @@ class AliRandom : public TObject
   Float_t fYamin,fYamax; //! The min. and max. y values of the area function
   Int_t* fIbins;         //! The bin numbers of the random x candidates
  
- ClassDef(AliRandom,2) // Generate universal random numbers on all common machines.
+ ClassDef(AliRandom,3) // Generate universal random numbers on all common machines.
 };
 #endif
index c0843df758f07d0fdf2b2323c9e115eeae611960..62aa9c41e067e0c5b23090f84279005cc5c2d086 100644 (file)
@@ -255,19 +255,19 @@ void AliSample::Compute()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliSample::GetDimension()
+Int_t AliSample::GetDimension() const
 {
 // Provide the dimension of a certain sample
  return fDim;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliSample::GetN()
+Int_t AliSample::GetN() const
 {
 // Provide the number of entries of a certain sample
  return fN;
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetSum(Int_t i)
+Float_t AliSample::GetSum(Int_t i) const
 {
 // Provide the sum of a certain variable
  if (fDim < i)
@@ -281,7 +281,7 @@ Float_t AliSample::GetSum(Int_t i)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetMean(Int_t i)
+Float_t AliSample::GetMean(Int_t i) const
 {
 // Provide the mean of a certain variable
  if (fDim < i)
@@ -295,7 +295,7 @@ Float_t AliSample::GetMean(Int_t i)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetVar(Int_t i)
+Float_t AliSample::GetVar(Int_t i) const
 {
 // Provide the variance of a certain variable
  if (fDim < i)
@@ -309,7 +309,7 @@ Float_t AliSample::GetVar(Int_t i)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetSigma(Int_t i)
+Float_t AliSample::GetSigma(Int_t i) const
 {
 // Provide the standard deviation of a certain variable
  if (fDim < i)
@@ -323,7 +323,7 @@ Float_t AliSample::GetSigma(Int_t i)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetCov(Int_t i,Int_t j)
+Float_t AliSample::GetCov(Int_t i,Int_t j) const
 {
 // Provide the covariance between variables i and j
  if ((fDim < i) || (fDim < j))
@@ -339,7 +339,7 @@ Float_t AliSample::GetCov(Int_t i,Int_t j)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetCor(Int_t i,Int_t j)
+Float_t AliSample::GetCor(Int_t i,Int_t j) const
 {
 // Provide the correlation between variables i and j
  if ((fDim < i) || (fDim < j))
@@ -355,7 +355,7 @@ Float_t AliSample::GetCor(Int_t i,Int_t j)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliSample::Data()
+void AliSample::Data() const
 {
 // Printing of statistics of all variables
  for (Int_t i=0; i<fDim; i++)
@@ -366,7 +366,7 @@ void AliSample::Data()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliSample::Data(Int_t i)
+void AliSample::Data(Int_t i) const
 {
 // Printing of statistics of ith variable
  if (fDim < i)
@@ -381,7 +381,7 @@ void AliSample::Data(Int_t i)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliSample::Data(Int_t i,Int_t j)
+void AliSample::Data(Int_t i,Int_t j) const
 {
 // Printing of covariance and correlation between variables i and j
  if ((fDim < i) || (fDim < j))
index 3113463ceeaafdd70052cb6149af4a6ee6a3d578..d9c960fee2dde1f76383a079c1e5d6a867ec0880 100644 (file)
@@ -21,17 +21,17 @@ class AliSample
   void Remove(Float_t x, Float_t y);            // Remove value from 2-dim. sample
   void Enter(Float_t x, Float_t y, Float_t z);  // Enter value for 3-dim. sample
   void Remove(Float_t x, Float_t y, Float_t z); // Remove value from 3-dim. sample
-  Int_t GetDimension();                         // Provide dimension of the sample
-  Int_t GetN();                                 // Provide the number of entries
-  Float_t GetSum(Int_t i);                      // Provide sum for i-th variable
-  Float_t GetMean(Int_t i);                     // Provide mean for i-th variable
-  Float_t GetVar(Int_t i);                      // Provide variance for i-th variable
-  Float_t GetSigma(Int_t i);                    // Standard deviation for i-th variable
-  Float_t GetCov(Int_t i, Int_t j);             // Covariance for i-th and j-th variable
-  Float_t GetCor(Int_t i, Int_t j);             // Correlation for i-th and j-th variable
-  void Data();                                  // Stat. info for the complete sample
-  void Data(Int_t i);                           // Stat. info for the i-th variable
-  void Data(Int_t i, Int_t j);                  // Stat. info for i-th and j-th variable
+  Int_t GetDimension() const;                   // Provide dimension of the sample
+  Int_t GetN() const;                           // Provide the number of entries
+  Float_t GetSum(Int_t i) const;                // Provide sum for i-th variable
+  Float_t GetMean(Int_t i) const;               // Provide mean for i-th variable
+  Float_t GetVar(Int_t i) const;                // Provide variance for i-th variable
+  Float_t GetSigma(Int_t i) const;              // Standard deviation for i-th variable
+  Float_t GetCov(Int_t i, Int_t j) const;       // Covariance for i-th and j-th variable
+  Float_t GetCor(Int_t i, Int_t j) const;       // Correlation for i-th and j-th variable
+  void Data() const;                            // Stat. info for the complete sample
+  void Data(Int_t i) const;                     // Stat. info for the i-th variable
+  void Data(Int_t i, Int_t j) const;            // Stat. info for i-th and j-th variable
  
  private:
   Int_t fDim;                      // Dimension of the sample
index f412cbc77abb40398aec2f0780d097e75c9a0694..0981b25ae92761783d374eb89bfe2063f6250a6d 100644 (file)
@@ -128,7 +128,7 @@ AliSignal::~AliSignal()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-AliSignal::AliSignal(AliSignal& s) : TNamed(s),AliPosition(s),AliAttrib(s)
+AliSignal::AliSignal(const AliSignal& s) : TNamed(s),AliPosition(s),AliAttrib(s)
 {
 // Copy constructor
  fSignals=0;
@@ -341,7 +341,7 @@ void AliSignal::AddSignal(Double_t sig,Int_t j)
  fSignals->AddAt(sum,j-1);
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliSignal::GetSignal(Int_t j,Int_t mode)
+Float_t AliSignal::GetSignal(Int_t j,Int_t mode) const
 {
 // Provide value of the j-th (default j=1) signal slot.
 // Note : The first signal slot is at j=1.
@@ -419,7 +419,7 @@ void AliSignal::SetSignalError(Double_t dsig,Int_t j)
  fDsignals->AddAt(float(dsig),j-1);
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliSignal::GetSignalError(Int_t j)
+Float_t AliSignal::GetSignalError(Int_t j) const
 {
 // Provide error of the j-th (default j=1) signal slot.
 // Note : The first signal slot is at j=1.
@@ -439,7 +439,7 @@ Float_t AliSignal::GetSignalError(Int_t j)
  return err;
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliSignal::Data(TString f)
+void AliSignal::Data(TString f) const
 {
 // Provide all signal information within the coordinate frame f.
 
@@ -456,7 +456,7 @@ void AliSignal::Data(TString f)
  List(-1);
 } 
 ///////////////////////////////////////////////////////////////////////////
-void AliSignal::List(Int_t j)
+void AliSignal::List(Int_t j) const
 {
 // Provide signal information for the j-th slot.
 // The first slot is at j=1.
@@ -578,7 +578,7 @@ void AliSignal::List(Int_t j)
  }
 } 
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliSignal::GetNvalues()
+Int_t AliSignal::GetNvalues() const
 {
 // Provide the number of values for this signal.
  Int_t n=0;
@@ -586,7 +586,7 @@ Int_t AliSignal::GetNvalues()
  return n;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliSignal::GetNerrors()
+Int_t AliSignal::GetNerrors() const
 {
 // Provide the number specified errors on the values for this signal.
  Int_t n=0;
@@ -594,7 +594,7 @@ Int_t AliSignal::GetNerrors()
  return n;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliSignal::GetNwaveforms()
+Int_t AliSignal::GetNwaveforms() const
 {
 // Provide the number specified waveforms for this signal.
  Int_t n=0;
@@ -602,7 +602,7 @@ Int_t AliSignal::GetNwaveforms()
  return n;
 }
 ///////////////////////////////////////////////////////////////////////////
-TH1F* AliSignal::GetWaveform(Int_t j)
+TH1F* AliSignal::GetWaveform(Int_t j) const
 {
 // Provide pointer to the j-th waveform histogram.
  TH1F* waveform=0;
@@ -727,7 +727,7 @@ void AliSignal::DeleteWaveform(Int_t j)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliSignal::GetNlinks(TObject* obj,Int_t j)
+Int_t AliSignal::GetNlinks(TObject* obj,Int_t j) const
 {
 // Provide the number of links to the specified object for the j-th slot.
 // If j=0 (default) all slots will be scanned for the specified object.
@@ -753,7 +753,7 @@ Int_t AliSignal::GetNlinks(TObject* obj,Int_t j)
  return n;
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliSignal::GetLink(Int_t j,Int_t k)
+TObject* AliSignal::GetLink(Int_t j,Int_t k) const
 {
 // Provide pointer of the object linked to the j-th slot at position k.
 
@@ -935,7 +935,7 @@ void AliSignal::ResetLinks(TObject* obj,Int_t j,Int_t k)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliSignal::GetIndices(TObject* obj,TArrayI& js,TArrayI& ks)
+Int_t AliSignal::GetIndices(TObject* obj,TArrayI& js,TArrayI& ks) const
 {
 // Provide the slot and position indices of all the storage locations
 // of the specified object.
@@ -969,7 +969,7 @@ Int_t AliSignal::GetIndices(TObject* obj,TArrayI& js,TArrayI& ks)
  return nrefs;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliSignal::GetIndices(TObject* obj,Int_t j,TArrayI& ks)
+Int_t AliSignal::GetIndices(TObject* obj,Int_t j,TArrayI& ks) const
 {
 // Provide the position indices of all the storage locations of the
 // specified object in the j-th slot of this AliSignal.
@@ -1005,7 +1005,7 @@ Int_t AliSignal::GetIndices(TObject* obj,Int_t j,TArrayI& ks)
  return nrefs;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliSignal::GetIndices(TObject* obj,TArrayI& js,Int_t k)
+Int_t AliSignal::GetIndices(TObject* obj,TArrayI& js,Int_t k) const
 {
 // Provide the slot indices of all the storage locations of the
 // specified object for the k-th position in this AliSignal.
@@ -1060,7 +1060,7 @@ void AliSignal::SetSwapMode(Int_t swap)
  fLinks->SetSwapMode(swap);
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliSignal::GetSwapMode()
+Int_t AliSignal::GetSwapMode() const
 {
 // Provide swapmode flag of the link storage.
  Int_t swap=0; 
@@ -1068,7 +1068,7 @@ Int_t AliSignal::GetSwapMode()
  return swap;
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliSignal::Clone(const char* name)
+TObject* AliSignal::Clone(const char* name) const
 {
 // Make a deep copy of the current object and provide the pointer to the copy.
 // This memberfunction enables automatic creation of new objects of the
index f54fea5678f47283d8456a684e554438a35c1886..4d8d0f3b5e5295d7316066bc86a314052d06664c 100644 (file)
 class AliSignal : public TNamed,public AliPosition,public AliAttrib
 {
  public:
-  AliSignal();                                          // Default constructor
-  virtual ~AliSignal();                                 // Destructor
-  AliSignal(AliSignal& s);                              // Copy constructor
-  virtual TObject* Clone(const char* name="");          // Make a deep copy and provide its pointer
-  virtual void SetSignal(Double_t sig,Int_t j=1);       // Store j-th signal value
-  virtual void AddSignal(Double_t sig,Int_t j=1);       // Add value to j-th signal value
-  virtual Float_t GetSignal(Int_t j=1,Int_t mode=0);    // Provide j-th (corrected) signal value
-  virtual void SetSignalError(Double_t dsig,Int_t j=1); // Store error on j-th signal value
-  virtual Float_t GetSignalError(Int_t j=1);            // Provide error j-th signal value
-  virtual void ResetSignals(Int_t mode=0);              // User selected reset of signal values and/or errors
-  virtual void DeleteSignals(Int_t mode=0);             // User selected delete of signal values and/or errors
-  virtual void Reset(Int_t mode=0);                     // Reset signal and position values and errors
-  virtual void Data(TString f="car");                   // Print all signal info for coord. frame f
-  virtual void List(Int_t j=0);                         // Print signal info for the j-th (or all) slot(s)
-  Int_t GetNvalues();                                   // Provide the number of signal values
-  Int_t GetNerrors();                                   // Provide the number of specified errors
-  Int_t GetNwaveforms();                                // Provide the number of specified waveforms
-  void SetWaveform(TH1F* waveform,Int_t j=1);           // Set the j-th waveform histogram
-  TH1F* GetWaveform(Int_t j=1);                         // Provide pointer of the j-th waveform histogram 
-  void ResetWaveform(Int_t j=1);                        // Reset the j-th waveform histogram 
-  void DeleteWaveform(Int_t j=1);                       // Delete the j-th waveform histogram 
-  Int_t GetNlinks(TObject* obj=0,Int_t j=0);            // Provide the number of links for the specified object
-  void SetLink(TObject* obj,Int_t j=1,Int_t k=1);       // Link object to the j-th slot at position k
-  void AddLink(TObject* obj,Int_t j=1);                 // Link object to the j-th slot at first free position
-  TObject* GetLink(Int_t j=1,Int_t k=1);                // Provide pointer of the object linked to the j-th slot
-  Int_t GetIndices(TObject* obj,TArrayI& js,TArrayI& ks);// Provide slot and position indices for linked objects
-  Int_t GetIndices(TObject* obj,Int_t j,TArrayI& ks);   // Provide pos. indices for linked objects of j-th slot 
-  Int_t GetIndices(TObject* obj,TArrayI& js,Int_t k);   // Provide slot indices for linked objects at pos. k 
-  void ResetLink(Int_t j=1,Int_t k=1);                  // Reset the link(s) of the j-th slot 
-  void ResetLinks(TObject* obj,Int_t j=0,Int_t k=0);    // Reset link(s) to the specified object for j-th slot
-  void SetSwapMode(Int_t swap=1);                       // Set swapmode flag for the link storage
-  Int_t GetSwapMode();                                  // Provide swapmode flag for the link storage
+  AliSignal();                                                  // Default constructor
+  virtual ~AliSignal();                                         // Destructor
+  AliSignal(const AliSignal& s);                                // Copy constructor
+  virtual TObject* Clone(const char* name="") const;            // Make a deep copy and provide its pointer
+  virtual void SetSignal(Double_t sig,Int_t j=1);               // Store j-th signal value
+  virtual void AddSignal(Double_t sig,Int_t j=1);               // Add value to j-th signal value
+  virtual Float_t GetSignal(Int_t j=1,Int_t mode=0) const;      // Provide j-th (corrected) signal value
+  virtual void SetSignalError(Double_t dsig,Int_t j=1);         // Store error on j-th signal value
+  virtual Float_t GetSignalError(Int_t j=1) const;              // Provide error j-th signal value
+  virtual void ResetSignals(Int_t mode=0);                      // Selective reset of signal values and/or errors
+  virtual void DeleteSignals(Int_t mode=0);                     // Selectie delete of signal values and/or errors
+  virtual void Reset(Int_t mode=0);                             // Reset signal and position values and errors
+  virtual void Data(TString f="car") const;                     // Print all signal info for coord. frame f
+  virtual void List(Int_t j=0) const;                           // Print signal info for the j-th (all) slot(s)
+  Int_t GetNvalues() const;                                     // Provide the number of signal values
+  Int_t GetNerrors() const;                                     // Provide the number of specified errors
+  Int_t GetNwaveforms() const;                                  // Provide the number of specified waveforms
+  void SetWaveform(TH1F* waveform,Int_t j=1);                   // Set the j-th waveform histogram
+  TH1F* GetWaveform(Int_t j=1) const;                           // Pointer of the j-th waveform histogram 
+  void ResetWaveform(Int_t j=1);                                // Reset the j-th waveform histogram 
+  void DeleteWaveform(Int_t j=1);                               // Delete the j-th waveform histogram 
+  Int_t GetNlinks(TObject* obj=0,Int_t j=0) const;              // Number of links for the specified object
+  void SetLink(TObject* obj,Int_t j=1,Int_t k=1);               // Link object to the j-th slot at position k
+  void AddLink(TObject* obj,Int_t j=1);                         // Link obj to the j-th slot at 1st free position
+  TObject* GetLink(Int_t j=1,Int_t k=1) const;                  // Pointer of the object linked to the j-th slot
+  Int_t GetIndices(TObject* obj,TArrayI& js,TArrayI& ks) const; // Slot and pos. indices for linked objects
+  Int_t GetIndices(TObject* obj,Int_t j,TArrayI& ks) const;     // Pos. indices for linked objects of j-th slot 
+  Int_t GetIndices(TObject* obj,TArrayI& js,Int_t k) const;     // Slot indices for linked objects at pos. k 
+  void ResetLink(Int_t j=1,Int_t k=1);                          // Reset the link(s) of the j-th slot 
+  void ResetLinks(TObject* obj,Int_t j=0,Int_t k=0);            // Reset link(s) to object obj for j-th slot
+  void SetSwapMode(Int_t swap=1);                               // Set swapmode flag for the link storage
+  Int_t GetSwapMode() const;                                    // Provide swapmode flag for the link storage
 
  protected:
   TArrayF* fSignals;                           // Signal values
@@ -57,6 +57,6 @@ class AliSignal : public TNamed,public AliPosition,public AliAttrib
   TObjArray* fWaveforms;                       // The 1D histograms containing the signal waveforms
   AliObjMatrix* fLinks;                        // Pointers of objects related to the various slots
 
- ClassDef(AliSignal,11) // Generic handling of (extrapolated) detector signals.
+ ClassDef(AliSignal,12) // Generic handling of (extrapolated) detector signals.
 };
 #endif
index 80c75d5323c69ec691d0ec589df50e9e50606789..2d5eaa2c10c35bab402d3318916fd992711fda18 100644 (file)
@@ -178,7 +178,7 @@ AliTrack::~AliTrack()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-AliTrack::AliTrack(AliTrack& t) : TNamed(t),Ali4Vector(t)
+AliTrack::AliTrack(const AliTrack& t) : TNamed(t),Ali4Vector(t)
 {
 // Copy constructor
  Init();
@@ -295,8 +295,11 @@ void AliTrack::Reset()
 ///////////////////////////////////////////////////////////////////////////
 void AliTrack::Set3Momentum(Ali3Vector& p)
 {
-// Set the track parameters according to the 3-momentum p
+// Set the track parameters according to the 3-momentum p.
+// In case the mass was not yet set, the energy is set to correspond to m=0. 
  Set3Vector(p);
+ Double_t inv=GetInvariant();
+ if (inv<0) SetMass(0.);
 }
 ///////////////////////////////////////////////////////////////////////////
 void AliTrack::Set4Momentum(Ali4Vector& p)
@@ -470,7 +473,7 @@ Double_t AliTrack::GetMomentum()
  return norm;
 }
 ///////////////////////////////////////////////////////////////////////////
-Ali3Vector AliTrack::Get3Momentum()
+Ali3Vector AliTrack::Get3Momentum() const
 {
 // Provide the track 3-momentum
  return (Ali3Vector)Get3Vector();
@@ -500,7 +503,7 @@ Double_t AliTrack::GetMass()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliTrack::GetCharge()
+Float_t AliTrack::GetCharge() const
 {
 // Provide the particle charge
  return fQ;
@@ -595,7 +598,7 @@ void AliTrack::Decay(Double_t m1,Double_t m2,Double_t thcms,Double_t phicms)
  ((AliTrack*)fDecays->At(1))->SetMass(m2);
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliTrack::GetNdecay()
+Int_t AliTrack::GetNdecay() const
 {
 // Provide the number of decay produced tracks
  Int_t ndec=0;
@@ -603,7 +606,7 @@ Int_t AliTrack::GetNdecay()
  return ndec;
 }
 ///////////////////////////////////////////////////////////////////////////
-AliTrack* AliTrack::GetDecayTrack(Int_t j)
+AliTrack* AliTrack::GetDecayTrack(Int_t j) const
 {
 // Provide decay produced track number j
 // Note : j=1 denotes the first decay track
@@ -673,7 +676,7 @@ void AliTrack::RemoveSignals()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliTrack::GetNsignals()
+Int_t AliTrack::GetNsignals() const
 {
 // Provide the number of related AliSignals.
  Int_t nsig=0;
@@ -681,7 +684,7 @@ Int_t AliTrack::GetNsignals()
  return nsig;
 }
 ///////////////////////////////////////////////////////////////////////////
-AliSignal* AliTrack::GetSignal(Int_t j)
+AliSignal* AliTrack::GetSignal(Int_t j) const
 {
 // Provide the related AliSignal number j.
 // Note : j=1 denotes the first signal.
@@ -759,7 +762,7 @@ void AliTrack::RemoveTrackHypotheses()
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliTrack::GetNhypotheses()
+Int_t AliTrack::GetNhypotheses() const
 {
 // Provide the number of track hypotheses.
  Int_t nhyp=0;
@@ -767,7 +770,7 @@ Int_t AliTrack::GetNhypotheses()
  return nhyp;
 }
 ///////////////////////////////////////////////////////////////////////////
-AliTrack* AliTrack::GetTrackHypothesis(Int_t j)
+AliTrack* AliTrack::GetTrackHypothesis(Int_t j) const
 {
 // Provide the j-th track hypothesis.
 // Note : j=1 denotes the first hypothesis.
@@ -1050,7 +1053,7 @@ void AliTrack::SetId(Int_t id)
  fUserId=id;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliTrack::GetId()
+Int_t AliTrack::GetId() const
 {
 // Provide the user defined unique identifier of this track.
  return fUserId;
@@ -1101,13 +1104,13 @@ void AliTrack::SetNdf(Int_t ndf)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliTrack::GetChi2()
+Float_t AliTrack::GetChi2() const
 {
 // Provide the chi-squared value of the track fit.
  return fChi2;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliTrack::GetNdf()
+Int_t AliTrack::GetNdf() const
 {
 // Provide the number of degrees of freedom for the track fit.
  return fNdf;
@@ -1119,7 +1122,7 @@ void AliTrack::SetParticleCode(Int_t code)
  fCode=code;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliTrack::GetParticleCode()
+Int_t AliTrack::GetParticleCode() const
 {
 // Provide the user defined particle id code.
  return fCode;
@@ -1143,13 +1146,13 @@ void AliTrack::SetProb(Double_t prob)
  fProb=prob;
 }
 ///////////////////////////////////////////////////////////////////////////
-Float_t AliTrack::GetProb()
+Float_t AliTrack::GetProb() const
 {
 // Provide the hypothesis probability for this track.
  return fProb;
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliTrack::Clone(const char* name)
+TObject* AliTrack::Clone(const char* name) const
 {
 // Make a deep copy of the current object and provide the pointer to the copy.
 // This memberfunction enables automatic creation of new objects of the
index f5add2e39afde07a8713cdc6e7a32be5c82ca346..f10c2483452a156edb9e4edceb1a91ebc0b4a3d9 100644 (file)
 class AliTrack : public TNamed,public Ali4Vector
 {
  public:
-  AliTrack();                           // Default constructor
-  virtual ~AliTrack();                  // Destructor
-  AliTrack(AliTrack& t);                // Copy constructor
-  virtual TObject* Clone(const char* name=""); // Make a deep copy and provide its pointer
-  virtual void Reset();                 // Reset all values to 0
-  void Set4Momentum(Ali4Vector& p);     // Set track 4-momentum
-  void Set3Momentum(Ali3Vector& p);     // Set track 3-momentum
+  AliTrack();                             // Default constructor
+  virtual ~AliTrack();                    // Destructor
+  AliTrack(const AliTrack& t);            // Copy constructor
+  virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer
+  virtual void Reset();                   // Reset all values to 0
+  void Set4Momentum(Ali4Vector& p);       // Set track 4-momentum
+  void Set3Momentum(Ali3Vector& p);       // Set track 3-momentum
   void SetMass(Double_t m,Double_t dm=0); // Set particle mass and error
-  void SetMass();                       // Set mass and error to the values of the hypothesis with highest prob.
-  void SetCharge(Float_t q);            // Set particle charge
-  virtual void Data(TString f="car");   // Print track information for coord. frame f
-  virtual void List(TString f="car");   // Print track and decay level 1 information for coord. frame f
-  virtual void ListAll(TString f="car");// Print track and all decay level information for coord. frame f
-  Ali3Vector Get3Momentum();            // Provide track 3-momentum
-  Double_t GetMomentum();               // Provide value of track 3-momentum
-  Double_t GetMass();                   // Provide particle mass
-  Float_t GetCharge();                  // Provide particle charge
-  Double_t GetEnergy();                 // Provide particle total energy
+  void SetMass();                         // Set mass and error to the values of the hyp. with highest prob.
+  void SetCharge(Float_t q);              // Set particle charge
+  virtual void Data(TString f="car");     // Print track information for coord. frame f
+  virtual void List(TString f="car");     // Print track and decay level 1 information for coord. frame f
+  virtual void ListAll(TString f="car");  // Print track and all decay level information for coord. frame f
+  Ali3Vector Get3Momentum() const;        // Provide track 3-momentum
+  Double_t GetMomentum();                 // Provide value of track 3-momentum
+  Double_t GetMass();                     // Provide particle mass
+  Float_t GetCharge() const;              // Provide particle charge
+  Double_t GetEnergy();                   // Provide particle total energy
   void Decay(Double_t m1,Double_t m2,Double_t thcms,Double_t phicms); // Perform 2-body decay
-  Int_t GetNdecay();                    // Provide number of decay products
-  AliTrack* GetDecayTrack(Int_t j);     // Access to decay produced track number j
-  void RemoveDecays();                  // Remove all the decay products of this track
-  void AddSignal(AliSignal& s);         // Relate an AliSignal to this track
-  void RemoveSignal(AliSignal& s);      // Remove related AliSignal from this track
-  void RemoveSignals();                 // Remove all related AliSignals from this track
-  Int_t GetNsignals();                  // Provide number of related AliSignals
-  AliSignal* GetSignal(Int_t j);        // Access to the related AliSignal number j
-  void SetBeginPoint(AliPosition& p);   // Set the track begin-point
-  AliPosition* GetBeginPoint();         // Provide the track begin-point
-  void SetEndPoint(AliPosition& p);     // Set the track end-point
-  AliPosition* GetEndPoint();           // Provide the track end-point
-  void AddTrackHypothesis(AliTrack& t); // Add track hypothesis
+  Int_t GetNdecay() const;                // Provide number of decay products
+  AliTrack* GetDecayTrack(Int_t j) const; // Access to decay produced track number j
+  void RemoveDecays();                    // Remove all the decay products of this track
+  void AddSignal(AliSignal& s);           // Relate an AliSignal to this track
+  void RemoveSignal(AliSignal& s);        // Remove related AliSignal from this track
+  void RemoveSignals();                   // Remove all related AliSignals from this track
+  Int_t GetNsignals() const;              // Provide number of related AliSignals
+  AliSignal* GetSignal(Int_t j) const;    // Access to the related AliSignal number j
+  void SetBeginPoint(AliPosition& p);     // Set the track begin-point
+  AliPosition* GetBeginPoint();           // Provide the track begin-point
+  void SetEndPoint(AliPosition& p);       // Set the track end-point
+  AliPosition* GetEndPoint();             // Provide the track end-point
+  void AddTrackHypothesis(AliTrack& t);   // Add track hypothesis
   void AddTrackHypothesis(Double_t prob,Double_t m,Double_t dm=0); // Add track hypothesis with mass data
-  Int_t GetNhypotheses();               // Provide number of track hypotheses
-  AliTrack* GetTrackHypothesis(Int_t j=0) // Provide the j-th track hypothesis 
-  void RemoveTrackHypothesis(AliTrack& t);  // Remove the specified track hypothesis 
-  void RemoveTrackHypotheses();         // Remove all track hypotheses 
-  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 GetEl();                     // Provide long. energy w.r.t. z-axis
-  Double_t GetMt();                     // Provide trans. mass w.r.t. z-axis
-  Double_t GetRapidity();               // Provide rapidity value w.r.t. z-axis
+  Int_t GetNhypotheses() const;           // Provide number of track hypotheses
+  AliTrack* GetTrackHypothesis(Int_t j=0) const; // Provide the j-th track hypothesis 
+  void RemoveTrackHypothesis(AliTrack& t);// Remove the specified track hypothesis 
+  void RemoveTrackHypotheses();           // Remove all track hypotheses 
+  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 GetEl();                       // Provide long. energy w.r.t. z-axis
+  Double_t GetMt();                       // Provide trans. mass w.r.t. z-axis
+  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 unique track identifier
-  Int_t GetId();                        // Provide the user defined unique track 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
-  void SetChi2(Float_t chi2);           // Set the chi-squared value of the track fit
-  void SetNdf(Int_t ndf);               // Set the number of degrees of freedom for the track fit
-  Float_t GetChi2();                    // Provide the chi-squared value of the track fit
-  Int_t GetNdf();                       // Provide the number of degrees of freedom for the track fit
-  void SetParticleCode(Int_t code);     // Set the user defined particle id code (e.g. the PDF convention)
-  Int_t GetParticleCode();              // Provide the user defined particle id code
-  void SetParentTrack(AliTrack* t);     // Set pointer to the parent track
-  AliTrack* GetParentTrack();           // Provide pointer to the parent track
-  void SetProb(Double_t prob);          // Set the hypothesis probability for this track
-  Float_t GetProb();                    // Provide the hypothesis probability for this track
+  void SetId(Int_t id);                   // Set the user defined unique track identifier
+  Int_t GetId() const;                    // Provide the user defined unique track 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
+  void SetChi2(Float_t chi2);             // Set the chi-squared value of the track fit
+  void SetNdf(Int_t ndf);                 // Set the number of degrees of freedom for the track fit
+  Float_t GetChi2() const;                // Provide the chi-squared value of the track fit
+  Int_t GetNdf() const;                   // Provide the number of degrees of freedom for the track fit
+  void SetParticleCode(Int_t code);       // Set the user defined particle id code (e.g. the PDF convention)
+  Int_t GetParticleCode() const;          // Provide the user defined particle id code
+  void SetParentTrack(AliTrack* t);       // Set pointer to the parent track
+  AliTrack* GetParentTrack();             // Provide pointer to the parent track
+  void SetProb(Double_t prob);            // Set the hypothesis probability for this track
+  Float_t GetProb() const;                // Provide the hypothesis probability for this track
 
  
  protected:
@@ -102,6 +102,6 @@ class AliTrack : public TNamed,public Ali4Vector
  private:
   void Dumps(AliTrack* t,Int_t n,TString f); // Recursively print all decay levels
  
- ClassDef(AliTrack,10) // Handling of the attributes of a reconstructed particle track.
+ ClassDef(AliTrack,11) // Handling of the attributes of a reconstructed particle track.
 };
 #endif
index 55847baab1a47955a55ab1fc395a4ef7f97d2315..dde5f0f53a6a5f7a09e206af833b17a4e85b7f39 100644 (file)
@@ -249,7 +249,7 @@ void AliVertex::SetOwner(Bool_t own)
  AliJet::SetOwner(own);
 }
 ///////////////////////////////////////////////////////////////////////////
-AliVertex::AliVertex(AliVertex& v) : AliJet(v.fNtinit),AliPosition(v)
+AliVertex::AliVertex(const AliVertex& v) : AliJet(v.fNtinit),AliPosition(v)
 {
 // Copy constructor
  Init();
@@ -683,13 +683,13 @@ void AliVertex::Dumps(AliVertex* v,Int_t n,TString f)
  }
 } 
 //////////////////////////////////////////////////////////////////////////
-Int_t AliVertex::GetNvertices()
+Int_t AliVertex::GetNvertices() const
 {
 // Return the current number of (secondary) vertices
  return fNvtx;
 }
 ///////////////////////////////////////////////////////////////////////////
-AliVertex* AliVertex::GetVertex(Int_t i)
+AliVertex* AliVertex::GetVertex(Int_t i) const
 {
 // Return the i-th (secondary) vertex of the current vertex
  if (!fVertices)
@@ -712,7 +712,7 @@ AliVertex* AliVertex::GetVertex(Int_t i)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-AliVertex* AliVertex::GetIdVertex(Int_t id)
+AliVertex* AliVertex::GetIdVertex(Int_t id) const
 {
 // Return the (sec.) vertex with user identifier "id"
  AliVertex* vx=0;
@@ -761,7 +761,7 @@ void AliVertex::SetVertexCopy(Int_t j)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliVertex::GetVertexCopy()
+Int_t AliVertex::GetVertexCopy() const
 {
 // Provide value of the VertexCopy mode.
 // 0 ==> No private copies are made; pointers of original vertices are stored.
@@ -769,13 +769,13 @@ Int_t AliVertex::GetVertexCopy()
  return fVertexCopy;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliVertex::GetNjets()
+Int_t AliVertex::GetNjets() const
 {
 // Return the current number of jets
  return fNjets;
 }
 ///////////////////////////////////////////////////////////////////////////
-AliJet* AliVertex::GetJet(Int_t i)
+AliJet* AliVertex::GetJet(Int_t i) const
 {
 // Return the i-th jet of the current vertex
  if (!fJets)
@@ -798,7 +798,7 @@ AliJet* AliVertex::GetJet(Int_t i)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-AliJet* AliVertex::GetIdJet(Int_t id)
+AliJet* AliVertex::GetIdJet(Int_t id) const
 {
 // Return the jet with user identifier "id"
  AliJet* jx=0;
@@ -847,7 +847,7 @@ void AliVertex::SetJetCopy(Int_t j)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliVertex::GetJetCopy()
+Int_t AliVertex::GetJetCopy() const
 {
 // Provide value of the JetCopy mode.
 // 0 ==> No private copies are made; pointers of original jets are stored.
@@ -855,7 +855,7 @@ Int_t AliVertex::GetJetCopy()
  return fJetCopy;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliVertex::IsConnectTrack(AliTrack* t)
+Int_t AliVertex::IsConnectTrack(AliTrack* t) const
 {
 // Indicate whether a track from the tracklist was created via the
 // connection of a (secondary) vertex or not.
@@ -869,7 +869,7 @@ Int_t AliVertex::IsConnectTrack(AliTrack* t)
  return connect;
 }
 ///////////////////////////////////////////////////////////////////////////
-Int_t AliVertex::IsJetTrack(AliTrack* t)
+Int_t AliVertex::IsJetTrack(AliTrack* t) const
 {
 // Indicate whether a track from the tracklist was created via the
 // addition of a jet or not.
@@ -992,7 +992,7 @@ void AliVertex::Draw(Int_t secs,Int_t cons,Int_t jets)
  }
 }
 ///////////////////////////////////////////////////////////////////////////
-TObject* AliVertex::Clone(const char* name)
+TObject* AliVertex::Clone(const char* name) const
 {
 // Make a deep copy of the current object and provide the pointer to the copy.
 // This memberfunction enables automatic creation of new objects of the
index fd07494b80e229c77febf2a410b3b37a9283952c..56b08929652dc1bc06aa155b19870ad83037ca0f 100644 (file)
 class AliVertex : public AliJet,public AliPosition
 {
  public:
-  AliVertex();                            // Default constructor
-  AliVertex(Int_t n);                     // Create a vertex to hold initially n tracks
-  virtual ~AliVertex();                   // Default destructor
-  AliVertex(AliVertex& v);                // Copy constructor
-  virtual TObject* Clone(const char* name=""); // Make a deep copy and provide its pointer
-  virtual void SetOwner(Bool_t own=kTRUE);// Set ownership of all added objects
-  virtual void Reset();                   // Reset all values and stored vertex and jet lists
-  void ResetVertices();                   // Reset stored vertex list
-  void AddJet(AliJet& j,Int_t tracks=1);  // Add a jet (and its tracks) to the vertex
-  void AddVertex(AliVertex& v,Int_t connect=1);// Add (and connect) a (sec.) vertex to the current vertex
+  AliVertex();                             // Default constructor
+  AliVertex(Int_t n);                      // Create a vertex to hold initially n tracks
+  virtual ~AliVertex();                    // Default destructor
+  AliVertex(const AliVertex& v);           // Copy constructor
+  virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer
+  virtual void SetOwner(Bool_t own=kTRUE); // Set ownership of all added objects
+  virtual void Reset();                    // Reset all values and stored vertex and jet lists
+  void ResetVertices();                    // Reset stored vertex list
+  void AddJet(AliJet& j,Int_t tracks=1);   // Add a jet (and its tracks) to the vertex
+  void AddVertex(AliVertex& v,Int_t connect=1); // Add (and connect) a (sec.) vertex to the current vertex
   void AddJet(AliJet* j,Int_t tracks=1)    { AddJet(*j,tracks); }
   void AddVertex(AliVertex* v,Int_t connect=1) { AddVertex(*v,connect); }
-  virtual void Data(TString f="car");     // Print the vertex info within coordinate frame f
-  virtual void List(TString f="car");     // Print vertex prim. track information for coord. frame f
-  virtual 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      
-  Int_t IsConnectTrack(AliTrack* t);      // Indicate if track is created by vertex connection
-  Int_t IsJetTrack(AliTrack* t);          // Indicate if track is resulting from jet addition
+  virtual void Data(TString f="car");      // Print the vertex info within coordinate frame f
+  virtual void List(TString f="car");      // Print vertex prim. track information for coord. frame f
+  virtual void ListAll(TString f="car");   // Print prim. + sec. vertex full track info for coord. frame f
+  Int_t GetNvertices() const;              // Return the number of (secondary) vertices
+  AliVertex* GetVertex(Int_t i) const;     // Provide i-th (secondary) vertex
+  AliVertex* GetIdVertex(Int_t id) const;  // 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() const;             // Provide VertexCopy flag value      
+  Int_t GetNjets() const;                  // Return the number of jets
+  AliJet* GetJet(Int_t i) const;           // Provide i-th jet
+  AliJet* GetIdJet(Int_t id) const;        // 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() const;                // Provide JetCopy flag value      
+  Int_t IsConnectTrack(AliTrack* t) const; // Indicate if track is created by vertex connection
+  Int_t IsJetTrack(AliTrack* t) const;     // Indicate if track is resulting from jet addition
   virtual void Draw(Option_t*) { Draw(1,1,0); } // Override TObject::Draw for default event display
   virtual void Draw(Int_t secs,Int_t cons=1,Int_t jets=0); // Draw the vertex in an event display
 
@@ -66,6 +66,6 @@ class AliVertex : public AliJet,public AliPosition
  private:
   void Dumps(AliVertex* v,Int_t n,TString f); // Recursively print all sec. vertices
  
- ClassDef(AliVertex,8) // Creation and investigation of an AliVertex.
+ ClassDef(AliVertex,9) // Creation and investigation of an AliVertex.
 };
 #endif
index 9bf4a6eb64abe73de8cac4390168ddb2f783503f..8cfdaf8c3b1c3183b019efa99b360d2c073beef8 100644 (file)
 12-mar-2004 NvE Additional "cout << endl;" in front of AliCollider initialisation message in order to always
                 have the initialisation message starting on a new line. On some systems the fortran
                 carriage control of the pure Pythia doesn't get treated correctly.
+04-apr-2004 NvE SetMass() invoked from AliTrack::Set3Momentum to get also the energy properly initialised.
+09-apr-2004 NvE Support for specification of unit scale introduced in AliPosition.
+19-apr-2004 NvE Memberfunction GetPrimed introduced for Ali3Vector.
+04-may-2004 NvE Various memberfunctions declared "const" to satisfy the strict Alice coding rules
+                and also to allow better compiler optimisation.