Question: Please help me debug this C++ script. Thank you // Description : This is a toy monte carlo generator to simulate the // two-body decay
Please help me debug this C++ script. Thank you


// Description : This is a toy monte carlo generator to simulate the // two-body decay of a massive particle with a mass of 15 GeV and a width of 3 GeV // assuming it is a Gaussian. It will print the event kinematics of the two // outgoing particles. #include #include // HINT : You may need to include a header to use random stuff in c++ #include // HINT : You may need to include a header to give access to the FourVector class // start tools for generating Gaussian random numbers std::default_random_engine generator; std:: normal distribution gen_mass (15.0,3.0); std::uniform_real_distribution gen_esplit(0.2,0.7); std:: uniform_real_distribution gen_theta(0.0,M_PI); std:: uniform_real_distribution gen_phi(0.0,2*M_PI); // function prototype for the generation of a single event kinematics void GenEvent (FourVector *vi, FourVector *v2); int main(int argc, char *argv[]) { std::coutPrint(); fv2->Print(); return 23; // where the magin happens and we generate the decays of a massive particle void GenEvent (FourVector *v1, FourVector *v2) { std::coutSetFourVector(pxl, py1, pzi, el); // conservation of momentum to get p2 FourVector *mother = new FourVector(0,0,0,mass); V2->Set FourVector(mother->GetPx()-v1->GetPx(), mother->GetPy()-v1->GetPy(), mother->GetPzO-v1->GetPzO, mother->GetE()-v1->GetE(); // Description : This is a toy monte carlo generator to simulate the // two-body decay of a massive particle with a mass of 15 GeV and a width of 3 GeV // assuming it is a Gaussian. It will print the event kinematics of the two // outgoing particles. #include #include // HINT : You may need to include a header to use random stuff in c++ #include // HINT : You may need to include a header to give access to the FourVector class // start tools for generating Gaussian random numbers std::default_random_engine generator; std:: normal distribution gen_mass (15.0,3.0); std::uniform_real_distribution gen_esplit(0.2,0.7); std:: uniform_real_distribution gen_theta(0.0,M_PI); std:: uniform_real_distribution gen_phi(0.0,2*M_PI); // function prototype for the generation of a single event kinematics void GenEvent (FourVector *vi, FourVector *v2); int main(int argc, char *argv[]) { std::coutPrint(); fv2->Print(); return 23; // where the magin happens and we generate the decays of a massive particle void GenEvent (FourVector *v1, FourVector *v2) { std::coutSetFourVector(pxl, py1, pzi, el); // conservation of momentum to get p2 FourVector *mother = new FourVector(0,0,0,mass); V2->Set FourVector(mother->GetPx()-v1->GetPx(), mother->GetPy()-v1->GetPy(), mother->GetPzO-v1->GetPzO, mother->GetE()-v1->GetE()