PHOS test suite including merging
[u/mrichter/AliRoot.git] / PMD / AliPMD.h
CommitLineData
fe4da5cc 1#ifndef PMD_H
2#define PMD_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
fe4da5cc 8////////////////////////////////////////////////
9// Manager and hits classes for set:PMD //
10////////////////////////////////////////////////
11
12#include "AliDetector.h"
13#include "AliHit.h"
1661e612 14#include "AliPMDLoader.h"
fe4da5cc 15
4fa198c6 16class TClonesArray;
2ab0c725 17class TFile;
4fa198c6 18class AliPMDRecPoint;
fe4da5cc 19
20class AliPMD : public AliDetector {
21
22protected:
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
fe4da5cc 28public:
29 AliPMD();
30 AliPMD(const char *name, const char *title);
1661e612 31
32 virtual AliLoader* MakeLoader(const char* topfoldername);
33
4fa198c6 34 virtual ~AliPMD();
fe4da5cc 35 virtual void AddHit(Int_t, Int_t*, Float_t*);
1661e612 36 virtual void BuildGeometry();
fe4da5cc 37 virtual void CreateGeometry() {}
38 virtual void CreateMaterials() {}
fe4da5cc 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();
4fa198c6 46 virtual void AddRecPoint(const AliPMDRecPoint &p);
88cb7938 47 virtual void MakeBranch(Option_t* option);
4fa198c6 48 virtual void SetTreeAddress();
49 virtual void ResetHits();
50
85a5290f 51 virtual void Hits2SDigits();
52
4fa198c6 53 private:
88cb7938 54 TClonesArray* fRecPoints; //! List of reconstructed hits
4fa198c6 55 Int_t fNRecPoints; // Number of reconstructed hits
fe4da5cc 56
88cb7938 57 ClassDef(AliPMD,2) // Base Class for Photon Multiplicity Detector
fe4da5cc 58};
59
60
fe4da5cc 61
62//___________________________________________
63
64class AliPMDhit : public AliHit {
65public:
51def2bf 66 Int_t fVolume[8]; //array of volumes
fe4da5cc 67 Float_t fEnergy; //Total energy deposited in eV
fe4da5cc 68public:
69 AliPMDhit() {}
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) {
76 Int_t i;
77 if(fTrack!=cell.GetTrack()) return 0;
41c97e7a 78 for (i=0; i<8; i++) if(fVolume[i]!=cell.GetVolume(i)) return 0;
fe4da5cc 79 return 1;
80 }
81 inline virtual AliPMDhit& operator + (AliPMDhit &cell) {
82 fEnergy+=cell.GetEnergy();
83 return *this;
84 }
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);
88 }
89
4fa198c6 90
fe4da5cc 91 ClassDef(AliPMDhit,1) //Hits object for set:PMD
92};
fe4da5cc 93#endif