Add const to SolenoidField() method for correct overwriting from the parent class
[u/mrichter/AliRoot.git] / ZDC / AliZDCMergedHit.h
CommitLineData
1acbaaa8 1#ifndef ALIZDCMERGEDHIT_H
2#define ALIZDCMERGEDHIT_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 "TObject.h"
11
12class AliZDCMergedHit : public TObject {
13
14public:
15 AliZDCMergedHit() {}
16 AliZDCMergedHit(Int_t *sector, Float_t *mhits);
17 AliZDCMergedHit(AliZDCMergedHit* oldhit) {*this=*oldhit;}
18 virtual ~AliZDCMergedHit() {}
19
20 // Getters
21 virtual Int_t GetSector(Int_t i) {return fSector[i];}
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
31 // Data members
32 Int_t fSector[2]; //Array of volumes
33 Float_t fPrimKinEn; //Primary particle energy
34 Float_t fXImpact; //x-coord. of the impact point over the ZDC
35 Float_t fYImpact; //y-coord. of the impact point over the ZDC
36 Float_t fSFlag; //Secondary flag
37 Float_t fLightPMQ; //Cerenkov light produced in each quadrant
38 Float_t fLightPMC; //Cerenkov light seen by the common PM
39 Float_t fEnergy; //Total energy deposited in eV
40
41
42 // Operators
43 Int_t operator == (AliZDCMergedHit &quad) {
44 Int_t i;
45 for(i=0; i<2; i++) if(fSector[i]!=quad.GetSector(i)) return 0;
46 return 1;
47 }
48
49 virtual AliZDCMergedHit& operator + (AliZDCMergedHit &quad) {
50 fLightPMQ+=quad.GetLightPMQ();
51 fLightPMC+=quad.GetLightPMC();
52 fEnergy+=quad.GetEnergy();
53 return *this;
54 }
55
56 // Print method
57 virtual void Print(Option_t *) const {
58 printf(" ### MergedHit: sector[0] = %d sector[1] = %d "
59 " LightPMQ = %f, LightPMC = %f, Deposited E = %f\n ",
60 fSector[0],fSector[1],fLightPMQ,fLightPMC,fEnergy);
61 }
62
63 ClassDef(AliZDCMergedHit,1) // MergedHits for the Zero Degree Calorimeters
64};
65
66#endif