* provided "as is" without express or implied warranty. *
**************************************************************************/
-/* $Header$ */
+/* $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 "AliRun.h"
+#include "AliMagF.h"
+
+extern AliRun* gAlice;
+
+const AliMagF *AliTracker::fgkFieldMap=0;
ClassImp(AliTracker)
+AliTracker::AliTracker():
+ fEventN(0),
+ fStoreBarrel(1),
+ fX(0),
+ fY(0),
+ fZ(0),
+ fSigmaX(0.005),
+ fSigmaY(0.005),
+ fSigmaZ(0.010)
+{
+ //--------------------------------------------------------------------
+ // The default constructor.
+ //--------------------------------------------------------------------
+ AliMagF *field=gAlice->Field();
+ if (field==0) Fatal("AliTracker()","Can't access the field map !");
+ SetFieldMap(field);
+}
+
+void AliTracker::SetFieldMap(const AliMagF* map) {
+ //--------------------------------------------------------------------
+ //This passes the field map to the reconstruction.
+ //--------------------------------------------------------------------
+ if (map==0) ::Fatal("SetFieldMap","Can't access the field map !");
+ AliKalmanTrack::SetConvConst(1000/0.299792458/map->SolenoidField());
+ 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();
}
}
-
-