#include #include #include #include #include #include #include using namespace std; double PI_CHARGED_MASS = 0.139568; uint MAX_EVENTS=10000; int NUM_TO_GEN=2; double E_BEAM_MIN=4.0*PI_CHARGED_MASS; double E_BEAM_MAX=1.0; int RUN_NUMBER=100; string OUTPUT_FILENAME="genpiX.ascii"; #define GAMMA_TYPE 1 #define PI_PLUS_TYPE 8 #define PI_MINUS_TYPE 9 class piX{ public: double px,py,pz,E; // piX }; 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 \""< piXs; for(int i=0; i2.0*M_PI)phi_piX-=2.0*M_PI; //theta_piX += 2.0*(M_PI_2 - theta_piX); piXs.push_back(p); } // Write event to file uint type = PI_PLUS_TYPE; of<