Skip to content

Latest commit

 

History

History
 
 

Animation of the drifting of the clusters in the TPC generated by TPC Cluster_Drift_Animator.py. It can read the root file G4sPHENIX_g4svtx_eval.root generated by the Fun4All macro and also the json file for the event display and generate a Matplotlib animation and mp4 file with the collision rate and time displayed.

User defined values: time_scale which is the factor by which time is dilated (inverse of speed scale) for the animation(the text on animation is actual time and is not dilated) collision_rate: (in MHz), set fig_text_sPhenix in line 185 accordingly iteration_time: actual duration between frames in FuncAnimation, determines the time scale per iteration, better to set so that time for one iteration is less than (dilated) time for one event to pop up although any value between 1 and 200 should work fine TPC_drift_speed: drift speed in cm/ms. Name of the animation: In line 307 as second argument

To run TPC_Cluster_Drift_Animator.py and TPC_Cluster_Drift_Animator_beam.py Set name of file to read (data) in line 291 (json or root format) and run using python3 TPC Cluster_Drift_Animator.py (or python3 TPC Cluster_Drift_Animator_beam.py) In order to generate smaller animations and then merge them set number of iterations as iterations (line 299) and start_iteration (line 307) as the starting iteration from which animation is generated. Also to use only those events relevant for this smaller animation, select the events using branches.event in line 247 and 248. Run each such macro(using tmux parallely), update the filenames in filelist.txt and then merge the animations using ffmpeg -f concat -safe 0 -i filelist.txt -c copy mergedVideo.mp4