Parenthesis after variable name C++

Working with the below source code (it is open source) and I’ve never seen parenthesis after a variable name. UDefEnergyH is definitely a variable as can be seen in line 1. Can anyone tell me what these parenthesis are doing? Don’t really know how to Google this. Thanks.

bins[0] = UDefEnergyH.GetLowEdgeEnergy(size_t(0));
vals[0] = UDefEnergyH(size_t(0)); //Don't know what this does???
sum = vals[0];
for (ii = 1; ii < maxbin; ii++) {
    bins[ii] = UDefEnergyH.GetLowEdgeEnergy(size_t(ii));
    vals[ii] = UDefEnergyH(size_t(ii)) + vals[ii - 1];
    sum = sum + UDefEnergyH(size_t(ii));

And it is declared here in the header file:

G4PhysicsOrderedFreeVector UDefEnergyH;

Source: syntax

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.