[Rivet] How to initialize AxesDefinition?

Debarati Roy debarati.roy at cern.ch
Mon Oct 27 13:01:13 GMT 2014


Hi Andy,
            Thanks for your feedback. It was really helpful.

Regards,
Debarati
________________________________________
From: Andy Buckley
Sent: 26 October 2014 03:52
To: Debarati Roy; rivet at projects.hepforge.org
Cc: Albert Knutsson; Maxime Gouzevitch; Lars Sonnenschein
Subject: Re: [Rivet] How to initialize AxesDefinition?

On 23/10/14 09:58, Debarati Roy wrote:
> Hi Experts,
>                  Could you please point me to some example or let me
> know how one can initialize the AxesDefinition in the .cc ? I tried with
> this(inside the init() method with Rivet 2.2x version),
> .....................................................................................................................
> const FinalState fs(-2.6, 2.6, 0.0*GeV);
>       addProjection(FastJets(fs, FastJets::ANTIKT, 0.5), "Jets");
>
>       const AxesDefinition& ax(fs);
>       addProjection(ax, "Axes");
> .......................................................................................................................
> But I am getting the following error,
> .......................................................................................................................
> **error: invalid initialization of reference of type ‘const
> Rivet::AxesDefinition&’ from expression of type ‘const Rivet::FinalState’
> .........................................................................................................................
>  This is needed to use new Hemispeheres calc methid in the following
> way(inside analyze method),
> .......................................................................................................................
> Hemispheres hemi(ax);
>       hemi.calc(n,jets);
>       if (debug == true)
>     {
>       const double B = hemi.Bsum();
>     }
> .....................................................................................................................

Hi Debarati,

AxesDefinition is an abstract class, so you can't instantiate it
directly. You should create a Thrust or Sphericity projection to
determine the event axes -- or do you need something else?

I note, though, that an AxesDefinition is still needed by the sole
constructor but that this isn't necessarily the case if you just want to
use the calc method and directly pass the axis four-vectors. For that I
suggest that you still pass a dummy Thrust or similar, but do not use
the axes that it provides. In this case you don't need (or want) to use
the addProjection system since you just want to use the calc method, not
the usual projection caching.

Best wishes,
Andy

--
Dr Andy Buckley, Royal Society University Research Fellow
Particle Physics Expt Group, University of Glasgow / PH Dept, CERN


More information about the Rivet mailing list