Changeset 19675
- Timestamp:
- 09/24/19 15:22:49 (5 years ago)
- Location:
- trunk/Mars/msimreflector
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/msimreflector/MFresnelLens.cc
r19647 r19675 289 289 const double lambda = transmission.GetX()[i];; 290 290 291 double trans = transmission.GetY()[i] /100;291 double trans = transmission.GetY()[i]; 292 292 if (trans>1) 293 293 { … … 322 322 323 323 return fAbsorptionLength.GetNp(); 324 } 325 326 Int_t MFresnelLens::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 327 { 328 const int correction = GetEnvValue(env, prefix, "Transmission.FresnelCorrection", -1); 329 const float thickness = GetEnvValue(env, prefix, "Transmission.Thickness", -1.0); // [cm] 330 const TString fname = GetEnvValue(env, prefix, "Transmission.FileName", ""); 331 332 const bool correction_valid = correction>=0; 333 const bool thickness_valid = thickness>0; 334 const bool fname_valid = !fname.IsNull(); 335 336 if (!correction_valid && !thickness_valid && !fname_valid) 337 return kFALSE; 338 339 if (correction_valid && thickness_valid && fname_valid) 340 return ReadTransmission(fname, thickness, correction) >= 0; 341 342 *fLog << err << "Reading transmission file required FileName, Thickness and FresnelCorrection." << endl; 343 return kERROR; 324 344 } 325 345 … … 1391 1411 try 1392 1412 { 1393 int last_surface = EnterGroove(kEntrySurface, n0, p, u);1413 int last_surface = kEntrySurface;//EnterGroove(kEntrySurface, n0, p, u); 1394 1414 1395 1415 // last_surface that was hit (photon originates from) … … 1401 1421 // nagative: photon is inside of material --> Try to leave 1402 1422 1403 double T0 = 0; 1423 double T0 = 0;//last_surface<0 ? p.T() : 0; 1404 1424 1405 1425 // The general assumption is: no surface can be hit twice in a row 1406 1426 1407 int cnt = 0;1427 int cnt = -1; 1408 1428 while (last_surface!=0) 1409 1429 { … … 1413 1433 if (last_surface>0) 1414 1434 { 1415 last_surface = EnterGroove( 1435 last_surface = EnterGroove(last_surface, n0, p, u); 1416 1436 1417 1437 // successfully entered --> remember time of entrance to calculate transimission … … 1509 1529 try 1510 1530 { 1511 int last_surface = EnterGroove(kEntrySurface, n0, p, u); 1512 //cout << "enter1 = " << last_surface << endl; 1531 int last_surface = kEntrySurface;//EnterGroove(kEntrySurface, n0, p, u); 1513 1532 1514 1533 // last_surface that was hit (photon originates from) … … 1524 1543 // The general assumption is: no surface can be hit twice in a row 1525 1544 1526 int cnt = 0;1545 int cnt = -1; 1527 1546 while (last_surface!=0) 1528 1547 { -
trunk/Mars/msimreflector/MFresnelLens.h
r19638 r19675 101 101 int LeavePeak(int surface, double n0, MQuaternion &pos, MQuaternion &dir, double T0) const; 102 102 103 // MParContainer 104 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 105 103 106 public: 104 107 MFresnelLens(const char *name=NULL, const char *title=NULL);
Note:
See TracChangeset
for help on using the changeset viewer.