CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OptOSensor2D.cc
Go to the documentation of this file.
1 // COCOA class implementation file
2 //Id: OptOSensor2D.cc
3 //CAT: Model
4 //
5 // History: v1.0
6 // Pedro Arce
7 
15 #ifdef COCOA_VIS
16 #include "Alignment/CocoaVisMgr/interface/ALIVRMLMgr.h"
17 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
18 #endif
22 
23 #include <iostream>
24 #include <iomanip>
25 #include <fstream>
26 #include <cstdlib>
27 
28 using namespace CLHEP;
29 
30 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
31 //@@ Make measurement as distance to previous object 'screen'
32 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
34 {
35  makeMeasurement( lightray, meas);
36 }
37 
38 
39 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
40 //@@ Make measurement as distance to previous object 'screen'
41 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
43 {
44  //---------- check is last and not the only one
45  /* if( vocite - OptOList().begin() == 0 ||
46  OptOList().end() - vocite != 1) {
47  std::cerr << " last and not only one Optical Object should be 'sensor2D' (unless you specify (:T)raverse) " <<
48  OptOList().end() - vocite << " size " <<OptOList().size() << std::endl;
49  DumpBadOrderOptOs();
50  }*/
51 
52  //---------- Get simulated value
53  //---------- Get intersection
54  CLHEP::Hep3Vector ZAxis(0.,0,1.);
55  CLHEP::HepRotation rmt = rmGlob();
56  ZAxis = rmt * ZAxis;
57  if( ALIUtils::debug >= 4 ) {
58  ALIUtils::dump3v( centreGlob(), " sensor2D centre Glob ");
59  ALIUtils::dump3v( ZAxis, " snsor2D normal ");
60  }
61  //- ALIUtils::dumprm( rmt, "rot global " );
62  lightray.intersect( ALIPlane(centreGlob(), ZAxis) );
63  CLHEP::Hep3Vector inters = lightray.point();
64 
65  ALIdouble* interslc;
66  interslc = convertPointToLocalCoordinates( inters );
67  ALIdouble interslcx = interslc[0];
68  ALIdouble interslcy = interslc[1];
69  meas.setValueSimulated( 0, interslcx );
70  meas.setValueSimulated( 1, interslcy );
71 
72  //----- Dump info
73  if (ALIUtils::debug >= 2) {
74  //--- Special for range studies
75  ALIstring chrg = "";
76  /*t if(Model::Ncmslinkrange >= 1 && Model::Ncmslinkrange <= 8 ) {
77  chrg = "RG";
78  } else {
79  chrg = "";
80  } t*/
81  CLHEP::Hep3Vector measvv( meas.value()[0], meas.value()[1], 0.);
82  measvv = rmt*measvv;
83  ALIUtils::dump3v( measvv, " $$$$$$MEAS IN LOCAL FRAME");
84  ALIUtils::dump3v( measvv+centreGlob(), " $$$$$$MEAS IN GLOBAL FRAME");
85 
86  ALIdouble detH = 1000*meas.valueSimulated(0); if(fabs(detH) <= 1.e-9 ) detH = 0.;
87  ALIdouble detV = 1000*meas.valueSimulated(1); if(fabs(detV) <= 1.e-9 ) detV = 0.;
88  std::cout << "REAL value: " << chrg << meas.valueType(0) << ": " << 1000*meas.value()[0] << chrg << " " << meas.valueType(1) << ": " << 1000*meas.value()[1] << " (mm) " << (this)->name()
89  << " DIFF= " << detH-1000*meas.value()[0] << " " << detV-1000*meas.value()[1] << std::endl;
90  std::cout << "SIMU value: " << chrg << " " << meas.valueType(0) << ": "
91  // << setprecision(3) << setw(4)
92  << detH
93  << chrg << " " << meas.valueType(1) << ": " << detV
94  << " (mm) " << (this)->name() << std::endl;
95  /*- std::cout << "SIMU value: " << chrg << " " << meas.valueType(0) << ": "
96  // << setprecision(3) << setw(4)
97  << detH / 0.3125
98  << chrg << " " << meas.valueType(1) << ": " << detV / 0.3125
99  << " STRIPS " << (this)->name() << std::endl; */
100  // << detH
101  // << chrg << " V: " << detV
102  // << " (mm) " << (this)->name() << std::endl;
103  ALIUtils::dump3v( 1000.*(inters - parent()->centreGlob()) , " $$$$$$SIMU inters - parent centre");
104  ALIUtils::dump3v( 1000.*(inters - centreGlob()) , " $$$$$$SIMU inters - centre");
105  }
106  //t delete &lightray;
107 
108  // store the lightray position and direction
109  meas.setLightRayPosition( lightray.point() );
110  meas.setLightRayDirection( lightray.direction() );
111 
112  delete[] interslc;
113 }
114 
115 
116 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
117 //@@ Fast simulation of Light Ray traverses
118 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
120 {
122  if (ALIUtils::debug >= 2) std::cout << "LR: FAST TRAVERSES SENSOR2D " << name() << std::endl;
123 
124  //---------- Shift and Deviate
125  ALIdouble shiftX = findExtraEntryValue("shiftX");
126  ALIdouble shiftY = findExtraEntryValue("shiftY");
128  ALIbool bb = findExtraEntryValueIfExists("shift", shift);
129  if( bb ) {
130  shiftX = shift;
131  shiftY = shift;
132  }
133 
134  //---------- Get intersection
135  CLHEP::Hep3Vector ZAxis(0.,0,1.);
136  CLHEP::HepRotation rmt = rmGlob();
137  ZAxis = rmt * ZAxis;
138  lightray.intersect( ALIPlane(centreGlob(), ZAxis) );
139  CLHEP::Hep3Vector inters = lightray.point();
140 
141  ALIdouble deviX, deviY, devi;
142  // if deviationsFromFile are applied and this sensors has them get the deviations that corresponds to the intersection point.
143  // Set this deviation as original one, as it will not be changed for derivatives
144  if( DeviationsFromFileSensor2D::apply() && fdevi_from_file) {
145  //- std::cout << " DeviationsFromFileSensor2D::apply() " << DeviationsFromFileSensor2D::apply() << std::endl;
146  if(ALIUtils::debug >= 4) {
147  std::cout << "fdeviFromFile" << fdevi_from_file << std::endl;
148  //- std::cout << "deviFromFile" << deviFromFile << std::endl;
149  }
150  //--------- get measurement value of the current sensor
151  std::vector< Measurement* >& measv = Model::MeasurementList();
152  unsigned int ii;
153  Measurement *omeas = 0;
154  for( ii = 0; ii < measv.size(); ii++ ) {
155  //- std::cout << " sensor2d finding meas " << measv[ii]->sensorName() << " " << name() << std::endl;
156  if( measv[ii]->sensorName() == name() ) {
157  omeas = measv[ii];
158  break;
159  }
160  }
161  if( omeas == 0 ) {
162  std::cerr << "!!!EXITING OptOSensor2D::fastTraversesLightRay: meas " << name() << " not found " << std::endl;
163  }
164 
165  ALIdouble interslcx = omeas->value( 0 );
166  ALIdouble interslcy = omeas->value( 1 );
167  if(ALIUtils::debug >= 5) std::cout << " interslcx " << interslcx << " interslcy " << interslcy << std::endl;
168  //----- transform in milimeters and positive
169  //mum interslcx = interslcx*1.E6 + 10000.;
170  //mum interslcy = interslcy*1.E6 + 10000.;
172  interslcx = interslcx/df + 0.010/df;
173  interslcy = interslcy/df + 0.010/df;
174  if(ALIUtils::debug >= 5) std::cout << " interslcx " << interslcx << " interslcy " << interslcy << std::endl;
175 
176  //---------- Get deviations from file (they are in microrads)
177  std::pair< ALIdouble, ALIdouble> devis = deviFromFile->getDevis( interslcx, interslcy );
178  deviX = devis.second;
179  deviY = -devis.first;
180  // deviX = devis.first;
181  // deviY = devis.second;
182 
183  //o deviX = *((deviFromFile->deviationsInX()).begin() + pointY*deviFromFile->nPoints() + pointX) * 1.E-6;;
184  //o deviY = *((deviFromFile->deviationsInY().begin()) + pointY*deviFromFile->nPoints() + pointX) * 1.E-6;
185 
186  //---------- Set this deviation value as original one, as it will not be changed for derivatives (change the entry and also the ExtraEntryValueOriginalList())
187  ALIuint entryNo = extraEntryNo( "deviX" );
188  if( verbose >= 3 ) std::cout << "entrynox" << entryNo << name() << verbose << std::endl;
189  Entry* entryDeviX = *(ExtraEntryList().begin()+entryNo);
190  entryDeviX->setValue( deviX );
191  //- std::vector< ALIdouble >::const_iterator eevolite = static_cast<std::vector< ALIdouble >::iterator>( ExtraEntryValueOriginalList().begin() );
192  std::vector< ALIdouble > eevil = ExtraEntryValueOriginalList();
193  //- std::vector< ALIdouble >::const_iterator eevolite = ( ExtraEntryValueOriginalList().begin() );
194  std::vector< ALIdouble >::iterator eevolite = eevil.begin();
195 
196  *(eevolite+entryNo) = deviX;
197  if( verbose >= 3 ) std::cout<< " entryDeviX name " << entryDeviX->name() << entryDeviX->value() << std::endl;
198  entryNo = extraEntryNo( "deviY" );
199  Entry* entryDeviY = *(ExtraEntryList().begin()+entryNo);
200  //- std::cout << "entrynoy" << entryNo << name() << std::endl;
201  entryDeviY->setValue( deviY );
202  *(eevolite+entryNo) = deviY;
203  //- std::cout<< entryDeviY << " entryDeviY name " << entryDeviY->name() << entryDeviY->value() << std::endl;
204 
205  } else {
206  deviX = findExtraEntryValue("deviX");
207  deviY = findExtraEntryValue("deviY");
208 
209  //??? why previous does not work??
210  if( fdevi_from_file ) {
211  if( ALIUtils::debug >= 5) std::cout << "fdeviFromFile" << fdevi_from_file << std::endl;
212  ALIuint entryNo = extraEntryNo( "deviX" );
213  Entry* entryDeviX = *(ExtraEntryList().begin()+entryNo);
214  if( verbose >= 3 ) std::cout<< entryDeviX << " entryDeviX name " << entryDeviX->name() << entryDeviX->value() << std::endl;
215  deviX = entryDeviX->value();
216  entryNo = extraEntryNo( "deviY" );
217  Entry* entryDeviY = *(ExtraEntryList().begin()+entryNo);
218  if( verbose >= 3 ) std::cout<< entryDeviY << " entryDeviY name " << entryDeviY->name() << entryDeviY->value() << std::endl;
219  deviY = entryDeviY->value();
220 
221  } else {
222  bb = findExtraEntryValueIfExists("devi", devi);
223  if( bb ) {
224  deviX = devi;
225  deviY = devi;
226  }
227  }
228  }
229  if(ALIUtils::debug >= 4) {
230  std::cout << "devi " << devi << " devi x " << deviX << " devi y " << deviY << std::endl;
231  }
232 
233  lightray.setPoint( inters );
234 
235  // lightray.shiftAndDeviateWhileTraversing( this, shiftX, shiftY, 0., deviX, deviY, 0.);
236  lightray.shiftAndDeviateWhileTraversing( this, 'T' );
237  if (ALIUtils::debug >= 2) {
238  lightray.dumpData("Shifted and Deviated");
239  }
240 
241 }
242 
243 
244 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
245 //@@ Fast simulation of Light Ray traverses
246 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
248 {
249  if (ALIUtils::debug >= 4) std::cout << "%%% LR: DETAILED TRAVERSES SENSOR2D " << name() << std::endl;
250  if( DeviationsFromFileSensor2D::apply() && fdevi_from_file) {
252  //- std::cout << "fdeviFromFile" << fdevi_from_file << std::endl;
253  if(ALIUtils::debug >= 0 )std::cerr << "!!WARNING: sensor " << name() << " has read deviation from file and it will not be taken into account. Please use FAST TRAVERSES" << deviFromFile << std::endl;
254  }
255 
256  //---------- If width is 0, just keep the intersection point
257  ALIdouble width = findExtraEntryValue("width");
258  if( width == 0 ) {
259  //---------- Get intersection
260  CLHEP::Hep3Vector ZAxis(0.,0,1.);
261  CLHEP::HepRotation rmt = rmGlob();
262  ZAxis = rmt * ZAxis;
263  lightray.intersect( ALIPlane(centreGlob(), ZAxis) );
264  CLHEP::Hep3Vector inters = lightray.point();
265  lightray.setPoint( inters );
266  if (ALIUtils::debug >= 2) {
267  lightray.dumpData("LightRay Sensor2D traversed: ");
268  }
269  return;
270  }
271 
272  if (ALIUtils::debug >= 4) std::cout << std::endl << "$$$ LR: REFRACTION IN FORWARD PLATE " << std::endl;
273  //---------- Get forward plate
274  ALIPlane plate = getPlate(1, 1);
275  //---------- Refract while entering object
276  ALIdouble refra_ind1 = 1.;
277  ALIdouble refra_ind2 = findExtraEntryValueMustExist("refra_ind");
278  lightray.refract( plate, refra_ind1, refra_ind2 );
279 
280  if (ALIUtils::debug >= 4) std::cout << std::endl << "$$$ LR: REFRACTION IN BACKWARD PLATE " << std::endl;
281  //---------- Get backward plate
282  plate = getPlate(0, 1);
283  //---------- Refract while exiting splitter
284  lightray.refract( plate, refra_ind2, refra_ind1 );
285 
286  CLHEP::Hep3Vector inters = lightray.point();
287  lightray.setPoint( inters );
288 
289  if (ALIUtils::debug >= 4) {
290  lightray.dumpData("LightRay Sensor2D traversed: ");
291  }
292 
293 
294 }
295 
296 
297 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
298 //@@ fillExtraEntry: fill it from file or fill it the usual way
299 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
300 void OptOSensor2D::fillExtraEntry( std::vector<ALIstring>& wordlist )
301 {
302 
303  if(ALIUtils::debug >= 5) std::cout << "OptOSensor2D fillExtraEntry wordlist[1] " << wordlist[1] << std::endl;
304  //---------- check if it is deviation read from file
305  fdevi_from_file = 0;
306  //- std::cout << "WL " << wordlist[1]<< "WL " << wordlist[2]<< "WL " << wordlist[3] << std::endl;
307  if( wordlist[1] == ALIstring("devi") && wordlist[2] == ALIstring("from_file") ) {
308  //---------- Open file
309  ALIstring fnam;
310  if( wordlist.size() >= 4) {
311  fnam = wordlist[3];
312  } else {
313  //----- Build up file name if it does not exists
314  fnam = "dat/devi-";
315  fnam += shortName();
316  fnam += ".dat";
317  }
318 
319  ALIFileIn& ifdevi = ALIFileIn::getInstance( fnam );
320 
321  //----- Check that file exists
322  if(ALIUtils::debug >= 4) std::cout << "Opening deviation file: " << fnam << std::endl;
323  /*- if( !ifdevi ) {
324  std::cerr << " !!! Sensor2D Deviation file not found: " << fnam << " of object " << name() << std::endl;
325  exit(1);
326  }*/
327 
328  deviFromFile = new DeviationsFromFileSensor2D();
329  fdevi_from_file = 1;
330  if(ALIUtils::debug >= 5 ) std::cout << "deviFromFile " << deviFromFile << std::endl;
331  //----- Read header
332  ALIstring sensor1_name, sensor2_name;
333  ALIint sensor1_side, sensor2_side;
334  ALIdouble sensor_dist;
335  ALIdouble prec_deviX,prec_deviY;
336 
337  std::vector<ALIstring> wl;
338  ifdevi.getWordsInLine( wl );
339  sensor1_name = wl[0];
340  sensor2_name = wl[1];
341  sensor_dist = atof( wl[2].c_str() );
342  // 'c' means that light is traversing the glass
343  sensor1_side = 1;
344  if(sensor1_name[sensor1_name.size()-2] == 'c') {
345  sensor1_side = 2;
346  sensor1_name = sensor1_name.substr(0,sensor1_name.size()-1);
347  }
348  sensor2_side = 1;
349  if(sensor2_name[sensor2_name.size()-2] == 'c') {
350  sensor2_side = 2;
351  sensor2_name = sensor2_name.substr(0,sensor2_name.size()-1);
352  }
353  if(ALIUtils::debug >= 5) std::cout << "sensor1_name " << sensor1_name << " sensor2_name " << sensor2_name << " sensor_dist " << sensor_dist << " unknown " << wl[3] << std::endl;
354 
355  ifdevi.getWordsInLine( wl );
356  prec_deviX = atof( wl[0].c_str() );
357  prec_deviY = atof( wl[1].c_str() );
358 
359  if(ALIUtils::debug >= 5) std::cout << "prec_deviX " << prec_deviX << " prec_deviY " << prec_deviY << std::endl;
360 
361  deviFromFile = new DeviationsFromFileSensor2D();
362  ALIdouble offsetX, offsetY;
363  if( wl.size() == 5 ) {
364  offsetX = ALIUtils::getFloat( wl[3] );
365  offsetY = ALIUtils::getFloat( wl[4] );
366  deviFromFile->setOffset( offsetX, offsetY );
367  }
368  deviFromFile->readFile( ifdevi );
369  fdevi_from_file = 1;
370  if(ALIUtils::debug >= 5 ) std::cout << "deviFromFile " << deviFromFile << std::endl;
371 
372 
373  //--- Fill extra entries 'deviX' & 'deviY' to compute derivatives
374  std::vector<ALIstring> wlo;
375  char chartmp[20];
376  wlo.push_back( wordlist[0] );
377  wlo.push_back("deviX");
378  wlo.push_back("0"); // value is set to 0 as it is on the file and the point of intersection is not computed yet
379  gcvt( prec_deviX, 10, chartmp );
380  wlo.push_back( ALIstring(chartmp) );
381  wlo.push_back("cal");
382  std::vector<ALIstring> wl2(wlo);
384 
385  wl2[1] = "deviY";
386  gcvt( prec_deviY, 10, chartmp );
387  wl2[3] = ALIstring( chartmp );
389 
390  } else {
391  OpticalObject::fillExtraEntry( wordlist );
392  }
393 }
394 
395 
396 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
397 //@@
398 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
400 {
401  ALIdouble* interslc = new ALIdouble[2];
402 
403  //----- X value
404  CLHEP::HepRotation rmt = rmGlob();
405  CLHEP::Hep3Vector XAxism(1.,0.,0.);
406  XAxism*=rmt;
407  if( ALIUtils::debug >= 5) ALIUtils::dump3v( (this)->centreGlob(), "centre glob sensor2D" );
408  if( ALIUtils::debug >= 5) ALIUtils::dumprm( rmt, "rotation matrix sensor2D" );
409  //t ALIUtils::dump3v(point - (this)->centreGlob() , "inters - (this)->centreGlob()");
410  if( ALIUtils::debug >= 5) ALIUtils::dump3v(XAxism , "XAxism");
411  interslc[0] = (point - (this)->centreGlob() ) * XAxism;
412 
413  //----- Y value
414  CLHEP::Hep3Vector YAxism(0.,1.,0.);
415  YAxism*=rmt;
416  if( ALIUtils::debug >= 5)
417 ALIUtils::dump3v(YAxism , "YAxism");
418  interslc[1] = (point - (this)->centreGlob() ) * YAxism;
419 
420  if( ALIUtils::debug >= 5 ) {
421  std::cout << " intersection in local coordinates: X= " << interslc[0] << " Y= " << interslc[1] << std::endl;
422  ALIUtils::dump3v( point - (this)->centreGlob() , " inters - centre " );
423  }
424  return interslc;
425 }
426 
427 #ifdef COCOA_VIS
428 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
430 {
431  //- std::cout << " filling optosensor " << std::endl;
432  ALIVRMLMgr& vrmlmgr = ALIVRMLMgr::getInstance();
433  ALIColour* col = new ALIColour( 0., 0., 1., 0. );
434  vrmlmgr.AddBox( *this, 1., 1., .2, col);
435  vrmlmgr.SendReferenceFrame( *this, 0.6);
436  vrmlmgr.SendName( *this, 0.1 );
437 }
438 
439 
440 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
442 {
443  ALIColour* col = new ALIColour( 0., 0., 1., 0. );
444  std::vector<ALIdouble> spar;
445  spar.push_back(20.);
446  spar.push_back(20.);
447  spar.push_back(5.);
448  IgCocoaFileMgr::getInstance().addSolid( *this, "BOX", spar, col);
449 }
450 #endif
451 
452 
453 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
455 {
456  ALIdouble go;
458  gomgr->getGlobalOptionValue("VisScale", go );
459 
460  theSolidShape = new CocoaSolidShapeBox( "Box", go*4.*cm/m, go*4.*cm/m, go*1.*cm/m ); //COCOA internal units are meters
461 }
long double ALIdouble
Definition: CocoaGlobals.h:11
static ALIFileIn & getInstance(const ALIstring &name)
Definition: ALIFileIn.cc:23
list parent
Definition: dbtoconf.py:74
virtual void fillExtraEntry(std::vector< ALIstring > &wordlist)
Definition: Entry.h:18
void shiftAndDeviateWhileTraversing(const OpticalObject *opto, char behav)
Definition: LightRay.cc:240
const ALIstring valueType(ALIuint ii) const
Definition: Measurement.h:140
virtual void fillVRML()
Definition: OpticalObject.h:55
static void dumprm(const CLHEP::HepRotation &rm, const std::string &msg, std::ostream &out=std::cout)
Definition: ALIUtils.cc:77
ALIdouble value() const
Definition: Entry.h:55
int ALIint
Definition: CocoaGlobals.h:15
void setValue(ALIdouble val)
Definition: Entry.h:77
static ALIint debug
Definition: ALIUtils.h:35
static GlobalOptionMgr * getInstance()
static double getFloat(const ALIstring &str)
Convert a string to an float, checking that it is really a number.
Definition: ALIUtils.cc:404
virtual void makeMeasurement(LightRay &lightray, Measurement &meas)
Definition: OptOSensor2D.cc:42
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
bool ALIbool
Definition: CocoaGlobals.h:19
void setPoint(const CLHEP::Hep3Vector &point)
Definition: LightRay.h:64
const CLHEP::Hep3Vector & point() const
Definition: LightRay.h:52
void setLightRayPosition(const CLHEP::Hep3Vector &lightRayPosition)
Definition: Measurement.h:222
virtual void fastTraversesLightRay(LightRay &lightray)
void setValueSimulated(ALIint coor, ALIdouble value)
Definition: Measurement.h:196
virtual void defaultBehaviour(LightRay &lightray, Measurement &meas)
Definition: OptOSensor2D.cc:33
void setLightRayDirection(const CLHEP::Hep3Vector &lightRayDirection)
Definition: Measurement.h:224
void refract(const ALIPlane plate, const ALIdouble refra_ind1, const ALIdouble refra_ind2)
Definition: LightRay.cc:162
static void setApply(ALIbool val)
const ALIstring & name() const
Definition: Entry.h:52
virtual void fillExtraEntry(std::vector< ALIstring > &wordlist)
ALIint getWordsInLine(std::vector< ALIstring > &wl)
Definition: ALIFileIn.cc:90
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
Definition: ALIUtils.cc:61
void intersect(const ALIPlane &plane)
Definition: LightRay.cc:100
virtual void fillIguana()
Definition: OpticalObject.h:56
const ALIdouble * value() const
Definition: Measurement.h:125
std::string ALIstring
Definition: CocoaGlobals.h:9
static unsigned int const shift
void dumpData(const ALIstring &str) const
Definition: LightRay.cc:381
const ALIdouble valueSimulated(ALIuint ii) const
Definition: Measurement.h:117
tuple cout
Definition: gather_cfg.py:41
virtual void detailedTraversesLightRay(LightRay &lightray)
ALIdouble * convertPointToLocalCoordinates(const CLHEP::Hep3Vector &point)
void constructSolidShape()
const CLHEP::Hep3Vector & direction() const
Definition: LightRay.h:55
static std::vector< Measurement * > & MeasurementList()
Definition: Model.h:79
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
static ALIdouble LengthValueDimensionFactor()
Definition: ALIUtils.h:71
unsigned int ALIuint
Definition: CocoaGlobals.h:17