i have started migration of high energy physics algorithm written in fortran object oriented approach in c++. fortran code uses lot of global variables across lot of functions. i have simplified global variables set of input variables, , set of invariants (variables calculated once @ beginning of algorithm , used functions). also, have divided full algorithm 3 logical steps, represented 3 different classes. so, in simple way, have this: double calculatefactor(double x, double y, double z) { invariantstypea inva(); invariantstypeb invb(); // need x, y , z inva.calculatevalues(); invb.calculatevalues(); step1 s1(); step2 s2(); step3 s3(); // need x, y, z, inva , invb return s1.eval() + s2.eval() + s3.eval(); } my problem is: for doing calculations invariantstypex , stepx objects need input parameters (and these not three). the 3 objects s1 , s2 , s3 need data of inva , invb objects. all classes use several other classes ...