Skip to content
Snippets Groups Projects
Commit 03f1a8b6 authored by Andrii Verbytskyi's avatar Andrii Verbytskyi Committed by Frank Winklmeier
Browse files

Remove unused headers and assure the polarization is set after the particle is added to the event

Remove unused headers and assure the polarization is set after the particle is added to the event
parent 0df17962
No related branches found
No related tags found
No related merge requests found
......@@ -264,14 +264,6 @@ StatusCode MuonBackgroundConverter::callGenerator()
p_prev = p_curr;
}
}
/** reset recycling */
// std::cout << "m_evt=" << m_evt.size() << " in " << m_nEvents << std::endl;
// std::cout << "m_fmom=" << m_fourMom.size() << " in " << m_nEvents << std::endl;
// std::cout << "m_fpos=" << m_fourPos.size() << " in " << m_nEvents << std::endl;
// std::cout << "m_fpos=" << m_pdgCode.size() << " in " << m_nEvents << std::endl;
// std::cout << "m_npart=" << nPart << " in " << m_nEvents << std::endl;
// if ( m_used == (phiSymmetry-1) ) m_used=0;
ATH_MSG_DEBUG(" Number of particles = " << nPart);
}
......@@ -305,14 +297,12 @@ StatusCode MuonBackgroundConverter::fillEvt( HepMC::GenEvent* event )
ATH_MSG_INFO("the size of the event = " << m_pdgCode.size());
if ( m_pdgCode.size()==0 ) ATH_MSG_WARNING("Empty event");
if ( m_pdgCode.empty() ) ATH_MSG_WARNING("Empty event");
int nPart = m_pdgCode.size();
for ( int i = 0; i < nPart; i++ )
{
size_t nPart = m_pdgCode.size();
for ( size_t i = 0; i < nPart; i++ ) {
HepMC::GenParticlePtr particle = HepMC::newGenParticlePtr( HepMC::FourVector(m_fourMom[i].x(),m_fourMom[i].y(),m_fourMom[i].z(),m_fourMom[i].e()), m_pdgCode[i], 1 );
HepMC::set_polarization(particle, m_polarization[i] );
// Create the vertex, and add the particle to the vertex
HepMC::GenVertexPtr vertex = HepMC::newGenVertexPtr( HepMC::FourVector(m_fourPos[i].x(),m_fourPos[i].y(),m_fourPos[i].z(),m_fourPos[i].t()) );
......@@ -320,6 +310,8 @@ StatusCode MuonBackgroundConverter::fillEvt( HepMC::GenEvent* event )
// Add the vertex to the event
event->add_vertex( vertex );
// Add attributes
HepMC::set_polarization(particle, m_polarization[i] );
}
// Set the event number
......
......@@ -6,10 +6,7 @@
#define GENERATORMODULES_PARTICLEDECAYER_H
#include "GeneratorModules/GenModule.h"
#include "CLHEP/Vector/LorentzVector.h"
#include "AtlasHepMC/IO_BaseClass.h"
#include "AtlasHepMC/Polarization.h"
#include "AtlasHepMC/Flow.h"
#include "HepPDT/ParticleDataTable.hh"
......
......@@ -9,7 +9,6 @@
#include "InDetPhysHitDecoratorAlg.h"
#include "safeDecorator.h"
// #include "GeneratorUtils/PIDUtils.h"
#include "TrkParameters/TrackParameters.h" // Contains typedef to Trk::CurvilinearParameters
#include "TrkToolInterfaces/ITrackHoleSearchTool.h"
#include "TrkToolInterfaces/IUpdator.h"
......
......@@ -14,7 +14,6 @@
#include "xAODTruth/TruthVertex.h"
#include "StoreGate/ReadDecorHandle.h"
// #include "GeneratorUtils/PIDUtils.h"
#include "TDatabasePDG.h"
#include "TParticlePDG.h"
#include "TrkParameters/TrackParameters.h" // Contains typedef to Trk::CurvilinearParameters
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment