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

#include <SelectionDefinitions.h>

Public Member Functions

 has_shower_dist_energy (double cut)
 
bool 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, const std::vector< double > &energy, double &x, double &y, double &z)
 

Private Attributes

double fTrackScoreCut
 

Detailed Description

Definition at line 366 of file SelectionDefinitions.h.

Constructor & Destructor Documentation

has_shower_dist_energy::has_shower_dist_energy ( double  cut)
inline

Definition at line 370 of file SelectionDefinitions.h.

Member Function Documentation

bool has_shower_dist_energy::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,
const std::vector< double > &  energy,
double &  x,
double &  y,
double &  z 
)
inline

Definition at line 372 of file SelectionDefinitions.h.

377  {
378  for(size_t i = 0; i < track_score.size(); ++i){
379  double dist = sqrt(std::pow((shower_x[i] - x), 2) +
380  std::pow((shower_y[i] - y), 2) +
381  std::pow((shower_z[i] - z), 2));
382  if ((track_score[i] < fTrackScoreCut) &&
383  (track_score[i] > 0.) &&
384  (dist > 5. && dist < 1000.) &&
385  (energy[i] > 80. && energy[i] < 1000.)) {
386  return true;
387  }
388  }
389 
390  return false;
391  }
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 has_shower_dist_energy::fTrackScoreCut
private

Definition at line 368 of file SelectionDefinitions.h.


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