<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=MadGraphTreeProducer</id>
	<title>MadGraphTreeProducer - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=MadGraphTreeProducer"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=MadGraphTreeProducer&amp;action=history"/>
	<updated>2026-05-30T22:56:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=MadGraphTreeProducer&amp;diff=168&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; == MadGraphTreeProducer ==  &#039;&#039;&#039;Section 1- What is what in MadGraphTreeProducer ?&#039;&#039;&#039; &lt;pre&gt; The MadGraphTreeProducer was initialy desinged to produce a TopTree.root file wi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=MadGraphTreeProducer&amp;diff=168&amp;oldid=prev"/>
		<updated>2015-08-26T12:28:46Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == MadGraphTreeProducer ==  &amp;#039;&amp;#039;&amp;#039;Section 1- What is what in MadGraphTreeProducer ?&amp;#039;&amp;#039;&amp;#039; &amp;lt;pre&amp;gt; The MadGraphTreeProducer was initialy desinged to produce a TopTree.root file wi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== MadGraphTreeProducer ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Section 1- What is what in MadGraphTreeProducer ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The MadGraphTreeProducer was initialy desinged to produce a TopTree.root file with the same structure as the CMSSW TopTree&amp;#039;s. &lt;br /&gt;
From tag v_1_12_09 and on, also, a TopTree Producer is supported to produce TopTree out of a Delphes or a MadGraph as input files.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
So, actually, if you run the package, at the end you will have&lt;br /&gt;
-TopTree from MadGraph&lt;br /&gt;
-TopTree from Delphes&lt;br /&gt;
-Basic Comparison Plots of some Reco Objects&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Section 2- How to compile and run MadGraphTreeProducer ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
to be able to run &amp;amp; found the libraries:&lt;br /&gt;
in bash do&lt;br /&gt;
&lt;br /&gt;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to install TopTreeProducer and compile it &lt;br /&gt;
You should install Delphes package  (v1.8): &lt;br /&gt;
me@mylaptop:~$ wget http://www.fynu.ucl.ac.be/users/s.ovyn/Delphes/files/Delphes_V_*.*.tar.gz&lt;br /&gt;
me@mylaptop:~$ tar -xvf Delphes_V_*.*.tar.gz&lt;br /&gt;
me@mylaptop:~$ cd Delphes_V_*.*&lt;br /&gt;
me@mylaptop:~$ ./genMakefile.tcl &amp;gt; Makefile&lt;br /&gt;
me@mylaptop:~$ make &lt;br /&gt;
&lt;br /&gt;
Download MadGraphTreeProducer v_1_12_09&lt;br /&gt;
&lt;br /&gt;
me@mylaptop:~$ cvs co -d v_1_12_09 TopBrussels/MadGraphTreeProducer UserCode/TopBrussels/MadGraphTreeProducer &lt;br /&gt;
me@mylaptop:~$ cd TopBrussels/MadGraphTreeProducer/test&lt;br /&gt;
&lt;br /&gt;
***** Newer update is CMSSW_35X, which has all the TopTreeProducer 35X_v16 compatibilty, ie do&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
me@mylaptop:~$ cvs co -d CMSSW_35X TopBrussels/MadGraphTreeProducer UserCode/TopBrussels/MadGraphTreeProducer &lt;br /&gt;
me@mylaptop:~$ cd TopBrussels/MadGraphTreeProducer/test&lt;br /&gt;
&lt;br /&gt;
Modify the path of your Delphes package in the Makefile and in test/Setup.sh &lt;br /&gt;
&lt;br /&gt;
me@mylaptop:~$ source setup.sh&lt;br /&gt;
me@mylaptop:~$ cd  ../src&lt;br /&gt;
me@mylaptop:~$ make&lt;br /&gt;
me@mylaptop:~$ cd ../test&lt;br /&gt;
 &lt;br /&gt;
To produce a TopTree from a Delphes root file you just need to do (under /test dir)&lt;br /&gt;
&lt;br /&gt;
me@mylaptop:~$./FullDelphesTreeProducer&lt;br /&gt;
&lt;br /&gt;
Pay attention, that the input file is the Delphes.root which has all MC and RECO objects after  a Delphes run. &lt;br /&gt;
Because Delphes package uses the same definition for TRoot Objects, we had to define a different namespace (TopTree) for our analysis. &lt;br /&gt;
So, this is why you get the following outputs TopTreeDelphesRecoObjects.root , TopTreeDelphesMCObjects.root and the merged output of the last two ,TopTreeDelphes.root&lt;br /&gt;
&lt;br /&gt;
If for some reason you just need the Reco of MC collection, just do&lt;br /&gt;
&lt;br /&gt;
me@mylaptop:~$./DelphesMCObjects  &lt;br /&gt;
 &lt;br /&gt;
 or &lt;br /&gt;
