CMS 3D CMS Logo

OpticalObject Class Reference

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

Inheritance diagram for OpticalObject:

OptOCameraDetector OptOCOPS OptOCubeSplitter OptODistancemeter OptODistancemeter3dim OptOLaser OptOLens OptOMirror OptOModifiedRhomboidPrism OptOOpticalSquare OptOPinhole OptOPlateSplitter OptORisleyPrism OptOScreen OptOSensor2D OptOSource OptOTiltmeter OptOUserDefined OptOXLaser

List of all members.

Public Member Functions

void addCoordinateEntryToList (Entry *entry)
void addExtraEntryToList (Entry *entry)
void addExtraEntryValueOriginalOriginalToList (ALIdouble entry_value)
void addExtraEntryValueOriginalToList (ALIdouble entry_value)
void addExtraEntryValueToList (ALIdouble entry_value)
double addPii (double val)
double approxTo0 (double val)
HepRotation buildRmFromEntryValuesOriginalOriginal ()
const Hep3Vector & centreGlob () const
const Hep3Vector & centreGlobal () const
const Hep3Vector & centreGlobOriginal () const
const Hep3Vector & centreGlobOriginalOriginal () const
const Hep3Vector centreLocal () const
int checkMatrixEquations (double angleX, double angleY, double angleZ, HepRotation *rot=0)
const uint32_t cmsSwID () const
void construct ()
void constructFromOptAligInfo (const OpticalAlignInfo &oaInfo)
virtual void constructMaterial ()
virtual void constructSolidShape ()
const std::vector< Entry * > & CoordinateEntryList () const
void createComponentOptOsFromOptAlignInfo ()
virtual void defaultBehaviour (LightRay &lightray, Measurement &meas)
virtual void detailedDeviatesLightRay (LightRay &lightray)
virtual void detailedTraversesLightRay (LightRay &lightray)
double diff2pi (double ang1, double ang2)
void displaceCentreGlob (const Hep3Vector &dispVec)
void displaceCentreGlob (const XYZcoor coor, const ALIdouble disp)
void displaceCentreGlobOriginal (const Hep3Vector &dispVec)
void displaceCentreGlobOriginal (const XYZcoor coor, const ALIdouble disp)
void displaceCentreGlobOriginalOriginal (const Hep3Vector &dispVec)
void displaceCentreGlobOriginalOriginal (const XYZcoor coor, const ALIdouble disp)
void displaceExtraEntry (const ALIuint entryNo, const ALIdouble disp)
void displaceExtraEntryOriginal (const ALIuint entryNo, const ALIdouble disp)
void displaceExtraEntryOriginalOriginal (const ALIuint entryNo, const ALIdouble disp)
void displaceRmGlobAroundGlobal (OpticalObject *opto1stRotated, const XYZcoor coor, const ALIdouble disp)
void displaceRmGlobAroundLocal (OpticalObject *opto1stRotated, const XYZcoor coor, const ALIdouble disp)
void displaceRmGlobOriginal (const OpticalObject *opto1stRotated, const XYZcoor coor, const ALIdouble disp)
void displaceRmGlobOriginalOriginal (const OpticalObject *opto1stRotated, const XYZcoor coor, const ALIdouble disp)
bool eq2ang (double ang1, double ang2)
const std::vector< Entry * > & ExtraEntryList () const
const ALIint extraEntryNo (const ALIstring &entry_name) const
std::vector< ALIdouble > & ExtraEntryValueList ()
const std::vector< ALIdouble > & ExtraEntryValueOriginalList ()
const std::vector< ALIdouble > & ExtraEntryValueOriginalOriginalList ()
virtual void fastDeviatesLightRay (LightRay &lightray)
virtual void fastTraversesLightRay (LightRay &lightray)
virtual void fillIguana ()
virtual void fillVRML ()
const ALIdouble findExtraEntryValue (const ALIstring &eename) const
const ALIbool findExtraEntryValueIfExists (const ALIstring &eename, ALIdouble &value) const
const ALIdouble findExtraEntryValueMustExist (const ALIstring &eename) const
std::vector< ALIstringgetCoordinateFromOptAlignParam (const OpticalAlignParam &oaParam)
Hep3Vector getDisplacementInLocalCoordinates (const XYZcoor coor, const ALIdouble disp)
const double getEntryCentre (const ALIstring &coor) const
const double getEntryCentre (const XYZcoor coor) const
const double getEntryRMangle (const ALIstring &coor) const
const double getEntryRMangle (const XYZcoor coor) const
std::vector< double > getLocalRotationAngles (std::vector< Entry * > entries) const
CocoaMaterialElementarygetMaterial () const
ALIPlane getPlate (const ALIbool forwardPlate, const ALIbool applyWedge)
std::vector< double > getRotationAnglesFromMatrix (HepRotation &rmLocal, std::vector< Entry * > entries) const
std::vector< double > getRotationAnglesInOptOFrame (const OpticalObject *optoAncestor, std::vector< Entry * > entries) const
CocoaSolidShapegetSolidShape () const
Hep3Vector getZAxis ()
const uint32_t ID () const
const ALIstring longName () const
virtual void makeMeasurement (LightRay &lightray, Measurement &meas)
Measurementmeas ()
const ALIstringname () const
 OpticalObject (OpticalObject *parent, const ALIstring &type, const ALIstring &name, const ALIbool copy_data)
 OpticalObject ()
const OpticalObjectparent () const
virtual void participateInMeasurement (LightRay &lightray, Measurement &meas, const ALIstring &behav)
void propagateGlobalRMOriginalOriginalChangeToChildren (const HepRotation &rmorioriold, const HepRotation &rmoriorinew)
void resetGlobalCoordinates ()
void resetOriginalOriginalCoordinates ()
const HepRotation & rmGlob () const
const HepRotation & rmGlobOriginal () const
const HepRotation & rmGlobOriginalOriginal () const
const HepRotation rmLocal () const
void setCmsSwID (uint32_t id)
void setExtraEntryValue (const ALIuint entryNo, const ALIdouble disp)
void setGlobalCoordinates ()
void setGlobalRMOriginalOriginal (const HepRotation &rmoriori)
void setID (uint32_t id)
void setMeas (Measurement *meas)
 set current measurement
void setOriginalEntryValues ()
void setRmGlobal (const HepRotation &rm)
void setRmGlobalOriginal (const HepRotation &rm)
void setType (const ALIstring &type)
const ALIstring shortName () const
const ALIstringtype () const
virtual void userDefinedBehaviour (LightRay &lightray, Measurement &meas, const ALIstring &behav)
virtual ~OpticalObject ()

Protected Member Functions

virtual void fillExtraEntry (std::vector< ALIstring > &wordlist)

Protected Attributes

CocoaMaterialElementarytheMaterial
CocoaSolidShapetheSolidShape
ALIint verbose

Private Member Functions

void buildWordList (const Entry *entry, std::vector< ALIstring > &wordlist)
void calculateLocalRotationAxisInGlobal ()
void copyData ()
void createComponentOptOs (ALIFileIn &filein)
OpticalObjectcreateNewOptO (OpticalObject *parent, ALIstring optoType, ALIstring optoName, ALIbool fcopyComponents)
void fillCoordinateEntry (const ALIstring &coor_name, const std::vector< ALIstring > &wordlist)
Hep3Vector getDispVec (const XYZcoor coor, const ALIdouble disp)
void readCoordinates (const ALIstring &coor_type_read, const ALIstring &coor_type_expected, ALIFileIn &filein)
void readData (ALIFileIn &filein)
void readExtraEntries (ALIFileIn &filein)
template<class T>
void rotateItAroundGlobal (T &object, const XYZcoor coor, const double disp)
void SetAnglesIsGlobal (ALIbool isG)
void setAnglesNull ()
void SetCentreGlobFromCentreLocal ()
void SetCentreIsGlobal (ALIbool isG)
void SetCentreLocalFromEntryValues ()
void setGlobalCentre ()
void setGlobalCoordinatesOfComponents ()
void setGlobalRM ()
void SetRMGlobFromRMLocal ()
void SetRMGlobFromRMLocalOriginalOriginal (HepRotation rmoriori)
void SetRMLocalFromEntryValues ()
void transformCylindrical2Cartesian ()
void transformGlobal2Local ()
void transformSpherical2Cartesian ()

Private Attributes

ALIbool anglesIsGlobal
Hep3Vector axisXLocalInGlobal
Hep3Vector axisYLocalInGlobal
Hep3Vector axisZLocalInGlobal
ALIbool centreIsGlobal
ALIbool fcopyData
Hep3Vector theCentreGlob
Hep3Vector theCentreGlobOriginal
Hep3Vector theCentreGlobOriginalOriginal
uint32_t theCmsSwID
std::vector< Entry * > theCoordinateEntryVector
MeasurementtheCurrentMeas
std::vector< ALIdoubletheExtraEntryValueOriginalOriginalVector
std::vector< ALIdoubletheExtraEntryValueOriginalVector
std::vector< ALIdoubletheExtraEntryValueVector
std::vector< Entry * > theExtraEntryVector
ALIstring theName
OpticalObjecttheParent
HepRotation theRmGlob
HepRotation theRmGlobOriginal
HepRotation theRmGlobOriginalOriginal
ALIstring theType

Friends

std::ostream & operator<< (std::ostream &os, const OpticalObject &c)


Detailed Description

Definition at line 35 of file OpticalObject.h.


Constructor & Destructor Documentation

OpticalObject::OpticalObject (  )  [inline]

Definition at line 41 of file OpticalObject.h.

00041 { };

OpticalObject::OpticalObject ( OpticalObject parent,
const ALIstring type,
const ALIstring name,
const ALIbool  copy_data 
)

Definition at line 53 of file OpticalObject.cc.

References GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), fcopyData, OpticalObjectMgr::getInstance(), OpticalObjectMgr::registerMe(), theName, and theType.

00053                                                                                                                            :theParent(parent), theType(type), theName(name), fcopyData( copy_data)
00054 {
00055   if ( ALIUtils::debug >= 4 ) {
00056     std::cout << std::endl << "@@@@ Creating OpticalObject: NAME= " << theName << " TYPE= " <<theType << " fcopyData " <<fcopyData <<std::endl;
00057   }
00058 
00059   OpticalObjectMgr::getInstance()->registerMe( this );
00060 }

OpticalObject::~OpticalObject (  )  [virtual]

Definition at line 1702 of file OpticalObject.cc.

01702 {
01703 }
01704 


Member Function Documentation

void OpticalObject::addCoordinateEntryToList ( Entry entry  )  [inline]

Definition at line 139 of file OpticalObject.h.

References theCoordinateEntryVector.

Referenced by fillCoordinateEntry(), and setAnglesNull().

00139                                                 {
00140      theCoordinateEntryVector.push_back( entry );
00141   }

void OpticalObject::addExtraEntryToList ( Entry entry  )  [inline]

Definition at line 142 of file OpticalObject.h.

References theExtraEntryVector.

Referenced by fillExtraEntry().

00142                                            {
00143      theExtraEntryVector.push_back( entry );
00144   }

void OpticalObject::addExtraEntryValueOriginalOriginalToList ( ALIdouble  entry_value  )  [inline]

Definition at line 151 of file OpticalObject.h.

References theExtraEntryValueOriginalOriginalVector.

Referenced by setOriginalEntryValues().

00151                                                                          {
00152      theExtraEntryValueOriginalOriginalVector.push_back( entry_value );
00153   }

void OpticalObject::addExtraEntryValueOriginalToList ( ALIdouble  entry_value  )  [inline]

Definition at line 148 of file OpticalObject.h.

References theExtraEntryValueOriginalVector.

Referenced by setOriginalEntryValues().

00148                                                                  {
00149      theExtraEntryValueOriginalVector.push_back( entry_value );
00150   }

void OpticalObject::addExtraEntryValueToList ( ALIdouble  entry_value  )  [inline]

Definition at line 145 of file OpticalObject.h.

References theExtraEntryValueVector.

Referenced by fillExtraEntry().

00145                                                          {
00146      theExtraEntryValueVector.push_back( entry_value );
00147   }

double OpticalObject::addPii ( double  val  ) 

Definition at line 1907 of file OpticalObject.cc.

01907 {
01908   if( val < M_PI ) {
01909     val += M_PI;
01910   } else {
01911     val -= M_PI;
01912   }
01913 
01914   return val;
01915 }
01916 

double OpticalObject::approxTo0 ( double  val  ) 

Definition at line 1898 of file OpticalObject.cc.

01898 {
01899   double precision = 1.e-9;
01900   if( fabs(val) < precision ) val = 0;
01901   return val;
01902 }
01903 

HepRotation OpticalObject::buildRmFromEntryValuesOriginalOriginal (  ) 

Definition at line 709 of file OpticalObject.cc.

References CoordinateEntryList(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dumprm(), lat::endl(), getEntryRMangle(), longName(), name(), parent(), theRmGlob, XCoor, YCoor, and ZCoor.

00710 {
00711   HepRotation rm;
00712   const OpticalObject* opto_par = this;
00713   //  if(Model::GlobalOptions()["rotateAroundLocal"] == 0) {
00714   if(ALIUtils::debug >= 55) std::cout << "rotate with parent: before X " << opto_par->parent()->name() <<" " <<  parent()->getEntryRMangle(XCoor) <<std::endl;
00715   const std::vector< Entry* >& cel = CoordinateEntryList();
00716   rm.rotateX( cel[3]->valueOriginalOriginal() );
00717   if(ALIUtils::debug >= 55) std::cout << "rotate with parent: before Y " << opto_par->parent()->name() <<" " <<  parent()->getEntryRMangle(YCoor) <<std::endl;
00718   rm.rotateY( cel[4]->valueOriginalOriginal() );
00719   if(ALIUtils::debug >= 55) std::cout << "rotate with parent: before Z " << opto_par->parent()->name() <<" " <<  parent()->getEntryRMangle(ZCoor) <<std::endl;
00720   rm.rotateZ( cel[5]->valueOriginalOriginal() );
00721   //-  rm.rotateZ( getEntryRMangle(ZCoor) );
00722   if(ALIUtils::debug >= 54) ALIUtils::dumprm( theRmGlob, ("SetRMGlobFromRMLocal: RM GLOB after " +  opto_par->parent()->longName()).c_str() );
00723 
00724   return rm;
00725 }

void OpticalObject::buildWordList ( const Entry entry,
std::vector< ALIstring > &  wordlist 
) [private]

Definition at line 426 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), lat::endl(), name(), Entry::name(), Entry::OptOCurrent(), Entry::quality(), Entry::sigma(), Entry::SigmaDimensionFactor(), Entry::value(), and Entry::ValueDimensionFactor().

Referenced by copyData().

00427 {
00428   //---------- 1st add name
00429   wordlist.push_back( entry->name() );
00430   
00431   //---------- 1st add value
00432   char chartmp[20];
00433   gcvt(entry->value()/entry->ValueDimensionFactor(),10, chartmp);
00434   wordlist.push_back( chartmp );
00435 
00436   //---------- 1st add sigma
00437   gcvt(entry->sigma()/entry->SigmaDimensionFactor(),10, chartmp);
00438   wordlist.push_back( chartmp );
00439 
00440   //---------- 1st add quality
00441   ALIstring strtmp;
00442   ALIint inttmp = entry->quality();
00443   switch ( inttmp ) {
00444   case 0:
00445     strtmp = "fix";
00446     break;
00447   case 1:
00448     strtmp = "cal";
00449     break;
00450   case 2:
00451     strtmp = "unk";
00452     break;
00453   default:
00454     std::cerr << "buildWordList: entry " << entry->OptOCurrent()->name() << entry->name() << " quality not found " << inttmp << std::endl;
00455     break;
00456   }
00457   wordlist.push_back( strtmp );
00458 
00459   if( ALIUtils::debug>=9) {
00460     ALIUtils::dumpVS( wordlist, "buildWordList: ", std::cout );
00461   }
00462 
00463 }

void OpticalObject::calculateLocalRotationAxisInGlobal (  )  [private]

Definition at line 1791 of file OpticalObject.cc.

References axisXLocalInGlobal, axisYLocalInGlobal, axisZLocalInGlobal, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, name(), and theRmGlob.

Referenced by displaceRmGlobAroundLocal(), resetGlobalCoordinates(), resetOriginalOriginalCoordinates(), and setGlobalRM().

01791 {
01792   axisXLocalInGlobal = CLHEP::Hep3Vector(1.,0.,0.);
01793   axisXLocalInGlobal *= theRmGlob;
01794   axisYLocalInGlobal = CLHEP::Hep3Vector(0.,1.,0.);
01795   axisYLocalInGlobal *= theRmGlob;
01796   axisZLocalInGlobal = CLHEP::Hep3Vector(0.,0.,1.);
01797   axisZLocalInGlobal *= theRmGlob;
01798   if( ALIUtils::debug >= 4 ){
01799     std::cout << name() << " axis X local in global " << axisXLocalInGlobal << std::endl;
01800     std::cout << name() << " axis Y local in global " << axisYLocalInGlobal << std::endl;
01801     std::cout << name() << " axis Z local in global " << axisZLocalInGlobal << std::endl;
01802   }
01803 
01804 }
01805 

const Hep3Vector& OpticalObject::centreGlob (  )  const [inline]

Definition at line 85 of file OpticalObject.h.

References theCentreGlob.

Referenced by OptOOpticalSquare::calculateFaces(), centreGlobal(), centreLocal(), OptOPinhole::defaultBehaviour(), OptOCubeSplitter::detailedDeviatesLightRay(), OptOMirror::detailedDeviatesLightRay(), OptOPlateSplitter::detailedDeviatesLightRay(), OptOModifiedRhomboidPrism::detailedDeviatesLightRay(), OptOSensor2D::detailedTraversesLightRay(), displaceRmGlobAroundGlobal(), displaceRmGlobAroundLocal(), displaceRmGlobOriginal(), displaceRmGlobOriginalOriginal(), OptOCOPS::fastTraversesLightRay(), OptOSensor2D::fastTraversesLightRay(), OptOCubeSplitter::getMiddlePlate(), CocoaAnalyzer::GetOptAlignInfoFromOptO(), getPlate(), OptOModifiedRhomboidPrism::getRotatedPlate(), OptOCubeSplitter::getUpperPlate(), LightRay::intersect(), LightRay::LightRay(), OptODistancemeter::makeMeasurement(), OptODistancemeter3dim::makeMeasurement(), OptOSensor2D::makeMeasurement(), OptOCOPS::makeMeasurement(), Fit::printCentreInOptOFrame(), SetCentreGlobFromCentreLocal(), SetCentreLocalFromEntryValues(), setOriginalEntryValues(), LightRay::startLightRay(), OptOUserDefined::userDefinedBehaviour(), and EntryLengthAffCentre::valueDisplaced().

