|
[Rivet] Merging aida filesFrank Siegert frank.siegert at cern.chWed Dec 8 22:42:48 GMT 2010
Hi Gavin, I am attaching a small script which will almost do what you want, except that it doesn't take weights yet, but simply sums the samples with weight 1 each. But it should be fairly straightforward to extend it to also take a weight with each input file, which you could then use in line 64-65. I have adapted this from something else and don't remember whether I adapted the error calculation, so you might want to check line 68 whether it does what you want. Cheers, Frank On 08/12/10 20:03, Gavin Hesketh wrote: > Hi Frank, > take the same histogram from (say) 3 aida files, weight each one, then > add the histograms together (ie sum the contents of bin X over the three > files) to get the new aida file. > > I'm trying to run alpgen (sorry!), and have to generate eg Z+0lp, Z+1lp, > Z+2lp separately, then add the results after the pythia step. The Xlp > samples should be weighted to correspond to the same luminosity, but you > don't know the cross section or number of events until after the pythia > step. So, then only way I can think to do this is to merge the aida > files with individual weights somehow. > > But maybe there is a better way to run alpgen with rivet? > > cheers, > Gavin > > > On 08/12/10 18:55, Frank Siegert wrote: >> Hi Gavin, >> >> On 08/12/10 19:32, Gavin Hesketh wrote: >>> I was looking for a way to merge aida files from different runs into >>> one. The way I can up with is: >>> >>> aida2root XX.adia >>> merge the root files, adding histograms & normalising each as needed >>> root2flat XX.root >>> flat2aida XX.dat >> >> Do you mean merge as in "average" (combine statistics), or as in "add >> the bin contents"? >> >> Frank -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: aidaadd URL: <http://www.hepforge.org/lists-archive/rivet/attachments/20101208/03f5dbee/attachment.ksh>
More information about the Rivet mailing list |