16 #include "Alignment/CocoaVisMgr/interface/ALIVRMLMgr.h" 17 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h" 18 #include "Alignment/IgCocoaFileWriter/interface/ALIVisLightPath.h" 26 ALIVisLightPath* vispath = 0;
30 vispath = IgCocoaFileMgr::getInstance().newLightPath(
name());
40 <<
" behaviour ':" << behav <<
"' is not adequate " << std::endl;
41 std::cerr <<
"an OptO has to indicate if detailed simulation traverses (:T) or deviates (:D) or Fast Simulation " 42 "traverses (:FT) or deviates (:FD) or default behaviour () " 46 ALIint behavSize = behav.size();
49 if (behavSize != 2 || behav[0] !=
'D') {
51 <<
" behaviour ':" << behav <<
"' is not adequate " << std::endl;
52 std::cerr <<
"an OptO has to indicate detailed simulation by (:Dn) where n is an integer number " << std::endl;
55 nSet = behav.substr(behavSize - 1, behavSize);
64 CLHEP::Hep3Vector shift3D(shiftX, shiftY, shiftZ);
65 CLHEP::HepRotation rmt =
rmGlob();
66 shift3D = rmt * shift3D;
68 lightray.
dumpData(
"OptOUserDefined: lightray incoming");
82 ALIVRMLMgr::getInstance().addLightPoint(lightray.
point());
87 vispath->addLightPoint(lightray.
point(),
this);
94 lightray.
dumpData(
"OptOUserDefined: lightray after shift");
96 CLHEP::Hep3Vector direc = lightray.
direction();
97 CLHEP::Hep3Vector XAxis(1., 0., 0.);
99 direc.rotate(deviX, XAxis);
101 std::cout <<
"Direction after deviX " << direc << std::endl;
102 std::cout <<
" deviX " << deviX << std::endl;
104 CLHEP::Hep3Vector YAxis(0., 1., 0.);
106 direc.rotate(deviY, YAxis);
109 std::cout <<
"Direction after deviY " << direc << std::endl;
110 std::cout <<
" deviY " << deviY << std::endl;
112 CLHEP::Hep3Vector ZAxis(0., 0., 1.);
114 direc.rotate(deviZ, ZAxis);
117 std::cout <<
"Direction after deviZ " << direc << std::endl;
118 std::cout <<
" deviZ " << deviZ << std::endl;
121 lightray.
dumpData(
"OptOUserDefined: lightray at exiting");
130 ALIVRMLMgr::getInstance().addLightPoint(lightray.
point());
135 vispath->addLightPoint(lightray.
point(),
this);
154 ALIColour*
col =
new ALIColour(0., 0., 0., 0.);
155 std::vector<ALIdouble> spar;
159 IgCocoaFileMgr::getInstance().addSolid(*
this,
"BOX", spar,
col);
const ALIdouble findExtraEntryValue(const ALIstring &eename) const
const CLHEP::Hep3Vector & centreGlob() const
const ALIstring & name() const
static GlobalOptionMgr * getInstance()
void userDefinedBehaviour(LightRay &lightray, Measurement &meas, const ALIstring &behav) override
const std::vector< Entry * > & ExtraEntryList() const
void setDirection(const CLHEP::Hep3Vector &direc)
void setPoint(const CLHEP::Hep3Vector &point)
const CLHEP::Hep3Vector & direction() const
void dumpData(const ALIstring &str) const
const CLHEP::Hep3Vector & point() const
const CLHEP::HepRotation & rmGlob() const
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
void intersect(const ALIPlane &plane)
static ALIbool getFirstTime()
virtual void fillIguana()
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()
ALIPlane getPlate(const ALIbool forwardPlate, const ALIbool applyWedge)
const ALIstring & name() const