00085                                        {
00086     return theCentreGlob;
00087   }

const Hep3Vector& OpticalObject::centreGlobal (  )  const [inline]

Definition at line 89 of file OpticalObject.h.

References centreGlob().

00089                                          {
00090     return centreGlob();
00091   }

const Hep3Vector& OpticalObject::centreGlobOriginal (  )  const [inline]

Definition at line 95 of file OpticalObject.h.

References theCentreGlobOriginal.

Referenced by displaceCentreGlob(), displaceRmGlobAroundGlobal(), displaceRmGlobAroundLocal(), displaceRmGlobOriginal(), resetGlobalCoordinates(), and EntryLengthAffCentre::valueDisplaced().

00095                                                {
00096     return theCentreGlobOriginal;
00097   }

const Hep3Vector& OpticalObject::centreGlobOriginalOriginal (  )  const [inline]

Definition at line 98 of file OpticalObject.h.

References theCentreGlobOriginalOriginal.

Referenced by displaceRmGlobOriginalOriginal().

00098                                                        {
00099     return theCentreGlobOriginalOriginal;
00100   }

const CLHEP::Hep3Vector OpticalObject::centreLocal (  )  const

Definition at line 2020 of file OpticalObject.cc.

References centreGlob(), parent(), rmGlob(), and theCentreGlob.

Referenced by CocoaToDDLMgr::pv().

02020 {
02021 
02022   CLHEP::Hep3Vector cLocal = theCentreGlob -  parent()->centreGlob();
02023   CLHEP::HepRotation rmParentInv = inverseOf( parent()->rmGlob() );
02024   cLocal = rmParentInv * cLocal;
02025 
02026   return cLocal;
02027   /*-
02028 
02029   if( theCoordinateEntryVector.size() >= 3 ) {
02030     return CLHEP::Hep3Vector( theCoordinateEntryVector[0]->value(), theCoordinateEntryVector[1]->value(), theCoordinateEntryVector[2]->value() );
02031   } else {
02032     return CLHEP::Hep3Vector(0.,0.,0.);
02033   }
02034   */
02035 }
02036 

int OpticalObject::checkMatrixEquations ( double  angleX,
double  angleY,
double  angleZ,
HepRotation *  rot = 0 
)

const uint32_t OpticalObject::cmsSwID (  )  const [inline]

Definition at line 122 of file OpticalObject.h.

References theCmsSwID.

Referenced by CocoaAnalyzer::GetOptAlignInfoFromOptO().

00122 { return theCmsSwID; }

void OpticalObject::construct (  ) 

Definition at line 66 of file OpticalObject.cc.

References constructMaterial(), constructSolidShape(), copyData(), GenMuonPlsPt100GeV_cfg::cout, createComponentOptOs(), ALIUtils::debug, lat::endl(), fcopyData, ALIFileIn::getInstance(), name(), readData(), Model::SDFName(), setGlobalCoordinates(), setOriginalEntryValues(), and theParent.

Referenced by createComponentOptOs(), and Model::readSystemDescription().

00067 {
00068   //---------- Get file handler
00069   ALIFileIn& filein = ALIFileIn::getInstance( Model::SDFName() );
00070   /*-  if(!filein) {
00071     filein.ErrorInLine();
00072     std::cerr << "cannot open file SystemDescription.txt" << std::endl; 
00073     exit(0);
00074     }*/
00075 
00076   if( theParent != 0 ) { //----- OptO 'system' has no parent (and no affine frame)
00077     //---------- Read or copy Data
00078     if(!fcopyData) { 
00079       if(ALIUtils::debug >=4) std::cout << "@@@@ Reading data of Optical Object " << name() << std::endl;
00080       readData( filein );
00081     } else {
00082       if(ALIUtils::debug >=4) std::cout << "Copy data of Optical Object " << name() << std::endl;
00083       copyData();
00084     }
00085 
00086     //---------- Set global coordinates 
00087     setGlobalCoordinates();
00088     //---------- Set ValueDisplacementByFitting to 0. !!done at Entry construction
00089     /*    std::vector<Entry*>::const_iterator vecite;
00090     for ( vecite = CoordinateEntryList().begin(); vecite != CoordinateEntryList().end(); vecite++) {
00091       (*vecite)->setValueDisplacementByFitting( 0. );
00092     }
00093     */
00094 
00095     //---------- Set original entry values
00096     setOriginalEntryValues();
00097   }
00098 
00099   //---------- Create the OptO that compose this one
00100   createComponentOptOs( filein );
00101 
00102   //---------- Construct material
00103   constructMaterial();
00104 
00105   //---------- Construct solid shape
00106   constructSolidShape();
00107 
00108 }

void OpticalObject::constructFromOptAligInfo ( const OpticalAlignInfo oaInfo  ) 

Definition at line 2109 of file OpticalObject.cc.

References anglesIsGlobal, OpticalAlignInfo::angx_, OpticalAlignInfo::angy_, OpticalAlignInfo::angz_, centreIsGlobal, constructMaterial(), constructSolidShape(), GenMuonPlsPt100GeV_cfg::cout, createComponentOptOsFromOptAlignInfo(), ALIUtils::debug, OpticalAlignInfo::extraEntries_, fillCoordinateEntry(), fillExtraEntry(), getCoordinateFromOptAlignParam(), setGlobalCoordinates(), setOriginalEntryValues(), theParent, OpticalAlignInfo::x_, OpticalAlignInfo::y_, and OpticalAlignInfo::z_.

Referenced by Model::BuildSystemDescriptionFromOA(), and createComponentOptOsFromOptAlignInfo().

02109 {
02110   if( theParent != 0 ) { //----- OptO 'system' has no parent (and no affine frame)
02111     //---------- Build Data
02112    //---------- See if there are extra entries and read them
02113     std::vector<OpticalAlignParam> exEnt = oaInfo.extraEntries_;
02114     std::vector<OpticalAlignParam>::iterator ite;
02115     std::vector<ALIstring> wordlist;
02116     for( ite = exEnt.begin(); ite != exEnt.end(); ite++ ){
02117       wordlist = getCoordinateFromOptAlignParam( *ite );
02118       wordlist.insert(wordlist.begin(), (*ite).dimType() );
02119       fillExtraEntry( wordlist );
02120     }
02121 
02122     //--------- set centre and angles not global (default behaviour)
02123     centreIsGlobal = 0;
02124     anglesIsGlobal = 0;
02125     
02126     //--------- build Coordinates 
02127     fillCoordinateEntry( "centre", getCoordinateFromOptAlignParam( oaInfo.x_ ) );
02128     fillCoordinateEntry( "centre", getCoordinateFromOptAlignParam( oaInfo.y_ ) );
02129     fillCoordinateEntry( "centre", getCoordinateFromOptAlignParam( oaInfo.z_ ) );
02130     fillCoordinateEntry( "angles", getCoordinateFromOptAlignParam( oaInfo.angx_ ) );
02131     fillCoordinateEntry( "angles", getCoordinateFromOptAlignParam( oaInfo.angy_ ) );
02132     fillCoordinateEntry( "angles", getCoordinateFromOptAlignParam( oaInfo.angz_ ) );
02133     
02134     //---------- Set global coordinates 
02135     setGlobalCoordinates();
02136 
02137     //---------- Set original entry values
02138     setOriginalEntryValues();
02139   }
02140 
02141   //---------- Construct material
02142   constructMaterial();
02143 
02144   //---------- Construct solid shape
02145   constructSolidShape();
02146 
02147   if ( ALIUtils::debug >= 5 ) {
02148     std::cout << "constructFromOptAligInfo constructed: " << *this << std::endl;
02149   }
02150 
02151   //---------- Create the OptO that compose this one
02152   createComponentOptOsFromOptAlignInfo();
02153 }
02154 

void OpticalObject::constructMaterial (  )  [virtual]

Definition at line 2090 of file OpticalObject.cc.

References theMaterial.

Referenced by construct(), and constructFromOptAligInfo().

02090 {
02091 
02092   theMaterial =  new CocoaMaterialElementary( "Hydrogen", 70.8*mg/cm3, "H", 1.00794 , 1 );
02093 
02094 }
02095 

void OpticalObject::constructSolidShape (  )  [virtual]

Reimplemented in OptOCameraDetector, OptOCOPS, OptOCubeSplitter, OptODistancemeter, OptODistancemeter3dim, OptOLaser, OptOLens, OptOMirror, OptOModifiedRhomboidPrism, OptOOpticalSquare, OptOPinhole, OptOPlateSplitter, OptORisleyPrism, OptOScreen, OptOSensor2D, OptOSource, OptOTiltmeter, and OptOXLaser.

Definition at line 2098 of file OpticalObject.cc.

References GlobalOptionMgr::getGlobalOptionValue(), GlobalOptionMgr::getInstance(), m, and theSolidShape.

Referenced by construct(), and constructFromOptAligInfo().

02098 {
02099   ALIdouble go;
02100   GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
02101   gomgr->getGlobalOptionValue("VisScale", go );
02102 
02103   theSolidShape = new CocoaSolidShapeBox( "Box", go*5.*cm/m, go*5.*cm/m, go*5.*cm/m ); //COCOA internal units are meters
02104 } 
02105 

const std::vector< Entry* >& OpticalObject::CoordinateEntryList (  )  const [inline]

Definition at line 65 of file OpticalObject.h.

References theCoordinateEntryVector.

Referenced by Measurement::addAffectingEntriesFromOptO(), buildRmFromEntryValuesOriginalOriginal(), copyData(), Model::deleteOptO(), Fit::findEntryFitPosition(), CocoaAnalyzer::GetOptAlignInfoFromOptO(), Fit::printCentreInOptOFrame(), Fit::printRotationAnglesInOptOFrame(), and CocoaToDDLMgr::specPar().

00065                                                          {
00066      return theCoordinateEntryVector;
00067   }

void OpticalObject::copyData (  )  [private]

Definition at line 378 of file OpticalObject.cc.

References anglesIsGlobal, buildWordList(), centreIsGlobal, CoordinateEntryList(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), lat::endl(), ExtraEntryList(), fillCoordinateEntry(), fillExtraEntry(), name(), Model::nextOptOToCopy(), and theName.

Referenced by construct().

00379 {
00380   centreIsGlobal = 0;
00381   anglesIsGlobal = 0;
00382   if(ALIUtils::debug >= 5) std::cout << "entering copyData()" << std::endl;
00383 
00384   //---------- Get copied OptO
00385   OpticalObject* opto = Model::nextOptOToCopy();
00386 
00387   //---------- build name: for a copied OptO, now name is parent name, add the last part of the copied OptO
00388   ALIint copy_name_last_slash = opto->name().rfind('/');  
00389   ALIint copy_name_size = opto->name().length();
00390   //-  if(ALIUtils::debug >= 9) std::cout << "BUILD UP NAME0 " << theName << std::endl;
00391   theName.append( opto->name(), copy_name_last_slash, copy_name_size);
00392   if(ALIUtils::debug >= 5) std::cout << "copying OptO: " << opto->name() << " to OptO " << theName << std::endl;
00393 
00394   //---------- Copy Extra Entries from copied OptO
00395   std::vector<Entry*>::const_iterator vecite;
00396   for( vecite = opto->ExtraEntryList().begin(); vecite != opto->ExtraEntryList().end(); vecite++ ) {
00397     std::vector<ALIstring> wordlist;
00398     wordlist.push_back( (*vecite)->type() );
00399     buildWordList( (*vecite), wordlist );      
00400     if( ALIUtils::debug>=9) {
00401       ALIUtils::dumpVS( wordlist, "copyData: ", std::cout );
00402     }
00403     fillExtraEntry( wordlist );
00404   }
00405 
00406   //---------- Copy Coordinate Entries from copied OptO
00407   for( vecite = opto->CoordinateEntryList().begin(); vecite != opto->CoordinateEntryList().end(); vecite++ ) {
00408     std::vector<ALIstring> wordlist;
00409     buildWordList( (*vecite), wordlist );
00410     //----- first three coordinates centre, second three coordinates angles!!PROTECT AGAINST OTHER POSSIBILITIES!!
00411     ALIstring coor_name; 
00412     if( vecite - opto->CoordinateEntryList().begin() < 3 ) {
00413       coor_name = "centre";
00414     } else {
00415       coor_name = "angles";
00416     }
00417     fillCoordinateEntry( coor_name, wordlist );
00418   }
00419 
00420 }

void OpticalObject::createComponentOptOs ( ALIFileIn filein  )  [private]

Definition at line 469 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, construct(), GenMuonPlsPt100GeV_cfg::cout, Model::createCopyComponentList(), createNewOptO(), ALIUtils::debug, lat::endl(), ALIFileIn::ErrorInLine(), cmsRelvalreport::exit, fcopyData, Model::getComponentOptOTypes(), OpticalObjectMgr::getInstance(), ALIUtils::getInt(), ALIFileIn::getWordsInLine(), name(), Model::OptOList(), setID(), and type().

Referenced by construct().

00470 {
00471   //---------- flag to determine if components are copied or read (it is passed to the constructor of component OptOs)
00472   ALIbool fcopyComponents = 0; 
00473 
00474   //---------- Get list of components of current OptO (copy it to 'vopto_types') 
00475   std::vector<ALIstring> vopto_types;
00476   int igetood = Model::getComponentOptOTypes( type(), vopto_types );
00477   if( !igetood ) {
00478     if(ALIUtils::debug >= 5) std::cout << " NO MORE COMPONENTS IN THIS OptO" << name() << std::endl ; 
00479     return;
00480   }
00481 
00482   /*  //---------- Dump component list
00483   if(ALIUtils::debug >= 5) {
00484     ALIUtils::dumpVS( wordlist, "SYSTEM: ", std::cout );
00485     }*/
00486  
00487   //---------- Loop components (have to follow list in 'vopto_types')
00488   std::vector<ALIstring>::iterator vsite;
00489   std::vector<ALIstring> wordlist; 
00490   for( vsite=vopto_types.begin(); vsite!=vopto_types.end(); vsite++ ) {
00491     //----- If it is not being copied, read first line describing object 
00492     //- std::cout << "fcopyy" << fcopyComponents << fcopyData << theName << *vsite << std::endl;
00493     if( !fcopyData && !fcopyComponents ) filein.getWordsInLine(wordlist);
00494     //t    if( !fcopyData ) filein.getWordsInLine(wordlist);
00495 
00496     //----- Check first line describing object 
00497     //--- Don't check it if OptO is going to be copied (fcopyData = 1)
00498     //--- If OptO is not copied, but components will be copied, check if only for the first component (for the second fcopyComponents=1)
00499     if( fcopyData || fcopyComponents ) {
00500       fcopyComponents = 1;
00501     //--- If OptO not copied, but components will be copied
00502     }else if( wordlist[0] == ALIstring("copy_components") ) {
00503       if(ALIUtils::debug>=3)std::cout << "createComponentOptOs: copy_components" << wordlist[0] << std::endl;
00504       Model::createCopyComponentList( type() );
00505       fcopyComponents = 1;  //--- for the second and following components
00506     //----- If no copying: check that type is the expected one
00507     } else if ( wordlist[0] != (*vsite) ) {
00508         filein.ErrorInLine();
00509         std::cerr << "!!! Badly placed OpticalObject: " << wordlist[0] << " should be = " << (*vsite) << std::endl; 
00510         exit(2);
00511     }
00512 
00513     //---------- Make composite component name 
00514     ALIstring component_name = name();
00515     //----- if component is not going to be copied add name of component to the parent (if OptO is not copied and components will be, wordlist = 'copy-components', there is no wordlist[1]
00516     if( !fcopyComponents ) {
00517       component_name += '/';
00518       component_name += wordlist[1];
00519     } 
00520     //    if ( ALIUtils::debug >= 6 ) std::cout << "MAKE NAME " << name() << " TO " << component_name << std::endl;
00521 
00522     //---------- Create OpticalObject of the corresponding type
00523     OpticalObject* OptOcomponent = createNewOptO( this, *vsite, component_name, fcopyComponents );
00524 
00525     //----- Fill CMS software ID
00526     if( wordlist.size() == 3 ) {
00527       OptOcomponent->setID( ALIUtils::getInt( wordlist[2] ) );
00528     } else {
00529       OptOcomponent->setID( OpticalObjectMgr::getInstance()->buildCmsSwID() );
00530     }
00531 
00532     //---------- Construct it (read data and 
00533     OptOcomponent->construct(); 
00534 
00535     //---------- Fill OptO tree and OptO list 
00536     Model::OptOList().push_back( OptOcomponent ); 
00537   }
00538 
00539 }

void OpticalObject::createComponentOptOsFromOptAlignInfo (  ) 

Definition at line 2185 of file OpticalObject.cc.

References constructFromOptAligInfo(), GenMuonPlsPt100GeV_cfg::cout, createNewOptO(), ALIUtils::debug, Model::getOpticalAlignments(), OpticalAlignInfo::name_, Model::OptOList(), siz, and theName.

Referenced by constructFromOptAligInfo().

