#define XERR
#include "loop.ih"

//      d_pool->falsePositives(d_round * (modality + 1)) >
//        d_modalities[XRAY][modality == MAMMOGRAPHY ? MAMMO : TOMO]
//                    [screeningAge >= 40].value()


void Loop::maybeFalsePositive(ModBase *modBase, double screeningAge)
{
//xerr("specificity: " << modBase->specificity(screeningAge) << ' ' << \ <--
//d_costs.usingAt(screeningAge));

    if (Random::instance().uniform() > modBase->specificity(screeningAge))
    {
        modBase->falsePositive();
        ++d_nRoundFP[d_round];
        d_roundInfo[d_round] = FALSE_POSITIVE;

        addCost(d_costs.usingAt(screeningAge)); 
//        addCost(d_costs.biopsy(screeningAge)); 
    }
}
