#include #include #include #include #include #include #include using namespace std; double MUON_CHARGED_MASS = 0.10566; uint MAX_EVENTS=10000; int NUM_TO_GEN=2; double E_BEAM_MIN=4.0*MUON_CHARGED_MASS; double E_BEAM_MAX=1.0; int RUN_NUMBER=100; string OUTPUT_FILENAME="genmuX.ascii"; #define GAMMA_TYPE 1 #define MUON_PLUS_TYPE 5 #define MUON_MINUS_TYPE 6 class muX{ public: double px,py,pz,E; // muX }; void ParseCommandLineArguments(int narg, char* argv[]); void Usage(void); //---------------------------- // main //---------------------------- int main(int narg, char* argv[]) { // Parse the command line ParseCommandLineArguments(narg, argv); // Open file for output ofstream of(OUTPUT_FILENAME.c_str()); if(!of.is_open()){ cout<<"Unable to open \""< muXs; for(int i=0; i2.0*M_PI)phi_muX-=2.0*M_PI; //theta_muX += 2.0*(M_MUON_2 - theta_muX); muXs.push_back(p); } // Write event to file uint type = MUON_PLUS_TYPE; of<