mc_weight_type Try() { #ifdef DEBUG std::cout << "I AM IN Try for Remove_Cdag_C_Delta" << std::endl; std::cout << "CONFIG BEFORE: " << Config.DT << std::endl; //for (int a = 0; a<Config.Na; ++a) print_det(Config.dets[a]); #endif // the det has to be recomputed each time, since global moves will change it det = Config.dets[a_level]; // Pick up a couple of C, Cdagger to remove at random const int Na(det->NumberOfC()); if (Na==0) return 0; int numCdag = 1 + Random(Na); int numC = 1 + Random(Na); // det is in decreasing order. numC = Na - numC + 1; numCdag = Na - numCdag + 1; // Remove the operators from the traces // the -Na +1 is to move backward, to compare with V1 ... Config.DT.removeTwoOperators(*det->select_Cdagger( numCdag ), *det->select_C( numC )); // Acceptance probability mc_weight_type p = Config.DT.ratioNewTrace_OldTrace() * det->try_remove(numCdag,numC); double Tratio = power(2*Nalpha* Config.Beta / double(2*Na) ,2); #ifdef DEBUG std::cout << "RATIO: " << Config.DT.ratioNewTrace_OldTrace() << std::endl; std::cout << "CONFIG AFTER: " << Config.DT << std::endl; //for (int a = 0; a<Config.Na; ++a) print_det(Config.dets[a]); #endif return p/Tratio; }