New code from Piergiorgio added
[u/mrichter/AliRoot.git] / TRD / AliTRDgeometry.h
CommitLineData
dd9a6ee3 1#ifndef ALITRDGEOMETRY_H
2#define ALITRDGEOMETRY_H
f7336fa3 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8#include <TObject.h>
9#include <TMath.h>
10
11#include "AliRun.h"
12#include "AliRecPoint.h"
13
14#include "AliTRDconst.h"
15
16class AliTRDgeometry : public AliGeometry {
17
18 public:
19
20 AliTRDgeometry();
8230f242 21 virtual ~AliTRDgeometry();
f7336fa3 22
8230f242 23 virtual void CreateGeometry(Int_t *idtmed);
f7336fa3 24 virtual Int_t IsVersion() const = 0;
25 virtual void Init();
26 virtual Bool_t Local2Global(Int_t d, Float_t *local, Float_t *global);
27 virtual Bool_t Local2Global(Int_t p, Int_t c, Int_t s, Float_t *local, Float_t *global);
28 virtual Bool_t Rotate(Int_t d, Float_t *pos, Float_t *rot);
29 virtual Bool_t RotateBack(Int_t d, Float_t *rot, Float_t *pos);
30
6f1e466d 31 virtual void SetPHOShole() = 0;
32 virtual void SetRICHhole() = 0;
33
f7336fa3 34 virtual void SetRowPadSize(Float_t size) { fRowPadSize = size; };
35 virtual void SetColPadSize(Float_t size) { fColPadSize = size; };
36 virtual void SetTimeBinSize(Float_t size) { fTimeBinSize = size; };
37
6f1e466d 38 virtual Bool_t GetPHOShole() = 0;
39 virtual Bool_t GetRICHhole() = 0;
40
f7336fa3 41 virtual Int_t GetDetector(Int_t p, Int_t c, Int_t s);
42 virtual Int_t GetPlane(Int_t d);
43 virtual Int_t GetChamber(Int_t d);
44 virtual Int_t GetSector(Int_t d);
45
46 virtual Int_t GetRowMax(Int_t p, Int_t c, Int_t s) { return fRowMax[p][c][s]; };
47 virtual Int_t GetColMax(Int_t p) { return fColMax[p]; };
48 virtual Int_t GetTimeMax() { return fTimeMax; };
49
50 virtual Float_t GetRow0(Int_t p, Int_t c, Int_t s) { return fRow0[p][c][s]; };
51 virtual Float_t GetCol0(Int_t p) { return fCol0[p]; };
52 virtual Float_t GetTime0(Int_t p) { return fTime0[p]; };
53
54 virtual Float_t GetRowPadSize() { return fRowPadSize; };
55 virtual Float_t GetColPadSize() { return fColPadSize; };
56 virtual Float_t GetTimeBinSize() { return fTimeBinSize; };
57
8230f242 58 virtual void GetGlobal(const AliRecPoint *p, TVector3 &pos, TMatrix &mat);
59 virtual void GetGlobal(const AliRecPoint *p, TVector3 &pos);
f7336fa3 60
61 protected:
62
63 Float_t fCwidth[kNplan]; // Width of the chambers
64
65 Int_t fRowMax[kNplan][kNcham][kNsect]; // Number of pad-rows
66 Int_t fColMax[kNplan]; // Number of pad-columns
67 Int_t fTimeMax; // Number of time buckets
68
69 Float_t fRow0[kNplan][kNcham][kNsect]; // Row-position of pad 0
70 Float_t fCol0[kNplan]; // Column-position of pad 0
71 Float_t fTime0[kNplan]; // Time-position of pad 0
72
73 Float_t fRowPadSize; // Pad size in z-direction
74 Float_t fColPadSize; // Pad size in rphi-direction
75 Float_t fTimeBinSize; // Size of the time buckets
76
77 ClassDef(AliTRDgeometry,1) // TRD geometry base class
78
79};
80
81#endif