Jpp  19.1.0
the software that should make you happy
Public Member Functions | List of all members
JDETECTOR::JDetectorSubset_t Class Reference

Detector subset without binary search functionality. More...

#include <JDetectorSubset.hh>

Inheritance diagram for JDETECTOR::JDetectorSubset_t:
std::vector< JModule > JDETECTOR::JDetectorSubset< JComparator_t >

Public Member Functions

 JDetectorSubset_t (const JDetector &detector, const JAxis3D &track, const double Rmax=std::numeric_limits< double >::max(), const JRange< double > &Z=JRange< double >())
 Constructor. More...
 
 JDetectorSubset_t (const JDetector &detector, const JVector3D &position, const double Dmax=std::numeric_limits< double >::max())
 Constructor. More...
 

Detailed Description

Detector subset without binary search functionality.

Definition at line 38 of file JDetectorSubset.hh.

Constructor & Destructor Documentation

◆ JDetectorSubset_t() [1/2]

JDETECTOR::JDetectorSubset_t::JDetectorSubset_t ( const JDetector detector,
const JAxis3D track,
const double  Rmax = std::numeric_limits<double>::max(),
const JRange< double > &  Z = JRange<double>() 
)
inline

Constructor.

The positions and orientations of the modules and the PMTs after the transformation are relative to given particle track (see ANTARES-SOFT 2010-002). Only modules within given road width and z-axis range are accepted.

Parameters
detectordetector
trackparticle track
Rmaxmaximal distance of approach [m]
Zrange of positions along z-axis [m]

Definition at line 54 of file JDetectorSubset.hh.

58  {
59  const JTransformation3D transformation(track.getPosition(), track.getDirection());
60 
61  JModule module;
62 
63  for (JDetector::const_iterator i = detector.begin(); i != detector.end(); ++i) {
64 
65  JPosition3D pos(i->getPosition());
66 
67  pos.transform(transformation.getRotation(), transformation.getPosition());
68 
69  if (Z(pos.getZ()) && pos.getX() <= Rmax) {
70 
71  module = *i;
72 
73  module.transform(transformation);
74 
75  this->push_back(module);
76  }
77  }
78  }
Data structure for a composite optical module.
Definition: JModule.hh:75
void transform(const JRotation3D &R, const JVector3D &pos)
Transformation of geometry (see method JGEOMETRY3D::JPosition3D::transform(const JRotation3D&,...
Definition: JModule.hh:345

◆ JDetectorSubset_t() [2/2]

JDETECTOR::JDetectorSubset_t::JDetectorSubset_t ( const JDetector detector,
const JVector3D position,
const double  Dmax = std::numeric_limits<double>::max() 
)
inline

Constructor.

The positions and orientations of the modules and the PMTs are offset with respect to given position. Only modules within given distance are accepted.

Parameters
detectordetector
positionposition of vertex
Dmaxmaximal distance [m]

Definition at line 92 of file JDetectorSubset.hh.

95  {
96  for (JDetector::const_iterator i = detector.begin(); i != detector.end(); ++i) {
97 
98  JPosition3D pos(i->getPosition());
99 
100  pos.sub(position);
101 
102  if (pos.getLength() <= Dmax) {
103 
104  JModule module(*i);
105 
106  module.sub(position);
107 
108  this->push_back(module);
109  }
110  }
111  }

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