Bugfixes and additional protection (Cvetan and Marian)
[u/mrichter/AliRoot.git] / PMD / AliPMDhit.h
CommitLineData
895a906e 1#ifndef ALIPMDHIT_H
2#define ALIPMDHIT_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6////////////////////////////////////////////////
7// hits classes for set:PMD //
8////////////////////////////////////////////////
9
10#include "AliHit.h"
11#include "Riostream.h"
12
13class TClonesArray;
14
15class AliPMDhit : public AliHit {
16
17 public:
18 AliPMDhit() {}
19 AliPMDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
20 AliPMDhit(AliPMDhit* oldhit) {*this=*oldhit;}
21 virtual ~AliPMDhit() {}
22 virtual Int_t GetVolume(Int_t i) const {return fVolume[i];}
23 virtual Float_t GetEnergy() const {return fEnergy;}
24 int operator == (AliPMDhit &cell) const;
25 virtual AliPMDhit& operator + (AliPMDhit &cell) {
26 fEnergy+=cell.GetEnergy();
27 return *this;
28 }
9aa74aae 29 virtual void Print(Option_t *) const {
895a906e 30 printf("PMD Cell %d %d %d %d\n Primary %d - Energy %f\n",
31 fVolume[0],fVolume[1],fVolume[2],fVolume[3],fTrack,fEnergy);
32 }
33
34 protected:
35 Int_t fVolume[8]; //array of volumes
36 Float_t fEnergy; //Total energy deposited in eV
37
38 ClassDef(AliPMDhit,2) //Hits object for set:PMD
39};
40#endif