02185 {
02186   //----- Build children list of this object
02187   std::vector<OpticalAlignInfo> children;
02188 
02189   std::vector<OpticalAlignInfo>::const_iterator ite;
02190   if ( ALIUtils::debug >= 5 ) {
02191     std::cout << " Model::getOpticalAlignments().size " << Model::getOpticalAlignments().size() << std::endl;
02192   }
02193   //  for( ite = Model::getOpticalAlignments().begin(); ite != Model::getOpticalAlignments().end(); ite++ ){
02194   int siz=  Model::getOpticalAlignments().size();
02195   for(uint ii = 0; ii < siz; ii++ ){
02196     //    std::cout << " OpticalObject::getComponentOptOsFromOptAlignInfo name " <<  (*ite).name_ << std::endl;
02197  //   std::cout << " OpticalObject::getComponentOptOsFromOptAlignInfo " <<  (*ite).parentName_ << " =? " << theName << std::endl;
02198     //    std::cout <<  " OpticalObject::getComponentOptOsFromOptAlignInfo name " <<  ii << std::endl;
02199     //    if( (*ite)parentName_. == oaInfo.name() && (*ite).name() != "simple2DWithMirror:mirror1" ) {
02200     if( Model::getOpticalAlignments()[ii].parentName_ == theName ) {
02201       //    if( (*ite).parentName_ == theName ) {
02202       
02203       //      std::cout << "createComponentOptOsFromOptAlignInfo: 1 to push_back " << std::endl;
02204       std::vector<OpticalAlignParam> exent =  Model::getOpticalAlignments()[ii].extraEntries_;
02205       //    std::vector<OpticalAlignParam> exent = (*ite).extraEntries_;
02206       //-      std::cout << "createComponentOptOsFromOptAlignInfo: 2 to push_back " << std::endl;
02207       /*      for( uint ij = 0; ij < exent.size(); ij++ ){
02208         std::cout << " extra entry " << exent[ij].name_;
02209         std::cout << " extra entry " << exent[ij].dimType();
02210         std::cout << " extra entry " << exent[ij].value_;
02211         std::cout << " extra entry " << exent[ij].error_;
02212         std::cout << " extra entry " << exent[ij].quality_;
02213         } */
02214       //      std::cout << "createComponentOptOsFromOptAlignInfo: 3 to push_back " << Model::getOpticalAlignments()[ii] << std::endl;
02215       OpticalAlignInfo oaInfochild =  Model::getOpticalAlignments()[ii];
02216       //    OpticalAlignInfo oaInfochild =  *ite;
02217       //      std::cout << "createComponentOptOsFromOptAlignInfo: 4 to push_back " << std::endl;
02218       children.push_back(oaInfochild);
02219       if ( ALIUtils::debug >= 5 ) {
02220         std::cout << theName << "createComponentOptOsFromOptAlignInfo: children added " << oaInfochild.name_ << std::endl;
02221       }
02222     }
02223     //    std::cout << "createComponentOptOsFromOptAlignInfo: 6 push_backed " << std::endl;
02224     
02225   }
02226   //  std::cout << "createComponentOptOsFromOptAlignInfo: 10 push_backed " << std::endl;
02227 
02228 
02229   if ( ALIUtils::debug >= 5 ) {
02230     std::cout << "OpticalObject::createComponentsFromAlignInfo: N components = " << children.size() << std::endl;
02231   }
02232   for( ite = children.begin(); ite != children.end(); ite++ ){
02233 
02234     //---------- Get component type 
02235     ALIstring optoType = (*ite).type_;
02236     //-    //---------- Get composite component name 
02237     //-  ALIstring optoName = name()+"/"+(*ite).name_;
02238     //---------- Get component name 
02239     ALIstring optoName = (*ite).name_;
02240     ALIbool fcopyComponents = 0;
02241 
02242     //---------- Create OpticalObject of the corresponding type
02243     OpticalObject* OptOcomponent = createNewOptO( this, optoType, optoName, fcopyComponents );
02244 
02245     //---------- Construct it (read data and 
02246     OptOcomponent->constructFromOptAligInfo( *ite );
02247 
02248     //---------- Fill OptO tree and OptO list 
02249     Model::OptOList().push_back( OptOcomponent ); 
02250   }
02251   
02252 }
02253 

OpticalObject * OpticalObject::createNewOptO ( OpticalObject parent,
ALIstring  optoType,
ALIstring  optoName,
ALIbool  fcopyComponents 
) [private]

Definition at line 542 of file OpticalObject.cc.

References GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), and name().

Referenced by createComponentOptOs(), and createComponentOptOsFromOptAlignInfo().

00543 {
00544   if ( ALIUtils::debug >= 3 ) std::cout << " OpticalObject::createNewOptO optoType " << optoType << " optoName " << optoName << " parent " << parent->name() << std::endl;
00545   OpticalObject* OptOcomponent;
00546   if( optoType == "laser" ) {
00547     OptOcomponent =  
00548       new OptOLaser( this, optoType, optoName, fcopyComponents );
00549   } else if( optoType == "source" ) {
00550     OptOcomponent =  
00551       new OptOSource( this, optoType, optoName, fcopyComponents );
00552   } else if( optoType == "Xlaser" ) {
00553     OptOcomponent =  
00554         new OptOXLaser( this, optoType, optoName, fcopyComponents );
00555   } else if( optoType == "mirror" ){
00556     OptOcomponent =  
00557       new OptOMirror( this, optoType, optoName, fcopyComponents );
00558   } else if( optoType == "plate_splitter" ) {
00559     OptOcomponent =  
00560       new OptOPlateSplitter( this, optoType, optoName, fcopyComponents );
00561   } else if( optoType == "cube_splitter" ) {
00562     OptOcomponent =  
00563       new OptOCubeSplitter( this, optoType, optoName, fcopyComponents );
00564   } else if( optoType == "modified_rhomboid_prism" ) {
00565     OptOcomponent =  
00566       new OptOModifiedRhomboidPrism( this, optoType, optoName, fcopyComponents );
00567   } else if( optoType == "pseudo_pentaprism" || optoType == "optical_square" ) {
00568     OptOcomponent =  
00569       new OptOOpticalSquare( this, optoType, optoName, fcopyComponents );
00570   } else if( optoType == "lens" ) {
00571     OptOcomponent =  
00572       new OptOLens( this, optoType, optoName, fcopyComponents );
00573   } else if( optoType == "Risley_prism" ) {
00574     OptOcomponent =  
00575       new OptORisleyPrism( this, optoType, optoName, fcopyComponents );
00576   } else if( optoType == "sensor2D" ) {
00577     OptOcomponent =  
00578       new OptOSensor2D( this, optoType, optoName, fcopyComponents );
00579   } else if( optoType == "distancemeter" || optoType == "distancemeter1dim" ) {
00580     OptOcomponent =  
00581       new OptODistancemeter( this, optoType, optoName, fcopyComponents );
00582   } else if( optoType == "distancemeter3dim" ) {
00583     OptOcomponent =  
00584       new OptODistancemeter3dim( this, optoType, optoName, fcopyComponents );
00585   } else if( optoType == "distance_target" ) {
00586     OptOcomponent =  
00587       new OptOScreen( this, optoType, optoName, fcopyComponents );
00588   } else if( optoType == "tiltmeter" ) {
00589     OptOcomponent =  
00590       new OptOTiltmeter( this, optoType, optoName, fcopyComponents );
00591   } else if( optoType == "pinhole" ) {
00592     OptOcomponent =  
00593       new OptOPinhole( this, optoType, optoName, fcopyComponents );
00594   } else if( optoType == "COPS" ) {
00595     OptOcomponent =  
00596       new OptOCOPS( this, optoType, optoName, fcopyComponents );
00597   } else {
00598     OptOcomponent =  
00599       //o       new OpticalObject( this, optoType, optoName, fcopyComponents );
00600       new OptOUserDefined( this, optoType, optoName, fcopyComponents );
00601   }
00602 
00603   return OptOcomponent;
00604 }

void OpticalObject::defaultBehaviour ( LightRay lightray,
Measurement meas 
) [virtual]

Reimplemented in OptOCOPS, OptODistancemeter, OptODistancemeter3dim, OptOLaser, OptOMirror, OptOPinhole, OptOScreen, OptOSensor2D, OptOSource, OptOTiltmeter, and OptOXLaser.

Definition at line 907 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, name(), and type().

Referenced by participateInMeasurement().

00908 {
00909   std::cerr << "!!! Optical Object " << name() << " of type " << type() << " does not implement a default behaviour" << std::endl;
00910   std::cerr << " You have to specify some behaviour, like :D or :T or ..." << std::endl;
00911   exit(1);
00912 }

void OpticalObject::detailedDeviatesLightRay ( LightRay lightray  )  [virtual]

Reimplemented in OptOCubeSplitter, OptOMirror, OptOModifiedRhomboidPrism, OptOOpticalSquare, and OptOPlateSplitter.

Definition at line 940 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, name(), and type().

Referenced by participateInMeasurement().

00941 {
00942   std::cerr << "!!! Optical Object " << name() << " of type " << type() << " does not implement detailed deviation (:DD / :D)" << std::endl;
00943   std::cerr << " Please read documentation for this object type" << std::endl;
00944   exit(1);
00945 }

void OpticalObject::detailedTraversesLightRay ( LightRay lightray  )  [virtual]

Reimplemented in OptOCubeSplitter, OptOMirror, OptOModifiedRhomboidPrism, OptOOpticalSquare, OptOPlateSplitter, and OptOSensor2D.

Definition at line 951 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, name(), and type().

Referenced by participateInMeasurement().

00952 {
00953   std::cerr << "!!! Optical Object " << name() << " of type " << type() << " does not implement detailed traversing of light ray (:DT / :T)" << std::endl;
00954   std::cerr << " Please read documentation for this object type" << std::endl;
00955   exit(1);
00956 }

double OpticalObject::diff2pi ( double  ang1,
double  ang2 
)

Definition at line 1872 of file OpticalObject.cc.

References diff, and int.

Referenced by eq2ang().

01872 {
01873   double diff = fabs( ang1 - ang2 );
01874   diff = diff - int(diff/2./M_PI) * 2 *M_PI;
01875   return diff;
01876 }
01877 

void OpticalObject::displaceCentreGlob ( const Hep3Vector &  dispVec  ) 

void OpticalObject::displaceCentreGlob ( const XYZcoor  coor,
const ALIdouble  disp 
)

Definition at line 1039 of file OpticalObject.cc.

References centreGlobOriginal(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), Model::getComponentOptOs(), getDispVec(), name(), and theCentreGlob.

Referenced by EntryLengthAffCentre::displace().

01039 {
01040   if ( ALIUtils::debug >= 5 ) std::cout << name() << " displaceCentreGlob: coor " << coor << " disp = " << disp << std::endl;
01041 
01042   theCentreGlob = centreGlobOriginal(); 
01043   CLHEP::Hep3Vector dispVec = getDispVec( coor, disp ); 
01044   theCentreGlob += dispVec;
01045 
01046   //----------- Displace CentreGlob() of every component
01047   std::vector<OpticalObject*> vopto;
01048   ALIbool igetood = Model::getComponentOptOs(name(), vopto); 
01049   if( !igetood ) {
01050     //    std::cout << " NO MORE COMPONENTS IN THIS OptO" << name() << std::endl ; 
01051     return;
01052   }
01053   std::vector<OpticalObject*>::const_iterator vocite;
01054   for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01055       (*vocite)->displaceCentreGlob( dispVec ); 
01056   }
01057 
01058 }
01059 

void OpticalObject::displaceCentreGlobOriginal ( const Hep3Vector &  dispVec  ) 

void OpticalObject::displaceCentreGlobOriginal ( const XYZcoor  coor,
const ALIdouble  disp 
)

Definition at line 1130 of file OpticalObject.cc.

References GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), Model::getComponentOptOs(), getDispVec(), name(), and theCentreGlobOriginal.

Referenced by EntryLengthAffCentre::displaceOriginal().

01130 {
01131   if ( ALIUtils::debug >= 4 ) std::cout << "@@ OpticalObject::displaceCentreGloboriginal " << name() << " " << coor << " " << disp << std::endl;
01132   if ( ALIUtils::debug >= 5 ) ALIUtils::dump3v(theCentreGlobOriginal, "the centre glob original 0");
01133   CLHEP::Hep3Vector dispVec = getDispVec( coor, disp ); 
01134   theCentreGlobOriginal += dispVec;
01135 
01136   if ( ALIUtils::debug >= 5 ) ALIUtils::dump3v(theCentreGlobOriginal, "the centre glob original displaced");
01137  
01138   //----------- Displace CentreGlob() of every component
01139   std::vector<OpticalObject*> vopto;
01140   Model::getComponentOptOs(name(), vopto); 
01141   std::vector<OpticalObject*>::const_iterator vocite;
01142   for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01143       (*vocite)->displaceCentreGlobOriginal( dispVec ); 
01144   }
01145 
01146 }
01147 

void OpticalObject::displaceCentreGlobOriginalOriginal ( const Hep3Vector &  dispVec  ) 

void OpticalObject::displaceCentreGlobOriginalOriginal ( const XYZcoor  coor,
const ALIdouble  disp 
)

Definition at line 1173 of file OpticalObject.cc.

References GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), Model::getComponentOptOs(), getDispVec(), name(), and theCentreGlobOriginalOriginal.

Referenced by EntryLengthAffCentre::displaceOriginalOriginal().

01173 {
01174   if ( ALIUtils::debug >= 4 ) std::cout << "@@ OpticalObject::displaceCentreGloboriginal " << name() << " " << coor << " " << disp << std::endl;
01175   if ( ALIUtils::debug >= 5 ) ALIUtils::dump3v(theCentreGlobOriginalOriginal, "the centre glob originalOriginal 0");
01176   CLHEP::Hep3Vector dispVec = getDispVec( coor, disp ); 
01177   theCentreGlobOriginalOriginal += dispVec;
01178 
01179   if ( ALIUtils::debug >= 5 ) ALIUtils::dump3v(theCentreGlobOriginalOriginal, "the centre glob original displaced");
01180  
01181   //----------- Displace CentreGlob() of every component
01182   std::vector<OpticalObject*> vopto;
01183   Model::getComponentOptOs(name(), vopto); 
01184   std::vector<OpticalObject*>::const_iterator vocite;
01185   for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01186       (*vocite)->displaceCentreGlobOriginalOriginal( dispVec ); 
01187   }
01188 
01189 }
01190 

void OpticalObject::displaceExtraEntry ( const ALIuint  entryNo,
const ALIdouble  disp 
)

Definition at line 1112 of file OpticalObject.cc.

References theExtraEntryValueOriginalVector, and theExtraEntryValueVector.

Referenced by Entry::displace().

01112 {
01113   //  std::vector< ALIdouble >::iterator ite =  theExtraEntryValueVector.begin();
01114   ALIdouble Pentry_value = (*(theExtraEntryValueVector.begin() + entryNo));
01115 
01116   ALIdouble Pentry_orig_value = *(theExtraEntryValueOriginalVector.begin() + entryNo);
01117   Pentry_value = (Pentry_orig_value) + disp;
01118   //  std::cout << " displaceExtraEntry " << Pentry_value << " <> " << Pentry_orig_value << std::endl;
01119   theExtraEntryValueVector[entryNo] = Pentry_value;
01120 }
01121 

void OpticalObject::displaceExtraEntryOriginal ( const ALIuint  entryNo,
const ALIdouble  disp 
)

Definition at line 1520 of file OpticalObject.cc.

References theExtraEntryValueOriginalVector.

Referenced by Entry::displaceOriginal().

01520 {
01521   ALIdouble Pentry_orig_value = *(theExtraEntryValueOriginalVector.begin() + entryNo);
01522   Pentry_orig_value += disp;
01523   //  std::cout << " displaceExtraEntryOriginal " << *(theExtraEntryValueOriginalVector.begin() + entryNo) << " + " << disp << std::endl;
01524   theExtraEntryValueOriginalVector[entryNo] = Pentry_orig_value;
01525 
01526 }
01527 

void OpticalObject::displaceExtraEntryOriginalOriginal ( const ALIuint  entryNo,
const ALIdouble  disp 
)

Definition at line 1531 of file OpticalObject.cc.

References theExtraEntryValueOriginalOriginalVector.

Referenced by Entry::displaceOriginalOriginal().

01531 {
01532   ALIdouble Pentry_orig_value = *(theExtraEntryValueOriginalOriginalVector.begin() + entryNo);
01533   Pentry_orig_value += disp;
01534   //  std::cout << " displaceExtraEntryOriginalOriginal " << *(theExtraEntryValueOriginalOriginalVector.begin() + entryNo) << " + " << disp << std::endl;
01535   theExtraEntryValueOriginalOriginalVector[entryNo] = Pentry_orig_value;
01536 
01537 }
01538 

void OpticalObject::displaceRmGlobAroundGlobal ( OpticalObject opto1stRotated,
const XYZcoor  coor,
const ALIdouble  disp 
)

Definition at line 1219 of file OpticalObject.cc.

References centreGlob(), centreGlobOriginal(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), ALIUtils::dumprm(), Model::getComponentOptOs(), name(), rmGlobOriginal(), rotateItAroundGlobal(), theCentreGlob, and theRmGlob.

Referenced by EntryAngleAffAngles::displace().

01219 {
01220   if(ALIUtils::debug>=5) std::cout << name() << "DISPLACERMGLOBAROUNDGLOBAL" << coor << "disp" << disp << std::endl;
01221   //-------------------- Rotate rotation matrix
01222   theRmGlob = rmGlobOriginal();
01223   theCentreGlob = centreGlobOriginal();
01224   if(ALIUtils::debug >= 5 ) {
01225     std::cout << this->name() << std::endl;
01226     ALIUtils::dumprm( theRmGlob, "before disp rm " );
01227   }
01228   rotateItAroundGlobal( theRmGlob, coor, disp );
01229   if(ALIUtils::debug >= 5 ) {
01230     ALIUtils::dumprm( theRmGlob, "after disp rm " );
01231   }
01232   //-------------------- Rotation translate the centre of component OptO
01233   if(ALIUtils::debug >= 5) ALIUtils::dump3v( centreGlob(), " centre_glob before rotation" );
01234   if(ALIUtils::debug >= 5 ) ALIUtils::dump3v( centreGlobOriginal(), "         centreGlobOriginal before rotation" );
01235   if(opto1stRotated != this ) { //own _centre_glob is not displaced
01236     //---------- Distance to 1st rotated OptO
01237     CLHEP::Hep3Vector radiusOriginal =  centreGlobOriginal() - opto1stRotated->centreGlobOriginal();
01238     CLHEP::Hep3Vector radius_rotated = radiusOriginal;
01239     rotateItAroundGlobal( radius_rotated, coor, disp );
01240     theCentreGlob = centreGlobOriginal() + (radius_rotated - radiusOriginal);
01241     if(ALIUtils::debug >= 5) ALIUtils::dump3v( centreGlob(), " centre_glob after rotation" );
01242     if(ALIUtils::debug >= 5) ALIUtils::dump3v( centreGlobOriginal(), "         centre_globOriginal() after rotation" );
01243   }
01244 
01245   //----------- Displace every component
01246   std::vector<OpticalObject*> vopto;
01247   Model::getComponentOptOs(name(), vopto); 
01248   std::vector<OpticalObject*>::const_iterator vocite;
01249   for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01250     (*vocite)->displaceRmGlobAroundGlobal( opto1stRotated, coor, disp);
01251   }
01252 
01253 }
01254 

void OpticalObject::displaceRmGlobAroundLocal ( OpticalObject opto1stRotated,
const XYZcoor  coor,
const ALIdouble  disp 
)

Definition at line 1261 of file OpticalObject.cc.

References anglesIsGlobal, calculateLocalRotationAxisInGlobal(), centreGlob(), centreGlobOriginal(), TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), ALIUtils::dumprm(), Model::getComponentOptOs(), getEntryRMangle(), name(), setGlobalCentre(), SetRMGlobFromRMLocal(), theRmGlob, XCoor, YCoor, and ZCoor.

Referenced by EntryAngleAffAngles::displace().

