From 29fd97c600fabab58dc7344288cee6640c0487f0 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wood" <saw@jlab.org> Date: Fri, 17 Apr 2015 11:53:35 -0400 Subject: [PATCH] Move simple methods to .h and remove unused methods in THcScintillatorPlane --- src/THcScintillatorPlane.cxx | 73 +----------------------------------- src/THcScintillatorPlane.h | 29 ++++++-------- 2 files changed, 13 insertions(+), 89 deletions(-) diff --git a/src/THcScintillatorPlane.cxx b/src/THcScintillatorPlane.cxx index 1d57a97..f56ef15 100644 --- a/src/THcScintillatorPlane.cxx +++ b/src/THcScintillatorPlane.cxx @@ -230,8 +230,8 @@ Int_t THcScintillatorPlane::DefineVariables( EMode mode ) "frPosADCHits.THcSignalHit.GetPaddleNumber()"}, {"negadchits", "List of Negative ADC hits", "frNegADCHits.THcSignalHit.GetPaddleNumber()"}, - {"fptime", "Time at focal plane", - "GetFpTime()"}, + // {"fptime", "Time at focal plane", + // "GetFpTime()"}, { 0 } }; @@ -463,75 +463,6 @@ void THcScintillatorPlane::InitializePedestals( ) } } //____________________________________________________________________________ -Int_t THcScintillatorPlane::GetNelem() -{ - return fNelem; -} -//____________________________________________________________________________ -Int_t THcScintillatorPlane::GetNScinHits() -{ - return fNScinHits; -} -//____________________________________________________________________________ -Double_t THcScintillatorPlane::GetSpacing() -{ - return fSpacing; -} -//____________________________________________________________________________ -Double_t THcScintillatorPlane::GetSize() -{ - return fSize; -} -//____________________________________________________________________________ -Double_t THcScintillatorPlane::GetHodoSlop() -{ - return fHodoSlop; -} -//____________________________________________________________________________ -Double_t THcScintillatorPlane::GetZpos() -{ - return fZpos; -} -//____________________________________________________________________________ -Double_t THcScintillatorPlane::GetDzpos() -{ - return fDzpos; -} -//____________________________________________________________________________ -Double_t THcScintillatorPlane::GetPosLeft() { - return fPosLeft; -} -//____________________________________________________________________________ -Double_t THcScintillatorPlane::GetPosRight() { - return fPosRight; -} -//____________________________________________________________________________ -Double_t THcScintillatorPlane::GetPosOffset() { - return fPosOffset; -} -//____________________________________________________________________________ -Double_t THcScintillatorPlane::GetPosCenter(Int_t PaddleNo) { - return fPosCenter[PaddleNo]; -} -//____________________________________________________________________________ -Double_t THcScintillatorPlane::CalcFpTime() -{ - Double_t tmp=0; - Int_t counter=0; - for (Int_t i=0;i<fNScinGoodHits;i++) { - if (TMath::Abs(fpTimes[i]-fStartTimeCenter)<=fStartTimeSlop) { - tmp+=fpTimes[i]; - counter++; - } - } - if (counter>0) { - fpTime=tmp/counter; - } else { - fpTime=-10000.; - } - return fpTime; -} -//____________________________________________________________________________ ClassImp(THcScintillatorPlane) //////////////////////////////////////////////////////////////////////////////// diff --git a/src/THcScintillatorPlane.h b/src/THcScintillatorPlane.h index 1ef42cb..17bf5f3 100644 --- a/src/THcScintillatorPlane.h +++ b/src/THcScintillatorPlane.h @@ -39,24 +39,17 @@ class THcScintillatorPlane : public THaSubDetector { virtual Int_t AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit); virtual void CalculatePedestals( ); - Int_t GetNelem(); // return number of paddles in this plane - Int_t GetNScinHits(); // return the number of hits in this plane (that pass min/max TDC cuts) - Double_t GetSpacing(); // return the spacing of paddles - Double_t GetSize(); // return paddle size - Double_t GetHodoSlop(); // return the hodo slop - Double_t GetZpos(); //return the z position - Double_t GetDzpos(); - Double_t GetPosLeft(); - Double_t GetPosRight(); - Double_t GetPosOffset(); - Double_t GetPosCenter(Int_t PaddleNo); // here we're counting from zero! - Double_t CalcFpTime(); - Double_t GetFpTime() {return fpTime;}; - Double_t GetFpTime(Int_t index) { return fpTimes[index];}; - Double_t GetScinTime(Int_t index) { return fScinTime[index];}; - Double_t GetScinSigma(Int_t index) { return fScinSigma[index];}; - Double_t GetScinZpos(Int_t index) { return fScinZpos[index];}; - Int_t GetNScinGoodHits() const {return fNScinGoodHits;}; + Int_t GetNelem() {return fNelem;}; // return number of paddles in this plane + Int_t GetNScinHits() {return fNScinHits;}; // # hits in plane (that pass min/max TDC cuts) + Double_t GetSpacing() {return fSpacing;}; // spacing of paddles + Double_t GetSize() {return fSize;}; // paddle size + Double_t GetHodoSlop() {return fHodoSlop;}; // hodo slop + Double_t GetZpos() {return fZpos;}; //return the z position + Double_t GetDzpos() {return fDzpos;}; + Double_t GetPosLeft() {return fPosLeft;}; + Double_t GetPosRight() {return fPosRight;}; + Double_t GetPosOffset() {return fPosOffset;}; + Double_t GetPosCenter(Int_t PaddleNo) {return fPosCenter[PaddleNo];}; // counting from zero! TClonesArray* fParentHitList; -- GitLab