CMS 3D CMS Logo

List of all members | Public Member Functions
EntryLengthAffCentre Class Reference

#include <EntryLengthAffCentre.h>

Inheritance diagram for EntryLengthAffCentre:
EntryLength Entry

Public Member Functions

void displace (ALIdouble disp) override
 
void displaceOriginal (ALIdouble disp) override
 
void displaceOriginalOriginal (ALIdouble disp) override
 
 EntryLengthAffCentre (const ALIstring &type)
 
virtual void FillName (const ALIstring &name)
 
ALIdouble valueDisplaced () const override
 
ALIdouble valueInGlobalReferenceFrame () const override
 
 ~EntryLengthAffCentre () override
 
- Public Member Functions inherited from EntryLength
 EntryLength (const ALIstring &type)
 
ALIdouble OutputSigmaDimensionFactor () const override
 
ALIdouble OutputValueDimensionFactor () const override
 
ALIdouble SigmaDimensionFactor () const override
 
ALIdouble startingDisplacement () override
 
ALIdouble ValueDimensionFactor () const override
 
 ~EntryLength () override
 
- Public Member Functions inherited from Entry
void addFittedDisplacementToValue (const ALIdouble val)
 
 Entry (const ALIstring &type)
 
void fill (const std::vector< ALIstring > &wordlist)
 
virtual void fillName (const ALIstring &name)
 
void fillNull ()
 
ALIint fitPos () const
 
EntryDim getDimType () const
 
ALIdouble lastAdditionToValueDisplacementByFitting () const
 
const ALIstring longName () const
 
const ALIstringname () const
 
OpticalObjectOptOCurrent () const
 
ALIint quality () const
 
void resetValueDisplacementByFitting ()
 
void setFitPos (const ALIint fitpos)
 
void setLastAdditionToValueDisplacementByFitting (const ALIdouble val)
 
void setName (const ALIstring &name)
 
void setOptOCurrent (OpticalObject *opto)
 
void setQuality (ALIuint qual)
 
void setSigma (ALIdouble sig)
 
void setType (ALIstring type)
 
void setValue (ALIdouble val)
 
ALIdouble sigma () const
 
ALIdouble sigmaOriginalOriginal () const
 
void substractToHalfFittedDisplacementToValue ()
 
const ALIstringtype () const
 
ALIdouble value () const
 
ALIdouble valueDisplacementByFitting () const
 
ALIdouble valueOriginalOriginal () const
 
virtual ~Entry ()
 

Additional Inherited Members

- Protected Attributes inherited from Entry
ALIint fitPos_
 
ALIdouble lastAdditionToValueDisplacementByFitting_
 
ALIstring name_
 
OpticalObjectOptOCurrent_
 
ALIuint quality_
 
ALIdouble sigma_
 
ALIdouble sigmaOriginalOriginal_
 
EntryDim theDimType
 
ALIstring type_
 
ALIdouble value_
 
ALIdouble valueDisplacementByFitting_
 
ALIdouble valueOriginalOriginal_
 

Detailed Description

Definition at line 15 of file EntryLengthAffCentre.h.

Constructor & Destructor Documentation

◆ EntryLengthAffCentre()

EntryLengthAffCentre::EntryLengthAffCentre ( const ALIstring type)

Definition at line 13 of file EntryLengthAffCentre.cc.

13 : EntryLength(type) {}
EntryLength(const ALIstring &type)
Definition: EntryLength.h:19

◆ ~EntryLengthAffCentre()

EntryLengthAffCentre::~EntryLengthAffCentre ( )
inlineoverride

Definition at line 18 of file EntryLengthAffCentre.h.

18 {};

Member Function Documentation

◆ displace()

void EntryLengthAffCentre::displace ( ALIdouble  disp)
overridevirtual

Reimplemented from Entry.

Definition at line 25 of file EntryLengthAffCentre.cc.

References gather_cfg::cout, ALIUtils::debug, OpticalObject::displaceCentreGlob(), Entry::name(), Entry::name_, Entry::OptOCurrent(), XCoor, YCoor, and ZCoor.

25  {
26  if (ALIUtils::debug >= 9)
27  std::cout << "EntryLengthAffCentre::Displace" << disp << std::endl;
28  ALIint namelength = name().length() - 1;
29  XYZcoor axisNo = XCoor;
30  if (name_[namelength] == 'X') {
31  axisNo = XCoor;
32  } else if (name_[namelength] == 'Y') {
33  axisNo = YCoor;
34  } else if (name_[namelength] == 'Z') {
35  axisNo = ZCoor;
36  }
37  OptOCurrent()->displaceCentreGlob(axisNo, disp);
38 }
const ALIstring & name() const
Definition: Entry.h:50
int ALIint
Definition: CocoaGlobals.h:15
static ALIint debug
Definition: ALIUtils.h:34
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
XYZcoor
Definition: OpticalObject.h:33
void displaceCentreGlob(const XYZcoor coor, const ALIdouble disp)
ALIstring name_
Definition: Entry.h:102

◆ displaceOriginal()

void EntryLengthAffCentre::displaceOriginal ( ALIdouble  disp)
overridevirtual