01261 {
01262   if( anglesIsGlobal ) {
01263     std::cerr << "!!!FATAL ERROR: angles in global coordinates not supported momentarily if 'rotateAroundGlobal' is set as a Global Option " << std::endl;
01264     abort();
01265   }
01266 
01267   if(ALIUtils::debug>=5) std::cout << name() << " DISPLACE_RMGLOB_AROUND_LOCAL " << coor << " disp " << disp << std::endl;
01268   //---------- Build the rmGlob and centreGlob again, with displacement values
01269   //----- Local rotation is build with entry values plus displacement
01270   theRmGlob = CLHEP::HepRotation();
01271   //---------- Set global rotation matrix
01272   //-------- Get rm from Entries
01273   if( coor == XCoor ) {
01274     theRmGlob.rotateX( getEntryRMangle(XCoor) + disp );
01275     if(ALIUtils::debug>=5) std::cout << " rmglob rotated around x " <<  getEntryRMangle(XCoor) + disp << std::endl;
01276   }else {
01277     theRmGlob.rotateX( getEntryRMangle(XCoor) );
01278   }
01279   if(ALIUtils::debug >= 4) {
01280     ALIUtils::dumprm( theRmGlob, "displaceRmGlobAroundLocal: rm local after X " );
01281   }
01282 
01283 //-  std::cout << name() << " " << coor << " " << XCoor << " getEntryRMangle(coor) )" << getEntryRMangle(coor) << std::endl;
01284   if( coor == YCoor ) {
01285     theRmGlob.rotateY( getEntryRMangle(YCoor) + disp );
01286     if(ALIUtils::debug>=5) std::cout << " rmglob rotated around y " <<  getEntryRMangle(YCoor) + disp << std::endl;
01287   }else {
01288     theRmGlob.rotateY( getEntryRMangle(YCoor) );
01289   }
01290   if(ALIUtils::debug >= 4) {
01291     std::cout << "  getEntryRMangle(YCoor) " <<  getEntryRMangle(YCoor) << std::endl;
01292     ALIUtils::dumprm( theRmGlob, "displaceRmGlobAroundLocal: rm local after Y " );
01293   }
01294 
01295   if( coor == ZCoor ) {
01296     theRmGlob.rotateZ( getEntryRMangle(ZCoor) + disp );
01297     if(ALIUtils::debug>=5) std::cout << " rmglob rotated around z " <<  getEntryRMangle(ZCoor) + disp << std::endl;
01298   }else {
01299     theRmGlob.rotateZ( getEntryRMangle(ZCoor) );
01300   }
01301   if(ALIUtils::debug >= 4) {
01302     std::cout << "  getEntryRMangle(ZCoor) " << getEntryRMangle(ZCoor) << std::endl;
01303     ALIUtils::dumprm( theRmGlob, "SetRMLocalFromEntryValues: RM ");
01304   }
01305 
01306   //-  theCentreGlob = CLHEP::Hep3Vector(0.,0.,0.);
01307   if(ALIUtils::debug >= 5 && disp != 0) {
01308     std::cout << this->name() << std::endl;
01309     ALIUtils::dumprm( theRmGlob, "displaceRmGlobAroundLocal: rm local " );
01310   }
01311 
01312 
01313   if( !anglesIsGlobal ) {
01314     SetRMGlobFromRMLocal();
01315   }
01316 
01317   //----- calculate local rot axis with new rm glob
01318   calculateLocalRotationAxisInGlobal();
01319 
01320   //-  theCentreGlob = CLHEP::Hep3Vector(0.,0.,0.);
01321   if(ALIUtils::debug >= 5 && disp != 0) {
01322     std::cout << this->name() << std::endl;
01323     ALIUtils::dumprm( theRmGlob, "displaceRmGlobAroundLocal: rm global " );
01324   }
01325 
01326   if(opto1stRotated != this ) { //own _centre_glob doesn't rotate
01327     setGlobalCentre();
01328     if(ALIUtils::debug >= 5) {
01329       ALIUtils::dump3v( centreGlob(), " centre_glob after rotation" );
01330       ALIUtils::dump3v( centreGlobOriginal(), "         centre_globOriginal() after rotation" );
01331     }
01332   }
01333 
01334   //----------- Displace every component
01335   std::vector<OpticalObject*> vopto;
01336   Model::getComponentOptOs(name(), vopto); 
01337   std::vector<OpticalObject*>::const_iterator vocite;
01338   for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01339     (*vocite)->displaceRmGlobAroundLocal( opto1stRotated, coor, 0.);
01340     //for aroundglobal all components are explicitly rotated disp, for aroundLocal, they will be rotated automatically if the parent is rotated, as the rmGlob is built from scratch
01341   }
01342   
01343 }
01344 

void OpticalObject::displaceRmGlobOriginal ( const OpticalObject opto1stRotated,
const XYZcoor  coor,
const ALIdouble  disp 
)

!temporary, theRmGlobOriginal should disappear

Definition at line 1363 of file OpticalObject.cc.

References centreGlob(), centreGlobOriginal(), TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), ALIUtils::dumprm(), cmsRelvalreport::exit, Model::getComponentOptOs(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), name(), setGlobalCoordinates(), theCentreGlob, theCentreGlobOriginal, theRmGlob, and theRmGlobOriginal.

Referenced by EntryAngleAffAngles::displaceOriginal().

01363 {
01364   if(ALIUtils::debug>=9) std::cout << name() << " DISPLACEORIGRMGLOB " << coor << " disp " << disp << std::endl;
01365   GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
01366   if(gomgr->GlobalOptions()["rotateAroundLocal"] == 0) {
01367     //-------------------- Rotate rotation matrix
01368     if( ALIUtils::debug >= 5 ) ALIUtils::dumprm(theRmGlobOriginal, (name() + ALIstring(" theRmGlobOriginal before displaced ")).c_str() );
01369     switch( coor ) {
01370     case 0:
01371       theRmGlobOriginal.rotateX( disp );
01372       break;
01373     case 1:
01374       theRmGlobOriginal.rotateY( disp );
01375       break;
01376     case 2:
01377       theRmGlobOriginal.rotateZ( disp );
01378       break;
01379     default:
01380       std::cerr << "!!! DISPLACERMGLOB coordinate should be 0-2, not " << coor << std::endl;
01381       exit(2);
01382     }
01383 
01384 
01385     //-------------------- Rotation translate the centre of component OptO
01386     if(ALIUtils::debug>=98)ALIUtils::dump3v( centreGlob(), "angles rotate centre_glob" );
01387     if(ALIUtils::debug>=98)ALIUtils::dump3v( centreGlobOriginal(), "         centreGlobOriginal" );
01388     if(opto1stRotated != this ) { //own _centre_glob doesn't rotate
01389       //---------- Distance to 1st rotated OptO
01390       CLHEP::Hep3Vector radiusOriginal =  centreGlobOriginal() - opto1stRotated->centreGlobOriginal();
01391       CLHEP::Hep3Vector radius_rotated = radiusOriginal;
01392       switch (coor) {
01393       case 0:
01394         radius_rotated.rotateX(disp);
01395         break;
01396       case 1:
01397         radius_rotated.rotateY(disp);
01398         break;
01399       case 2:
01400         radius_rotated.rotateZ(disp);
01401         break;
01402       default:
01403         break;  // already exited in previous switch
01404       }
01405       theCentreGlobOriginal = centreGlobOriginal() + (radius_rotated - radiusOriginal);
01406       if(ALIUtils::debug>=98)ALIUtils::dump3v( centreGlob(), "angle rotate centre_glob" );
01407       if(ALIUtils::debug>=98)ALIUtils::dump3v( centreGlobOriginal(), "         centre_globOriginal()" );
01408     }
01409 
01410     if( ALIUtils::debug >= 5 ) ALIUtils::dumprm(theRmGlobOriginal, (name() + ALIstring(" theRmGlobOriginal displaced ")).c_str() );
01411     
01412     //----------- Displace every OptO component
01413     std::vector<OpticalObject*> vopto;
01414     Model::getComponentOptOs(name(), vopto); 
01415     std::vector<OpticalObject*>::const_iterator vocite;
01416     for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01417       (*vocite)->displaceRmGlobOriginal( opto1stRotated, coor, disp);
01418     }
01419 
01420   } else {
01421     setGlobalCoordinates();
01422     theCentreGlobOriginal = theCentreGlob;
01423     theRmGlobOriginal = theRmGlob; 
01424     //----------- Displace every OptO component
01425     std::vector<OpticalObject*> vopto;
01426     Model::getComponentOptOs(name(), vopto); 
01427     std::vector<OpticalObject*>::const_iterator vocite;
01428     for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01429       (*vocite)->displaceRmGlobOriginal( opto1stRotated, coor, disp);
01430     }
01431     if( ALIUtils::debug >= 5 ) {
01432       ALIUtils::dump3v( theCentreGlob, " displaceRmGlobOriginal " );
01433       ALIUtils::dumprm( theRmGlob, " displaceRmGlobOriginal " );
01434     }
01435   }
01436 
01437 }
01438 

void OpticalObject::displaceRmGlobOriginalOriginal ( const OpticalObject opto1stRotated,
const XYZcoor  coor,
const ALIdouble  disp 
)

!temporary, theRmGlobOriginalOriginal should disappear

Definition at line 1441 of file OpticalObject.cc.

References centreGlob(), centreGlobOriginalOriginal(), TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), ALIUtils::dumprm(), cmsRelvalreport::exit, Model::getComponentOptOs(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), name(), setGlobalCoordinates(), theCentreGlob, theCentreGlobOriginalOriginal, theRmGlob, and theRmGlobOriginalOriginal.

Referenced by EntryAngleAffAngles::displaceOriginalOriginal().

01441 {
01442   if(ALIUtils::debug>=9) std::cout << name() << " DISPLACEORIGRMGLOB " << coor << " disp " << disp << std::endl;
01443   GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
01444   if(gomgr->GlobalOptions()["rotateAroundLocal"] == 0) {
01445     //-------------------- Rotate rotation matrix
01446     if( ALIUtils::debug >= 5 ) ALIUtils::dumprm(theRmGlobOriginalOriginal, (name() + ALIstring(" theRmGlobOriginalOriginal before displaced ")).c_str() );
01447     switch( coor ) {
01448     case 0:
01449       theRmGlobOriginalOriginal.rotateX( disp );
01450       break;
01451     case 1:
01452       theRmGlobOriginalOriginal.rotateY( disp );
01453       break;
01454     case 2:
01455       theRmGlobOriginalOriginal.rotateZ( disp );
01456       break;
01457     default:
01458       std::cerr << "!!! DISPLACERMGLOB coordinate should be 0-2, not " << coor << std::endl;
01459       exit(2);
01460     }
01461 
01462 
01463     //-------------------- Rotation translate the centre of component OptO
01464     if(ALIUtils::debug>=98)ALIUtils::dump3v( centreGlob(), "angles rotate centre_glob" );
01465     if(ALIUtils::debug>=98)ALIUtils::dump3v( centreGlobOriginalOriginal(), "         centreGlobOriginalOriginal" );
01466     if(opto1stRotated != this ) { //own _centre_glob doesn't rotate
01467       //---------- Distance to 1st rotated OptO
01468       CLHEP::Hep3Vector radiusOriginalOriginal =  centreGlobOriginalOriginal() - opto1stRotated->centreGlobOriginalOriginal();
01469       CLHEP::Hep3Vector radius_rotated = radiusOriginalOriginal;
01470       switch (coor) {
01471       case 0:
01472         radius_rotated.rotateX(disp);
01473         break;
01474       case 1:
01475         radius_rotated.rotateY(disp);
01476         break;
01477       case 2:
01478         radius_rotated.rotateZ(disp);
01479         break;
01480       default:
01481         break;  // already exited in previous switch
01482       }
01483       theCentreGlobOriginalOriginal = centreGlobOriginalOriginal() + (radius_rotated - radiusOriginalOriginal);
01484       if(ALIUtils::debug>=98)ALIUtils::dump3v( centreGlob(), "angle rotate centre_glob" );
01485       if(ALIUtils::debug>=98)ALIUtils::dump3v( centreGlobOriginalOriginal(), "         centre_globOriginalOriginal()" );
01486     }
01487 
01488     if( ALIUtils::debug >= 5 ) ALIUtils::dumprm(theRmGlobOriginalOriginal, (name() + ALIstring(" theRmGlobOriginalOriginal displaced ")).c_str() );
01489     
01490     //----------- Displace every OptO component
01491     std::vector<OpticalObject*> vopto;
01492     Model::getComponentOptOs(name(), vopto); 
01493     std::vector<OpticalObject*>::const_iterator vocite;
01494     for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01495       (*vocite)->displaceRmGlobOriginalOriginal( opto1stRotated, coor, disp);
01496     }
01497 
01498   } else {
01499     setGlobalCoordinates();
01500     theCentreGlobOriginalOriginal = theCentreGlob;
01501     theRmGlobOriginalOriginal = theRmGlob; 
01502     //----------- Displace every OptO component
01503     std::vector<OpticalObject*> vopto;
01504     Model::getComponentOptOs(name(), vopto); 
01505     std::vector<OpticalObject*>::const_iterator vocite;
01506     for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01507       (*vocite)->displaceRmGlobOriginalOriginal( opto1stRotated, coor, disp);
01508     }
01509     if( ALIUtils::debug >= 5 ) {
01510       ALIUtils::dump3v( theCentreGlob, " displaceRmGlobOriginalOriginal " );
01511       ALIUtils::dumprm( theRmGlob, " displaceRmGlobOriginalOriginal " );
01512     }
01513   }
01514 
01515 }
01516 

bool OpticalObject::eq2ang ( double  ang1,
double  ang2 
)

Definition at line 1881 of file OpticalObject.cc.

References diff, and diff2pi().

01881 {
01882   bool beq = true;
01883 
01884   double diff = diff2pi( ang1, ang2 );
01885   if( diff > 0.00001 ) {
01886     if( fabs( diff - 2*M_PI ) > 0.00001 ) {
01887       //-      std::cout << " diff " << diff << " " << ang1 << " " << ang2 << std::endl;
01888       beq = false;
01889     }
01890   }
01891 
01892   return beq;
01893 }
01894 

const std::vector< Entry* >& OpticalObject::ExtraEntryList (  )  const [inline]

Definition at line 69 of file OpticalObject.h.

References theExtraEntryVector.

Referenced by Measurement::addAffectingEntriesFromOptO(), copyData(), Model::deleteOptO(), extraEntryNo(), OptOSensor2D::fastTraversesLightRay(), Fit::findEntryFitPosition(), CocoaAnalyzer::GetOptAlignInfoFromOptO(), resetOriginalOriginalCoordinates(), CocoaToDDLMgr::specPar(), and OptOUserDefined::userDefinedBehaviour().

00069                                                     {
00070     return theExtraEntryVector;
00071   }

const ALIint OpticalObject::extraEntryNo ( const ALIstring entry_name  )  const

Definition at line 1542 of file OpticalObject.cc.

References begin, and ExtraEntryList().

Referenced by Entry::displace(), Entry::displaceOriginal(), Entry::displaceOriginalOriginal(), OptOSensor2D::fastTraversesLightRay(), findExtraEntryValueIfExists(), findExtraEntryValueMustExist(), and Entry::valueDisplaced().

01542 {
01543   //-  std::cout << ExtraEntryList().size() << "entry name " << entry_name << std::endl;
01544 
01545   std::vector<Entry*>::const_iterator vecite;
01546   for (vecite = ExtraEntryList().begin(); vecite != ExtraEntryList().end(); vecite++) {
01547     //-    std::cout <<"in entryno" << (*vecite)->name() << entry_name << std::endl; 
01548     if ((*vecite)->name() == entry_name ) {
01549       return (vecite - ExtraEntryList().begin());
01550     } 
01551     //-    std::cout <<"DD in entryno" << (*vecite)->name() << entry_name << std::endl; 
01552   }
01553   //-  std::cout << "!!: extra entry name not found: " << entry_name << " in OptO " << name() << std::endl;
01554   //  exit(2);
01555   return ALIint(-1);
01556 }
01557 

std::vector< ALIdouble >& OpticalObject::ExtraEntryValueList (  )  [inline]

Definition at line 73 of file OpticalObject.h.

References theExtraEntryValueVector.

Referenced by resetGlobalCoordinates(), resetOriginalOriginalCoordinates(), setOriginalEntryValues(), and Entry::valueDisplaced().

00073                                                 {
00074     return theExtraEntryValueVector;
00075   }

const std::vector< ALIdouble >& OpticalObject::ExtraEntryValueOriginalList (  )  [inline]

Definition at line 77 of file OpticalObject.h.

References theExtraEntryValueOriginalVector.

Referenced by OptOSensor2D::fastTraversesLightRay(), resetGlobalCoordinates(), and Entry::valueDisplaced().

00077                                                               {
00078     return theExtraEntryValueOriginalVector;
00079   }

const std::vector< ALIdouble >& OpticalObject::ExtraEntryValueOriginalOriginalList (  )  [inline]

Definition at line 80 of file OpticalObject.h.

References theExtraEntryValueOriginalOriginalVector.

00080                                                                       {
00081     return theExtraEntryValueOriginalOriginalVector;
00082   }

void OpticalObject::fastDeviatesLightRay ( LightRay lightray  )  [virtual]

Reimplemented in OptOCubeSplitter, OptOMirror, OptOModifiedRhomboidPrism, OptOOpticalSquare, and OptOPlateSplitter.

Definition at line 918 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, name(), and type().

Referenced by participateInMeasurement().

00919 {
00920   std::cerr << "!!! Optical Object " << name() << " of type " << type() << " does not implement deviation (:D)" << std::endl;
00921   std::cerr << " Please read documentation for this object type" << std::endl;
00922   exit(1);
00923 }

void OpticalObject::fastTraversesLightRay ( LightRay lightray  )  [virtual]

Reimplemented in OptOCOPS, OptOCubeSplitter, OptOMirror, OptOModifiedRhomboidPrism, OptOOpticalSquare, OptOPlateSplitter, and OptOSensor2D.

Definition at line 929 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, name(), and type().

Referenced by participateInMeasurement().

00930 {
00931   std::cerr << "!!! Optical Object " << name() << " of type " << type() << " does not implement the light traversing (:T)" << std::endl;
00932   std::cerr << " Please read documentation for this object type" << std::endl;
00933   exit(1);
00934 }

void OpticalObject::fillCoordinateEntry ( const ALIstring coor_name,
const std::vector< ALIstring > &  wordlist 
) [private]

Definition at line 313 of file OpticalObject.cc.

References addCoordinateEntryToList(), Model::addEntryToList(), TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, Entry::fill(), Entry::fillName(), name(), and Entry::setOptOCurrent().

Referenced by constructFromOptAligInfo(), copyData(), and readCoordinates().

