3 // Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
4 //*-- Copyright © ASV
10 #include "AliL3ConfMapper.h"
12 #include "AliL3Defs.h"
13 #include "AliL3Logging.h"
14 #include "AliL3Vertex.h"
15 #include "AliL3ConfMapTrack.h"
16 #include "AliL3ConfMapPoint.h"
17 #include "AliL3TrackArray.h"
18 #include "AliL3Transform.h"
20 //_____________________________________________________________
23 // Conformal mapping base class
25 ClassImp(AliL3ConfMapper)
27 Double_t AliL3ConfMapper::pi=3.14159265358979323846;
28 Double_t AliL3ConfMapper::twopi=2*pi;
29 Double_t AliL3ConfMapper::todeg=180./pi;
31 AliL3ConfMapper::AliL3ConfMapper()
39 fBench = (Bool_t)true;
40 fParamSet = (Bool_t)false;
41 fVertexConstraint = (Bool_t)true;
46 AliL3ConfMapper::~AliL3ConfMapper()
65 void AliL3ConfMapper::InitVolumes()
68 //Allocate volumes, set conformal coordinates and pointers.
70 //Should be done after setting the track parameters
72 fNumRowSegmentPlusOne = 176;//NumRows[0]; //Maximum 32.
73 fNumPhiSegmentPlusOne = fNumPhiSegment+1;
74 fNumEtaSegmentPlusOne = fNumEtaSegment+1;
75 fNumPhiEtaSegmentPlusOne = fNumPhiSegmentPlusOne*fNumEtaSegmentPlusOne;
76 fBounds = fNumRowSegmentPlusOne * fNumPhiSegmentPlusOne * fNumEtaSegmentPlusOne;
79 if(fVolume) delete [] fVolume;
80 if(fRow) delete [] fRow;
82 LOG(AliL3Log::kInformational,"AliL3ConfMapper::InitVolumes","Memory")<<AliL3Log::kDec<<
83 "Allocating "<<fBounds*sizeof(AliL3ConfMapContainer)<<" Bytes to fVolume"<<ENDLOG;
84 LOG(AliL3Log::kInformational,"AliL3ConfMapper::InitVolumes","Memory")<<AliL3Log::kDec<<
85 "Allocating "<<fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer)<<" Bytes to fRow"<<ENDLOG;
87 fVolume = new AliL3ConfMapContainer[fBounds];
88 fRow = new AliL3ConfMapContainer[fNumRowSegmentPlusOne];
90 memset(fVolume,0,fBounds*sizeof(AliL3ConfMapContainer));
91 memset(fRow,0,fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer));
93 Int_t max_num_of_tracks = 1000;
94 Int_t max_num_of_hits = 50000;
101 fHit = new AliL3ConfMapPoint[max_num_of_hits];
102 fTrack = new AliL3TrackArray("AliL3ConfMapTrack",max_num_of_tracks);
105 void AliL3ConfMapper::InitSector(Int_t sector,Int_t *rowrange,Float_t *etarange)
107 //Initialize tracker for tracking in a given sector.
108 //Resets track and hit arrays.
109 //Here it is also possible to specify a subsector, by defining
110 //rowrange[0]=innermost row;
111 //rowrange[1]=outermostrow;
112 //Finally you can specify etaslices to save time (assuming a good seed from TRD...)
114 //Define tracking area:
117 fRowMin = rowrange[0];
118 fRowMax = rowrange[1];
120 else //complete sector
127 fEtaMin = etarange[0];
128 fEtaMax = etarange[1];
133 //fEtaMax = sector < 18 ? 1 : -1;
134 fEtaMax = sector < 18 ? 0.9 : -0.9;
137 //Set the angles to sector 2:
138 fPhiMin = -1.*10/todeg;//fParam->GetAngle(sector) - 10/todeg;
139 fPhiMax = 10/todeg;//fParam->GetAngle(sector) + 10/todeg;
142 fMainVertexTracks = 0;
145 fNumRowSegment = fRowMax - fRowMin; //number of rows to be considered by tracker
146 LOG(AliL3Log::kInformational,"AliL3ConfMapper::InitSector","B-field")
147 <<"Tracker initializing assuming magnetic field of "<<AliL3Transform::GetBField()<<ENDLOG;
154 Bool_t AliL3ConfMapper::ReadHits(UInt_t count, AliL3SpacePointData* hits )
156 Int_t nhit=(Int_t)count;
157 for (Int_t i=0;i<nhit;i++)
160 fHit[i].ReadHits(&(hits[i]));
162 fClustersUnused += nhit;
163 LOG(AliL3Log::kInformational,"AliL3ConfMapper::ReadHits","#hits")
164 <<AliL3Log::kDec<<"hit_counter: "<<nhit<<" count: "<<count<<ENDLOG;
170 void AliL3ConfMapper::SetPointers()
173 //Reset detector volumes
174 memset(fVolume,0,fBounds*sizeof(AliL3ConfMapContainer));
175 memset(fRow,0,fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer));
177 Float_t phiSlice = (fPhiMax-fPhiMin)/fNumPhiSegment;
178 Float_t etaSlice = (fEtaMax-fEtaMin)/fNumEtaSegment;
181 Int_t local_counter=0;
182 for(Int_t j=0; j<fClustersUnused; j++)
185 //AliL3ConfMapPoint *thisHit = (AliL3ConfMapPoint*)fHit->At(j);
186 AliL3ConfMapPoint *thisHit = &(fHit[j]);
188 thisHit->Setup(fVertex);
190 Int_t localrow = thisHit->GetPadRow();
192 if(localrow < fRowMin || localrow > fRowMax)
196 thisHit->phiIndex=(Int_t)((thisHit->GetPhi()-fPhiMin)/phiSlice +1);
198 if(thisHit->phiIndex<1 || thisHit->phiIndex>fNumPhiSegment)
200 fPhiHitsOutOfRange++;
204 thisHit->etaIndex=(Int_t)((thisHit->GetEta()-fEtaMin)/etaSlice + 1);
205 if(thisHit->etaIndex<1 || thisHit->etaIndex>fNumEtaSegment)
207 fEtaHitsOutOfRange++;
212 volumeIndex = (localrow-fRowMin)*fNumPhiEtaSegmentPlusOne+thisHit->phiIndex*fNumEtaSegmentPlusOne+thisHit->etaIndex;
214 if(fVolume[volumeIndex].first == NULL)
215 fVolume[volumeIndex].first = (void *)thisHit;
217 ((AliL3ConfMapPoint *)fVolume[volumeIndex].last)->nextVolumeHit=thisHit;
218 fVolume[volumeIndex].last = (void *)thisHit;
222 if(fRow[(localrow-fRowMin)].first == NULL)
223 fRow[(localrow-fRowMin)].first = (void *)thisHit;
225 ((AliL3ConfMapPoint *)(fRow[(localrow-fRowMin)].last))->nextRowHit = thisHit;
226 fRow[(localrow-fRowMin)].last = (void *)thisHit;
231 if(fClustersUnused>0 && local_counter==0)
232 LOG(AliL3Log::kError,"AliL3ConfMapper::SetPointers","Parameters")
233 <<AliL3Log::kDec<<"No points passed to track finder, hits out of range: "
234 <<fEtaHitsOutOfRange+fPhiHitsOutOfRange<<ENDLOG;
236 LOG(AliL3Log::kInformational,"AliL3ConfMapper::SetPointers","Setup")
237 <<"Setup finished, hits out of range: "<<fEtaHitsOutOfRange+fPhiHitsOutOfRange
238 <<" hits accepted "<<fClustersUnused<<ENDLOG;
241 void AliL3ConfMapper::MainVertexTracking_a()
243 //Tracking with vertex constraint.
247 LOG(AliL3Log::kError,"AliL3ConfMapper::MainVertexTracking","Parameters")<<AliL3Log::kDec<<
248 "Tracking parameters not set!"<<ENDLOG;
252 Double_t initCpuTime,cpuTime;
253 initCpuTime = CpuTime();
255 SetVertexConstraint(true);
256 cpuTime = CpuTime() - initCpuTime;
258 LOG(AliL3Log::kInformational,"AliL3ConfMapper::MainVertexTracking_a","Timing")
259 <<AliL3Log::kDec<<"Setup finished in "<<cpuTime*1000<<" ms"<<ENDLOG;
263 void AliL3ConfMapper::MainVertexTracking_b()
265 //Tracking with vertex constraint.
269 LOG(AliL3Log::kError,"AliL3ConfMapper::MainVertexTracking","Parameters")<<AliL3Log::kDec<<
270 "Tracking parameters not set!"<<ENDLOG;
273 Double_t initCpuTime,cpuTime;
274 initCpuTime = CpuTime();
278 cpuTime = CpuTime() - initCpuTime;
280 LOG(AliL3Log::kInformational,"AliL3ConfMapper::MainVertexTracking_b","Timing")
281 <<AliL3Log::kDec<<"Main Tracking finished in "<<cpuTime*1000<<" ms"<<ENDLOG;
284 void AliL3ConfMapper::MainVertexTracking()
286 //Tracking with vertex constraint.
290 LOG(AliL3Log::kError,"AliL3ConfMapper::MainVertexTracking","Parameters")<<AliL3Log::kDec<<
291 "Tracking parameters not set!"<<ENDLOG;
295 Double_t initCpuTime,cpuTime;
296 initCpuTime = CpuTime();
299 SetVertexConstraint(true);
303 cpuTime = CpuTime() - initCpuTime;
305 LOG(AliL3Log::kInformational,"AliL3ConfMapper::MainVertexTracking","Timing")<<AliL3Log::kDec<<
306 "Tracking finished in "<<cpuTime*1000<<" ms"<<ENDLOG;
311 void AliL3ConfMapper::NonVertexTracking()
313 //Tracking with no vertex constraint. This should be called after doing MainVertexTracking,
314 //in order to do tracking on the remaining clusters.
315 //The conformal mapping is now done with respect to the first cluster
316 //assosciated with this track.
318 SetVertexConstraint(false);
320 LOG(AliL3Log::kInformational,"AliL3ConfMapper::NonVertexTracking","ntracks")<<AliL3Log::kDec<<
321 "Number of nonvertex tracks found: "<<(nTracks-fMainVertexTracks)<<ENDLOG;
325 void AliL3ConfMapper::MainVertexSettings(Int_t trackletlength, Int_t tracklength,
326 Int_t rowscopetracklet, Int_t rowscopetrack,
327 Double_t maxphi,Double_t maxeta)
329 //Settings for main vertex tracking. The cuts are:
330 //TrackletLength: #hits on segment, before trying to build a track
331 //TrackLength: Minimum hits on a track
332 //RowScopeTracklet: Row search range for segments
333 //RowScopeTrack: Row search range for tracks
335 SetTrackletLength(trackletlength,(Bool_t)true);
336 SetRowScopeTracklet(rowscopetracklet, (Bool_t) true);
337 SetRowScopeTrack(rowscopetrack, (Bool_t) true);
338 SetMinPoints(tracklength,(Bool_t)true);
343 void AliL3ConfMapper::NonVertexSettings(Int_t trackletlength, Int_t tracklength,
344 Int_t rowscopetracklet, Int_t rowscopetrack)
346 SetTrackletLength(trackletlength,(Bool_t)false);
347 SetRowScopeTracklet(rowscopetracklet, (Bool_t)false);
348 SetRowScopeTrack(rowscopetrack, (Bool_t)false);
349 SetMinPoints(tracklength,(Bool_t)false);
352 void AliL3ConfMapper::SetTrackCuts(Double_t hitChi2Cut, Double_t goodHitChi2, Double_t trackChi2Cut,Int_t maxdist,
353 Bool_t vertexconstraint)
355 //Settings for tracks. The cuts are:
356 //HitChi2Cut: Maximum hit chi2
357 //goodHitChi2: Chi2 to stop look for next hit
358 //trackChi2Cut: Maximum track chi2
359 //maxdist: Maximum distance between two clusters when forming segments
361 SetHitChi2Cut(hitChi2Cut,vertexconstraint);
362 SetGoodHitChi2(goodHitChi2,vertexconstraint);
363 SetTrackChi2Cut(trackChi2Cut,vertexconstraint);
364 SetMaxDist(maxdist,vertexconstraint);
367 void AliL3ConfMapper::SetTrackletCuts(Double_t maxangle,Double_t goodDist, Bool_t vertex_constraint)
369 //Sets cuts of tracklets. Right now this is only:
370 //maxangle: Maximum angle when forming segments (if trackletlength > 2)
373 SetMaxAngleTracklet(maxangle, vertex_constraint);
376 void AliL3ConfMapper::ClusterLoop()
378 //Loop over hits, starting at outermost padrow, and trying to build segments.
380 Int_t row_segm,lastrow = fRowMin + fMinPoints[fVertexConstraint];
381 AliL3ConfMapPoint *hit;
383 //Loop over rows, and try to create tracks from the hits.
384 //Starts at the outermost row, and loops as long as a track can be build, due to length.
386 for(row_segm = fRowMax; row_segm >= lastrow; row_segm--)
388 if(fRow[(row_segm-fRowMin)].first && ((AliL3ConfMapPoint*)fRow[(row_segm-fRowMin)].first)->GetPadRow() < fRowMin + 1)
390 for(hit = (AliL3ConfMapPoint*)fRow[(row_segm-fRowMin)].first; hit!=0; hit=hit->nextRowHit)
392 if(hit->GetUsage() == true)
403 void AliL3ConfMapper::CreateTrack(AliL3ConfMapPoint *hit)
405 //Tries to create a track from the initial hit given by ClusterLoop()
407 AliL3ConfMapPoint *closest_hit = NULL;
408 AliL3ConfMapTrack *track = NULL;
411 Int_t tracks = nTracks;
414 track = (AliL3ConfMapTrack*)fTrack->NextTrack();
416 //reset hit parameters:
419 UInt_t *trackhitnumber = track->GetHitNumbers();
421 //set conformal coordinates if we are looking for non vertex tracks
422 if(!fVertexConstraint)
424 hit->SetAllCoord(hit);
427 //fill fit parameters of initial track:
428 track->UpdateParam(hit); //here the number of hits is incremented.
429 trackhitnumber[track->GetNumberOfPoints()-1] = hit->GetHitNumber();
434 for(point=1; point<fTrackletLength[fVertexConstraint]; point++)
436 if((closest_hit = GetNextNeighbor(hit)))
439 // Calculate track length in sz plane
440 dx = ((AliL3ConfMapPoint*)closest_hit)->GetX() - ((AliL3ConfMapPoint*)hit)->GetX();
441 dy = ((AliL3ConfMapPoint*)closest_hit)->GetY() - ((AliL3ConfMapPoint*)hit)->GetY();
442 //track->fLength += (Double_t)sqrt ( dx * dx + dy * dy ) ;
443 Double_t length = track->GetLength()+(Double_t)sqrt ( dx * dx + dy * dy );
444 track->SetLength(length);
446 //closest_hit->SetS(track->fLength);
447 closest_hit->SetS(track->GetLength());
449 //update fit parameters
450 track->UpdateParam(closest_hit);
451 trackhitnumber[track->GetNumberOfPoints()-1] = closest_hit->GetHitNumber();
457 //closest hit does not exist:
458 track->DeleteCandidate();
459 fTrack->RemoveLast();
461 point = fTrackletLength[fVertexConstraint];
465 //tracklet is long enough to be extended to a track
466 if(track->GetNumberOfPoints() == fTrackletLength[fVertexConstraint])
469 track->SetProperties(true);
471 if(TrackletAngle(track) > fMaxAngleTracklet[fVertexConstraint])
472 {//proof if the first points seem to be a beginning of a track
473 track->SetProperties(false);
474 track->DeleteCandidate();
475 fTrack->RemoveLast();
479 else//good tracklet ->proceed, follow the trackfit
483 //define variables to keep the total chi:
484 Double_t xyChi2 = track->fChiSq[0];
485 Double_t szChi2 = track->fChiSq[1];
487 for(point = fTrackletLength[fVertexConstraint]; point <= fNumRowSegment; point++)
489 track->fChiSq[0] = fHitChi2Cut[fVertexConstraint];
490 closest_hit = GetNextNeighbor((AliL3ConfMapPoint*)track->lastHit,track);
496 Double_t lxyChi2 = track->fChiSq[0]-track->fChiSq[1];
498 closest_hit->xyChi2 = lxyChi2;
500 //update track length:
501 //track->fLength = closest_hit->GetS();
502 track->SetLength(closest_hit->GetS());
503 szChi2 += track->fChiSq[1];
504 closest_hit->szChi2 = track->fChiSq[1];
506 track->UpdateParam(closest_hit);
507 trackhitnumber[track->GetNumberOfPoints()-1] = closest_hit->GetHitNumber();
509 //add closest hit to track
510 closest_hit->SetUsage(true);
511 closest_hit->SetTrackNumber(tracks-1);
517 //closest hit does not exist
518 point = fNumRowSegment; //continue with next hit in segment
524 track->fChiSq[0] = xyChi2;
525 track->fChiSq[1] = szChi2;
526 Double_t normalized_chi2 = (track->fChiSq[0]+track->fChiSq[1])/track->GetNumberOfPoints();
528 //remove tracks with not enough points already now
529 if(track->GetNumberOfPoints() < fMinPoints[fVertexConstraint] || normalized_chi2 > fTrackChi2Cut[fVertexConstraint])
531 track->SetProperties(false);
533 track->DeleteCandidate();
534 fTrack->RemoveLast();
540 fClustersUnused -= track->GetNumberOfPoints();
541 track->ComesFromMainVertex(fVertexConstraint);
542 //mark track as main vertex track or not
543 track->SetSector(2); //only needed for testing purposes.
544 track->SetRowRange(fRowMin,fRowMax);
546 if(fVertexConstraint)
557 AliL3ConfMapPoint *AliL3ConfMapper::GetNextNeighbor(AliL3ConfMapPoint *start_hit,
558 AliL3ConfMapTrack *track)
560 //When forming segments: Finds closest hit to input hit
561 //When forming tracks: Find closest hit to track fit.
563 Double_t dist,closest_dist = fMaxDist[fVertexConstraint];
565 AliL3ConfMapPoint *hit = NULL;
566 AliL3ConfMapPoint *closest_hit = NULL;
574 Int_t max_row = start_hit->GetPadRow()-1;
577 if(track) //finding hit close to trackfit
579 min_row = start_hit->GetPadRow()-fRowScopeTrack[fVertexConstraint];
583 min_row = start_hit->GetPadRow()-fRowScopeTracklet[fVertexConstraint];
587 Int_t loop_eta[9] = {0,0,0,-1,-1,-1,1,1,1};
588 Int_t loop_phi[9] = {0,-1,1,0,-1,1,0,-1,1};
590 if(min_row < fRowMin)
592 if(max_row < fRowMin)
593 return 0; //reached the last padrow under consideration
598 for(sub_row_segm=max_row; sub_row_segm>=min_row; sub_row_segm--)
600 //loop over subsegments, in the order defined above.
601 for(Int_t i=0; i<9; i++)
603 sub_phi_segm = start_hit->phiIndex + loop_phi[i];
606 sub_phi_segm += fNumPhiSegment;
608 else if(sub_phi_segm >=fNumPhiSegment)
609 sub_phi_segm -= fNumPhiSegment;
611 //loop over sub eta segments
613 sub_eta_segm = start_hit->etaIndex + loop_eta[i];
615 if(sub_eta_segm < 0 || sub_eta_segm >=fNumEtaSegment)
616 continue;//segment exceeds bounds->skip it
618 //loop over hits in this sub segment:
619 volumeIndex= (sub_row_segm-fRowMin)*fNumPhiEtaSegmentPlusOne +
620 sub_phi_segm*fNumEtaSegmentPlusOne + sub_eta_segm;
624 LOG(AliL3Log::kError,"AliL3ConfMapper::GetNextNeighbor","Memory")<<AliL3Log::kDec<<
625 "VolumeIndex error "<<volumeIndex<<ENDLOG;
628 for(hit = (AliL3ConfMapPoint*)fVolume[volumeIndex].first;
629 hit!=0; hit = hit->nextVolumeHit)
633 {//hit was not used before
635 //set conformal mapping if looking for nonvertex tracks:
636 if(!fVertexConstraint)
638 hit->SetAllCoord(start_hit);
641 if(track)//track search - look for nearest neighbor to extrapolated track
643 if(!VerifyRange(start_hit,hit))
646 test_hit = EvaluateHit(start_hit,hit,track);
648 if(test_hit == 0)//chi2 not good enough, keep looking
650 else if(test_hit==2)//chi2 good enough, return it
653 closest_hit = hit;//chi2 acceptable, but keep looking
657 else //tracklet search, look for nearest neighbor
660 if((dist=CalcDistance(start_hit,hit)) < closest_dist)
662 if(!VerifyRange(start_hit,hit))
667 //if this hit is good enough, return it:
668 if(closest_dist < fGoodDist)
672 continue;//sub hit was farther away than a hit before
676 }//hit not used before
678 else continue; //sub hit was used before
680 }//loop over hits in sub segment
682 }//loop over sub segments
689 if(closest_hit)// && closest_dist < mMaxDist)
695 Int_t AliL3ConfMapper::EvaluateHit(AliL3ConfMapPoint *start_hit,AliL3ConfMapPoint *hit,AliL3ConfMapTrack *track)
697 //Check if space point gives a fit with acceptable chi2.
699 Double_t temp,dxy,lchi2,dx,dy,slocal,dsz,lszChi2;
700 temp = (track->a2Xy*hit->GetXprime()-hit->GetYprime()+track->a1Xy);
701 dxy = temp*temp/(track->a2Xy*track->a2Xy + 1.);
704 lchi2 = (dxy*hit->GetXYWeight());
706 if(lchi2 > track->fChiSq[0])//chi2 was worse than before.
709 //calculate s and the distance hit-line
710 dx = start_hit->GetX()-hit->GetX();
711 dy = start_hit->GetY()-hit->GetY();
712 //slocal = track->fLength+sqrt(dx*dx+dy*dy);
713 slocal = track->GetLength()+sqrt(dx*dx+dy*dy);
715 temp = (track->a2Sz*slocal-hit->GetZ()+track->a1Sz);
716 dsz = temp*temp/(track->a2Sz*track->a2Sz+1);
719 lszChi2 = dsz*hit->GetZWeight();
723 //check whether chi2 is better than previous one:
724 if(lchi2 < track->fChiSq[0])
726 track->fChiSq[0] = lchi2;
727 track->fChiSq[1] = lszChi2;
731 //if chi2 good enough, stop here:
732 if(lchi2 < fGoodHitChi2[fVertexConstraint])
742 Double_t AliL3ConfMapper::CalcDistance(const AliL3ConfMapPoint *hit1,const AliL3ConfMapPoint *hit2) const
744 //Return distance between two clusters, defined by Pablo
746 Double_t phi_diff = fabs( hit1->GetPhi() - hit2->GetPhi() );
747 if (phi_diff > pi) phi_diff = twopi - phi_diff;
749 return todeg*fabs(hit1->GetPadRow() - hit2->GetPadRow()) * (phi_diff + fabs( hit1->GetEta() - hit2->GetEta() ));
752 Bool_t AliL3ConfMapper::VerifyRange(const AliL3ConfMapPoint *hit1,const AliL3ConfMapPoint *hit2) const
754 //Check if the hit are within reasonable range in phi and eta
755 Double_t dphi,deta;//maxphi=0.1,maxeta=0.1;
756 dphi = fabs(hit1->GetPhi() - hit2->GetPhi());
757 if(dphi > pi) dphi = fabs(twopi - dphi);
758 if(dphi > fMaxPhi) return false;
760 deta = fabs(hit1->GetEta() - hit2->GetEta());
761 if(deta > fMaxEta) return false;
767 Double_t AliL3ConfMapper::TrackletAngle(const AliL3ConfMapTrack *track,Int_t n) const
769 // Returns the angle 'between' the last three points (started at point number n) on this track.
775 Double_t angle1,angle2;
776 TObjArray *hits = track->GetHits();
778 if (n > track->GetNumberOfPoints()) {
779 n = track->GetNumberOfPoints();
786 x1[0] = ((AliL3ConfMapPoint *)hits->At(n-2))->GetX() - ((AliL3ConfMapPoint *)hits->At(n-3))->GetX();
787 x1[1] = ((AliL3ConfMapPoint *)hits->At(n-2))->GetY() - ((AliL3ConfMapPoint *)hits->At(n-3))->GetY();
789 x2[0] = ((AliL3ConfMapPoint *)hits->At(n-1))->GetX() - ((AliL3ConfMapPoint *)hits->At(n-2))->GetX();
790 x2[1] = ((AliL3ConfMapPoint *)hits->At(n-1))->GetY() - ((AliL3ConfMapPoint *)hits->At(n-2))->GetY();
792 angle1 = atan2(x1[1],x1[0]);
793 angle2 = atan2(x2[1],x1[0]);
794 return fabs(angle1-angle2);
798 Int_t AliL3ConfMapper::FillTracks()
800 //Fill track parameters. Which basically means do a fit of helix in real space,
801 //which should be done in order to get nice tracks.
803 Int_t num_of_tracks = nTracks;
804 LOG(AliL3Log::kInformational,"AliL3ConfMapper::FillTracks","nTracks")<<AliL3Log::kDec<<
805 "Number of found tracks: "<<nTracks<<ENDLOG;
809 LOG(AliL3Log::kError,"AliL3ConfMapper::FillTracks","nTracks")<<AliL3Log::kDec<<
810 "No tracks found!!"<<ENDLOG;
815 for(int i=0; i<num_of_tracks; i++)
817 AliL3ConfMapTrack *track = (AliL3ConfMapTrack*)fTrack->GetTrack(i);
818 track->Fill(fVertex,fMaxDca);
824 Double_t AliL3ConfMapper::CpuTime()
826 //Return the Cputime in seconds.
828 gettimeofday( &tv, NULL );
829 return tv.tv_sec+(((Double_t)tv.tv_usec)/1000000.);
830 //return (Double_t)(clock()) / CLOCKS_PER_SEC;