1 #ifndef ALIEMCALSHISHKEBABTRD1MODULE_H
2 #define ALIEMCALSHISHKEBABTRD1MODULE_H
4 /* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
8 //_________________________________________________________________________
9 // Main class for TRD1 geometry of Shish-Kebab case.
10 // Author: Aleksei Pavlinov(WSU).
17 class AliEMCALEMCGeometry;
19 class AliEMCALShishKebabTrd1Module : public TNamed {
21 AliEMCALShishKebabTrd1Module(Double_t theta=0.0, AliEMCALEMCGeometry *g=0);
22 AliEMCALShishKebabTrd1Module(AliEMCALShishKebabTrd1Module &leftNeighbor);
23 void Init(Double_t A, Double_t B);
24 void DefineAllStaff();
25 AliEMCALShishKebabTrd1Module(const AliEMCALShishKebabTrd1Module& mod);
27 AliEMCALShishKebabTrd1Module & operator = (const AliEMCALShishKebabTrd1Module& /*rvalue*/) {
28 Fatal("operator =", "not implemented") ;
32 virtual ~AliEMCALShishKebabTrd1Module(void) {}
33 Bool_t GetParameters();
34 void DefineName(Double_t theta);
35 void DefineFirstModule();
37 Double_t GetTheta() const {return fTheta;}
38 TVector2& GetCenterOfModule() {return fOK;}
40 Double_t GetPosX() const {return fOK.Y();}
41 Double_t GetPosZ() const {return fOK.X();}
42 Double_t GetPosXfromR() const {return fOK.Y() - fgr;}
43 Double_t GetA() const {return fA;}
44 Double_t GetB() const {return fB;}
45 Double_t GetRadius() const {return fgr;}
46 TVector2 GetORB() const {return fORB;}
47 TVector2 GetORT() const {return fORT;}
48 // Additional offline staff
49 // ieta=0 or 1 - Jun 02, 2006
50 TVector2& GetCenterOfCellInLocalCoordinateofSM(Int_t ieta)
51 { if(ieta<=0) return fOK2;
53 void GetCenterOfCellInLocalCoordinateofSM(Int_t ieta, Double_t &xr, Double_t &zr) const
55 if(ieta<=0) {xr = fOK2.Y(); zr = fOK2.X();
56 } else {xr = fOK1.Y(); zr = fOK1.X();
59 void GetCenterOfCellInLocalCoordinateofSM3X3(Int_t ieta, Double_t &xr, Double_t &zr) const
60 { // 3X3 case - Nov 9,2006
61 if(ieta < 0) ieta = 0; //ieta = ieta<0? ieta=0 : ieta; // check index
62 if(ieta > 2) ieta = 2; //ieta = ieta>2? ieta=2 : ieta;
63 xr = fOK3X3[2-ieta].Y(); zr = fOK3X3[2-ieta].X();
65 void GetCenterOfCellInLocalCoordinateofSM1X1(Double_t &xr, Double_t &zr) const
66 { // 1X1 case - Nov 27,2006 // Center of cell is center of module
71 TVector2& GetCenterOfModuleFace() {return fOB;}
72 TVector2& GetCenterOfModuleFace(Int_t ieta) {
73 if(ieta<=0) return fOB2;
77 void GetPositionAtCenterCellLine(Int_t ieta, Double_t dist, TVector2 &v);
79 Double_t GetTanBetta() const {return fgtanBetta;}
80 Double_t Getb() const {return fgb;}
82 void PrintShish(Int_t pri=1) const; // *MENU*
83 Double_t GetThetaInDegree() const;
84 Double_t GetEtaOfCenterOfModule() const;
85 Double_t GetMaxEtaOfModule(int pri=0) const;
86 static Double_t ThetaToEta(Double_t theta)
87 {return -TMath::Log(TMath::Tan(theta/2.));}
91 AliEMCALEMCGeometry *fGeometry; //!
92 static Double_t fga; // 2*dx1=2*dy1
93 static Double_t fga2; // 2*dx2
94 static Double_t fgb; // 2*dz1
95 static Double_t fgangle; // ~1 degree
96 static Double_t fgtanBetta; // tan(fgangle/2.)
97 static Double_t fgr; // radius to IP
99 TVector2 fOK; // position the module center in ALICE system; x->y; z->x;
100 Double_t fA; // parameters of right line : y = A*z + B
101 Double_t fB; // system where zero point is IP.
102 Double_t fThetaA; // angle coresponding fA - for convinience
103 Double_t fTheta; // theta angle of perpendicular to SK module
104 // position of towers(cells) with differents ieta (1 or 2) in local coordinate of SM
105 // Nov 04,2004; Feb 19,2006
106 TVector2 fOK1; // ieta=1
107 TVector2 fOK2; // ieta=0
108 // May 13, 2006; local position of module (cells) center face
109 TVector2 fOB; // module
110 TVector2 fOB1; // ieta=1
111 TVector2 fOB2; // ieta=0
113 Double_t fThetaOB1; // theta of cell center line (go through OB1)
114 Double_t fThetaOB2; // theta of cell center line (go through OB2)
115 // 3X3 case - Nov 9,2006
117 // Apr 14, 2010 - checking of geometry
118 TVector2 fORB; // position of right/bottom point of module
119 TVector2 fORT; // position of right/top point of module
121 ClassDef(AliEMCALShishKebabTrd1Module, 5) // TRD1 Shish-Kebab module