LCOV - code coverage report
Current view: top level - ITSMFT/MFT/MFTrec - AliMFTTrackFinder.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 39 2.6 %
Date: 2016-06-14 17:26:59 Functions: 1 39 2.6 %

          Line data    Source code
       1             : /* Copyright(c) 2004-2006, ALICE Experiment at CERN, All rights reserved. *
       2             :  * See cxx source for full Copyright notice     */
       3             : 
       4             : //====================================================================================================================================================
       5             : //
       6             : //      Class for finding Tracks from Cluster of the ALICE Muon Forward Tracker
       7             : //
       8             : //      Contact author: raphael.tieulent@cern.ch
       9             : //
      10             : //====================================================================================================================================================
      11             : 
      12             : #ifndef AliMFTTrackFinder_H
      13             : #define AliMFTTrackFinder_H
      14             : 
      15             : #include "TObject.h"
      16             : #include "TClonesArray.h"
      17             : #include "TList.h"
      18             : #include "TH1.h"
      19             : #include "TH2.h"
      20             : 
      21             : #include "AliMFTConstants.h"
      22             : #include "AliLog.h"
      23             : 
      24             : class AliMFTCATrack;
      25             : class AliMFTCACell;
      26             : class AliMFTCAHit;
      27             : class AliMFTCALayer;
      28             : class AliMFTCARoad;
      29             : class TF1;
      30             : 
      31             : //============================================================================================
      32             : 
      33           0 : class AliMFTTrackFinder : public TObject {
      34             :   
      35             : private:
      36             :   static const Int_t fNDetMax = 10;
      37             : public:
      38             :   
      39             :   AliMFTTrackFinder();
      40             :   ~AliMFTTrackFinder();
      41             :   
      42             :   void Init(Char_t *parfile);
      43             :   void ReadParam(Char_t *parfile = "param.txt");
      44           0 :   void SetDebug(Int_t debug) { fDebug = debug; }
      45             :   
      46             :   virtual void Clear(Option_t *);
      47             :   
      48             :   AliMFTCATrack *AddTrack(Int_t gid);
      49             :   AliMFTCATrack *AddTrack(Int_t gid, const AliMFTCATrack& track);
      50             :   
      51           0 :   const Int_t GetNlayers() { return fNlayers; }
      52           0 :   const Int_t GetNtracks() { return fNtracks; }
      53           0 :   const Int_t GetNcells()  { return fCellGID; }
      54             :   
      55             :   void CreateCellsOld(Bool_t calcVertex = kFALSE);
      56             :   void CreateCells(Bool_t calcVertex = kFALSE);
      57             :   void CreateGapCells();
      58             :   void ClearCells();
      59             :   void ResetCells();
      60             :   
      61             :   AliMFTCACell *GetCellByGID(Int_t gid);
      62             :   
      63             :   void RunForward();
      64             :   void RunBackward();
      65             :   void LoadClusters( TClonesArray *clusterArrayFront[AliMFTConstants::fNMaxPlanes],  TClonesArray *clusterArrayBack[AliMFTConstants::fNMaxPlanes] );
      66             :   
      67             :   Bool_t RuleSelect(AliMFTCACell *cellL, AliMFTCACell *cellR);
      68             :   Bool_t RuleSelectCell(AliMFTCACell *cell);
      69             :   Bool_t RuleSelectCell(Double_t *h1, Double_t *h2, Int_t iL1, TF1 *f = 0, Bool_t acalc = kFALSE);
      70             :   Bool_t RuleSelect2LayersGap(Int_t iL1, Int_t iL2, Double_t *hit1, Double_t *hit2);
      71             :   
      72           0 :   AliMFTCALayer *GetLayer(Int_t nl) { return fLayers[nl]; }
      73           0 :   AliMFTCATrack *GetTrack(Int_t nt) { return (AliMFTCATrack*)fTracks->At(nt); }
      74             :   
      75           0 :   TList * GetHistograms(){return fHistList;};
      76             :   
      77             :   void UpdateCellStatus();
      78             :   
      79             :   void PrintAll();
      80             :   void DrawHisto();
      81             :   void DrawTracks(Double_t *pTot, Double_t *Theta);
      82             :   void FilterTracks();
      83             :   void PrintTrack(Int_t id);
      84             :   
      85             :   void CalculateVertex();
      86           0 :   Double_t GetZVertCalc() { return fZVertCalc; }
      87             :   void SetZVertRange(Double_t *zvr, Double_t zvd) {
      88           0 :     fZVertRange[0] = zvr[0]; fZVertRange[1] = zvr[1];
      89           0 :     fZVertDet = zvd;
      90           0 :   }
      91             :   
      92             :   // parameters
      93           0 :   const Double_t GetThick()              { return fThick; }
      94           0 :   const Double_t GetPixelNoise()         { return fPixelNoise; }
      95           0 :   const Double_t GetPlaneDetEff(Int_t i) { return fPlaneDetEff[i]; }
      96           0 :   const Double_t GetMBRate()             { return fMBRate; }
      97           0 :   const Double_t GetCMOSIntTime()        { return fCMOSIntTime; }
      98           0 :   const Bool_t   AddNoise()              { return fAddNoise; }
      99           0 :   const Bool_t   UseTF()                 { return fUseTF; }
     100           0 :   const Bool_t   AddQED()                { return fAddQED; }
     101           0 :   const Bool_t   CalcVertex()            { return fCalcVertex; }
     102           0 :   const Bool_t   ReadGeom()              { return fReadGeom; }
     103           0 :   const Char_t  *GetGeomName()           { return (fGeomName.Append(".root")).Data(); }
     104             :   
     105             :   void PrintParam();
     106             :   
     107           0 :   void SetCAtime(Double_t cpu, Double_t real) { fCPUTime += cpu; fRealTime += real; }
     108             :   
     109           0 :   const Double_t GetCPUTime() { return fCPUTime; }
     110           0 :   const Double_t GetRealTime() { return fRealTime; }
     111             :   
     112           0 :   const Int_t GetNDet() { return fNlayers; }
     113             :   
     114             :   void FindTracks();   // simple track finding
     115             :   
     116             :   void RemoveLastTrack() {
     117           0 :     AliInfo("Removing Last Track");
     118           0 :     fTracks->RemoveAt(fTracks->GetLast());
     119           0 :     fNtracks--;
     120           0 :   }
     121             :   
     122             :   void AnalyzeCells();
     123           0 :   const Int_t GetNDifTracks() { return fNDifTracks; }
     124             :   
     125             :   void SetPlanesZ(Double_t *z, Int_t n) {
     126           0 :     for (Int_t i = 0; i < n; i++) fPlanesZ[i] = z[i];
     127           0 :   }
     128             :   
     129             :   void BuildRoads();
     130             :   AliMFTCARoad *AddRoad();
     131           0 :   AliMFTCARoad *GetRoad(Int_t nr) { return (AliMFTCARoad*)fRoads->At(nr); }
     132           0 :   const Int_t GetNRoads() { return fNRoads; }
     133             :   
     134             :   // CA using roads
     135             :   void CreateCellsR(AliMFTCARoad *road);
     136             :   void RunForwardR(AliMFTCARoad *road, Int_t &trackGID);
     137             :   void RunBackwardR(AliMFTCARoad *road, Int_t &trackGID);
     138             :   void UpdateCellStatusR();
     139             :   Bool_t LinFit(Int_t nDet, Double_t *xcl,
     140             :                 Double_t *ycl, Double_t *yerr,
     141             :                 Double_t &a, Double_t &ae, Double_t &b, Double_t &be,
     142             :                 Int_t skip = -1);
     143           0 :   Double_t GetErrX() { return fErrX; }
     144           0 :   Double_t GetErrY() { return fErrY; }
     145             : 
     146             : private:
     147             : 
     148             :   Float_t fXCut;                   ///< Cut in x difference; RuleSelect
     149             :   Float_t fYCut;                   ///< Cut in y difference; RuleSelect
     150             :   Float_t fACutV[fNDetMax];        ///< Cut in angle difference: for cell vertex compatibility
     151             :   Float_t fACutN[fNDetMax];        ///< Cut in angle difference: for neighbor cells compatibility
     152             :   Float_t fMaxSegAngle;            ///< Max cut of the Theta angle of segments [deg]
     153             :   
     154             :   Int_t fCellGID;                  //!<! Cell global identifier
     155             :   Int_t fMaxCellStatus;            //!<! Maximum value of a cell status after RunForward
     156             :   Int_t fNlayers;                  ///< Number of detection planes
     157             :   Int_t fNtracks;                  //!<! Number of tracks
     158             :   
     159             :   AliMFTCALayer *fLayers[fNDetMax]; //!<! Array of layers
     160             :   
     161             :   TClonesArray *fTracks;           //!<! Array of tracks
     162             :   TList * fHistList;               //!<! List of histograms
     163             :   
     164             :   TH1F *hDA[fNDetMax];             //!<! Histogram with angle between cells
     165             :   TH1F *hDAv[fNDetMax];            //!<! Histogram with angle with respect to the vertex
     166             :   TH2F *hDXY[fNDetMax];            //!<! Histogram with X,Y distance between end of cells
     167             :   TH1F *hNGoodCell;                //!<! Histogram showing numbers of good cells in the track
     168             :   TH1F *hTrackType;                //!<! Histogram track Type: 0 = good track ; 1 = hits from other track ; 2 = hits from noisy pixels
     169             :   TH1F *hAngleCells;               //!<! Angle between adjacent cells
     170             :   TH1F *hThetaCells;               //!<! Theta of the cells
     171             :   
     172             :   Bool_t   fCalcVertex;            // Calculate vertex z from cells
     173             :   Double_t fZVertCalc;             //!<! Calculated vertez z
     174             :   Double_t fZVertDet;              //!<! Vertex z given by ext detector
     175             :   Double_t fZVertRange[2];         //!<! Limits of vertex z accepted range
     176             :   Int_t    fMinTrackLength;        // Minimum requested track length in hits
     177             :   Double_t fPlaneDetEff[fNDetMax]; // Single plane efficiency
     178             :   Bool_t   fAddNoise;              // Add pixel noise
     179             :   Double_t fPixelNoise;            // Probability of pixel noise
     180             :   Bool_t   fAddQED;                // Add hits for QED processes
     181             :   Double_t fMBRate;                // Hadronic MB rate [kHz]
     182             :   Double_t fCMOSIntTime;           // CMOS Integration Time [micro seconds]
     183             :   Double_t fThick;                 // Single plane thickness in X0
     184             :   Bool_t   fReadGeom;              // Read geometry from ROOT file
     185             :   TString  fGeomName;              // Geometry file name
     186             :   Bool_t   fUseTF;                 // Use the TrackFinder
     187             :   
     188             :   Int_t fDebug;                    // Debugging level
     189             :   
     190             :   Double_t fCPUTime;               // CA CPU time
     191             :   Double_t fRealTime;              // CA real time
     192             :   
     193             :   Double_t GetCellAngleDif(AliMFTCACell *cell1, AliMFTCACell *cell2);
     194             :   Double_t GetCellInterceptX(AliMFTCACell *cell, Double_t z);
     195             :   Double_t GetCellInterceptY(AliMFTCACell *cell, Double_t z);
     196             :   
     197             :   TH2F *hHitDifXY;                 //!<!
     198             :   TH1F *hAngDifAll;                //!<!
     199             :   TH1F *hAngDifDup;                //!<!
     200             :   TH2F *hIntDifXYAll;              //!<!
     201             :   TH2F *hIntDifXYDup;              //!<!
     202             :   TH1F * hVertZ;
     203             :   TH1F * hVertZa;
     204             : 
     205             :   Int_t fNDifTracks;
     206             :   
     207             :   Double_t fPlanesZ[fNDetMax];     // median z values of the two faces
     208             :   Double_t fZGap;                  // distance between the two faces
     209             :   
     210             :   Int_t fNRoads;       //!<! number of built roads
     211             :   
     212             :   TClonesArray *fRoads;      //!<! Array of roads
     213             :   
     214             :   Double_t fErrX;            //!<! Error in X
     215             :   Double_t fErrY;            //!<! Error in Y
     216             : 
     217          12 :   ClassDef(AliMFTTrackFinder,2);
     218             :   
     219             : };
     220             : 
     221             : 
     222             : 
     223             : #endif

Generated by: LCOV version 1.11