00314 {
00315 
00316   //---------- Select which type of entry to create
00317   Entry* entry = 0;
00318   if ( coor_type == ALIstring("centre") ) {
00319     entry = new EntryLengthAffCentre( coor_type );
00320   }else if ( coor_type == ALIstring("angles") ) {
00321     entry = new EntryAngleAffAngles( coor_type );
00322   } else {
00323     std::cerr << " !!! FATAL ERROR at  OpticalObject::fillCoordinateEntry : wrong coordinate type " << coor_type << std::endl;
00324     exit(1);
00325   }
00326 
00327   //---------- Set link from entry to OptO it belongs to
00328   entry->setOptOCurrent( this );
00329   //----- Name is filled from here to include 'centre' or 'angles'
00330   ALIstring name = coor_type + "_" + wordlist[0];
00331   entry->fillName( name );
00332   //---------- Fill entry with data read
00333   entry->fill( wordlist );
00334 
00335   //---------- Add entry to lists
00336   Model::addEntryToList( entry );
00337   addCoordinateEntryToList( entry );
00338 
00339 }

void OpticalObject::fillExtraEntry ( std::vector< ALIstring > &  wordlist  )  [protected, virtual]

Reimplemented in OptOSensor2D.

Definition at line 165 of file OpticalObject.cc.

References Model::addEntryToList(), addExtraEntryToList(), addExtraEntryValueToList(), TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), lat::endl(), cmsRelvalreport::exit, Entry::fill(), Entry::fillName(), Entry::setOptOCurrent(), Entry::value(), and Entry::ValueDimensionFactor().

Referenced by constructFromOptAligInfo(), copyData(), OptOSensor2D::fillExtraEntry(), and readExtraEntries().

00166 {
00167 
00168   //- if(ALIUtils::debug >= 5) std::cout << "fillExtraEntry wordlist0 " << wordlist[0].c_str() << std::endl;
00169 
00170   //---------- Check which type of entry to create 
00171   Entry* xentry;
00172   if ( wordlist[0] == ALIstring("length") ) {
00173     xentry = new EntryLength( wordlist[0] );
00174   } else if ( wordlist[0] == ALIstring("angle") ) {
00175     xentry = new EntryAngle( wordlist[0] );
00176   } else if ( wordlist[0] == ALIstring("nodim") ) {
00177     xentry = new EntryNoDim( wordlist[0] );
00178   } else { 
00179     std::cerr << "!!ERROR: Exiting...  unknown type of Extra Entry " << wordlist[0] << std::endl;
00180     ALIUtils::dumpVS( wordlist, " Only 'length', 'angle' or 'nodim' are allowed ", std::cerr );
00181     exit(2);
00182   }
00183 
00184   if( ALIUtils::debug>=99) {
00185     ALIUtils::dumpVS( wordlist, "fillExtraEntry: ", std::cout );
00186   }
00187   //---------- Erase first word of line read (type of entry)
00188   wordlist.erase( wordlist.begin() );
00189 
00190   if( ALIUtils::debug>=99) {
00191     ALIUtils::dumpVS( wordlist, "fillExtraEntry: ", std::cout );
00192   }
00193 
00194   //---------- Set link from entry to OptO it belongs to
00195   xentry->setOptOCurrent( this );
00196   //----- Name is filled from here to be consistent with fillCoordinate
00197   xentry->fillName( wordlist[0] );
00198   //---------- Fill entry with data in line read 
00199   xentry->fill( wordlist );
00200 
00201   //---------- Add entry to entry lists
00202   Model::addEntryToList( xentry );
00203   addExtraEntryToList( xentry );
00204 
00205   if(ALIUtils::debug >=5) std::cout << "fillExtraEntry: xentry_value" <<  xentry->value()<<xentry->ValueDimensionFactor() << std::endl;
00206 
00207   //---------- Add entry value to list 
00208   addExtraEntryValueToList( xentry->value() );
00209 
00210   
00211 }

virtual void OpticalObject::fillIguana (  )  [inline, virtual]

Definition at line 56 of file OpticalObject.h.

00056 { };

virtual void OpticalObject::fillVRML (  )  [inline, virtual]

Definition at line 55 of file OpticalObject.h.

00055 { } ;

const ALIdouble OpticalObject::findExtraEntryValue ( const ALIstring eename  )  const

Definition at line 1563 of file OpticalObject.cc.

Referenced by OptOOpticalSquare::calculateFaces(), OptOCubeSplitter::detailedDeviatesLightRay(), OptOMirror::detailedDeviatesLightRay(), OptOCubeSplitter::detailedTraversesLightRay(), OptOPlateSplitter::detailedTraversesLightRay(), OptOMirror::detailedTraversesLightRay(), OptOSensor2D::detailedTraversesLightRay(), OptOPlateSplitter::fastDeviatesLightRay(), OptOPlateSplitter::fastTraversesLightRay(), OptOMirror::fastTraversesLightRay(), OptOSensor2D::fastTraversesLightRay(), findExtraEntryValueIfExists(), findExtraEntryValueMustExist(), getPlate(), OptOModifiedRhomboidPrism::getRotatedPlate(), OptOCubeSplitter::getUpperPlate(), OptOCOPS::makeMeasurement(), LightRay::shiftAndDeviateWhileTraversing(), and OptOUserDefined::userDefinedBehaviour().

01565                      {
01566     const ALIdouble Pentry_value = *(theExtraEntryValueVector.begin() + entryNo);
01567     retval = (Pentry_value);
01568   } else {
01569     //    if(ALIUtils::debug >= 0) std::cerr << "!!Warning: entry not found; " << eename << ", in object " << name() << " returns 0. " << std::endl;
01570     ALIdouble check;
01571     GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
01572     gomgr->getGlobalOptionValue("check_extra_entries", check );
01573     if( check == 1) {
01574     //    if( check <= 1) {//exit temporarily
01575       std::cerr << "!!OpticalObject:ERROR: entry not found; " << eename << ", in object " << name() << std::endl;
01576       exit(1); 
01577     } else {
01578       //-      std::cerr << "!!temporal WARNING in OpticalObject::findExtraEntryValue: entry not found; " << eename << ", in object " << name() << std::endl;
01579       retval = 0.;
01580     }
01581   }
01582 
01583   if(ALIUtils::debug >= 5)  std::cout << " OpticalObject::findExtraEntryValue: " << eename << " = " << retval << std::endl;
01584   return retval;
01585 }
01586 

const ALIbool OpticalObject::findExtraEntryValueIfExists ( const ALIstring eename,
ALIdouble value 
) const

Definition at line 1608 of file OpticalObject.cc.

References extraEntryNo(), and findExtraEntryValue().

Referenced by OptOOpticalSquare::calculateFaces(), OptOPlateSplitter::fastDeviatesLightRay(), OptOPlateSplitter::fastTraversesLightRay(), OptOMirror::fastTraversesLightRay(), OptOSensor2D::fastTraversesLightRay(), OptOCubeSplitter::getMiddlePlate(), OptOModifiedRhomboidPrism::getRotatedPlate(), and OptOCOPS::makeMeasurement().

01608 {
01609   value = findExtraEntryValue( eename );
01610   const ALIint entryNo = extraEntryNo( eename );
01611   //-    std::cout << eename << " entryNo " << entryNo << " value " << value << std::endl;
01612   return( entryNo >= 0 );
01613 }
01614 

const ALIdouble OpticalObject::findExtraEntryValueMustExist ( const ALIstring eename  )  const

Definition at line 1592 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, cmsRelvalreport::exit, extraEntryNo(), findExtraEntryValue(), and name().

Referenced by OptOOpticalSquare::calculateFaces(), OptOOpticalSquare::detailedDeviatesLightRay(), OptOMirror::detailedDeviatesLightRay(), OptOModifiedRhomboidPrism::detailedDeviatesLightRay(), OptOModifiedRhomboidPrism::detailedTraversesLightRay(), OptOSensor2D::detailedTraversesLightRay(), and OptOOpticalSquare::detailedTraversesLightRay().

01592 {
01593   ALIdouble entry = findExtraEntryValue( eename );
01594   const ALIint entryNo = extraEntryNo( eename );
01595   if( entryNo < 0) {
01596     std::cerr << "!!OpticalObject::findExtraEntryValueMustExist: ERROR: entry not found; " << eename << ", in object " << name() << std::endl;
01597     exit(1); 
01598   }
01599   //  if(ALIUtils::debug >= 5)  std::cout << " OpticalObject::findExtraEntryValueMustExist: " << eename << " = " << entry << std::endl;
01600   return entry;
01601 }
01602 

std::vector< ALIstring > OpticalObject::getCoordinateFromOptAlignParam ( const OpticalAlignParam oaParam  ) 

Definition at line 2158 of file OpticalObject.cc.

References ALIUtils::debug, ALIUtils::dumpVS(), OpticalAlignParam::name(), OpticalAlignParam::quality(), OpticalAlignParam::sigma(), and OpticalAlignParam::value().

Referenced by constructFromOptAligInfo().

02158 {
02159   char chartmp[20];
02160   std::vector<ALIstring> wordlist;
02161   wordlist.push_back( oaParam.name() );
02162   gcvt( oaParam.value(), 10, chartmp );
02163   wordlist.push_back( chartmp );
02164   gcvt( oaParam.sigma(), 10, chartmp );
02165   wordlist.push_back( chartmp );
02166   if( oaParam.quality() == 0 ) {
02167     wordlist.push_back("fix");
02168   } else if( oaParam.quality() == 1 ) {
02169     wordlist.push_back("cal");
02170   } else if( oaParam.quality() == 2 ) {
02171     wordlist.push_back("unk");
02172   }
02173   
02174   if ( ALIUtils::debug >= 5 ) {
02175     ALIUtils::dumpVS( wordlist, " getCoordinateFromOptAlignParam " + oaParam.name() );
02176   }
02177 
02178   return wordlist;
02179 
02180 }
02181 

CLHEP::Hep3Vector OpticalObject::getDisplacementInLocalCoordinates ( const XYZcoor  coor,
const ALIdouble  disp 
)

Definition at line 1063 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, lat::endl(), and cmsRelvalreport::exit.

01063 {
01064   CLHEP::Hep3Vector dispVec;
01065   switch( coor ) {
01066   case 0:
01067     dispVec = CLHEP::Hep3Vector( disp, 0., 0. );
01068     break;
01069   case 1:
01070     dispVec = CLHEP::Hep3Vector( 0., disp, 0. );
01071     break;
01072   case 2:
01073     dispVec = CLHEP::Hep3Vector( 0., 0., disp );
01074     break;
01075   default:
01076     std::cerr << "!!! DISPLACECENTREGLOB coordinate should be 0-2, not " << coor << std::endl; 
01077     exit(2);
01078   }
01079 
01080   return dispVec;
01081 }
01082 

CLHEP::Hep3Vector OpticalObject::getDispVec ( const XYZcoor  coor,
const ALIdouble  disp 
) [private]

Definition at line 1989 of file OpticalObject.cc.

References ALIUtils::debug, ALIUtils::dump3v(), ALIUtils::dumprm(), parent(), rmGlob(), and rmt.

Referenced by displaceCentreGlob(), displaceCentreGlobOriginal(), and displaceCentreGlobOriginalOriginal().

01989 {
01990   CLHEP::Hep3Vector dispVec;
01991   switch (coor) {
01992   case 0:
01993     dispVec = CLHEP::Hep3Vector( disp, 0., 0. );
01994     break;
01995   case 1:
01996     dispVec = CLHEP::Hep3Vector( 0., disp, 0. );
01997     break;
01998   case 2:
01999     dispVec = CLHEP::Hep3Vector( 0., 0., disp );
02000     break;
02001   default:
02002     break;  // already exited in previous switch
02003   }
02004   //-  CLHEP::Hep3Vector dispVec = getDisplacementInLocalCoordinates( coor, disp); 
02005   if ( ALIUtils::debug >= 5 ) {
02006     ALIUtils::dump3v( dispVec, " dispVec in local " );
02007     CLHEP::HepRotation rmt = parent()->rmGlob();
02008     ALIUtils::dumprm( rmt, "parent rmGlob ");
02009   }
02010   dispVec = parent()->rmGlob() * dispVec;
02011   if ( ALIUtils::debug >= 5 ) ALIUtils::dump3v( dispVec, " dispVec in global " );
02012 
02013   return dispVec;
02014 }
02015 

const double OpticalObject::getEntryCentre ( const ALIstring coor  )  const

Definition at line 2048 of file OpticalObject.cc.

References ce, theCoordinateEntryVector, Entry::value(), Entry::valueDisplacementByFitting(), XCoor, YCoor, and ZCoor.

02048 {
02049   XYZcoor coor = XCoor;
02050   if( coorstr == "X" ) {
02051     coor = XCoor;
02052   }else if( coorstr == "Y" ) {
02053     coor = YCoor;
02054   }else  if( coorstr == "Z" ) {
02055     coor = ZCoor;
02056   } 
02057   Entry* ce = theCoordinateEntryVector[coor];
02058   //  std::cout << coor << " getEntryCentre " << ce->value() << " + " << ce->valueDisplacementByFitting() << std::endl; 
02059   return ce->value() + ce->valueDisplacementByFitting();
02060 } 
02061 

const double OpticalObject::getEntryCentre ( const XYZcoor  coor  )  const

Definition at line 2039 of file OpticalObject.cc.

References ce, theCoordinateEntryVector, Entry::value(), and Entry::valueDisplacementByFitting().

Referenced by SetCentreLocalFromEntryValues().

02039 {
02040   Entry* ce = theCoordinateEntryVector[coor];
02041   //  std::cout << coor << " getEntryCentre " << ce->value() << " + " << ce->valueDisplacementByFitting() << std::endl; 
02042   return ce->value() + ce->valueDisplacementByFitting();
02043 }
02044 

const double OpticalObject::getEntryRMangle ( const ALIstring coor  )  const

Definition at line 2072 of file OpticalObject.cc.

References theCoordinateEntryVector, Entry::value(), Entry::valueDisplacementByFitting(), XCoor, YCoor, and ZCoor.

02072 {
02073   XYZcoor coor = XCoor;
02074   if( coorstr == "X" ) {
02075     coor = XCoor;
02076   }else if( coorstr == "Y" ) {
02077     coor = YCoor;
02078   }else  if( coorstr == "Z" ) {
02079     coor = ZCoor;
02080   }
02081  Entry* ce = theCoordinateEntryVector[coor+3];
02082   //  std::cout << coor << " getEntryRMangle " << ce->value() << " + " << ce->valueDisplacementByFitting() << " size = " << theCoordinateEntryVector.size() << " ce = " << ce << " entry name " << ce->name() << " opto name " << name() << std::endl; 
02083   
02084   return ce->value() + ce->valueDisplacementByFitting();
02085 }
02086 

const double OpticalObject::getEntryRMangle ( const XYZcoor  coor  )  const

Definition at line 2064 of file OpticalObject.cc.

Referenced by buildRmFromEntryValuesOriginalOriginal(), displaceRmGlobAroundLocal(), FittedEntriesReader::readFittedEntriesFromFile(), SetRMGlobFromRMLocal(), and SetRMLocalFromEntryValues().

std::vector< double > OpticalObject::getLocalRotationAngles ( std::vector< Entry * >  entries  )  const

Definition at line 1746 of file OpticalObject.cc.

References getRotationAnglesInOptOFrame(), and theParent.

Referenced by CocoaAnalyzer::GetOptAlignInfoFromOptO().

01746 {
01747   return getRotationAnglesInOptOFrame( theParent, entries );
01748 }
01749 

CocoaMaterialElementary* OpticalObject::getMaterial (  )  const [inline]

Definition at line 258 of file OpticalObject.h.

References theMaterial.

Referenced by CocoaToDDLMgr::lv().

00258                                               {
00259    return theMaterial; }

ALIPlane OpticalObject::getPlate ( const ALIbool  forwardPlate,
const ALIbool  applyWedge 
)

Definition at line 987 of file OpticalObject.cc.

References centreGlob(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), ALIUtils::dumprm(), lat::endl(), findExtraEntryValue(), name(), rmGlob(), rmt, and width.

Referenced by OptOCubeSplitter::detailedDeviatesLightRay(), OptOMirror::detailedDeviatesLightRay(), OptOPlateSplitter::detailedDeviatesLightRay(), OptOModifiedRhomboidPrism::detailedDeviatesLightRay(), OptOModifiedRhomboidPrism::detailedTraversesLightRay(), OptOCubeSplitter::detailedTraversesLightRay(), OptOPlateSplitter::detailedTraversesLightRay(), OptOMirror::detailedTraversesLightRay(), OptOSensor2D::detailedTraversesLightRay(), OptOModifiedRhomboidPrism::fastDeviatesLightRay(), OptOPlateSplitter::fastDeviatesLightRay(), OptOMirror::fastDeviatesLightRay(), OptOPlateSplitter::fastTraversesLightRay(), OptOMirror::fastTraversesLightRay(), OptOCubeSplitter::fastTraversesLightRay(), OptOModifiedRhomboidPrism::fastTraversesLightRay(), and OptOUserDefined::userDefinedBehaviour().

00987 {
00988   if (ALIUtils::debug >= 4) std::cout << "% LR: GET PLATE " << name() << " forward= " << forwardPlate << std::endl;
00989   //---------- Get OptO variables
00990   const ALIdouble width = (findExtraEntryValue("width"));
00991 
00992   //---------- Get centre and normal of plate
00993   //----- Get plate normal before wedge (Z axis of OptO)
00994   CLHEP::Hep3Vector ZAxis(0.,0.,1.);
00995   CLHEP::HepRotation rmt = rmGlob();
00996   CLHEP::Hep3Vector plate_normal = rmt*ZAxis;
00997 
00998   //----- plate centre = OptO centre +/- 1/2 width before wedge
00999   CLHEP::Hep3Vector plate_point = centreGlob();
01000   //--- Add to it half of the width following the direction of the plate normal. -1/2 if it is forward plate, +1/2 if it is backward plate
01001   ALIdouble normal_sign = -forwardPlate*2 + 1;
01002   plate_point += normal_sign * width/2. * plate_normal;
01003   //-  if (ALIUtils::debug >= 4) std::cout << "width = " << width <<std::endl;
01004   if (ALIUtils::debug >= 3) {
01005     ALIUtils::dump3v( plate_point, "plate_point");
01006     ALIUtils::dump3v( plate_normal, "plate_normal before wedge");
01007     ALIUtils::dumprm( rmt, "rmt before wedge" );
01008   }
01009 
01010   if(applyWedge) {
01011     ALIdouble wedge;
01012     wedge = findExtraEntryValue("wedge");
01013     if( wedge != 0. ){
01014       //---------- Rotate plate normal by 1/2 wedge angles
01015       CLHEP::Hep3Vector XAxis(1.,0.,0.);
01016       XAxis = rmt*XAxis;
01017       plate_normal.rotate( normal_sign * wedge/2., XAxis );
01018       if (ALIUtils::debug >= 3) ALIUtils::dump3v( plate_normal, "plate_normal after wedgeX ");
01019       if (ALIUtils::debug >= 4) ALIUtils::dump3v( XAxis, "X Axis for applying wedge ");
01020       CLHEP::Hep3Vector YAxis(0.,1.,0.);
01021       YAxis = rmt*YAxis;
01022       plate_normal.rotate( normal_sign * wedge/2., YAxis );
01023       if (ALIUtils::debug >= 3) ALIUtils::dump3v( plate_normal, "plate_normal after wedgeY ");
01024       if (ALIUtils::debug >= 4) ALIUtils::dump3v( YAxis, "Y Axis for applying wedge ");
01025     }
01026   }
01027 
01028   //---------- Return plate plane
01029   return ALIPlane(plate_point, plate_normal);
01030 
01031 }
01032 

