]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Moving the AliStrLine and AliTracker classes from libESD.so back to libSTEER.so....
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 May 2006 17:10:35 +0000 (17:10 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 May 2006 17:10:35 +0000 (17:10 +0000)
STEER/AliExternalTrackParam.cxx
STEER/AliExternalTrackParam.h
STEER/AliVertexerTracks.cxx
STEER/ESDLinkDef.h
STEER/STEERLinkDef.h
STEER/libESD.pkg
STEER/libSTEER.pkg

index 6a3e4da1b53d45573853170ee08a3810de2e175a..d6e105519006363f524549ffe0ddd61096054a0a 100644 (file)
@@ -27,8 +27,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 #include "AliExternalTrackParam.h"
 #include "AliKalmanTrack.h"
-#include "AliTracker.h"
-#include "AliStrLine.h"
 #include "AliESDVertex.h"
 
 
@@ -734,25 +732,6 @@ AliExternalTrackParam::GetXYZAt(Double_t x, Double_t b, Double_t *r) const {
   return Local2GlobalPosition(r,fAlpha);
 }
 
-
-//_____________________________________________________________________________
-void AliExternalTrackParam::ApproximateHelixWithLine(Double_t xk, Double_t b, AliStrLine *line)
-{
-  //------------------------------------------------------------
-  // Approximate the track (helix) with a straight line tangent to the
-  // helix in the point defined by r (F. Prino, prino@to.infn.it)
-  //------------------------------------------------------------
-  Double_t mom[3];
-  Double_t azim = TMath::ASin(fP[2])+fAlpha;
-  Double_t theta = TMath::Pi()/2. - TMath::ATan(fP[3]);
-  mom[0] = TMath::Sin(theta)*TMath::Cos(azim);
-  mom[1] = TMath::Sin(theta)*TMath::Sin(azim);
-  mom[2] = TMath::Cos(theta);
-  Double_t pos[3];
-  GetXYZAt(xk,b,pos);
-  line->SetP0(pos);
-  line->SetCd(mom);
-}
 //_____________________________________________________________________________
 void AliExternalTrackParam::Print(Option_t* /*option*/) const
 {
@@ -771,13 +750,16 @@ void AliExternalTrackParam::Print(Option_t* /*option*/) const
 }
 
 
-Bool_t AliExternalTrackParam::PropagateTo(Double_t xToGo, Double_t mass, Double_t maxStep, Bool_t rotateTo){
+Bool_t AliExternalTrackParam::PropagateTo(Double_t xToGo, Double_t b, Double_t mass, Double_t maxStep, Bool_t rotateTo){
   //----------------------------------------------------------------
-  // Propagate this track to the plane X=xk (cm) 
-  // correction for unhomogenity of the magnetic field and the
+  //
+  // Very expensive function !  Don't abuse it !
+  //
+  // Propagates this track to the plane X=xk (cm) 
+  // in the magnetic field "b" (kG),
   // the correction for the material is included
   //
-  //  Require acces to magnetic field and geomanager
+  //  Requires acces to geomanager
   //
   // mass     - mass used in propagation - used for energy loss correction
   // maxStep  - maximal step for propagation
@@ -787,17 +769,19 @@ Bool_t AliExternalTrackParam::PropagateTo(Double_t xToGo, Double_t mass, Double_
   Double_t dir      = (xpos<xToGo) ? 1.:-1.;
   //
   while ( (xToGo-xpos)*dir > kEpsilon){
+    if (TMath::Abs(fP[2]) >= kAlmost1) { return kFALSE;}
     Double_t step = dir*TMath::Min(TMath::Abs(xToGo-xpos), maxStep);
     Double_t x    = xpos+step;
     Double_t xyz0[3],xyz1[3],param[7];
     GetXYZ(xyz0);   //starting global position
-    Float_t  pos0[3] = {xyz0[0],xyz0[1],xyz0[2]};
-    Double_t magZ = AliTracker::GetBz(pos0);
-    if (!GetXYZAt(x,magZ,xyz1)) return kFALSE;   // no prolongation
+    if (!GetXYZAt(x,b,xyz1)) return kFALSE;   // no prolongation
     AliKalmanTrack::MeanMaterialBudget(xyz0,xyz1,param);       
-    if (!PropagateTo(x,magZ))  return kFALSE;
-    Double_t distance = param[4];
-    if (!CorrectForMaterial(distance,param[1],param[0],mass)) return kFALSE;
+    if (!PropagateTo(x,b))  return kFALSE;
+
+    Double_t rho=param[0],x0=param[1],distance=param[4];
+    Double_t d=distance*rho/x0;
+
+    if (!CorrectForMaterial(d,x0,mass)) return kFALSE;
     if (rotateTo){
       GetXYZ(xyz0);   // global position
       Double_t alphan = TMath::ATan2(xyz0[1], xyz0[0]);
@@ -808,37 +792,6 @@ Bool_t AliExternalTrackParam::PropagateTo(Double_t xToGo, Double_t mass, Double_
   return kTRUE;
 }
 
-//_____________________________________________________________________________
-Bool_t AliExternalTrackParam::CorrectForMaterial(Double_t d, Double_t x0, Double_t rho, Double_t mass)
-{
-  //
-  // Take into account material effects assuming:
-  // x0  - mean rad length
-  // rho - mean density
 
-  //
-  // multiple scattering
-  //
-  if (mass<=0) {
-    AliError("Non-positive mass");
-    return kFALSE;
-  }
-  Double_t p2=(1.+ fP[3]*fP[3])/(fP[4]*fP[4]);
-  Double_t beta2=p2/(p2 + mass*mass);
-  Double_t theta2=14.1*14.1/(beta2*p2*1e6)*d/x0*rho;
-  //
-  fC[5] += theta2*(1.- fP[2]*fP[2])*(1. + fP[3]*fP[3]);
-  fC[9] += theta2*(1. + fP[3]*fP[3])*(1. + fP[3]*fP[3]);
-  fC[13] += theta2*fP[3]*fP[4]*(1. + fP[3]*fP[3]);
-  fC[14] += theta2*fP[3]*fP[4]*fP[3]*fP[4];
-  //
-  Double_t dE=0.153e-3/beta2*(log(5940*beta2/(1-beta2+1e-10)) - beta2)*d*rho;  
-  fP[4] *=(1.- TMath::Sqrt(p2+mass*mass)/p2*dE);
-  //
-  Double_t sigmade = 0.02*TMath::Sqrt(TMath::Abs(dE));   // energy loss fluctuation 
-  Double_t sigmac2 = sigmade*sigmade*fP[4]*fP[4]*(p2+mass*mass)/(p2*p2);
-  fC[14] += sigmac2;
-  return kTRUE;
-}
 
 
index 7d42e69220e14214145099baabc27b3df8b3c1d7..d6ccf21e0f741018aea67e7e9a175139eb3753cb 100644 (file)
@@ -30,7 +30,6 @@ const Double_t kVeryBigConvConst=1/kB2C/kAlmost0Field;
 const Double_t kMostProbableMomentum=0.35;
 
 class AliKalmanTrack;
-class AliStrLine;
 class AliESDVertex;
 
 class AliExternalTrackParam: public TObject {
@@ -78,11 +77,9 @@ class AliExternalTrackParam: public TObject {
   Bool_t GetCovarianceXYZPxPyPz(Double_t cv[21]) const;
   Bool_t GetPxPyPzAt(Double_t x, Double_t b, Double_t p[3]) const;
   Bool_t GetXYZAt(Double_t x, Double_t b, Double_t r[3]) const;
-  void ApproximateHelixWithLine(Double_t xk, Double_t b, AliStrLine *line);
   void Print(Option_t* option = "") const;
   // MI
-  virtual Bool_t   CorrectForMaterial(Double_t d, Double_t x0, Double_t rho, Double_t mass);
-  virtual Bool_t   PropagateTo(Double_t x, Double_t mass, Double_t maxStep, Bool_t rotateTo=kTRUE);
+  virtual Bool_t   PropagateTo(Double_t x, Double_t b, Double_t mass, Double_t maxStep, Bool_t rotateTo=kTRUE);
 
 private:
   Double_t             fX;     // X coordinate for the point of parametrisation
index 12bbf299ef516d84630a4cfdcf700828e3072915..6df10a849d0eb82d383caa9ffac682bca6601eac 100644 (file)
@@ -206,15 +206,20 @@ void AliVertexerTracks::VertexFinder(Int_t optUseWeights) {
     track1 = (AliESDtrack*)fTrkArray.At(i);
     alpha=track1->GetAlpha();
     mindist = TMath::Cos(alpha)*fNominalPos[0]+TMath::Sin(alpha)*fNominalPos[1];
-    AliStrLine *line1 = new AliStrLine();
-    track1->ApproximateHelixWithLine(mindist,field,line1);
+
+    Double_t pos[3]; track1->GetXYZAt(mindist,field,pos);
+    Double_t dir[3]; track1->GetPxPyPzAt(mindist,field,dir);
+    AliStrLine *line1 = new AliStrLine(pos,dir);
    
     for(Int_t j=i+1; j<nacc; j++){
       track2 = (AliESDtrack*)fTrkArray.At(j);
       alpha=track2->GetAlpha();
       mindist = TMath::Cos(alpha)*fNominalPos[0]+TMath::Sin(alpha)*fNominalPos[1];
-      AliStrLine *line2 = new AliStrLine();
-      track2->ApproximateHelixWithLine(mindist,field,line2);
+
+      Double_t pos[3]; track2->GetXYZAt(mindist,field,pos);
+      Double_t dir[3]; track2->GetPxPyPzAt(mindist,field,dir);
+      AliStrLine *line2 = new AliStrLine(pos,dir);
+
       Double_t distCA=line2->GetDCA(line1);
       if(fDCAcut<=0 || (fDCAcut>0&&distCA<fDCAcut)){
        Double_t pnt1[3],pnt2[3],crosspoint[3];
@@ -376,8 +381,10 @@ void AliVertexerTracks::StrLinVertexFinderMinDist(Int_t optUseWeights){
     track1 = (AliESDtrack*)fTrkArray.At(i);
     Double_t alpha=track1->GetAlpha();
     Double_t mindist = TMath::Cos(alpha)*fNominalPos[0]+TMath::Sin(alpha)*fNominalPos[1];
-    AliStrLine *line1 = new AliStrLine();
-    track1->ApproximateHelixWithLine(mindist,field,line1);
+
+    Double_t pos[3]; track1->GetXYZAt(mindist,field,pos);
+    Double_t dir[3]; track1->GetPxPyPzAt(mindist,field,pos);
+    AliStrLine *line1 = new AliStrLine(pos,dir);
 
     Double_t p0[3],cd[3];
     line1->GetP0(p0);
index abf00245d64e1080dd9cce1d6609fa9ac0379b74..8464680e5068865438f74aea26a10831b30b5126 100644 (file)
@@ -31,7 +31,6 @@
 #pragma link C++ class  AliKalmanTrack+;
 #pragma link C++ class  AliHelix+;
 #pragma link C++ class  AliExternalTrackParam+;
-#pragma link C++ class  AliStrLine+;
 #pragma link C++ class  AliLog+;
 #pragma link C++ class  AliPID+;
 #pragma link C++ class  AliTrackPointArray+;
@@ -49,7 +48,6 @@
 #pragma link C++ class AliTrackPointArray+;
 #pragma link C++ class AliTrackPoint+;
 #pragma link C++ class  AliCluster+;
-#pragma link C++ class  AliTracker+;
 
 #pragma link C++ class  AliESDFMD+;
 #pragma link C++ class  AliFMDMap+;
index fbc4dd5a7db195e003aff283d8a2830ef8b13f4e..02f1d514293a13b49b99441506a716cc377adeb8 100644 (file)
 #pragma link C++ class  AliSimulation+;
 #pragma link C++ class  AliReconstruction+;
 #pragma link C++ class  AliVertexGenFile+;
+#pragma link C++ class  AliTracker+;
 #pragma link C++ class  AliVertexer+;
 #pragma link C++ class  AliVertexerTracks+;
+#pragma link C++ class  AliStrLine+;
 #pragma link C++ class  AliV0vertexer+;
 #pragma link C++ class  AliCascadeVertexer+;
 
index cecf248212351fa190a35d4c7585b78fa7552373..36bc2d75cdee34641932f0867d5b510b29943689 100644 (file)
@@ -5,11 +5,10 @@ SRCS = AliESD.cxx AliESDfriend.cxx\
        AliESDpid.cxx AliESDkink.cxx AliESDV0MI.cxx \
        AliESDCaloCluster.cxx \
        AliKalmanTrack.cxx AliHelix.cxx AliExternalTrackParam.cxx \
-       AliStrLine.cxx \
        AliLog.cxx AliPID.cxx AliESDV0MIParams.cxx \
        AliRunTag.cxx AliLHCTag.cxx AliDetectorTag.cxx AliEventTag.cxx \
        AliTagCreator.cxx AliTagAnalysis.cxx AliEventTagCuts.cxx \
-       AliTrackPointArray.cxx AliTracker.cxx AliCluster.cxx \
+       AliTrackPointArray.cxx AliCluster.cxx \
        AliESDFMD.cxx AliFMDMap.cxx AliFMDFloatMap.cxx \
        AliESDMultITS.cxx
 
index 0a6d630cc91804565a473d782e3b6e5539b33de5..18d51b15cebfe8b2ee4a0d25f9adf862e8773dd3 100644 (file)
@@ -16,7 +16,8 @@ AliMergeCombi.cxx AliMagFMaps.cxx AliFieldMap.cxx \
 AliGausCorr.cxx AliTrackReference.cxx \
 AliTrackMap.cxx AliTrackMapper.cxx AliCollisionGeometry.cxx \
 AliMemoryWatcher.cxx \
-AliVertexer.cxx  AliVertexerTracks.cxx \
+AliTracker.cxx \
+AliVertexer.cxx  AliVertexerTracks.cxx AliStrLine.cxx \
 AliV0vertexer.cxx AliCascadeVertexer.cxx\
 AliMC.cxx AliSimulation.cxx AliReconstruction.cxx AliVertexGenFile.cxx \
 AliCDBEntry.cxx AliCDBId.cxx AliCDBMetaData.cxx \