First V0 MC Analysis from H.Ricaud
[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
3ff116f2 21 virtual Int_t GetSector(Int_t i) const {return fSector[i];}
22 virtual Float_t GetPrimKinEn() const {return fPrimKinEn;}
23 virtual Float_t GetXImpact() const {return fXImpact;}
24 virtual Float_t GetYImpact() const {return fYImpact;}
25 virtual Float_t GetSFlag() const {return fSFlag;}
26 virtual Float_t GetLightPMQ() const {return fLightPMQ;}
27 virtual Float_t GetLightPMC() const {return fLightPMC;}
28 virtual Float_t GetEnergy() const {return fEnergy;}
1acbaaa8 29
30 // Operators
31 Int_t operator == (AliZDCMergedHit &quad) {
32 Int_t i;
33 for(i=0; i<2; i++) if(fSector[i]!=quad.GetSector(i)) return 0;
34 return 1;
35 }
36
37 virtual AliZDCMergedHit& operator + (AliZDCMergedHit &quad) {
38 fLightPMQ+=quad.GetLightPMQ();
39 fLightPMC+=quad.GetLightPMC();
40 fEnergy+=quad.GetEnergy();
41 return *this;
42 }
43
44 // Print method
45 virtual void Print(Option_t *) const {
46 printf(" ### MergedHit: sector[0] = %d sector[1] = %d "
47 " LightPMQ = %f, LightPMC = %f, Deposited E = %f\n ",
48 fSector[0],fSector[1],fLightPMQ,fLightPMC,fEnergy);
49 }
50
3ff116f2 51private:
52 // Data members
53 Int_t fSector[2]; //Array of volumes
54 Float_t fPrimKinEn; //Primary particle energy
55 Float_t fXImpact; //x-coord. of the impact point over the ZDC
56 Float_t fYImpact; //y-coord. of the impact point over the ZDC
57 Float_t fSFlag; //Secondary flag
58 Float_t fLightPMQ; //Cerenkov light produced in each quadrant
59 Float_t fLightPMC; //Cerenkov light seen by the common PM
60 Float_t fEnergy; //Total energy deposited in eV
61
62
1acbaaa8 63 ClassDef(AliZDCMergedHit,1) // MergedHits for the Zero Degree Calorimeters
64};
65
66#endif