Worng indexes fixed
[u/mrichter/AliRoot.git] / ZDC / AliZDCHit.h
CommitLineData
8e308087 1#ifndef ALIZDCHIT_H
2#define ALIZDCHIT_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 ZDC //
8////////////////////////////////////////////////
9
10#include "AliHit.h"
11
12class AliZDCHit : public AliHit {
13
14public:
cc2abffd 15 AliZDCHit();
8e308087 16 AliZDCHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
cc2abffd 17 //AliZDCHit(const AliZDCHit* oldhit) {*this=*oldhit;}
18 AliZDCHit(const AliZDCHit &oldhit);
8e308087 19 virtual ~AliZDCHit() {}
20
21 // Getters
3ff116f2 22 virtual Int_t GetVolume(Int_t i) const {return fVolume[i];}
47709f57 23 virtual Int_t GetPDGCode() const {return fPDGCode;}
ae3870e6 24 virtual Int_t GetMotherPDGCode() const {return fMotherPDGCode;}
3ff116f2 25 virtual Float_t GetPrimKinEn() const {return fPrimKinEn;}
26 virtual Float_t GetXImpact() const {return fXImpact;}
27 virtual Float_t GetYImpact() const {return fYImpact;}
28 virtual Float_t GetSFlag() const {return fSFlag;}
29 virtual Float_t GetLightPMQ() const {return fLightPMQ;}
30 virtual Float_t GetLightPMC() const {return fLightPMC;}
31 virtual Float_t GetEnergy() const {return fEnergy;}
f7f9e40c 32 virtual Float_t GetTrackTOF() const {return fTrackTOF;}
359cdddc 33
34 // Setters
242f9123 35 virtual void SetVolume(Int_t i, Int_t val) {fVolume[i]=val;}
ae3870e6 36 virtual void SetPDGCode(Int_t code) {fPDGCode=code;}
37 virtual void SetMotherPDGCode(Int_t code) {fPDGCode=code;}
38 virtual void SetLightPMQ(Float_t value) {fLightPMQ=value;}
39 virtual void SetLightPMC(Float_t value) {fLightPMC=value;}
40 virtual void SetSFlag(Float_t value) {fSFlag=value;}
41 virtual void SetPrimKinEn(Float_t value) {fPrimKinEn=value;}
42 virtual void SetXImpact(Float_t value) {fXImpact=value;}
43 virtual void SetYImpact(Float_t value) {fYImpact=value;}
44 virtual void SetTrackTOF(Float_t value) {fTrackTOF=value;}
8e308087 45
46 // Operators
cc2abffd 47 Int_t operator == (AliZDCHit &quad){
8e308087 48 Int_t i;
5a881c97 49 if(fTrack!=quad.GetTrack()) return 0;
8e308087 50 for(i=0; i<2; i++) if(fVolume[i]!=quad.GetVolume(i)) return 0;
51 return 1;
52 }
53
cc2abffd 54 virtual AliZDCHit operator + (AliZDCHit &quad){
55 fLightPMQ += quad.GetLightPMQ();
56 fLightPMC += quad.GetLightPMC();
57 fEnergy += quad.GetEnergy();
8e308087 58 return *this;
59 }
60
61 // Print method
8a2624cc 62 void Print(Option_t *) const;
8e308087 63
3ff116f2 64protected:
65 // Data members
ae3870e6 66 Int_t fVolume[2]; //Array of volumes
67 Float_t fPrimKinEn; //Primary particle energy
68 Float_t fXImpact; //x-coord. of the impact point over the ZDC
69 Float_t fYImpact; //y-coord. of the impact point over the ZDC
70 Float_t fSFlag; //Secondary flag
71 Float_t fLightPMQ; //Cerenkov light produced in each quadrant
72 Float_t fLightPMC; //Cerenkov light seen by the common PM
73 Float_t fEnergy; //Total energy deposited in eV
74 Int_t fPDGCode; //PDG code of particle in the ZDC
75 Int_t fMotherPDGCode; //PDG code of particle in the ZDC
76 Float_t fTrackTOF; //Track time in ns
3ff116f2 77
ae3870e6 78 ClassDef(AliZDCHit,4) // Hits for the Zero Degree Calorimeters
8e308087 79};
80
81#endif