CommitLineData
1963b290 1#ifndef ALIEMCALSHISHKEBABMODULE_H
2#define ALIEMCALSHISHKEBABMODULE_H
3
25ab8a31 5 * See cxx source for full Copyright notice *
6 */
1963b290 7
8/* \$Id\$ */
25ab8a31 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>
1963b290 17
18class AliEMCALGeometry;
19
20class AliEMCALShishKebabModule : public TNamed {
21 public:
25ab8a31 22 AliEMCALShishKebabModule();
1963b290 23 AliEMCALShishKebabModule(AliEMCALShishKebabModule &leftNeighbor);
25ab8a31 24 void Init(Double_t A, Double_t B);
0a4cb131 25 AliEMCALShishKebabModule(const AliEMCALShishKebabModule& mod);
26
25ab8a31 27 AliEMCALShishKebabModule & operator = (const AliEMCALShishKebabModule& /*rvalue*/) {
28 Fatal("operator =", "not implemented") ;
29 return *this ;
30 }
1963b290 31
32 virtual ~AliEMCALShishKebabModule(void) {}
33 Bool_t GetParameters();
25ab8a31 34 void DefineName(Double_t theta);
1963b290 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
25ab8a31 41 static Double_t Y2(Double_t *x, Double_t *par);
42 static Double_t YALL(Double_t *x, Double_t *par);
1963b290 43
44 Double_t GetTheta() const {return fTheta;}
25ab8a31 45 Double_t GetThetaInDegree() const;
1963b290 46
25ab8a31 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*
1963b290 54
25ab8a31 55 protected:
1963b290 56 // geometry info
57 static AliEMCALGeometry *fgGeometry; //!
25ab8a31 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
1963b290 61
62 TVector2 fOK; // position the module center x->y; z->x;
25ab8a31 63 Double_t fA; // parameters of line; y = A*z + B
64 Double_t fB; // parameters of line; y = A*z + B
1963b290 65 Double_t fTheta; // theta for SK module
66
25ab8a31 67 //public:
68 ClassDef(AliEMCALShishKebabModule,1) // Turned Shish-Kebab module
1963b290 69};
70
71#endif
72/* To do
73 1. Insert position the center of towers - 2 additional TVector2
74 */