Question: Write a program that defines and uses a struct which stores the contents necessary to define a four-vector (What is a four vector?), which contains

Write a program that defines and uses a struct which stores the contents necessary to define a four-vector (What is a four vector?), which contains the kinetic information of a particle - i.e. Energy, px, py, pz. In your main function, define two instances of these four vectors. Then, create a third instance which is the sum of the first two four vectors. Calculate the invariant mass of this four vector and print that to the terminal. (NOTE : Throughout this entire exercise, you can assume that the speed of light, c, is unity, and you need not worry about finding a way to encode physical units in your code.)

Writting in C++

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!