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

          Line data    Source code
       1             : #ifndef AliMFTCACell_H
       2             : #define AliMFTCACell_H
       3             : 
       4             : #include "TObject.h"
       5             : #include "TVector3.h"
       6             : 
       7             : class AliMFTCACell : public TObject {
       8             :   
       9             : public:
      10             :   
      11             :   AliMFTCACell();
      12           0 :   ~AliMFTCACell() {};
      13             :   
      14             :   AliMFTCACell (const AliMFTCACell &cell);
      15             :   AliMFTCACell &operator=(const AliMFTCACell&);
      16             :   
      17             :   virtual void Clear(Option_t *);
      18             :   void SetGID(Int_t gid, Int_t trackid1, Int_t trackid2) {
      19           0 :     fGID = gid; fTrackGID[0] = trackid1; fTrackGID[1] = trackid2; }
      20           0 :   void SetStatus(Int_t s) { fStatus = s; }
      21             :   void SetHits(Double_t *h1, Double_t *h2, Double_t z1, Double_t z2);
      22           0 :   void SetLayers(Int_t iL1, Int_t iL2) { fLayer[0] = iL1; fLayer[1] = iL2; }
      23           0 :   void SetMFTClsId(Int_t id1, Int_t id2) { fMFTClsId[0] = id1; fMFTClsId[1] = id2; }
      24           0 :   void SetDetElemID(Int_t id1, Int_t id2) { fDetElemID[0] = id1; fDetElemID[1] = id2; }
      25           0 :   Double_t *GetHit1() { return fHit[0]; }
      26           0 :   Double_t *GetHit2() { return fHit[1]; }
      27           0 :   Double_t *GetHitp1() { return fHitp[0]; }
      28           0 :   Double_t *GetHitp2() { return fHitp[1]; }
      29           0 :   Int_t *GetLayers() { return fLayer; }
      30           0 :   Int_t *GetMFTClsId() { return fMFTClsId; }
      31           0 :   Int_t *GetDetElemID() { return fDetElemID; }
      32           0 :   TVector3 *GetSeg()  { return fSeg; }
      33           0 :   const Bool_t HasNbL() { return fNNbL > 0 ? kTRUE : kFALSE; }
      34           0 :   const Bool_t HasNbR() { return fNNbR > 0 ? kTRUE : kFALSE; }
      35           0 :   void UpdateStatus() { if (fUpStat) { fStatus++; fUpStat = kFALSE; } }
      36           0 :   void IncrStatus() { fUpStat = kTRUE; }
      37           0 :   const Int_t GetStatus() { return fStatus; }
      38           0 :   const Int_t GetGID() { return fGID; }
      39             :   const Int_t GetTrackGID(Int_t p) {
      40           0 :     if (p != 0 && p != 1) {
      41           0 :       printf("AliMFTCACell::GetTrackGID : wrong index.\n");
      42           0 :       return -1;
      43           0 :     } else return fTrackGID[p]; }
      44             :   void DrawOGL(Char_t *name);
      45           0 :   void SetUsed(Bool_t isu) { fIsUsed = isu; }
      46           0 :   const Bool_t IsUsed() { return fIsUsed; }
      47           0 :   void AddLeftNeighbour(Int_t cellgid)  { fNbLgid[fNNbL++] = cellgid; }
      48           0 :   void AddRightNeighbour(Int_t cellgid) { fNbRgid[fNNbR++] = cellgid; }
      49           0 :   const Int_t GetNNbL() { return fNNbL; }
      50           0 :   const Int_t GetNNbR() { return fNNbR; }
      51           0 :   const Int_t GetNbLgid(Int_t id) { return fNbLgid[id]; }
      52           0 :   const Int_t GetNbRgid(Int_t id) { return fNbRgid[id]; }
      53             :   void Reset() {
      54           0 :     fStatus = 1;
      55           0 :     fUpStat = kFALSE;
      56           0 :     fNNbL = fNNbR = 0;
      57           0 :     for (Int_t i = 0; i < 100; i++) { fNbLgid[i] = fNbRgid[i] = -1; }
      58           0 :   }
      59             :   const Int_t GetLength() {
      60           0 :     return (fLayer[1]-fLayer[0]);
      61             :   }
      62           0 :   void SetIsMerged() { fIsMerged = kTRUE; }
      63           0 :   const Bool_t IsMerged() { return fIsMerged; }
      64             :   
      65             :   void PrintCell(Option_t *opt) {
      66           0 :     printf("PrintCell------------------------GID = %10d \n",fGID);
      67           0 :     printf("Hit1: %9.4f   %9.4f   %9.4f \n",fHit[0][0],fHit[0][1],fHit[0][2]);
      68           0 :     printf("Hit2: %9.4f   %9.4f   %9.4f \n",fHit[1][0],fHit[1][1],fHit[1][2]);
      69           0 :     printf("Status: %d \n",fStatus);
      70           0 :     if (strcmp(opt,"FULL") == 0) {
      71           0 :       printf("Segment vector: \n");
      72           0 :       fSeg->Print();
      73           0 :     }
      74           0 :     if (strcmp(opt,"MC") == 0) {
      75           0 :       printf("Track:  %5d   %5d \n",fTrackGID[0],fTrackGID[1]);
      76           0 :     }
      77           0 :   }
      78             :   
      79             : private:
      80             :   
      81             :   Int_t fGID;              // Global identifier
      82             :   Int_t fTrackGID[2];      // Track GID of cell ends
      83             :   Int_t fLayer[2];         // Layer numbers of cell ends
      84             :   Double_t fHit[2][3];     // X,Y,Z values of cell ends at plane position
      85             :   Double_t fHitp[2][3];    // X,Y,Z values of cell ends
      86             :   TVector3 *fSeg;          //! Cell segment
      87             :   Int_t fStatus;           // Cell status
      88             :   Bool_t fUpStat;          // Status must be updated
      89             :   Bool_t fIsUsed;          // True if the cell has been attached to a track
      90             :   Int_t fNNbL;             // Number of neighbours at left
      91             :   Int_t fNNbR;             // Number of neighbours at right
      92             :   Int_t fNbLgid[100];      // GID of cell left neighbours
      93             :   Int_t fNbRgid[100];      // GID of cell right neighbours
      94             :   Bool_t fIsMerged;        // True if is from merged cells in the overlaps
      95             :   Int_t fDetElemID[2];     // ladders ID
      96             :   Int_t fMFTClsId[2];      // ID of MFT clusters  
      97             : 
      98          12 :   ClassDef(AliMFTCACell,1);
      99             :   
     100             : };
     101             : 
     102             : #endif

Generated by: LCOV version 1.11