]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/ITS/tracking/AliHLTITSDetector.h
dynamic adjustment of the output buffer size estimator
[u/mrichter/AliRoot.git] / HLT / ITS / tracking / AliHLTITSDetector.h
CommitLineData
2f399afc 1// ************************************************************************
2// This file is property of and copyright by the ALICE HLT Project *
3// ALICE Experiment at CERN, All rights reserved. *
4// See cxx source for full Copyright notice *
5// *
6//*************************************************************************
7
8#ifndef ALIHLTITSDETECTOR_H
9#define ALIHLTITSDETECTOR_H
10
11#include "AliITSRecPoint.h"
12#include "TMath.h"
13
14class AliITSDetTypeRec;
15
16/**
17 * @class AliHLTITSDetector
18 *
19 * The AliHLTTPCCAHit class is the internal representation
20 * of the TPC clusters for the AliHLTTPCCATracker algorithm.
21 *
22 */
23class AliHLTITSDetector
24{
25 public:
26 AliHLTITSDetector():fR(0),fRmisal(0),fPhi(0),fSinPhi(0),fCosPhi(0),fYmin(0),fYmax(0),fZmin(0),fZmax(0),fIsBad(kFALSE),fNChips(0),fChipIsBad(0) {}
27 AliHLTITSDetector(Double_t r,Double_t phi):fR(r),fRmisal(r),fPhi(phi),fSinPhi(TMath::Sin(phi)),fCosPhi(TMath::Cos(phi)),fYmin(10000),fYmax(-1000),fZmin(10000),fZmax(-1000),fIsBad(kFALSE),fNChips(0),fChipIsBad(0) {}
28 ~AliHLTITSDetector() {if(fChipIsBad) delete [] fChipIsBad;}
29 inline void GetGlobalXYZ( const AliITSRecPoint *cl, Double_t xyz[3]) const;
30 Double_t GetR() const {return fR;}
31 Double_t GetRmisal() const {return fRmisal;}
32 Double_t GetPhi() const {return fPhi;}
33 Double_t GetYmin() const {return fYmin;}
34 Double_t GetYmax() const {return fYmax;}
35 Double_t GetZmin() const {return fZmin;}
36 Double_t GetZmax() const {return fZmax;}
37 Bool_t IsBad() const {return fIsBad;}
38 Int_t GetNChips() const {return fNChips;}
39 Bool_t IsChipBad(Int_t iChip) const {return (fChipIsBad ? fChipIsBad[iChip] : kFALSE);}
40 void SetRmisal(Double_t rmisal) {fRmisal = rmisal;}
41 void SetYmin(Double_t min) {fYmin = min;}
42 void SetYmax(Double_t max) {fYmax = max;}
43 void SetZmin(Double_t min) {fZmin = min;}
44 void SetZmax(Double_t max) {fZmax = max;}
45 void SetBad() {fIsBad = kTRUE;}
46 void ReadBadDetectorAndChips(Int_t ilayer,Int_t idet,const AliITSDetTypeRec *detTypeRec);
47
48 private:
49
50 AliHLTITSDetector(const AliHLTITSDetector& det);
51 AliHLTITSDetector & operator=(const AliHLTITSDetector& det){
52 this->~AliHLTITSDetector();new(this) AliHLTITSDetector(det);
53 return *this;}
54 Double_t fR; // polar coordinates: r
55 Double_t fRmisal; // polar coordinates: r, with misalignment
56 Double_t fPhi; // polar coordinates: phi
57 Double_t fSinPhi; // sin of phi;
58 Double_t fCosPhi; // cos of phi
59 Double_t fYmin; // local y minimal
60 Double_t fYmax; // local max y
61 Double_t fZmin; // local z min
62 Double_t fZmax; // local z max
63 Bool_t fIsBad; // is detector dead or noisy?
64 Int_t fNChips; // number of chips
65 Bool_t *fChipIsBad; //[fNChips] is chip dead or noisy?
66};
67
68inline void AliHLTITSDetector::GetGlobalXYZ(const AliITSRecPoint *cl, Double_t xyz[3]) const
69{
70 //
71 // get cluster coordinates in global cooordinate
72 //
73 xyz[2] = cl->GetZ();
74 xyz[0] = fR*fCosPhi - cl->GetY()*fSinPhi;
75 xyz[1] = fR*fSinPhi + cl->GetY()*fCosPhi;
76}
77
78#endif