Jpp  18.2.1-ARCA-DF-PATCH
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
JACOUSTICS::JSydney::JDyneemaEditor Struct Reference

Auxiliary class to edit length of Dyneema ropes. More...

Inheritance diagram for JACOUSTICS::JSydney::JDyneemaEditor:
JFIT::JParameter_t

Public Member Functions

 JDyneemaEditor (JSetup &setup, const int id, const double z0=0.0)
 Constructor. More...
 
virtual void apply (const double step) override
 Apply step. More...
 

Private Attributes

JDetectordetector
 
double z0
 
std::vector< size_t > index
 

Detailed Description

Auxiliary class to edit length of Dyneema ropes.

Definition at line 345 of file JSydney.cc.

Constructor & Destructor Documentation

JACOUSTICS::JSydney::JDyneemaEditor::JDyneemaEditor ( JSetup setup,
const int  id,
const double  z0 = 0.0 
)
inline

Constructor.

Parameters
setupsetup
idstring number
z0reference position

Definition at line 355 of file JSydney.cc.

355  :
356  detector (setup.detector),
357  z0 (z0)
358  {
359  for (size_t i = 0; i != detector.size(); ++i) {
360  if (detector[i].getString() == id && detector[i].getFloor() != 0) {
361  index.push_back(i);
362  }
363  }
364  }
JDetector detector
detector
Definition: JSydney.cc:108
JMODEL::JString getString(const JFit &fit)
Get model parameters of string.
Detector file.
Definition: JHead.hh:226
std::vector< size_t > index
Definition: JSydney.cc:388

Member Function Documentation

virtual void JACOUSTICS::JSydney::JDyneemaEditor::apply ( const double  step)
inlineoverridevirtual

Apply step.

Parameters
stepstep

Implements JFIT::JParameter_t.

Definition at line 372 of file JSydney.cc.

373  {
374  for (const auto i : index) {
375 
376  JModule& module = detector[i];
377 
378  if (step > 0.0)
379  module.set(JVector3D(module.getX(), module.getY(), z0 + (module.getZ() - z0) * (1.0 + step)));
380  else if (step < 0.0)
381  module.set(JVector3D(module.getX(), module.getY(), z0 + (module.getZ() - z0) / (1.0 - step)));
382  }
383  }
Data structure for a composite optical module.
Definition: JModule.hh:68
Detector file.
Definition: JHead.hh:226
Data structure for vector in three dimensions.
Definition: JVector3D.hh:34
double getY() const
Get y position.
Definition: JVector3D.hh:104
double getX() const
Get x position.
Definition: JVector3D.hh:94
std::vector< size_t > index
Definition: JSydney.cc:388
JModule & set(const JVector3D &pos)
Set position.
Definition: JModule.hh:408
double getZ() const
Get z position.
Definition: JVector3D.hh:115

Member Data Documentation

JDetector& JACOUSTICS::JSydney::JDyneemaEditor::detector
private

Definition at line 386 of file JSydney.cc.

double JACOUSTICS::JSydney::JDyneemaEditor::z0
private

Definition at line 387 of file JSydney.cc.

std::vector<size_t> JACOUSTICS::JSydney::JDyneemaEditor::index
private

Definition at line 388 of file JSydney.cc.


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