]>
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 | } | |
03b05b15 | 64 | void GetCenterOfCellInLocalCoordinateofSM3X3(Int_t ieta, Double_t &xr, Double_t &zr) const |
65 | { | |
66 | // Center of cell | |
67 | // 3X3 case - Nov 9,2006 | |
afa648ff | 68 | ieta = ieta<0? 0 : ieta; // check index |
69 | ieta = ieta>2? 2 : ieta; | |
3e147bc8 | 70 | xr = fOK3X3[2-ieta].Y(); |
71 | zr = fOK3X3[2-ieta].X(); | |
72 | } | |
03b05b15 | 73 | void GetCenterOfCellInLocalCoordinateofSM1X1(Double_t &xr, Double_t &zr) const |
74 | { | |
75 | // 1X1 case - Nov 27,2006 | |
3e147bc8 | 76 | // Center of cell is center of module |
77 | xr = fOK.Y() - fgr; | |
78 | zr = fOK.X(); | |
79 | } | |
80 | // 15-may-06 | |
81 | TVector2& GetCenterOfModuleFace() {return fOB;} | |
82 | TVector2& GetCenterOfModuleFace(Int_t ieta) { | |
83 | if(ieta<=0) return fOB2; | |
84 | else return fOB1; | |
85 | } | |
86 | // | |
87 | Double_t GetTanBetta() const {return fgtanBetta;} | |
88 | Double_t Getb() const {return fgb;} | |
89 | // service methods | |
90 | void PrintShish(Int_t pri=1) const; // *MENU* | |
91 | Double_t GetThetaInDegree() const; | |
92 | Double_t GetEtaOfCenterOfModule() const; | |
93 | Double_t GetMaxEtaOfModule(Int_t pri=0) const; | |
94 | static Double_t ThetaToEta(Double_t theta) | |
95 | {return -TMath::Log(TMath::Tan(theta/2.));} | |
96 | ||
97 | protected: | |
98 | // geometry info | |
99 | static AliJetDummyGeo *fgGeometry; //! | |
100 | static Double_t fga; // 2*dx1=2*dy1 | |
101 | static Double_t fga2; // 2*dx2 | |
102 | static Double_t fgb; // 2*dz1 | |
103 | static Double_t fgangle; // ~1 degree | |
104 | static Double_t fgtanBetta; // tan(fgangle/2.) | |
105 | static Double_t fgr; // radius to IP | |
106 | ||
107 | TVector2 fOK; // position the module center in ALICE system; x->y; z->x; | |
108 | Double_t fA; // parameters of right line : y = A*z + B | |
109 | Double_t fB; // system where zero point is IP. | |
110 | Double_t fThetaA; // angle coresponding fA - for convinience | |
111 | Double_t fTheta; // theta angle of perpendicular to SK module | |
112 | // position of towers(cells) with differents ieta (1 or 2) in local coordinate of SM | |
113 | // Nov 04,2004; Feb 19,2006 | |
114 | TVector2 fOK1; // ieta=1 | |
115 | TVector2 fOK2; // ieta=0 | |
116 | // May 13, 2006; local position of module (cells) face | |
117 | TVector2 fOB; // module | |
118 | TVector2 fOB1; // ieta=1 | |
119 | TVector2 fOB2; // ieta=0 | |
120 | // 3X3 case - Nov 9,2006 | |
03b05b15 | 121 | TVector2 fOK3X3[3]; // tower positions 3X3 |
122 | Int_t fDebug; // debug flag | |
3e147bc8 | 123 | ClassDef(AliJetDummyShishKebabTrd1Module,1) // TRD1 Shish-Kebab module |
124 | }; | |
125 | ||
126 | #endif |