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"
14 #include "AliPMDLoader.h"
20 class AliPMD : public AliDetector {
23 Float_t fPar[4]; // pmdin, pmdout, thgas, thcell
24 Float_t fIn[5]; // thmin, thmax, zdist, thlow, thhigh
25 Float_t fGeo[3]; // wafer, edge, numqu
26 Float_t fPadSize[4]; // size of the pads
27 Int_t fNumPads[4]; // number of the pads
30 AliPMD(const char *name, const char *title);
32 virtual AliLoader* MakeLoader(const char* topfoldername);
35 virtual void AddHit(Int_t, Int_t*, Float_t*);
36 virtual void BuildGeometry();
37 virtual void CreateGeometry() {}
38 virtual void CreateMaterials() {}
39 Int_t DistancetoPrimitive(Int_t, Int_t);
40 virtual Int_t IsVersion() const =0;
41 virtual void SetPAR(Float_t, Float_t, Float_t, Float_t);
42 virtual void SetIN(Float_t, Float_t, Float_t, Float_t, Float_t);
43 virtual void SetGEO(Float_t, Float_t, Float_t);
44 virtual void SetPadSize(Float_t, Float_t, Float_t, Float_t);
45 virtual void StepManager();
46 virtual void AddRecPoint(const AliPMDRecPoint &p);
47 virtual void MakeBranch(Option_t* option);
48 virtual void SetTreeAddress();
49 virtual void ResetHits();
51 virtual void Hits2SDigits();
54 TClonesArray* fRecPoints; //! List of reconstructed hits
55 Int_t fNRecPoints; // Number of reconstructed hits
57 ClassDef(AliPMD,2) // Base Class for Photon Multiplicity Detector
62 //___________________________________________
64 class AliPMDhit : public AliHit {
66 Int_t fVolume[8]; //array of volumes
67 Float_t fEnergy; //Total energy deposited in eV
70 AliPMDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
71 AliPMDhit(AliPMDhit* oldhit) {*this=*oldhit;}
72 virtual ~AliPMDhit() {}
73 inline virtual Int_t GetVolume(Int_t i) {return fVolume[i];}
74 inline virtual Float_t GetEnergy() {return fEnergy;}
75 inline int operator == (AliPMDhit &cell) {
77 if(fTrack!=cell.GetTrack()) return 0;
78 for (i=0; i<8; i++) if(fVolume[i]!=cell.GetVolume(i)) return 0;
81 inline virtual AliPMDhit& operator + (AliPMDhit &cell) {
82 fEnergy+=cell.GetEnergy();
85 virtual void Print(Option_t *) {
86 printf("PMD Cell %d %d %d %d\n Primary %d - Energy %f\n",
87 fVolume[0],fVolume[1],fVolume[2],fVolume[3],fTrack,fEnergy);
91 ClassDef(AliPMDhit,1) //Hits object for set:PMD