Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaVDCPoint.h
Go to the documentation of this file.
1#ifndef Podd_THaVDCPoint_h_
2#define Podd_THaVDCPoint_h_
3
5// //
6// THaVDCPoint //
7// //
8// A pair of one U and one V VDC cluster in a given VDC chamber //
9// //
11
12#include "THaCluster.h"
13#include "THaVDCCluster.h"
14
15class THaVDCChamber;
16class THaTrack;
17
18class THaVDCPoint : public THaCluster {
19
20public:
22 THaVDCChamber* chamber );
23 virtual ~THaVDCPoint() = default;
24
25 void CalcDetCoords();
26
27 // Get and Set Functions
28 THaVDCCluster* GetUCluster() const { return fUClust; }
29 THaVDCCluster* GetVCluster() const { return fVClust; }
30 THaVDCChamber* GetChamber() const { return fChamber; }
31 THaVDCPoint* GetPartner() const { return fPartner; }
32 THaTrack* GetTrack() const { return fTrack; }
33 Double_t GetU() const;
34 Double_t GetV() const;
35 Double_t GetX() const { return fX; }
36 Double_t GetY() const { return fY; }
37 Double_t GetTheta() const { return fTheta; }
38 Double_t GetPhi() const { return fPhi; }
39 Int_t GetTrackIndex() const;
40 Double_t GetZU() const;
41 Double_t GetZV() const;
42 Double_t GetZ() const { return GetZU(); }
43 Bool_t HasPartner() const { return (fPartner != nullptr); }
44
45 void CalcChisquare(Double_t &chi2, Int_t &nhits) const;
46
47 void SetTrack( THaTrack* track);
48 void SetPartner( THaVDCPoint* partner) { fPartner = partner;}
49
50 void SetSlopes( Double_t mu, Double_t mv );
51
52protected:
53 THaVDCCluster* fUClust; // Cluster in the U plane
54 THaVDCCluster* fVClust; // Cluster in the V plane
55 THaVDCChamber* fChamber; // Chamber of this cluster pair
56 THaTrack* fTrack; // Track that this point is associated with
57 THaVDCPoint* fPartner; // Point associated with this one in
58 // the other chamber
59 // Detector system coordinates derived from fUClust and fVClust
60 // at the U plane (z = GetZ()). X,Y in m; theta, phi in tan(angle)
61 Double_t fX; // X position of point in U wire plane
62 Double_t fY; // Y position of point in U wire plane
63 Double_t fTheta; // tan(angle between z-axis and track proj onto xz plane)
64 Double_t fPhi; // tan(angle between z-axis and track proj onto yz plane)
65
66 void Set( Double_t x, Double_t y, Double_t theta, Double_t phi )
67 { fX = x; fY = y; fTheta = theta; fPhi = phi; }
68
69private:
70 // Hide copy ctor and op=
73
74 ClassDef(THaVDCPoint,0) // Pair of one U and one V cluster in a VDC chamber
75};
76
77//-------------------- inlines ------------------------------------------------
78inline
80{
81 // Return intercept of u cluster
82
83 return fUClust->GetIntercept();
84}
85
86//_____________________________________________________________________________
87inline
89{
90 // Return intercept of v cluster
91
92 return fVClust->GetIntercept();
93}
94
96
97#endif
int Int_t
bool Bool_t
double Double_t
#define ClassDef(name, id)
Double_t GetIntercept() const
Double_t GetZV() const
THaVDCCluster * GetVCluster() const
Definition THaVDCPoint.h:29
void CalcChisquare(Double_t &chi2, Int_t &nhits) const
THaVDCPoint & operator=(const THaVDCPoint &)
Double_t GetTheta() const
Definition THaVDCPoint.h:37
THaTrack * fTrack
Definition THaVDCPoint.h:56
THaVDCCluster * GetUCluster() const
Definition THaVDCPoint.h:28
Double_t GetV() const
Definition THaVDCPoint.h:88
Double_t fPhi
Definition THaVDCPoint.h:64
void SetPartner(THaVDCPoint *partner)
Definition THaVDCPoint.h:48
Double_t GetPhi() const
Definition THaVDCPoint.h:38
THaVDCPoint(const THaVDCPoint &)
void CalcDetCoords()
Double_t GetY() const
Definition THaVDCPoint.h:36
virtual ~THaVDCPoint()=default
THaVDCPoint * GetPartner() const
Definition THaVDCPoint.h:31
Double_t GetU() const
Definition THaVDCPoint.h:79
Double_t GetZU() const
THaVDCCluster * fVClust
Definition THaVDCPoint.h:54
Double_t fY
Definition THaVDCPoint.h:62
THaTrack * GetTrack() const
Definition THaVDCPoint.h:32
Double_t fX
Definition THaVDCPoint.h:61
THaVDCPoint * fPartner
Definition THaVDCPoint.h:57
THaVDCCluster * fUClust
Definition THaVDCPoint.h:53
Bool_t HasPartner() const
Definition THaVDCPoint.h:43
THaVDCChamber * GetChamber() const
Definition THaVDCPoint.h:30
void SetSlopes(Double_t mu, Double_t mv)
Double_t GetX() const
Definition THaVDCPoint.h:35
void SetTrack(THaTrack *track)
Double_t fTheta
Definition THaVDCPoint.h:63
Int_t GetTrackIndex() const
Double_t GetZ() const
Definition THaVDCPoint.h:42
THaVDCChamber * fChamber
Definition THaVDCPoint.h:55
void Set(Double_t x, Double_t y, Double_t theta, Double_t phi)
Definition THaVDCPoint.h:66
Double_t y[n]
Double_t x[n]