#include <EntryLengthAffCentre.h>
Public Member Functions | |
virtual void | displace (ALIdouble disp) |
virtual void | displaceOriginal (ALIdouble disp) |
virtual void | displaceOriginalOriginal (ALIdouble disp) |
EntryLengthAffCentre (const ALIstring &type) | |
virtual void | FillName (const ALIstring &name) |
virtual ALIdouble | valueDisplaced () const |
virtual ALIdouble | valueInGlobalReferenceFrame () const |
~EntryLengthAffCentre () |
Definition at line 16 of file EntryLengthAffCentre.h.
EntryLengthAffCentre::EntryLengthAffCentre | ( | const ALIstring & | type | ) |
Definition at line 14 of file EntryLengthAffCentre.cc.
: EntryLength( type ) { }
EntryLengthAffCentre::~EntryLengthAffCentre | ( | ) | [inline] |
Definition at line 20 of file EntryLengthAffCentre.h.
{};
void EntryLengthAffCentre::displace | ( | ALIdouble | disp | ) | [virtual] |
Reimplemented from Entry.
Definition at line 32 of file EntryLengthAffCentre.cc.
References gather_cfg::cout, ALIUtils::debug, OpticalObject::displaceCentreGlob(), Entry::name(), Entry::name_, Entry::OptOCurrent(), XCoor, YCoor, and ZCoor.
{ if(ALIUtils::debug>=9) std::cout << "EntryLengthAffCentre::Displace" << disp <<std::endl; ALIint namelength = name().length()-1; XYZcoor axisNo = XCoor; if ( name_[namelength] == 'X' ) { axisNo = XCoor; } else if ( name_[namelength] == 'Y' ) { axisNo = YCoor; } else if ( name_[namelength] == 'Z' ) { axisNo = ZCoor; } OptOCurrent()->displaceCentreGlob( axisNo, disp ); }
void EntryLengthAffCentre::displaceOriginal | ( | ALIdouble | disp | ) | [virtual] |
Reimplemented from Entry.
Definition at line 50 of file EntryLengthAffCentre.cc.
References gather_cfg::cout, ALIUtils::debug, OpticalObject::displaceCentreGlobOriginal(), Entry::name(), Entry::name_, Entry::OptOCurrent(), XCoor, YCoor, and ZCoor.
{ if(ALIUtils::debug>=9) std::cout << "EntryLengthAffCentre::DisplaceOriginal" << disp <<std::endl; ALIint namelength = name().length()-1; if ( name_[namelength] == 'X' ) { OptOCurrent()->displaceCentreGlobOriginal( XCoor, disp ); } else if ( name_[namelength] == 'Y' ) { OptOCurrent()->displaceCentreGlobOriginal( YCoor, disp ); } else if ( name_[namelength] == 'Z' ) { OptOCurrent()->displaceCentreGlobOriginal( ZCoor, disp ); } }
void EntryLengthAffCentre::displaceOriginalOriginal | ( | ALIdouble | disp | ) | [virtual] |
Reimplemented from Entry.
Definition at line 65 of file EntryLengthAffCentre.cc.
References gather_cfg::cout, ALIUtils::debug, OpticalObject::displaceCentreGlobOriginalOriginal(), Entry::name(), Entry::name_, Entry::OptOCurrent(), XCoor, YCoor, and ZCoor.
{ if(ALIUtils::debug>=9) std::cout << "EntryLengthAffCentre::DisplaceOriginalOriginal" << disp <<std::endl; ALIint namelength = name().length()-1; if ( name_[namelength] == 'X' ) { OptOCurrent()->displaceCentreGlobOriginalOriginal( XCoor, disp ); } else if ( name_[namelength] == 'Y' ) { OptOCurrent()->displaceCentreGlobOriginalOriginal( YCoor, disp ); } else if ( name_[namelength] == 'Z' ) { OptOCurrent()->displaceCentreGlobOriginalOriginal( ZCoor, disp ); } }
void EntryLengthAffCentre::FillName | ( | const ALIstring & | name | ) | [virtual] |
Definition at line 21 of file EntryLengthAffCentre.cc.
References Entry::name(), and Entry::setName().
ALIdouble EntryLengthAffCentre::valueDisplaced | ( | ) | const [virtual] |
Reimplemented from Entry.
Definition at line 88 of file EntryLengthAffCentre.cc.
References OpticalObject::centreGlob(), OpticalObject::centreGlobOriginal(), gather_cfg::cout, ALIUtils::debug, OpticalObject::name(), Entry::name(), Entry::OptOCurrent(), and dbtoconf::parent.
{ ALIdouble vdisp = 0.; CLHEP::Hep3Vector cdisp = OptOCurrent()->centreGlob() - OptOCurrent()->centreGlobOriginal(); CLHEP::HepRotation rmParentInv = inverseOf( OptOCurrent()->parent()->rmGlob() ); cdisp = rmParentInv * cdisp; if( name() == "centre_X" ) { return cdisp.x(); }else if( name() == "centre_Y" ) { return cdisp.y(); //- return OptOCurrent()->centreLocal().y() - value(); }else if( name() == "centre_Z" ) { return cdisp.z(); } if ( ALIUtils::debug >= 5 ) std::cout << name() << " in OptO " << OptOCurrent()->name() << " valueDisplaced: " << vdisp << std::endl; return 0.; // to avoid warning }