<div dir="ltr"><div><div>Thanks for the replies. Exactly as David said. I would like to dump trees from rivet and use a multivariate analysis tool like tvma. I found an admittedly ancient rivet script that seems to do this but I am unsure if something like this is still supported in the newer rivet versions (I am running 2.5.1.). <a href="https://rivet.hepforge.org/trac/attachment/ticket/95/ExampleTree.cc">https://rivet.hepforge.org/trac/attachment/ticket/95/ExampleTree.cc</a> <br><br></div><div>Let me know if there is something that can be done. Thanks again!<br></div><div><br></div>Best,<br></div>Alan<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 22, 2016 at 1:29 AM, Andy Buckley <span dir="ltr"><<a href="mailto:andy.buckley@cern.ch" target="_blank">andy.buckley@cern.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I know... not asking about whether ROOT in general has uses (!), but what Alan specifically wanted it for. It's possible that we have something built-in but not well-advertised...<span class="HOEnZb"><font color="#888888"><br>
<br>
Andy</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On 21/10/16 23:02, David Bjergaard wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Andy,<br>
<br>
Not to hijack the thread, but using ROOT to dump a tree of events from a rivet<br>
analysis is useful when you're doing exploratory analyses and want to see how<br>
things are correlated at the generator level.<br>
<br>
<br>
David<br>
<br>
Andy Buckley <<a href="mailto:andy.buckley@cern.ch" target="_blank">andy.buckley@cern.ch</a>> writes:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Exactly what it says: Rivet's configure doesn't have an --enable-root<br>
option. Maybe you're thinking of YODA?<br>
<br>
You can pass linker flags for ROOT to the rivet-buildplugin script if<br>
you want, but we don't have any "official" support for it.<br>
<br>
Out of interest, what ROOT features do you require?<br>
<br>
Andy<br>
<br>
<br>
On 21/10/16 17:28, Alan Kaptanoglu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have tried just --enable-root as well.<br>
<br>
On Fri, Oct 21, 2016 at 6:28 PM, Alan Kaptanoglu<br>
<<a href="mailto:alank2@alumni.stanford.edu" target="_blank">alank2@alumni.stanford.edu</a> <mailto:<a href="mailto:alank2@alumni.stanford.edu" target="_blank">alank2@alumni.stanford<wbr>.edu</a>>> wrote:<br>
<br>
Another question, this time regarding linking rivet with ROOT. I<br>
have tried adding the line --enable-root to my configure file and<br>
re-installing but it complains:<br>
configure: WARNING: unrecognized options: --enable-root, --with-root<br>
and I am unsure how to proceed.<br>
<br>
Best,<br>
Alan<br>
<br>
On Mon, Oct 17, 2016 at 5:38 PM, Alan Kaptanoglu<br>
<<a href="mailto:alank2@alumni.stanford.edu" target="_blank">alank2@alumni.stanford.edu</a> <mailto:<a href="mailto:alank2@alumni.stanford.edu" target="_blank">alank2@alumni.stanford<wbr>.edu</a>>> wrote:<br>
<br>
Thank you very much! I read that in useJetArea() but was not<br>
sure how to get around it. Your line " fj.useJetArea(new<br>
fastjet::AreaDefinition(fastje<wbr>t::VoronoiAreaSpec()));" works<br>
perfectly. Passing it by value was a typo!<br>
<br>
Cheers,<br>
Alan<br>
<br>
On Mon, Oct 17, 2016 at 4:47 PM, Andy Buckley<br>
<<a href="mailto:andy.buckley@cern.ch" target="_blank">andy.buckley@cern.ch</a> <mailto:<a href="mailto:andy.buckley@cern.ch" target="_blank">andy.buckley@cern.ch</a>>> wrote:<br>
<br>
On 17/10/16 15:29, Alan Kaptanoglu wrote:<br>
<br>
Hello,<br>
<br>
I am trying to declare jets with area in the<br>
initialization section of<br>
my Rivet Analysis. I originally tried:<br>
<br>
fastjet::GhostedAreaSpec areaspec(2.5,1,0.01);<br>
fastjet::AreaDefinition<br>
area_def(fastjet::active_area_<wbr>explicit_ghosts,areaspec);<br>
FastJets jets(vfs, FastJets::ANTIKT, Rsmall);<br>
jets.useJetArea(area_def);<br>
jets.useInvisibles(JetAlg::ALL<wbr>_INVISIBLES);<br>
jets.useMuons(JetAlg::DECAY_MU<wbr>ONS);<br>
declare(jets, "jets");<br>
<br>
but this definition goes out of scope so when I ask for<br>
jet areas in my<br>
"analysis" section of my code, it complains the jets<br>
have no valid jet<br>
area associated with them. I next tried several versions of:<br>
<br>
areaspec = new fastjet::GhostedAreaSpec(2.5,1<wbr>,0.01);<br>
area_def = new<br>
fastjet::AreaDefinition(fastje<wbr>t::active_area_explicit_ghosts<wbr>,*areaspec);<br>
FastJets jets(vfs, FastJets::ANTIKT, Rsmall);<br>
jets.useJetArea(area_def);<br>
jets.useInvisibles(JetAlg::ALL<wbr>_INVISIBLES);<br>
jets.useMuons(JetAlg::DECAY_MU<wbr>ONS);<br>
declare(jets, "jets");<br>
<br>
where areaspec and area_def are private members of my<br>
Analysis class. I<br>
also tried initializing these variables in my<br>
constructor using<br>
initialization lists, as well as declaring them global<br>
variables (and<br>
yes, to my knowledge, I am also deleting them correctly<br>
if I use "new").<br>
In all these cases, the code runs correctly but<br>
complains at the end of<br>
a memory error, which is attached in a text file. Any<br>
idea why this is<br>
happening or how to fix?<br>
<br>
<br>
Hi Alan,<br>
<br>
The AreaDefinition provided to FastJets must be a<br>
heap-allocated pointer whose ownership is then taken over by<br>
the FastJets object: it will delete the pointer at the end<br>
of the run so you shouldn't try to do that yourself. (This<br>
is documented on the useJetArea() function)<br>
<br>
To this end I usually make sure that I don't have a variable<br>
of my own pointing at that area def objects, e.g.<br>
fj.useJetArea(new<br>
fastjet::AreaDefinition(fastje<wbr>t::VoronoiAreaSpec()));<br>
<br>
As you noticed, if you pass in a locally allocated object,<br>
it goes out of scope and you get a crash. Although I'm not<br>
sure how you're able to pass it in by value rather than by<br>
pointer!<br>
<br>
I would like, if possible, to avoid this pointer ownership<br>
stuff in the FastJets interface... I'm sure it's possible,<br>
just needs a bit of care and thought about backward<br>
compatibility. Pointers were used historically because we<br>
need the option of a null AreaDefinition, and there's no<br>
such thing as a null reference in C++.<br>
<br>
Hope that helps,<br>
Andy<br>
<br>
--<br>
Dr Andy Buckley, Lecturer / Royal Society University<br>
Research Fellow<br>
Particle Physics Expt Group, University of Glasgow<br>
<br>
<br>
<br>
<br>
</blockquote></blockquote></blockquote>
<br>
<br>
-- <br>
Dr Andy Buckley, Lecturer / Royal Society University Research Fellow<br>
Particle Physics Expt Group, University of Glasgow<br>
</div></div></blockquote></div><br></div>