Hall C ROOT/C++ Analyzer (hcana)
THcDriftChamberPlane.h
Go to the documentation of this file.
1 #ifndef ROOT_THcDriftChamberPlane
2 #define ROOT_THcDriftChamberPlane
3 
5 //
6 // THcDriftChamberPlane
7 //
8 // A Hall C scintillator plane
9 //
10 // May want to later inherit from a THcPlane class if there are similarities
11 // in what a plane is shared with other detector types (shower, etc.)
12 //
14 
15 #include "THaSubDetector.h"
16 #include "TClonesArray.h"
17 #include <cassert>
18 
19 class THaEvData;
20 class THcDCWire;
21 class THcDCHit;
23 class THcHodoscope;
24 
25 /*class THaSignalHit;*/
26 
27 class THcDriftChamberPlane : public THaSubDetector {
28 
29 public:
30  THcDriftChamberPlane( const char* name, const char* description,
31  Int_t planenum, THaDetectorBase* parent = NULL);
32  virtual ~THcDriftChamberPlane();
33 
34  virtual void Clear( Option_t* opt="" );
35  virtual Int_t Decode( const THaEvData& );
36  virtual EStatus Init( const TDatime& run_time );
37 
38  virtual Int_t CoarseProcess( TClonesArray& tracks );
39  virtual Int_t FineProcess( TClonesArray& tracks );
40  Bool_t IsTracking() { return kFALSE; }
41  virtual Bool_t IsPid() { return kFALSE; }
42 
43  virtual Int_t ProcessHits(TClonesArray* rawhits, Int_t nexthit);
44 
45  virtual Int_t SubtractStartTime();
46 
47  virtual Int_t GetReadoutSide(Int_t wirenum);
48 
49  // Get and Set functions
50  Int_t GetNWires() const { return fWires->GetLast()+1; }
52  { assert( i>=1 && i<=GetNWires() );
53  return (THcDCWire*)fWires->UncheckedAt(i-1); }
54 
55  Int_t GetNHits() const { return fHits->GetLast()+1; }
56  Int_t GetNRawhits() const {return fNRawhits; }
57  TClonesArray* GetHits() const { return fHits; }
58 
59  Int_t GetPlaneNum() const { return fPlaneNum; }
60  Int_t GetChamberNum() const { return fChamberNum; }
61  void SetPlaneIndex(Int_t index) { fPlaneIndex = index; }
63  Double_t GetXsp() const { return fXsp; }
64  Double_t GetYsp() const { return fYsp; }
65  Int_t GetReadoutX() { return fReadoutX; }
69  Double_t GetBeta() { return fBeta; }
70  Double_t GetSigma() { return fSigma; }
71  Double_t GetPsi0() { return fPsi0; }
74  THcDriftChamberPlane(); // for ROOT I/O
76  Int_t GetReadoutLR() const { return fReadoutLR;}
77  Int_t GetReadoutTB() const { return fReadoutTB;}
78  Int_t GetVersion() const {return fVersion;}
79 
82 
83 protected:
84 
86 
91 
93 
97  Int_t fPlaneIndex; /* Index of this plane within it's chamber */
115 
122 
124 
125  Double_t fNSperChan; /* TDC bin size */
126 
129 
130  virtual Int_t ReadDatabase( const TDatime& date );
131  virtual Int_t DefineVariables( EMode mode = kDefine );
132 
133  THcDCTimeToDistConv* fTTDConv; // Time-to-distance converter for this plane's wires
134 
135  THcHodoscope* fglHod; // Hodoscope to get start time
136 
137  ClassDef(THcDriftChamberPlane,0); // A single plane within a THcDriftChamber
138 };
139 #endif
140 
141 
Drift chamber wire hit info.
Definition: THcDCHit.h:16
virtual EStatus Init(const TDatime &run_time)
void SetPlaneIndex(Int_t index)
THcDCWire * GetWire(Int_t i) const
Int_t GetLast() const
const char Option_t
Class for a a single Hall C horizontal drift chamber plane.
TClonesArray * fParentHitList
virtual void Clear(Option_t *opt="")
int Int_t
bool Bool_t
ClassDef(THcDriftChamberPlane, 0)
virtual Int_t DefineVariables(EMode mode=kDefine)
Base class for algorithms to convert time into perpendicular drift distance.
TObject * UncheckedAt(Int_t i) const
Class representing a drift chamber wire.
Definition: THcDCWire.h:13
TClonesArray * GetHits() const
virtual Int_t Decode(const THaEvData &)
Int_t GetChamberNum() const
virtual Int_t GetReadoutSide(Int_t wirenum)
Double_t GetYsp() const
virtual Int_t CoarseProcess(TClonesArray &tracks)
Double_t GetXsp() const
const Bool_t kFALSE
double Double_t
virtual Int_t ProcessHits(TClonesArray *rawhits, Int_t nexthit)
Double_t CalcWireFromPos(Double_t pos)
string::size_type pos
virtual Int_t ReadDatabase(const TDatime &date)
virtual Int_t FineProcess(TClonesArray &tracks)
virtual Int_t SubtractStartTime()
TClonesArray * fFirstPassHits
Generic hodoscope consisting of multiple planes with multiple paddles with phototubes on both ends...
Definition: THcHodoscope.h:37
THcDCTimeToDistConv * fTTDConv
char name[80]