std::vector<double> OpticalObject::getRotationAnglesFromMatrix ( HepRotation &  rmLocal,
std::vector< Entry * >  entries 
) const

Referenced by getRotationAnglesInOptOFrame(), and EntryAngleAffAngles::valueDisplaced().

std::vector< double > OpticalObject::getRotationAnglesInOptOFrame ( const OpticalObject optoAncestor,
std::vector< Entry * >  entries 
) const

Definition at line 1752 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dumprm(), cmsRelvalreport::exit, getRotationAnglesFromMatrix(), name(), rmGlob(), rmLocal(), theRmGlob, and theRmGlobOriginal.

Referenced by getLocalRotationAngles(), and Fit::printRotationAnglesInOptOFrame().

01752 {
01753   CLHEP::HepRotation rmParent = optoAncestor->rmGlob();  //ORIGINAL ?????????????????
01754   CLHEP::HepRotation rmLocal = rmParent.inverse() * theRmGlob;
01755      
01756   //I was using theRmGlobOriginal, assuming it has been set to theRmGlob already, check it, in case it may have other consequences
01757   if( theRmGlobOriginal != theRmGlob ){
01758     std::cerr << " !!!FATAL ERROR: OpticalObject::getRotationAnglesInOptOFrame   theRmGlobOriginal != theRmGlob " << std::endl;
01759     ALIUtils::dumprm( theRmGlobOriginal, " theRmGlobOriginal ");
01760     ALIUtils::dumprm( theRmGlob, " theRmGlob ");
01761     exit(1);
01762   }
01763 
01764   if( ALIUtils::debug >= 5 ) {
01765     std::cout << " OpticalObject::getRotationAnglesInOptOFrame " << name() << " optoAncestor " << optoAncestor->name() << std::endl;
01766     ALIUtils::dumprm( rmParent, " rm parent ");
01767     ALIUtils::dumprm( rmLocal, " rm local ");
01768     ALIUtils::dumprm( theRmGlobOriginal, " theRmGlobOriginal ");
01769     ALIUtils::dumprm( theRmGlob, " theRmGlob ");
01770   }
01771   return getRotationAnglesFromMatrix( rmLocal, entries );
01772 
01773 }
01774 

CocoaSolidShape* OpticalObject::getSolidShape (  )  const [inline]

Definition at line 260 of file OpticalObject.h.

References theSolidShape.

00260                                         {
00261    return theSolidShape; }

Hep3Vector OpticalObject::getZAxis (  )  [inline]

Definition at line 180 of file OpticalObject.h.

References rmGlob(), and rmt.

Referenced by OptOMirror::detailedDeviatesLightRay().

00180                         {
00181     Hep3Vector ZAxis(0.,0.,1.);
00182     HepRotation rmt = rmGlob();
00183     ZAxis = rmt*ZAxis;
00184     return ZAxis;
00185   }

const uint32_t OpticalObject::ID (  )  const [inline]

Definition at line 121 of file OpticalObject.h.

References theCmsSwID.

00121 { return theCmsSwID; }

const ALIstring OpticalObject::longName (  )  const [inline]

Definition at line 233 of file OpticalObject.h.

References name().

Referenced by buildRmFromEntryValuesOriginalOriginal(), Fit::dumpFittedValuesInAllAncestorFrames(), Entry::fill(), FittedEntry::FittedEntry(), readCoordinates(), OpticalObjectMgr::registerMe(), and SetRMGlobFromRMLocal().

00233                                   { 
00234     return name();
00235   }

void OpticalObject::makeMeasurement ( LightRay lightray,
Measurement meas 
) [virtual]

Reimplemented in OptOCOPS, OptODistancemeter, OptODistancemeter3dim, OptOSensor2D, and OptOTiltmeter.

Definition at line 962 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, name(), and type().

Referenced by participateInMeasurement().

00963 {
00964   std::cerr << "!!! Optical Object " << name() << " of type " << type() << " does not implement making measurement (:M)" << std::endl;
00965   std::cerr << " Please read documentation for this object type" << std::endl;  
00966   exit(1);
00967 }

Measurement* OpticalObject::meas (  )  [inline]

Definition at line 241 of file OpticalObject.h.

References theCurrentMeas.

00241                       {
00242     return theCurrentMeas;
00243   }

const ALIstring& OpticalObject::name (  )  const [inline]

Definition at line 60 of file OpticalObject.h.

References theName.

Referenced by Measurement::addAffectingEntriesFromOptO(), Entry::addFittedDisplacementToValue(), Measurement::buildOptOList(), buildRmFromEntryValuesOriginalOriginal(), buildWordList(), calculateLocalRotationAxisInGlobal(), construct(), copyData(), createComponentOptOs(), createNewOptO(), OptOPinhole::defaultBehaviour(), defaultBehaviour(), Model::deleteOptO(), Measurement::DerivativeRespectEntry(), OptOOpticalSquare::detailedDeviatesLightRay(), OptOCubeSplitter::detailedDeviatesLightRay(), OptOMirror::detailedDeviatesLightRay(), detailedDeviatesLightRay(), OptOPlateSplitter::detailedDeviatesLightRay(), OptOModifiedRhomboidPrism::detailedDeviatesLightRay(), OptOModifiedRhomboidPrism::detailedTraversesLightRay(), OptOCubeSplitter::detailedTraversesLightRay(), OptOPlateSplitter::detailedTraversesLightRay(), OptOSensor2D::detailedTraversesLightRay(), OptOMirror::detailedTraversesLightRay(), OptOOpticalSquare::detailedTraversesLightRay(), detailedTraversesLightRay(), displaceCentreGlob(), displaceCentreGlobOriginal(), displaceCentreGlobOriginalOriginal(), displaceRmGlobAroundGlobal(), displaceRmGlobAroundLocal(), displaceRmGlobOriginal(), displaceRmGlobOriginalOriginal(), Fit::dumpEntryAfterFit(), OptOOpticalSquare::fastDeviatesLightRay(), OptOCubeSplitter::fastDeviatesLightRay(), OptOModifiedRhomboidPrism::fastDeviatesLightRay(), OptOPlateSplitter::fastDeviatesLightRay(), fastDeviatesLightRay(), OptOMirror::fastDeviatesLightRay(), OptOPlateSplitter::fastTraversesLightRay(), OptOMirror::fastTraversesLightRay(), OptOCubeSplitter::fastTraversesLightRay(), OptOCOPS::fastTraversesLightRay(), fastTraversesLightRay(), OptOModifiedRhomboidPrism::fastTraversesLightRay(), OptOSensor2D::fastTraversesLightRay(), fillCoordinateEntry(), Model::fillCopyComponentList(), Entry::fillFromInputFileQuality(), Entry::fillFromReportOutFileValue(), findExtraEntryValueMustExist(), Model::getComponentOptOs(), OptOCubeSplitter::getMiddlePlate(), CocoaAnalyzer::GetOptAlignInfoFromOptO(), getPlate(), Measurement::getPreviousOptO(), OptOModifiedRhomboidPrism::getRotatedPlate(), getRotationAnglesInOptOFrame(), OptOCubeSplitter::getUpperPlate(), LightRay::LightRay(), longName(), Entry::longName(), CocoaToDDLMgr::lv(), OptODistancemeter::makeMeasurement(), OptODistancemeter3dim::makeMeasurement(), makeMeasurement(), OptOTiltmeter::makeMeasurement(), OptOSensor2D::makeMeasurement(), OptOCOPS::makeMeasurement(), CocoaToDDLMgr::measurementsAsSpecPars(), Fit::printCentreInOptOFrame(), propagateGlobalRMOriginalOriginalChangeToChildren(), CocoaToDDLMgr::pv(), resetGlobalCoordinates(), resetOriginalOriginalCoordinates(), setAnglesNull(), SetCentreGlobFromCentreLocal(), setGlobalCoordinatesOfComponents(), setGlobalRMOriginalOriginal(), FittedEntriesSet::SetOptOEntries(), SetRMGlobFromRMLocal(), shortName(), CocoaToDDLMgr::specPar(), LightRay::startLightRay(), transformCylindrical2Cartesian(), OptOUserDefined::userDefinedBehaviour(), userDefinedBehaviour(), Entry::valueDisplaced(), EntryLengthAffCentre::valueDisplaced(), and EntryAngleAffAngles::valueDisplaced().

00060 { return theName; };

const OpticalObject* OpticalObject::parent (  )  const [inline]

Definition at line 62 of file OpticalObject.h.

References theParent.

Referenced by Measurement::addAffectingEntriesFromOptO(), buildRmFromEntryValuesOriginalOriginal(), centreLocal(), Fit::dumpFittedValues(), Fit::dumpFittedValuesInAllAncestorFrames(), getDispVec(), CocoaAnalyzer::GetOptAlignInfoFromOptO(), OptOSensor2D::makeMeasurement(), CocoaToDDLMgr::pv(), SetCentreGlobFromCentreLocal(), setGlobalRMOriginalOriginal(), SetRMGlobFromRMLocal(), SetRMGlobFromRMLocalOriginalOriginal(), and EntryAngleAffAngles::valueDisplaced().

00062 { return theParent;};

void OpticalObject::participateInMeasurement ( LightRay lightray,
Measurement meas,
const ALIstring behav 
) [virtual]

Reimplemented in OptOLens, and OptORisleyPrism.

Definition at line 882 of file OpticalObject.cc.

References defaultBehaviour(), detailedDeviatesLightRay(), detailedTraversesLightRay(), fastDeviatesLightRay(), fastTraversesLightRay(), makeMeasurement(), setMeas(), and userDefinedBehaviour().

00883 {
00884   //---------- see if light traverses or reflects
00885   setMeas( &meas );
00886   if ( behav == " " ) {
00887     defaultBehaviour( lightray, meas );
00888   } else if ( behav == "D" || behav == "DD" ) {
00889     detailedDeviatesLightRay( lightray );
00890   } else if ( behav == "T" || behav == "DT" ) {
00891     detailedTraversesLightRay( lightray );
00892   } else if ( behav == "FD" ) {
00893     fastDeviatesLightRay( lightray );
00894   } else if ( behav == "FT" ) {
00895     fastTraversesLightRay( lightray );
00896   } else if ( behav == "M" ) {
00897     makeMeasurement( lightray, meas );
00898   } else {
00899     userDefinedBehaviour( lightray, meas, behav);
00900   }
00901 }

void OpticalObject::propagateGlobalRMOriginalOriginalChangeToChildren ( const HepRotation &  rmorioriold,
const HepRotation &  rmoriorinew 
)

Definition at line 685 of file OpticalObject.cc.

References GenMuonPlsPt100GeV_cfg::cout, ALIUtils::dumprm(), lat::endl(), Model::getComponentOptOs(), name(), rmGlobOriginalOriginal(), and theRmGlobOriginalOriginal.

00686 {
00687   std::cout << " propagateGlobalRMOriginalOriginalChangeToChildren OptO " << name() << std::endl;
00688   ALIUtils::dumprm(rmGlobOriginalOriginal()," setGlobalRMOriginalOriginal old ");
00689   theRmGlobOriginalOriginal = rmoriorinew.inverse() * theRmGlobOriginalOriginal;
00690   theRmGlobOriginalOriginal = rmorioriold * theRmGlobOriginalOriginal;
00691   ALIUtils::dumprm(rmGlobOriginalOriginal()," setGlobalRMOriginalOriginal new ");
00692  
00693  //----------- Reset RMGlobOriginalOriginal() of every component
00694   std::vector<OpticalObject*> vopto;
00695   ALIbool igetood = Model::getComponentOptOs(name(), vopto); 
00696   if( !igetood ) {
00697     //    std::cout << " NO MORE COMPONENTS IN THIS OptO" << name() << std::endl ; 
00698     return;
00699   }
00700   std::vector<OpticalObject*>::const_iterator vocite;
00701   for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
00702     //    HepRotation rmoriorid = buildRmFromEntryValues();
00703     (*vocite)->propagateGlobalRMOriginalOriginalChangeToChildren( rmorioriold, rmoriorinew );
00704   }  
00705 
00706 } 

void OpticalObject::readCoordinates ( const ALIstring coor_type_read,
const ALIstring coor_type_expected,
ALIFileIn filein 
) [private]

Definition at line 218 of file OpticalObject.cc.

References anglesIsGlobal, centreIsGlobal, TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), ALIFileIn::ErrorInLine(), cmsRelvalreport::exit, fillCoordinateEntry(), EntryMgr::getInstance(), ALIFileIn::getWordsInLine(), longName(), transformCylindrical2Cartesian(), and transformSpherical2Cartesian().

Referenced by readData().

00219 {
00220 
00221   ALIstring coor_type_reads = coor_type_read.substr(0,6);
00222   if( coor_type_reads == "center" ) coor_type_reads = "centre";
00223   //---------- if after the first six letters ther is a 'G', it means they are global coordinates
00224   //----- If data is read from a 'report.out', it is always local and this is not needed
00225   
00226   //TODO: check that if only one entry of the three is read from 'report.out', the input file does not give global coordinates (it would cause havoc)
00227   if( EntryMgr::getInstance()->findEntryByLongName( longName(), "" ) == 0 ) {
00228     if(coor_type_read.size() == 7) { 
00229       if(coor_type_read[6] == 'G' ) {
00230         if(ALIUtils::debug >= 5) std::cout << " coordinate global " << coor_type_read << std::endl;
00231         if(coor_type_expected == "centre" ) {
00232           centreIsGlobal = 1;
00233         } else if(coor_type_expected == "angles" ) {
00234           anglesIsGlobal = 1;
00235         }
00236       }
00237     }
00238   }
00239 
00240   std::vector<ALIstring> wordlist;
00241   //---------- Read 4 lines: first is entry type, rest are three coordinates (each one will be an individual entry)
00242   ALIstring coor_names[3]; // to check if using cartesian, cylindrical or spherical coordinates
00243 
00244   for( int ii=0; ii<4; ii++ ) {  
00245     if ( ii == 0 ) {
00246       //---------- Check that first line is of expected type
00247       if ( coor_type_reads != coor_type_expected ) { 
00248         filein.ErrorInLine();
00249         std::cerr << "readCoordinates: " << coor_type_expected << " should be read here, instead of " << coor_type_reads << std::endl;
00250         exit(1);
00251       }
00252     } else {
00253       //----------- Fill entry Data
00254       filein.getWordsInLine(wordlist);
00255       coor_names[ii-1] = wordlist[0];
00256       fillCoordinateEntry( coor_type_expected, wordlist );
00257     }
00258   }
00259 
00260   //---- Transform coordinate system if cylindrical or spherical
00261   if( coor_names[0] == ALIstring("X") && coor_names[1] == ALIstring("Y") && coor_names[2] == ALIstring("Z")) {
00262     //do nothing
00263   }else if( coor_names[0] == ALIstring("R") && coor_names[1] == ALIstring("PHI") && coor_names[2] == ALIstring("Z")) {
00264     transformCylindrical2Cartesian();
00265   }else if( coor_names[0] == ALIstring("R") && coor_names[1] == ALIstring("THE") && coor_names[2] == ALIstring("PHI")) {
00266     transformSpherical2Cartesian();
00267   } else {
00268     std::cerr << "!!!EXITING: coordinates have to be cartesian (X ,Y ,Z), or cylindrical (R, PHI, Z) or spherical (R, THE, PHI) " << std::endl
00269          << " they are " << coor_names[0] << ", " << coor_names[1] << ", " << coor_names[2] << "." << std::endl;
00270     exit(1);
00271   }
00272 }

void OpticalObject::readData ( ALIFileIn filein  )  [private]

Definition at line 115 of file OpticalObject.cc.

References anglesIsGlobal, centreIsGlobal, ALIFileIn::getWordsInLine(), readCoordinates(), readExtraEntries(), setAnglesNull(), and type().

Referenced by construct().

00116 {
00117   //---------- See if there are extra entries and read them
00118   std::vector<ALIstring> wordlist;
00119   filein.getWordsInLine( wordlist );
00120   if (wordlist[0] == ALIstring( "ENTRY" ) ){
00121     //---------- Read extra entries from file
00122     readExtraEntries( filein );
00123     filein.getWordsInLine( wordlist );
00124   } 
00125 
00126   //--------- set centre and angles not global (default behaviour)
00127   centreIsGlobal = 0;
00128   anglesIsGlobal = 0;
00129 
00130   //--------- readCoordinates 
00131   if ( type() == ALIstring("source") || type() == ALIstring("pinhole") ) {
00132     readCoordinates( wordlist[0], "centre", filein );
00133     setAnglesNull();
00134   } else {
00135  //---------- Read centre and angles
00136     readCoordinates( wordlist[0], "centre", filein );
00137     filein.getWordsInLine( wordlist );
00138     readCoordinates( wordlist[0], "angles", filein );
00139   }
00140 
00141 }

void OpticalObject::readExtraEntries ( ALIFileIn filein  )  [private]

Definition at line 147 of file OpticalObject.cc.

References fillExtraEntry(), and ALIFileIn::getWordsInLine().

Referenced by readData().

00148 {
00149   //---------- Loop extra entries until a '}'-line is found
00150   std::vector<ALIstring> wordlist;
00151   for (;;) {
00152     filein.getWordsInLine( wordlist );
00153     if ( wordlist[0] != ALIstring("}") ) {  
00154       fillExtraEntry( wordlist );
00155     } else {
00156       break;
00157     }
00158   }
00159 }

void OpticalObject::resetGlobalCoordinates (  ) 

Definition at line 1620 of file OpticalObject.cc.

References begin, calculateLocalRotationAxisInGlobal(), centreGlobOriginal(), ExtraEntryValueList(), ExtraEntryValueOriginalList(), Model::getComponentOptOs(), name(), rmGlobOriginal(), theCentreGlob, and theRmGlob.

Referenced by Entry::addFittedDisplacementToValue(), and Measurement::DerivativeRespectEntry().

01620 {
01621 
01622   //---------- Reset centre and rm
01623   theRmGlob = rmGlobOriginal();
01624   theCentreGlob = centreGlobOriginal();
01625 
01626   //---------- Reset extra entries 
01627   //---------- Set extra entry values list
01628   std::vector<ALIdouble>::iterator vdite;
01629   std::vector<ALIdouble>::const_iterator vdcite_o = ExtraEntryValueOriginalList().begin() ;
01630   for (vdite = ExtraEntryValueList().begin(); 
01631        vdite != ExtraEntryValueList().end(); vdite++,vdcite_o++) {
01632     (*vdite) = (*vdcite_o);
01633   }
01634 
01635   //----------- Reset entries of every component
01636   std::vector<OpticalObject*> vopto;
01637   Model::getComponentOptOs(name(), vopto); 
01638   std::vector<OpticalObject*>::const_iterator vocite;
01639   for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01640     (*vocite)->resetGlobalCoordinates();
01641   }
01642 
01643   calculateLocalRotationAxisInGlobal();
01644 }
01645 

void OpticalObject::resetOriginalOriginalCoordinates (  ) 

Definition at line 1651 of file OpticalObject.cc.

References begin, calculateLocalRotationAxisInGlobal(), ExtraEntryList(), ExtraEntryValueList(), Model::getComponentOptOs(), name(), theCentreGlob, theCentreGlobOriginal, theCentreGlobOriginalOriginal, theExtraEntryValueOriginalOriginalVector, theExtraEntryValueOriginalVector, theRmGlob, theRmGlobOriginal, and theRmGlobOriginalOriginal.

01651 {
01652   //  std::cout << " !!! CALLING resetOriginalOriginalCoordinates(). STOP " << std::endl;
01653 
01654   //---------- Reset centre and rm
01655   theRmGlob = theRmGlobOriginalOriginal;
01656   theCentreGlob = theCentreGlobOriginalOriginal;
01657   theRmGlobOriginal = theRmGlobOriginalOriginal;
01658   theCentreGlobOriginal = theCentreGlobOriginalOriginal;
01659 
01660 
01661   //---------- Reset extra entry values list
01662   std::vector<ALIdouble>::iterator vdite;
01663   std::vector<ALIdouble>::iterator vdite_o = theExtraEntryValueOriginalVector.begin() ;
01664   std::vector<ALIdouble>::const_iterator vdcite_oo = theExtraEntryValueOriginalOriginalVector.begin() ;
01665   std::vector<Entry*>::const_iterator vdciteE = ExtraEntryList().begin() ;
01666   for (vdite = ExtraEntryValueList().begin(); 
01667        vdite != ExtraEntryValueList().end(); vdite++,vdite_o++,vdcite_oo++,vdciteE++) {
01668     (*vdite) = (*vdcite_oo);
01669     (*vdite_o) = (*vdcite_oo); 
01670     (*vdciteE)->addFittedDisplacementToValue( - (*vdciteE)->valueDisplacementByFitting() );
01671     //      std::cout << " resetting extra entry origorig " << (*vdciteE)->name() << " = " << (*vdite) << " ? " << (*vdcite_oo)  << std::endl;
01672       //      std::cout << " resetting extra entry origorig " << (*vdciteE)->name() << " = " << (*vdite) << " ? " << (*vdciteE)->value()  << std::endl;
01673     //  std::cout << " check extra entry " << (*vdciteE)->value() << " =? " << (*vdite) << std::endl;
01674   }
01675 
01676   /*  std::vector< Entry* >::iterator eite;
01677   for( eite = theCoordinateEntryVector.begin(); eite != theCoordinateEntryVector.end(); eite++ ){
01678     (*eite)->addFittedDisplacementToValue( - (*eite)->valueDisplacementByFitting() );
01679   }
01680   */
01681 
01682 
01683   calculateLocalRotationAxisInGlobal();
01684 
01685   //----------- Reset entries of every component
01686   std::vector<OpticalObject*> vopto;
01687   Model::getComponentOptOs(name(), vopto); 
01688   std::vector<OpticalObject*>::const_iterator vocite;
01689   for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01690     (*vocite)->resetOriginalOriginalCoordinates();
01691   }
01692 
01693 
01694 }
01695 

const HepRotation& OpticalObject::rmGlob (  )  const [inline]

Definition at line 101 of file OpticalObject.h.

References theRmGlob.

Referenced by OptOOpticalSquare::calculateFaces(), centreLocal(), OptOMirror::detailedDeviatesLightRay(), OptOModifiedRhomboidPrism::detailedDeviatesLightRay(), OptOSensor2D::detailedTraversesLightRay(), OptOCOPS::fastTraversesLightRay(), OptOSensor2D::fastTraversesLightRay(), getDispVec(), OptOCubeSplitter::getMiddlePlate(), CocoaAnalyzer::GetOptAlignInfoFromOptO(), getPlate(), OptOModifiedRhomboidPrism::getRotatedPlate(), getRotationAnglesInOptOFrame(), OptOCubeSplitter::getUpperPlate(), getZAxis(), LightRay::intersect(), OptODistancemeter::makeMeasurement(), OptOTiltmeter::makeMeasurement(), OptOSensor2D::makeMeasurement(), OptOCOPS::makeMeasurement(), Fit::printCentreInOptOFrame(), SetCentreGlobFromCentreLocal(), setOriginalEntryValues(), SetRMGlobFromRMLocal(), LightRay::shiftAndDeviateWhileTraversing(), LightRay::startLightRay(), OptOUserDefined::userDefinedBehaviour(), and EntryAngleAffAngles::valueDisplaced().

00101                                     {
00102     return theRmGlob;
00103   }

const HepRotation& OpticalObject::rmGlobOriginal (  )  const [inline]

Definition at line 107 of file OpticalObject.h.

References theRmGlobOriginal.

Referenced by displaceRmGlobAroundGlobal(), resetGlobalCoordinates(), and EntryAngleAffAngles::valueDisplaced().

00107                                             {
00108     return theRmGlobOriginal;
00109   }

const HepRotation& OpticalObject::rmGlobOriginalOriginal (  )  const [inline]

Definition at line 110 of file OpticalObject.h.

References theRmGlobOriginalOriginal.

Referenced by propagateGlobalRMOriginalOriginalChangeToChildren(), setGlobalRMOriginalOriginal(), and SetRMGlobFromRMLocalOriginalOriginal().

00110                                                     {
00111     return theRmGlobOriginalOriginal;
00112   }

const HepRotation OpticalObject::rmLocal (  )  const

Definition at line 1735 of file OpticalObject.cc.

References theCoordinateEntryVector, and value.

Referenced by CocoaToDDLMgr::buildRotationNumber(), and getRotationAnglesInOptOFrame().

01735 {
01736   HepRotation rm;
01737   rm.rotateX( theCoordinateEntryVector[3]->value() );
01738   rm.rotateY( theCoordinateEntryVector[4]->value() );
01739   rm.rotateZ( theCoordinateEntryVector[5]->value() );
01740 
01741   return rm;
01742 }
01743 

template<class T>
void OpticalObject::rotateItAroundGlobal ( T &  object,
const XYZcoor  coor,
const double  disp 
) [inline, private]

Definition at line 1810 of file OpticalObject.cc.

References GenMuonPlsPt100GeV_cfg::cout, and ALIUtils::debug.

Referenced by displaceRmGlobAroundGlobal().

01810 {
01811   switch (coor) {
01812     case 0:
01813       object.rotateX(disp);
01814       break;
01815     case 1:
01816       object.rotateY(disp);
01817       break;
01818     case 2:
01819       object.rotateZ(disp);
01820       break;
01821   }
01822       //  CLHEP::Hep3Vector axisToRotate = GetAxisForDisplacement( coor );
01823       //  object.rotate(disp, axisToRotate);
01824   if( ALIUtils::debug >= 5 ) std::cout << " rotateItAroundGlobal coor " << coor << " disp " << disp << std::endl;
01825 }
01826 

void OpticalObject::SetAnglesIsGlobal ( ALIbool  isG  )  [inline, private]

Definition at line 316 of file OpticalObject.h.

References anglesIsGlobal.

00316                                        {
00317    anglesIsGlobal = isG; }

void OpticalObject::setAnglesNull (  )  [private]

Definition at line 345 of file OpticalObject.cc.

References addCoordinateEntryToList(), Model::addEntryToList(), Entry::fillName(), Entry::fillNull(), name(), and Entry::setOptOCurrent().

Referenced by readData().

00346 {
00347   
00348   EntryAngleAffAngles* entry;
00349   //---------- three names will be X, Y and Z
00350   ALIstring coor("XYZ");
00351   
00352   //---------- Fill the three entries
00353   for (int ii=0; ii<3; ii++) {  
00354     entry = new EntryAngleAffAngles( "angles" );
00355 
00356     //---------- Set link from entry to OptO it belongs to
00357     entry->setOptOCurrent( this );
00358     //----- Name is filled from here to be consistent with fillCoordinate
00359     ALIstring name = "angles_" + coor.substr(ii, 1);
00360     entry->fillName( name );
00361     //---------- Set entry data to zero    
00362     entry->fillNull( );
00363 
00364        // entry.fillNull( tt );
00365 
00366     //---------- Add entry to lists
00367     Model::addEntryToList( entry );
00368     addCoordinateEntryToList( entry );
00369 
00370   }
00371 
00372 }

void OpticalObject::SetCentreGlobFromCentreLocal (  )  [private]

Definition at line 782 of file OpticalObject.cc.

References centreGlob(), ALIUtils::debug, ALIUtils::dump3v(), ALIUtils::dumprm(), name(), parent(), rmGlob(), and theCentreGlob.

Referenced by setGlobalCentre().

00783 {
00784   //----------- Get global centre: parent centre plus local centre traslated to parent coordinate system
00785   CLHEP::Hep3Vector cLocal = theCentreGlob;
00786   theCentreGlob = parent()->rmGlob() * theCentreGlob;
00787   
00788   if(ALIUtils::debug >= 5) ALIUtils::dump3v( theCentreGlob, "SetCentreGlobFromCentreLocal: CENTRE in parent local frame ");
00789   theCentreGlob += parent()->centreGlob();
00790 
00791   if(ALIUtils::debug >= 5) ALIUtils::dump3v( theCentreGlob, "SetCentreGlobFromCentreLocal: CENTRE GLOBAL ");
00792   if(ALIUtils::debug >= 5) {
00793     ALIUtils::dump3v( parent()->centreGlob(), ( " parent centreGlob" + parent()->name() ).c_str() );
00794     ALIUtils::dumprm( parent()->rmGlob(), " parent rmGlob ");
00795   }
00796 
00797   /*  CLHEP::Hep3Vector cLocal2 = theCentreGlob - parent()->centreGlob();
00798   CLHEP::HepRotation rmParentInv = inverseOf( parent()->rmGlob() );
00799   cLocal2 = rmParentInv * cLocal2;
00800   if( (cLocal2 - cLocal).mag() > 1.E-9 ) {
00801     std::cerr << "!!!! CALCULATE LOCAL WRONG. Diff= " << (cLocal2 - cLocal).mag() << " " << cLocal2 << " " << cLocal << std::endl;
00802     if( (cLocal2 - cLocal).mag() > 1.E-4 ) {
00803       std::exception();
00804     }
00805     }*/
00806 }

void OpticalObject::SetCentreIsGlobal ( ALIbool  isG  )  [inline, private]

Definition at line 314 of file OpticalObject.h.

References centreIsGlobal.

00314                                        {
00315    centreIsGlobal = isG; }

void OpticalObject::SetCentreLocalFromEntryValues (  )  [private]

Definition at line 728 of file OpticalObject.cc.

References centreGlob(), ALIUtils::debug, ALIUtils::dump3v(), getEntryCentre(), theCentreGlob, XCoor, YCoor, and ZCoor.

Referenced by setGlobalCentre().

00729 {
00730 
00731   //  std::vector<Entry*>::const_iterator vecite = CoordinateEntryList().begin(); 
00732   //-  std::cout << "PARENTSYSTEM" << name() << parent() <<"ZZ"<<vecite<< std::endl;
00733   //  std::cout << " OpticalObject::setGlobalCoordinates " << this->name() << std::endl;
00734       //-      std::cout << veite << "WW" << *vecite << std::endl;
00735 //---------------------------------------- Set global centre
00736 //----------------------------------- Get local centre from Entries
00737   theCentreGlob.setX( getEntryCentre(XCoor) );
00738   theCentreGlob.setY( getEntryCentre(YCoor) );
00739   theCentreGlob.setZ( getEntryCentre(ZCoor) );
00740   if(ALIUtils::debug >=4) ALIUtils::dump3v( centreGlob(), "SetCentreLocalFromEntryValues: CENTRE LOCAL ");
00741 }

void OpticalObject::setCmsSwID ( uint32_t  id  )  [inline]

Definition at line 155 of file OpticalObject.h.

References theCmsSwID.

00155 { theCmsSwID = id; }

void OpticalObject::setExtraEntryValue ( const ALIuint  entryNo,
const ALIdouble  disp 
)

Definition at line 1124 of file OpticalObject.cc.

References theExtraEntryValueVector.

01124 {
01125   theExtraEntryValueVector[entryNo] = val;
01126 }
01127 

void OpticalObject::setGlobalCentre (  )  [private]

Definition at line 617 of file OpticalObject.cc.

References anglesIsGlobal, centreIsGlobal, TestMuL1L2Filter_cff::cerr, lat::endl(), SetCentreGlobFromCentreLocal(), SetCentreLocalFromEntryValues(), and type().

Referenced by displaceRmGlobAroundLocal(), and setGlobalCoordinates().

00618 {
00619   SetCentreLocalFromEntryValues();
00620   if ( type() != ALIstring("system") && !centreIsGlobal ) {
00621     SetCentreGlobFromCentreLocal();
00622   }
00623   if( anglesIsGlobal ){
00624     std::cerr << "!!!FATAL ERROR: angles in global coordinates not supported momentarily " << std::endl;
00625     abort();
00626   }
00627 }

void OpticalObject::setGlobalCoordinates (  ) 

Definition at line 610 of file OpticalObject.cc.

References setGlobalCentre(), and setGlobalRM().

Referenced by construct(), constructFromOptAligInfo(), displaceRmGlobOriginal(), displaceRmGlobOriginalOriginal(), and FittedEntriesSet::SetOptOEntries().

00611 {
00612   setGlobalCentre();
00613   setGlobalRM();
00614 }

void OpticalObject::setGlobalCoordinatesOfComponents (  )  [private]

Definition at line 1348 of file OpticalObject.cc.

References Model::getComponentOptOs(), and name().

01348 {
01349 
01350   // Calculate the displaced centreGlob and rmGlob of components
01351   std::vector<OpticalObject*> vopto;
01352   Model::getComponentOptOs(name(), vopto); 
01353   std::vector<OpticalObject*>::const_iterator vocite;
01354   for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
01355     (*vocite)->setGlobalCoordinates();
01356   }
01357 
01358 }
01359 

void OpticalObject::setGlobalRM (  )  [private]

Definition at line 631 of file OpticalObject.cc.

References anglesIsGlobal, calculateLocalRotationAxisInGlobal(), SetRMGlobFromRMLocal(), and SetRMLocalFromEntryValues().

Referenced by setGlobalCoordinates().

00632 {
00633   SetRMLocalFromEntryValues();
00634   if( !anglesIsGlobal ) {
00635     SetRMGlobFromRMLocal();
00636   }
00637     
00638   // Calculate local rot axis with new rm glob
00639   calculateLocalRotationAxisInGlobal();
00640   
00641 }

void OpticalObject::setGlobalRMOriginalOriginal ( const HepRotation &  rmoriori  ) 

Definition at line 646 of file OpticalObject.cc.

References GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dumprm(), lat::endl(), Model::getComponentOptOs(), name(), parent(), rmGlobOriginalOriginal(), and SetRMGlobFromRMLocalOriginalOriginal().

Referenced by FittedEntriesReader::readFittedEntriesFromFile().

00647 {
00648   HepRotation rmorioriold = rmGlobOriginalOriginal();
00649   if ( ALIUtils::debug >= 5 ) {
00650     std::cout << " setGlobalRMOriginalOriginal OptO " << name() << std::endl;
00651     ALIUtils::dumprm(rmorioriLocal," setGlobalRMOriginalOriginal new local");
00652     ALIUtils::dumprm(rmGlobOriginalOriginal()," setGlobalRMOriginalOriginal old ");
00653   }
00654 
00655   SetRMGlobFromRMLocalOriginalOriginal( rmorioriLocal );
00656 
00657   /*  //---- multiplyt it by parent rmGlobOriginalOriginal
00658   if( parent()->type() != ALIstring("system") ) {
00659     theRmGlobOriginalOriginal = parent()->rmGlobOriginalOriginal() * theRmGlobOriginalOriginal;
00660     }*/
00661 
00662   if ( ALIUtils::debug >= 5 ) {
00663     ALIUtils::dumprm( parent()->rmGlobOriginalOriginal()," parent rmoriori glob  ");
00664     ALIUtils::dumprm(rmGlobOriginalOriginal()," setGlobalRMOriginalOriginal new ");
00665   }
00666 
00667   //----------- Reset RMGlobOriginalOriginal() of every component
00668   std::vector<OpticalObject*> vopto;
00669   ALIbool igetood = Model::getComponentOptOs(name(), vopto); 
00670   if( !igetood ) {
00671     //    std::cout << " NO MORE COMPONENTS IN THIS OptO" << name() << std::endl ; 
00672     return;
00673   }
00674   std::vector<OpticalObject*>::const_iterator vocite;
00675   for (vocite = vopto.begin(); vocite != vopto.end(); vocite++) {
00676     HepRotation rmorioriLocalChild = (*vocite)->buildRmFromEntryValuesOriginalOriginal();
00677     (*vocite)->setGlobalRMOriginalOriginal( rmorioriLocalChild );
00678     //    (*vocite)->propagateGlobalRMOriginalOriginalChangeToChildren( rmorioriold, rmGlobOriginalOriginal() );
00679   }
00680   
00681 }

void OpticalObject::setID ( uint32_t  id  )  [inline]

Definition at line 156 of file OpticalObject.h.

References theCmsSwID.

Referenced by createComponentOptOs().

00156 { theCmsSwID = id; }

void OpticalObject::setMeas ( Measurement meas  )  [inline]

set current measurement

Definition at line 238 of file OpticalObject.h.

References theCurrentMeas.

Referenced by participateInMeasurement().

00238                                     {
00239     theCurrentMeas = meas;
00240   }

void OpticalObject::setOriginalEntryValues (  ) 

Definition at line 853 of file OpticalObject.cc.

References addExtraEntryValueOriginalOriginalToList(), addExtraEntryValueOriginalToList(), begin, centreGlob(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), ExtraEntryValueList(), rmGlob(), theCentreGlobOriginal, theCentreGlobOriginalOriginal, theRmGlobOriginal, and theRmGlobOriginalOriginal.

