3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ////////////////////////////////////////////////
9 // Manager and hits classes for set:PMD //
10 ////////////////////////////////////////////////
12 #include "AliDetector.h"
16 class AliPMD : public AliDetector {
19 Float_t fPar[4]; // pmdin, pmdout, thgas, thcell
20 Float_t fIn[5]; // thmin, thmax, zdist, thlow, thhigh
21 Float_t fGeo[3]; // wafer, edge, numqu
22 Float_t fPadSize[4]; // size of the pads
23 Int_t fNumPads[4]; // number of the pads
26 AliPMD(const char *name, const char *title);
28 virtual void AddHit(Int_t, Int_t*, Float_t*);
29 virtual void BuildGeometry();
30 virtual void CreateGeometry() {}
31 virtual void CreateMaterials() {}
32 Int_t DistancetoPrimitive(Int_t, Int_t);
33 virtual Int_t IsVersion() const =0;
34 virtual void SetPAR(Float_t, Float_t, Float_t, Float_t);
35 virtual void SetIN(Float_t, Float_t, Float_t, Float_t, Float_t);
36 virtual void SetGEO(Float_t, Float_t, Float_t);
37 virtual void SetPadSize(Float_t, Float_t, Float_t, Float_t);
38 virtual void StepManager();
40 ClassDef(AliPMD,1) // Base Class for Photon Multiplicity Detector
45 //___________________________________________
47 class AliPMDhit : public AliHit {
49 Int_t fVolume[5]; //array of volumes
50 Float_t fEnergy; //Total energy deposited in eV
53 AliPMDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
54 AliPMDhit(AliPMDhit* oldhit) {*this=*oldhit;}
55 virtual ~AliPMDhit() {}
56 inline virtual Int_t GetVolume(Int_t i) {return fVolume[i];}
57 inline virtual Float_t GetEnergy() {return fEnergy;}
58 inline int operator == (AliPMDhit &cell) {
60 if(fTrack!=cell.GetTrack()) return 0;
61 for (i=0; i<4; i++) if(fVolume[i]!=cell.GetVolume(i)) return 0;
64 inline virtual AliPMDhit& operator + (AliPMDhit &cell) {
65 fEnergy+=cell.GetEnergy();
68 virtual void Print(Option_t *) {
69 printf("PMD Cell %d %d %d %d\n Primary %d - Energy %f\n",
70 fVolume[0],fVolume[1],fVolume[2],fVolume[3],fTrack,fEnergy);
74 ClassDef(AliPMDhit,1) //Hits object for set:PMD