Coding conventions
[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:
15 AliZDCHit() {}
16 AliZDCHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
17 AliZDCHit(AliZDCHit* oldhit) {*this=*oldhit;}
18 virtual ~AliZDCHit() {}
19
20 // Getters
21 virtual Int_t GetVolume(Int_t i) {return fVolume[i];}
359cdddc 22 virtual Float_t GetPrimKinEn() {return fPrimKinEn;}
23 virtual Float_t GetXImpact() {return fXImpact;}
24 virtual Float_t GetYImpact() {return fYImpact;}
25 virtual Float_t GetSFlag() {return fSFlag;}
26 virtual Float_t GetLightPMQ() {return fLightPMQ;}
27 virtual Float_t GetLightPMC() {return fLightPMC;}
28 virtual Float_t GetEnergy() {return fEnergy;}
29
30 // Setters
31 virtual void SetLightPMQ(Float_t value) {fLightPMQ=value;}
32 virtual void SetLightPMC(Float_t value) {fLightPMC=value;}
8e308087 33
34
35 // Data members
36 Int_t fVolume[2]; //Array of volumes
8e308087 37 Float_t fPrimKinEn; //Primary particle energy
38 Float_t fXImpact; //x-coord. of the impact point over the ZDC
39 Float_t fYImpact; //y-coord. of the impact point over the ZDC
40 Float_t fSFlag; //Secondary flag
41 Float_t fLightPMQ; //Cerenkov light produced in each quadrant
42 Float_t fLightPMC; //Cerenkov light seen by the common PM
43 Float_t fEnergy; //Total energy deposited in eV
44
45
46 // Operators
47 Int_t operator == (AliZDCHit &quad) {
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
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 virtual void Print(Option_t *) {
63 printf(" -> HIT: vol[0] = %d vol[1] = %d Track: %d \n"
64 " Primary E = %f, Ximpact = %f, Yimpact = %f, SFlag = %f\n"
65 " PMQLight = %f, PMCLight = %f, Deposited E = %f\n ",
66 fVolume[0],fVolume[1],fTrack,fPrimKinEn,fXImpact,fYImpact,
67 fSFlag,fLightPMQ,fLightPMC,fEnergy);
68 }
69
70 ClassDef(AliZDCHit,1) // Hits for the Zero Degree Calorimeters
71};
72
73#endif