]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALShishKebabModule.h
Coding conventions (A.Pavlinov)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALShishKebabModule.h
1 #ifndef ALIEMCALSHISHKEBABMODULE_H
2 #define ALIEMCALSHISHKEBABMODULE_H
3
4 /* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               *
6  */
7
8 /* $Id$ */
9
10 //_________________________________________________________________________
11 // Main class for "twist" geometry of Shish-Kebab case.
12 // Author: Aleksei Pavlinov(WSU).
13 // Sep 2004.
14
15 #include <TNamed.h>
16 #include <TVector2.h>
17
18 class AliEMCALGeometry;
19
20 class AliEMCALShishKebabModule : public TNamed {
21  public:
22   AliEMCALShishKebabModule();
23   AliEMCALShishKebabModule(AliEMCALShishKebabModule &leftNeighbor);
24   void Init(Double_t A, Double_t B);
25   AliEMCALShishKebabModule(const AliEMCALShishKebabModule& mod) : TNamed(mod.GetName(),mod.GetTitle()){
26     // cpy ctor: no implementation yet; requested by the Coding Convention
27     Fatal("cpy ctor", "not implemented") ;  
28   }
29   AliEMCALShishKebabModule & operator = (const AliEMCALShishKebabModule& /*rvalue*/)  {
30     Fatal("operator =", "not implemented") ;  
31     return *this ; 
32   }
33
34   virtual ~AliEMCALShishKebabModule(void) {}
35   Bool_t GetParameters();
36   void DefineName(Double_t theta);
37   void DefineFirstModule();
38   void DefineSecondModuleFirstAssumption(); // need for testing
39
40   Double_t Solve(Double_t (*fcn)(Double_t*, Double_t*), Double_t xmin=0., Double_t xmax=1.,
41   Int_t npar=0, Double_t *par=0, Double_t eps=1.0e-8, Int_t maxIter=1000);
42
43   static Double_t Y2(Double_t *x, Double_t *par);
44   static Double_t YALL(Double_t *x, Double_t *par);
45
46   Double_t GetTheta() const {return fTheta;}
47   Double_t GetThetaInDegree() const;
48
49   Double_t GetPosX() const {return fOK.Y();}
50   Double_t GetPosZ() const {return fOK.X();}
51   Double_t GetPosXfromR() const {return fOK.Y() - fgr;}
52   Double_t GetA() const {return fA;}
53   Double_t GetB() const {return fB;}
54   // service methods
55   void PrintShish(Int_t pri=1) const;  // *MENU*
56
57  protected:
58   // geometry info
59   static AliEMCALGeometry *fgGeometry; //!
60   static Double_t fga; // x size of module; default 11.2cm 
61   static Double_t fgb; // y size of module;
62   static Double_t fgr; // radius to IP
63
64   TVector2 fOK; // position the module center x->y; z->x;
65   Double_t fA;  // parameters of line; y = A*z + B
66   Double_t fB;  // parameters of line; y = A*z + B
67   Double_t fTheta; // theta for SK module
68
69   //public:
70   ClassDef(AliEMCALShishKebabModule,1) // Turned Shish-Kebab module 
71 };
72
73 #endif
74 /* To do
75  1. Insert position the center of towers - 2 additional TVector2
76  */