spradlin / WCSim

The WCSim GEANT4 application
0 stars 0 forks source link

Check consistency of std::map and TGraph QE reps in WCSimPMTObject #14

Open spradlin opened 2 years ago

spradlin commented 2 years ago

Warnings in WCSimPMTObject

Warning text

Compiling WCSimPMTObject.cc ...
src/WCSimPMTObject.cc: In member function ‘void WCSimBasicPMTObject::DefineQEHist(std::map<double, double>)’:
src/WCSimPMTObject.cc:2045:73: warning: declaration of ‘mapQE’ shadows a member of 'this' [-Wshadow]
 void WCSimBasicPMTObject::DefineQEHist(std::map<G4double,G4double> mapQE){

Shadowing

Adopted the conventional solution of updating the names of all private and protected data members to begin with f.

Conclusion

After these changes, there are no more compiler warnings from WCSimPMTObject.

It looks like the implementation of WCSimBasicPMTObject may be incomplete. It maintains in parallel two representations of the quantum efficiency curves, but these may not be maintained consistently.

Originally posted by @spradlin in https://github.com/spradlin/WCSim/issues/9#issuecomment-1002398098