This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / PHOS / AliPHOSv2.h
CommitLineData
fe4da5cc 1//-*-C++-*-
2#ifndef ALIPHOS_H
3#define ALIPHOS_H
4////////////////////////////////////////////////
5// Manager and hits classes for PHOS //
6// Version 2 //
7// Author M. Volkov, RRC KI //
8////////////////////////////////////////////////
9
10// --- ROOT system ---
11#include <TArray.h>
12#include <TRandom.h>
13
14// --- galice header files ---
15#include "AliDetector.h"
16#include "AliHit.h"
17
18class AliPHOSv2 : public AliDetector{
19
20protected:
21 Float_t fXtlSize[3]; // PWO crystal dimensions
22 Float_t fWrapThickness; // Thickness of Tyvek wrapper
23 Float_t fPINSize[3]; // PIN diode dimensions
24 Float_t fCPVThickness; // CPV thickness
25 Float_t fPHOSFoam[3]; // Outer foam cover dimensions
26 Float_t fPHOStxwall[3]; // Textolit box dimensions
27 Float_t fPHOSAir[3]; // Inner air filled volume dimensions
28 Float_t fRadius[2]; // Distances from IP to outer cover and to Xtal surface
29 Float_t fPHOSextra[10]; // Assorted geometrical parameters
30 Float_t fNphi; // Number of crystal units in X (phi) direction
31 Float_t fNz; // Number of crystal units in Z direction
32 Float_t fNModules; // Number of modules constituing PHOS
33 Float_t fPHOSAngle[4]; // Position angles of modules
34
35public:
36 AliPHOSv2(void);
37 AliPHOSv2(const char *name, const char *title="");
38 virtual ~AliPHOSv2(void);
39
40 virtual Int_t IsVersion(void) const {return 2;}
41
42 virtual void DefPars(void);
43
44 virtual void BuildGeometry(void);
45 virtual void CreateGeometry(void);
46 virtual void CreateMaterials(void);
47
48 virtual void Init(void);
49
50 virtual void StepManager(void);
51
52 virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits);
53
54 virtual Float_t GetCrystalSize(Int_t n) const {return fXtlSize[n];}
55 virtual Float_t GetWrapThickness(void) const {return fWrapThickness;}
56 virtual Float_t GetPINSize(Int_t n) const {return fPINSize[n];}
57 virtual Float_t GetCPVThickness(void) const {return fCPVThickness;}
58 virtual Float_t GetPHOSFoam(Int_t n) const {return fPHOSFoam[n];}
59 virtual Float_t GetPHOStxwall(Int_t n) const {return fPHOStxwall[n];}
60 virtual Float_t GetPHOSAir(Int_t n) const {return fPHOSAir[n];}
61 virtual Float_t GetRadius(Int_t n) const {return fRadius[n];}
62 virtual Float_t GetPHOSextra(Int_t n) const {return fPHOSextra[n];}
63 virtual Float_t GetNphi(void) const {return fNphi;}
64 virtual Float_t GetNz(void) const {return fNz;}
65 virtual Float_t GetNModules(void) const {return fNModules;}
66 virtual Float_t &GetModuleAngle(Int_t n) {return fPHOSAngle[n];}
67
68ClassDef(AliPHOSv2,1) // Hits manager for PHOS, version 2
69
70};
71
72//////////////////////////////////////////////////////////////////////////////
73
74class AliPHOShitv2 : public AliHit{
75
76protected:
77 Int_t fVolume[4]; //array of volumes. This is not GEANT NUMBV(), it is (BOX,LAYER,ROW,COLUMN) array.
78 Float_t fELOS; //Energy deposited
79
80public:
81 AliPHOShitv2(void) {;}
82 AliPHOShitv2(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
83 AliPHOShitv2(AliPHOShitv2 const &rValue){*this=rValue;}
84 virtual ~AliPHOShitv2(void) {;}
85
86 Int_t GetVolume(Int_t i) const {return fVolume[i];}
87 Float_t GetEnergy(void) const {return fELOS;}
88
89 Bool_t operator==(AliPHOShitv2 const &rValue) const;
90 AliPHOShitv2 const operator+(AliPHOShitv2 const &rValue) const;
91
92ClassDef(AliPHOShitv2,1) // Hits object for PHOS
93
94};
95
96//////////////////////////////////////////////////////////////////////////////
97
98#endif //#ifndef ALIPHOS_H