Reimplemented from Entry.

Definition at line 41 of file EntryLengthAffCentre.cc.

References gather_cfg::cout, ALIUtils::debug, OpticalObject::displaceCentreGlobOriginal(), Entry::name(), Entry::name_, Entry::OptOCurrent(), XCoor, YCoor, and ZCoor.

41  {
42  if (ALIUtils::debug >= 9)
43  std::cout << "EntryLengthAffCentre::DisplaceOriginal" << disp << std::endl;
44  ALIint namelength = name().length() - 1;
45  if (name_[namelength] == 'X') {
47  } else if (name_[namelength] == 'Y') {
49  } else if (name_[namelength] == 'Z') {
51  }
52 }
const ALIstring & name() const
Definition: Entry.h:50
void displaceCentreGlobOriginal(const XYZcoor coor, const ALIdouble disp)
int ALIint
Definition: CocoaGlobals.h:15
static ALIint debug
Definition: ALIUtils.h:34
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
ALIstring name_
Definition: Entry.h:102

◆ displaceOriginalOriginal()

void EntryLengthAffCentre::displaceOriginalOriginal ( ALIdouble  disp)
overridevirtual

Reimplemented from Entry.

Definition at line 55 of file EntryLengthAffCentre.cc.

References gather_cfg::cout, ALIUtils::debug, OpticalObject::displaceCentreGlobOriginalOriginal(), Entry::name(), Entry::name_, Entry::OptOCurrent(), XCoor, YCoor, and ZCoor.

55  {
56  if (ALIUtils::debug >= 9)
57  std::cout << "EntryLengthAffCentre::DisplaceOriginalOriginal" << disp << std::endl;
58  ALIint namelength = name().length() - 1;
59  if (name_[namelength] == 'X') {
61  } else if (name_[namelength] == 'Y') {
63  } else if (name_[namelength] == 'Z') {
65  }
66 }
const ALIstring & name() const
Definition: Entry.h:50
int ALIint
Definition: CocoaGlobals.h:15
static ALIint debug
Definition: ALIUtils.h:34
void displaceCentreGlobOriginalOriginal(const XYZcoor coor, const ALIdouble disp)
OpticalObject * OptOCurrent() const
Definition: Entry.h:59
ALIstring name_
Definition: Entry.h:102

◆ FillName()

void EntryLengthAffCentre::FillName ( const ALIstring name)
virtual

Definition at line 16 of file EntryLengthAffCentre.cc.

References Entry::name(), groupFilesInBlocks::nn, and Entry::setName().

16  {
17  ALIstring nn = "Centre ";
18  nn += name;
19  setName(nn);
20 }
const ALIstring & name() const
Definition: Entry.h:50
void setName(const ALIstring &name)
Definition: Entry.h:76
std::string ALIstring
Definition: CocoaGlobals.h:9

◆ valueDisplaced()

ALIdouble EntryLengthAffCentre::valueDisplaced ( ) const
overridevirtual

Reimplemented from Entry.

Definition at line 76 of file EntryLengthAffCentre.cc.

References OpticalObject::centreGlob(), OpticalObject::centreGlobOriginal(), gather_cfg::cout, ALIUtils::debug, Entry::name(), OpticalObject::name(), Entry::OptOCurrent(), and class-composition::parent.

76  {
77  ALIdouble vdisp = 0.;
78 
79  CLHEP::Hep3Vector cdisp = OptOCurrent()->centreGlob() - OptOCurrent()->centreGlobOriginal();
80  CLHEP::HepRotation rmParentInv = inverseOf(OptOCurrent()->parent()->rmGlob());
81  cdisp = rmParentInv * cdisp;
82 
83  if (name() == "centre_X") {
84  return cdisp.x();
85  } else if (name() == "centre_Y") {
86  return cdisp.y();
87  //- return OptOCurrent()->centreLocal().y() - value();
88  } else if (name() == "centre_Z") {
89  return cdisp.z();
90  }
91 
92  if (ALIUtils::debug >= 5)
93  std::cout << name() << " in OptO " << OptOCurrent()->name() << " valueDisplaced: " << vdisp << std::endl;
94 
95  return 0.; // to avoid warning
96 }
const CLHEP::Hep3Vector & centreGlob() const
Definition: OpticalObject.h:75
long double ALIdouble
Definition: CocoaGlobals.h:11
const ALIstring & name() const
Definition: Entry.h:50
const CLHEP::Hep3Vector & centreGlobOriginal() const
Definition: OpticalObject.h:81
static ALIint debug
Definition: ALIUtils.h:34
const ALIstring & name() const
Definition: OpticalObject.h:58
OpticalObject * OptOCurrent() const
Definition: Entry.h:59

◆ valueInGlobalReferenceFrame()

ALIdouble EntryLengthAffCentre::valueInGlobalReferenceFrame ( ) const
overridevirtual

Reimplemented from Entry.

Definition at line 69 of file EntryLengthAffCentre.cc.

References a.

69  {
70  ALIdouble a = 2.;
71 
72  return a;
73 }
long double ALIdouble
Definition: CocoaGlobals.h:11
double a
Definition: hdecay.h:119