[Rivet] gen parton matching for jets

Raghav Kunnawalkam Elayavalli raghav.k.e at cern.ch
Mon May 9 18:54:37 BST 2016


Hi Andy, 

I understand since you want this to be compatible with both data and theory so the emphasis on final state objects i guess.  
I would much appreciate if you can share the "Rivety" way because I think such studies with the partons are very interesting in our case of heavy ions where the fluctuating underlying environment is correlated with our final state observables. Or if have any other ideas, im willing to test them out. thanks! 

Cheers
Raghav


> On May 9, 2016, at 7:48 PM, Andy Buckley <a.g.buckley at gmail.com> wrote:
> 
> Hi Raghav,
> 
> There is nothing very much easier, because Rivet very specifically focuses on *not* using partons in order to make analyses more robust and physical.
> 
> (I am debating whether to provide a *slightly* more "Rivety" way to access the partons, just to make life nicer than working direct with HepMC (which would also make our life easier for analysis maintenance). But it's not obvious, because we really want to discourage this way of doing things.)
> 
> Andy
> 
> 
> On 09/05/16 11:36, Raghav Kunnawalkam Elayavalli wrote:
>> Dear Rivet experts
>> 
>> I have a simple question regarding gen parton matching using
>> HepMC::GenParticle in a foreach loop as shown below:
>> 
>> HepMC::GenParticle* truthParton=NULL;
>>  double truthDelR(0);
>>  foreach (const HepMC::GenParticle& p, particles(event.genEvent())) {
>>    if((p->pdg_id() != 21) and (abs(p->pdg_id()) > 6)) continue;
>>    const double delR =
>> jets.front().delta_R(fastjet::PseudoJet(p->momentum().px(),
>> p->momentum().py(),
>> p->momentum().pz(),
>> p->momentum().e()));
>>    if(truthParton==NULL){
>>      truthDelR = delR;
>>      truthParton = p;
>>    }
>>    else if(delR < 0.6 && truthParton->momentum().perp() <
>> p->momentum().perp()){
>>      //if(null) assign truthParton, updateDelR
>>      truthDelR = delR;
>>      truthParton = p;
>>    }
>>  }
>>  _h_TruthDeltaR->fill(truthDelR,weight);
>> 
>> MC_GENSTUDY_JETCHARGE.cc:256:33: error: cannot initialize a variable of
>> type 'HepMC::GenParticle *' with an lvalue of type 'const
>> HepMC::GenParticle *const'
>>           foreach (HepMC::GenParticle* p, particles(event.genEvent())) {
>>                                        ^
>> /Users/raghav/WORK/RIVET/local/include/boost/foreach.hpp:1107:14: note:
>> expanded from macro 'BOOST_FOREACH'
>>         for (VAR = BOOST_FOREACH_DEREF(COL);
>> !BOOST_FOREACH_ID(_foreach_continue);
>> BOOST_FOREACH_ID(_foreach_continue) = true)
>>              ^
>> 
>> Is there a simpler way to do this? it seems like there might be. thanks!
>> 
>> Cheers
>> Raghav
>> 
>> 
>> 
>> _______________________________________________
>> Rivet mailing list
>> Rivet at projects.hepforge.org
>> https://www.hepforge.org/lists/listinfo/rivet
>> 
> 
> 
> -- 
> Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
> Particle Physics Expt Group, University of Glasgow



More information about the Rivet mailing list