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