#include "AliL3StandardIncludes.h"
#include <sys/time.h>
-#include "AliL3ConfMapper.h"
#include "AliL3Logging.h"
#include "AliL3Vertex.h"
#include "AliL3ConfMapTrack.h"
#include "AliL3ConfMapPoint.h"
#include "AliL3TrackArray.h"
#include "AliL3Transform.h"
+#include "AliL3ConfMapper.h"
/** \class AliL3ConfMapper
<pre>
fVolume = NULL;
fRow = NULL;
fBench = (Bool_t)true;
- fParamSet = (Bool_t)false;
fVertexConstraint = (Bool_t)true;
-
+ fParamSet[0]=0;
+ fParamSet[1]=0;
}
}
void AliL3ConfMapper::InitSector(Int_t sector,Int_t *rowrange,Float_t *etarange)
-{
+{ //sector means slice here
//Initialize tracker for tracking in a given sector.
//Resets track and hit arrays.
//Here it is also possible to specify a subsector, by defining
else
{
fEtaMin = 0;
- //fEtaMax = sector < 18 ? 1 : -1;
fEtaMax = sector < 18 ? 0.9 : -0.9;
}
fTrack->Reset();
}
-
-
Bool_t AliL3ConfMapper::ReadHits(UInt_t count, AliL3SpacePointData* hits )
{
Int_t nhit=(Int_t)count;
return true;
}
-
void AliL3ConfMapper::SetPointers()
{
-
//Check if there are not enough clusters to make a track in this sector
//Can happen in pp events.
+
if(fClustersUnused < fMinPoints[fVertexConstraint])
return;
Int_t local_counter=0;
for(Int_t j=0; j<fClustersUnused; j++)
{
-
//AliL3ConfMapPoint *thisHit = (AliL3ConfMapPoint*)fHit->At(j);
AliL3ConfMapPoint *thisHit = &(fHit[j]);
if(thisHit->phiIndex<1 || thisHit->phiIndex>fNumPhiSegment)
{
+ //cout << "Phiindex: " << thisHit->phiIndex << " " << thisHit->GetPhi() << endl;
fPhiHitsOutOfRange++;
continue;
}
thisHit->etaIndex=(Int_t)((thisHit->GetEta()-fEtaMin)/etaSlice + 1);
if(thisHit->etaIndex<1 || thisHit->etaIndex>fNumEtaSegment)
{
+ //cout << "Etaindex: " << thisHit->etaIndex << " " << thisHit->GetEta() << endl;
fEtaHitsOutOfRange++;
continue;
}
else
((AliL3ConfMapPoint *)(fRow[(localrow-fRowMin)].last))->nextRowHit = thisHit;
fRow[(localrow-fRowMin)].last = (void *)thisHit;
-
-
}
if(fClustersUnused>0 && local_counter==0)
<<AliL3Log::kDec<<"No points passed to track finder, hits out of range: "
<<fEtaHitsOutOfRange+fPhiHitsOutOfRange<<ENDLOG;
+ Int_t hits_accepted=fClustersUnused-(fEtaHitsOutOfRange+fPhiHitsOutOfRange);
LOG(AliL3Log::kInformational,"AliL3ConfMapper::SetPointers","Setup")
<<"Setup finished, hits out of range: "<<fEtaHitsOutOfRange+fPhiHitsOutOfRange
- <<" hits accepted "<<fClustersUnused<<ENDLOG;
+ <<" hits accepted "<<hits_accepted<<ENDLOG;
}
void AliL3ConfMapper::MainVertexTracking_a()
{
//Tracking with vertex constraint.
- if(!fParamSet)
+ if(!fParamSet[(Int_t)kTRUE])
{
LOG(AliL3Log::kError,"AliL3ConfMapper::MainVertexTracking","Parameters")<<AliL3Log::kDec<<
"Tracking parameters not set!"<<ENDLOG;
Double_t initCpuTime,cpuTime;
initCpuTime = CpuTime();
+
SetPointers();
SetVertexConstraint(true);
cpuTime = CpuTime() - initCpuTime;
{
//Tracking with vertex constraint.
- if(!fParamSet)
+ if(!fParamSet[(Int_t)kTRUE])
{
LOG(AliL3Log::kError,"AliL3ConfMapper::MainVertexTracking","Parameters")<<AliL3Log::kDec<<
"Tracking parameters not set!"<<ENDLOG;
{
//Tracking with vertex constraint.
- if(!fParamSet)
+ if(!fParamSet[(Int_t)kTRUE])
{
LOG(AliL3Log::kError,"AliL3ConfMapper::MainVertexTracking","Parameters")<<AliL3Log::kDec<<
"Tracking parameters not set!"<<ENDLOG;
//in order to do tracking on the remaining clusters.
//The conformal mapping is now done with respect to the first cluster
//assosciated with this track.
-
+
+ if(!fParamSet[(Int_t)kFALSE])
+ {
+ LOG(AliL3Log::kError,"AliL3ConfMapper::NonVertexTracking","Parameters")<<AliL3Log::kDec<<
+ "Tracking parameters not set!"<<ENDLOG;
+ return;
+ }
+
SetVertexConstraint(false);
ClusterLoop();
LOG(AliL3Log::kInformational,"AliL3ConfMapper::NonVertexTracking","ntracks")<<AliL3Log::kDec<<
SetMinPoints(tracklength,(Bool_t)true);
fMaxPhi=maxphi;
fMaxEta=maxeta;
+ SetParamDone(kTRUE);
}
void AliL3ConfMapper::NonVertexSettings(Int_t trackletlength, Int_t tracklength,
SetRowScopeTracklet(rowscopetracklet, (Bool_t)false);
SetRowScopeTrack(rowscopetrack, (Bool_t)false);
SetMinPoints(tracklength,(Bool_t)false);
+ SetParamDone(kFALSE);
}
-void AliL3ConfMapper::SetTrackCuts(Double_t hitChi2Cut, Double_t goodHitChi2, Double_t trackChi2Cut,Int_t maxdist,
- Bool_t vertexconstraint)
+void AliL3ConfMapper::SetTrackCuts(Double_t hitChi2Cut, Double_t goodHitChi2, Double_t trackChi2Cut,Int_t maxdist,Bool_t vertexconstraint)
{
//Settings for tracks. The cuts are:
//HitChi2Cut: Maximum hit chi2
{
if(fRow[(row_segm-fRowMin)].first && ((AliL3ConfMapPoint*)fRow[(row_segm-fRowMin)].first)->GetPadRow() < fRowMin + 1)
break;
+
for(hit = (AliL3ConfMapPoint*)fRow[(row_segm-fRowMin)].first; hit!=0; hit=hit->nextRowHit)
{
if(hit->GetUsage() == true)
}
//make a smart loop
- Int_t loop_eta[9] = {0,0,0,-1,-1,-1,1,1,1};
- Int_t loop_phi[9] = {0,-1,1,0,-1,1,0,-1,1};
+ Int_t loop_eta[25] = {0,0,0,-1,-1,-1,1,1,1, 0,0,-1,-1,1,1,-2,-2,-2,-2,-2,2,2,2,2,2};
+ Int_t loop_phi[25] = {0,-1,1,0,-1,1,0,-1,1, -2,2,-2,2,-2,2,-2,-1,0,1,2,-2,-1,0,1,2};
if(min_row < fRowMin)
min_row = fRowMin;
{
sub_phi_segm = start_hit->phiIndex + loop_phi[i];
- if(sub_phi_segm<0)
+ if(sub_phi_segm < 0 || sub_phi_segm >= fNumPhiSegment)
+ continue;
+ /*
+ if(sub_phi_segm<0)
sub_phi_segm += fNumPhiSegment;
-
- else if(sub_phi_segm >=fNumPhiSegment)
+
+ else if(sub_phi_segm >=fNumPhiSegment)
sub_phi_segm -= fNumPhiSegment;
-
+ */
//loop over sub eta segments
sub_eta_segm = start_hit->etaIndex + loop_eta[i];
{
AliL3ConfMapTrack *track = (AliL3ConfMapTrack*)fTrack->GetTrack(i);
track->Fill(fVertex,fMaxDca);
+
}
return 1;