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

#include <SelectionDefinitions.h>

Public Member Functions

 beam_cut_TPC (bool do_angle, double xyz_cut, double cos_cut, double mean_x, double mean_y, double mean_z, double sigma_x, double sigma_y, double sigma_z, double mean_theta_x, double mean_theta_y, double mean_theta_z)
 
bool operator() (double calo_beam_startX, double calo_beam_startY, double calo_beam_startZ, double calo_beam_endX, double calo_beam_endY, double calo_beam_endZ)
 

Private Attributes

bool fDoAngle
 
double fXYZCut
 
double fCosCut
 
double fMeanX
 
double fMeanY
 
double fMeanZ
 
double fSigmaX
 
double fSigmaY
 
double fSigmaZ
 
double fMeanThetaX
 
double fMeanThetaY
 
double fMeanThetaZ
 

Detailed Description

Definition at line 522 of file SelectionDefinitions.h.

Constructor & Destructor Documentation

beam_cut_TPC::beam_cut_TPC ( bool  do_angle,
double  xyz_cut,
double  cos_cut,
double  mean_x,
double  mean_y,
double  mean_z,
double  sigma_x,
double  sigma_y,
double  sigma_z,
double  mean_theta_x,
double  mean_theta_y,
double  mean_theta_z 
)
inline

Definition at line 532 of file SelectionDefinitions.h.

536  : fDoAngle(do_angle),
537  fXYZCut(xyz_cut), fCosCut(cos_cut),
538  fMeanX(mean_x), fMeanY(mean_y), fMeanZ(mean_z),
539  fSigmaX(sigma_x), fSigmaY(sigma_y), fSigmaZ(sigma_z),
540  fMeanThetaX(mean_theta_x), fMeanThetaY(mean_theta_y),
541  fMeanThetaZ(mean_theta_z) {}

Member Function Documentation

bool beam_cut_TPC::operator() ( double  calo_beam_startX,
double  calo_beam_startY,
double  calo_beam_startZ,
double  calo_beam_endX,
double  calo_beam_endY,
double  calo_beam_endZ 
)
inline

Definition at line 543 of file SelectionDefinitions.h.

545  {
546 
547  double diffX = calo_beam_endX - calo_beam_startX;
548  double diffY = calo_beam_endY - calo_beam_startY;
549  double diffZ = calo_beam_endZ - calo_beam_startZ;
550  double r = sqrt(diffX*diffX + diffY*diffY + diffZ*diffZ);
551 
552  double cosTrk_thetaX = diffX / r;
553  double cosTrk_thetaY = diffY / r;
554  double cosTrk_thetaZ = diffZ / r;
555 
556  double cosTheta = cos(fMeanThetaX*TMath::Pi()/180.)*cosTrk_thetaX +
557  cos(fMeanThetaY*TMath::Pi()/180.)*cosTrk_thetaY +
558  cos(fMeanThetaZ*TMath::Pi()/180.)*cosTrk_thetaZ;
559 
560  if (abs((calo_beam_startX - fMeanX)/fSigmaX) > fXYZCut)
561  return false;
562 
563  if (abs((calo_beam_startY - fMeanY)/fSigmaY) > fXYZCut)
564  return false;
565 
566  if (abs((calo_beam_startZ - fMeanZ)/fSigmaZ) > fXYZCut)
567  return false;
568 
569  if (fDoAngle && (cosTheta < fCosCut))
570  return false;
571 
572  return true;
573  }
T abs(T value)

Member Data Documentation

double beam_cut_TPC::fCosCut
private

Definition at line 526 of file SelectionDefinitions.h.

bool beam_cut_TPC::fDoAngle
private

Definition at line 524 of file SelectionDefinitions.h.

double beam_cut_TPC::fMeanThetaX
private

Definition at line 529 of file SelectionDefinitions.h.

double beam_cut_TPC::fMeanThetaY
private

Definition at line 529 of file SelectionDefinitions.h.

double beam_cut_TPC::fMeanThetaZ
private

Definition at line 529 of file SelectionDefinitions.h.

double beam_cut_TPC::fMeanX
private

Definition at line 527 of file SelectionDefinitions.h.

double beam_cut_TPC::fMeanY
private

Definition at line 527 of file SelectionDefinitions.h.

double beam_cut_TPC::fMeanZ
private

Definition at line 527 of file SelectionDefinitions.h.

double beam_cut_TPC::fSigmaX
private

Definition at line 528 of file SelectionDefinitions.h.

double beam_cut_TPC::fSigmaY
private

Definition at line 528 of file SelectionDefinitions.h.

double beam_cut_TPC::fSigmaZ
private

Definition at line 528 of file SelectionDefinitions.h.

double beam_cut_TPC::fXYZCut
private

Definition at line 526 of file SelectionDefinitions.h.


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