* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//-------------------------------------------------------------------------
// Implementation of the AliTracker class
-//
-// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+// that is the base for AliTPCtracker, AliITStrackerV2 and AliTRDtracker
+// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
//-------------------------------------------------------------------------
+
#include <TMath.h>
#include "AliTracker.h"
#include "AliCluster.h"
#include "AliKalmanTrack.h"
+#include "AliLog.h"
+#include "AliRun.h"
+#include "AliMagF.h"
+
+const AliMagF *AliTracker::fgkFieldMap=0;
ClassImp(AliTracker)
-Double_t AliTracker::fX;
-Double_t AliTracker::fY;
-Double_t AliTracker::fZ;
+AliTracker::AliTracker():
+ fEventN(0),
+ fStoreBarrel(1),
+ fX(0),
+ fY(0),
+ fZ(0),
+ fSigmaX(0.005),
+ fSigmaY(0.005),
+ fSigmaZ(0.010)
+{
+ //--------------------------------------------------------------------
+ // The default constructor.
+ //--------------------------------------------------------------------
+ if (!fgkFieldMap) AliWarning("Field map is not set. Call AliTracker::SetFieldMap before creating a tracker!");
+}
+
+void AliTracker::SetFieldMap(const AliMagF* map) {
+ //--------------------------------------------------------------------
+ //This passes the field map to the reconstruction.
+ //--------------------------------------------------------------------
+ if (map==0) AliFatalClass("Can't access the field map !");
+ AliKalmanTrack::SetConvConst(1000/0.299792458/(map->SolenoidField()+1e-13));
+ fgkFieldMap=map;
+}
//__________________________________________________________________________
void AliTracker::CookLabel(AliKalmanTrack *t, Float_t wrong) const {
for (i=0; i<noc; i++) {
AliCluster *c=clusters[i];
- if (TMath::Abs(c->GetLabel(1)) == lab ||
- TMath::Abs(c->GetLabel(2)) == lab ) max++;
+ //if (TMath::Abs(c->GetLabel(1)) == lab ||
+ // TMath::Abs(c->GetLabel(2)) == lab ) max++;
+ if (TMath::Abs(c->GetLabel(0)!=lab))
+ if (TMath::Abs(c->GetLabel(1)) == lab ||
+ TMath::Abs(c->GetLabel(2)) == lab ) max++;
}
if ((1.- Float_t(max)/noc) > wrong) lab=-lab;
+ t->SetFakeRatio((1.- Float_t(max)/noc));
t->SetLabel(lab);
delete[] lb;
c->Use();
}
}
-
-