Skip to content
Snippets Groups Projects
Commit 5c48c0e3 authored by Vardan Tadevosyan's avatar Vardan Tadevosyan Committed by Stephen A. Wood
Browse files

Edit/add comments in THcShower class

parent f1b25902
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "THcShower.h" #include "THcShower.h"
#include "THcHallCSpectrometer.h" #include "THcHallCSpectrometer.h"
//#include "THcShowerCluster.h"
#include "THaEvData.h" #include "THaEvData.h"
#include "THaDetMap.h" #include "THaDetMap.h"
#include "THcDetectorMap.h" #include "THcDetectorMap.h"
...@@ -635,7 +634,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) ...@@ -635,7 +634,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks)
} }
} }
// Create list of clusters and fill it. // Fill list of clusters.
ClusterHits(HitSet); ClusterHits(HitSet);
...@@ -679,7 +678,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) ...@@ -679,7 +678,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks)
void THcShower::ClusterHits(THcShowerHitSet& HitSet) { void THcShower::ClusterHits(THcShowerHitSet& HitSet) {
// Collect hits from the HitSet into the clusters. The resultant clusters // 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) { while (HitSet.size() != 0) {
...@@ -724,6 +723,8 @@ void THcShower::ClusterHits(THcShowerHitSet& HitSet) { ...@@ -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) { Double_t addE(Double_t x, THcShowerHit* h) {
return x + h->hitE(); return x + h->hitE();
} }
...@@ -780,7 +781,6 @@ Double_t clEpr(THcShowerCluster* cluster) { ...@@ -780,7 +781,6 @@ Double_t clEpr(THcShowerCluster* cluster) {
return accumulate((*cluster).begin(),(*cluster).end(),0.,addEpr); return accumulate((*cluster).begin(),(*cluster).end(),0.,addEpr);
} }
//Cluster energy deposition in plane iplane=0,..,3: //Cluster energy deposition in plane iplane=0,..,3:
// side=0 -- from positive PMTs only; // side=0 -- from positive PMTs only;
// side=1 -- from negative PMTs only; // side=1 -- from negative PMTs only;
......
...@@ -104,7 +104,7 @@ public: ...@@ -104,7 +104,7 @@ public:
<< " E=" << fE << " Epos=" << fEpos << " Eneg=" << fEneg << endl; << " 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 { bool operator<(THcShowerHit rhs) const {
if (fCol != rhs.fCol) if (fCol != rhs.fCol)
...@@ -306,12 +306,15 @@ protected: ...@@ -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 addE(Double_t x, THcShowerHit* h);
Double_t addX(Double_t x, THcShowerHit* h); Double_t addX(Double_t x, THcShowerHit* h);
Double_t addZ(Double_t x, THcShowerHit* h); Double_t addZ(Double_t x, THcShowerHit* h);
Double_t addEpr(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 clX(THcShowerCluster* cluster);
Double_t clZ(THcShowerCluster* cluster); Double_t clZ(THcShowerCluster* cluster);
Double_t clE(THcShowerCluster* cluster); Double_t clE(THcShowerCluster* cluster);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment