Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcDCTrack.cxx
Go to the documentation of this file.
1
8#include "THcDCHit.h"
9#include "THcDCTrack.h"
10#include "THcSpacePoint.h"
11THcDCTrack::THcDCTrack(Int_t nplanes) : fnSP(0), fNHits(0)
12{
13 fHits.clear();
14 fCoords.resize(nplanes);
15 fResiduals.resize(nplanes);
16 fResidualsExclPlane.resize(nplanes);
17 fDoubleResiduals.resize(nplanes);
18}
19
21{
25 Hit newhit;
26 newhit.dchit = hit;
27 newhit.distCorr = dist;
28 newhit.lr = lr;
29 fHits.push_back(newhit);
30 fNHits++;
31}
32void THcDCTrack::RemoveHit(Int_t RemoveHitIndex)
33{
34 for (Int_t ih=RemoveHitIndex;ih<fNHits-1;ih++) {
35 fHits[ih] = fHits[ih+1];
36 }
37 fNHits = fNHits -1;
38 fHits.resize(fNHits);
39}
41{
47 if (fnSP <10) {
48 fSp[fnSP++] = sp;
49 // Copy all the hits from the space point into the track
50 // Will need to also copy the corrected distance and lr information
51 for(Int_t ihit=0;ihit<sp->GetNHits();ihit++) {
52 AddHit(sp->GetHit(ihit),sp->GetHitDist(ihit),sp->GetHitLR(ihit));
53 }
54 }
55}
56
58{
62 fnSP = 0;
63 fSp1_ID=-1;
64 fSp2_ID=-1;
65 ClearHits();
66 // Need to set default values (0 or -100)
67 //fCoords.clear();
68 //fResiduals.clear();
69 //fDoubleResiduals.clear();
70}
72{
73 fNHits = 0;
74 fHits.clear();
75}
76
78
79
int Int_t
double Double_t
const char Option_t
ClassImp(VDC::AnalyticTTDConv) using namespace std
Drift chamber wire hit info.
Definition THcDCHit.h:16
Class representing a track found from linking DC Space points.
Definition THcDCTrack.h:19
virtual void AddHit(THcDCHit *hit, Double_t dist, Int_t lr)
Int_t fSp1_ID
Definition THcDCTrack.h:70
std::vector< Double_t > fResiduals
Definition THcDCTrack.h:84
std::vector< Double_t > fResidualsExclPlane
Definition THcDCTrack.h:85
virtual void RemoveHit(Int_t RemoveHitIndex)
Int_t fNHits
Definition THcDCTrack.h:72
virtual void AddSpacePoint(THcSpacePoint *sp)
std::vector< Hit > fHits
Definition THcDCTrack.h:81
THcSpacePoint * fSp[10]
Definition THcDCTrack.h:69
std::vector< Double_t > fDoubleResiduals
Definition THcDCTrack.h:86
Int_t fnSP
Definition THcDCTrack.h:68
virtual void ClearHits()
Int_t fSp2_ID
Definition THcDCTrack.h:71
THcDCTrack(Int_t nplanes)
virtual void Clear(Option_t *opt="")
std::vector< Double_t > fCoords
Definition THcDCTrack.h:83
Class representing a single hit DC.
Int_t GetHitLR(Int_t ihit)
THcDCHit * GetHit(Int_t ihit)
Double_t GetHitDist(Int_t ihit)
double dist(AxisAngle const &r1, AxisAngle const &r2)
THcDCHit * dchit
Definition THcDCTrack.h:77
Double_t distCorr
Definition THcDCTrack.h:78