HoughLine.cxx File Reference

#include "NueAna/ParticlePID/ParticleFinder/HoughLine.h"
#include <math.h>

Go to the source code of this file.

Functions

bool operator< (const HoughLine &left, const HoughLine &right)
bool CompareChi2 (const HoughLine &l, const HoughLine &r)
bool CompareT (const HoughLine &l, const HoughLine &r)
bool CompareLength (const HoughLine &l, const HoughLine &r)
bool CompareTotalEnergy (const HoughLine &l, const HoughLine &r)
bool CompareForwardAndClusters (const HoughLine &l, const HoughLine &r)

Function Documentation

bool CompareChi2 ( const HoughLine l,
const HoughLine r 
)

Definition at line 130 of file HoughLine.cxx.

References HoughLine::chi2, and HoughLine::ncluster.

Referenced by CompareT().

00131 {
00132         return l.chi2/l.ncluster > r.chi2/r.ncluster;
00133 }       

bool CompareForwardAndClusters ( const HoughLine l,
const HoughLine r 
)

Definition at line 172 of file HoughLine.cxx.

References HoughLine::end_z, HoughLine::ncluster, and HoughLine::start_z.

Referenced by PrimaryShowerFinder::MakeHoughMap().

00173 {
00174         if(l.ncluster == r.ncluster)
00175         {
00176                 //are they the same number of planes?
00177                 if(fabs(l.end_z-l.start_z + r.start_z -r.end_z)/0.06 < 1)
00178                 {
00179                         //return the most forward one
00180                         return l.start_z>r.start_z;
00181                 }
00182                 //select the shortest one
00183                 return l.end_z-l.start_z > r.end_z-r.start_z;
00184 
00185         }
00186 
00187         return l.ncluster < r.ncluster;
00188 
00189 }

bool CompareLength ( const HoughLine l,
const HoughLine r 
)

Definition at line 151 of file HoughLine.cxx.

References CompareT(), HoughLine::end_z, and HoughLine::start_z.

Referenced by PrimaryShowerFinder::MakeHoughMap().

00152 {
00153         if(fabs(l.start_z-r.start_z)<0.0001)
00154         {
00155                 if(fabs(l.end_z-r.end_z)<0.0001)
00156                 {
00157                         return CompareT(l,r);
00158                 }
00159 
00160                 return l.end_z<r.end_z;
00161         }
00162 
00163         return l.start_z<r.start_z;
00164 
00165 }

bool CompareT ( const HoughLine l,
const HoughLine r 
)

Definition at line 136 of file HoughLine.cxx.

References CompareChi2(), HoughLine::end_t, and HoughLine::start_t.

Referenced by CompareLength().

00137 {
00138         if(fabs(l.start_t-r.start_t)<0.0001)
00139         {
00140                 if(fabs(l.end_t-r.end_t)<0.0001)
00141                 {
00142                         return CompareChi2(l,r);
00143                 }
00144                 return l.end_t<r.end_t;
00145         }
00146 
00147         return l.start_t<r.start_t;
00148 
00149 }

bool CompareTotalEnergy ( const HoughLine l,
const HoughLine r 
)

Definition at line 167 of file HoughLine.cxx.

References HoughLine::sum_e.

00168 {
00169         return l.sum_e > r.sum_e;
00170 }

bool operator< ( const HoughLine left,
const HoughLine right 
)

Definition at line 6 of file HoughLine.cxx.

00007 {
00008         if(left.ncluster < right.ncluster)return true;
00009         return false;
00010 }


Generated on 10 Oct 2018 for loon by  doxygen 1.6.1