diff --git a/EvtGen/EvtGen.hh b/EvtGen/EvtGen.hh index 52a7f08..ec154e2 100644 --- a/EvtGen/EvtGen.hh +++ b/EvtGen/EvtGen.hh @@ -1,59 +1,72 @@ /*********************************************************************** * Copyright 1998-2020 CERN for the benefit of the EvtGen authors * * * * This file is part of EvtGen. * * * * EvtGen is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation, either version 3 of the License, or * * (at your option) any later version. * * * * EvtGen is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with EvtGen. If not, see . * ***********************************************************************/ #ifndef EVTGEN_HH #define EVTGEN_HH #include "EvtGenBase/EvtPDL.hh" #include +#include class EvtParticle; class EvtRandomEngine; class EvtVector4R; class EvtStdHep; class EvtSpinDensity; class EvtAbsRadCorr; class EvtDecayBase; class EvtHepMCEvent; class EvtGen { public: - EvtGen( const char* const decayName, const char* const pdtTableName, + EvtGen( const std::string& decayName, const std::string& pdtTableName, + EvtRandomEngine* randomEngine = 0, EvtAbsRadCorr* isrEngine = 0, + const std::list* extraModels = 0, int mixingType = 1, + bool useXml = false ); + + EvtGen( const std::string& decayName, std::istream& pdtTableData, EvtRandomEngine* randomEngine = 0, EvtAbsRadCorr* isrEngine = 0, const std::list* extraModels = 0, int mixingType = 1, bool useXml = false ); ~EvtGen(); - void readUDecay( const char* const udecay_name, bool useXml = false ); + void readUDecay( const std::string& udecay_name, bool useXml = false ); EvtHepMCEvent* generateDecay( int PDGid, EvtVector4R refFrameP4, EvtVector4R translation, EvtSpinDensity* spinDensity = 0 ); void generateDecay( EvtParticle* p ); private: + + void initialize( const std::string& decayName, std::istream& pdtTable, + EvtRandomEngine* randomEngine = 0, + EvtAbsRadCorr* isrEngine = 0, + const std::list* extraModels = 0, + int mixingType = 1, bool useXml = false ); + EvtPDL _pdl; int _mixingType; }; #endif diff --git a/EvtGenBase/EvtPDL.hh b/EvtGenBase/EvtPDL.hh index 839dc36..e4cd500 100644 --- a/EvtGenBase/EvtPDL.hh +++ b/EvtGenBase/EvtPDL.hh @@ -1,98 +1,100 @@ /*********************************************************************** * Copyright 1998-2020 CERN for the benefit of the EvtGen authors * * * * This file is part of EvtGen. * * * * EvtGen is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation, either version 3 of the License, or * * (at your option) any later version. * * * * EvtGen is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with EvtGen. If not, see . * ***********************************************************************/ #ifndef EVTPDL_HH #define EVTPDL_HH #include "EvtGenBase/EvtId.hh" #include "EvtGenBase/EvtPartProp.hh" #include "EvtGenBase/EvtSpinType.hh" #include "EvtGenBase/EvtStringHash.hh" #include #include +#include +#include const int SPIN_NAME_LENGTH = 100; class EvtPDL final { public: EvtPDL(); - void read( const char* fname ); - void readPDT( const std::string fname ); + void read( const std::string& fname ); + void readPDT( std::istream& data ); static double getMeanMass( EvtId i ); static double getMass( EvtId i ); static double getRandMass( EvtId i, EvtId* parId, int nDaug, EvtId* dauId, EvtId* othDaugId, double maxMass, double* dauMasses ); static double getMassProb( EvtId i, double mass, double massPar, int nDaug, double* massDau ); static double getMaxMass( EvtId i ); static double getMinMass( EvtId i ); //the number we got from PDT static double getMaxRange( EvtId i ); static double getWidth( EvtId i ); static double getctau( EvtId i ); static int getStdHep( EvtId id ); static int getLundKC( EvtId id ); // Function to retrieve EvtId from PythiaID static EvtId evtIdFromLundKC( int pythiaId ); static EvtId evtIdFromStdHep( int stdhep ); static EvtId chargeConj( EvtId id ); static int chg3( EvtId i ); static EvtSpinType::spintype getSpinType( EvtId i ); static EvtId getId( const std::string& name ); static std::string name( EvtId i ); static void alias( EvtId num, const std::string& newname ); static void aliasChgConj( EvtId a, EvtId abar ); static size_t entries(); static EvtId getEntry( int i ); static void reSetMass( EvtId i, double mass ); static void reSetWidth( EvtId i, double width ); static void reSetMassMin( EvtId i, double mass ); static void reSetMassMax( EvtId i, double mass ); static void reSetBlatt( EvtId i, double blatt ); static void reSetBlattBirth( EvtId i, double blatt ); static void includeBirthFactor( EvtId i, bool yesno ); static void includeDecayFactor( EvtId i, bool yesno ); static void changeLS( EvtId i, std::string& newLS ); static void setPWForDecay( EvtId i, int spin, EvtId d1, EvtId d2 ); static void setPWForBirthL( EvtId i, int spin, EvtId par, EvtId othD ); private: void setUpConstsPdt(); static unsigned int _firstAlias; static int _nentries; static std::vector& partlist() { static std::vector s_partlist; return s_partlist; } static std::map _particleNameLookup; }; // EvtPDL.h #endif diff --git a/src/EvtGen.cpp b/src/EvtGen.cpp index 276b8e6..2f871e2 100644 --- a/src/EvtGen.cpp +++ b/src/EvtGen.cpp @@ -1,191 +1,214 @@ /*********************************************************************** * Copyright 1998-2020 CERN for the benefit of the EvtGen authors * * * * This file is part of EvtGen. * * * * EvtGen is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation, either version 3 of the License, or * * (at your option) any later version. * * * * EvtGen is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with EvtGen. If not, see . * ***********************************************************************/ #include "EvtGen/EvtGen.hh" #include "EvtGenBase/EvtAbsRadCorr.hh" #include "EvtGenBase/EvtCPUtil.hh" #include "EvtGenBase/EvtDecayTable.hh" #include "EvtGenBase/EvtHepMCEvent.hh" #include "EvtGenBase/EvtPDL.hh" #include "EvtGenBase/EvtParticle.hh" #include "EvtGenBase/EvtParticleFactory.hh" #include "EvtGenBase/EvtPatches.hh" #include "EvtGenBase/EvtRadCorr.hh" #include "EvtGenBase/EvtRandom.hh" #include "EvtGenBase/EvtRandomEngine.hh" #include "EvtGenBase/EvtReport.hh" #include "EvtGenBase/EvtSimpleRandomEngine.hh" #include "EvtGenBase/EvtStatus.hh" #include "EvtGenBase/EvtVector4R.hh" #include "EvtGenModels/EvtModelReg.hh" #include "EvtGenModels/EvtNoRadCorr.hh" #include #include #include using std::endl; using std::fstream; using std::ifstream; EvtGen::~EvtGen() { //This is a bit ugly, should not do anything //in a destructor. This will fail if EvtGen is made a static //because then this destructor might be called _after_ //the destruction of objects that it depends on, e.g., EvtPDL. if ( getenv( "EVTINFO" ) ) { EvtDecayTable::getInstance()->printSummary(); } } -EvtGen::EvtGen( const char* const decayName, const char* const pdtTableName, +EvtGen::EvtGen( const std::string& decayName, const std::string& pdtTableName, EvtRandomEngine* randomEngine, EvtAbsRadCorr* isrEngine, const std::list* extraModels, int mixingType, bool useXml ) { + std::ifstream pdtIn( pdtTableName ); + if ( !pdtIn ) { + EvtGenReport( EVTGEN_ERROR, "EvtGen" ) + << "Could not open:" << pdtTableName << "EvtPDL" << endl; + return; + } + initialize( decayName, pdtIn, randomEngine, isrEngine, extraModels, + mixingType, useXml ); + pdtIn.close(); +} + +EvtGen::EvtGen( const std::string& decayName, std::istream& pdtTableData, + EvtRandomEngine* randomEngine, EvtAbsRadCorr* isrEngine, + const std::list* extraModels, int mixingType, + bool useXml ) +{ + initialize( decayName, pdtTableData, randomEngine, isrEngine, extraModels, + mixingType, useXml ); +} + +void EvtGen::initialize( const std::string& decayName, std::istream& pdtTable, + EvtRandomEngine* randomEngine, EvtAbsRadCorr* isrEngine, + const std::list* extraModels, + int mixingType, bool useXml ) +{ EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "Initializing EvtGen" << endl; if ( randomEngine == 0 ) { static EvtSimpleRandomEngine defaultRandomEngine; EvtRandom::setRandomEngine( &defaultRandomEngine ); EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "No random engine given in " << "EvtGen::EvtGen constructor, " << "will use default EvtSimpleRandomEngine." << endl; } else { EvtRandom::setRandomEngine( randomEngine ); } EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "Storing known decay models" << endl; EvtModelReg dummy( extraModels ); EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "Main decay file name :" << decayName << endl; - EvtGenReport( EVTGEN_INFO, "EvtGen" ) - << "PDT table file name :" << pdtTableName << endl; - _pdl.readPDT( pdtTableName ); + _pdl.readPDT( pdtTable ); if ( useXml ) { EvtDecayTable::getInstance()->readXMLDecayFile( decayName, false ); } else { EvtDecayTable::getInstance()->readDecayFile( decayName, false ); } _mixingType = mixingType; EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "Mixing type integer set to " << _mixingType << endl; EvtCPUtil::getInstance()->setMixingType( _mixingType ); // Set the radiative correction engine if ( isrEngine != 0 ) { EvtRadCorr::setRadCorrEngine( isrEngine ); } else { // Owing to the pure abstract interface, we still need to define a concrete // implementation of a radiative correction engine. Use one which does nothing. EvtAbsRadCorr* noRadCorr = new EvtNoRadCorr(); EvtRadCorr::setRadCorrEngine( noRadCorr ); } EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "Done initializing EvtGen" << endl; } -void EvtGen::readUDecay( const char* const uDecayName, bool useXml ) +void EvtGen::readUDecay( const std::string& uDecayName, bool useXml ) { ifstream indec; - if ( uDecayName[0] == 0 ) { + if ( uDecayName.size() == 0 ) { EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "Is not reading a user decay file!" << endl; } else { indec.open( uDecayName ); if ( indec ) { if ( useXml ) { EvtDecayTable::getInstance()->readXMLDecayFile( uDecayName, true ); } else { EvtDecayTable::getInstance()->readDecayFile( uDecayName, true ); } } else { EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "Can not find UDECAY file '" << uDecayName << "'. Stopping" << endl; ::abort(); } } } EvtHepMCEvent* EvtGen::generateDecay( int PDGId, EvtVector4R refFrameP4, EvtVector4R translation, EvtSpinDensity* spinDensity ) { EvtParticle* theParticle( 0 ); if ( spinDensity == 0 ) { theParticle = EvtParticleFactory::particleFactory( EvtPDL::evtIdFromStdHep( PDGId ), refFrameP4 ); } else { theParticle = EvtParticleFactory::particleFactory( EvtPDL::evtIdFromStdHep( PDGId ), refFrameP4, *spinDensity ); } generateDecay( theParticle ); EvtHepMCEvent* hepMCEvent = new EvtHepMCEvent(); hepMCEvent->constructEvent( theParticle, translation ); theParticle->deleteTree(); return hepMCEvent; } void EvtGen::generateDecay( EvtParticle* p ) { int times = 0; do { times += 1; EvtStatus::initRejectFlag(); p->decay(); //ok then finish. if ( EvtStatus::getRejectFlag() == 0 ) { times = 0; } else { for ( size_t ii = 0; ii < p->getNDaug(); ii++ ) { EvtParticle* temp = p->getDaug( ii ); temp->deleteTree(); } p->resetFirstOrNot(); p->resetNDaug(); } if ( times == 10000 ) { EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Your event has been rejected 10000 times!" << endl; EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Will now abort." << endl; ::abort(); times = 0; } } while ( times ); } diff --git a/src/EvtGenBase/EvtPDL.cpp b/src/EvtGenBase/EvtPDL.cpp index 9d8e81b..292b171 100644 --- a/src/EvtGenBase/EvtPDL.cpp +++ b/src/EvtGenBase/EvtPDL.cpp @@ -1,451 +1,450 @@ /*********************************************************************** * Copyright 1998-2020 CERN for the benefit of the EvtGen authors * * * * This file is part of EvtGen. * * * * EvtGen is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation, either version 3 of the License, or * * (at your option) any later version. * * * * EvtGen is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with EvtGen. If not, see . * ***********************************************************************/ #include "EvtGenBase/EvtPDL.hh" #include "EvtGenBase/EvtId.hh" #include "EvtGenBase/EvtPartProp.hh" #include "EvtGenBase/EvtParticle.hh" #include "EvtGenBase/EvtPatches.hh" #include "EvtGenBase/EvtReport.hh" #include #include #include #include #include using std::endl; using std::fstream; using std::ifstream; static int first = 1; unsigned int EvtPDL::_firstAlias; int EvtPDL::_nentries; std::map EvtPDL::_particleNameLookup; EvtPDL::EvtPDL() { if ( first != 0 ) { first = 0; _nentries = 0; _firstAlias = 999999; } } -void EvtPDL::read( const char* fname ) +void EvtPDL::read( const std::string& fname ) { - readPDT( fname ); + std::ifstream pdtIn( fname ); + if ( !pdtIn ) { + EvtGenReport( EVTGEN_ERROR, "EvtGen" ) + << "Could not open:" << fname << "EvtPDL" << endl; + return; + } + readPDT( pdtIn ); + pdtIn.close(); } -void EvtPDL::readPDT( const std::string fname ) +void EvtPDL::readPDT( std::istream& indec ) { - ifstream indec; - - indec.open( fname.c_str() ); - char cmnd[100]; char xxxx[100]; char pname[100]; int stdhepid; double mass; double pwidth; double pmaxwidth; int chg3; int spin2; double ctau; int lundkc; EvtId i; - if ( !indec ) { - EvtGenReport( EVTGEN_ERROR, "EvtGen" ) - << "Could not open:" << fname.c_str() << "EvtPDL" << endl; - return; - } + indec.seekg( 0, std::ios::beg ); do { char ch, ch1; do { indec.get( ch ); if ( ch == '\n' ) indec.get( ch ); if ( ch != '*' ) { indec.putback( ch ); } else { while ( indec.get( ch1 ), ch1 != '\n' ) ; } } while ( ch == '*' ); indec >> cmnd; if ( strcmp( cmnd, "end" ) ) { if ( !strcmp( cmnd, "add" ) ) { indec >> xxxx; indec >> xxxx; indec >> pname; indec >> stdhepid; indec >> mass; indec >> pwidth; indec >> pmaxwidth; indec >> chg3; indec >> spin2; indec >> ctau; indec >> lundkc; i = EvtId( _nentries, _nentries ); EvtPartProp tmp; tmp.setSpinType( EvtSpinType::SCALAR ); if ( spin2 == 0 ) tmp.setSpinType( EvtSpinType::SCALAR ); if ( spin2 == 1 ) tmp.setSpinType( EvtSpinType::DIRAC ); if ( spin2 == 2 ) tmp.setSpinType( EvtSpinType::VECTOR ); if ( spin2 == 3 ) tmp.setSpinType( EvtSpinType::RARITASCHWINGER ); if ( spin2 == 4 ) tmp.setSpinType( EvtSpinType::TENSOR ); if ( spin2 == 5 ) tmp.setSpinType( EvtSpinType::SPIN5HALF ); if ( spin2 == 6 ) tmp.setSpinType( EvtSpinType::SPIN3 ); if ( spin2 == 7 ) tmp.setSpinType( EvtSpinType::SPIN7HALF ); if ( spin2 == 8 ) tmp.setSpinType( EvtSpinType::SPIN4 ); if ( spin2 == 2 && mass < 0.0001 ) tmp.setSpinType( EvtSpinType::PHOTON ); if ( spin2 == 1 && mass < 0.0001 ) tmp.setSpinType( EvtSpinType::NEUTRINO ); if ( !strcmp( pname, "string" ) ) { tmp.setSpinType( EvtSpinType::STRING ); } if ( !strcmp( pname, "vpho" ) ) { tmp.setSpinType( EvtSpinType::VECTOR ); } tmp.setId( i ); tmp.setIdChgConj( EvtId( -1, -1 ) ); tmp.setStdHep( stdhepid ); tmp.setLundKC( lundkc ); tmp.setName( pname ); if ( _particleNameLookup.find( std::string( pname ) ) != _particleNameLookup.end() ) { EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "The particle name:" << pname << " is already defined." << endl; EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Will terminate execution."; ::abort(); } _particleNameLookup[std::string( pname )] = _nentries; tmp.setctau( ctau ); tmp.setChg3( chg3 ); tmp.initLineShape( mass, pwidth, pmaxwidth ); partlist().push_back( tmp ); _nentries++; } // if find a set read information and discard it if ( !strcmp( cmnd, "set" ) ) { indec >> xxxx; indec >> xxxx; indec >> xxxx; indec >> xxxx; } } } while ( strcmp( cmnd, "end" ) ); setUpConstsPdt(); } void EvtPDL::aliasChgConj( EvtId a, EvtId abar ) { if ( EvtPDL::chargeConj( EvtId( a.getId(), a.getId() ) ) != EvtId( abar.getId(), abar.getId() ) ) { EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Can't charge conjugate the two aliases:" << EvtPDL::name( a ).c_str() << " and " << EvtPDL::name( abar ).c_str() << endl; ::abort(); } partlist()[a.getAlias()].setIdChgConj( abar ); partlist()[abar.getAlias()].setIdChgConj( a ); } EvtId EvtPDL::chargeConj( EvtId id ) { // EvtId idchg=partlist()[id.getAlias()].getIdChgConj(); int index = id.getAlias(); EvtId idchg; if ( index > -1 ) { idchg = partlist()[id.getAlias()].getIdChgConj(); } if ( idchg != EvtId( -1, -1 ) ) return idchg; if ( id.getId() != id.getAlias() ) { if ( chargeConj( EvtId( id.getId(), id.getId() ) ) == EvtId( id.getId(), id.getId() ) ) { partlist()[id.getAlias()].setIdChgConj( id ); return id; } } if ( id.getAlias() != id.getId() ) { EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Trying to charge conjugate alias particle:" << name( id ).c_str() << " without defining the alias!" << endl; ::abort(); } for ( size_t i = 0; i < partlist().size(); i++ ) { if ( partlist()[i].getStdHep() == -partlist()[id.getId()].getStdHep() ) { partlist()[id.getId()].setIdChgConj( partlist()[i].getId() ); return partlist()[i].getId(); } } partlist()[id.getId()].setIdChgConj( id ); return id; } EvtId EvtPDL::evtIdFromStdHep( int stdhep ) { for ( size_t i = 0; i < partlist().size(); i++ ) { if ( partlist()[i].getStdHep() == stdhep ) return partlist()[i].getId(); } return EvtId( -1, -1 ); } void EvtPDL::alias( EvtId num, const std::string& newname ) { if ( _firstAlias < partlist().size() ) { for ( size_t i = _firstAlias; i < partlist().size(); i-- ) { if ( newname == partlist()[i].getName() ) { EvtGenReport( EVTGEN_WARNING, "EvtGen" ) << "Redefining alias:" << newname.c_str() << " will be ignored!" << endl; return; } } } else { _firstAlias = partlist().size(); } partlist().push_back( partlist()[num.getId()] ); int entry = partlist().size() - 1; partlist()[entry].setName( newname ); if ( _particleNameLookup.find( std::string( newname ) ) != _particleNameLookup.end() ) { EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "The particle name:" << newname << " is already defined." << endl; EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Will terminate execution."; ::abort(); } _particleNameLookup[std::string( newname )] = entry; partlist()[entry].setId( EvtId( num.getId(), entry ) ); //Lange - Dec7, 2003. Unset the charge conjugate. partlist()[entry].setIdChgConj( EvtId( -1, -1 ) ); } EvtId EvtPDL::getId( const std::string& name ) { std::map::iterator it = _particleNameLookup.find( std::string( name ) ); if ( it == _particleNameLookup.end() ) return EvtId( -1, -1 ); return partlist()[it->second].getId(); } void EvtPDL::setUpConstsPdt() { } // Function to get EvtId from LundKC ( == Pythia Hep Code , KF ) EvtId EvtPDL::evtIdFromLundKC( int pythiaId ) { unsigned int i; for ( i = 0; i < partlist().size(); i++ ) { if ( partlist()[i].getLundKC() == pythiaId ) return partlist()[i].getId(); } return EvtId( -1, -1 ); } double EvtPDL::getMeanMass( EvtId i ) { return partlist()[i.getId()].getMass(); } double EvtPDL::getMass( EvtId i ) { return partlist()[i.getId()].rollMass(); } double EvtPDL::getRandMass( EvtId i, EvtId* parId, int nDaug, EvtId* dauId, EvtId* othDaugId, double maxMass, double* dauMasses ) { return partlist()[i.getId()].getRandMass( parId, nDaug, dauId, othDaugId, maxMass, dauMasses ); } double EvtPDL::getMassProb( EvtId i, double mass, double massPar, int nDaug, double* massDau ) { return partlist()[i.getId()].getMassProb( mass, massPar, nDaug, massDau ); } double EvtPDL::getMaxMass( EvtId i ) { return partlist()[i.getId()].getMassMax(); } double EvtPDL::getMinMass( EvtId i ) { return partlist()[i.getId()].getMassMin(); } double EvtPDL::getMaxRange( EvtId i ) { return partlist()[i.getId()].getMaxRange(); } double EvtPDL::getWidth( EvtId i ) { return partlist()[i.getId()].getWidth(); } double EvtPDL::getctau( EvtId i ) { return partlist()[i.getId()].getctau(); } int EvtPDL::getStdHep( EvtId id ) { return partlist()[id.getId()].getStdHep(); } int EvtPDL::getLundKC( EvtId id ) { return partlist()[id.getId()].getLundKC(); } int EvtPDL::chg3( EvtId i ) { return partlist()[i.getId()].getChg3(); } EvtSpinType::spintype EvtPDL::getSpinType( EvtId i ) { return partlist()[i.getId()].getSpinType(); } std::string EvtPDL::name( EvtId i ) { return partlist()[i.getAlias()].getName(); } size_t EvtPDL::entries() { return partlist().size(); } EvtId EvtPDL::getEntry( int i ) { return partlist()[i].getId(); } void EvtPDL::reSetMass( EvtId i, double mass ) { partlist()[i.getId()].reSetMass( mass ); } void EvtPDL::reSetWidth( EvtId i, double width ) { partlist()[i.getId()].reSetWidth( width ); } void EvtPDL::reSetMassMin( EvtId i, double mass ) { partlist()[i.getId()].reSetMassMin( mass ); } void EvtPDL::reSetMassMax( EvtId i, double mass ) { partlist()[i.getId()].reSetMassMax( mass ); } void EvtPDL::reSetBlatt( EvtId i, double blatt ) { partlist()[i.getId()].reSetBlatt( blatt ); } void EvtPDL::reSetBlattBirth( EvtId i, double blatt ) { partlist()[i.getId()].reSetBlattBirth( blatt ); } void EvtPDL::includeBirthFactor( EvtId i, bool yesno ) { partlist()[i.getId()].includeBirthFactor( yesno ); } void EvtPDL::includeDecayFactor( EvtId i, bool yesno ) { partlist()[i.getId()].includeDecayFactor( yesno ); } void EvtPDL::changeLS( EvtId i, std::string& newLS ) { partlist()[i.getId()].newLineShape( newLS ); } void EvtPDL::setPWForDecay( EvtId i, int spin, EvtId d1, EvtId d2 ) { partlist()[i.getId()].setPWForDecay( spin, d1, d2 ); } void EvtPDL::setPWForBirthL( EvtId i, int spin, EvtId par, EvtId othD ) { partlist()[i.getId()].setPWForBirthL( spin, par, othD ); }