@@ -398,7 +398,7 @@ double DreamSD::getAverageNumberOfPhotons_(const double charge,
398398 double nMax = (*Rindex)[Rlength];
399399
400400 // Max Cerenkov Angle Integral
401- double CAImax = chAngleIntegrals_.get ()->GetMaxValue ();
401+ double CAImax = chAngleIntegrals_.get ()->GetMaxEnergy ();
402402
403403 double dp = 0 ., ge = 0 ., CAImin = 0 .;
404404
@@ -483,13 +483,13 @@ bool DreamSD::setPbWO2MaterialProperties_(G4Material *aMaterial) {
483483
484484 // Calculate Cherenkov angle integrals:
485485 // This is an ad-hoc solution (we hold it in the class, not in the material)
486- chAngleIntegrals_ = std::make_unique<G4PhysicsOrderedFreeVector >();
486+ chAngleIntegrals_ = std::make_unique<G4PhysicsFreeVector >();
487487
488488 int index = 0 ;
489489 double currentRI = RefractiveIndex[index];
490490 double currentPM = PhotonEnergy[index];
491491 double currentCAI = 0.0 ;
492- chAngleIntegrals_.get ()->InsertValues ( currentPM, currentCAI);
492+ chAngleIntegrals_.get ()->PutValue ( 0 , currentPM, currentCAI);
493493 double prevPM = currentPM;
494494 double prevCAI = currentCAI;
495495 double prevRI = currentRI;
@@ -499,7 +499,7 @@ bool DreamSD::setPbWO2MaterialProperties_(G4Material *aMaterial) {
499499 currentCAI = 0.5 * (1.0 / (prevRI * prevRI) + 1.0 / (currentRI * currentRI));
500500 currentCAI = prevCAI + (currentPM - prevPM) * currentCAI;
501501
502- chAngleIntegrals_.get ()->InsertValues ( currentPM, currentCAI);
502+ chAngleIntegrals_.get ()->PutValue (index, currentPM, currentCAI);
503503
504504 prevPM = currentPM;
505505 prevCAI = currentCAI;
0 commit comments