]>
Commit | Line | Data |
---|---|---|
70a0fabe | 1 | #ifndef ALIPHOSGEOUTILS_H |
2 | #define ALIPHOSGEOUTILS_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | //_________________________________________________________________________ | |
7 | // class for geometry transformations in PHOS | |
bcc9e89e | 8 | // this class contains AiRoot-independent transformations, |
9 | // AliRoot part is in AliPHOSGeometry | |
70a0fabe | 10 | // PHOS consists of the electromagnetic calorimeter (EMCA) |
bcc9e89e | 11 | // charged particle veto (CPV) and support |
70a0fabe | 12 | // |
13 | //*-- Author: Dmitri Peressounko (RRC "KI") | |
14 | ||
15 | // --- ROOT system --- | |
16 | #include "TNamed.h" | |
17 | ||
18 | // --- AliRoot header files --- | |
19 | ||
20 | class TVector3; | |
21 | class TParticle ; | |
bcc9e89e | 22 | class AliPHOSEMCAGeometry; |
23 | class AliPHOSCPVGeometry; | |
24 | class AliPHOSSupportGeometry; | |
70a0fabe | 25 | |
26 | class AliPHOSGeoUtils : public TNamed { | |
27 | ||
28 | public: | |
29 | ||
30 | AliPHOSGeoUtils() ; | |
31 | AliPHOSGeoUtils(const Text_t* name, const Text_t* title="") ; | |
32 | AliPHOSGeoUtils(const AliPHOSGeoUtils & geom) ; | |
33 | ||
34 | virtual ~AliPHOSGeoUtils(void) ; | |
35 | AliPHOSGeoUtils & operator = (const AliPHOSGeoUtils & rvalue) ; | |
36 | ||
37 | Bool_t AbsToRelNumbering(Int_t AbsId, Int_t * RelId) const ; | |
38 | // converts the absolute PHOS cell numbering to a relative | |
39 | Bool_t RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) const ; | |
40 | // converts the absolute PHOS numbering to a relative | |
41 | ||
42 | void RelPosInModule(const Int_t * relId, Float_t & y, Float_t & z) const ; | |
43 | // gets the position of element (pad or Xtal) relative to | |
44 | // center of PHOS module | |
45 | void RelPosToAbsId(Int_t module, Double_t x, Double_t z, Int_t & AbsId) const; | |
46 | // converts local PHOS-module (x, z) coordinates to absId | |
47 | void RelPosToRelId(Int_t module, Double_t x, Double_t z, Int_t * relId) const; | |
48 | // converts local PHOS-module (x, z) coordinates to relId | |
49 | void RelPosInAlice(Int_t AbsId, TVector3 & pos) const ; | |
50 | // gets the position of element (pad or Xtal) relative to Alice | |
51 | ||
52 | void Local2Global(Int_t module, Float_t x, Float_t z, TVector3 &globaPos) const ; | |
53 | ||
54 | void Global2Local(TVector3& localPosition,const TVector3& globalPosition,Int_t module) const ; | |
55 | ||
f4aea312 | 56 | Bool_t GlobalPos2RelId(TVector3 & global, Int_t * relId) ; |
57 | //Tranfers global position into numbers in PHOS cols-raws | |
58 | //Returns FALSE if local x,z beyond PHOS. Distance in perpendicular to PHOS direction is not checked. | |
59 | ||
70a0fabe | 60 | Bool_t ImpactOnEmc(const TParticle * particle,Int_t & ModuleNumber, Double_t & z, Double_t & x) const ; |
61 | //Checks if NEUTRAL particle hits PHOS | |
62 | Bool_t ImpactOnEmc(const Double_t * vtx, const TVector3& vec, | |
63 | Int_t & ModuleNumber, Double_t & z, Double_t & x) const ; | |
64 | // calculates the impact coordinates of a neutral particle | |
65 | // emitted in direction theta and phi in ALICE | |
66 | Bool_t ImpactOnEmc(const Double_t * vtx, const Double_t theta, const Double_t phi, | |
67 | Int_t & ModuleNumber, Double_t & z, Double_t & x) const ; | |
68 | // calculates the impact coordinates of a neutral particle | |
69 | // emitted in direction theta and phi in ALICE | |
70 | void GetIncidentVector(const TVector3 &vtx, Int_t module, Float_t x, Float_t z, TVector3& vInc) const ; | |
71 | //calculates vector from vertex to current point in module local frame | |
72 | ||
73 | Bool_t IsInEMC(Int_t id) const { if (id > fNModules * fNCristalsInModule ) return kFALSE; return kTRUE; } | |
74 | ||
75 | ||
bcc9e89e | 76 | protected: |
70a0fabe | 77 | |
bcc9e89e | 78 | AliPHOSEMCAGeometry *fGeometryEMCA ; // Geometry object for Electromagnetic calorimeter |
79 | AliPHOSCPVGeometry *fGeometryCPV ; // Geometry object for CPV (IHEP) | |
80 | AliPHOSSupportGeometry *fGeometrySUPP ; // Geometry object for PHOS support | |
81 | ||
70a0fabe | 82 | |
bcc9e89e | 83 | Int_t fNModules ; //Maximal designed number of modules in PHOS |
70a0fabe | 84 | Int_t fNCristalsInModule ; //Number of crystals in one module |
85 | Int_t fNPhi ; //Number of crystals along Phi direction | |
86 | Int_t fNZ ; //Number of crystals along Z direction | |
87 | Int_t fNumberOfCPVPadsPhi; //Number of CPV pads along Phi direction | |
88 | Int_t fNumberOfCPVPadsZ ; //Number of CPV pads along Z direction | |
89 | Int_t fNCellsXInStrip ; //Number of crystals in strip | |
90 | Int_t fNCellsZInStrip ; //Number of crystals in strip in Z direction | |
91 | Int_t fNStripZ ; //Number of strips in Z direction | |
92 | ||
93 | Float_t fCrystalShift ; //Distance between center of module and crystal surface | |
94 | Float_t fXtlArrSize[3] ; //Total size of cristals array | |
95 | Float_t fCryCellShift ; | |
96 | Float_t fCellStep ; | |
97 | Float_t fPadSizePhi ; //Size of CPV pad in Phi direction | |
98 | Float_t fPadSizeZ ; //Size of CPV pad in Z direction | |
99 | Float_t fCPVBoxSizeY ; | |
100 | ||
bcc9e89e | 101 | ClassDef(AliPHOSGeoUtils,2) // PHOS geometry class |
70a0fabe | 102 | |
103 | } ; | |
104 | ||
105 | #endif // AliPHOSGEOUTILS_H |