AliRoot Core  edcc906 (edcc906)
AliMFTCACell.h
Go to the documentation of this file.
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();
13 
14  AliMFTCACell (const AliMFTCACell &cell);
16 
17  virtual void Clear(Option_t *);
18  void SetGID(Int_t gid, Int_t trackid1, Int_t trackid2) {
19  fGID = gid; fTrackGID[0] = trackid1; fTrackGID[1] = trackid2; }
20  void SetStatus(Int_t s) { fStatus = s; }
21  void SetHits(Double_t *h1, Double_t *h2, Double_t z1, Double_t z2);
22  void SetLayers(Int_t iL1, Int_t iL2) { fLayer[0] = iL1; fLayer[1] = iL2; }
23  void SetMFTClsId(Int_t id1, Int_t id2) { fMFTClsId[0] = id1; fMFTClsId[1] = id2; }
24  void SetDetElemID(Int_t id1, Int_t id2) { fDetElemID[0] = id1; fDetElemID[1] = id2; }
25  Double_t *GetHit1() { return fHit[0]; }
26  Double_t *GetHit2() { return fHit[1]; }
27  Double_t *GetHitp1() { return fHitp[0]; }
28  Double_t *GetHitp2() { return fHitp[1]; }
29  Int_t *GetLayers() { return fLayer; }
30  Int_t *GetMFTClsId() { return fMFTClsId; }
31  Int_t *GetDetElemID() { return fDetElemID; }
32  TVector3 *GetSeg() { return fSeg; }
33  const Bool_t HasNbL() { return fNNbL > 0 ? kTRUE : kFALSE; }
34  const Bool_t HasNbR() { return fNNbR > 0 ? kTRUE : kFALSE; }
35  void UpdateStatus() { if (fUpStat) { fStatus++; fUpStat = kFALSE; } }
36  void IncrStatus() { fUpStat = kTRUE; }
37  const Int_t GetStatus() { return fStatus; }
38  const Int_t GetGID() { return fGID; }
39  const Int_t GetTrackGID(Int_t p) {
40  if (p != 0 && p != 1) {
41  printf("AliMFTCACell::GetTrackGID : wrong index.\n");
42  return -1;
43  } else return fTrackGID[p]; }
44  void DrawOGL(Char_t *name);
45  void SetUsed(Bool_t isu) { fIsUsed = isu; }
46  const Bool_t IsUsed() { return fIsUsed; }
47  void AddLeftNeighbour(Int_t cellgid) { fNbLgid[fNNbL++] = cellgid; }
48  void AddRightNeighbour(Int_t cellgid) { fNbRgid[fNNbR++] = cellgid; }
49  const Int_t GetNNbL() { return fNNbL; }
50  const Int_t GetNNbR() { return fNNbR; }
51  const Int_t GetNbLgid(Int_t id) { return fNbLgid[id]; }
52  const Int_t GetNbRgid(Int_t id) { return fNbRgid[id]; }
53  void Reset() {
54  fStatus = 1;
55  fUpStat = kFALSE;
56  fNNbL = fNNbR = 0;
57  for (Int_t i = 0; i < 100; i++) { fNbLgid[i] = fNbRgid[i] = -1; }
58  }
59  const Int_t GetLength() {
60  return (fLayer[1]-fLayer[0]);
61  }
62  void SetIsMerged() { fIsMerged = kTRUE; }
63  const Bool_t IsMerged() { return fIsMerged; }
64 
65  void PrintCell(Option_t *opt) {
66  printf("PrintCell------------------------GID = %10d \n",fGID);
67  printf("Hit1: %9.4f %9.4f %9.4f \n",fHit[0][0],fHit[0][1],fHit[0][2]);
68  printf("Hit2: %9.4f %9.4f %9.4f \n",fHit[1][0],fHit[1][1],fHit[1][2]);
69  printf("Status: %d \n",fStatus);
70  if (strcmp(opt,"FULL") == 0) {
71  printf("Segment vector: \n");
72  fSeg->Print();
73  }
74  if (strcmp(opt,"MC") == 0) {
75  printf("Track: %5d %5d \n",fTrackGID[0],fTrackGID[1]);
76  }
77  }
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;
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  ClassDef(AliMFTCACell,1);
99 
100 };
101 
102 #endif
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
void AddRightNeighbour(Int_t cellgid)
Definition: AliMFTCACell.h:48
const Int_t GetLength()
Definition: AliMFTCACell.h:59
Bool_t fUpStat
Definition: AliMFTCACell.h:88
virtual void Clear(Option_t *)
const Int_t GetStatus()
Definition: AliMFTCACell.h:37
const Int_t GetNNbL()
Definition: AliMFTCACell.h:49
void SetIsMerged()
Definition: AliMFTCACell.h:62
void SetStatus(Int_t s)
Definition: AliMFTCACell.h:20
const Bool_t IsUsed()
Definition: AliMFTCACell.h:46
Int_t fTrackGID[2]
Definition: AliMFTCACell.h:82
Int_t * GetDetElemID()
Definition: AliMFTCACell.h:31
Int_t * GetLayers()
Definition: AliMFTCACell.h:29
Float_t p[]
Definition: kNNTest.C:133
Double_t * GetHit1()
Definition: AliMFTCACell.h:25
Bool_t fIsMerged
Definition: AliMFTCACell.h:94
Double_t fHitp[2][3]
Definition: AliMFTCACell.h:85
void PrintCell(Option_t *opt)
Definition: AliMFTCACell.h:65
void SetDetElemID(Int_t id1, Int_t id2)
Definition: AliMFTCACell.h:24
Double_t * GetHitp1()
Definition: AliMFTCACell.h:27
AliMFTCACell & operator=(const AliMFTCACell &)
const Bool_t IsMerged()
Definition: AliMFTCACell.h:63
const Bool_t HasNbL()
Definition: AliMFTCACell.h:33
const Int_t GetNbRgid(Int_t id)
Definition: AliMFTCACell.h:52
void IncrStatus()
Definition: AliMFTCACell.h:36
Bool_t fIsUsed
Definition: AliMFTCACell.h:89
const Int_t GetNbLgid(Int_t id)
Definition: AliMFTCACell.h:51
Double_t * GetHit2()
Definition: AliMFTCACell.h:26
const Int_t GetNNbR()
Definition: AliMFTCACell.h:50
TVector3 * fSeg
Definition: AliMFTCACell.h:86
void Reset()
Definition: AliMFTCACell.h:53
void AddLeftNeighbour(Int_t cellgid)
Definition: AliMFTCACell.h:47
void SetGID(Int_t gid, Int_t trackid1, Int_t trackid2)
Definition: AliMFTCACell.h:18
void SetLayers(Int_t iL1, Int_t iL2)
Definition: AliMFTCACell.h:22
Int_t fMFTClsId[2]
Definition: AliMFTCACell.h:96
Int_t fNbLgid[100]
Definition: AliMFTCACell.h:92
const Int_t GetTrackGID(Int_t p)
Definition: AliMFTCACell.h:39
void DrawOGL(Char_t *name)
const Bool_t HasNbR()
Definition: AliMFTCACell.h:34
Double_t * GetHitp2()
Definition: AliMFTCACell.h:28
void SetHits(Double_t *h1, Double_t *h2, Double_t z1, Double_t z2)
Int_t fLayer[2]
Definition: AliMFTCACell.h:83
void SetUsed(Bool_t isu)
Definition: AliMFTCACell.h:45
Int_t fNbRgid[100]
Definition: AliMFTCACell.h:93
Int_t fDetElemID[2]
Definition: AliMFTCACell.h:95
Double_t fHit[2][3]
Definition: AliMFTCACell.h:84
const Int_t GetGID()
Definition: AliMFTCACell.h:38
void SetMFTClsId(Int_t id1, Int_t id2)
Definition: AliMFTCACell.h:23
Int_t * GetMFTClsId()
Definition: AliMFTCACell.h:30
TVector3 * GetSeg()
Definition: AliMFTCACell.h:32
void UpdateStatus()
Definition: AliMFTCACell.h:35
Int_t fStatus
Cell segment.
Definition: AliMFTCACell.h:87