Hall C ROOT/C++ Analyzer (hcana)
No Matches
Go to the documentation of this file.
1#ifndef ROOT_THcDCHit
2#define ROOT_THcDCHit
5// //
6// THcDCHit //
7// //
10#include "TObject.h"
11#include "THcDCWire.h"
13#include "THcDriftChamber.h"
14#include <cstdio>
16class THcDCHit : public TObject {
19 THcDCHit( THcDCWire* wire=NULL, Int_t rawnorefcorrtime=0, Int_t rawtime=0, Double_t time=0.0,
21 fWire(wire), fRawNoRefCorrTime(rawnorefcorrtime), fRawTime(rawtime), fTime(time), fWirePlane(wp),
22 fDist(0.0), fLR(0), ftrDist(kBig),fNPlaneCluster(0) {
23 if (wire) ConvertTimeToDist();
24 fCorrected = 0;
25 }
26 virtual ~THcDCHit() {}
29 Int_t Compare ( const TObject* obj ) const;
30 Bool_t IsSortable () const { return kTRUE; }
31 virtual void Print( Option_t* opt="" ) const;
33 // Get and Set Functions
34 THcDCWire* GetWire() const { return fWire; }
35 Double_t GetWireSigma() const { return fWire->GetSigma(); }
36 Int_t GetWireNum() const { return fWire->GetNum(); }
37 Int_t GetRawTime() const { return fRawTime; }
39 Double_t GetTime() const { return fTime; }
40 Double_t GetDist() const { return fDist; }
41 Double_t GetPos() const { return fWire->GetPos(); } //Position of hit wire
42 Double_t GetCoord() const { return fCoord; }
43 Double_t GetdDist() const { return fdDist; }
48 void SetWire(THcDCWire * wire) { fWire = wire; ConvertTimeToDist(); }
49 void SetRawTime(Int_t time) { fRawTime = time; }
50 void SetTime(Double_t time) { fTime = time; }
51 void SetDist(Double_t dist) { fDist = dist; }
52 void SetLeftRight(Int_t lr) { fCoord = GetPos() + lr*fDist; fLR=lr;}
55 Int_t GetLR() { return fLR; }
56 void SetdDist(Double_t ddist) { fdDist = ddist; }
57 void SetFitDist(Double_t dist) { ftrDist = dist; }
58 Int_t GetPlaneNum() const { return fWirePlane->GetPlaneNum(); }
66 static const Double_t kBig;
68 THcDCWire* fWire; // Wire on which the hit occurred
69 Int_t fRawNoRefCorrTime; // raw TDC value (channels)
70 Int_t fRawTime; // TDC value (channels) reference time subtracted
71 Double_t fTime; // Time corrected for time offset of wire (s)
73 Double_t fDist; // (Perpendicular) Drift Distance
74 Int_t fLR; // +1/-1 which side of wire
75 Double_t fCoord; // Actual coordinate of hit
76 Double_t fdDist; // uncertainty in fDist (for chi2 calc)
77 Double_t ftrDist; // (Perpendicular) distance from the track
78 Int_t fCorrected; // Has this hit been corrected?
79 Int_t fReadoutSide; // Side where wire is read out. 1-4 is T/R/B/L from beam view for new chambers.
80 Int_t fNPlaneCluster; // Number of plane clusters hit is in.
86 THcDCHit( const THcDCHit& );
89 ClassDef(THcDCHit,2) // Drift Chamber Hit
int Int_t
uint32_t time
#define c(i)
bool Bool_t
double Double_t
const Bool_t kTRUE
const char Option_t
#define ClassDef(name, id)
Drift chamber wire hit info.
Definition THcDCHit.h:16
Int_t GetPlaneNum() const
Definition THcDCHit.h:58
Double_t GetCoord() const
Definition THcDCHit.h:42
THcDCHit & operator=(const THcDCHit &)
Double_t fTime
Definition THcDCHit.h:71
void SetWire(THcDCWire *wire)
Definition THcDCHit.h:48
virtual ~THcDCHit()
Definition THcDCHit.h:26
Int_t GetWireNum() const
Definition THcDCHit.h:36
Int_t GetLR()
Definition THcDCHit.h:55
Int_t GetReadoutSide()
Definition THcDCHit.h:63
Int_t GetRawTime() const
Definition THcDCHit.h:37
Int_t GetCorrectedStatus() const
Definition THcDCHit.h:44
THcDCHit(THcDCWire *wire=NULL, Int_t rawnorefcorrtime=0, Int_t rawtime=0, Double_t time=0.0, THcDriftChamberPlane *wp=0)
Definition THcDCHit.h:19
virtual Double_t ConvertTimeToDist()
Definition THcDCHit.cxx:36
Double_t fDist
Pointer to parent wire plane.
Definition THcDCHit.h:73
void SetDist(Double_t dist)
Definition THcDCHit.h:51
void SetLeftRight(Int_t lr)
Definition THcDCHit.h:52
virtual void Print(Option_t *opt="") const
Int_t fCorrected
Definition THcDCHit.h:78
Double_t GetdDist() const
Definition THcDCHit.h:43
Int_t GetRawNoRefCorrTime() const
Definition THcDCHit.h:38
static const Double_t kBig
Definition THcDCHit.h:66
void SetTime(Double_t time)
Definition THcDCHit.h:50
Int_t fRawNoRefCorrTime
Definition THcDCHit.h:69
void SetFitDist(Double_t dist)
Definition THcDCHit.h:57
Int_t GetNPlaneClust() const
Definition THcDCHit.h:54
THcDCWire * GetWire() const
Definition THcDCHit.h:34
THcDriftChamberPlane * fWirePlane
Definition THcDCHit.h:72
Int_t fRawTime
Definition THcDCHit.h:70
Int_t fReadoutSide
Definition THcDCHit.h:79
THcDCWire * fWire
Definition THcDCHit.h:68
Double_t GetPos() const
Definition THcDCHit.h:41
void SetCorrectedStatus(Int_t c)
Definition THcDCHit.h:61
void SetRawTime(Int_t time)
Definition THcDCHit.h:49
Double_t GetDist() const
Definition THcDCHit.h:40
Double_t ftrDist
Definition THcDCHit.h:77
THcDriftChamberPlane * GetWirePlane() const
Definition THcDCHit.h:46
Int_t Compare(const TObject *obj) const
Definition THcDCHit.cxx:56
void SetdDist(Double_t ddist)
Definition THcDCHit.h:56
Bool_t IsSortable() const
Definition THcDCHit.h:30
Double_t GetWireSigma() const
Definition THcDCHit.h:35
Int_t fNPlaneCluster
Definition THcDCHit.h:80
Int_t GetPlaneIndex() const
Definition THcDCHit.h:59
Int_t GetChamberNum() const
Definition THcDCHit.h:60
Double_t GetTime() const
Definition THcDCHit.h:39
Int_t fLR
Definition THcDCHit.h:74
THcDriftChamber * fChamber
Definition THcDCHit.h:82
Double_t fdDist
Definition THcDCHit.h:76
Double_t fCoord
Definition THcDCHit.h:75
void IncrNPlaneClust()
Definition THcDCHit.h:53
THcDCHit(const THcDCHit &)
Pointer to parent wire plane.
Class representing a drift chamber wire.
Definition THcDCWire.h:13
Double_t GetSigma() const
Definition THcDCWire.h:29
Double_t GetPos() const
Definition THcDCWire.h:27
Int_t GetReadoutSide()
Definition THcDCWire.h:30
Int_t GetNum() const
Definition THcDCWire.h:25
Class for a a single Hall C horizontal drift chamber plane.
Subdetector class for a single drift chamber with several planes.
double dist(AxisAngle const &r1, AxisAngle const &r2)