MEClusters.cxx
Go to the documentation of this file.
1 #include "MEFinder/MEClusters.h"
2 #include "Utilities/func/MathUtil.h"
3 
4 // Functions for SlcME
5 me::SlcME::SlcME() : rb::Cluster() {}
7 
8 double me::SlcME::MID() const
9 { return fMID; }
10 double me::SlcME::DeltaT() const
11 { return fDeltaT; }
12 double me::SlcME::DistToSlc() const
13 { return fDistToSlc; }
14 
16 { return fParentSlc; }
17 
18 void me::SlcME::SetMID (double mid)
19 { fMID = mid; }
20 void me::SlcME::SetDeltaT (double deltaT)
21 { fDeltaT = deltaT; }
22 void me::SlcME::SetDistToSlc (double distToSlc)
23 { fDistToSlc = distToSlc; }
24 
25 // Return associated cluster
27 { fParentSlc = slc; }
28 
29 // Functions for TrkME
33 { return fParentTrk; }
34 double me::TrkME::DistToTrk() const {
35  TVector3 trkEnd = fParentTrk->Stop();
36  double deltaX = ( (this->NXCell() == 0) ? 0 : this->MeanX() - trkEnd.X() );
37  double deltaY = ( (this->NYCell() == 0) ? 0 : this->MeanY() - trkEnd.Y() );
38  double deltaZ = this->MeanZ() - trkEnd.Z();
39 
40  return util::pythag( deltaX, deltaY, deltaZ );
41 }
42 
43 // Return associated trk
45 { fParentTrk = trk; }
void SetParentSlc(art::Ptr< rb::Cluster >)
Definition: MEClusters.cxx:26
double DistToSlc() const
Definition: MEClusters.cxx:12
void SetDistToSlc(double)
Definition: MEClusters.cxx:22
art::Ptr< rb::Cluster > ParentSlc() const
Definition: MEClusters.cxx:15
double MeanZ(rb::AveragingScheme scheme=kDefaultScheme) const
Definition: Cluster.h:233
art::Ptr< rb::Track > ParentTrk() const
Definition: MEClusters.cxx:32
double MeanX(rb::AveragingScheme scheme=kDefaultScheme) const
Definition: Cluster.h:231
void SetDeltaT(double)
Definition: MEClusters.cxx:20
Track finder for cosmic rays.
double DeltaT() const
Definition: MEClusters.cxx:10
Definition: NueSkimmer.h:24
double MeanY(rb::AveragingScheme scheme=kDefaultScheme) const
Definition: Cluster.h:232
double fDeltaT
Definition: MEClusters.h:28
double MID() const
Definition: MEClusters.cxx:8
void SetMID(double)
Definition: MEClusters.cxx:18
Perform a "2 point" Hough transform on a collection of hits.
unsigned int NYCell() const
Number of cells in the y-view.
Definition: Cluster.h:108
double fDistToSlc
Definition: MEClusters.h:29
double fMID
Definition: MEClusters.h:27
void SetParentTrk(art::Ptr< rb::Track >)
Definition: MEClusters.cxx:44
double pythag(double x, double y)
2D Euclidean distance
Definition: MathUtil.h:29
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
art::Ptr< rb::Track > fParentTrk
Definition: MEClusters.h:46
TVector3 Stop() const
Position of the final trajectory point.
Definition: Track.cxx:186
double DistToTrk() const
Definition: MEClusters.cxx:34
art::Ptr< rb::Cluster > fParentSlc
Definition: MEClusters.h:30