void Tgam::fasLigandKilling(GrGrid& grid, Stats& stats) { Pos coord; if (returnRandMacFromMoore(grid, coord)) { Mac* pMac = dynamic_cast<Mac*>(grid.agent(coord, 0)); if (!pMac) pMac = dynamic_cast<Mac*>(grid.agent(coord, 1)); assert(pMac); // If the mac died on this time step ignore it. if (pMac->getNextState() == Mac::MAC_DEAD) { return; } // Fas/FasL induced apoptosis with probability if (pMac->getState() == Mac::MAC_INFECTED || pMac->getState() == Mac::MAC_CINFECTED) { ++stats.getApoptosisFasFasL(); pMac->apoptosis(grid); pMac->kill(); grid.incKillings(coord); } } }
void Tgam::checkMacTgamInduced(GrGrid& grid) { Pos coord; if (returnRandMacFromMoore(grid, coord)) { Mac* pMac = dynamic_cast<Mac*>(grid.agent(coord, 0)); if (!pMac) pMac = dynamic_cast<Mac*>(grid.agent(coord, 1)); assert(pMac); // If the mac died on this time step ignore it. if (pMac->getNextState() == Mac::MAC_DEAD) return; // If mac does not die then check for induction conditions - Macs bool ProbAntigenPres = g_Rand.getReal() < _PARAM(Tcell_Tgam_probAntigenPresentation); if(pMac && pMac->getICOS()) _nICOS ++; switch(pMac->getState()) { case Mac::MAC_INFECTED: case Mac::MAC_CINFECTED: case Mac::MAC_ACTIVE: if (ProbAntigenPres) _nAntigenStim ++; break; case Mac::MAC_RESTING: if ((pMac->getNFkB() || pMac->getStat1()) && ProbAntigenPres) _nAntigenStim ++; break; throw std::runtime_error("Unknown Mac State in Tgam Induction Switch"); } } }