#ifndef HRICHHIT_H
#define HRICHHIT_H
#include "TArrayI.h"
#include "TObject.h"
#define NMAXCALSPERRING 30
class HRichHit: public TObject {
public:
Double_t fRich700CircleCenterX;
Double_t fRich700CircleCenterY;
Double_t fRich700CircleRadius;
Double_t fRich700CircleChi2;
Int_t fRich700NofRichCals;
UShort_t fRich700CalIds[NMAXCALSPERRING];
Int_t iRingX;
Int_t iRingY;
Int_t iRingQuality;
Int_t iRingPatMat;
Int_t iRingHouTra;
Int_t iRingPadNr;
Int_t iRingAmplitude;
Int_t iRingLocalMax4;
Int_t iRingLocalMax8;
Int_t iRingClusterNr;
Float_t fRingClusterSize;
Float_t fRingClusterLMax4;
Float_t fRingClusterLMax8;
Int_t iRingAlgorithmIndex;
static Int_t iRingImageSize;
Int_t iRingImage[256];
Int_t iRingFreeParam;
Int_t iRingMaxLabel;
Int_t fMaxClusterSize;
Int_t fMaxClusterSum;
Int_t fMaxThrClusterSize;
Float_t fLabX;
Float_t fLabY;
Float_t fLabZ;
Float_t fX;
Float_t fY;
Float_t fPadX;
Float_t fPadY;
Float_t fMeanTheta;
Float_t fMeanPhi;
Float_t fTheta;
Float_t fPhi;
Int_t nSector;
Int_t lEventNr;
Int_t fAddress;
Bool_t fTestDens;
Bool_t fTestBord;
Bool_t fTestDyna;
Bool_t fTestRati;
Bool_t fTestAsym;
Bool_t fTestCharge;
Bool_t fRejFake;
Int_t fTests;
Float_t fRingCentroid;
Float_t fRingRadius;
Float_t fBorderFactor;
public:
HRichHit();
HRichHit(Int_t x, Int_t y, Int_t q, Int_t fp, Int_t lab);
virtual ~HRichHit();
HRichHit(const HRichHit& source);
HRichHit& operator=(const HRichHit& source);
void Reset();
Int_t calcAddress();
Int_t getSector(void) { return nSector; }
Int_t getAddress() { return (fAddress > 0) ? fAddress : calcAddress(); }
Int_t getEventNr() { return lEventNr; }
void getXY(Float_t *px, Float_t *py) { *px = fX; *py = fY; }
void getLabXYZ(Float_t *px, Float_t *py, Float_t *pz) { *px = fLabX; *py = fLabY; *pz = fLabZ; }
Float_t getTheta() { return fTheta; }
Float_t getPhi() { return fPhi; }
Int_t getRingCenterX() { return iRingX; };
Int_t getRingCenterY() { return iRingY; };
Double_t getRich700CircleCenterX() { return fRich700CircleCenterX; }
Double_t getRich700CircleCenterY() { return fRich700CircleCenterY; }
Double_t getRich700CircleRadius() { return fRich700CircleRadius; }
Double_t getRich700CircleChi2() { return fRich700CircleChi2; }
Int_t getRich700NofRichCals() { return fRich700NofRichCals; }
void initCalIds();
void dumpToStdout();
Float_t getPadY() { return fPadY; }
Float_t getPadX() { return fPadX; }
Bool_t getTestRati() { return fTestRati; }
Bool_t getTestAsym() { return fTestAsym; }
Bool_t getTestCharge() { return fTestCharge;}
Float_t getMeanTheta() { return fMeanTheta; }
Float_t getMeanPhi() { return fMeanPhi; }
Bool_t getTestDens() { return fTestDens; }
Bool_t getTestBord() { return fTestBord; }
Bool_t getTestDyna() { return fTestDyna; }
Bool_t getRejFake() { return fRejFake; }
Int_t getRingQuality() { return iRingQuality; };
Int_t getRingPatMat() { return iRingPatMat; };
Int_t getRingHouTra() { return iRingHouTra; };
Int_t getRingAmplitude() { return (Int_t) iRingAmplitude; };
Int_t getRingPadNr() { return (Int_t) iRingPadNr; };
Int_t getRingLocalMax4() { return (Int_t) iRingLocalMax4; };
Int_t getRingLocalMax8() { return (Int_t) iRingLocalMax8; };
Int_t getRingClusterNr() { return (Int_t) iRingClusterNr; };
Int_t getRingAlgorithmIndex() { return (Int_t) iRingAlgorithmIndex; };
Float_t getRingClusterSize() { return fRingClusterSize; };
Float_t getRingClusterLMax4() { return fRingClusterLMax4; };
Float_t getRingClusterLMax8() { return fRingClusterLMax8; };
Int_t getRingMaxClusterSize() { return fMaxClusterSize; };
Int_t getRingMaxClusterSum() { return fMaxClusterSum; };
Int_t getRingMaxThrClusterSize() { return fMaxThrClusterSize; };
Float_t getCentroid() { return fRingCentroid; };
Float_t getRadius() { return fRingRadius; };
void setSector (Int_t s) { nSector = s; }
void setEventNr (Int_t lNr) { lEventNr = lNr; }
void setTheta (const Float_t th) { fTheta = th; }
void setPhi (const Float_t phi) { fPhi = phi; }
void setXY(Float_t px, Float_t py) { fX = px; fY = py; }
void setLabXYZ(Float_t px, Float_t py, Float_t pz) { fLabX = px; fLabY = py; fLabZ = pz; }
void setRingCenterX (Int_t x) { iRingX = x; };
void setRingCenterY (Int_t y) { iRingY = y; };
void setRich700CircleCenterX(Double_t val) { fRich700CircleCenterX = val; }
void setRich700CircleCenterY(Double_t val) { fRich700CircleCenterY = val; }
void setRich700CircleRadius (Double_t val) { fRich700CircleRadius = val; }
void setRich700CircleChi2 (Double_t val) { fRich700CircleChi2 = val; }
void setRich700NofRichCals (Int_t val) { fRich700NofRichCals = val; }
void setPadY (const Float_t pady) { fPadY = pady; }
void setPadX (const Float_t padx) { fPadX = padx; }
void setMeanTheta (const Float_t th) { fMeanTheta = th; }
void setMeanPhi (const Float_t phi) { fMeanPhi = phi; }
void setTestDens (Bool_t val) { fTestDens = val; }
void setTestBord (Bool_t val) { fTestBord = val; }
void setTestDyna (Bool_t val) { fTestDyna = val; }
void setTestRati (Bool_t val) { fTestRati = val; }
void setTestAsym (Bool_t val) { fTestAsym = val; }
void setTestCharge (Bool_t val) { fTestCharge = val; }
void setRejFake (Bool_t val) { fRejFake = val; }
void setRingQuality (Int_t qual) { iRingQuality = qual; };
void setRingPatMat (Int_t patmat) { iRingPatMat = patmat; };
void setRingHouTra (Int_t houtra) { iRingHouTra = houtra; };
void setRingAmplitude (Short_t ampl) { iRingAmplitude = ampl; };
void setRingPadNr (Short_t padnr) { iRingPadNr = padnr; };
void setRingLocalMax4 (Short_t locmax4) { iRingLocalMax4 = locmax4; };
void setRingLocalMax8 (Short_t locmax8) { iRingLocalMax8 = locmax8; };
void setRingClusterNr (Short_t clusternr) { iRingClusterNr = clusternr; };
void setRingAlgorithmIndex (Short_t algoindex) { iRingAlgorithmIndex = algoindex; };
void setRingClusterSize (Float_t clustersize) { fRingClusterSize = clustersize; };
void setRingClusterLMax4 (Float_t clusterLMax4) { fRingClusterLMax4 = clusterLMax4; };
void setRingClusterLMax8 (Float_t clusterLMax8) { fRingClusterLMax8 = clusterLMax8; };
void setRingMaxClusterSize (Int_t fmaxclussize) { fMaxClusterSize = fmaxclussize; };
void setRingMaxClusterSum (Int_t fmaxclussum) { fMaxClusterSum = fmaxclussum; };
void setRingMaxThrClusterSize(Int_t fmaxthrclussize) { fMaxThrClusterSize = fmaxthrclussize; };
void setCentroid (Float_t centro) { fRingCentroid = centro; };
void setRadius (Float_t rad) { fRingRadius = rad; };
Bool_t isNewRich() { return fRich700NofRichCals == 0 ? kFALSE: kTRUE; }
ClassDef(HRichHit, 3)
};
#endif // HRICHHIT_H