Skip to content
Snippets Groups Projects
Commit 4359d3f9 authored by Stephen A. Wood's avatar Stephen A. Wood
Browse files

Start work on creating a few simple hodoscope histograms.

Follow SRC model and make a scintillator plane class.
parent 480155a7
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......@@ -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" },
......
......@@ -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
......
//*-- 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
}
#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
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