]>
Commit | Line | Data |
---|---|---|
1963b290 | 1 | #ifndef ALIEMCALSHISHKEBABTRD1MODULE_H |
2 | #define ALIEMCALSHISHKEBABTRD1MODULE_H | |
3 | ||
4 | /* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
25ab8a31 | 8 | //_________________________________________________________________________ |
9 | // Main class for TRD1 geometry of Shish-Kebab case. | |
10 | // Author: Aleksei Pavlinov(WSU). | |
11 | // Nov 2004; Feb 2006 | |
1963b290 | 12 | |
13 | #include "TNamed.h" | |
1963b290 | 14 | #include "TVector2.h" |
15 | ||
16 | class AliEMCALGeometry; | |
17 | ||
18 | class AliEMCALShishKebabTrd1Module : public TNamed { | |
19 | public: | |
25ab8a31 | 20 | AliEMCALShishKebabTrd1Module(Double_t theta=0.0, AliEMCALGeometry *g=0); |
1963b290 | 21 | AliEMCALShishKebabTrd1Module(AliEMCALShishKebabTrd1Module &leftNeighbor); |
25ab8a31 | 22 | void Init(Double_t A, Double_t B); |
1d46d1f6 | 23 | void DefineAllStaff(); |
0a4cb131 | 24 | AliEMCALShishKebabTrd1Module(const AliEMCALShishKebabTrd1Module& mod); |
25 | ||
25ab8a31 | 26 | AliEMCALShishKebabTrd1Module & operator = (const AliEMCALShishKebabTrd1Module& /*rvalue*/) { |
27 | Fatal("operator =", "not implemented") ; | |
28 | return *this ; | |
29 | } | |
1963b290 | 30 | |
31 | virtual ~AliEMCALShishKebabTrd1Module(void) {} | |
32 | Bool_t GetParameters(); | |
25ab8a31 | 33 | void DefineName(Double_t theta); |
1963b290 | 34 | void DefineFirstModule(); |
35 | ||
25ab8a31 | 36 | Double_t GetTheta() const {return fTheta;} |
1963b290 | 37 | TVector2& GetCenterOfModule() {return fOK;} |
1963b290 | 38 | |
25ab8a31 | 39 | Double_t GetPosX() const {return fOK.Y();} |
40 | Double_t GetPosZ() const {return fOK.X();} | |
41 | Double_t GetPosXfromR() const {return fOK.Y() - fgr;} | |
42 | Double_t GetA() const {return fA;} | |
43 | Double_t GetB() const {return fB;} | |
1d46d1f6 | 44 | Double_t GetRadius() const {return fgr;} |
1963b290 | 45 | // Additional offline staff |
dc7da436 | 46 | // ieta=0 or 1 - Jun 02, 2006 |
e52475ed | 47 | TVector2& GetCenterOfCellInLocalCoordinateofSM(Int_t ieta) |
dc7da436 | 48 | { if(ieta<=0) return fOK2; |
e52475ed | 49 | else return fOK1;} |
1d46d1f6 | 50 | void GetCenterOfCellInLocalCoordinateofSM(Int_t ieta, Double_t &xr, Double_t &zr) const |
e52475ed | 51 | { |
dc7da436 | 52 | if(ieta<=0) {xr = fOK2.Y(); zr = fOK2.X(); |
e52475ed | 53 | } else {xr = fOK1.Y(); zr = fOK1.X(); |
54 | } | |
55 | } | |
1d46d1f6 | 56 | void GetCenterOfCellInLocalCoordinateofSM_3X3(Int_t ieta, Double_t &xr, Double_t &zr) const |
57 | { // 3X3 case - Nov 9,2006 | |
58 | ieta = ieta<0? ieta=0 : ieta; // check index | |
59 | ieta = ieta>2? ieta=2 : ieta; | |
60 | xr = fOK3X3[2-ieta].Y(); | |
61 | zr = fOK3X3[2-ieta].X(); | |
62 | } | |
d25f2c54 | 63 | void GetCenterOfCellInLocalCoordinateofSM_1X1(Double_t &xr, Double_t &zr) const |
64 | { // 1X1 case - Nov 27,2006 | |
65 | // Center of cell is center of module | |
66 | xr = fOK.Y() - fgr; | |
67 | zr = fOK.X(); | |
68 | } | |
b44d5aa4 | 69 | // 15-may-06 |
70 | TVector2& GetCenterOfModuleFace() {return fOB;} | |
71 | TVector2& GetCenterOfModuleFace(Int_t ieta) { | |
dc7da436 | 72 | if(ieta<=0) return fOB2; |
b44d5aa4 | 73 | else return fOB1; |
74 | } | |
1963b290 | 75 | // |
25ab8a31 | 76 | Double_t GetTanBetta() const {return fgtanBetta;} |
77 | Double_t Getb() const {return fgb;} | |
1963b290 | 78 | // service methods |
25ab8a31 | 79 | void PrintShish(Int_t pri=1) const; // *MENU* |
1d46d1f6 | 80 | Double_t GetThetaInDegree() const; |
25ab8a31 | 81 | Double_t GetEtaOfCenterOfModule() const; |
1d46d1f6 | 82 | Double_t GetMaxEtaOfModule(int pri=0) const; |
83 | static Double_t ThetaToEta(Double_t theta) | |
84 | {return -TMath::Log(TMath::Tan(theta/2.));} | |
1963b290 | 85 | |
25ab8a31 | 86 | protected: |
1963b290 | 87 | // geometry info |
88 | static AliEMCALGeometry *fgGeometry; //! | |
89 | static Double_t fga; // 2*dx1=2*dy1 | |
90 | static Double_t fga2; // 2*dx2 | |
91 | static Double_t fgb; // 2*dz1 | |
92 | static Double_t fgangle; // ~1 degree | |
93 | static Double_t fgtanBetta; // tan(fgangle/2.) | |
25ab8a31 | 94 | static Double_t fgr; // radius to IP |
1963b290 | 95 | |
b44d5aa4 | 96 | TVector2 fOK; // position the module center in ALICE system; x->y; z->x; |
1963b290 | 97 | Double_t fA; // parameters of right line : y = A*z + B |
98 | Double_t fB; // system where zero point is IP. | |
99 | Double_t fThetaA; // angle coresponding fA - for convinience | |
1d46d1f6 | 100 | Double_t fTheta; // theta angle of perpendicular to SK module |
e52475ed | 101 | // position of towers(cells) with differents ieta (1 or 2) in local coordinate of SM |
102 | // Nov 04,2004; Feb 19,2006 | |
dc7da436 | 103 | TVector2 fOK1; // ieta=1 |
104 | TVector2 fOK2; // ieta=0 | |
b44d5aa4 | 105 | // May 13, 2006; local position of module (cells) face |
106 | TVector2 fOB; // module | |
dc7da436 | 107 | TVector2 fOB1; // ieta=1 |
108 | TVector2 fOB2; // ieta=0 | |
1d46d1f6 | 109 | // 3X3 case - Nov 9,2006 |
110 | TVector2 fOK3X3[3]; | |
25ab8a31 | 111 | // public: |
1d46d1f6 | 112 | ClassDef(AliEMCALShishKebabTrd1Module,1) // TRD1 Shish-Kebab module |
1963b290 | 113 | }; |
114 | ||
115 | #endif |