#include <TBranch.h>
#include <TObjArray.h>
#include <TTree.h>
-#include "AliSysInfo.h" // memory snapshots
+
#include "AliESDEvent.h"
#include "AliESDVertex.h"
#include "AliESDtrack.h"
#include "AliITSReconstructor.h"
#include "AliLog.h"
#include "AliRun.h"
-#include "AliClonesPool.h"
-#include "AliPoolsSet.h"
ClassImp(AliITStrackerSA)
// is done in the ITS only. In the standard reconstruction chain this option
// can be set via AliReconstruction::SetOption("ITS","onlyITS")
Int_t rc=0;
- if (fPools && !fPools->GetPoolTrITS()) fPools->SetPool(new AliClonesPool("AliITStrackMI",5000), AliPoolsSet::kPoolTrITS);
- //
- static int eventNr = 0;
+
if(!fITSStandAlone){
rc=AliITStrackerMI::Clusters2Tracks(event);
- AliSysInfo::AddStamp(Form("TracMI_%d",eventNr), -1,1,-1);
}
else {
AliDebug(1,"Stand Alone flag set: doing tracking in ITS alone\n");
rc=FindTracks(event,kTRUE);
}
}
- eventNr++;
return rc;
}
Int_t AliITStrackerSA::FindTracks(AliESDEvent* event, Bool_t useAllClusters){
// Track finder using the ESD object
- static int eventNr = 0;
AliDebug(2,Form(" field is %f",event->GetMagneticField()));
AliDebug(2,Form("SKIPPING %d %d %d %d %d %d",ForceSkippingOfLayer(0),ForceSkippingOfLayer(1),ForceSkippingOfLayer(2),ForceSkippingOfLayer(3),ForceSkippingOfLayer(4),ForceSkippingOfLayer(5)));
if(!useAllClusters) AliInfo(Form("Number of found tracks: %d",event->GetNumberOfTracks()));
ResetForFinding();
- AliSysInfo::AddStamp(Form("TracSA_%d",eventNr), useAllClusters ? 1:0,1,-1);
- eventNr++;
return 0;
}
//given (x,y) of three recpoints (in global coordinates)
//returns the parameters a,b,c of circonference x*x + y*y +a*x + b*y +c
-
- Double_t den = (x3-x1)*(y2-y1)-(x2-x1)*(y3-y1);
+ double dx31=x3-x1,dy31=y3-y1,dx21=x2-x1,dy21=y2-y1;
+ Double_t den = dx31*dy21-dx21*dy31;
if(den==0) return 0;
- a = ((y3-y1)*(x2*x2+y2*y2-x1*x1-y1*y1)-(y2-y1)*(x3*x3+y3*y3-x1*x1-y1*y1))/den;
- b = -(x2*x2-x1*x1+y2*y2-y1*y1+a*(x2-x1))/(y2-y1);
+ else den = 1./den;
+ //
+ double r31 = -dx31*(x1+x3) - dy31*(y1+y3);
+ double r21 = -dx21*(x1+x2) - dy21*(y1+y2);
+ //
+ double da = r31*dy21 - r21*dy31;
+ double db = r21*dx31 - r31*dx21;
+ a = da*den;
+ b = db*den;
c = -x1*x1-y1*y1-a*x1-b*y1;
return 1;
}