#define XERR
#include "screening.ih"

        // called from loop/initialize.cc

DoubleVect Screening::radiationRisk(
                                Modalities const &modalities,
                                Uint16Vect const &biRadIndices,
                                double beta, double eta)   // beir7 values
{
    DoubleVect vect = DoubleVect(END_AGE, 1);

    for (size_t rndIdx = 0, end = d_roundVect.size(); rndIdx != end; ++rndIdx)
    {
        if (Random::instance().uniform() <= d_rate)
            (*d_errRiskVector)
            (
                vect, modalities, 
                d_roundVect[rndIdx], biRadIndices[rndIdx],
                beta, eta
            ); 
    }

    return vect;
}







