Public Member Functions | Private Attributes | List of all members
shower_dists Class Reference

#include <SelectionDefinitions.h>

Public Member Functions

 shower_dists (double cut)
 
std::vector< double > operator() (const std::vector< double > &track_score, const std::vector< double > &shower_x, const std::vector< double > &shower_y, const std::vector< double > &shower_z, double &x, double &y, double &z)
 

Private Attributes

double fTrackScoreCut
 

Detailed Description

Definition at line 336 of file SelectionDefinitions.h.

Constructor & Destructor Documentation

shower_dists::shower_dists ( double  cut)
inline

Definition at line 340 of file SelectionDefinitions.h.

341  : fTrackScoreCut(cut) {}

Member Function Documentation

std::vector<double> shower_dists::operator() ( const std::vector< double > &  track_score,
const std::vector< double > &  shower_x,
const std::vector< double > &  shower_y,
const std::vector< double > &  shower_z,
double &  x,
double &  y,
double &  z 
)
inline

Definition at line 342 of file SelectionDefinitions.h.

346  {
347  std::vector<double> results;
348  for(size_t i = 0; i < track_score.size(); ++i){
349  if ((track_score[i] < fTrackScoreCut) &&
350  (track_score[i] > 0.)) {
351  double dist = sqrt(std::pow((shower_x[i] - x), 2) +
352  std::pow((shower_y[i] - y), 2) +
353  std::pow((shower_z[i] - z), 2));
354  results.push_back(dist);
355  }
356  else {
357  results.push_back(-999.);
358  }
359  }
360 
361  return results;
362  }
constexpr T pow(T x)
Definition: pow.h:72
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
list x
Definition: train.py:276

Member Data Documentation

double shower_dists::fTrackScoreCut
private

Definition at line 338 of file SelectionDefinitions.h.


The documentation for this class was generated from the following file: