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