Skip to content
Snippets Groups Projects
Commit 1f6613d9 authored by Vardan Tadevosyan's avatar Vardan Tadevosyan
Browse files

Correct change of value of fOrigin in THcShowerArray::MatchCluster.

parent 92058a52
No related branches found
No related tags found
No related merge requests found
...@@ -132,6 +132,8 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date ) ...@@ -132,6 +132,8 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
fYPos[i][j] = fYFront + (fNColumns-1)*fYStep/2 - fYStep*j; fYPos[i][j] = fYFront + (fNColumns-1)*fYStep/2 - fYStep*j;
} }
fOrigin.SetXYZ(fXFront, fYFront, fZFront);
// Debug output. // Debug output.
THcShower* fParent; THcShower* fParent;
...@@ -172,6 +174,12 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date ) ...@@ -172,6 +174,12 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
} }
cout << endl; cout << endl;
cout << " Origin of Array:" << endl;
cout << " Xorig = " << GetOrigin().X() << endl;
cout << " Yorig = " << GetOrigin().Y() << endl;
cout << " Zorig = " << GetOrigin().Z() << endl;
cout << endl;
cout << " Using FADC " << fUsingFADC << endl; cout << " Using FADC " << fUsingFADC << endl;
if (fUsingFADC) { if (fUsingFADC) {
cout << " FADC pedestal sample low = " << fPedSampLow << ", high = " cout << " FADC pedestal sample low = " << fPedSampLow << ", high = "
...@@ -180,6 +188,7 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date ) ...@@ -180,6 +188,7 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
<< fDataSampHigh << endl; << fDataSampHigh << endl;
} }
getchar();
} }
// Here read the 2-D arrays of pedestals, gains, etc. // Here read the 2-D arrays of pedestals, gains, etc.
...@@ -441,7 +450,7 @@ Int_t THcShowerArray::MatchCluster(THaTrack* Track, ...@@ -441,7 +450,7 @@ Int_t THcShowerArray::MatchCluster(THaTrack* Track,
// Track interception with face of Array. The coordinates are // Track interception with face of Array. The coordinates are
// in the Array's local system. // in the Array's local system.
fOrigin = this->GetOrigin(); fOrigin = GetOrigin();
THcShower* fParent = (THcShower*) GetParent(); THcShower* fParent = (THcShower*) GetParent();
...@@ -458,6 +467,8 @@ Int_t THcShowerArray::MatchCluster(THaTrack* Track, ...@@ -458,6 +467,8 @@ Int_t THcShowerArray::MatchCluster(THaTrack* Track,
if (fParent->fvTest) { if (fParent->fvTest) {
TVector3 Origin = fOrigin; //save fOrigin
// Track coordinates at the back of the detector. // Track coordinates at the back of the detector.
// Origin at the back of counter. // Origin at the back of counter.
...@@ -476,6 +487,7 @@ Int_t THcShowerArray::MatchCluster(THaTrack* Track, ...@@ -476,6 +487,7 @@ Int_t THcShowerArray::MatchCluster(THaTrack* Track,
(XTrBack <= fParent->fvXmax) && (XTrBack >= fParent->fvXmin) && (XTrBack <= fParent->fvXmax) && (XTrBack >= fParent->fvXmin) &&
(YTrBack <= fParent->fvYmax) && (YTrBack >= fParent->fvYmin); (YTrBack <= fParent->fvYmax) && (YTrBack >= fParent->fvYmin);
fOrigin = Origin; //restore fOrigin
} }
// Match a cluster to the track. Choose closest to the track cluster. // Match a cluster to the track. Choose closest to the track 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