diff --git a/src/THcShower.cxx b/src/THcShower.cxx index 3ed60a6c8db5fe7f5cdb0e66a44446e762d3f3a5..11bf6b71528acb9d71dc7b3ec09e963fb5568704 100644 --- a/src/THcShower.cxx +++ b/src/THcShower.cxx @@ -11,7 +11,6 @@ #include "THcShower.h" #include "THcHallCSpectrometer.h" -//#include "THcShowerCluster.h" #include "THaEvData.h" #include "THaDetMap.h" #include "THcDetectorMap.h" @@ -635,7 +634,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) } } - // Create list of clusters and fill it. + // Fill list of clusters. ClusterHits(HitSet); @@ -679,7 +678,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) void THcShower::ClusterHits(THcShowerHitSet& HitSet) { // Collect hits from the HitSet into the clusters. The resultant clusters - // of hits are saved in the ClusterList. + // of hits are saved in the fClusterList. while (HitSet.size() != 0) { @@ -724,6 +723,8 @@ void THcShower::ClusterHits(THcShowerHitSet& HitSet) { //----------------------------------------------------------------------------- +// Various helper functions to accumulate hit related quantities. + Double_t addE(Double_t x, THcShowerHit* h) { return x + h->hitE(); } @@ -780,7 +781,6 @@ Double_t clEpr(THcShowerCluster* cluster) { return accumulate((*cluster).begin(),(*cluster).end(),0.,addEpr); } - //Cluster energy deposition in plane iplane=0,..,3: // side=0 -- from positive PMTs only; // side=1 -- from negative PMTs only; diff --git a/src/THcShower.h b/src/THcShower.h index e52b4240448b920eae0e6d4ebed1052e9ded987c..dd6d710a3bb2f3da5189a689b3b3596b58c885ea 100644 --- a/src/THcShower.h +++ b/src/THcShower.h @@ -104,7 +104,7 @@ public: << " E=" << fE << " Epos=" << fEpos << " Eneg=" << fEneg << endl; } - // Define < operator in order to fill in hit sets in a sorted manner. + // Define < operator in order to fill in set of hits in a sorted manner. // bool operator<(THcShowerHit rhs) const { if (fCol != rhs.fCol) @@ -306,12 +306,15 @@ protected: /////////////////////////////////////////////////////////////////////////////// -// Auxiliary methods to be used with the hit and cluster containers. +// Various helper functions to accumulate hit related quantities. Double_t addE(Double_t x, THcShowerHit* h); Double_t addX(Double_t x, THcShowerHit* h); Double_t addZ(Double_t x, THcShowerHit* h); Double_t addEpr(Double_t x, THcShowerHit* h); + +// Methods to calculate coordinates and energy depositions for a given cluster. + Double_t clX(THcShowerCluster* cluster); Double_t clZ(THcShowerCluster* cluster); Double_t clE(THcShowerCluster* cluster);