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

Move definitions from THcShowerHitCluster.h into

THcShowerHitCluster.cxx.
parent c543140a
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ hcheaders = Split(""" ...@@ -17,7 +17,7 @@ hcheaders = Split("""
src/THcDC.h src/THcDriftChamberPlane.h src/THcDC.h src/THcDriftChamberPlane.h
src/THcDriftChamber.h src/THcRawDCHit.h src/THcDCHit.h src/THcDCWire.h src/THcSpacePoint.h src/THcDriftChamber.h src/THcRawDCHit.h src/THcDCHit.h src/THcDCWire.h src/THcSpacePoint.h
src/THcDCLookupTTDConv.h src/THcDCTimeToDistConv.h src/THcShower.h src/THcShowerPlane.h src/THcDCLookupTTDConv.h src/THcDCTimeToDistConv.h src/THcShower.h src/THcShowerPlane.h
src/THcShowerArray.h src/THcShowerArray.h src/THcShowerHitCluster.h
src/THcRawShowerHit.h src/THcAerogel.h src/THcAerogelHit.h src/THcCherenkov.h src/THcCherenkovHit.h src/THcRawShowerHit.h src/THcAerogel.h src/THcAerogelHit.h src/THcCherenkov.h src/THcCherenkovHit.h
src/THcGlobals.h src/THcDCTrack.h src/THcFormula.h src/THcGlobals.h src/THcDCTrack.h src/THcFormula.h
src/THcRaster.h src/THcRasteredBeam.h src/THcRasterRawHit.h src/THcScalerEvtHandler.h src/THcRaster.h src/THcRasteredBeam.h src/THcRasterRawHit.h src/THcScalerEvtHandler.h
......
#include "THcShowerHitCluster.h"
//____________________________________________________________________________
THcShowerHit::THcShowerHit() { //default constructor
fCol=fRow=0;
fX=fZ=0.;
fE=0.;
fEpos=0.;
fEneg=0.;
}
//____________________________________________________________________________
THcShowerHit::THcShowerHit(Int_t hRow, Int_t hCol, Double_t hX, Double_t hZ,
Double_t hE, Double_t hEpos, Double_t hEneg) {
fRow=hRow;
fCol=hCol;
fX=hX;
fZ=hZ;
fE=hE;
fEpos=hEpos;
fEneg=hEneg;
}
//____________________________________________________________________________
// Decide if a hit is neighbouring the current hit.
// Two hits are neighbours if share a side or a corner,
// or in the same row but separated by no more than a block.
//
bool THcShowerHit::isNeighbour(THcShowerHit* hit1) {
//Is hit1 neighbouring this hit?
Int_t dRow = fRow-(*hit1).fRow;
Int_t dCol = fCol-(*hit1).fCol;
return (TMath::Abs(dRow)<2 && TMath::Abs(dCol)<2) ||
(dRow==0 && TMath::Abs(dCol)<3);
}
//____________________________________________________________________________
//Print out hit information
//
void THcShowerHit::show() {
cout << "row=" << fRow << " column=" << fCol
<< " x=" << fX << " z=" << fZ
<< " E=" << fE << " Epos=" << fEpos << " Eneg=" << fEneg << endl;
}
//____________________________________________________________________________
// Define < operator in order to fill in set of hits in a sorted manner.
//
bool THcShowerHit::operator<(THcShowerHit rhs) const {
if (fCol != rhs.fCol)
return fCol < rhs.fCol;
else
return fRow < rhs.fRow;
}
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