All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
VolumeDefinitions.cxx File Reference
#include "sbnana/SBNAna/Cuts/VolumeDefinitions.h"
#include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
#include <cmath>

Go to the source code of this file.

Functions

bool PtInVol (const caf::SRVector3DProxy &pt, const FidVol &vol)
 
bool PtInVolAbsX (const caf::SRVector3DProxy &pt, const FidVol &vol)
 

Function Documentation

bool PtInVol ( const caf::SRVector3DProxy &  pt,
const FidVol vol 
)

Definition at line 7 of file VolumeDefinitions.cxx.

8 {
9  return (vol.xmin < pt.x && pt.x < vol.xmax &&
10  vol.ymin < pt.y && pt.y < vol.ymax &&
11  vol.zmin < pt.z && pt.z < vol.zmax);
12 }
bool PtInVolAbsX ( const caf::SRVector3DProxy &  pt,
const FidVol vol 
)

Definition at line 15 of file VolumeDefinitions.cxx.

16 {
17  return (vol.xmin < fabs(pt.x) && fabs(pt.x) < vol.xmax &&
18  vol.ymin < pt.y && pt.y < vol.ymax &&
19  vol.zmin < pt.z && pt.z < vol.zmax);
20 }