]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/AliITSUClusterLines.h
Coverity fix 24096
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUClusterLines.h
CommitLineData
30da2335 1#ifndef ALIITSUCLUSTERLINES_H
2#define ALIITSUCLUSTERLINES_H
3/* Copyright(c) 2009-2014, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/////////////////////////////////////////////////////////////////////////////
7// Class intended to gather and compute the parameters of vertex candidate //
8/////////////////////////////////////////////////////////////////////////////
9
10#include <TObject.h>
11#include <Riostream.h>
12#include "AliStrLine.h"
5e2539d9 13#include <vector>
14
15using std::vector;
30da2335 16
17
18class AliITSUClusterLines : public TObject {
19 public:
20 AliITSUClusterLines();
21 AliITSUClusterLines(UInt_t first, AliStrLine *firstL, UInt_t second, AliStrLine *secondL,Bool_t=kFALSE);
22 virtual ~AliITSUClusterLines();
23
24 void Add(UInt_t label, AliStrLine *line, Bool_t weight=kFALSE);
25 void ComputeClusterCentroid();
26 inline UInt_t GetSize() const { return fLabels.size(); }
27 inline Int_t* GetLabels(UInt_t &n) {n=fLabels.size(); return &fLabels[0]; }
28 inline void GetA(Float_t a[3]) { for(Int_t i=0; i<3; ++i) a[i]=fA[i]; }
29 inline void GetA(Double_t a[3]) { for(Int_t i=0; i<3; ++i) a[i]=fA[i]; }
30 inline void GetB(Float_t b[3]) { for(Int_t i=0; i<3; ++i) b[i]=fB[i]; }
31 inline void GetB(Double_t b[3]) { for(Int_t i=0; i<3; ++i) b[i]=fB[i]; }
32 void GetCovMatrix(Float_t cov[6]);
33 void GetCovMatrix(Double_t cov[6]);
34 inline void GetVertex(Float_t p[3]) { for(Int_t i=0; i<3; ++i) p[i]=fV[i]; }
35 inline void GetVertex(Double_t p[3]) { for(Int_t i=0; i<3; ++i) p[i]=fV[i]; }
36 inline void GetWeight(Float_t w[9]) { for(Int_t i=0; i<9; ++i) w[i]=fW[i]; }
37 inline void GetWeight(Double_t w[9]) { for(Int_t i=0; i<9; ++i) w[i]=fW[i]; }
38 //
39 virtual Bool_t IsSortable() const {return kTRUE;}
40 virtual Bool_t IsEqual(const TObject* obj) const;
41 virtual Int_t Compare(const TObject* obj) const;
42
43 protected:
44 Double_t fA[6]; // AX=B
45 Double_t fB[3]; // AX=B
46 vector<Int_t> fLabels; // labels
47 Double_t fV[3]; // vertex candidate
48 Double_t fW[9]; // weight matrix
49 ClassDef(AliITSUClusterLines,1);
50};
51
52#endif