36 #include "StRichPid.h"
38 static const char rcsid[] =
"$Id: StRichPid.cxx,v 2.6 2001/04/05 04:00:53 ullrich Exp $";
44 mTotalAzimuth(0), mTotalArea(0), mTotalHits(0), mTotalDensity(0),
45 mTruncatedAzimuth(0), mTruncatedArea(0), mTruncatedHits(0), mTruncatedDensity(0) {}
48 float totArea,
unsigned short totHits,
float trunAzim,
float trunArea,
49 unsigned short trunHits)
50 : mMipResidual(resid), mTotalAzimuth(totAzim), mTotalArea(totArea),
51 mTotalHits(totHits), mTruncatedAzimuth(trunAzim), mTruncatedArea(trunArea),
52 mTruncatedHits(trunHits) {
54 mParticleNumber = type->pdgEncoding();
56 if (mTotalArea>0) {mTotalDensity=mTotalHits/mTotalArea;}
59 if (mTruncatedArea>0) {mTruncatedDensity=mTruncatedHits/mTruncatedArea;}
60 else mTruncatedDensity=0;
63 StRichPid::~StRichPid() {}
67 mParticleNumber = t->pdgEncoding();
70 const StSPtrVecRichPhotonInfo& StRichPid::getPhotonInfo() {
return mPhotonInfo;}
74 if(static_cast<unsigned int>(i) > mPhotonInfo.size())
77 return mPhotonInfo[i];
83 mPhotonInfo.push_back(i);
87 StRichPid::operator==(
const StRichPid& pid)
const {
88 return ( mParticleNumber == pid.getParticleNumber() &&
89 mMipResidual == pid.getMipResidual() &&
90 mTotalAzimuth == pid.getTotalAzimuth() &&
91 mTotalArea == pid.getTotalArea() &&
92 mTotalHits == pid.getTotalHits() &&
93 mTotalDensity == pid.getTotalDensity() &&
94 mTruncatedAzimuth == pid.getTruncatedAzimuth() &&
95 mTruncatedArea == pid.getTruncatedArea() &&
96 mTruncatedHits == pid.getTruncatedHits() &&
97 mTruncatedDensity == pid.getTruncatedDensity() );