Jpp
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 JRangeZ Z=JRangeZ())
 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 37 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 JRangeZ  Z = JRangeZ() 
)
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 53 of file JDetectorSubset.hh.

57  {
58  const JTransformation3D transformation(track.getPosition(), track.getDirection());
59 
60  JModule module;
61 
62  for (JDetector::const_iterator i = detector.begin(); i != detector.end(); ++i) {
63 
64  JPosition3D pos(i->getPosition());
65 
66  pos.transform(transformation.getRotation(), transformation.getPosition());
67 
68  if (Z(pos.getZ()) && pos.getX() <= Rmax) {
69 
70  module = *i;
71 
72  module.transform(transformation);
73 
74  this->push_back(module);
75  }
76  }
77  }

◆ 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 91 of file JDetectorSubset.hh.

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

The documentation for this class was generated from the following file:
JDETECTOR::JModule::transform
void transform(const JRotation3D &R, const JVector3D &pos)
Transformation of geometry (see method JGEOMETRY3D::JPosition3D::transform(const JRotation3D&,...
Definition: JModule.hh:261
JDETECTOR::JModule
Data structure for a composite optical module.
Definition: JModule.hh:49