#include "AliMagF.h"
#include "TFile.h"
-#include "Riostream.h"
+#include "TError.h"
extern AliRun* gAlice;
// 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;
}
////////////////////////////////////////////////////////////////////////
// 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();
// 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;
// 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:
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);
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
};