]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PMD/AliPMD.h
Old pid is in principle obsolete
[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"
14
4fa198c6 15class TClonesArray;
2ab0c725 16class TFile;
4fa198c6 17class AliPMDRecPoint;
fe4da5cc 18
19class AliPMD : public AliDetector {
20
21protected:
22 Float_t fPar[4]; // pmdin, pmdout, thgas, thcell
23 Float_t fIn[5]; // thmin, thmax, zdist, thlow, thhigh
24 Float_t fGeo[3]; // wafer, edge, numqu
25 Float_t fPadSize[4]; // size of the pads
26 Int_t fNumPads[4]; // number of the pads
fe4da5cc 27public:
28 AliPMD();
29 AliPMD(const char *name, const char *title);
4fa198c6 30 virtual ~AliPMD();
fe4da5cc 31 virtual void AddHit(Int_t, Int_t*, Float_t*);
32 virtual void BuildGeometry();
33 virtual void CreateGeometry() {}
34 virtual void CreateMaterials() {}
fe4da5cc 35 Int_t DistancetoPrimitive(Int_t, Int_t);
36 virtual Int_t IsVersion() const =0;
37 virtual void SetPAR(Float_t, Float_t, Float_t, Float_t);
38 virtual void SetIN(Float_t, Float_t, Float_t, Float_t, Float_t);
39 virtual void SetGEO(Float_t, Float_t, Float_t);
40 virtual void SetPadSize(Float_t, Float_t, Float_t, Float_t);
41 virtual void StepManager();
4fa198c6 42 virtual void AddRecPoint(const AliPMDRecPoint &p);
9e1a0ddb 43 virtual void MakeBranch(Option_t* option, const char *file=0);
4fa198c6 44 virtual void SetTreeAddress();
45 virtual void ResetHits();
46
47 private:
48 TClonesArray* fRecPoints; // List of reconstructed hits
49 Int_t fNRecPoints; // Number of reconstructed hits
fe4da5cc 50
51 ClassDef(AliPMD,1) // Base Class for Photon Multiplicity Detector
52};
53
54
fe4da5cc 55
56//___________________________________________
57
58class AliPMDhit : public AliHit {
59public:
6edc06da 60 Int_t fVolume[5]; //array of volumes
fe4da5cc 61 Float_t fEnergy; //Total energy deposited in eV
fe4da5cc 62public:
63 AliPMDhit() {}
64 AliPMDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
65 AliPMDhit(AliPMDhit* oldhit) {*this=*oldhit;}
66 virtual ~AliPMDhit() {}
67 inline virtual Int_t GetVolume(Int_t i) {return fVolume[i];}
68 inline virtual Float_t GetEnergy() {return fEnergy;}
69 inline int operator == (AliPMDhit &cell) {
70 Int_t i;
71 if(fTrack!=cell.GetTrack()) return 0;
72 for (i=0; i<4; i++) if(fVolume[i]!=cell.GetVolume(i)) return 0;
73 return 1;
74 }
75 inline virtual AliPMDhit& operator + (AliPMDhit &cell) {
76 fEnergy+=cell.GetEnergy();
77 return *this;
78 }
79 virtual void Print(Option_t *) {
80 printf("PMD Cell %d %d %d %d\n Primary %d - Energy %f\n",
81 fVolume[0],fVolume[1],fVolume[2],fVolume[3],fTrack,fEnergy);
82 }
83
4fa198c6 84
fe4da5cc 85 ClassDef(AliPMDhit,1) //Hits object for set:PMD
86};
fe4da5cc 87#endif