]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSGeoUtils.h
### files: AliTPCTempMap.h (.cxx)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGeoUtils.h
CommitLineData
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
8// PHOS consists of the electromagnetic calorimeter (EMCA)
9// and a charged particle veto (CPV)
10//
11//*-- Author: Dmitri Peressounko (RRC "KI")
12
13// --- ROOT system ---
14#include "TNamed.h"
15
16// --- AliRoot header files ---
17
18class TVector3;
19class TParticle ;
20
21class AliPHOSGeoUtils : public TNamed {
22
23public:
24
25 AliPHOSGeoUtils() ;
26 AliPHOSGeoUtils(const Text_t* name, const Text_t* title="") ;
27 AliPHOSGeoUtils(const AliPHOSGeoUtils & geom) ;
28
29 virtual ~AliPHOSGeoUtils(void) ;
30 AliPHOSGeoUtils & operator = (const AliPHOSGeoUtils & rvalue) ;
31
32 Bool_t AbsToRelNumbering(Int_t AbsId, Int_t * RelId) const ;
33 // converts the absolute PHOS cell numbering to a relative
34 Bool_t RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) const ;
35 // converts the absolute PHOS numbering to a relative
36
37 void RelPosInModule(const Int_t * relId, Float_t & y, Float_t & z) const ;
38 // gets the position of element (pad or Xtal) relative to
39 // center of PHOS module
40 void RelPosToAbsId(Int_t module, Double_t x, Double_t z, Int_t & AbsId) const;
41 // converts local PHOS-module (x, z) coordinates to absId
42 void RelPosToRelId(Int_t module, Double_t x, Double_t z, Int_t * relId) const;
43 // converts local PHOS-module (x, z) coordinates to relId
44 void RelPosInAlice(Int_t AbsId, TVector3 & pos) const ;
45 // gets the position of element (pad or Xtal) relative to Alice
46
47 void Local2Global(Int_t module, Float_t x, Float_t z, TVector3 &globaPos) const ;
48
49 void Global2Local(TVector3& localPosition,const TVector3& globalPosition,Int_t module) const ;
50
f4aea312 51 Bool_t GlobalPos2RelId(TVector3 & global, Int_t * relId) ;
52 //Tranfers global position into numbers in PHOS cols-raws
53 //Returns FALSE if local x,z beyond PHOS. Distance in perpendicular to PHOS direction is not checked.
54
70a0fabe 55 Bool_t ImpactOnEmc(const TParticle * particle,Int_t & ModuleNumber, Double_t & z, Double_t & x) const ;
56 //Checks if NEUTRAL particle hits PHOS
57 Bool_t ImpactOnEmc(const Double_t * vtx, const TVector3& vec,
58 Int_t & ModuleNumber, Double_t & z, Double_t & x) const ;
59 // calculates the impact coordinates of a neutral particle
60 // emitted in direction theta and phi in ALICE
61 Bool_t ImpactOnEmc(const Double_t * vtx, const Double_t theta, const Double_t phi,
62 Int_t & ModuleNumber, Double_t & z, Double_t & x) const ;
63 // calculates the impact coordinates of a neutral particle
64 // emitted in direction theta and phi in ALICE
65 void GetIncidentVector(const TVector3 &vtx, Int_t module, Float_t x, Float_t z, TVector3& vInc) const ;
66 //calculates vector from vertex to current point in module local frame
67
68 Bool_t IsInEMC(Int_t id) const { if (id > fNModules * fNCristalsInModule ) return kFALSE; return kTRUE; }
69
70
71private:
72
73 void Init(void) ; //Read all sizes etc. for EMC and CPV geometries
74
75private:
76
77 Int_t fNModules ; // Maximal designed number of modules in PHOS
78 Int_t fNCristalsInModule ; //Number of crystals in one module
79 Int_t fNPhi ; //Number of crystals along Phi direction
80 Int_t fNZ ; //Number of crystals along Z direction
81 Int_t fNumberOfCPVPadsPhi; //Number of CPV pads along Phi direction
82 Int_t fNumberOfCPVPadsZ ; //Number of CPV pads along Z direction
83 Int_t fNCellsXInStrip ; //Number of crystals in strip
84 Int_t fNCellsZInStrip ; //Number of crystals in strip in Z direction
85 Int_t fNStripZ ; //Number of strips in Z direction
86
87 Float_t fCrystalShift ; //Distance between center of module and crystal surface
88 Float_t fXtlArrSize[3] ; //Total size of cristals array
89 Float_t fCryCellShift ;
90 Float_t fCellStep ;
91 Float_t fPadSizePhi ; //Size of CPV pad in Phi direction
92 Float_t fPadSizeZ ; //Size of CPV pad in Z direction
93 Float_t fCPVBoxSizeY ;
94
95 ClassDef(AliPHOSGeoUtils,1) // PHOS geometry class
96
97} ;
98
99#endif // AliPHOSGEOUTILS_H