Double_t KVChIo::GetCalibratedEnergy() { //Calculate energy in MeV from coder values. //Returns 0 if calibration not ready or detector not fired //(we require that at least one acquisition parameter have a value //greater than the current pedestal value) if (IsCalibrated() && Fired("Pany")) { return (fVoltE->Compute( GetVolts() )); } return 0; }
Double_t KVHarpeeSi::GetCalibT(const Char_t* type) { // Calculate calibrated time in ns of type 'type' (SI_HF, SI_SED1, // SI_INDRA, SI_MCP, ...) for coder values. // Returns 0 if calibration not ready or time ACQ parameter not fired. // (we require that the acquisition parameter has a value // greater than the current pedestal value). // The reference time T0 used for the calibration is the one of this // detector if it is fired otherwise T0 is the one of the // fired silicon detector of Harpee which stopped the time. KVHarpeeSi* firedSi = (Fired("Pany") ? this : GetFiredHarpeeSi()); if (!firedSi) return 0; KVFunctionCal* cal = GetTCalibrator(type); if (cal && cal->GetStatus() && cal->GetACQParam()->Fired("P")) return cal->Compute() + firedSi->GetT0(type); return 0; }
void Shot::Update() { if (!blaster) return; if (Pos.y < 0 ) { fired=false; } //Could use a messenger system to handle this rather than checking each frame, BUT, since there is only ever one bullet in Centipede, the difference is negligable. //Will need such a system later tho if (fired) Fired(); else Pos = blaster->getPos()+sf::Vector2f(0, -6); MainSprite.Update(); //printf("%f \n", Pos.y); MainSprite.setPosition(Pos); }