<div dir="ltr">Hello Thomas and all,<div><br></div><div>I have submitted a pull request that includes new capability in mcsmear to merge hits from multiple files into the newly smeared output file. The syntax for this is illustrated by the following example.</div><div><br></div><div>$ mcsmear [all of the former options] simfile.hddm bgfile1.hddm:1.8  bgfile2.hddm:2</div><div><br></div><div>In this example, simfile.hddm is from a simulation run of hdgeant or hdgeant4, and bgfile1.hddm [bgfile2.hddm] is a standard hddm_s file with background hits to be merged into simfile_smeared.hddm as it is written. The colon-number suffix appended to bgfile1.hddm [bgfile2.hddm] tells mcsmear that hits from events in these files are to be merged into the events in simfile.hddm after the simfile events have been smeared. No smearing is applied to the bgfile1 or bgfile2 events. The real number 1.8 in the bgfile1.hddm suffix is interpreted as a Poisson mean, and a Poisson random number of events from bgfile1 with mean 1.8 are merged into each output event in simfile_smeared.hddm. The integer 2 in the suffix for bgfile2.hddm tells mcsmear to merge exactly 2 events from bgfile2 into each event read from simfile.hddm. Simply appending a decimal point to the 2, as in bgfile2.hddm:2. would force the 2 to be interpreted as a Poisson mean instead of a fixed event ratio.</div><div><br></div><div>If all you want to do is to merge hits from multiple events into a single stream, I provided a null event generator called nullgen that you can use to inject empty events in the place of simfile.hddm, as in the next example below.</div><div><br></div><div>$ nullgen -r 30592 -n 1000 -o null1000.hddm</div><div>$ mcsmear null1000.hddm bgfile1.hddm:1 bgfile2.hddm:1</div><div><br></div><div>This command produces a file null1000_smeared.hddm which contains the first 1000 events from bgfile1.hddm merged 1-to-1 with the first 1000 events from bgfile2.hddm. In conjunction with the new evio-hddm converter you wrote, it is now possible to generate arbitrary merges of different types of events.</div><div><br></div><div>-Richarrd Jones</div></div>