#ifndef __HPARTICLETOOL_H__ #define __HPARTICLETOOL_H__ #include "TObject.h" #include "TObjArray.h" #include "TLorentzVector.h" #include "TH1.h" class HRichHit; class HTofHit; class HTofCluster; class HRpcCluster; class HShowerHit; class HMetaMatch2; class HMdcTrkCand; class HMdcSeg; class HMdcHit; class HMdcClusInf; class HMdcClusFit; class HMdcClus; class HGeantKine; class HParticleTool : public TObject { public: HParticleTool(); ~HParticleTool(); static Float_t phiSecToLabDeg(Int_t sec, Float_t phiRad); static Float_t thetaToLabDeg(Float_t thetaRad); static Float_t phiLabToPhiSecDeg(Float_t phiLabDeg); static Int_t phiLabToSec(Float_t phiLabDeg); static Float_t getOpeningAngle(Float_t phi1,Float_t theta1,Float_t phi2,Float_t theta2); static void getTLorentzVector(HGeantKine* kine, TLorentzVector& vec); static Float_t getLabPhiDeg(TLorentzVector& vec); static Int_t findFirstHitInTof (Int_t trackID,Int_t modeTrack = 2); static Int_t findFirstHitShowerInTofino(Int_t trackID,Int_t modeTrack = 2); static Int_t findFirstHitShowerInRpc (Int_t trackID,Int_t modeTrack = 2); static Float_t getInterpolatedValue(TH1* h, Float_t xVal,Bool_t warn = kTRUE); static Stat_t getValue(TH1* h,Float_t xVal, Float_t yVal = 0.0f, Float_t zVal = 0.0f); static HRichHit* getRichHit (Int_t richind); static HTofHit* getTofHit (Int_t tofind); static HTofCluster* getTofCluster(Int_t tofind); static HRpcCluster* getRpcCluster(Int_t rpcind); static HShowerHit* getShowerHit (Int_t showerind); static HMetaMatch2* getMetaMatch (Int_t metaind); static HMdcTrkCand* getMdcTrkCand(Int_t metaind); static HMdcSeg* getMdcSeg (Int_t segind); static HMdcHit* getMdcHit (Int_t segind,Int_t nhit = 0); static HMdcClusInf* getMdcClusInf(Int_t segind,Int_t nhit = 0); static HMdcClusFit* getMdcClusFit(Int_t segind); static HMdcClus* getMdcClus (Int_t segind); static TObjArray* getMdcWireFitSeg (Int_t segind); static TObjArray* getMdcCal1Seg (Int_t segind); static TObjArray* getMdcCal1Cluster(Int_t segind); ClassDef(HParticleTool,0) }; #endif //__HPARTICLETOOL_H__