Skip to content

Cleanup of HforTool

Andrii Verbytskyi requested to merge averbyts/athena:hepmc3_hfortool into master

A lot of changes in this MR are cosmetic, but these are needed to prepare the code for migration to HepMC3.

  • use auto for complex types and avoid temp. variables. Greatly improves the readability of loops initializations. e.g.
	for ( HepMC::GenVertex::particle_iterator pout =
		vtx5->particles_begin(HepMC::children) ;
	      pout != vtx5->particles_end(HepMC::children); pout++)
	  ATH_MSG_DEBUG("    outgoing: " << *(*pout));

vs.

for ( auto pout=vtx5->particles_begin(HepMC::children); pout != vtx5->particles_end(HepMC::children); pout++) 

ATH_MSG_DEBUG("    outgoing: " << *(*pout));
  • removed outdated comments

  • connected broken condition lines

	  if ( apdg == 4 && ( pdgin == 5 || (pdgin%10000)/1000 == 5 ||
			      (pdgin%1000)/100 == 5 ) )

vs

   if ( apdg == 4 && ( pdgin == 5 || (pdgin%10000)/1000 == 5 || (pdgin%1000)/100 == 5 ) )
  • some changes in the loops to be Hepmc version independent.
Edited by Andrii Verbytskyi

Merge request reports