R__LOAD_LIBRARY ($PLUTOLIBDIR/libPluto.so) int lambda_decays2 () { /* In this example, PFireball (treated as a "decaying particle") generates Lambdas ("decays into Lambda with BR = 100%") But Lambda has a few decay channels. We will test two cases: - ALL the decay channels are realized - we'll specify 2 decay channels only */ PFireball* source_lambda = new PFireball ( "Lambda", 1.9, 0.100, 0., 1., 0., 0., 0., 0., 0.); /* We create the manager of decays */ PDecayManager* pdm = new PDecayManager; pdm->SetVerbose (1); /* This object represents "something" decaying into Lambda with BR = 100% */ PDecayChannel* ch_FBall = new PDecayChannel; ch_FBall ->AddChannel ( 1. , "Lambda" ); /* To activate all the available decays of Lambda */ pdm->SetDefault ("Lambda"); /* Instead, to create your own decay list with your BR */ /* // This object represents "something" having 2 ways of decaying: PDecayChannel* ch_lam_decays = new PDecayChannel; ch_lam_decays->AddChannel ( 0.639, "p", "pi-" ); ch_lam_decays->AddChannel ( 0.358, "n", "pi0" ); // We use Manager to bind the said group of 2 decays with Lambda. pdm->AddChannel ("Lambda", ch_lam_decays ); */ /* We initialize the reaction: define the 1st particle and its decay(s) */ pdm->InitReaction ( source_lambda , ch_FBall ); pdm->PrintReactionList() ; pdm->loop (10000, 0, "lambda_decays", 1, 0, 0, 1, 1); return 0; }