CMS 3D CMS Logo

EntryLengthAffCentre Class Reference

#include <Alignment/CocoaModel/interface/EntryLengthAffCentre.h>

Inheritance diagram for EntryLengthAffCentre:

EntryLength Entry

List of all members.

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 ()


Detailed Description

Definition at line 16 of file EntryLengthAffCentre.h.


Constructor & Destructor Documentation

EntryLengthAffCentre::EntryLengthAffCentre ( const ALIstring type  ) 

Definition at line 14 of file EntryLengthAffCentre.cc.

00015   : EntryLength( type )
00016 {
00017 }

EntryLengthAffCentre::~EntryLengthAffCentre (  )  [inline]

Definition at line 20 of file EntryLengthAffCentre.h.

00020 {};


Member Function Documentation

void EntryLengthAffCentre::displace ( ALIdouble  disp  )  [virtual]

Reimplemented from Entry.

Definition at line 32 of file EntryLengthAffCentre.cc.

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

00033 {
00034   if(ALIUtils::debug>=9) std::cout << "EntryLengthAffCentre::Displace" <<  disp <<std::endl;
00035   ALIint namelength = name().length()-1;
00036   XYZcoor axisNo = XCoor;
00037   if ( name_[namelength] == 'X' ) {
00038      axisNo = XCoor;
00039   } else if ( name_[namelength] == 'Y' ) {
00040      axisNo = YCoor;
00041   } else if ( name_[namelength] == 'Z' ) {
00042      axisNo = ZCoor;
00043   }
00044   OptOCurrent()->displaceCentreGlob( axisNo, disp );
00045 
00046 }

void EntryLengthAffCentre::displaceOriginal ( ALIdouble  disp  )  [virtual]

Reimplemented from Entry.

Definition at line 50 of file EntryLengthAffCentre.cc.

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

00051 {
00052   if(ALIUtils::debug>=9) std::cout << "EntryLengthAffCentre::DisplaceOriginal" <<  disp <<std::endl;
00053   ALIint namelength = name().length()-1;
00054   if ( name_[namelength] == 'X' ) {
00055       OptOCurrent()->displaceCentreGlobOriginal( XCoor, disp );
00056   } else if ( name_[namelength] == 'Y' ) {
00057       OptOCurrent()->displaceCentreGlobOriginal( YCoor, disp );
00058   } else if ( name_[namelength] == 'Z' ) {
00059       OptOCurrent()->displaceCentreGlobOriginal( ZCoor, disp );
00060   }
00061 
00062 }

void EntryLengthAffCentre::displaceOriginalOriginal ( ALIdouble  disp  )  [virtual]

Reimplemented from Entry.

Definition at line 65 of file EntryLengthAffCentre.cc.

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

00066 {
00067   if(ALIUtils::debug>=9) std::cout << "EntryLengthAffCentre::DisplaceOriginalOriginal" <<  disp <<std::endl;
00068   ALIint namelength = name().length()-1;
00069   if ( name_[namelength] == 'X' ) {
00070       OptOCurrent()->displaceCentreGlobOriginalOriginal( XCoor, disp );
00071   } else if ( name_[namelength] == 'Y' ) {
00072       OptOCurrent()->displaceCentreGlobOriginalOriginal( YCoor, disp );
00073   } else if ( name_[namelength] == 'Z' ) {
00074       OptOCurrent()->displaceCentreGlobOriginalOriginal( ZCoor, disp );
00075   }
00076 
00077 }

void EntryLengthAffCentre::FillName ( const ALIstring name  )  [virtual]

Definition at line 21 of file EntryLengthAffCentre.cc.

References Entry::setName().

00022 {
00023   ALIstring nn = "Centre ";
00024   nn += name;
00025   setName( nn );
00026 }

ALIdouble EntryLengthAffCentre::valueDisplaced (  )  const [virtual]

Reimplemented from Entry.

Definition at line 88 of file EntryLengthAffCentre.cc.

References OpticalObject::centreGlob(), OpticalObject::centreGlobOriginal(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), OpticalObject::name(), Entry::name(), Entry::OptOCurrent(), and dbtoconf::parent.

00089 {
00090   ALIdouble vdisp = 0.;
00091 
00092   CLHEP::Hep3Vector cdisp = OptOCurrent()->centreGlob() - OptOCurrent()->centreGlobOriginal();
00093   CLHEP::HepRotation rmParentInv = inverseOf(  OptOCurrent()->parent()->rmGlob() );
00094   cdisp = rmParentInv * cdisp;
00095 
00096   if( name() == "centre_X" ) {
00097     return cdisp.x();
00098   }else if( name() == "centre_Y" ) {
00099     return cdisp.y();
00100    //-   return OptOCurrent()->centreLocal().y() - value();
00101   }else if( name() == "centre_Z" ) {
00102     return cdisp.z();
00103   }
00104 
00105   if ( ALIUtils::debug >= 5 ) std::cout << name() << " in OptO " << OptOCurrent()->name() << " valueDisplaced: " << vdisp << std::endl;
00106 
00107 }

ALIdouble EntryLengthAffCentre::valueInGlobalReferenceFrame (  )  const [virtual]

Reimplemented from Entry.

Definition at line 80 of file EntryLengthAffCentre.cc.

References a.

00081 {
00082   ALIdouble a=2.;
00083 
00084   return a;
00085 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:24 2009 for CMSSW by  doxygen 1.5.4