3 // Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
4 //*-- Copyright © ASV
10 #include "AliL3ConfMapper.h"
12 #include "AliL3Logging.h"
13 #include "AliL3Vertex.h"
14 #include "AliL3ConfMapTrack.h"
15 #include "AliL3ConfMapPoint.h"
16 #include "AliL3TrackArray.h"
17 #include "AliL3Transform.h"
19 //_____________________________________________________________
22 // Conformal mapping base class
24 ClassImp(AliL3ConfMapper)
26 Double_t AliL3ConfMapper::pi=3.14159265358979323846;
27 Double_t AliL3ConfMapper::twopi=2*pi;
28 Double_t AliL3ConfMapper::todeg=180./pi;
30 AliL3ConfMapper::AliL3ConfMapper()
38 fBench = (Bool_t)true;
39 fParamSet = (Bool_t)false;
40 fVertexConstraint = (Bool_t)true;
45 AliL3ConfMapper::~AliL3ConfMapper()
64 void AliL3ConfMapper::InitVolumes()
67 //Allocate volumes, set conformal coordinates and pointers.
69 //Should be done after setting the track parameters
71 fNumRowSegmentPlusOne = 176;//NumRows[0]; //Maximum 32.
72 fNumPhiSegmentPlusOne = fNumPhiSegment+1;
73 fNumEtaSegmentPlusOne = fNumEtaSegment+1;
74 fNumPhiEtaSegmentPlusOne = fNumPhiSegmentPlusOne*fNumEtaSegmentPlusOne;
75 fBounds = fNumRowSegmentPlusOne * fNumPhiSegmentPlusOne * fNumEtaSegmentPlusOne;
78 if(fVolume) delete [] fVolume;
79 if(fRow) delete [] fRow;
81 LOG(AliL3Log::kInformational,"AliL3ConfMapper::InitVolumes","Memory")<<AliL3Log::kDec<<
82 "Allocating "<<fBounds*sizeof(AliL3ConfMapContainer)<<" Bytes to fVolume"<<ENDLOG;
83 LOG(AliL3Log::kInformational,"AliL3ConfMapper::InitVolumes","Memory")<<AliL3Log::kDec<<
84 "Allocating "<<fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer)<<" Bytes to fRow"<<ENDLOG;
86 fVolume = new AliL3ConfMapContainer[fBounds];
87 fRow = new AliL3ConfMapContainer[fNumRowSegmentPlusOne];
89 memset(fVolume,0,fBounds*sizeof(AliL3ConfMapContainer));
90 memset(fRow,0,fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer));
92 Int_t max_num_of_tracks = 1000;
93 Int_t max_num_of_hits = 50000;
100 fHit = new AliL3ConfMapPoint[max_num_of_hits];
101 fTrack = new AliL3TrackArray("AliL3ConfMapTrack",max_num_of_tracks);
104 void AliL3ConfMapper::InitSector(Int_t sector,Int_t *rowrange,Float_t *etarange)
106 //Initialize tracker for tracking in a given sector.
107 //Resets track and hit arrays.
108 //Here it is also possible to specify a subsector, by defining
109 //rowrange[0]=innermost row;
110 //rowrange[1]=outermostrow;
111 //Finally you can specify etaslices to save time (assuming a good seed from TRD...)
113 //Define tracking area:
116 fRowMin = rowrange[0];
117 fRowMax = rowrange[1];
119 else //complete sector
126 fEtaMin = etarange[0];
127 fEtaMax = etarange[1];
132 //fEtaMax = sector < 18 ? 1 : -1;
133 fEtaMax = sector < 18 ? 0.9 : -0.9;
136 //Set the angles to sector 2:
137 fPhiMin = -1.*10/todeg;//fParam->GetAngle(sector) - 10/todeg;
138 fPhiMax = 10/todeg;//fParam->GetAngle(sector) + 10/todeg;
141 fMainVertexTracks = 0;
144 fNumRowSegment = fRowMax - fRowMin; //number of rows to be considered by tracker
145 LOG(AliL3Log::kInformational,"AliL3ConfMapper::InitSector","B-field")
146 <<"Tracker initializing with a magnetic field of "<<AliL3Transform::GetBField()<<ENDLOG;
153 Bool_t AliL3ConfMapper::ReadHits(UInt_t count, AliL3SpacePointData* hits )
155 Int_t nhit=(Int_t)count;
156 for (Int_t i=0;i<nhit;i++)
159 fHit[i].ReadHits(&(hits[i]));
161 fClustersUnused += nhit;
162 LOG(AliL3Log::kInformational,"AliL3ConfMapper::ReadHits","#hits")
163 <<AliL3Log::kDec<<"hit_counter: "<<nhit<<" count: "<<count<<ENDLOG;
169 void AliL3ConfMapper::SetPointers()
172 //Reset detector volumes
173 memset(fVolume,0,fBounds*sizeof(AliL3ConfMapContainer));
174 memset(fRow,0,fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer));
176 Float_t phiSlice = (fPhiMax-fPhiMin)/fNumPhiSegment;
177 Float_t etaSlice = (fEtaMax-fEtaMin)/fNumEtaSegment;
180 Int_t local_counter=0;
181 for(Int_t j=0; j<fClustersUnused; j++)
184 //AliL3ConfMapPoint *thisHit = (AliL3ConfMapPoint*)fHit->At(j);
185 AliL3ConfMapPoint *thisHit = &(fHit[j]);
187 thisHit->Setup(fVertex);
189 Int_t localrow = thisHit->GetPadRow();
191 if(localrow < fRowMin || localrow > fRowMax)
195 thisHit->phiIndex=(Int_t)((thisHit->GetPhi()-fPhiMin)/phiSlice +1);
197 if(thisHit->phiIndex<1 || thisHit->phiIndex>fNumPhiSegment)
199 fPhiHitsOutOfRange++;
203 thisHit->etaIndex=(Int_t)((thisHit->GetEta()-fEtaMin)/etaSlice + 1);
204 if(thisHit->etaIndex<1 || thisHit->etaIndex>fNumEtaSegment)
206 fEtaHitsOutOfRange++;
211 volumeIndex = (localrow-fRowMin)*fNumPhiEtaSegmentPlusOne+thisHit->phiIndex*fNumEtaSegmentPlusOne+thisHit->etaIndex;
213 if(fVolume[volumeIndex].first == NULL)
214 fVolume[volumeIndex].first = (void *)thisHit;
216 ((AliL3ConfMapPoint *)fVolume[volumeIndex].last)->nextVolumeHit=thisHit;
217 fVolume[volumeIndex].last = (void *)thisHit;
221 if(fRow[(localrow-fRowMin)].first == NULL)
222 fRow[(localrow-fRowMin)].first = (void *)thisHit;
224 ((AliL3ConfMapPoint *)(fRow[(localrow-fRowMin)].last))->nextRowHit = thisHit;
225 fRow[(localrow-fRowMin)].last = (void *)thisHit;
230 if(fClustersUnused>0 && local_counter==0)
231 LOG(AliL3Log::kError,"AliL3ConfMapper::SetPointers","Parameters")
232 <<AliL3Log::kDec<<"No points passed to track finder, hits out of range: "
233 <<fEtaHitsOutOfRange+fPhiHitsOutOfRange<<ENDLOG;
235 LOG(AliL3Log::kInformational,"AliL3ConfMapper::SetPointers","Setup")
236 <<"Setup finished, hits out of range: "<<fEtaHitsOutOfRange+fPhiHitsOutOfRange
237 <<" hits accepted "<<fClustersUnused<<ENDLOG;
240 void AliL3ConfMapper::MainVertexTracking_a()
242 //Tracking with vertex constraint.
246 LOG(AliL3Log::kError,"AliL3ConfMapper::MainVertexTracking","Parameters")<<AliL3Log::kDec<<
247 "Tracking parameters not set!"<<ENDLOG;
251 Double_t initCpuTime,cpuTime;
252 initCpuTime = CpuTime();
254 SetVertexConstraint(true);
255 cpuTime = CpuTime() - initCpuTime;
257 LOG(AliL3Log::kInformational,"AliL3ConfMapper::MainVertexTracking_a","Timing")
258 <<AliL3Log::kDec<<"Setup finished in "<<cpuTime*1000<<" ms"<<ENDLOG;
262 void AliL3ConfMapper::MainVertexTracking_b()
264 //Tracking with vertex constraint.
268 LOG(AliL3Log::kError,"AliL3ConfMapper::MainVertexTracking","Parameters")<<AliL3Log::kDec<<
269 "Tracking parameters not set!"<<ENDLOG;
272 Double_t initCpuTime,cpuTime;
273 initCpuTime = CpuTime();
277 cpuTime = CpuTime() - initCpuTime;
279 LOG(AliL3Log::kInformational,"AliL3ConfMapper::MainVertexTracking_b","Timing")
280 <<AliL3Log::kDec<<"Main Tracking finished in "<<cpuTime*1000<<" ms"<<ENDLOG;
283 void AliL3ConfMapper::MainVertexTracking()
285 //Tracking with vertex constraint.
289 LOG(AliL3Log::kError,"AliL3ConfMapper::MainVertexTracking","Parameters")<<AliL3Log::kDec<<
290 "Tracking parameters not set!"<<ENDLOG;
294 Double_t initCpuTime,cpuTime;
295 initCpuTime = CpuTime();
298 SetVertexConstraint(true);
302 cpuTime = CpuTime() - initCpuTime;
304 LOG(AliL3Log::kInformational,"AliL3ConfMapper::MainVertexTracking","Timing")<<AliL3Log::kDec<<
305 "Tracking finished in "<<cpuTime*1000<<" ms"<<ENDLOG;
310 void AliL3ConfMapper::NonVertexTracking()
312 //Tracking with no vertex constraint. This should be called after doing MainVertexTracking,
313 //in order to do tracking on the remaining clusters.
314 //The conformal mapping is now done with respect to the first cluster
315 //assosciated with this track.
317 SetVertexConstraint(false);
319 LOG(AliL3Log::kInformational,"AliL3ConfMapper::NonVertexTracking","ntracks")<<AliL3Log::kDec<<
320 "Number of nonvertex tracks found: "<<(nTracks-fMainVertexTracks)<<ENDLOG;
324 void AliL3ConfMapper::MainVertexSettings(Int_t trackletlength, Int_t tracklength,
325 Int_t rowscopetracklet, Int_t rowscopetrack,
326 Double_t maxphi,Double_t maxeta)
328 //Settings for main vertex tracking. The cuts are:
329 //TrackletLength: #hits on segment, before trying to build a track
330 //TrackLength: Minimum hits on a track
331 //RowScopeTracklet: Row search range for segments
332 //RowScopeTrack: Row search range for tracks
334 SetTrackletLength(trackletlength,(Bool_t)true);
335 SetRowScopeTracklet(rowscopetracklet, (Bool_t) true);
336 SetRowScopeTrack(rowscopetrack, (Bool_t) true);
337 SetMinPoints(tracklength,(Bool_t)true);
342 void AliL3ConfMapper::NonVertexSettings(Int_t trackletlength, Int_t tracklength,
343 Int_t rowscopetracklet, Int_t rowscopetrack)
345 SetTrackletLength(trackletlength,(Bool_t)false);
346 SetRowScopeTracklet(rowscopetracklet, (Bool_t)false);
347 SetRowScopeTrack(rowscopetrack, (Bool_t)false);
348 SetMinPoints(tracklength,(Bool_t)false);
351 void AliL3ConfMapper::SetTrackCuts(Double_t hitChi2Cut, Double_t goodHitChi2, Double_t trackChi2Cut,Int_t maxdist,
352 Bool_t vertexconstraint)
354 //Settings for tracks. The cuts are:
355 //HitChi2Cut: Maximum hit chi2
356 //goodHitChi2: Chi2 to stop look for next hit
357 //trackChi2Cut: Maximum track chi2
358 //maxdist: Maximum distance between two clusters when forming segments
360 SetHitChi2Cut(hitChi2Cut,vertexconstraint);
361 SetGoodHitChi2(goodHitChi2,vertexconstraint);
362 SetTrackChi2Cut(trackChi2Cut,vertexconstraint);
363 SetMaxDist(maxdist,vertexconstraint);
366 void AliL3ConfMapper::SetTrackletCuts(Double_t maxangle,Double_t goodDist, Bool_t vertex_constraint)
368 //Sets cuts of tracklets. Right now this is only:
369 //maxangle: Maximum angle when forming segments (if trackletlength > 2)
372 SetMaxAngleTracklet(maxangle, vertex_constraint);
375 void AliL3ConfMapper::ClusterLoop()
377 //Loop over hits, starting at outermost padrow, and trying to build segments.
379 Int_t row_segm,lastrow = fRowMin + fMinPoints[fVertexConstraint];
380 AliL3ConfMapPoint *hit;
382 //Loop over rows, and try to create tracks from the hits.
383 //Starts at the outermost row, and loops as long as a track can be build, due to length.
385 for(row_segm = fRowMax; row_segm >= lastrow; row_segm--)
387 if(fRow[(row_segm-fRowMin)].first && ((AliL3ConfMapPoint*)fRow[(row_segm-fRowMin)].first)->GetPadRow() < fRowMin + 1)
389 for(hit = (AliL3ConfMapPoint*)fRow[(row_segm-fRowMin)].first; hit!=0; hit=hit->nextRowHit)
391 if(hit->GetUsage() == true)
402 void AliL3ConfMapper::CreateTrack(AliL3ConfMapPoint *hit)
404 //Tries to create a track from the initial hit given by ClusterLoop()
406 AliL3ConfMapPoint *closest_hit = NULL;
407 AliL3ConfMapTrack *track = NULL;
410 Int_t tracks = nTracks;
413 track = (AliL3ConfMapTrack*)fTrack->NextTrack();
415 //reset hit parameters:
418 UInt_t *trackhitnumber = track->GetHitNumbers();
420 //set conformal coordinates if we are looking for non vertex tracks
421 if(!fVertexConstraint)
423 hit->SetAllCoord(hit);
426 //fill fit parameters of initial track:
427 track->UpdateParam(hit); //here the number of hits is incremented.
428 trackhitnumber[track->GetNumberOfPoints()-1] = hit->GetHitNumber();
433 for(point=1; point<fTrackletLength[fVertexConstraint]; point++)
435 if((closest_hit = GetNextNeighbor(hit)))
438 // Calculate track length in sz plane
439 dx = ((AliL3ConfMapPoint*)closest_hit)->GetX() - ((AliL3ConfMapPoint*)hit)->GetX();
440 dy = ((AliL3ConfMapPoint*)closest_hit)->GetY() - ((AliL3ConfMapPoint*)hit)->GetY();
441 //track->fLength += (Double_t)sqrt ( dx * dx + dy * dy ) ;
442 Double_t length = track->GetLength()+(Double_t)sqrt ( dx * dx + dy * dy );
443 track->SetLength(length);
445 //closest_hit->SetS(track->fLength);
446 closest_hit->SetS(track->GetLength());
448 //update fit parameters
449 track->UpdateParam(closest_hit);
450 trackhitnumber[track->GetNumberOfPoints()-1] = closest_hit->GetHitNumber();
456 //closest hit does not exist:
457 track->DeleteCandidate();
458 fTrack->RemoveLast();
460 point = fTrackletLength[fVertexConstraint];
464 //tracklet is long enough to be extended to a track
465 if(track->GetNumberOfPoints() == fTrackletLength[fVertexConstraint])
468 track->SetProperties(true);
470 if(TrackletAngle(track) > fMaxAngleTracklet[fVertexConstraint])
471 {//proof if the first points seem to be a beginning of a track
472 track->SetProperties(false);
473 track->DeleteCandidate();
474 fTrack->RemoveLast();
478 else//good tracklet ->proceed, follow the trackfit
482 //define variables to keep the total chi:
483 Double_t xyChi2 = track->fChiSq[0];
484 Double_t szChi2 = track->fChiSq[1];
486 for(point = fTrackletLength[fVertexConstraint]; point <= fNumRowSegment; point++)
488 track->fChiSq[0] = fHitChi2Cut[fVertexConstraint];
489 closest_hit = GetNextNeighbor((AliL3ConfMapPoint*)track->lastHit,track);
495 Double_t lxyChi2 = track->fChiSq[0]-track->fChiSq[1];
497 closest_hit->xyChi2 = lxyChi2;
499 //update track length:
500 //track->fLength = closest_hit->GetS();
501 track->SetLength(closest_hit->GetS());
502 szChi2 += track->fChiSq[1];
503 closest_hit->szChi2 = track->fChiSq[1];
505 track->UpdateParam(closest_hit);
506 trackhitnumber[track->GetNumberOfPoints()-1] = closest_hit->GetHitNumber();
508 //add closest hit to track
509 closest_hit->SetUsage(true);
510 closest_hit->SetTrackNumber(tracks-1);
516 //closest hit does not exist
517 point = fNumRowSegment; //continue with next hit in segment
523 track->fChiSq[0] = xyChi2;
524 track->fChiSq[1] = szChi2;
525 Double_t normalized_chi2 = (track->fChiSq[0]+track->fChiSq[1])/track->GetNumberOfPoints();
527 //remove tracks with not enough points already now
528 if(track->GetNumberOfPoints() < fMinPoints[fVertexConstraint] || normalized_chi2 > fTrackChi2Cut[fVertexConstraint])
530 track->SetProperties(false);
532 track->DeleteCandidate();
533 fTrack->RemoveLast();
539 fClustersUnused -= track->GetNumberOfPoints();
540 track->ComesFromMainVertex(fVertexConstraint);
541 //mark track as main vertex track or not
542 track->SetSector(2); //only needed for testing purposes.
543 track->SetRowRange(fRowMin,fRowMax);
545 if(fVertexConstraint)
556 AliL3ConfMapPoint *AliL3ConfMapper::GetNextNeighbor(AliL3ConfMapPoint *start_hit,
557 AliL3ConfMapTrack *track)
559 //When forming segments: Finds closest hit to input hit
560 //When forming tracks: Find closest hit to track fit.
562 Double_t dist,closest_dist = fMaxDist[fVertexConstraint];
564 AliL3ConfMapPoint *hit = NULL;
565 AliL3ConfMapPoint *closest_hit = NULL;
573 Int_t max_row = start_hit->GetPadRow()-1;
576 if(track) //finding hit close to trackfit
578 min_row = start_hit->GetPadRow()-fRowScopeTrack[fVertexConstraint];
582 min_row = start_hit->GetPadRow()-fRowScopeTracklet[fVertexConstraint];
586 Int_t loop_eta[9] = {0,0,0,-1,-1,-1,1,1,1};
587 Int_t loop_phi[9] = {0,-1,1,0,-1,1,0,-1,1};
589 if(min_row < fRowMin)
591 if(max_row < fRowMin)
592 return 0; //reached the last padrow under consideration
597 for(sub_row_segm=max_row; sub_row_segm>=min_row; sub_row_segm--)
599 //loop over subsegments, in the order defined above.
600 for(Int_t i=0; i<9; i++)
602 sub_phi_segm = start_hit->phiIndex + loop_phi[i];
605 sub_phi_segm += fNumPhiSegment;
607 else if(sub_phi_segm >=fNumPhiSegment)
608 sub_phi_segm -= fNumPhiSegment;
610 //loop over sub eta segments
612 sub_eta_segm = start_hit->etaIndex + loop_eta[i];
614 if(sub_eta_segm < 0 || sub_eta_segm >=fNumEtaSegment)
615 continue;//segment exceeds bounds->skip it
617 //loop over hits in this sub segment:
618 volumeIndex= (sub_row_segm-fRowMin)*fNumPhiEtaSegmentPlusOne +
619 sub_phi_segm*fNumEtaSegmentPlusOne + sub_eta_segm;
623 LOG(AliL3Log::kError,"AliL3ConfMapper::GetNextNeighbor","Memory")<<AliL3Log::kDec<<
624 "VolumeIndex error "<<volumeIndex<<ENDLOG;
627 for(hit = (AliL3ConfMapPoint*)fVolume[volumeIndex].first;
628 hit!=0; hit = hit->nextVolumeHit)
632 {//hit was not used before
634 //set conformal mapping if looking for nonvertex tracks:
635 if(!fVertexConstraint)
637 hit->SetAllCoord(start_hit);
640 if(track)//track search - look for nearest neighbor to extrapolated track
642 if(!VerifyRange(start_hit,hit))
645 test_hit = EvaluateHit(start_hit,hit,track);
647 if(test_hit == 0)//chi2 not good enough, keep looking
649 else if(test_hit==2)//chi2 good enough, return it
652 closest_hit = hit;//chi2 acceptable, but keep looking
656 else //tracklet search, look for nearest neighbor
659 if((dist=CalcDistance(start_hit,hit)) < closest_dist)
661 if(!VerifyRange(start_hit,hit))
666 //if this hit is good enough, return it:
667 if(closest_dist < fGoodDist)
671 continue;//sub hit was farther away than a hit before
675 }//hit not used before
677 else continue; //sub hit was used before
679 }//loop over hits in sub segment
681 }//loop over sub segments
688 if(closest_hit)// && closest_dist < mMaxDist)
694 Int_t AliL3ConfMapper::EvaluateHit(AliL3ConfMapPoint *start_hit,AliL3ConfMapPoint *hit,AliL3ConfMapTrack *track)
696 //Check if space point gives a fit with acceptable chi2.
698 Double_t temp,dxy,lchi2,dx,dy,slocal,dsz,lszChi2;
699 temp = (track->a2Xy*hit->GetXprime()-hit->GetYprime()+track->a1Xy);
700 dxy = temp*temp/(track->a2Xy*track->a2Xy + 1.);
703 lchi2 = (dxy*hit->GetXYWeight());
705 if(lchi2 > track->fChiSq[0])//chi2 was worse than before.
708 //calculate s and the distance hit-line
709 dx = start_hit->GetX()-hit->GetX();
710 dy = start_hit->GetY()-hit->GetY();
711 //slocal = track->fLength+sqrt(dx*dx+dy*dy);
712 slocal = track->GetLength()+sqrt(dx*dx+dy*dy);
714 temp = (track->a2Sz*slocal-hit->GetZ()+track->a1Sz);
715 dsz = temp*temp/(track->a2Sz*track->a2Sz+1);
718 lszChi2 = dsz*hit->GetZWeight();
722 //check whether chi2 is better than previous one:
723 if(lchi2 < track->fChiSq[0])
725 track->fChiSq[0] = lchi2;
726 track->fChiSq[1] = lszChi2;
730 //if chi2 good enough, stop here:
731 if(lchi2 < fGoodHitChi2[fVertexConstraint])
741 Double_t AliL3ConfMapper::CalcDistance(const AliL3ConfMapPoint *hit1,const AliL3ConfMapPoint *hit2) const
743 //Return distance between two clusters, defined by Pablo
745 Double_t phi_diff = fabs( hit1->GetPhi() - hit2->GetPhi() );
746 if (phi_diff > pi) phi_diff = twopi - phi_diff;
748 return todeg*fabs(hit1->GetPadRow() - hit2->GetPadRow()) * (phi_diff + fabs( hit1->GetEta() - hit2->GetEta() ));
751 Bool_t AliL3ConfMapper::VerifyRange(const AliL3ConfMapPoint *hit1,const AliL3ConfMapPoint *hit2) const
753 //Check if the hit are within reasonable range in phi and eta
754 Double_t dphi,deta;//maxphi=0.1,maxeta=0.1;
755 dphi = fabs(hit1->GetPhi() - hit2->GetPhi());
756 if(dphi > pi) dphi = fabs(twopi - dphi);
757 if(dphi > fMaxPhi) return false;
759 deta = fabs(hit1->GetEta() - hit2->GetEta());
760 if(deta > fMaxEta) return false;
766 Double_t AliL3ConfMapper::TrackletAngle(const AliL3ConfMapTrack *track,Int_t n) const
768 // Returns the angle 'between' the last three points (started at point number n) on this track.
774 Double_t angle1,angle2;
775 TObjArray *hits = track->GetHits();
777 if (n > track->GetNumberOfPoints()) {
778 n = track->GetNumberOfPoints();
785 x1[0] = ((AliL3ConfMapPoint *)hits->At(n-2))->GetX() - ((AliL3ConfMapPoint *)hits->At(n-3))->GetX();
786 x1[1] = ((AliL3ConfMapPoint *)hits->At(n-2))->GetY() - ((AliL3ConfMapPoint *)hits->At(n-3))->GetY();
788 x2[0] = ((AliL3ConfMapPoint *)hits->At(n-1))->GetX() - ((AliL3ConfMapPoint *)hits->At(n-2))->GetX();
789 x2[1] = ((AliL3ConfMapPoint *)hits->At(n-1))->GetY() - ((AliL3ConfMapPoint *)hits->At(n-2))->GetY();
791 angle1 = atan2(x1[1],x1[0]);
792 angle2 = atan2(x2[1],x1[0]);
793 return fabs(angle1-angle2);
797 Int_t AliL3ConfMapper::FillTracks()
799 //Fill track parameters. Which basically means do a fit of helix in real space,
800 //which should be done in order to get nice tracks.
802 Int_t num_of_tracks = nTracks;
803 LOG(AliL3Log::kInformational,"AliL3ConfMapper::FillTracks","nTracks")<<AliL3Log::kDec<<
804 "Number of found tracks: "<<nTracks<<ENDLOG;
808 LOG(AliL3Log::kError,"AliL3ConfMapper::FillTracks","nTracks")<<AliL3Log::kDec<<
809 "No tracks found!!"<<ENDLOG;
814 for(int i=0; i<num_of_tracks; i++)
816 AliL3ConfMapTrack *track = (AliL3ConfMapTrack*)fTrack->GetTrack(i);
817 track->Fill(fVertex,fMaxDca);
823 Double_t AliL3ConfMapper::CpuTime()
825 //Return the Cputime in seconds.
827 gettimeofday( &tv, NULL );
828 return tv.tv_sec+(((Double_t)tv.tv_usec)/1000000.);
829 //return (Double_t)(clock()) / CLOCKS_PER_SEC;