Newer
Older
#ifndef ROOT_THcHodoscope
#define ROOT_THcHodoscope
///////////////////////////////////////////////////////////////////////////////
// //
// THcHodoscope //
// //
///////////////////////////////////////////////////////////////////////////////
#include "TClonesArray.h"
#include "THaNonTrackingDetector.h"
#include "THcHitList.h"
#include "THcHodoscopeHit.h"
#include "THcScintillatorPlane.h"
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
class THaScCalib;
class THcHodoscope : public THaNonTrackingDetector, public THcHitList {
public:
THcHodoscope( const char* name, const char* description = "",
THaApparatus* a = NULL );
virtual ~THcHodoscope();
virtual Int_t Decode( const THaEvData& );
virtual EStatus Init( const TDatime& run_time );
virtual Int_t CoarseProcess( TClonesArray& tracks );
virtual Int_t FineProcess( TClonesArray& tracks );
virtual Int_t ApplyCorrections( void );
// Int_t GetNHits() const { return fNhit; }
Int_t GetNTracks() const { return fTrackProj->GetLast()+1; }
const TClonesArray* GetTrackHits() const { return fTrackProj; }
friend class THaScCalib;
THcHodoscope(); // for ROOT I/O
protected:
// Calibration
// Per-event data
// Potential Hall C parameters. Mostly here for demonstration
Int_t fNPlanes;
Int_t* fNPaddle; // Number of paddles per plane
Double_t* fSpacing; // Paddle spacing in cm
Double_t** fCenter; // Center position of each paddle
THcScintillatorPlane** fPlanes; // List of plane objects
TClonesArray* fTrackProj; // projection of track onto scintillator plane
// and estimated match to TOF paddle
// Useful derived quantities
// double tan_angle, sin_angle, cos_angle;
// static const char NDEST = 2;
// struct DataDest {
// Int_t* nthit;
// Int_t* nahit;
// Double_t* tdc;
// Double_t* tdc_c;
// Double_t* adc;
// Double_t* adc_p;
// Double_t* adc_c;
// Double_t* offset;
// Double_t* ped;
// Double_t* gain;
// } fDataDest[NDEST]; // Lookup table for decoder
void ClearEvent();
void DeleteArrays();
virtual Int_t ReadDatabase( const TDatime& date );
virtual Int_t DefineVariables( EMode mode = kDefine );
enum ESide { kLeft = 0, kRight = 1 };
virtual Double_t TimeWalkCorrection(const Int_t& paddle,
const ESide side);
void Setup(const char* name, const char* description);
ClassDef(THcHodoscope,0) // Generic hodoscope class
};
////////////////////////////////////////////////////////////////////////////////
#endif