WCTrack.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////
2 /// \file WCTrack.h
3 /// \brief Encapsulation of reconstructed Wire Chamber track.
4 /// Part of beamline reconstruction for NOvA test beam.
5 /// \author Mike Wallbank (University of Cincinnati) <wallbank@fnal.gov>
6 /// \date November 2018
7 ////////////////////////////////////////////////////////////////////////////
8 
9 #ifndef BRBWCTRACK_H
10 #define BRBWCTRACK_H
11 
12 // framework
13 
14 // stl
15 #include <iostream>
16 
17 // root
18 #include "TVector2.h"
19 #include "TVector3.h"
20 
21 // -----------------------------------------------------------------------
22 namespace brb {
23 
24  // -----------------------------------------------------------------------
25  class WCTrack {
26 
27  public:
28 
29  WCTrack() {}
30  WCTrack(float momentum, float y_kink, TVector3 delta_dist,
31  TVector3 mag_entry, float dist_to_mag_axis,
32  TVector2 xy_face, std::vector<TVector3> wcHits,
33  TVector3 dir, float theta, float phi, float residual);
34 
35  float Momentum() const;
36  float YKink() const;
37  TVector3 DeltaDist() const;
38  TVector3 MagnetEntryPoint() const;
39  float TransDistToMagAxis() const;
40  TVector2 XYFace() const;
41  TVector3 Dir() const;
42  float Theta() const;
43  float Phi() const;
44  float Residual() const;
45  TVector3 WCHit(unsigned int wc) const;
46 
47  int WC(size_t hit) const;
48  float HitWire(size_t hit) const;
49  float HitPosition(int wc, int wire) const;
50  size_t NHits() const;
51 
52  private:
53 
54  float fMomentum; ///< Reconstructed momentum in the XZ plane (coord system origin is at secondary target)
55  float fYKink; ///< Angle difference between upstream and downstream tracks
56  TVector3 fDeltaDist; ///< Distance between upstream and downstream track ends
57  TVector3 fMagnetEntryPoint; ///< X,Y,Z intersect of upstream WC track with front face of magnet
58  float fTransDistToMagAxis; ///< Transverse distance from WC track intercept to central axis of magnet
59  TVector2 fXYFace; ///< X and Y position of the track on the upstream face of the detector
60  std::vector<TVector3> fWCHit; ///< Hits on each chamber used to make the track
61  TVector3 fDir; ///< Unit vector describing direction
62  float fTheta; ///< Theta defined from the Z axis
63  float fPhi; ///< Phi defined counterclockwise from the X axis
64  float fResidual; ///< Returns the goodness of fit to a linear regression for points used in track.
65 
66  // These are indexed by hit: each hit is represented by the same index in all three.
67  std::vector<int> fWC; ///< Defined from 1 to 4, like the Wire Chambers
68  std::vector<float> fHitWire;
69  float fHitPosition[4][3]; ///< WC is first index, dimension (x,y,z) as the second index. A [4][3] object.
70 
71  };
72 
73 } // namespace
74 
75 #endif
float HitPosition(int wc, int wire) const
Definition: WCTrack.cxx:100
TVector3 fDeltaDist
Distance between upstream and downstream track ends.
Definition: WCTrack.h:56
float fTheta
Theta defined from the Z axis.
Definition: WCTrack.h:62
size_t NHits() const
Definition: WCTrack.cxx:105
TVector3 MagnetEntryPoint() const
Definition: WCTrack.cxx:45
float Phi() const
Definition: WCTrack.cxx:80
float YKink() const
Definition: WCTrack.cxx:35
std::vector< TVector3 > fWCHit
Hits on each chamber used to make the track.
Definition: WCTrack.h:60
TVector3 DeltaDist() const
Definition: WCTrack.cxx:40
float HitWire(size_t hit) const
Definition: WCTrack.cxx:95
std::vector< int > fWC
Defined from 1 to 4, like the Wire Chambers.
Definition: WCTrack.h:67
int WC(size_t hit) const
Definition: WCTrack.cxx:90
float fPhi
Phi defined counterclockwise from the X axis.
Definition: WCTrack.h:63
TVector3 Dir() const
Definition: WCTrack.cxx:60
float TransDistToMagAxis() const
Definition: WCTrack.cxx:50
float Residual() const
Definition: WCTrack.cxx:85
float fMomentum
Reconstructed momentum in the XZ plane (coord system origin is at secondary target) ...
Definition: WCTrack.h:54
TVector2 XYFace() const
Definition: WCTrack.cxx:55
float fResidual
Returns the goodness of fit to a linear regression for points used in track.
Definition: WCTrack.h:64
float fHitPosition[4][3]
WC is first index, dimension (x,y,z) as the second index. A [4][3] object.
Definition: WCTrack.h:69
TDirectory * dir
Definition: macro.C:5
TVector3 fDir
Unit vector describing direction.
Definition: WCTrack.h:61
Definition: structs.h:12
float fYKink
Angle difference between upstream and downstream tracks.
Definition: WCTrack.h:55
float fTransDistToMagAxis
Transverse distance from WC track intercept to central axis of magnet.
Definition: WCTrack.h:58
float Momentum() const
Definition: WCTrack.cxx:30
TVector2 fXYFace
X and Y position of the track on the upstream face of the detector.
Definition: WCTrack.h:59
std::vector< float > fHitWire
Definition: WCTrack.h:68
TVector3 WCHit(unsigned int wc) const
Definition: WCTrack.cxx:65
float Theta() const
Definition: WCTrack.cxx:75
TVector3 fMagnetEntryPoint
X,Y,Z intersect of upstream WC track with front face of magnet.
Definition: WCTrack.h:57