new non linearity function and parameters for latest simulations with better agreemen...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALShishKebabTrd1Module.h
CommitLineData
1963b290 1#ifndef ALIEMCALSHISHKEBABTRD1MODULE_H
2#define ALIEMCALSHISHKEBABTRD1MODULE_H
3
3d841a9f 4/* Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
1963b290 5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
25ab8a31 8//_________________________________________________________________________
9// Main class for TRD1 geometry of Shish-Kebab case.
3d841a9f 10// Author: Alexei Pavlinov(WSU).
11// Nov 2004; Feb 2006; Apr 2010; Oct 23, 2010
1963b290 12
9edefa04 13#include <TNamed.h>
14#include <TMath.h>
15#include <TVector2.h>
1963b290 16
0c5b726e 17class AliEMCALEMCGeometry;
1963b290 18
19class AliEMCALShishKebabTrd1Module : public TNamed {
20 public:
0c5b726e 21 AliEMCALShishKebabTrd1Module(Double_t theta=0.0, AliEMCALEMCGeometry *g=0);
1963b290 22 AliEMCALShishKebabTrd1Module(AliEMCALShishKebabTrd1Module &leftNeighbor);
25ab8a31 23 void Init(Double_t A, Double_t B);
1d46d1f6 24 void DefineAllStaff();
0a4cb131 25 AliEMCALShishKebabTrd1Module(const AliEMCALShishKebabTrd1Module& mod);
26
25ab8a31 27 AliEMCALShishKebabTrd1Module & operator = (const AliEMCALShishKebabTrd1Module& /*rvalue*/) {
28 Fatal("operator =", "not implemented") ;
29 return *this ;
30 }
1963b290 31
32 virtual ~AliEMCALShishKebabTrd1Module(void) {}
33 Bool_t GetParameters();
25ab8a31 34 void DefineName(Double_t theta);
3d841a9f 35 void DefineFirstModule(const Int_t key=0); // key=0-zero tilt of first module
1963b290 36
25ab8a31 37 Double_t GetTheta() const {return fTheta;}
1963b290 38 TVector2& GetCenterOfModule() {return fOK;}
1963b290 39
25ab8a31 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;}
1d46d1f6 45 Double_t GetRadius() const {return fgr;}
d1ccaddd 46 TVector2 GetORB() const {return fORB;}
47 TVector2 GetORT() const {return fORT;}
1963b290 48 // Additional offline staff
dc7da436 49 // ieta=0 or 1 - Jun 02, 2006
e52475ed 50 TVector2& GetCenterOfCellInLocalCoordinateofSM(Int_t ieta)
14c2372a 51 {
52 if(ieta<=0) return fOK2;
53 else return fOK1;
54 }
55 void GetCenterOfCellInLocalCoordinateofSM(Int_t ieta, Double_t &xr, Double_t &zr, Int_t pri=0) const
e52475ed 56 {
dc7da436 57 if(ieta<=0) {xr = fOK2.Y(); zr = fOK2.X();
e52475ed 58 } else {xr = fOK1.Y(); zr = fOK1.X();
59 }
14c2372a 60 if(pri>0) printf(" %s ieta %2.2i xr %8.4f zr %8.4f \n", GetName(), ieta, xr, zr);
e52475ed 61 }
0c5b726e 62 void GetCenterOfCellInLocalCoordinateofSM3X3(Int_t ieta, Double_t &xr, Double_t &zr) const
1d46d1f6 63 { // 3X3 case - Nov 9,2006
0c5b726e 64 if(ieta < 0) ieta = 0; //ieta = ieta<0? ieta=0 : ieta; // check index
65 if(ieta > 2) ieta = 2; //ieta = ieta>2? ieta=2 : ieta;
66 xr = fOK3X3[2-ieta].Y(); zr = fOK3X3[2-ieta].X();
1d46d1f6 67 }
0c5b726e 68 void GetCenterOfCellInLocalCoordinateofSM1X1(Double_t &xr, Double_t &zr) const
69 { // 1X1 case - Nov 27,2006 // Center of cell is center of module
d25f2c54 70 xr = fOK.Y() - fgr;
71 zr = fOK.X();
72 }
b44d5aa4 73 // 15-may-06
74 TVector2& GetCenterOfModuleFace() {return fOB;}
75 TVector2& GetCenterOfModuleFace(Int_t ieta) {
dc7da436 76 if(ieta<=0) return fOB2;
b44d5aa4 77 else return fOB1;
78 }
1ae500a2 79 // Jul 30, 2007
80 void GetPositionAtCenterCellLine(Int_t ieta, Double_t dist, TVector2 &v);
1963b290 81 //
25ab8a31 82 Double_t GetTanBetta() const {return fgtanBetta;}
83 Double_t Getb() const {return fgb;}
1963b290 84 // service methods
25ab8a31 85 void PrintShish(Int_t pri=1) const; // *MENU*
1d46d1f6 86 Double_t GetThetaInDegree() const;
25ab8a31 87 Double_t GetEtaOfCenterOfModule() const;
1d46d1f6 88 Double_t GetMaxEtaOfModule(int pri=0) const;
89 static Double_t ThetaToEta(Double_t theta)
90 {return -TMath::Log(TMath::Tan(theta/2.));}
1963b290 91
25ab8a31 92 protected:
1963b290 93 // geometry info
7cfcebd3 94 AliEMCALEMCGeometry *fGeometry; //!
1963b290 95 static Double_t fga; // 2*dx1=2*dy1
96 static Double_t fga2; // 2*dx2
97 static Double_t fgb; // 2*dz1
3d841a9f 98 static Double_t fgangle; // in rad (1.5 degree)
1963b290 99 static Double_t fgtanBetta; // tan(fgangle/2.)
25ab8a31 100 static Double_t fgr; // radius to IP
1963b290 101
b44d5aa4 102 TVector2 fOK; // position the module center in ALICE system; x->y; z->x;
1963b290 103 Double_t fA; // parameters of right line : y = A*z + B
104 Double_t fB; // system where zero point is IP.
105 Double_t fThetaA; // angle coresponding fA - for convinience
1d46d1f6 106 Double_t fTheta; // theta angle of perpendicular to SK module
e52475ed 107 // position of towers(cells) with differents ieta (1 or 2) in local coordinate of SM
108 // Nov 04,2004; Feb 19,2006
dc7da436 109 TVector2 fOK1; // ieta=1
110 TVector2 fOK2; // ieta=0
1ae500a2 111 // May 13, 2006; local position of module (cells) center face
112 TVector2 fOB; // module
113 TVector2 fOB1; // ieta=1
114 TVector2 fOB2; // ieta=0
115 // Jul 30, 2007
116 Double_t fThetaOB1; // theta of cell center line (go through OB1)
117 Double_t fThetaOB2; // theta of cell center line (go through OB2)
1d46d1f6 118 // 3X3 case - Nov 9,2006
119 TVector2 fOK3X3[3];
d1ccaddd 120 // Apr 14, 2010 - checking of geometry
121 TVector2 fORB; // position of right/bottom point of module
122 TVector2 fORT; // position of right/top point of module
25ab8a31 123 // public:
7cfcebd3 124 ClassDef(AliEMCALShishKebabTrd1Module, 5) // TRD1 Shish-Kebab module
1963b290 125};
126
127#endif