]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALShishKebabModule.h
Fixes to calls for MeanMaterialBudget (now in AliTracker) (From Jouri Belikov)
[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);
26
27   AliEMCALShishKebabModule & operator = (const AliEMCALShishKebabModule& /*rvalue*/)  {
28     Fatal("operator =", "not implemented") ;  
29     return *this ; 
30   }
31
32   virtual ~AliEMCALShishKebabModule(void) {}
33   Bool_t GetParameters();
34   void DefineName(Double_t theta);
35   void DefineFirstModule();
36   void DefineSecondModuleFirstAssumption(); // need for testing
37
38   Double_t Solve(Double_t (*fcn)(Double_t*, Double_t*), Double_t xmin=0., Double_t xmax=1.,
39   Int_t npar=0, Double_t *par=0, Double_t eps=1.0e-8, Int_t maxIter=1000);
40
41   static Double_t Y2(Double_t *x, Double_t *par);
42   static Double_t YALL(Double_t *x, Double_t *par);
43
44   Double_t GetTheta() const {return fTheta;}
45   Double_t GetThetaInDegree() const;
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   // service methods
53   void PrintShish(Int_t pri=1) const;  // *MENU*
54
55  protected:
56   // geometry info
57   static AliEMCALGeometry *fgGeometry; //!
58   static Double_t fga; // x size of module; default 11.2cm 
59   static Double_t fgb; // y size of module;
60   static Double_t fgr; // radius to IP
61
62   TVector2 fOK; // position the module center x->y; z->x;
63   Double_t fA;  // parameters of line; y = A*z + B
64   Double_t fB;  // parameters of line; y = A*z + B
65   Double_t fTheta; // theta for SK module
66
67   //public:
68   ClassDef(AliEMCALShishKebabModule,1) // Turned Shish-Kebab module 
69 };
70
71 #endif
72 /* To do
73  1. Insert position the center of towers - 2 additional TVector2
74  */