diff --git a/Makefile b/Makefile index 11cbf6d20d5812484cf2a4d1d969cf357fcae5fc..f1f95c27ba2cb91e35847629effcfc7c67625121 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,8 @@ SRC = src/THcInterface.cxx src/THcParmList.cxx src/THcAnalyzer.cxx \ src/THcHodoscopeHit.cxx src/THcRawHit.cxx \ src/THcDCHit.cxx \ src/THcHitList.cxx src/THcDetectorMap.cxx src/THcHodoscope.cxx \ - src/THcHallCSpectrometer.cxx src/THcDriftChamber.cxx + src/THcHallCSpectrometer.cxx src/THcDriftChamber.cxx \ + src/THcScintillatorPlane.cxx # Name of your package. # The shared library that will be built will get the name lib$(PACKAGE).so diff --git a/src/HallC_LinkDef.h b/src/HallC_LinkDef.h index 5ac786ee830989c3e66977412713011f7352976e..b939b5157bd2ba4b46ada19cacd19717aecedba3 100644 --- a/src/HallC_LinkDef.h +++ b/src/HallC_LinkDef.h @@ -18,5 +18,6 @@ #pragma link C++ class THcDriftChamber+; #pragma link C++ class THcDetectorMap+; #pragma link C++ class THcHallCSpectrometer+; +#pragma link C++ class THcScintillatorPlane+; #endif diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index b70ac6c2c6d2170bb7000da1b8baae2f632d3a6c..7606f76074a360de5a0c12d71d8aff3066f17459 100644 --- a/src/THcHodoscope.cxx +++ b/src/THcHodoscope.cxx @@ -55,6 +55,19 @@ THaAnalysisObject::EStatus THcHodoscope::Init( const TDatime& date ) if( THaNonTrackingDetector::Init( date ) ) return fStatus; + // Construct the planes + fPlane = new THcScintillatorPlane* [fNPlanes]; + for(Int_t ip=0; ip<fNPlanes; ip++) { + // Create a name and description + // Is it going to be a problem that I create these object in init? + // I could actually do it in the constructor, since the parameters + // will already have been read. Then I don't have to manually call + // ReadDatabase for each plane + GetTitle() + fPlane[ip] = THcScintillatorPlane( name, description); + } + + // Replace with what we need for Hall C // const DataDest tmp[NDEST] = { // { &fRTNhit, &fRANhit, fRT, fRT_c, fRA, fRA_p, fRA_c, fROff, fRPed, fRGain }, @@ -191,6 +204,12 @@ Int_t THcHodoscope::DefineVariables( EMode mode ) // Register variables in global list + // RVarDef vars[] = { + // hpostdc1 HMS s1x+ TDC hits + // hnegtdc1 HMS s1x+ TDC hits + //... + // hnegtdc4 HMS s2y- TDC hits + // RVarDef vars[] = { // { "nlthit", "Number of Left paddles TDC times", "fLTNhit" }, // { "nrthit", "Number of Right paddles TDC times", "fRTNhit" }, diff --git a/src/THcHodoscope.h b/src/THcHodoscope.h index 31760f5a7797e9ff59e7cf35aec04ebb5b199216..df56b5376606de6b139ca51eafc5514e3f828beb 100644 --- a/src/THcHodoscope.h +++ b/src/THcHodoscope.h @@ -3,7 +3,7 @@ /////////////////////////////////////////////////////////////////////////////// // // -// THcHodoscope // +// THcHodoscope // // // /////////////////////////////////////////////////////////////////////////////// @@ -11,6 +11,7 @@ #include "THaNonTrackingDetector.h" #include "THcHitList.h" #include "THcHodoscopeHit.h" +#include "THcScintillatorPlane.h" class THaScCalib; @@ -49,7 +50,7 @@ protected: Double_t* fSpacing; // Paddle spacing in cm Double_t** fCenter; // Center position of each paddle - + THcScintillatorPlane** fPlane; // List of plane objects TClonesArray* fTrackProj; // projection of track onto scintillator plane // and estimated match to TOF paddle diff --git a/src/THcScintillatorPlane.cxx b/src/THcScintillatorPlane.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a2b30d01727ee7741520c2c852c94ea9864870d3 --- /dev/null +++ b/src/THcScintillatorPlane.cxx @@ -0,0 +1,28 @@ +//*-- Author : + +////////////////////////////////////////////////////////////////////////// +// +// THcScintillatorPlane +// +////////////////////////////////////////////////////////////////////////// + +#include "THcScintillatorPlane.h" + +ClassImp(THcScintillatorPlane) + +//______________________________________________________________________________ +THcScintillatorPlane::THcScintillatorPlane( const char* name, + const char* description, + THaApparatus* apparatus ) + : THaNonTrackingDetector(name,description,apparatus) +{ + // Normal constructor with name and description + +} + +//______________________________________________________________________________ +THcScintillatorPlane::~THcScintillatorPlane() +{ + // Destructor + +} diff --git a/src/THcScintillatorPlane.h b/src/THcScintillatorPlane.h new file mode 100644 index 0000000000000000000000000000000000000000..ce546684471fefb9bc8a518b01ef22f4a7bba198 --- /dev/null +++ b/src/THcScintillatorPlane.h @@ -0,0 +1,36 @@ +#ifndef ROOT_THcScintillatorPlane +#define ROOT_THcScintillatorPlane + +////////////////////////////////////////////////////////////////////////////// +// +// THcScintillatorPlane +// +// A Hall C scintillator plane +// +// May want to later inherit from a THcPlane class if there are similarities +// in what a plane is shared with other detector types (shower, etc.) +// +////////////////////////////////////////////////////////////////////////////// + +#include "THaNonTrackingDetector.h" + +class THcScintillatorPlane : public THaNonTrackingDetector { + + public: + virtual ~THcScintillatorPlane(); + + THcScintillatorPlane( const char* name, const char* description, + THaApparatus* a = NULL); + + virtual Int_t CoarseProcess( TClonesArray& tracks ) = 0; + virtual Int_t FineProcess( TClonesArray& tracks ) = 0; + Bool_t IsTracking() { return kFALSE; } + virtual Bool_t IsPid() { return kFALSE; } + + protected: + + ClassDef(THcScintillatorPlane,0) +}; +#endif + +