]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Including error of vertex position (Yu.Belikov)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Mar 2003 16:15:21 +0000 (16:15 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Mar 2003 16:15:21 +0000 (16:15 +0000)
STEER/AliTracker.cxx
STEER/AliTracker.h

index 703799c8aa9238730fe090d239043940f79be878..6796b22445efc924b54d2270078cdb5c20ef1380 100644 (file)
@@ -30,7 +30,7 @@
 #include "AliMagF.h"
 
 #include "TFile.h"
-#include "Riostream.h"
+#include "TError.h"
 
 
 extern AliRun* gAlice;
@@ -100,8 +100,10 @@ Int_t AliTracker::SetFieldFactor() {
 // Utility class to set the value of the magnetic field in the barrel
 // It supposes that the correct object gAlice is in the memory
 //
-   AliKalmanTrack::SetConvConst(1000/0.299792458/gAlice->Field()->SolenoidField());
-   cout<<"Magnetic field in kGauss: "<<gAlice->Field()->SolenoidField()<<endl;
+   AliKalmanTrack::
+      SetConvConst(1000/0.299792458/gAlice->Field()->SolenoidField());
+   Double_t field=gAlice->Field()->SolenoidField();
+   ::Info("SetFieldFactor","Magnetic field in kGauss: %f\n",field);
    return 0;
 }
 ////////////////////////////////////////////////////////////////////////
@@ -111,7 +113,8 @@ Int_t AliTracker::SetFieldFactor(TFile *file, Bool_t deletegAlice) {
 // gAlice object is read from the file, and optionally deleted
 // 
   if (!(gAlice=(AliRun*)file->Get("gAlice"))) {
-    cerr<<"gAlice has not been found in file "<<file->GetName();
+   ::Warning
+   ("SetFieldFactor","gAlice has not been found in file %s\n",file->GetName());
     return 1;
   }   
   Int_t rc = SetFieldFactor();
@@ -128,7 +131,10 @@ Int_t AliTracker::SetFieldFactor(Char_t* fileName, Bool_t closeFile) {
 // gAlice object is read from the file, the file is optionally closed
 // 
    TFile *file=TFile::Open(fileName);
-   if (!file->IsOpen()) {cerr<<"Cannnot open "<<fileName<<" !\n"; return 1;}
+   if (!file->IsOpen()) {
+      ::Warning("AliTracker::SetFieldFactor","Cannnot open %s !\n",fileName); 
+      return 1;
+   }
    Int_t rc = SetFieldFactor(file, closeFile) ;
    if (closeFile) file->Close();
    return rc;
index 3f01f55d5e763f2a234f0714e81e33c6a5e31393..4754002139c7df21093921abc12db8c7e66dbdf5 100644 (file)
 //   that is the base for AliTPCtracker, AliITStrackerV2 and AliTRDtracker
 //       Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
 //-------------------------------------------------------------------------
-#include <Rtypes.h>
+#include <TObject.h>
 
 class AliKalmanTrack;
 class AliCluster;
 class TFile;
 
-class AliTracker {
+class AliTracker : public TObject {
 public:
-  AliTracker() { fX=fY=fZ=0.; fEventN=0; }
+  AliTracker() { fX=fY=fZ=0.; fSigmaX=fSigmaY=fSigmaZ=0.; fEventN=0; }
   virtual ~AliTracker(){}
   virtual Int_t Clusters2Tracks(const TFile *in, TFile *out)=0;
   virtual Int_t PropagateBack(const TFile *in, TFile *out)=0;
-  void SetVertex(Double_t *xyz) { fX=xyz[0]; fY=xyz[1]; fZ=xyz[2]; }
+  void SetVertex(const Double_t *xyz, const Double_t *ers=0) { 
+     fX=xyz[0]; fY=xyz[1]; fZ=xyz[2];
+     if (ers) { fSigmaX=ers[0]; fSigmaY=ers[1]; fSigmaZ=ers[2]; } 
+  }
   void SetEventNumber(Int_t ev) { fEventN=ev; }
 
 //protected:
@@ -32,6 +35,9 @@ public:
   Double_t GetX() const {return fX;}
   Double_t GetY() const {return fY;}
   Double_t GetZ() const {return fZ;}
+  Double_t GetSigmaX() const {return fSigmaX;}
+  Double_t GetSigmaY() const {return fSigmaY;}
+  Double_t GetSigmaZ() const {return fSigmaZ;}
   Int_t GetEventNumber() const {return fEventN;}
 
   static Int_t SetFieldFactor(Char_t* fileName, Bool_t closeFile = kTRUE);
@@ -45,6 +51,10 @@ private:
   Double_t fY;  //Y-coordinate of the primary vertex
   Double_t fZ;  //Z-coordinate of the primary vertex
 
+  Double_t fSigmaX; // error of the primary vertex position in X
+  Double_t fSigmaY; // error of the primary vertex position in Y
+  Double_t fSigmaZ; // error of the primary vertex position in Z
+
   ClassDef(AliTracker,1) //abstract tracker
 };