#ifndef __HPARTICLEBTCLUSTERF_H__ #define __HPARTICLEBTCLUSTERF_H__ #include "TObject.h" //#include "hreconstructor.h" class HParticleBtPar; class HParticleBtRingF; class TF2; class HVertex; class HParticleBtRingInfo; using namespace std; class HParticleBtClusterF : public TObject { protected: HParticleBtPar* fBtPar; HParticleBtRingF* fRing; Int_t fPadUp; Int_t fPadUpRight; Int_t fPadRight; Int_t fPadDownRight; Int_t fPadDown; Int_t fPadDownLeft; Int_t fPadLeft; Int_t fPadUpLeft; Float_t fChargeLimit[6]; Float_t fChargeLimitMaximum[6]; Float_t fPadWidthX; Float_t fPadWidthY; Float_t fNSigma; Float_t fMaxSigmaRange; Float_t fMaxSigmaRangeSmall; Float_t fSigmaErrorPad; UInt_t fNMaxLimit; UInt_t fClusSizeLimit; Float_t fMinimumSigmaValue; Int_t fMaximumType; Float_t fSigmaGaus[2]; //x,y Float_t fSigmaGausRange[2];//x,y Float_t fChargeDiagonalPar[3]; //3 Params per function Float_t fChargeVerticalPar[3]; Float_t fChargeHorizontalPar[3]; Float_t fPhiOff[6]; Float_t fPhiOff2[6]; Int_t fPhiOffsetPar; Int_t fNRingSeg; Int_t fNRingSegStep; Int_t fNRingSegOffset; Int_t fNVertex; Int_t fNParMean; Int_t fNParSigma; Float_t fParThetaAngleMin; Float_t fParThetaAngleMax; vector > fPol2DMean; vector > fPol2DSigma; vector fRad2Deg; vector fRad2DegX; vector fRad2DegY; //Pads in clusters vector fIsInCluster; //Cluster track relation vector > fClusTrackNoShared; //Cluster information vector fClusIsGood; vector fClusPadSum; vector fClusPadRing; vector fClusClass; vector fClusChargeSum; vector fClusPosX; vector fClusPosY; //Maxima and maxima position vector > fClusNMaxima; vector > > fClusNMaximaPad; vector > > fClusNMaximaPosX; vector > > fClusNMaximaPosY; //Chi2 vector > > fClusChi2; vector > > fClusChi2Best; vector > > fClusChi2X; vector > > fClusChi2Y; vector > > fClusChi2XMM; vector > > fClusChi2YMM; //Debug info vector > > fClusCircleX; vector > > fClusCircleY; vector > > fClusSig1X; vector > > fClusSig1Y; vector > > fClusSig2X; vector > > fClusSig2Y; //RingInfo vector < vector >* fPrediction; vector * fRichHitAdd; vector * fRichHitCharge; vector fRingMeanDistX; vector fRingMeanDistY; public: HParticleBtClusterF(void); ~HParticleBtClusterF(void); // ----------------------------------------------------- Bool_t init(void); // ----------------------------------------------------- void setRingF(HParticleBtRingF* ring); void calcCluster(Int_t trackNo, HVertex &vertex); void noHitFound(); void clearCluster(void); Int_t getPadsRing( const Int_t trackNo); Int_t getPadsSum( const Int_t trackNo); Float_t getChargeRing(const Int_t trackNo); Float_t getChargeSum( const Int_t trackNo); Int_t getNClusters( const Int_t trackNo); Int_t getMaxima( const Int_t trackNo); Int_t getNearbyMaxima(const Int_t trackNo); Float_t getChi2Value( const Int_t trackNo); Float_t getChi2ValueBest( const Int_t trackNo); Float_t getChi2ValuePrimary(const Int_t trackNo); Int_t getMaximaShared( const Int_t trackNo); Int_t getMaximaSharedTrack( const Int_t trackNo, const Int_t trackNo2); Int_t getNearbyMaximaShared( const Int_t trackNo); Int_t getNearbyMaximaSharedTrack(const Int_t trackNo, const Int_t trackNo2); Float_t getMeanDistX(const Int_t trackNo); Float_t getMeanDistY(const Int_t trackNo); Float_t getMeanDist( const Int_t trackNo); Bool_t fillRingInfo(HParticleBtRingInfo* BtRingInfo); //Double_t gaussf(Double_t *x, Double_t *par); private: // ----------------------------------------------------- //Helper functions void addressToColRow(const Int_t address, Int_t &sec, Int_t &row, Int_t &col); Float_t getPadCharge(const Int_t pos); void addressIsShared(Int_t address); Float_t sharedChargeDiagonal(const Float_t maximumCharge); Float_t sharedChargeVertical(const Float_t maximumCharge); Float_t sharedChargeHorizontal(const Float_t maximumCharge); //Cluster info calculation functions void findNeighbour( const Int_t trackNo, const Int_t address); void fillCluster(const Int_t trackNo, const UInt_t beginclus); void nMaxima(const Int_t trackNo, const UInt_t beginclus); void fitMaximaPos(const UInt_t beginclus); void calcChi2(const Int_t trackNo); void setGoodClus(void); void findClusterShape(const UInt_t beginclus); void reCalcChi2(const Int_t trackNo, HVertex &vertex ); ClassDef(HParticleBtClusterF, 0) }; #endif // __HPARTICLEBTCLUSTER_H__