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

Small Shower Calorimeter corrections, chagnes and cleanups

Make matched cluster variables of the array part of calorimeter private.

Initialize fY variable in the THcShowerHit::THcShowerHit default
constructor.

Correct typo in THcShowerArray::Clear, assign -1000 to fMatchClY.

Edit debug output in THcShowerArray::CoarseProcess and remove obsolete
comments THcShowerArray::MatchCluster.

Clear fSizeClustArray and fNblockHighEnergy quantitites in
THcShower::Clear, for just in case.
parent 12ac2059
Branches
Tags
No related merge requests found
......@@ -597,6 +597,8 @@ void THcShower::Clear(Option_t* opt)
fEtotNorm = 0.;
fEtrack = 0.;
fEtrackNorm = 0.;
fSizeClustArray = 0;
fNblockHighEnergy = 0.;
// Purge cluster list
......
......@@ -388,7 +388,7 @@ void THcShowerArray::Clear( Option_t* )
fClustSize = 0;
fNtracks = 0;
fMatchClX = -1000.;
fMatchClX = -1000.;
fMatchClY = -1000.;
fMatchClMaxEnergyBlock = -1000.;
for (THcShowerClusterListIt i=fClusterList->begin(); i!=fClusterList->end();
......@@ -495,6 +495,7 @@ Int_t THcShowerArray::CoarseProcess( TClonesArray& tracks )
<<": E=" << clE(*ppcl)
<< " Epr=" << clEpr(*ppcl)
<< " X=" << clX(*ppcl)
<< " Y=" << clY(*ppcl)
<< " Z=" << clZ(*ppcl)
<< " size=" << (**ppcl).size()
<< endl;
......@@ -578,16 +579,13 @@ Int_t THcShowerArray::MatchCluster(THaTrack* Track,
// Since hits and clusters are in reverse order (with respect to Engine),
// search backwards to be consistent with Engine.
//
// Note: cluster Z coordinate is used here as Y, for Z variable
// of the THcShowerHit class was used to save Y coordinates of hits.
for (Int_t i=fNclust-1; i>-1; i--) {
THcShowerCluster* cluster = *(fClusterList->begin()+i);
fClustSize = (*cluster).size();
Double_t dx = TMath::Abs( clX(cluster) - XTrFront );
Double_t dy = TMath::Abs( clY(cluster) - YTrFront ); //cluster Z for Y.
Double_t dy = TMath::Abs( clY(cluster) - YTrFront );
Double_t distance = TMath::Sqrt(dx*dx+dy*dy); //cluster-track dist.
if (fParent->fdbg_tracks_cal) {
cout << " match clust = " << i << " clX = " << clX(cluster)<< " clY = " << clY(cluster) << " distacne = " << distance << " test = " << (0.5*(fXStep + fYStep) + fParent->fSlop) << endl;
......
......@@ -61,10 +61,6 @@ public:
// spectrometer Track.
Float_t GetShEnergy(THaTrack*);
Double_t fMatchClX;
Double_t fMatchClY;
Double_t fMatchClMaxEnergyBlock;
Double_t fClustSize;
Double_t GetClMaxEnergyBlock() {
return fMatchClMaxEnergyBlock;
};
......@@ -169,6 +165,11 @@ Int_t fPedSampLow; // Sample range for
Int_t fNtracks; // Number of shower tracks, i.e. number of
// cluster-to-track associations
Double_t fMatchClX;
Double_t fMatchClY;
Double_t fMatchClMaxEnergyBlock;
Double_t fClustSize;
THcShowerClusterList* fClusterList; // List of hit clusters
TClonesArray* frAdcPedRaw;
......
......@@ -10,7 +10,7 @@ using namespace std;
THcShowerHit::THcShowerHit() { //default constructor
fCol=fRow=0;
fX=fZ=0.;
fX=fY=fZ=0.;
fE=0.;
fEpos=0.;
fEneg=0.;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment