16 #include "Alignment/CocoaVisMgr/interface/ALIVRMLMgr.h"
17 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
18 #include "Alignment/IgCocoaFileWriter/interface/ALIVisLightPath.h"
27 ALIVisLightPath* vispath = 0;
31 vispath = IgCocoaFileMgr::getInstance().newLightPath(
name() );
39 std::cerr <<
"OpticalObject: !!! EXITING at Measurement: " << meas.
name() <<
" in OptO: " <<
name() <<
" behaviour ':" << behav <<
"' is not adequate " << std::endl;
40 std::cerr <<
"an OptO has to indicate if detailed simulation traverses (:T) or deviates (:D) or Fast Simulation traverses (:FT) or deviates (:FD) or default behaviour () "<< std::endl;
43 ALIint behavSize = behav.size();
46 if( behavSize != 2 || behav[0] !=
'D' ){
47 std::cerr <<
"OpticalObject: !!! EXITING at Measurement: " << meas.
name() <<
" in OptO: " <<
name() <<
" behaviour ':" << behav <<
"' is not adequate " << std::endl;
48 std::cerr <<
"an OptO has to indicate detailed simulation by (:Dn) where n is an integer number " << std::endl;
51 nSet = behav.substr( behavSize-1, behavSize);
60 CLHEP::Hep3Vector shift3D( shiftX, shiftY, shiftZ );
61 CLHEP::HepRotation rmt =
rmGlob();
62 shift3D = rmt*shift3D;
64 lightray.
dumpData(
"OptOUserDefined: lightray incoming");
78 ALIVRMLMgr::getInstance().addLightPoint( lightray.
point() );
82 vispath->addLightPoint( lightray.
point(), this );
89 lightray.
dumpData(
"OptOUserDefined: lightray after shift");
91 CLHEP::Hep3Vector direc = lightray.
direction();
92 CLHEP::Hep3Vector XAxis(1.,0.,0.);
94 direc.rotate(deviX, XAxis);
96 std::cout <<
"Direction after deviX " << direc << std::endl;
97 std::cout <<
" deviX " << deviX << std::endl;
99 CLHEP::Hep3Vector YAxis(0.,1.,0.);
101 direc.rotate(deviY, YAxis);
104 std::cout <<
"Direction after deviY " << direc << std::endl;
105 std::cout <<
" deviY " << deviY << std::endl;
107 CLHEP::Hep3Vector ZAxis(0.,0.,1.);
109 direc.rotate(deviZ, ZAxis);
112 std::cout <<
"Direction after deviZ " << direc << std::endl;
113 std::cout <<
" deviZ " << deviZ << std::endl;
116 lightray.
dumpData(
"OptOUserDefined: lightray at exiting");
125 ALIVRMLMgr::getInstance().addLightPoint( lightray.
point() );
129 vispath->addLightPoint( lightray.
point(), this );
151 ALIColour*
col =
new ALIColour( 0., 0., 0., 0. );
152 std::vector<ALIdouble> spar;
156 IgCocoaFileMgr::getInstance().addSolid( *
this,
"BOX", spar, col);
const std::vector< Entry * > & ExtraEntryList() const
static GlobalOptionMgr * getInstance()
virtual void userDefinedBehaviour(LightRay &lightray, Measurement &meas, const ALIstring &behav) override
const CLHEP::HepRotation & rmGlob() const
void setDirection(const CLHEP::Hep3Vector &direc)
void setPoint(const CLHEP::Hep3Vector &point)
const CLHEP::Hep3Vector & point() const
const ALIdouble findExtraEntryValue(const ALIstring &eename) const
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
void intersect(const ALIPlane &plane)
static ALIbool getFirstTime()
virtual void fillIguana()
const CLHEP::Hep3Vector & centreGlob() const
ALIPlane getPlate(const ALIbool forwardPlate, const ALIbool applyWedge)
void dumpData(const ALIstring &str) const
const ALIstring & name() const
const ALIstring & name() const
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()
const CLHEP::Hep3Vector & direction() const
tuple size
Write out results.