- Timestamp:
- 10/10/19 19:56:28 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/msimreflector/MFresnelLens.cc
r19675 r19753 205 205 fGrooves.resize(num); 206 206 207 for ( int i=0; i<num; i++)207 for (uint32_t i=0; i<num; i++) 208 208 { 209 209 const double r0 = i*width; … … 326 326 Int_t MFresnelLens::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 327 327 { 328 Bool_t rc = kFALSE; 329 330 if (IsEnvDefined(env, prefix, "SurfaceRoughness", print)) 331 { 332 rc = kTRUE; 333 if (!GetEnvValue(env, prefix, "SurfaceRoughness", fPSF)) 334 return kERROR; 335 } 336 328 337 const int correction = GetEnvValue(env, prefix, "Transmission.FresnelCorrection", -1); 329 338 const float thickness = GetEnvValue(env, prefix, "Transmission.Thickness", -1.0); // [cm] … … 335 344 336 345 if (!correction_valid && !thickness_valid && !fname_valid) 337 return kFALSE;346 return rc; 338 347 339 348 if (correction_valid && thickness_valid && fname_valid) 340 return ReadTransmission(fname, thickness, correction) >= 0 ;349 return ReadTransmission(fname, thickness, correction) >= 0 || rc; 341 350 342 351 *fLog << err << "Reading transmission file required FileName, Thickness and FresnelCorrection." << endl; … … 1235 1244 1236 1245 // Calculate the ordinal number of the groove correpsonding to rx 1237 const int ix = TMath::FloorNint(rx/fW);1246 const uint32_t ix = TMath::FloorNint(rx/fW); 1238 1247 1239 1248 // FIXME: The Z-coordinate (cone.h) is actually a line through two points!!! … … 1475 1484 p.fVectorPart.SetZ(0);//fH/2); Found by try-and-error 1476 1485 1477 return cnt>=fMinHits && (fMaxHits==0 || cnt<=fMaxHits) ? cnt : -1;;1486 return uint32_t(cnt)>=fMinHits && (fMaxHits==0 || uint32_t(cnt)<=fMaxHits) ? cnt : -1;; 1478 1487 } 1479 1488 catch (const raytrace_exception &e)
Note:
See TracChangeset
for help on using the changeset viewer.