&lt;br /&gt;
me@mylaptop:~$./DelphesRecoObjects&lt;br /&gt;
&lt;br /&gt;
in order to produce the MC or Reco file only . Finally, the ./copytree is the merger of these two&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Section 3 -  To make some validation plots compiled  &amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To take some basic plots out of the different TopTrees , there is available a macro, which can be runned as&lt;br /&gt;
&lt;br /&gt;
me@mylaptop:~$./Plots_PGS_Delphes&lt;br /&gt;
&lt;br /&gt;
which will produce a collection of plots saved .root file called TopTree_PGS_Delphes_Plots.root&lt;br /&gt;
&lt;br /&gt;
Also, the same macro is available for the CMSSW TopTree and can be runned as&lt;br /&gt;
&lt;br /&gt;
me@mylaptop:~$root -l&lt;br /&gt;
me@mylaptop:~$.x rootlogon.C&lt;br /&gt;
me@mylaptop:~$.L Plots_CMSSW.cc++&lt;br /&gt;
me@mylaptop:~$Plots_CMSSW();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
which will create an collection of plots saved as TopTree_CMSSW_Plots.root . Pay attention as the input file must be TopTreeCMS.root&lt;br /&gt;
&lt;br /&gt;
We keep the TopTreeCMS , TopTreeDelphes , TopTreeMG names to be really easy to understand what is what!&lt;br /&gt;
&lt;br /&gt;
Now, if you want to compare/superimpose the plots out of all TopTree, just&lt;br /&gt;
&lt;br /&gt;
me@mylaptop:~$./Plots&lt;br /&gt;
me@mylaptop:~$root -l&lt;br /&gt;
me@mylaptop:~$.x make_Validation.cc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Section 4 -  Some more tools...  &amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It might be, that the user will want to produce the TopTree out of the MadGraphTreeProducer . So, you can use the make_TopTree.sh , &lt;br /&gt;
which will find the requested file (if available) in pnfs area, create the TopTree and copy it in a local directory --Default is /user/alkaloge/files/MG/7TeV/NewRound/&lt;br /&gt;
&lt;br /&gt;
Right now, the make_TopTree script, is being  used for m0/m12 custom samples and if you want to use it you need to do&lt;br /&gt;
&lt;br /&gt;
me@mylaptop:~$. make_TopTree.sh 100 2000 100 1400 1 15000 100&lt;br /&gt;
&lt;br /&gt;
the arguments stand for&lt;br /&gt;
$1 $2 = m0 spectrum, ie from 100Gev-&amp;gt;2000 GeV&lt;br /&gt;
$3 $4 = m12 spectrum, ie 100Gev-&amp;gt;1000 GeV&lt;br /&gt;
$5 $6 = as random generator numbers were used, you need to specify the exact spectrum which was also used for the Delphes files. &lt;br /&gt;
Right now, the valid initialization is 1 15000 or 1 5000&lt;br /&gt;
$7 = the step in GeV&lt;br /&gt;
&lt;br /&gt;
in the above example, script will look for files between m0(0, 2000) m12(0,1400) with a step of 100GeV and rnd number 1-&amp;gt;15000 . &lt;br /&gt;
Take care, as the rnd number is somehow frozen and dependent on the how-to making of Delphes and this is why :&lt;br /&gt;
&lt;br /&gt;
Madgraph uses a rnd seed generator number each time it generates a block of events . So, this number, is saved in the final output under the pnfs area, &lt;br /&gt;
and it this way, one can insure avoiding duplication of events, since ONLY one rnd number will be unique record. &lt;br /&gt;
Furthermore, it is easy to request a certain &amp;quot;bunch&amp;quot; of files to be Delphes-ed according to this number. &lt;br /&gt;
More info on the available datasets can be found here http://mon.iihe.ac.be/trac/t2b/wiki/MadGraphTreeProduction&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>