Class for ZDC hits
[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];}
22 virtual Float_t GetLightPMQ() {return fLightPMQ;}
23 virtual Float_t GetLightPMC() {return fLightPMC;}
24 virtual Float_t GetEnergy() {return fEnergy;}
25
26
27 // Data members
28 Int_t fVolume[2]; //Array of volumes
29 Float_t fX; //X-coord. in the hall RS
30 Float_t fY; //Y-coord. in the hall RS
31 Float_t fZ; //Z-coord. in the hall RS
32 Float_t fPrimKinEn; //Primary particle energy
33 Float_t fXImpact; //x-coord. of the impact point over the ZDC
34 Float_t fYImpact; //y-coord. of the impact point over the ZDC
35 Float_t fSFlag; //Secondary flag
36 Float_t fLightPMQ; //Cerenkov light produced in each quadrant
37 Float_t fLightPMC; //Cerenkov light seen by the common PM
38 Float_t fEnergy; //Total energy deposited in eV
39
40
41 // Operators
42 Int_t operator == (AliZDCHit &quad) {
43 Int_t i;
44// Superfluo finche' c'e' shunt = 1 !?!?
45// if(fTrack!=quad.GetTrack()) return 0;
46 for(i=0; i<2; i++) if(fVolume[i]!=quad.GetVolume(i)) return 0;
47 return 1;
48 }
49
50 virtual AliZDCHit& operator + (AliZDCHit &quad) {
51 fLightPMQ+=quad.GetLightPMQ();
52 fLightPMC+=quad.GetLightPMC();
53 fEnergy+=quad.GetEnergy();
54 return *this;
55 }
56
57 // Print method
58 virtual void Print(Option_t *) {
59 printf(" -> HIT: vol[0] = %d vol[1] = %d Track: %d \n"
60 " Primary E = %f, Ximpact = %f, Yimpact = %f, SFlag = %f\n"
61 " PMQLight = %f, PMCLight = %f, Deposited E = %f\n ",
62 fVolume[0],fVolume[1],fTrack,fPrimKinEn,fXImpact,fYImpact,
63 fSFlag,fLightPMQ,fLightPMC,fEnergy);
64 }
65
66 ClassDef(AliZDCHit,1) // Hits for the Zero Degree Calorimeters
67};
68
69#endif