Reverting...I was too fast
[u/mrichter/AliRoot.git] / ZDC / AliZDCHit.h
... / ...
CommitLineData
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:
15 AliZDCHit();
16 AliZDCHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
17 AliZDCHit(const AliZDCHit &oldhit);
18 AliZDCHit& operator= (const AliZDCHit &hit);
19 virtual ~AliZDCHit() {}
20
21 // Getters
22 virtual Int_t GetVolume(Int_t i) const {return fVolume[i];}
23 virtual Int_t GetPDGCode() const {return fPDGCode;}
24 virtual Int_t GetMotherPDGCode() const {return fMotherPDGCode;}
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;}
32 virtual Float_t GetTrackTOF() const {return fTrackTOF;}
33
34 // Setters
35 virtual void SetVolume(Int_t i, Int_t val) {fVolume[i]=val;}
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;}
45
46 // Operators
47 Int_t operator == (AliZDCHit &quad){
48 Int_t i;
49 if(fTrack!=quad.GetTrack()) return 0;
50 for(i=0; i<2; i++) if(fVolume[i]!=quad.GetVolume(i)) return 0;
51 return 1;
52 }
53
54 virtual AliZDCHit operator + (AliZDCHit &quad){
55 fLightPMQ += quad.GetLightPMQ();
56 fLightPMC += quad.GetLightPMC();
57 fEnergy += quad.GetEnergy();
58 return *this;
59 }
60
61 // Print method
62 void Print(Option_t *) const;
63
64protected:
65 // Data members
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
77
78 ClassDef(AliZDCHit,4) // Hits for the Zero Degree Calorimeters
79};
80
81#endif