Page MenuHomeHEPForge

D88.1759180923.diff
No OneTemporary

Size
71 KB
Referenced Files
None
Subscribers
None

D88.1759180923.diff

diff --git a/EvtGen/EvtGen.hh b/EvtGen/EvtGen.hh
--- a/EvtGen/EvtGen.hh
+++ b/EvtGen/EvtGen.hh
@@ -38,14 +38,16 @@
class EvtGen {
public:
EvtGen( const std::string& decayName, const std::string& pdtTableName,
- EvtRandomEngine* randomEngine = 0, EvtAbsRadCorr* isrEngine = 0,
- const std::list<EvtDecayBase*>* extraModels = 0, int mixingType = 1,
- bool useXml = false );
+ EvtRandomEngine* randomEngine = nullptr,
+ EvtAbsRadCorr* isrEngine = nullptr,
+ const std::list<EvtDecayBase*>* extraModels = nullptr,
+ int mixingType = 1, bool useXml = false );
EvtGen( const std::string& decayName, std::istream& pdtTableData,
- EvtRandomEngine* randomEngine = 0, EvtAbsRadCorr* isrEngine = 0,
- const std::list<EvtDecayBase*>* extraModels = 0, int mixingType = 1,
- bool useXml = false );
+ EvtRandomEngine* randomEngine = nullptr,
+ EvtAbsRadCorr* isrEngine = nullptr,
+ const std::list<EvtDecayBase*>* extraModels = nullptr,
+ int mixingType = 1, bool useXml = false );
~EvtGen();
@@ -53,16 +55,15 @@
EvtHepMCEvent* generateDecay( int PDGid, EvtVector4R refFrameP4,
EvtVector4R translation,
- EvtSpinDensity* spinDensity = 0 );
+ EvtSpinDensity* spinDensity = nullptr );
void generateDecay( EvtParticle* p );
private:
-
void initialize( const std::string& decayName, std::istream& pdtTable,
- EvtRandomEngine* randomEngine = 0,
- EvtAbsRadCorr* isrEngine = 0,
- const std::list<EvtDecayBase*>* extraModels = 0,
+ EvtRandomEngine* randomEngine = nullptr,
+ EvtAbsRadCorr* isrEngine = nullptr,
+ const std::list<EvtDecayBase*>* extraModels = nullptr,
int mixingType = 1, bool useXml = false );
EvtPDL _pdl;
diff --git a/EvtGenBase/EvtModel.hh b/EvtGenBase/EvtModel.hh
--- a/EvtGenBase/EvtModel.hh
+++ b/EvtGenBase/EvtModel.hh
@@ -55,7 +55,7 @@
inline EvtModel& EvtModel::instance()
{
- if ( _instance == 0 )
+ if ( _instance == nullptr )
_instance = new EvtModel;
return *_instance;
}
diff --git a/EvtGenBase/EvtParticle.hh b/EvtGenBase/EvtParticle.hh
--- a/EvtGenBase/EvtParticle.hh
+++ b/EvtGenBase/EvtParticle.hh
@@ -180,7 +180,7 @@
/**
* Iterates over the particles in a decay chain.
*/
- EvtParticle* nextIter( EvtParticle* rootOfTree = 0 );
+ EvtParticle* nextIter( EvtParticle* rootOfTree = nullptr );
/**
* Makes stdhep list
diff --git a/EvtGenBase/EvtParticleDecay.hh b/EvtGenBase/EvtParticleDecay.hh
--- a/EvtGenBase/EvtParticleDecay.hh
+++ b/EvtGenBase/EvtParticleDecay.hh
@@ -27,14 +27,14 @@
public:
EvtParticleDecay()
{
- _decay = 0;
+ _decay = nullptr;
_brfrsum = 0.0;
_massmin = 0.0;
}
~EvtParticleDecay()
{
- if ( _decay != 0 )
+ if ( _decay != nullptr )
delete _decay;
}
diff --git a/EvtGenBase/EvtParticleDecayList.hh b/EvtGenBase/EvtParticleDecayList.hh
--- a/EvtGenBase/EvtParticleDecayList.hh
+++ b/EvtGenBase/EvtParticleDecayList.hh
@@ -29,7 +29,7 @@
public:
EvtParticleDecayList()
{
- _decaylist = 0;
+ _decaylist = nullptr;
_nmode = 0;
_rawbrfrsum = 0;
}
diff --git a/EvtGenBase/EvtPdf.hh b/EvtGenBase/EvtPdf.hh
--- a/EvtGenBase/EvtPdf.hh
+++ b/EvtGenBase/EvtPdf.hh
@@ -146,7 +146,7 @@
EvtPdfGen() : _pdf( 0 ) {}
EvtPdfGen( const EvtPdfGen<T>& other ) :
- _pdf( other._pdf ? other._pdf->clone() : 0 )
+ _pdf( other._pdf ? other._pdf->clone() : nullptr )
{
}
EvtPdfGen( const EvtPdf<T>& pdf ) : _pdf( pdf.clone() ) {}
diff --git a/EvtGenBase/EvtReport.hh b/EvtGenBase/EvtReport.hh
--- a/EvtGenBase/EvtReport.hh
+++ b/EvtGenBase/EvtReport.hh
@@ -54,7 +54,8 @@
};
// function declaration
-std::ostream& EvtGenReport( EvtGenSeverity severity, const char* facility = 0 );
+std::ostream& EvtGenReport( EvtGenSeverity severity,
+ const char* facility = nullptr );
// inline function definitions
diff --git a/EvtGenBase/EvtStreamInputIterator.hh b/EvtGenBase/EvtStreamInputIterator.hh
--- a/EvtGenBase/EvtStreamInputIterator.hh
+++ b/EvtGenBase/EvtStreamInputIterator.hh
@@ -43,7 +43,7 @@
EvtStreamInputIterator() : _counter( 0 ) {}
EvtStreamInputIterator( const EvtStreamInputIterator& other ) :
- _counter( other._counter ? other._counter->clone() : 0 ),
+ _counter( other._counter ? other._counter->clone() : nullptr ),
_currentValue( other._currentValue )
{
}
diff --git a/EvtGenModels/EvtIntervalDecayAmp.hh b/EvtGenModels/EvtIntervalDecayAmp.hh
--- a/EvtGenModels/EvtIntervalDecayAmp.hh
+++ b/EvtGenModels/EvtIntervalDecayAmp.hh
@@ -44,7 +44,7 @@
template <class T>
class EvtIntervalDecayAmp : public EvtDecayAmp {
public:
- EvtIntervalDecayAmp() : _probMax( 0. ), _nScan( 0 ), _fact( 0 ) {}
+ EvtIntervalDecayAmp() : _probMax( 0. ), _nScan( 0 ), _fact( nullptr ) {}
EvtIntervalDecayAmp( const EvtIntervalDecayAmp<T>& other ) :
_probMax( other._probMax ), _nScan( other._nScan ), COPY_PTR( _fact )
diff --git a/EvtGenModels/EvtModelReg.hh b/EvtGenModels/EvtModelReg.hh
--- a/EvtGenModels/EvtModelReg.hh
+++ b/EvtGenModels/EvtModelReg.hh
@@ -27,7 +27,7 @@
class EvtModelReg {
public:
- EvtModelReg( const std::list<EvtDecayBase*>* extraModels = 0 );
+ EvtModelReg( const std::list<EvtDecayBase*>* extraModels = nullptr );
private:
};
diff --git a/EvtGenModels/EvtMultibody.hh b/EvtGenModels/EvtMultibody.hh
--- a/EvtGenModels/EvtMultibody.hh
+++ b/EvtGenModels/EvtMultibody.hh
@@ -29,8 +29,8 @@
public:
EvtMultibody()
{
- _decayTree = NULL;
- _ilist = NULL;
+ _decayTree = nullptr;
+ _ilist = nullptr;
}
~EvtMultibody();
diff --git a/src/EvtGen.cpp b/src/EvtGen.cpp
--- a/src/EvtGen.cpp
+++ b/src/EvtGen.cpp
@@ -91,7 +91,7 @@
{
EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "Initializing EvtGen" << endl;
- if ( randomEngine == 0 ) {
+ if ( randomEngine == nullptr ) {
static EvtSimpleRandomEngine defaultRandomEngine;
EvtRandom::setRandomEngine( &defaultRandomEngine );
EvtGenReport( EVTGEN_INFO, "EvtGen" )
@@ -123,7 +123,7 @@
// Set the radiative correction engine
- if ( isrEngine != 0 ) {
+ if ( isrEngine != nullptr ) {
EvtRadCorr::setRadCorrEngine( isrEngine );
} else {
@@ -164,9 +164,9 @@
EvtVector4R translation,
EvtSpinDensity* spinDensity )
{
- EvtParticle* theParticle( 0 );
+ EvtParticle* theParticle( nullptr );
- if ( spinDensity == 0 ) {
+ if ( spinDensity == nullptr ) {
theParticle = EvtParticleFactory::particleFactory(
EvtPDL::evtIdFromStdHep( PDGId ), refFrameP4 );
} else {
diff --git a/src/EvtGenBase/EvtCPUtil.cpp b/src/EvtGenBase/EvtCPUtil.cpp
--- a/src/EvtGenBase/EvtCPUtil.cpp
+++ b/src/EvtGenBase/EvtCPUtil.cpp
@@ -42,9 +42,9 @@
EvtCPUtil* EvtCPUtil::getInstance()
{
- static EvtCPUtil* theCPUtil = 0;
+ static EvtCPUtil* theCPUtil = nullptr;
- if ( theCPUtil == 0 ) {
+ if ( theCPUtil == nullptr ) {
theCPUtil = new EvtCPUtil( 1 );
}
@@ -179,20 +179,21 @@
bool incoherentmix = false;
- if ( ( parent != 0 ) && ( parent->getId() == B0 || parent->getId() == B0B ||
- parent->getId() == BS || parent->getId() == BSB ) ) {
+ if ( ( parent != nullptr ) &&
+ ( parent->getId() == B0 || parent->getId() == B0B ||
+ parent->getId() == BS || parent->getId() == BSB ) ) {
incoherentmix = true;
}
if ( incoherentmix )
parent = parent->getParent();
- if ( parent == 0 || parent->getId() != UPS4S ) {
+ if ( parent == nullptr || parent->getId() != UPS4S ) {
//Need to make this more general, but for now
//assume no parent. If we have parent of B we
//need to charge conj. full decay tree.
- if ( parent != 0 ) {
+ if ( parent != nullptr ) {
EvtGenReport( EVTGEN_INFO, "EvtGen" )
<< "p=" << EvtPDL::name( p->getId() )
<< " parent=" << EvtPDL::name( parent->getId() ) << endl;
@@ -231,7 +232,7 @@
}
}
- if ( parent != 0 ) {
+ if ( parent != nullptr ) {
//if (entryCount>1){
// EvtGenReport(EVTGEN_INFO,"EvtGen") << "Double CP decay:"<<entryCount<<endl;
//}
@@ -385,7 +386,8 @@
static double ctau = ctauL < ctauH ? ctauH : ctauL;
t = -log( EvtRandom::Flat() ) * ctau;
EvtParticle* parent = p->getParent();
- if ( parent != 0 && ( parent->getId() == BS0 || parent->getId() == BSB ) ) {
+ if ( parent != nullptr &&
+ ( parent->getId() == BS0 || parent->getId() == BSB ) ) {
if ( parent->getId() == BS0 )
otherb = BSB;
if ( parent->getId() == BSB )
@@ -407,7 +409,8 @@
static double ctau = ctauL < ctauH ? ctauH : ctauL;
t = -log( EvtRandom::Flat() ) * ctau;
EvtParticle* parent = p->getParent();
- if ( parent != 0 && ( parent->getId() == D0 || parent->getId() == D0B ) ) {
+ if ( parent != nullptr &&
+ ( parent->getId() == D0 || parent->getId() == D0B ) ) {
if ( parent->getId() == D0 )
otherb = D0B;
if ( parent->getId() == D0B )
@@ -429,7 +432,7 @@
EvtParticle* parent = p->getParent();
- if ( parent == 0 || parent->getId() != UPS4 ) {
+ if ( parent == nullptr || parent->getId() != UPS4 ) {
//EvtGenReport(EVTGEN_ERROR,"EvtGen") <<
// "Warning CP violation with B having no parent!"<<endl;
t = p->getLifetime();
diff --git a/src/EvtGenBase/EvtCyclic3.cpp b/src/EvtGenBase/EvtCyclic3.cpp
--- a/src/EvtGenBase/EvtCyclic3.cpp
+++ b/src/EvtGenBase/EvtCyclic3.cpp
@@ -331,7 +331,7 @@
return "C";
}
assert( 0 );
- return 0; // sngh
+ return nullptr; // sngh
}
const char* EvtCyclic3::c_str( Pair i )
@@ -345,7 +345,7 @@
return "AB";
}
assert( 0 );
- return 0; // sngh
+ return nullptr; // sngh
}
const char* EvtCyclic3::c_str( Perm p )
diff --git a/src/EvtGenBase/EvtDecayAmp.cpp b/src/EvtGenBase/EvtDecayAmp.cpp
--- a/src/EvtGenBase/EvtDecayAmp.cpp
+++ b/src/EvtGenBase/EvtDecayAmp.cpp
@@ -79,7 +79,7 @@
<< "channel :" << p->getChannel() << endl;
EvtGenReport( EVTGEN_DEBUG, "EvtGen" )
<< "Momentum:" << p->getP4() << " " << p->mass() << endl;
- if ( p->getParent() != 0 ) {
+ if ( p->getParent() != nullptr ) {
EvtGenReport( EVTGEN_DEBUG, "EvtGen" )
<< "parent:"
<< EvtPDL::name( p->getParent()->getId() ).c_str() << endl;
@@ -189,20 +189,20 @@
for ( size_t idaug = 0; idaug < p->getNDaug(); idaug++ ) {
EvtParticle* daughter = p->getDaug( idaug );
- if ( daughter != 0 ) {
+ if ( daughter != nullptr ) {
daughter->printTree();
}
}
EvtParticle* pParent = p->getParent();
- if ( pParent != 0 ) {
+ if ( pParent != nullptr ) {
EvtGenReport( EVTGEN_ERROR, "EvtGen" )
<< "Parent:"
<< EvtPDL::name( pParent->getId() ).c_str() << endl;
EvtParticle* grandParent = pParent->getParent();
- if ( grandParent != 0 ) {
+ if ( grandParent != nullptr ) {
EvtGenReport( EVTGEN_ERROR, "EvtGen" )
<< "GrandParent:"
<< EvtPDL::name( grandParent->getId() ).c_str()
diff --git a/src/EvtGenBase/EvtDecayBase.cpp b/src/EvtGenBase/EvtDecayBase.cpp
--- a/src/EvtGenBase/EvtDecayBase.cpp
+++ b/src/EvtGenBase/EvtDecayBase.cpp
@@ -621,7 +621,7 @@
i++;
}
- char** tc = 0;
+ char** tc = nullptr;
double result = strtod( _args[j].c_str(), tc );
if ( _storedArgs.size() < j + 1 ) { // then store the argument's value
diff --git a/src/EvtGenBase/EvtDecayParm.cpp b/src/EvtGenBase/EvtDecayParm.cpp
--- a/src/EvtGenBase/EvtDecayParm.cpp
+++ b/src/EvtGenBase/EvtDecayParm.cpp
@@ -51,22 +51,22 @@
EvtDecayParm::EvtDecayParm()
{
- itsfcn = 0;
+ itsfcn = nullptr;
itsndaug = 0;
itsnarg = 0;
- itsdaugs = 0;
- itsargs = 0;
+ itsdaugs = nullptr;
+ itsargs = nullptr;
modelname = "**********";
}
EvtDecayParm::~EvtDecayParm()
{
- if ( itsdaugs != 0 ) {
+ if ( itsdaugs != nullptr ) {
delete[] itsdaugs;
}
- if ( itsargs != 0 ) {
+ if ( itsargs != nullptr ) {
delete[] itsargs;
}
}
diff --git a/src/EvtGenBase/EvtDecayTable.cpp b/src/EvtGenBase/EvtDecayTable.cpp
--- a/src/EvtGenBase/EvtDecayTable.cpp
+++ b/src/EvtGenBase/EvtDecayTable.cpp
@@ -58,9 +58,9 @@
EvtDecayTable* EvtDecayTable::getInstance()
{
- static EvtDecayTable* theDecayTable = 0;
+ static EvtDecayTable* theDecayTable = nullptr;
- if ( theDecayTable == 0 ) {
+ if ( theDecayTable == nullptr ) {
theDecayTable = new EvtDecayTable();
}
@@ -91,7 +91,7 @@
partnum = p->getId().getAlias();
if ( _decaytable[partnum].getNMode() == 0 )
- return 0;
+ return nullptr;
return _decaytable[partnum].getDecayModel( p );
}
@@ -1445,7 +1445,7 @@
EvtDecayBase* EvtDecayTable::findDecayModel( int aliasInt, int modeInt )
{
- EvtDecayBase* theModel( 0 );
+ EvtDecayBase* theModel( nullptr );
if ( aliasInt >= 0 && aliasInt < (int)EvtPDL::entries() ) {
theModel = _decaytable[aliasInt].getDecayModel( modeInt );
diff --git a/src/EvtGenBase/EvtExtGeneratorCommandsTable.cpp b/src/EvtGenBase/EvtExtGeneratorCommandsTable.cpp
--- a/src/EvtGenBase/EvtExtGeneratorCommandsTable.cpp
+++ b/src/EvtGenBase/EvtExtGeneratorCommandsTable.cpp
@@ -32,9 +32,9 @@
EvtExtGeneratorCommandsTable* EvtExtGeneratorCommandsTable::getInstance()
{
- static EvtExtGeneratorCommandsTable* theCommandMap = 0;
+ static EvtExtGeneratorCommandsTable* theCommandMap = nullptr;
- if ( theCommandMap == 0 ) {
+ if ( theCommandMap == nullptr ) {
theCommandMap = new EvtExtGeneratorCommandsTable();
}
diff --git a/src/EvtGenBase/EvtHepMCEvent.cpp b/src/EvtGenBase/EvtHepMCEvent.cpp
--- a/src/EvtGenBase/EvtHepMCEvent.cpp
+++ b/src/EvtGenBase/EvtHepMCEvent.cpp
@@ -25,7 +25,7 @@
#include "EvtGenBase/EvtPatches.hh"
EvtHepMCEvent::EvtHepMCEvent() :
- _theEvent( 0 ), _translation( 0.0, 0.0, 0.0, 0.0 )
+ _theEvent( nullptr ), _translation( 0.0, 0.0, 0.0, 0.0 )
{
}
@@ -36,10 +36,10 @@
void EvtHepMCEvent::deleteEvent()
{
- if ( _theEvent != 0 ) {
+ if ( _theEvent != nullptr ) {
_theEvent->clear();
delete _theEvent;
- _theEvent = 0;
+ _theEvent = nullptr;
}
}
@@ -56,7 +56,7 @@
// Rather, it uses the base particle to construct the event.
this->deleteEvent();
- if ( baseParticle == 0 ) {
+ if ( baseParticle == nullptr ) {
return;
}
@@ -79,7 +79,7 @@
// Create an HepMC GenParticle, with the 4-momenta in the frame given by the frameType integer
GenParticlePtr genParticle{nullptr};
- if ( theParticle != 0 ) {
+ if ( theParticle != nullptr ) {
// Set the particle status integer to either stable or decayed
int status( EvtHepMCEvent::STABLE );
int nDaug = theParticle->getNDaug();
@@ -127,7 +127,8 @@
// be the same GenParticle pointer, hence the reason for using it as a 2nd argument
// in this function.
- if ( _theEvent == 0 || inEvtParticle == 0 || inGenParticle == 0 ) {
+ if ( _theEvent == nullptr || inEvtParticle == nullptr ||
+ inGenParticle == nullptr ) {
return;
}
@@ -150,7 +151,7 @@
GenParticlePtr genDaughter =
this->createGenParticle( evtDaughter, EvtHepMCEvent::LAB );
- if ( genDaughter != 0 ) {
+ if ( genDaughter != nullptr ) {
// Add a new GenParticle (outgoing) particle daughter to the vertex
theVertex->add_particle_out( genDaughter );
@@ -173,13 +174,13 @@
{
FourVector vertexCoord( 0.0, 0.0, 0.0, 0.0 );
- if ( theParticle != 0 && theParticle->getNDaug() != 0 ) {
+ if ( theParticle != nullptr && theParticle->getNDaug() != 0 ) {
// Get the position (t,x,y,z) of the EvtParticle, offset by the translation vector.
// This position will be the point where the particle decays. So we ask
// the position of the (1st) daughter particle.
EvtParticle* daugParticle = theParticle->getDaug( 0 );
- if ( daugParticle != 0 ) {
+ if ( daugParticle != nullptr ) {
EvtVector4R vtxPosition = daugParticle->get4Pos() + _translation;
// Create the HepMC 4 vector of the position (x,y,z,t)
diff --git a/src/EvtGenBase/EvtMHelAmp.cpp b/src/EvtGenBase/EvtMHelAmp.cpp
--- a/src/EvtGenBase/EvtMHelAmp.cpp
+++ b/src/EvtGenBase/EvtMHelAmp.cpp
@@ -34,7 +34,7 @@
{
_id = id;
_twospin = EvtSpinType::getSpin2( EvtPDL::getSpinType( id ) );
- _parent = NULL;
+ _parent = nullptr;
_lineshape = lineshape;
_elem = elem;
@@ -82,7 +82,7 @@
EvtVector4R d = _children[0]->get4vector( product );
double phi, theta;
- if ( _parent == NULL ) {
+ if ( _parent == nullptr ) {
// This means that we're calculating the first level and we need to just
// calculate the polar and azymuthal angles daughters in rest frame of
// this (root) particle (this is automatic).
@@ -97,7 +97,7 @@
// See if we have a grandparent - if no then the z-axis is defined by
// the z-axis of the root particle
- EvtVector4R g = _parent->getparent() == NULL
+ EvtVector4R g = _parent->getparent() == nullptr
? EvtVector4R( 0.0, 0.0, 0.0, 1.0 )
: _parent->getparent()->get4vector( product );
diff --git a/src/EvtGenBase/EvtMTree.cpp b/src/EvtGenBase/EvtMTree.cpp
--- a/src/EvtGenBase/EvtMTree.cpp
+++ b/src/EvtGenBase/EvtMTree.cpp
@@ -86,8 +86,8 @@
const vector<EvtComplex>& amps,
const vector<EvtMNode*>& children )
{
- EvtMRes* resonance = NULL;
- EvtMLineShape* lineshape = NULL;
+ EvtMRes* resonance = nullptr;
+ EvtMLineShape* lineshape = nullptr;
if ( ls == "BREITWIGNER" ) {
lineshape = new EvtMBreitWigner( id, lsarg );
@@ -219,7 +219,7 @@
while ( amp_iter != amp_end ) {
const char* nptr;
- char* endptr = NULL;
+ char* endptr = nullptr;
double amp = 0.0, phase = 0.0;
nptr = ( *amp_iter ).c_str();
diff --git a/src/EvtGenBase/EvtModel.cpp b/src/EvtGenBase/EvtModel.cpp
--- a/src/EvtGenBase/EvtModel.cpp
+++ b/src/EvtGenBase/EvtModel.cpp
@@ -38,7 +38,7 @@
#include <string>
using std::fstream;
-EvtModel* EvtModel::_instance = 0;
+EvtModel* EvtModel::_instance = nullptr;
EvtModel::EvtModel()
{
@@ -46,15 +46,15 @@
EvtDecayBase* EvtModel::getFcn( std::string model_name )
{
- EvtDecayBase* model = 0;
+ EvtDecayBase* model = nullptr;
if ( _modelNameHash.find( model_name ) != _modelNameHash.end() ) {
model = _modelNameHash[model_name];
}
- if ( model == 0 ) {
+ if ( model == nullptr ) {
EvtGenReport( EVTGEN_ERROR, "EvtGen" )
<< "Did not find the right model:" << model_name.c_str() << "\n";
- return 0;
+ return nullptr;
}
return model->clone();
@@ -91,7 +91,7 @@
void EvtModel::storeCommand( std::string cmd, std::string cnfgstr )
{
- EvtDecayBase* model = 0;
+ EvtDecayBase* model = nullptr;
if ( _commandNameHash.find( cmd ) != _commandNameHash.end() ) {
model = _commandNameHash[cmd];
}
diff --git a/src/EvtGenBase/EvtMultiChannelParser.cpp b/src/EvtGenBase/EvtMultiChannelParser.cpp
--- a/src/EvtGenBase/EvtMultiChannelParser.cpp
+++ b/src/EvtGenBase/EvtMultiChannelParser.cpp
@@ -121,7 +121,7 @@
void EvtMultiChannelParser::parse( const std::vector<std::string>& v )
{
// place holder for strtod
- char** tc = 0;
+ char** tc = nullptr;
// Get PDF maximum or number of points to
// use in the scan.
@@ -200,7 +200,7 @@
EvtComplex& c, int& format )
{
// place holder for strtod
- char** tc = 0;
+ char** tc = nullptr;
std::string coefString = v[i++];
assert( coefString == std::string( "COEFFICIENT" ) );
@@ -233,7 +233,7 @@
const std::vector<std::string>& v )
{
// place holder for strtod
- char** tc = 0;
+ char** tc = nullptr;
double value = 0;
if ( v[i] == std::string( "COEFFICIENT" ) ) {
diff --git a/src/EvtGenBase/EvtParser.cpp b/src/EvtGenBase/EvtParser.cpp
--- a/src/EvtGenBase/EvtParser.cpp
+++ b/src/EvtGenBase/EvtParser.cpp
@@ -34,8 +34,8 @@
{
_ntoken = 0;
_lengthoftokenlist = 0;
- _tokenlist = 0;
- _linelist = 0;
+ _tokenlist = nullptr;
+ _linelist = nullptr;
}
EvtParser::~EvtParser()
diff --git a/src/EvtGenBase/EvtParticle.cpp b/src/EvtGenBase/EvtParticle.cpp
--- a/src/EvtGenBase/EvtParticle.cpp
+++ b/src/EvtGenBase/EvtParticle.cpp
@@ -60,7 +60,7 @@
EvtParticle::EvtParticle()
{
_ndaug = 0;
- _parent = 0;
+ _parent = nullptr;
_channel = -10;
_t = 0.0;
_genlifetime = 1;
@@ -68,7 +68,7 @@
_isInit = false;
_validP4 = false;
_isDecayed = false;
- _decayProb = 0;
+ _decayProb = nullptr;
_intAttributes.clear();
_dblAttributes.clear();
// _mix=false;
@@ -248,7 +248,7 @@
// carefull - the parent mass might be fixed in stone..
EvtParticle* par = p->getParent();
double parMass = -1.;
- if ( par != 0 ) {
+ if ( par != nullptr ) {
if ( par->hasValidP4() )
parMass = par->mass();
for ( size_t i = 0; i < par->getNDaug(); i++ ) {
@@ -271,8 +271,8 @@
}
}
- EvtId* dauId = 0;
- double* dauMasses = 0;
+ EvtId* dauId = nullptr;
+ double* dauMasses = nullptr;
if ( _ndaug > 0 ) {
dauId = new EvtId[_ndaug];
dauMasses = new double[_ndaug];
@@ -281,8 +281,8 @@
dauMasses[j] = p->getDaug( j )->mass();
}
}
- EvtId* parId = 0;
- EvtId* othDauId = 0;
+ EvtId* parId = nullptr;
+ EvtId* othDauId = nullptr;
EvtParticle* tempPar = p->getParent();
if ( tempPar ) {
parId = new EvtId( tempPar->getId() );
@@ -391,8 +391,8 @@
}
int j;
- EvtId* dauId = 0;
- double* dauMasses = 0;
+ EvtId* dauId = nullptr;
+ double* dauMasses = nullptr;
int nDaugT = p->getNDaug();
if ( nDaugT > 0 ) {
dauId = new EvtId[nDaugT];
@@ -403,8 +403,8 @@
}
}
- EvtId* parId = 0;
- EvtId* othDauId = 0;
+ EvtId* parId = nullptr;
+ EvtId* othDauId = nullptr;
EvtParticle* tempPar = p->getParent();
if ( tempPar ) {
parId = new EvtId( tempPar->getId() );
@@ -496,7 +496,7 @@
decayer = EvtDecayTable::getInstance()->getDecayFunc( p );
}
//now we have accepted a set of masses - time
- if ( decayer != 0 ) {
+ if ( decayer != nullptr ) {
decayer->makeDecay( p );
} else {
p->_rhoBackward.setDiag( p->getSpinStates() );
@@ -564,7 +564,7 @@
}
int nDaug = p->getNDaug();
- double* dMasses = 0;
+ double* dMasses = nullptr;
int i;
if ( nDaug > 0 ) {
@@ -761,7 +761,7 @@
temp = this->getP4();
ptemp = this;
- while ( ptemp->getParent() != 0 ) {
+ while ( ptemp->getParent() != nullptr ) {
ptemp = ptemp->getParent();
mom = ptemp->getP4();
temp = boostTo( temp, mom );
@@ -777,7 +777,7 @@
temp = this->_pBeforeFSR;
ptemp = this;
- while ( ptemp->getParent() != 0 ) {
+ while ( ptemp->getParent() != nullptr ) {
ptemp = ptemp->getParent();
mom = ptemp->getP4();
temp = boostTo( temp, mom );
@@ -798,12 +798,12 @@
temp.set( 0.0, 0.0, 0.0, 0.0 );
ptemp = getParent();
- if ( ptemp == 0 )
+ if ( ptemp == nullptr )
return temp;
temp = ( ptemp->_t / ptemp->mass() ) * ( ptemp->getP4() );
- while ( ptemp->getParent() != 0 ) {
+ while ( ptemp->getParent() != nullptr ) {
ptemp = ptemp->getParent();
mom = ptemp->getP4();
temp = boostTo( temp, mom );
@@ -826,8 +826,8 @@
do {
bpart = current->_parent;
- if ( bpart == 0 )
- return 0;
+ if ( bpart == nullptr )
+ return nullptr;
i = 0;
while ( bpart->_daug[i] != current ) {
i++;
@@ -835,7 +835,7 @@
if ( bpart == rootOfTree ) {
if ( i + 1 == bpart->_ndaug )
- return 0;
+ return nullptr;
}
i++;
@@ -1270,7 +1270,7 @@
void EvtParticle::setDecayProb( double prob )
{
- if ( _decayProb == 0 )
+ if ( _decayProb == nullptr )
_decayProb = new double;
*_decayProb = prob;
}
diff --git a/src/EvtGenBase/EvtParticleDecay.cpp b/src/EvtGenBase/EvtParticleDecay.cpp
--- a/src/EvtGenBase/EvtParticleDecay.cpp
+++ b/src/EvtGenBase/EvtParticleDecay.cpp
@@ -36,7 +36,7 @@
using std::fstream;
void EvtParticleDecay::printSummary()
{
- if ( _decay != 0 )
+ if ( _decay != nullptr )
_decay->printSummary();
}
diff --git a/src/EvtGenBase/EvtParticleDecayList.cpp b/src/EvtGenBase/EvtParticleDecayList.cpp
--- a/src/EvtGenBase/EvtParticleDecayList.cpp
+++ b/src/EvtGenBase/EvtParticleDecayList.cpp
@@ -79,7 +79,7 @@
delete _decaylist[i];
}
- if ( _decaylist != 0 )
+ if ( _decaylist != nullptr )
delete[] _decaylist;
}
@@ -99,17 +99,17 @@
}
delete[] _decaylist;
- _decaylist = 0;
+ _decaylist = nullptr;
_nmode = 0;
_rawbrfrsum = 0.0;
}
EvtDecayBase* EvtParticleDecayList::getDecayModel( int imode )
{
- EvtDecayBase* theModel( 0 );
+ EvtDecayBase* theModel( nullptr );
if ( imode >= 0 && imode < _nmode ) {
EvtParticleDecay* theDecay = _decaylist[imode];
- if ( theDecay != 0 ) {
+ if ( theDecay != nullptr ) {
theModel = theDecay->getDecayModel();
}
}
@@ -128,10 +128,10 @@
}
if ( getNMode() == 0 ) {
- return 0;
+ return nullptr;
}
if ( getRawBrfrSum() < 0.00000001 ) {
- return 0;
+ return nullptr;
}
if ( getNMode() == 1 ) {
@@ -208,7 +208,7 @@
<< " with mass:" << p->mass() << " will throw event away! " << endl;
EvtStatus::setRejectFlag();
- return 0;
+ return nullptr;
}
void EvtParticleDecayList::setNMode( int nmode )
@@ -220,7 +220,7 @@
<< "Error _nmode not equal to zero!!!" << endl;
::abort();
}
- if ( _decaylist != 0 ) {
+ if ( _decaylist != nullptr ) {
delete[] _decaylist;
}
_decaylist = _decaylist_new;
@@ -304,7 +304,7 @@
delete[] _decaylist;
}
- if ( ( _nmode == 0 ) && ( _decaylist != 0 ) )
+ if ( ( _nmode == 0 ) && ( _decaylist != nullptr ) )
delete[] _decaylist;
_nmode++;
diff --git a/src/EvtGenBase/EvtParticleFactory.cpp b/src/EvtGenBase/EvtParticleFactory.cpp
--- a/src/EvtGenBase/EvtParticleFactory.cpp
+++ b/src/EvtGenBase/EvtParticleFactory.cpp
@@ -91,7 +91,7 @@
::abort();
- return 0;
+ return nullptr;
}
EvtParticle* EvtParticleFactory::particleFactory( EvtId id, EvtVector4R p4,
@@ -195,7 +195,7 @@
::abort();
- return 0;
+ return nullptr;
}
EvtParticle* EvtParticleFactory::particleFactory( EvtId id, EvtVector4R p4 )
diff --git a/src/EvtGenBase/EvtPto3PAmp.cpp b/src/EvtGenBase/EvtPto3PAmp.cpp
--- a/src/EvtGenBase/EvtPto3PAmp.cpp
+++ b/src/EvtGenBase/EvtPto3PAmp.cpp
@@ -59,7 +59,7 @@
_pairRes( other._pairRes ),
_spin( other._spin ),
_typeN( other._typeN ),
- _prop( ( other._prop ) ? (EvtPropagator*)other._prop->clone() : 0 ),
+ _prop( ( other._prop ) ? (EvtPropagator*)other._prop->clone() : nullptr ),
_g0( other._g0 ),
_min( other._min ),
_max( other._max ),
diff --git a/src/EvtGenBase/EvtPto3PAmpFactory.cpp b/src/EvtGenBase/EvtPto3PAmpFactory.cpp
--- a/src/EvtGenBase/EvtPto3PAmpFactory.cpp
+++ b/src/EvtGenBase/EvtPto3PAmpFactory.cpp
@@ -79,7 +79,7 @@
} else if ( vv[0] == "NONRES_EXP" ) {
typeNRes = EvtPto3PAmp::NONRES_EXP;
pairRes = strToPair( vv[1].c_str() );
- alpha = strtod( vv[2].c_str(), 0 );
+ alpha = strtod( vv[2].c_str(), nullptr );
} else
assert( 0 );
pdf = std::make_unique<EvtDalitzFlatPdf>( _dp );
@@ -88,11 +88,11 @@
} else if ( vv[0] == "LASS" || vv[0] == "LASS_ELASTIC" ||
vv[0] == "LASS_RESONANT" ) {
pairRes = strToPair( vv[1].c_str() );
- double m0 = strtod( vv[2].c_str(), 0 );
- double g0 = strtod( vv[3].c_str(), 0 );
- double a = strtod( vv[4].c_str(), 0 );
- double r = strtod( vv[5].c_str(), 0 );
- double cutoff = strtod( vv[6].c_str(), 0 );
+ double m0 = strtod( vv[2].c_str(), nullptr );
+ double g0 = strtod( vv[3].c_str(), nullptr );
+ double a = strtod( vv[4].c_str(), nullptr );
+ double r = strtod( vv[5].c_str(), nullptr );
+ double cutoff = strtod( vv[6].c_str(), nullptr );
pdf = std::make_unique<EvtDalitzResPdf>( _dp, m0, g0, pairRes );
amp = std::make_unique<EvtLASSAmp>( &_dp, pairRes, m0, g0, a, r, cutoff,
vv[0] );
@@ -146,8 +146,8 @@
}
}
- mR = strtod( vv[3].c_str(), 0 );
- gR = strtod( vv[4].c_str(), 0 );
+ mR = strtod( vv[3].c_str(), nullptr );
+ gR = strtod( vv[4].c_str(), nullptr );
i = 4;
} else {
// For a valid particle get spin, mass and width
@@ -165,8 +165,8 @@
printf( "Setting m(%s)=%s g(%s)=%s\n", vv[2].c_str(),
vv[3].c_str(), vv[2].c_str(), vv[4].c_str() );
- mR = strtod( vv[3].c_str(), 0 );
- gR = strtod( vv[4].c_str(), 0 );
+ mR = strtod( vv[3].c_str(), nullptr );
+ gR = strtod( vv[4].c_str(), nullptr );
i = 4;
}
}
@@ -212,9 +212,9 @@
double m1a = _dp.m( first( pairRes ) );
double m1b = _dp.m( second( pairRes ) );
// 2nd channel
- double g2 = strtod( vv[++i].c_str(), 0 );
- double m2a = strtod( vv[++i].c_str(), 0 );
- double m2b = strtod( vv[++i].c_str(), 0 );
+ double g2 = strtod( vv[++i].c_str(), nullptr );
+ double m2a = strtod( vv[++i].c_str(), nullptr );
+ double m2b = strtod( vv[++i].c_str(), nullptr );
EvtPropFlatte prop( mR, gR, m1a, m1b, g2, m2a, m2b );
partAmp = std::make_unique<EvtPto3PAmp>( _dp, pairAng, pairRes, spinR,
prop, EvtPto3PAmp::FLATTE );
@@ -227,7 +227,7 @@
if ( vv[i + 1] == "DVFF" ) {
i++;
if ( vv[++i] == "BLATTWEISSKOPF" ) {
- double R = strtod( vv[++i].c_str(), 0 );
+ double R = strtod( vv[++i].c_str(), nullptr );
partAmp->set_fd( R );
} else
assert( 0 );
@@ -240,7 +240,7 @@
if ( vv[++i] == "BLATTWEISSKOPF" ) {
if ( _verbose )
printf( "BVFF=%s\n", vv[i].c_str() );
- double R = strtod( vv[++i].c_str(), 0 );
+ double R = strtod( vv[++i].c_str(), nullptr );
partAmp->set_fb( R );
} else
assert( 0 );
@@ -254,7 +254,7 @@
i++;
if ( vv[i + 1] == "MIN" ) {
i++;
- double min = strtod( vv[++i].c_str(), 0 );
+ double min = strtod( vv[++i].c_str(), nullptr );
if ( _verbose )
std::cout << "CUTOFF MIN = " << min << " " << minwidths
<< std::endl;
@@ -263,7 +263,7 @@
partAmp->setmin( min );
} else if ( vv[i + 1] == "MAX" ) {
i++;
- double max = strtod( vv[++i].c_str(), 0 );
+ double max = strtod( vv[++i].c_str(), nullptr );
if ( _verbose )
std::cout << "CUTOFF MAX = " << max << " " << minwidths
<< std::endl;
@@ -281,7 +281,7 @@
i++;
if ( vv[i + 1] == "MIN" ) {
i++;
- double min = strtod( vv[++i].c_str(), 0 );
+ double min = strtod( vv[++i].c_str(), nullptr );
if ( _verbose )
std::cout << "CUTOFF MIN = " << min << std::endl;
//ensure against cutting off too close to the resonance
@@ -289,7 +289,7 @@
partAmp->setmin( min );
} else if ( vv[i + 1] == "MAX" ) {
i++;
- double max = strtod( vv[++i].c_str(), 0 );
+ double max = strtod( vv[++i].c_str(), nullptr );
if ( _verbose )
std::cout << "CUTOFF MAX = " << max << std::endl;
//ensure against cutting off too close to the resonance
diff --git a/src/EvtGenBase/EvtRadCorr.cpp b/src/EvtGenBase/EvtRadCorr.cpp
--- a/src/EvtGenBase/EvtRadCorr.cpp
+++ b/src/EvtGenBase/EvtRadCorr.cpp
@@ -28,13 +28,13 @@
#include <stdlib.h>
using std::endl;
-EvtAbsRadCorr* EvtRadCorr::_fsrEngine = 0;
+EvtAbsRadCorr* EvtRadCorr::_fsrEngine = nullptr;
bool EvtRadCorr::_alwaysRadCorr = false;
bool EvtRadCorr::_neverRadCorr = false;
EvtRadCorr::EvtRadCorr()
{
- _fsrEngine = 0;
+ _fsrEngine = nullptr;
_alwaysRadCorr = false;
_neverRadCorr = false;
}
@@ -43,7 +43,7 @@
{
if ( _fsrEngine )
delete _fsrEngine;
- _fsrEngine = 0;
+ _fsrEngine = nullptr;
}
void EvtRadCorr::setRadCorrEngine( EvtAbsRadCorr* fsrEngine )
@@ -53,7 +53,7 @@
void EvtRadCorr::doRadCorr( EvtParticle* p )
{
- if ( _fsrEngine == 0 ) {
+ if ( _fsrEngine == nullptr ) {
EvtGenReport( EVTGEN_ERROR, "EvtGen" )
<< "No RadCorr model available in "
<< "EvtRadCorr::doRadCorr()." << endl;
diff --git a/src/EvtGenBase/EvtRandom.cpp b/src/EvtGenBase/EvtRandom.cpp
--- a/src/EvtGenBase/EvtRandom.cpp
+++ b/src/EvtGenBase/EvtRandom.cpp
@@ -32,7 +32,7 @@
using std::endl;
-EvtRandomEngine* EvtRandom::_randomEngine = 0;
+EvtRandomEngine* EvtRandom::_randomEngine = nullptr;
void EvtRandom::setRandomEngine( EvtRandomEngine* randomEngine )
{
@@ -41,7 +41,7 @@
double EvtRandom::random()
{
- if ( _randomEngine == 0 ) {
+ if ( _randomEngine == nullptr ) {
EvtGenReport( EVTGEN_ERROR, "EvtGen" )
<< "No random engine available in "
<< "EvtRandom::random()." << endl;
diff --git a/src/EvtGenBase/EvtReport.cpp b/src/EvtGenBase/EvtReport.cpp
--- a/src/EvtGenBase/EvtReport.cpp
+++ b/src/EvtGenBase/EvtReport.cpp
@@ -34,7 +34,7 @@
{
int printNoFacility = 1;
- if ( ( facility == 0 ) && ( printNoFacility == 1 ) ) {
+ if ( ( facility == nullptr ) && ( printNoFacility == 1 ) ) {
cout << "There is no `facility' implemented in `report'" << endl;
printNoFacility = 0;
}
diff --git a/src/EvtGenBase/EvtSpinDensity.cpp b/src/EvtGenBase/EvtSpinDensity.cpp
--- a/src/EvtGenBase/EvtSpinDensity.cpp
+++ b/src/EvtGenBase/EvtSpinDensity.cpp
@@ -34,7 +34,7 @@
EvtSpinDensity::EvtSpinDensity( const EvtSpinDensity& density )
{
dim = 0;
- rho = 0;
+ rho = nullptr;
int i, j;
setDim( density.dim );
@@ -74,7 +74,7 @@
EvtSpinDensity::EvtSpinDensity()
{
dim = 0;
- rho = 0;
+ rho = nullptr;
}
void EvtSpinDensity::setDim( int n )
@@ -86,7 +86,7 @@
for ( i = 0; i < dim; i++ )
delete[] rho[i];
delete[] rho;
- rho = 0;
+ rho = nullptr;
dim = 0;
}
if ( n == 0 )
diff --git a/src/EvtGenBase/EvtdFunctionSingle.cpp b/src/EvtGenBase/EvtdFunctionSingle.cpp
--- a/src/EvtGenBase/EvtdFunctionSingle.cpp
+++ b/src/EvtGenBase/EvtdFunctionSingle.cpp
@@ -32,14 +32,14 @@
_j = 0;
_m1 = 0;
_m2 = 0;
- _coef = 0;
+ _coef = nullptr;
_kmin = 0;
_kmax = 0;
}
EvtdFunctionSingle::~EvtdFunctionSingle()
{
- if ( _coef != 0 )
+ if ( _coef != nullptr )
delete[] _coef;
}
diff --git a/src/EvtGenExternal/EvtExternalGenFactory.cpp b/src/EvtGenExternal/EvtExternalGenFactory.cpp
--- a/src/EvtGenExternal/EvtExternalGenFactory.cpp
+++ b/src/EvtGenExternal/EvtExternalGenFactory.cpp
@@ -56,9 +56,9 @@
EvtExternalGenFactory* EvtExternalGenFactory::getInstance()
{
- static EvtExternalGenFactory* theFactory = 0;
+ static EvtExternalGenFactory* theFactory = nullptr;
- if ( theFactory == 0 ) {
+ if ( theFactory == nullptr ) {
theFactory = new EvtExternalGenFactory();
}
@@ -136,7 +136,7 @@
EvtAbsExternalGen* EvtExternalGenFactory::getGenerator( int genId )
{
- EvtAbsExternalGen* theGenerator( 0 );
+ EvtAbsExternalGen* theGenerator( nullptr );
ExtGenMap::iterator iter;
@@ -158,7 +158,7 @@
ExtGenMap::iterator iter;
for ( iter = _extGenMap.begin(); iter != _extGenMap.end(); ++iter ) {
EvtAbsExternalGen* theGenerator = iter->second;
- if ( theGenerator != 0 ) {
+ if ( theGenerator != nullptr ) {
theGenerator->initialise();
}
}
diff --git a/src/EvtGenExternal/EvtExternalGenList.cpp b/src/EvtGenExternal/EvtExternalGenList.cpp
--- a/src/EvtGenExternal/EvtExternalGenList.cpp
+++ b/src/EvtGenExternal/EvtExternalGenList.cpp
@@ -41,7 +41,7 @@
// PYTHIA8DATA environment variable which should be set to the
// xmldoc Pythia directory
char* pythiaDataDir = getenv( "PYTHIA8DATA" );
- if ( pythiaDataDir != 0 ) {
+ if ( pythiaDataDir != nullptr ) {
pythiaXmlDir = pythiaDataDir;
}
}
diff --git a/src/EvtGenExternal/EvtPhotosEngine.cpp b/src/EvtGenExternal/EvtPhotosEngine.cpp
--- a/src/EvtGenExternal/EvtPhotosEngine.cpp
+++ b/src/EvtGenExternal/EvtPhotosEngine.cpp
@@ -90,7 +90,7 @@
this->initialise();
}
- if ( theMother == 0 ) {
+ if ( theMother == nullptr ) {
return false;
}
@@ -174,7 +174,7 @@
double px( 0.0 ), py( 0.0 ), pz( 0.0 );
int pdgId( 0 );
- if ( outParticle != 0 ) {
+ if ( outParticle != nullptr ) {
FourVector HepMCP4 = outParticle->momentum();
px = HepMCP4.px();
py = HepMCP4.py();
@@ -188,7 +188,7 @@
if ( iLoop < nDaug ) {
// Original daughters
EvtParticle* daugParticle = theMother->getDaug( iLoop );
- if ( daugParticle != 0 ) {
+ if ( daugParticle != nullptr ) {
// Keep the original particle mass, but set the three-momentum
// according to what Photos has modified. However, this will
// violate energy conservation (from what Photos has provided).
@@ -233,8 +233,8 @@
bool incoming )
{
// Method to create an HepMC::GenParticle version of the given EvtParticle.
- if ( theParticle == 0 ) {
- return 0;
+ if ( theParticle == nullptr ) {
+ return nullptr;
}
// Get the 4-momentum (E, px, py, pz) for the EvtParticle
@@ -291,7 +291,7 @@
// Get the PDG id
int pdgId( 0 );
- if ( outParticle != 0 ) {
+ if ( outParticle != nullptr ) {
pdgId = outParticle->pdg_id();
}
diff --git a/src/EvtGenExternal/EvtPythia.cpp b/src/EvtGenExternal/EvtPythia.cpp
--- a/src/EvtGenExternal/EvtPythia.cpp
+++ b/src/EvtGenExternal/EvtPythia.cpp
@@ -39,7 +39,7 @@
// Set the Pythia engine to a null pointer at first.
// When we do the decay, we retrieve the pointer to the Pythia engine
// and use that for all decays. All clones will use the same Pythia engine.
- _pythiaEngine = 0;
+ _pythiaEngine = nullptr;
}
EvtPythia::~EvtPythia()
diff --git a/src/EvtGenExternal/EvtPythiaEngine.cpp b/src/EvtGenExternal/EvtPythiaEngine.cpp
--- a/src/EvtGenExternal/EvtPythiaEngine.cpp
+++ b/src/EvtGenExternal/EvtPythiaEngine.cpp
@@ -65,7 +65,7 @@
<< "Creating alias Pythia generator" << endl;
_aliasPythiaGen = std::make_unique<Pythia8::Pythia>( xmlDir, false );
- _thePythiaGenerator = 0;
+ _thePythiaGenerator = nullptr;
_daugPDGVector.clear();
_daugP4Vector.clear();
@@ -159,7 +159,7 @@
this->initialise();
}
- if ( theParticle == 0 ) {
+ if ( theParticle == nullptr ) {
EvtGenReport( EVTGEN_INFO, "EvtGen" )
<< "Error in EvtPythiaEngine::doDecay. The mother particle is null. Not doing any Pythia decay."
<< endl;
@@ -286,7 +286,7 @@
void EvtPythiaEngine::createDaughterEvtParticles( EvtParticle* theParent )
{
- if ( theParent == 0 ) {
+ if ( theParent == nullptr ) {
EvtGenReport( EVTGEN_INFO, "EvtGen" )
<< "Error in EvtPythiaEngine::createDaughterEvtParticles. The parent is null"
<< endl;
@@ -334,7 +334,7 @@
EvtDecayBase* decayModel = EvtDecayTable::getInstance()->findDecayModel(
aliasInt, pythiaModeInt );
- if ( decayModel != 0 ) {
+ if ( decayModel != nullptr ) {
int nModeDaug = decayModel->getNDaug();
// We need to make sure that the number of daughters match
@@ -389,7 +389,7 @@
EvtParticle* theDaughter = theParent->getDaug( iDaug );
// Set the correct 4-momentum for each daughter particle.
- if ( theDaughter != 0 ) {
+ if ( theDaughter != nullptr ) {
EvtId theDaugId = daugAliasIdVect[iDaug];
const EvtVector4R theDaugP4 = _daugP4Vector[iDaug];
theDaughter->init( theDaugId, theDaugP4 );
@@ -443,7 +443,7 @@
// Check that the PDG code is not zero/null and exclude other
// special cases, e.g. those reserved for internal generator use
- if ( entry_generic != 0 && this->validPDGCode( PDGCode ) ) {
+ if ( entry_generic != nullptr && this->validPDGCode( PDGCode ) ) {
entry_generic->setM0( mass );
entry_generic->setMWidth( width );
entry_generic->setTau0( lifetime );
@@ -456,7 +456,7 @@
// Check that the PDG code is not zero/null and exclude other
// special cases, e.g. those reserved for internal generator use
- if ( entry_alias != 0 && this->validPDGCode( PDGCode ) ) {
+ if ( entry_alias != nullptr && this->validPDGCode( PDGCode ) ) {
entry_alias->setM0( mass );
entry_alias->setMWidth( width );
entry_alias->setTau0( lifetime );
@@ -557,7 +557,7 @@
EvtDecayBase* decayModel =
EvtDecayTable::getInstance()->findDecayModel( aliasInt, iMode );
- if ( decayModel != 0 ) {
+ if ( decayModel != nullptr ) {
int nDaug = decayModel->getNDaug();
// If the decay mode has no daughters, then that means that there will be
@@ -645,7 +645,7 @@
{
int tmpModeInt( 0 ), modeInt( 0 );
- if ( decayModel != 0 ) {
+ if ( decayModel != nullptr ) {
int nVars = decayModel->getNArg();
// Just read the first integer, which specifies the Pythia decay model.
// Ignore any other values.
diff --git a/src/EvtGenExternal/EvtTauolaEngine.cpp b/src/EvtGenExternal/EvtTauolaEngine.cpp
--- a/src/EvtGenExternal/EvtTauolaEngine.cpp
+++ b/src/EvtGenExternal/EvtTauolaEngine.cpp
@@ -326,7 +326,7 @@
this->initialise();
}
- if ( tauParticle == 0 ) {
+ if ( tauParticle == nullptr ) {
return false;
}
@@ -369,7 +369,7 @@
// Get the parent of this tau particle
EvtParticle* theParent = tauParticle->getParent();
- GenParticlePtr hepMCParent( 0 );
+ GenParticlePtr hepMCParent( nullptr );
// Assign the parent particle as the incoming particle to the vertex.
if ( theParent ) {
@@ -573,8 +573,8 @@
GenParticlePtr EvtTauolaEngine::createGenParticle( EvtParticle* theParticle )
{
// Method to create an HepMC::GenParticle version of the given EvtParticle.
- if ( theParticle == 0 ) {
- return 0;
+ if ( theParticle == nullptr ) {
+ return nullptr;
}
// Get the 4-momentum (E, px, py, pz) for the EvtParticle
diff --git a/src/EvtGenModels/EvtBtoXsgamma.cpp b/src/EvtGenModels/EvtBtoXsgamma.cpp
--- a/src/EvtGenModels/EvtBtoXsgamma.cpp
+++ b/src/EvtGenModels/EvtBtoXsgamma.cpp
@@ -75,7 +75,7 @@
{
//initialize here. -- its too damn slow otherwise.
- if ( _model == 0 ) {
+ if ( _model == nullptr ) {
if ( getArg( 0 ) == 1 )
_model = std::make_unique<EvtBtoXsgammaAliGreub>();
else if ( getArg( 0 ) == 2 )
diff --git a/src/EvtGenModels/EvtD0gammaDalitz.cpp b/src/EvtGenModels/EvtD0gammaDalitz.cpp
--- a/src/EvtGenModels/EvtD0gammaDalitz.cpp
+++ b/src/EvtGenModels/EvtD0gammaDalitz.cpp
@@ -118,7 +118,7 @@
// Check if the D is from a B+- -> D0 K+- decay with the appropriate model.
EvtParticle* parent =
part->getParent(); // If there are no mistakes, should be B+ or B-.
- if ( parent != 0 &&
+ if ( parent != nullptr &&
EvtDecayTable::getInstance()->getDecayFunc( parent )->getName() ==
"BTODDALITZCPK" ) {
EvtId parId = parent->getId();
diff --git a/src/EvtGenModels/EvtDalitzTable.cpp b/src/EvtGenModels/EvtDalitzTable.cpp
--- a/src/EvtGenModels/EvtDalitzTable.cpp
+++ b/src/EvtGenModels/EvtDalitzTable.cpp
@@ -49,9 +49,9 @@
EvtDalitzTable* EvtDalitzTable::getInstance( const std::string dec_name,
bool verbose )
{
- static EvtDalitzTable* theDalitzTable = 0;
+ static EvtDalitzTable* theDalitzTable = nullptr;
- if ( theDalitzTable == 0 ) {
+ if ( theDalitzTable == nullptr ) {
theDalitzTable = new EvtDalitzTable();
}
@@ -83,7 +83,7 @@
_readFiles.push_back( dec_name );
- EvtDalitzDecayInfo* dalitzDecay = 0;
+ EvtDalitzDecayInfo* dalitzDecay = nullptr;
double probMax = 0;
EvtId ipar;
std::string decayParent = "";
@@ -385,7 +385,7 @@
dalitzDecay->setProbMax( probMax );
addDecay( ipar, *dalitzDecay );
delete dalitzDecay;
- dalitzDecay = 0;
+ dalitzDecay = nullptr;
} else if ( verbose ) {
EvtGenReport( EVTGEN_INFO, "EvtGen" )
<< "Unexpected tag " << parser.getTagTitle()
diff --git a/src/EvtGenModels/EvtLb2Baryonlnu.cpp b/src/EvtGenModels/EvtLb2Baryonlnu.cpp
--- a/src/EvtGenModels/EvtLb2Baryonlnu.cpp
+++ b/src/EvtGenModels/EvtLb2Baryonlnu.cpp
@@ -37,16 +37,16 @@
#ifdef D0
#undef D0
#endif
-EvtLb2Baryonlnu::EvtLb2Baryonlnu() : ffmodel( 0 ), calcamp( 0 )
+EvtLb2Baryonlnu::EvtLb2Baryonlnu() : ffmodel( nullptr ), calcamp( nullptr )
{
}
EvtLb2Baryonlnu::~EvtLb2Baryonlnu()
{
delete ffmodel;
- ffmodel = 0;
+ ffmodel = nullptr;
delete calcamp;
- calcamp = 0;
+ calcamp = nullptr;
}
std::string EvtLb2Baryonlnu::getName()
diff --git a/src/EvtGenModels/EvtLb2plnuLCSR.cpp b/src/EvtGenModels/EvtLb2plnuLCSR.cpp
--- a/src/EvtGenModels/EvtLb2plnuLCSR.cpp
+++ b/src/EvtGenModels/EvtLb2plnuLCSR.cpp
@@ -37,16 +37,16 @@
#ifdef D0
#undef D0
#endif
-EvtLb2plnuLCSR::EvtLb2plnuLCSR() : ffmodel( 0 ), calcamp( 0 )
+EvtLb2plnuLCSR::EvtLb2plnuLCSR() : ffmodel( nullptr ), calcamp( nullptr )
{
}
EvtLb2plnuLCSR::~EvtLb2plnuLCSR()
{
delete ffmodel;
- ffmodel = 0;
+ ffmodel = nullptr;
delete calcamp;
- calcamp = 0;
+ calcamp = nullptr;
}
std::string EvtLb2plnuLCSR::getName()
diff --git a/src/EvtGenModels/EvtLb2plnuLQCD.cpp b/src/EvtGenModels/EvtLb2plnuLQCD.cpp
--- a/src/EvtGenModels/EvtLb2plnuLQCD.cpp
+++ b/src/EvtGenModels/EvtLb2plnuLQCD.cpp
@@ -37,16 +37,16 @@
#ifdef D0
#undef D0
#endif
-EvtLb2plnuLQCD::EvtLb2plnuLQCD() : ffmodel( 0 ), calcamp( 0 )
+EvtLb2plnuLQCD::EvtLb2plnuLQCD() : ffmodel( nullptr ), calcamp( nullptr )
{
}
EvtLb2plnuLQCD::~EvtLb2plnuLQCD()
{
delete ffmodel;
- ffmodel = 0;
+ ffmodel = nullptr;
delete calcamp;
- calcamp = 0;
+ calcamp = nullptr;
}
std::string EvtLb2plnuLQCD::getName()
diff --git a/src/EvtGenModels/EvtMultibody.cpp b/src/EvtGenModels/EvtMultibody.cpp
--- a/src/EvtGenModels/EvtMultibody.cpp
+++ b/src/EvtGenModels/EvtMultibody.cpp
@@ -33,12 +33,12 @@
EvtMultibody::~EvtMultibody()
{
- if ( _decayTree != NULL )
+ if ( _decayTree != nullptr )
delete _decayTree;
- _decayTree = NULL;
- if ( _ilist != NULL )
+ _decayTree = nullptr;
+ if ( _ilist != nullptr )
delete[] _ilist;
- _ilist = NULL;
+ _ilist = nullptr;
}
std::string EvtMultibody::getName()
diff --git a/src/EvtGenModels/EvtPropSLPole.cpp b/src/EvtGenModels/EvtPropSLPole.cpp
--- a/src/EvtGenModels/EvtPropSLPole.cpp
+++ b/src/EvtGenModels/EvtPropSLPole.cpp
@@ -200,7 +200,7 @@
EvtParticle* par = pmeson->getParent();
double maxMass = -1.;
- if ( par != 0 ) {
+ if ( par != nullptr ) {
if ( par->hasValidP4() )
maxMass = par->mass();
for ( size_t i = 0; i < par->getNDaug(); i++ ) {
@@ -210,8 +210,8 @@
}
}
- EvtId* dauId = 0;
- double* dauMasses = 0;
+ EvtId* dauId = nullptr;
+ double* dauMasses = nullptr;
size_t nDaug = pmeson->getNDaug();
if ( nDaug > 0 ) {
dauId = new EvtId[nDaug];
@@ -221,8 +221,8 @@
dauMasses[j] = pmeson->getDaug( j )->mass();
}
}
- EvtId* parId = 0;
- EvtId* othDaugId = 0;
+ EvtId* parId = nullptr;
+ EvtId* othDaugId = nullptr;
EvtParticle* tempPar = pmeson->getParent();
if ( tempPar ) {
parId = new EvtId( tempPar->getId() );
diff --git a/src/EvtGenModels/EvtRareLbToLll.cpp b/src/EvtGenModels/EvtRareLbToLll.cpp
--- a/src/EvtGenModels/EvtRareLbToLll.cpp
+++ b/src/EvtGenModels/EvtRareLbToLll.cpp
@@ -229,8 +229,8 @@
const bool isparticle = isParticle( parent );
- const EvtParticle* lp = 0;
- const EvtParticle* lm = 0;
+ const EvtParticle* lp = nullptr;
+ const EvtParticle* lm = nullptr;
if ( leptons.contains( parent.getDaug( 1 )->getId() ) ) {
lp = parent.getDaug( 1 );
diff --git a/src/EvtGenModels/EvtVub.cpp b/src/EvtGenModels/EvtVub.cpp
--- a/src/EvtGenModels/EvtVub.cpp
+++ b/src/EvtGenModels/EvtVub.cpp
@@ -166,7 +166,7 @@
int j;
// B+ -> u-bar specflav l+ nu
- EvtParticle *xuhad( 0 ), *lepton( 0 ), *neutrino( 0 );
+ EvtParticle *xuhad( nullptr ), *lepton( nullptr ), *neutrino( nullptr );
EvtVector4R p4;
// R. Faccini 21/02/03
// move the reweighting up , before also shooting the fermi distribution
diff --git a/src/EvtGenModels/EvtVubBLNP.cpp b/src/EvtGenModels/EvtVubBLNP.cpp
--- a/src/EvtGenModels/EvtVubBLNP.cpp
+++ b/src/EvtGenModels/EvtVubBLNP.cpp
@@ -190,7 +190,7 @@
{
int j;
- EvtParticle *xuhad( 0 ), *lepton( 0 ), *neutrino( 0 );
+ EvtParticle *xuhad( nullptr ), *lepton( nullptr ), *neutrino( nullptr );
EvtVector4R p4;
double Pp, Pm, Pl, pdf, EX, sh, ml, mpi, ratemax;
double El( 0. );
diff --git a/src/EvtGenModels/EvtVubHybrid.cpp b/src/EvtGenModels/EvtVubHybrid.cpp
--- a/src/EvtGenModels/EvtVubHybrid.cpp
+++ b/src/EvtGenModels/EvtVubHybrid.cpp
@@ -162,7 +162,7 @@
int j;
// B+ -> u-bar specflav l+ nu
- EvtParticle *xuhad( 0 ), *lepton( 0 ), *neutrino( 0 );
+ EvtParticle *xuhad( nullptr ), *lepton( nullptr ), *neutrino( nullptr );
EvtVector4R p4;
// R. Faccini 21/02/03
// move the reweighting up , before also shooting the fermi distribution
diff --git a/src/EvtGenModels/EvtbTosllScalarAmpNew.cpp b/src/EvtGenModels/EvtbTosllScalarAmpNew.cpp
--- a/src/EvtGenModels/EvtbTosllScalarAmpNew.cpp
+++ b/src/EvtGenModels/EvtbTosllScalarAmpNew.cpp
@@ -294,8 +294,8 @@
int charge1 = EvtPDL::chg3( parent->getDaug( 1 )->getId() );
int charge2 = EvtPDL::chg3( parent->getDaug( 2 )->getId() );
- EvtParticle* lepPlus = 0;
- EvtParticle* lepMinus = 0;
+ EvtParticle* lepPlus = nullptr;
+ EvtParticle* lepMinus = nullptr;
lepPlus = ( charge1 > charge2 ) ? parent->getDaug( 1 ) : parent->getDaug( 2 );
lepMinus = ( charge1 < charge2 ) ? parent->getDaug( 1 )
diff --git a/src/EvtGenModels/EvtbTosllScalarAmpNewExt.cpp b/src/EvtGenModels/EvtbTosllScalarAmpNewExt.cpp
--- a/src/EvtGenModels/EvtbTosllScalarAmpNewExt.cpp
+++ b/src/EvtGenModels/EvtbTosllScalarAmpNewExt.cpp
@@ -291,8 +291,8 @@
int charge1 = EvtPDL::chg3( parent->getDaug( 1 )->getId() );
int charge2 = EvtPDL::chg3( parent->getDaug( 2 )->getId() );
- EvtParticle* lepPlus = 0;
- EvtParticle* lepMinus = 0;
+ EvtParticle* lepPlus = nullptr;
+ EvtParticle* lepMinus = nullptr;
lepPlus = ( charge1 > charge2 ) ? parent->getDaug( 1 ) : parent->getDaug( 2 );
lepMinus = ( charge1 < charge2 ) ? parent->getDaug( 1 )
diff --git a/src/EvtGenModels/EvtbTosllVectorAmp.cpp b/src/EvtGenModels/EvtbTosllVectorAmp.cpp
--- a/src/EvtGenModels/EvtbTosllVectorAmp.cpp
+++ b/src/EvtGenModels/EvtbTosllVectorAmp.cpp
@@ -131,8 +131,8 @@
static EvtIdSet bmesons( "B-", "anti-B0", "anti-B_s0" );
static EvtIdSet bbarmesons( "B+", "B0", "B_s0" );
- EvtParticle* lepPlus = 0;
- EvtParticle* lepMinus = 0;
+ EvtParticle* lepPlus = nullptr;
+ EvtParticle* lepMinus = nullptr;
int charge1 = EvtPDL::chg3( parent->getDaug( 1 )->getId() );
int charge2 = EvtPDL::chg3( parent->getDaug( 2 )->getId() );
diff --git a/src/EvtGenModels/EvtbTosllVectorAmpNew.cpp b/src/EvtGenModels/EvtbTosllVectorAmpNew.cpp
--- a/src/EvtGenModels/EvtbTosllVectorAmpNew.cpp
+++ b/src/EvtGenModels/EvtbTosllVectorAmpNew.cpp
@@ -329,8 +329,8 @@
int charge1 = EvtPDL::chg3( parent->getDaug( 1 )->getId() );
int charge2 = EvtPDL::chg3( parent->getDaug( 2 )->getId() );
- EvtParticle* lepPlus = 0;
- EvtParticle* lepMinus = 0;
+ EvtParticle* lepPlus = nullptr;
+ EvtParticle* lepMinus = nullptr;
lepPlus = ( charge1 > charge2 ) ? parent->getDaug( 1 ) : parent->getDaug( 2 );
lepMinus = ( charge1 < charge2 ) ? parent->getDaug( 1 )
diff --git a/src/EvtGenModels/EvtbTosllVectorAmpNewExt.cpp b/src/EvtGenModels/EvtbTosllVectorAmpNewExt.cpp
--- a/src/EvtGenModels/EvtbTosllVectorAmpNewExt.cpp
+++ b/src/EvtGenModels/EvtbTosllVectorAmpNewExt.cpp
@@ -336,8 +336,8 @@
int charge1 = EvtPDL::chg3( parent->getDaug( 1 )->getId() );
int charge2 = EvtPDL::chg3( parent->getDaug( 2 )->getId() );
- EvtParticle* lepPlus = 0;
- EvtParticle* lepMinus = 0;
+ EvtParticle* lepPlus = nullptr;
+ EvtParticle* lepMinus = nullptr;
lepPlus = ( charge1 > charge2 ) ? parent->getDaug( 1 ) : parent->getDaug( 2 );
lepMinus = ( charge1 < charge2 ) ? parent->getDaug( 1 )
diff --git a/src/EvtGenModels/Evtbs2llGammaAmp.cpp b/src/EvtGenModels/Evtbs2llGammaAmp.cpp
--- a/src/EvtGenModels/Evtbs2llGammaAmp.cpp
+++ b/src/EvtGenModels/Evtbs2llGammaAmp.cpp
@@ -105,8 +105,8 @@
::abort();
}
- EvtParticle* lepPlus = 0;
- EvtParticle* lepMinus = 0;
+ EvtParticle* lepPlus = nullptr;
+ EvtParticle* lepMinus = nullptr;
lepPlus = ( charge1 > charge2 )
? parent->getDaug( il1 )
diff --git a/src/EvtGenModels/Evtbs2llGammaISRFSRAmp.cpp b/src/EvtGenModels/Evtbs2llGammaISRFSRAmp.cpp
--- a/src/EvtGenModels/Evtbs2llGammaISRFSRAmp.cpp
+++ b/src/EvtGenModels/Evtbs2llGammaISRFSRAmp.cpp
@@ -110,8 +110,8 @@
::abort();
}
- EvtParticle* lepPlus = 0;
- EvtParticle* lepMinus = 0;
+ EvtParticle* lepPlus = nullptr;
+ EvtParticle* lepMinus = nullptr;
lepPlus = ( charge1 > charge2 )
? parent->getDaug( il1 )
diff --git a/src/EvtGenModels/EvtbsToLLLLAmp.cpp b/src/EvtGenModels/EvtbsToLLLLAmp.cpp
--- a/src/EvtGenModels/EvtbsToLLLLAmp.cpp
+++ b/src/EvtGenModels/EvtbsToLLLLAmp.cpp
@@ -181,10 +181,10 @@
::abort();
}
- EvtParticle* lep1Plus = 0;
- EvtParticle* lep1Minus = 0;
- EvtParticle* lep2Plus = 0;
- EvtParticle* lep2Minus = 0;
+ EvtParticle* lep1Plus = nullptr;
+ EvtParticle* lep1Minus = nullptr;
+ EvtParticle* lep2Plus = nullptr;
+ EvtParticle* lep2Minus = nullptr;
EvtVector4R p; // B-meson momentum in the B-rest frame
EvtVector4R q; // first transition 4-momentum in the B-rest frame
diff --git a/src/EvtGenModels/EvtbsToLLLLHyperCPAmp.cpp b/src/EvtGenModels/EvtbsToLLLLHyperCPAmp.cpp
--- a/src/EvtGenModels/EvtbsToLLLLHyperCPAmp.cpp
+++ b/src/EvtGenModels/EvtbsToLLLLHyperCPAmp.cpp
@@ -151,10 +151,10 @@
::abort();
}
- EvtParticle* lep1Plus = 0;
- EvtParticle* lep1Minus = 0;
- EvtParticle* lep2Plus = 0;
- EvtParticle* lep2Minus = 0;
+ EvtParticle* lep1Plus = nullptr;
+ EvtParticle* lep1Minus = nullptr;
+ EvtParticle* lep2Plus = nullptr;
+ EvtParticle* lep2Minus = nullptr;
EvtVector4R p; // B-meson momentum in the B-rest frame
diff --git a/test/evt_dalitz.cc b/test/evt_dalitz.cc
--- a/test/evt_dalitz.cc
+++ b/test/evt_dalitz.cc
@@ -89,7 +89,7 @@
// Initialize EvtGen
// Define the random number generator
- EvtRandomEngine* eng = 0;
+ EvtRandomEngine* eng = nullptr;
#ifdef EVTGEN_CPP11
// Use the Mersenne-Twister generator (C++11 only)
@@ -100,7 +100,7 @@
EvtRandom::setRandomEngine( eng );
- EvtAbsRadCorr* radCorrEngine = 0;
+ EvtAbsRadCorr* radCorrEngine = nullptr;
std::list<EvtDecayBase*> extraModels;
#ifdef EVTGEN_EXTERNAL
diff --git a/test/evtgenlhc_test1.cc b/test/evtgenlhc_test1.cc
--- a/test/evtgenlhc_test1.cc
+++ b/test/evtgenlhc_test1.cc
@@ -150,12 +150,12 @@
void runDDK( int nevent, EvtGen& myGenerator );
void runPhspDecaytimeCut( int nevent, EvtGen& myGenerator );
-int countInclusive( std::string name, EvtParticle* root, TH1F* mom = 0,
- TH1F* mass = 0 );
+int countInclusive( std::string name, EvtParticle* root, TH1F* mom = nullptr,
+ TH1F* mass = nullptr );
int countInclusiveParent( std::string name, EvtParticle* root, EvtIdSet setIds,
- TH1F* mom = 0 );
+ TH1F* mom = nullptr );
int countInclusiveSubTree( std::string name, EvtParticle* root, EvtIdSet setIds,
- TH1F* mom = 0 );
+ TH1F* mom = nullptr );
void runBaryonic( int nEvent, EvtGen& myGenerator );
void run3BPhspRegion( int nEvent, EvtGen& myGenerator );
void runFourBody( int nevent, EvtGen& myGenerator );
@@ -163,7 +163,7 @@
int main( int argc, char* argv[] )
{
// Define the random number generator
- EvtRandomEngine* myRandomEngine = 0;
+ EvtRandomEngine* myRandomEngine = nullptr;
#ifdef EVTGEN_CPP11
// Use the Mersenne-Twister generator (C++11 only)
@@ -190,7 +190,7 @@
return 1;
}
- EvtAbsRadCorr* radCorrEngine = 0;
+ EvtAbsRadCorr* radCorrEngine = nullptr;
std::list<EvtDecayBase*> extraModels;
#ifdef EVTGEN_EXTERNAL
@@ -690,7 +690,7 @@
}
}
p = p->nextIter( root_part );
- } while ( p != 0 );
+ } while ( p != nullptr );
root_part->deleteTree();
} while ( count++ < nevent );
@@ -904,7 +904,7 @@
if ( theKs.contains( type ) && theBs.contains( typePar ) )
nK++;
p = p->nextIter( theB01 );
- } while ( p != 0 );
+ } while ( p != nullptr );
if ( nD == 2 && nK == 1 )
nDDK++;
@@ -920,7 +920,7 @@
if ( theKs.contains( type ) && theBs.contains( typePar ) )
nK++;
p = p->nextIter( theB02 );
- } while ( p != 0 );
+ } while ( p != nullptr );
if ( nD == 2 && nK == 1 )
nDDK++;
@@ -1268,7 +1268,7 @@
std::vector<std::string> dList[20];
int dListNum[20];
- std::vector<std::string>* dListItem = 0;
+ std::vector<std::string>* dListItem = nullptr;
std::string dListName[20];
int ik, lk;
std::string tk = "";
@@ -1422,7 +1422,7 @@
p = p->nextIter();
- } while ( p != 0 );
+ } while ( p != nullptr );
return fs;
}
@@ -1504,7 +1504,7 @@
}
p = p->nextIter( root_part );
- } while ( p != 0 );
+ } while ( p != nullptr );
//Now need to figure out which histogram to book
trackAll->Fill( evTracks );
@@ -1643,7 +1643,7 @@
5.9 * 5.9 ),
0.0, 0.0, 5.9 );
- EvtParticle* root_part = 0;
+ EvtParticle* root_part = nullptr;
if ( neventOrig > 0 ) {
root_part = EvtParticleFactory::particleFactory( UPS4, p_init );
} else {
@@ -1748,7 +1748,7 @@
}
EvtVector4R p_init( EvtPDL::getMass( UPS4 ), 0.0, 0.0, 0.0 );
- EvtParticle* root_part = 0;
+ EvtParticle* root_part = nullptr;
if ( neventOrig > 0 ) {
root_part = EvtParticleFactory::particleFactory( UPS4, p_init );
} else {
@@ -3837,7 +3837,7 @@
p_jpsi = root_part->getDaug( 0 );
- p_rho = 0;
+ p_rho = nullptr;
if ( p_jpsi->getDaug( 0 )->getNDaug() == 2 ) {
p_rho = p_jpsi->getDaug( 0 );
@@ -3929,7 +3929,7 @@
}
if ( nDaug == 2 ) {
- if ( p->getParent() == 0 ) {
+ if ( p->getParent() == nullptr ) {
EvtVector4R p4 = p->getDaug( 0 )->getP4();
double ctheta = p4.get( 3 ) / p4.d3mag();
double phi = atan2( p4.get( 2 ), p4.get( 1 ) );
@@ -4001,7 +4001,7 @@
p = p->nextIter( root_part );
- } while ( p != 0 );
+ } while ( p != nullptr );
root_part->deleteTree();
@@ -4300,7 +4300,7 @@
<< "bId1a " << bId1a << " bId1b " << bId1b << " bId2a " << bId2a
<< " bId2b " << bId2b << " for event " << count << std::endl;
- EvtParticle* Bpeng = 0;
+ EvtParticle* Bpeng = nullptr;
//int bnum=0;
int pengcount = 0;
if ( ( ( bId1a == strangeid ) && ( bId1b == 22 ) ) ||
@@ -4515,7 +4515,7 @@
<< "bId1a " << bId1a << " bId1b " << bId1b << " bId2a " << bId2a
<< " bId2b " << bId2b << " for event " << count << std::endl;
- EvtParticle* Bpeng = 0;
+ EvtParticle* Bpeng = nullptr;
//int bnum=0;
int pengcount = 0;
if ( ( ( bId1a == strangeid ) && ( bId1b == 22 ) ) ||
@@ -4727,7 +4727,7 @@
p = p->nextIter( root_part );
- } while ( p != 0 );
+ } while ( p != nullptr );
return temp;
}
@@ -4745,7 +4745,7 @@
//p->printTree();
p = p->nextIter( root_part );
- } while ( p != 0 );
+ } while ( p != nullptr );
//EvtGenReport(EVTGEN_INFO,"EvtGen") << "done"<<std::endl;
return temp;
}
@@ -4771,7 +4771,7 @@
}
p = p->nextIter( root_part );
- } while ( p != 0 );
+ } while ( p != nullptr );
return temp;
}
@@ -4983,7 +4983,7 @@
<< std::endl;
p = p->nextIter();
- } while ( p != 0 );
+ } while ( p != nullptr );
root_part->deleteTree();
@@ -5489,7 +5489,7 @@
p = p->nextIter();
- } while ( p != 0 );
+ } while ( p != nullptr );
outmix << "event" << std::endl;
@@ -5538,7 +5538,7 @@
p = p->nextIter();
- } while ( p != 0 );
+ } while ( p != nullptr );
//root_part->printTree();
diff --git a/test/example1.cc b/test/example1.cc
--- a/test/example1.cc
+++ b/test/example1.cc
@@ -46,10 +46,10 @@
int main( int /*argc*/, char** /*argv*/ )
{
- EvtParticle* parent( 0 );
+ EvtParticle* parent( nullptr );
// Define the random number generator
- EvtRandomEngine* eng = 0;
+ EvtRandomEngine* eng = nullptr;
#ifdef EVTGEN_CPP11
// Use the Mersenne-Twister generator (C++11 only)
@@ -60,7 +60,7 @@
EvtRandom::setRandomEngine( eng );
- EvtAbsRadCorr* radCorrEngine = 0;
+ EvtAbsRadCorr* radCorrEngine = nullptr;
std::list<EvtDecayBase*> extraModels;
#ifdef EVTGEN_EXTERNAL
diff --git a/test/exampleWriteHepMC.cc b/test/exampleWriteHepMC.cc
--- a/test/exampleWriteHepMC.cc
+++ b/test/exampleWriteHepMC.cc
@@ -85,10 +85,10 @@
int main( int /*argc*/, char** /*argv*/ )
{
- EvtParticle* parent( 0 );
+ EvtParticle* parent( nullptr );
// Define the random number generator
- EvtRandomEngine* eng = 0;
+ EvtRandomEngine* eng = nullptr;
#ifdef EVTGEN_CPP11
// Use the Mersenne-Twister generator (C++11 only)
@@ -99,7 +99,7 @@
EvtRandom::setRandomEngine( eng );
- EvtAbsRadCorr* radCorrEngine = 0;
+ EvtAbsRadCorr* radCorrEngine = nullptr;
std::list<EvtDecayBase*> extraModels;
#ifdef EVTGEN_EXTERNAL
diff --git a/validation/compareRootFiles.cc b/validation/compareRootFiles.cc
--- a/validation/compareRootFiles.cc
+++ b/validation/compareRootFiles.cc
@@ -435,13 +435,13 @@
TH1D* compareRootFiles::getMtmHist( TFile* theFile, string histName,
vector<int> groupInts )
{
- if ( theFile == 0 ) {
+ if ( theFile == nullptr ) {
// Return empty histogram
return _emptyHist;
}
TTree* theTree = dynamic_cast<TTree*>( theFile->Get( "Data" ) );
- if ( theTree == 0 ) {
+ if ( theTree == nullptr ) {
// Return empty histogram
return _emptyHist;
}
@@ -481,13 +481,13 @@
// with bins along the x axis representing each group
// leptons gamma pi+- pi0 K+- K0 D+- D0 light_baryons strange_baryons other
- if ( theFile == 0 ) {
+ if ( theFile == nullptr ) {
// Return empty histogram
return _emptyHist;
}
TTree* theTree = dynamic_cast<TTree*>( theFile->Get( "Data" ) );
- if ( theTree == 0 ) {
+ if ( theTree == nullptr ) {
// Return empty histogram
return _emptyHist;
}
@@ -563,13 +563,13 @@
TH1D* compareRootFiles::getAllIdHist( TFile* theFile, string histName )
{
- if ( theFile == 0 ) {
+ if ( theFile == nullptr ) {
// Return empty histogram
return _emptyHist;
}
TTree* theTree = dynamic_cast<TTree*>( theFile->Get( "Data" ) );
- if ( theTree == 0 ) {
+ if ( theTree == nullptr ) {
// Return empty histogram
return _emptyHist;
}
@@ -598,13 +598,13 @@
TH1D* compareRootFiles::getDaugHist( TFile* theFile, string histName )
{
- if ( theFile == 0 ) {
+ if ( theFile == nullptr ) {
// Return empty histogram
return _emptyHist;
}
TTree* nDaugTree = dynamic_cast<TTree*>( theFile->Get( "nDaugTree" ) );
- if ( nDaugTree == 0 ) {
+ if ( nDaugTree == nullptr ) {
// Return empty histogram
return _emptyHist;
}
diff --git a/validation/genExampleRootFiles.cc b/validation/genExampleRootFiles.cc
--- a/validation/genExampleRootFiles.cc
+++ b/validation/genExampleRootFiles.cc
@@ -128,11 +128,11 @@
dalitzTree->Branch( "invMass13Sq", &inv13Sq, "invMass13Sq/D" );
dalitzTree->Branch( "invMass23Sq", &inv23Sq, "invMass23Sq/D" );
- EvtParticle* baseParticle( 0 );
- EvtParticle* theParent( 0 );
+ EvtParticle* baseParticle( nullptr );
+ EvtParticle* theParent( nullptr );
// Define the random number generator
- EvtRandomEngine* myRandomEngine = 0;
+ EvtRandomEngine* myRandomEngine = nullptr;
#ifdef EVTGEN_CPP11
// Use the Mersenne-Twister generator (C++11 only)
@@ -145,7 +145,7 @@
// For our validation purposes, we just want to read in one decay file and create
// plots from that.
- EvtAbsRadCorr* radCorrEngine = 0;
+ EvtAbsRadCorr* radCorrEngine = nullptr;
std::list<EvtDecayBase*> extraModels;
#ifdef EVTGEN_EXTERNAL
@@ -206,7 +206,7 @@
EvtId daugEvtId( -1, -1 );
EvtParticle* baseDaughter = baseParticle->getDaug( 0 );
- if ( baseDaughter != 0 ) {
+ if ( baseDaughter != nullptr ) {
daugEvtId = baseDaughter->getId();
}
@@ -227,7 +227,7 @@
for ( iDaug = 0; iDaug < nDaug; iDaug++ ) {
EvtParticle* daug = theParent->getDaug( iDaug );
- if ( daug != 0 ) {
+ if ( daug != nullptr ) {
EvtVector4R p4Lab = daug->getP4Lab();
EvtVector4R pos4 = daug->get4Pos();
diff --git a/validation/genRootDecayChain.cc b/validation/genRootDecayChain.cc
--- a/validation/genRootDecayChain.cc
+++ b/validation/genRootDecayChain.cc
@@ -101,10 +101,10 @@
_parentName( parentName ),
_nEvents( nEvents ),
_storeMtmXYZ( storeMtmXYZ ),
- _theFile( 0 ),
- _theTree( 0 ),
- _probHist( 0 ),
- _theCanvas( 0 )
+ _theFile( nullptr ),
+ _theTree( nullptr ),
+ _probHist( nullptr ),
+ _theCanvas( nullptr )
{
_theFile = new TFile( rootFileName.c_str(), "recreate" );
_theTree = new TTree( "Data", "Data" );
@@ -178,8 +178,8 @@
void genRootDecayChain::generateEvents()
{
- EvtRandomEngine* randomEngine = 0;
- EvtAbsRadCorr* radCorrEngine = 0;
+ EvtRandomEngine* randomEngine = nullptr;
+ EvtAbsRadCorr* radCorrEngine = nullptr;
std::list<EvtDecayBase*> extraModels;
// Define the random number generator
@@ -207,7 +207,7 @@
EvtGen evtGen( _decayFileName.c_str(), "../evt.pdl", randomEngine,
radCorrEngine, &extraModels, mixingType, useXml );
- EvtParticle* theParent( 0 );
+ EvtParticle* theParent( nullptr );
EvtId theId = EvtPDL::getId( _parentName );
if ( theId.getId() == -1 && theId.getAlias() == -1 ) {
diff --git a/validation/testCPVDecays.cc b/validation/testCPVDecays.cc
--- a/validation/testCPVDecays.cc
+++ b/validation/testCPVDecays.cc
@@ -111,7 +111,7 @@
// Define the random number generator
- EvtRandomEngine* myRandomEngine = 0;
+ EvtRandomEngine* myRandomEngine = nullptr;
#ifdef EVTGEN_CPP11
// Use the Mersenne-Twister generator (C++11 only)
@@ -120,7 +120,7 @@
myRandomEngine = new EvtSimpleRandomEngine();
#endif
- EvtAbsRadCorr* radCorrEngine = 0;
+ EvtAbsRadCorr* radCorrEngine = nullptr;
std::list<EvtDecayBase*> extraModels;
#ifdef EVTGEN_EXTERNAL
@@ -147,7 +147,7 @@
// Start all initial (parent) decays at the origin
EvtVector4R origin( 0.0, 0.0, 0.0, 0.0 );
- EvtSpinDensity* spinDensity = 0;
+ EvtSpinDensity* spinDensity = nullptr;
EvtSpinType::spintype baseSpin = EvtPDL::getSpinType( theId );
@@ -337,7 +337,7 @@
// Get the vertex
HepMC::GenVertex* theVertex = *vertexIter;
- if ( theVertex == 0 ) {
+ if ( theVertex == nullptr ) {
continue;
}
@@ -354,7 +354,7 @@
inIter != theVertex->particles_in_const_end(); ++inIter ) {
HepMC::GenParticle* inParticle = *inIter;
- if ( inParticle == 0 ) {
+ if ( inParticle == nullptr ) {
continue;
}
@@ -379,7 +379,7 @@
outIter != theVertex->particles_out_const_end(); ++outIter ) {
HepMC::GenParticle* outParticle = *outIter;
- if ( outParticle != 0 ) {
+ if ( outParticle != nullptr ) {
int outPDGId = outParticle->pdg_id();
daugIdVect.push_back( outPDGId );
}

File Metadata

Mime Type
text/plain
Expires
Mon, Sep 29, 10:22 PM (21 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6560218
Default Alt Text
D88.1759180923.diff (71 KB)

Event Timeline