[Rivet] reading particles from the hepmc record with special status code '3'

Raghav Kunnawalkam Elayavalli raghav.k.e at cern.ch
Wed May 18 10:59:49 BST 2016


Dear Rivet experts, 

Now this is a bit of a follow up from my previous questions about reading from the hepMC record. Instead of the individual partons, we are adding an additional set of particles with the status code '3' to our hepMC file. These particles are essentially those from our medium that interacted with the final state objects from the hard scatter. 

Im messing it up in my c++ implementation since this should be doable in the latest rivet setup yes? to have something like this in my analyze method:

      /// get the scattered particles from the gen event:
      vector <HepMC::GenParticle> pscat; 
      foreach (const HepMC::GenParticle* p, particles(event.genEvent())) {
	// if(p.status() == 3)
	  pscat.push_back(p);
      }

      std::cout<<"There are a total of "<<pscat.size()<<" scattered particles"<<std::endl;
      /// print scattered particle information
      for(unsigned ip = 0; ip<pscat.size(); ++ip){
	std::cout<<"Start of particle **************"<<std::endl;
	pscat[ip].print();
      }
      pscat.clear();
    

Thanks a lot for your help! 

Cheers
Raghav


More information about the Rivet mailing list