Changeset View
Changeset View
Standalone View
Standalone View
test/evtgenlhc_test1.cc
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
void runHelAmp( int nevent, EvtGen& myGenerator, std::string userFile, | void runHelAmp( int nevent, EvtGen& myGenerator, std::string userFile, | ||||
std::string rootFile ); | std::string rootFile ); | ||||
void runHelAmp2( int nevent, EvtGen& myGenerator ); | void runHelAmp2( int nevent, EvtGen& myGenerator ); | ||||
void runJpsiKs( int nevent, EvtGen& myGenerator ); | void runJpsiKs( int nevent, EvtGen& myGenerator ); | ||||
void runDump( int nevent, EvtGen& myGenerator ); | void runDump( int nevent, EvtGen& myGenerator ); | ||||
void runD1( int nevent, EvtGen& myGenerator ); | void runD1( int nevent, EvtGen& myGenerator ); | ||||
void runGenericCont( int nevent, EvtGen& myGenerator ); | void runGenericCont( int nevent, EvtGen& myGenerator ); | ||||
void runPiPiPi( int nevent, EvtGen& myGenerator ); | void runPiPiPi( int nevent, EvtGen& myGenerator ); | ||||
void runBHadronic( int nevent, EvtGen& myGenerator ); | |||||
void runSingleB( int nevent, EvtGen& myGenerator ); | void runSingleB( int nevent, EvtGen& myGenerator ); | ||||
void runA2Pi( int nevent, EvtGen& myGenerator ); | void runA2Pi( int nevent, EvtGen& myGenerator ); | ||||
void runAlias(); | void runAlias(); | ||||
void runRepeat( int nevent ); | void runRepeat( int nevent ); | ||||
void runPhotos( int nevent, EvtGen& myGenerator ); | void runPhotos( int nevent, EvtGen& myGenerator ); | ||||
void runTrackMult( int nevent, EvtGen& myGenerator ); | void runTrackMult( int nevent, EvtGen& myGenerator ); | ||||
void runGeneric( int neventOrig, EvtGen& myGenerator, std::string listfile ); | void runGeneric( int neventOrig, EvtGen& myGenerator, std::string listfile ); | ||||
void runFinalStates( int nevent, EvtGen& myGenerator ); | void runFinalStates( int nevent, EvtGen& myGenerator ); | ||||
▲ Show 20 Lines • Show All 301 Lines • ▼ Show 20 Lines | if ( !strcmp( argv[1], "twobody" ) ) { | ||||
runTwoBody( nevent, myGenerator, argv[3], argv[4] ); | runTwoBody( nevent, myGenerator, argv[3], argv[4] ); | ||||
} | } | ||||
if ( !strcmp( argv[1], "pipipi" ) ) { | if ( !strcmp( argv[1], "pipipi" ) ) { | ||||
int nevent = atoi( argv[2] ); | int nevent = atoi( argv[2] ); | ||||
runPiPiPi( nevent, myGenerator ); | runPiPiPi( nevent, myGenerator ); | ||||
} | } | ||||
if ( !strcmp( argv[1], "bhadronic" ) ) { | |||||
int nevent = atoi( argv[2] ); | |||||
runBHadronic( nevent, myGenerator ); | |||||
} | |||||
if ( !strcmp( argv[1], "singleb" ) ) { | if ( !strcmp( argv[1], "singleb" ) ) { | ||||
int nevent = atoi( argv[2] ); | int nevent = atoi( argv[2] ); | ||||
runSingleB( nevent, myGenerator ); | runSingleB( nevent, myGenerator ); | ||||
} | } | ||||
if ( !strcmp( argv[1], "pipi" ) ) { | if ( !strcmp( argv[1], "pipi" ) ) { | ||||
int nevent = atoi( argv[2] ); | int nevent = atoi( argv[2] ); | ||||
runPiPi( nevent, myGenerator ); | runPiPi( nevent, myGenerator ); | ||||
▲ Show 20 Lines • Show All 4,511 Lines • ▼ Show 20 Lines | do { | ||||
root_part->deleteTree(); | root_part->deleteTree(); | ||||
} while ( count++ < nevent ); | } while ( count++ < nevent ); | ||||
outmix.close(); | outmix.close(); | ||||
EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "SUCCESS\n"; | EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "SUCCESS\n"; | ||||
} | } | ||||
void runBHadronic( int nevent, EvtGen& myGenerator ) | |||||
{ | |||||
std::ofstream outmix; | |||||
outmix.open( "bhadronic.dat" ); | |||||
int count; | |||||
myGenerator.readUDecay( "exampleFiles/BHADRONIC.DEC" ); | |||||
static EvtId B0 = EvtPDL::getId( std::string( "B0" ) ); | |||||
count = 1; | |||||
do { | |||||
EvtVector4R p_init( EvtPDL::getMass( B0 ), 0.0, 0.0, 0.0 ); | |||||
EvtParticle* root_part = EvtParticleFactory::particleFactory( B0, p_init ); | |||||
root_part->setDiagonalSpinDensity(); | |||||
myGenerator.generateDecay( root_part ); | |||||
EvtParticle* p; | |||||
// root_part->printTree(); | |||||
p = root_part; | |||||
do { | |||||
outmix << p->getId().getId() << " " << p->getP4Lab().d3mag() | |||||
<< std::endl; | |||||
p = p->nextIter(); | |||||
} while ( p != nullptr ); | |||||
root_part->deleteTree(); | |||||
} while ( count++ < nevent ); | |||||
outmix.close(); | |||||
EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "SUCCESS\n"; | |||||
} | |||||
void runSingleB( int nevent, EvtGen& myGenerator ) | void runSingleB( int nevent, EvtGen& myGenerator ) | ||||
{ | { | ||||
int count; | int count; | ||||
static EvtId B0 = EvtPDL::getId( std::string( "B0" ) ); | static EvtId B0 = EvtPDL::getId( std::string( "B0" ) ); | ||||
count = 1; | count = 1; | ||||
▲ Show 20 Lines • Show All 882 Lines • Show Last 20 Lines |