added low and high flux parameter options
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALShishKebabTrd1Module.h
CommitLineData
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
9edefa04 13#include <TNamed.h>
14#include <TMath.h>
15#include <TVector2.h>
1963b290 16
17class AliEMCALGeometry;
18
19class AliEMCALShishKebabTrd1Module : public TNamed {
20 public:
25ab8a31 21 AliEMCALShishKebabTrd1Module(Double_t theta=0.0, AliEMCALGeometry *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);
1963b290 35 void DefineFirstModule();
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;}
1963b290 46 // Additional offline staff
dc7da436 47 // ieta=0 or 1 - Jun 02, 2006
e52475ed 48 TVector2& GetCenterOfCellInLocalCoordinateofSM(Int_t ieta)
dc7da436 49 { if(ieta<=0) return fOK2;
e52475ed 50 else return fOK1;}
1d46d1f6 51 void GetCenterOfCellInLocalCoordinateofSM(Int_t ieta, Double_t &xr, Double_t &zr) const
e52475ed 52 {
dc7da436 53 if(ieta<=0) {xr = fOK2.Y(); zr = fOK2.X();
e52475ed 54 } else {xr = fOK1.Y(); zr = fOK1.X();
55 }
56 }
1d46d1f6 57 void GetCenterOfCellInLocalCoordinateofSM_3X3(Int_t ieta, Double_t &xr, Double_t &zr) const
58 { // 3X3 case - Nov 9,2006
6f377f0c 59 if(ieta < 0) ieta = 0;
60 if(ieta > 2) ieta = 2;
61 // ieta = ieta<0? ieta=0 : ieta; // check index
62 //ieta = ieta>2? ieta=2 : ieta;
1d46d1f6 63 xr = fOK3X3[2-ieta].Y();
64 zr = fOK3X3[2-ieta].X();
65 }
d25f2c54 66 void GetCenterOfCellInLocalCoordinateofSM_1X1(Double_t &xr, Double_t &zr) const
67 { // 1X1 case - Nov 27,2006
68 // Center of cell is center of module
69 xr = fOK.Y() - fgr;
70 zr = fOK.X();
71 }
b44d5aa4 72 // 15-may-06
73 TVector2& GetCenterOfModuleFace() {return fOB;}
74 TVector2& GetCenterOfModuleFace(Int_t ieta) {
dc7da436 75 if(ieta<=0) return fOB2;
b44d5aa4 76 else return fOB1;
77 }
1ae500a2 78 // Jul 30, 2007
79 void GetPositionAtCenterCellLine(Int_t ieta, Double_t dist, TVector2 &v);
1963b290 80 //
25ab8a31 81 Double_t GetTanBetta() const {return fgtanBetta;}
82 Double_t Getb() const {return fgb;}
1963b290 83 // service methods
25ab8a31 84 void PrintShish(Int_t pri=1) const; // *MENU*
1d46d1f6 85 Double_t GetThetaInDegree() const;
25ab8a31 86 Double_t GetEtaOfCenterOfModule() const;
1d46d1f6 87 Double_t GetMaxEtaOfModule(int pri=0) const;
88 static Double_t ThetaToEta(Double_t theta)
89 {return -TMath::Log(TMath::Tan(theta/2.));}
1963b290 90
25ab8a31 91 protected:
1963b290 92 // geometry info
93 static AliEMCALGeometry *fgGeometry; //!
94 static Double_t fga; // 2*dx1=2*dy1
95 static Double_t fga2; // 2*dx2
96 static Double_t fgb; // 2*dz1
97 static Double_t fgangle; // ~1 degree
98 static Double_t fgtanBetta; // tan(fgangle/2.)
25ab8a31 99 static Double_t fgr; // radius to IP
1963b290 100
b44d5aa4 101 TVector2 fOK; // position the module center in ALICE system; x->y; z->x;
1963b290 102 Double_t fA; // parameters of right line : y = A*z + B
103 Double_t fB; // system where zero point is IP.
104 Double_t fThetaA; // angle coresponding fA - for convinience
1d46d1f6 105 Double_t fTheta; // theta angle of perpendicular to SK module
e52475ed 106 // position of towers(cells) with differents ieta (1 or 2) in local coordinate of SM
107 // Nov 04,2004; Feb 19,2006
dc7da436 108 TVector2 fOK1; // ieta=1
109 TVector2 fOK2; // ieta=0
1ae500a2 110 // May 13, 2006; local position of module (cells) center face
111 TVector2 fOB; // module
112 TVector2 fOB1; // ieta=1
113 TVector2 fOB2; // ieta=0
114 // Jul 30, 2007
115 Double_t fThetaOB1; // theta of cell center line (go through OB1)
116 Double_t fThetaOB2; // theta of cell center line (go through OB2)
1d46d1f6 117 // 3X3 case - Nov 9,2006
118 TVector2 fOK3X3[3];
25ab8a31 119 // public:
1ae500a2 120 ClassDef(AliEMCALShishKebabTrd1Module,2) // TRD1 Shish-Kebab module
1963b290 121};
122
123#endif