Referenced by construct(), constructFromOptAligInfo(), and FittedEntriesSet::SetOptOEntries().

00854 {
00855   //---------- Set orig coordinates
00856   theCentreGlobOriginal = centreGlob();
00857   theRmGlobOriginal = rmGlob(); 
00858 
00859   theCentreGlobOriginalOriginal = centreGlob();
00860   theRmGlobOriginalOriginal = rmGlob(); 
00861 
00862   /*  if ( ALIUtils::debug >= 5 ) {
00863     ALIUtils::dump3v( centreGlob(), "OPTO: CENTRE GLOB ");
00864     ALIUtils::dumprm( rmGlob(), "OPTO: RM GLOB ");
00865     }*/
00866   
00867   //---------- Set extra entry values
00868   std::vector<ALIdouble>::const_iterator vdcite;
00869   for (vdcite = ExtraEntryValueList().begin(); 
00870        vdcite != ExtraEntryValueList().end(); vdcite++) {
00871       addExtraEntryValueOriginalToList( *vdcite );
00872       addExtraEntryValueOriginalOriginalToList( *vdcite );
00873   }
00874   //-  test();
00875   if( ALIUtils::debug >= 6 ) std::cout << " setOriginalEntryValues " << std::endl;
00876 }

void OpticalObject::setRmGlobal ( const HepRotation &  rm  )  [inline]

Definition at line 132 of file OpticalObject.h.

References theRmGlob.

Referenced by OptOLens::OptOLens(), and OptOSource::OptOSource().

00132                                            {
00133     theRmGlob = rm; 
00134   }

void OpticalObject::setRmGlobalOriginal ( const HepRotation &  rm  )  [inline]

Definition at line 125 of file OpticalObject.h.

References theRmGlobOriginal.

Referenced by OptOLens::OptOLens(), and OptOSource::OptOSource().

00125                                                    {
00126     theRmGlobOriginal = rm; 
00127   }

void OpticalObject::SetRMGlobFromRMLocal (  )  [private]

Definition at line 810 of file OpticalObject.cc.

References GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dumprm(), lat::endl(), getEntryRMangle(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), longName(), name(), parent(), rmGlob(), theRmGlob, type(), XCoor, YCoor, and ZCoor.

Referenced by displaceRmGlobAroundLocal(), and setGlobalRM().

00811 {
00812   const OpticalObject* opto_par = this;
00813   GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
00814   if(gomgr->GlobalOptions()["rotateAroundLocal"] == 0) {
00815     while ( opto_par->parent()->type() != ALIstring("system") ) {
00816       //t    vecite = opto_par->parent()->GetCoordinateEntry( CEanglesX ); 
00817       if(ALIUtils::debug >= 5) std::cout << "rotate with parent: before X " << opto_par->parent()->name() <<" " <<  parent()->getEntryRMangle(XCoor) <<std::endl;
00818       theRmGlob.rotateX( parent()->getEntryRMangle(XCoor) );
00819       if(ALIUtils::debug >= 5) std::cout << "rotate with parent: before Y " << opto_par->parent()->name() <<" " <<  parent()->getEntryRMangle(YCoor) <<std::endl;
00820       theRmGlob.rotateY( parent()->getEntryRMangle(YCoor) );
00821       if(ALIUtils::debug >= 5) std::cout << "rotate with parent: before Z " << opto_par->parent()->name() <<" " <<  parent()->getEntryRMangle(ZCoor) <<std::endl;
00822       theRmGlob.rotateZ( parent()->getEntryRMangle(ZCoor) );
00823       if(ALIUtils::debug >= 4) ALIUtils::dumprm( theRmGlob, ("SetRMGlobFromRMLocal: RM GLOB after " +  opto_par->parent()->longName()).c_str() );
00824       opto_par = opto_par->parent();
00825     }
00826   }else {
00827     if(ALIUtils::debug >= 4) {
00828       std::cout << " Composing rmGlob with parent " <<  parent()->name() << std::endl;
00829       //      ALIUtils::dumprm( theRmGlob, "SetRMGlobFromRMLocal: RM GLOB ");
00830     }
00831     theRmGlob = parent()->rmGlob() * theRmGlob;
00832   }
00833 
00834     //    std::cout << "rotate with parent (parent)" << opto_par->name() <<parent()->name() << (*vecite)->name() << (*vecite)->value() <<std::endl;
00835   if(ALIUtils::debug >= 4) {
00836     ALIUtils::dumprm( theRmGlob, "SetRMGlobFromRMLocal: final RM GLOB ");
00837     ALIUtils::dumprm(  parent()->rmGlob(), "parent rm glob ");
00838   }
00839 }

void OpticalObject::SetRMGlobFromRMLocalOriginalOriginal ( HepRotation  rmoriori  )  [private]

Definition at line 842 of file OpticalObject.cc.

References parent(), rmGlobOriginalOriginal(), and theRmGlobOriginalOriginal.

Referenced by setGlobalRMOriginalOriginal().

void OpticalObject::SetRMLocalFromEntryValues (  )  [private]

Definition at line 745 of file OpticalObject.cc.

References GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, ALIUtils::dumprm(), lat::endl(), getEntryRMangle(), theRmGlob, XCoor, YCoor, and ZCoor.

Referenced by setGlobalRM().

00746 {
00747 
00748   //---------- Set global rotation matrix
00749   //-------- Get rm from Entries
00750   theRmGlob = CLHEP::HepRotation();
00751   theRmGlob.rotateX( getEntryRMangle(XCoor) );
00752   if(ALIUtils::debug >= 4) {
00753     std::cout << "  getEntryRMangle(XCoor) )" << getEntryRMangle(XCoor) << std::endl;
00754     ALIUtils::dumprm( theRmGlob, "SetRMLocalFromEntryValues: RM after X");
00755   }
00756   theRmGlob.rotateY( getEntryRMangle(YCoor) );
00757   if(ALIUtils::debug >= 4) {
00758     std::cout << "  getEntryRMangle(YCoor) )" << getEntryRMangle(YCoor) << std::endl;
00759     ALIUtils::dumprm( theRmGlob, "SetRMLocalFromEntryValues: RM after Y");
00760   }
00761   theRmGlob.rotateZ( getEntryRMangle(ZCoor) );
00762   if(ALIUtils::debug >= 4) {
00763     std::cout << "  getEntryRMangle(ZCoor) )" << getEntryRMangle(ZCoor) << std::endl;
00764     ALIUtils::dumprm( theRmGlob, "SetRMLocalFromEntryValues: RM FINAL");
00765   }
00766 
00767   //----- angles are relative to parent, so rotate parent angles first 
00768   //  RmGlob() = 0;
00769   //-  if(ALIUtils::debug >= 4) ALIUtils::dumprm( parent()->rmGlob(), "OPTO0: RM LOCAL ");
00770   //  if ( type() != ALIstring("system") ) theRmGlob.transform( parent()->rmGlob() );
00771   //----- if anglesIsGlobal, RM is already in global coordinates, else multiply by ancestors
00772 
00773   /*  /////////////
00774   CLHEP::Hep3Vector ztest(0.,0.,1.);
00775   ztest = theRmGlob * ztest;
00776   if( ALIUtils::debug >= 5 ) ALIUtils::dump3v( ztest, "z rotated by theRmGlob ");
00777   */
00778 }

void OpticalObject::setType ( const ALIstring type  )  [inline]

Definition at line 136 of file OpticalObject.h.

References theType.

00136                                         {
00137    theType = type; 
00138   }

const ALIstring OpticalObject::shortName (  )  const

Definition at line 1710 of file OpticalObject.cc.

References name(), and size.

Referenced by OptOSensor2D::fillExtraEntry(), CocoaToDDLMgr::lv(), and CocoaToDDLMgr::pv().

01710 {
01711   ALIint last_slash = name().rfind('/');
01712   ALIstring sname = name().substr(last_slash+1, name().size()-1);
01713   if( last_slash == -1 ) { //object of type "system"
01714     sname = name();
01715   } else {
01716     sname = name().substr(last_slash+1, name().size()-1);
01717   }
01718   return sname; 
01719 }
01720 

void OpticalObject::transformCylindrical2Cartesian (  )  [private]

Definition at line 276 of file OpticalObject.cc.

References ALIUtils::AngleValueDimensionFactor(), funct::cos(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), ALIUtils::LengthValueDimensionFactor(), name(), phi, dttmaxenums::R, funct::sin(), siz, and theCoordinateEntryVector.

Referenced by readCoordinates().

00277 {
00278   ALIuint ii;
00279   ALIuint siz =  theCoordinateEntryVector.size();
00280   ALIdouble newcoor[3];
00281   ALIdouble R = theCoordinateEntryVector[0]->value();
00282   ALIdouble phi = theCoordinateEntryVector[1]->value()/ALIUtils::LengthValueDimensionFactor()*ALIUtils::AngleValueDimensionFactor();
00283   newcoor[0] = R*cos(phi);
00284   newcoor[1] = R*sin(phi);
00285   newcoor[2] = theCoordinateEntryVector[2]->value(); // Z
00286   //-  std::cout << " phi " << phi << std::endl;
00287    //----- Name is filled from here to include 'centre' or 'angles'
00288 
00289  for( ii = 0; ii < siz; ii++ ) { 
00290     if(ALIUtils::debug >= 5 ) std::cout << " OpticalObject::transformCylindrical2Cartesian " << ii << " " << newcoor[ii] << std::endl;
00291     theCoordinateEntryVector[ii]->setValue( newcoor[ii] );
00292   }
00293  // change the names
00294   ALIstring name = "centre_X";
00295   theCoordinateEntryVector[0]->fillName( name );
00296   name = "centre_Y";
00297   theCoordinateEntryVector[1]->fillName( name );
00298   name = "centre_Z";
00299   theCoordinateEntryVector[2]->fillName( name );
00300 
00301 }

void OpticalObject::transformGlobal2Local (  )  [private]

void OpticalObject::transformSpherical2Cartesian (  )  [private]

Definition at line 304 of file OpticalObject.cc.

Referenced by readCoordinates().

00305 {
00306 
00307 }

const ALIstring& OpticalObject::type (  )  const [inline]

Definition at line 61 of file OpticalObject.h.

References theType.

Referenced by createComponentOptOs(), defaultBehaviour(), detailedDeviatesLightRay(), detailedTraversesLightRay(), fastDeviatesLightRay(), fastTraversesLightRay(), CocoaAnalyzer::GetOptAlignInfoFromOptO(), CocoaToDDLMgr::lv(), makeMeasurement(), Fit::printCentreInOptOFrame(), readData(), setGlobalCentre(), SetRMGlobFromRMLocal(), CocoaToDDLMgr::specPar(), LightRay::startLightRay(), and userDefinedBehaviour().

00061 { return theType; };

void OpticalObject::userDefinedBehaviour ( LightRay lightray,
Measurement meas,
const ALIstring behav 
) [virtual]

Definition at line 969 of file OpticalObject.cc.

References TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, name(), and type().

Referenced by participateInMeasurement().

00970 {
00971   std::cerr << "!!! Optical Object " << name() << " of type " << type() << " does not implement user defined behaviour = " << behav << std::endl;
00972   std::cerr << " Please read documentation for this object type" << std::endl;  
00973   exit(1);
00974 }
00975 


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const OpticalObject c 
) [friend]

Definition at line 1724 of file OpticalObject.cc.

01724                       : " << c.theName << " of type: " << c.theType 
01725      << "  " << c.theCentreGlob 
01726      << c.theRmGlob << std::endl;
01727 
01728   return os;
01729 
01730 }
01731 


Member Data Documentation

ALIbool OpticalObject::anglesIsGlobal [private]

Definition at line 347 of file OpticalObject.h.

Referenced by constructFromOptAligInfo(), copyData(), displaceRmGlobAroundLocal(), readCoordinates(), readData(), SetAnglesIsGlobal(), setGlobalCentre(), and setGlobalRM().

Hep3Vector OpticalObject::axisXLocalInGlobal [private]

Definition at line 351 of file OpticalObject.h.

Referenced by calculateLocalRotationAxisInGlobal().

Hep3Vector OpticalObject::axisYLocalInGlobal [private]

Definition at line 352 of file OpticalObject.h.

Referenced by calculateLocalRotationAxisInGlobal().

Hep3Vector OpticalObject::axisZLocalInGlobal [private]

Definition at line 353 of file OpticalObject.h.

Referenced by calculateLocalRotationAxisInGlobal().

ALIbool OpticalObject::centreIsGlobal [private]

Definition at line 346 of file OpticalObject.h.

Referenced by constructFromOptAligInfo(), copyData(), readCoordinates(), readData(), SetCentreIsGlobal(), and setGlobalCentre().

ALIbool OpticalObject::fcopyData [private]

Definition at line 325 of file OpticalObject.h.

Referenced by construct(), createComponentOptOs(), and OpticalObject().

Hep3Vector OpticalObject::theCentreGlob [private]

Definition at line 328 of file OpticalObject.h.

Referenced by centreGlob(), centreLocal(), displaceCentreGlob(), displaceRmGlobAroundGlobal(), displaceRmGlobOriginal(), displaceRmGlobOriginalOriginal(), resetGlobalCoordinates(), resetOriginalOriginalCoordinates(), SetCentreGlobFromCentreLocal(), and SetCentreLocalFromEntryValues().

Hep3Vector OpticalObject::theCentreGlobOriginal [private]

Definition at line 331 of file OpticalObject.h.

Referenced by centreGlobOriginal(), displaceCentreGlobOriginal(), displaceRmGlobOriginal(), resetOriginalOriginalCoordinates(), and setOriginalEntryValues().

Hep3Vector OpticalObject::theCentreGlobOriginalOriginal [private]

Definition at line 333 of file OpticalObject.h.

Referenced by centreGlobOriginalOriginal(), displaceCentreGlobOriginalOriginal(), displaceRmGlobOriginalOriginal(), resetOriginalOriginalCoordinates(), and setOriginalEntryValues().

uint32_t OpticalObject::theCmsSwID [private]

Definition at line 355 of file OpticalObject.h.

Referenced by cmsSwID(), ID(), setCmsSwID(), and setID().

std::vector< Entry* > OpticalObject::theCoordinateEntryVector [private]

Definition at line 337 of file OpticalObject.h.

Referenced by addCoordinateEntryToList(), CoordinateEntryList(), getEntryCentre(), getEntryRMangle(), rmLocal(), and transformCylindrical2Cartesian().

Measurement* OpticalObject::theCurrentMeas [private]

Definition at line 349 of file OpticalObject.h.

Referenced by meas(), and setMeas().

std::vector< ALIdouble > OpticalObject::theExtraEntryValueOriginalOriginalVector [private]

Definition at line 343 of file OpticalObject.h.

Referenced by addExtraEntryValueOriginalOriginalToList(), displaceExtraEntryOriginalOriginal(), ExtraEntryValueOriginalOriginalList(), and resetOriginalOriginalCoordinates().

std::vector< ALIdouble > OpticalObject::theExtraEntryValueOriginalVector [private]

Definition at line 342 of file OpticalObject.h.

Referenced by addExtraEntryValueOriginalToList(), displaceExtraEntry(), displaceExtraEntryOriginal(), ExtraEntryValueOriginalList(), and resetOriginalOriginalCoordinates().

std::vector< ALIdouble > OpticalObject::theExtraEntryValueVector [private]

Definition at line 341 of file OpticalObject.h.

Referenced by addExtraEntryValueToList(), displaceExtraEntry(), ExtraEntryValueList(), and setExtraEntryValue().

std::vector< Entry* > OpticalObject::theExtraEntryVector [private]

Definition at line 338 of file OpticalObject.h.

Referenced by addExtraEntryToList(), and ExtraEntryList().

CocoaMaterialElementary* OpticalObject::theMaterial [protected]

Definition at line 358 of file OpticalObject.h.

Referenced by constructMaterial(), and getMaterial().

ALIstring OpticalObject::theName [private]

Definition at line 323 of file OpticalObject.h.

Referenced by copyData(), createComponentOptOsFromOptAlignInfo(), name(), and OpticalObject().

OpticalObject* OpticalObject::theParent [private]

Definition at line 321 of file OpticalObject.h.

Referenced by construct(), constructFromOptAligInfo(), getLocalRotationAngles(), and parent().

HepRotation OpticalObject::theRmGlob [private]

Definition at line 329 of file OpticalObject.h.

Referenced by buildRmFromEntryValuesOriginalOriginal(), calculateLocalRotationAxisInGlobal(), displaceRmGlobAroundGlobal(), displaceRmGlobAroundLocal(), displaceRmGlobOriginal(), displaceRmGlobOriginalOriginal(), getRotationAnglesInOptOFrame(), resetGlobalCoordinates(), resetOriginalOriginalCoordinates(), rmGlob(), setRmGlobal(), SetRMGlobFromRMLocal(), and SetRMLocalFromEntryValues().

HepRotation OpticalObject::theRmGlobOriginal [private]

Definition at line 332 of file OpticalObject.h.

Referenced by displaceRmGlobOriginal(), getRotationAnglesInOptOFrame(), resetOriginalOriginalCoordinates(), rmGlobOriginal(), setOriginalEntryValues(), and setRmGlobalOriginal().

HepRotation OpticalObject::theRmGlobOriginalOriginal [private]

Definition at line 334 of file OpticalObject.h.

Referenced by displaceRmGlobOriginalOriginal(), propagateGlobalRMOriginalOriginalChangeToChildren(), resetOriginalOriginalCoordinates(), rmGlobOriginalOriginal(), setOriginalEntryValues(), and SetRMGlobFromRMLocalOriginalOriginal().

CocoaSolidShape* OpticalObject::theSolidShape [protected]

Definition at line 359 of file OpticalObject.h.

Referenced by OptORisleyPrism::constructSolidShape(), OptOMirror::constructSolidShape(), OptOTiltmeter::constructSolidShape(), OptOModifiedRhomboidPrism::constructSolidShape(), OptOLens::constructSolidShape(), OptOCubeSplitter::constructSolidShape(), OptOCameraDetector::constructSolidShape(), OptOXLaser::constructSolidShape(), OptOScreen::constructSolidShape(), OptODistancemeter::constructSolidShape(), constructSolidShape(), OptOSource::constructSolidShape(), OptOOpticalSquare::constructSolidShape(), OptODistancemeter3dim::constructSolidShape(), OptOCOPS::constructSolidShape(), OptOPinhole::constructSolidShape(), OptOSensor2D::constructSolidShape(), OptOPlateSplitter::constructSolidShape(), OptOLaser::constructSolidShape(), and getSolidShape().

ALIstring OpticalObject::theType [private]

Definition at line 322 of file OpticalObject.h.

Referenced by OpticalObject(), setType(), and type().

ALIint OpticalObject::verbose [protected]

Definition at line 361 of file OpticalObject.h.


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