Skip to content
Snippets Groups Projects
Commit 6b2449ad authored by Chris Hays's avatar Chris Hays
Browse files

Pythia fixes for MG2.61 update

Former-commit-id: 35b263ac
parent 0cad40cd
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,8 @@ private:
double m_version;
std::vector<std::string> m_commands;
std::vector<std::string> m_userParams;
std::vector<std::string> m_userModes;
enum PDGID {PROTON=2212, ANTIPROTON=-2212, NEUTRON=2112, ANTINEUTRON=-2112, MUON=13, ANTIMUON=-13, ELECTRON=11, POSITRON=-11, INVALID=0};
......@@ -131,7 +133,8 @@ private:
std::string m_userHook;
std::vector<Pythia8::UserHooks*> m_userHooksPtrs;
Pythia8::UserHooks *m_userHookPtr;
//std::vector<Pythia8::UserHooks*> m_userHooksPtrs;
std::string m_userResonances;
......
......@@ -83,10 +83,11 @@ Pythia8_i::~Pythia8_i() {
delete m_atlasRndmEngine;
if(m_procPtr != 0) delete m_procPtr;
for(Pythia8::UserHooks *ptr: m_userHooksPtrs){
delete ptr;
}
if(m_userHookPtr != 0) delete m_userHookPtr;
// for(Pythia8::UserHooks *ptr: m_userHooksPtrs){
// delete ptr;
//}
}
////////////////////////////////////////////////////////////////////////////////
......@@ -467,13 +468,13 @@ StatusCode Pythia8_i::fillEvt(HepMC::GenEvent *evt){
size_t firstWeight = (m_doLHE3Weights)? 1: 0;
for(int iw = firstWeight; iw != m_pythia.info.nWeights(); ++iw){
for(int iw = firstWeight; iw != m_pythia->info.nWeights(); ++iw){
std::string wtName = ((int)m_showerWeightNames.size() == m_pythia.info.nWeights())? m_showerWeightNames[iw]: "ShowerWt_" + std::to_string(iw);
std::string wtName = ((int)m_showerWeightNames.size() == m_pythia->info.nWeights())? m_showerWeightNames[iw]: "ShowerWt_" + std::to_string(iw);
if(m_pythia.info.nWeights() != 1){
if(m_pythia->info.nWeights() != 1){
if(m_internal_event_number == 1) m_weightIDs.push_back(wtName);
evt->weights()[wtName] = mergingWeight*m_pythia.info.weight(iw);
evt->weights()[wtName] = mergingWeight*m_pythia->info.weight(iw);
}else{
evt->weights().push_back(eventWeight);
}
......
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