TPythia6Decayer.cxx

Go to the documentation of this file.
00001 // @(#)root/pythia6:$Id: TPythia6Decayer.cxx 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Christian Holm Christensen   22/04/06
00003 // Much of this code has been lifted from AliROOT.
00004 
00005 /*************************************************************************
00006  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
00007  * All rights reserved.                                                  *
00008  *                                                                       *
00009  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00010  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00011  *************************************************************************/
00012 
00013 ///////////////////////////////////////////////////////////////////////////////
00014 //                                                                           //
00015 // TPythia6Decayer                                                           //
00016 //                                                                           //
00017 // This implements the TVirtualMCDecayer interface.  The TPythia6            //
00018 // singleton object is used to decay particles.  Note, that since this       //
00019 // class modifies common blocks (global variables) it is defined as a        //
00020 // singleton.                                                                //
00021 //                                                                           //
00022 ///////////////////////////////////////////////////////////////////////////////
00023 
00024 #include "TPythia6.h"
00025 #include "TPythia6Decayer.h"
00026 #include "TPDGCode.h"
00027 #include "TLorentzVector.h"
00028 #include "TClonesArray.h"
00029 
00030 ClassImp(TPythia6Decayer)
00031 
00032 TPythia6Decayer* TPythia6Decayer::fgInstance = 0;
00033 
00034 //______________________________________________________________________________
00035 TPythia6Decayer* TPythia6Decayer::Instance()
00036 {
00037    // Get the singleton object.
00038    if (!fgInstance) fgInstance = new TPythia6Decayer;
00039    return fgInstance;
00040 }
00041 
00042 //______________________________________________________________________________
00043 TPythia6Decayer::TPythia6Decayer()
00044    : fBraPart(501)
00045 {
00046    // Constructor
00047    fBraPart.Reset(1);
00048 }
00049 
00050 //______________________________________________________________________________
00051 void TPythia6Decayer::Init()
00052 {
00053    // Initialize the decayer
00054    static Bool_t init = kFALSE;
00055    if (init) return;
00056    init = kTRUE;
00057    ForceDecay();
00058 }
00059 
00060 //______________________________________________________________________________
00061 void TPythia6Decayer::Decay(Int_t idpart, TLorentzVector* p)
00062 {
00063    // Decay a particle of type IDPART (PDG code) and momentum P.
00064    if (!p) return;
00065    TPythia6::Instance()->Py1ent(0, idpart, p->Energy(), p->Theta(), p->Phi());
00066    TPythia6::Instance()->GetPrimaries();
00067 }
00068 
00069 //______________________________________________________________________________
00070 Int_t TPythia6Decayer::ImportParticles(TClonesArray *particles)
00071 {
00072    // Get the decay products into the passed PARTICLES TClonesArray of
00073    // TParticles
00074    return TPythia6::Instance()->ImportParticles(particles,"All");
00075 }
00076 
00077 //______________________________________________________________________________
00078 void TPythia6Decayer::SetForceDecay(Int_t type)
00079 {
00080    // Force a particular decay type
00081    if (type > kMaxDecay) {
00082       Warning("SetForceDecay", "Invalid decay mode: %d", type);
00083       return;
00084    }
00085    fDecay = EDecayType(type);
00086 }
00087 
00088 //______________________________________________________________________________
00089 void TPythia6Decayer::ForceDecay()
00090 {
00091    // Force a particle decay mode
00092    EDecayType decay=fDecay;
00093    TPythia6::Instance()->SetMSTJ(21,2);
00094    if (decay == kNoDecayHeavy) return;
00095 
00096    //
00097    // select mode
00098    Int_t products[3];
00099    Int_t mult[3];
00100 
00101    switch (decay) {
00102    case kHardMuons:
00103       products[0] =     13;
00104       products[1] =    443;
00105       products[2] = 100443;
00106       mult[0] = 1;
00107       mult[1] = 1;
00108       mult[2] = 1;
00109       ForceParticleDecay(  511, products, mult, 3);
00110       ForceParticleDecay(  521, products, mult, 3);
00111       ForceParticleDecay(  531, products, mult, 3);
00112       ForceParticleDecay( 5122, products, mult, 3);
00113       ForceParticleDecay( 5132, products, mult, 3);
00114       ForceParticleDecay( 5232, products, mult, 3);
00115       ForceParticleDecay( 5332, products, mult, 3);
00116       ForceParticleDecay( 100443, 443, 1);  // Psi'  -> J/Psi X
00117       ForceParticleDecay(    443,  13, 2);  // J/Psi -> mu+ mu-
00118 
00119       ForceParticleDecay(  411,13,1); // D+/-
00120       ForceParticleDecay(  421,13,1); // D0
00121       ForceParticleDecay(  431,13,1); // D_s
00122       ForceParticleDecay( 4122,13,1); // Lambda_c
00123       ForceParticleDecay( 4132,13,1); // Xsi_c
00124       ForceParticleDecay( 4232,13,1); // Sigma_c
00125       ForceParticleDecay( 4332,13,1); // Omega_c
00126       break;
00127    case kSemiMuonic:
00128       ForceParticleDecay(  411,13,1); // D+/-
00129       ForceParticleDecay(  421,13,1); // D0
00130       ForceParticleDecay(  431,13,1); // D_s
00131       ForceParticleDecay( 4122,13,1); // Lambda_c
00132       ForceParticleDecay( 4132,13,1); // Xsi_c
00133       ForceParticleDecay( 4232,13,1); // Sigma_c
00134       ForceParticleDecay( 4332,13,1); // Omega_c
00135       ForceParticleDecay(  511,13,1); // B0
00136       ForceParticleDecay(  521,13,1); // B+/-
00137       ForceParticleDecay(  531,13,1); // B_s
00138       ForceParticleDecay( 5122,13,1); // Lambda_b
00139       ForceParticleDecay( 5132,13,1); // Xsi_b
00140       ForceParticleDecay( 5232,13,1); // Sigma_b
00141       ForceParticleDecay( 5332,13,1); // Omega_b
00142       break;
00143    case kDiMuon:
00144       ForceParticleDecay(  113,13,2); // rho
00145       ForceParticleDecay(  221,13,2); // eta
00146       ForceParticleDecay(  223,13,2); // omega
00147       ForceParticleDecay(  333,13,2); // phi
00148       ForceParticleDecay(  443,13,2); // J/Psi
00149       ForceParticleDecay(100443,13,2);// Psi'
00150       ForceParticleDecay(  553,13,2); // Upsilon
00151       ForceParticleDecay(100553,13,2);// Upsilon'
00152       ForceParticleDecay(200553,13,2);// Upsilon''
00153       break;
00154    case kSemiElectronic:
00155       ForceParticleDecay(  411,11,1); // D+/-
00156       ForceParticleDecay(  421,11,1); // D0
00157       ForceParticleDecay(  431,11,1); // D_s
00158       ForceParticleDecay( 4122,11,1); // Lambda_c
00159       ForceParticleDecay( 4132,11,1); // Xsi_c
00160       ForceParticleDecay( 4232,11,1); // Sigma_c
00161       ForceParticleDecay( 4332,11,1); // Omega_c
00162       ForceParticleDecay(  511,11,1); // B0
00163       ForceParticleDecay(  521,11,1); // B+/-
00164       ForceParticleDecay(  531,11,1); // B_s
00165       ForceParticleDecay( 5122,11,1); // Lambda_b
00166       ForceParticleDecay( 5132,11,1); // Xsi_b
00167       ForceParticleDecay( 5232,11,1); // Sigma_b
00168       ForceParticleDecay( 5332,11,1); // Omega_b
00169       break;
00170    case kDiElectron:
00171       ForceParticleDecay(  113,11,2); // rho
00172       ForceParticleDecay(  333,11,2); // phi
00173       ForceParticleDecay(  221,11,2); // eta
00174       ForceParticleDecay(  223,11,2); // omega
00175       ForceParticleDecay(  443,11,2); // J/Psi
00176       ForceParticleDecay(100443,11,2);// Psi'
00177       ForceParticleDecay(  553,11,2); // Upsilon
00178       ForceParticleDecay(100553,11,2);// Upsilon'
00179       ForceParticleDecay(200553,11,2);// Upsilon''
00180       break;
00181    case kBJpsiDiMuon:
00182 
00183       products[0] =    443;
00184       products[1] = 100443;
00185       mult[0] = 1;
00186       mult[1] = 1;
00187 
00188       ForceParticleDecay(  511, products, mult, 2); // B0   -> J/Psi (Psi') X
00189       ForceParticleDecay(  521, products, mult, 2); // B+/- -> J/Psi (Psi') X
00190       ForceParticleDecay(  531, products, mult, 2); // B_s  -> J/Psi (Psi') X
00191       ForceParticleDecay( 5122, products, mult, 2); // Lambda_b -> J/Psi (Psi') X
00192       ForceParticleDecay( 100443, 443, 1);          // Psi'  -> J/Psi X
00193       ForceParticleDecay(    443,13,2);             // J/Psi -> mu+ mu-
00194       break;
00195    case kBPsiPrimeDiMuon:
00196       ForceParticleDecay(  511,100443,1); // B0
00197       ForceParticleDecay(  521,100443,1); // B+/-
00198       ForceParticleDecay(  531,100443,1); // B_s
00199       ForceParticleDecay( 5122,100443,1); // Lambda_b
00200       ForceParticleDecay(100443,13,2);    // Psi'
00201       break;
00202    case kBJpsiDiElectron:
00203       ForceParticleDecay(  511,443,1); // B0
00204       ForceParticleDecay(  521,443,1); // B+/-
00205       ForceParticleDecay(  531,443,1); // B_s
00206       ForceParticleDecay( 5122,443,1); // Lambda_b
00207       ForceParticleDecay(  443,11,2);  // J/Psi
00208       break;
00209    case kBJpsi:
00210       ForceParticleDecay(  511,443,1); // B0
00211       ForceParticleDecay(  521,443,1); // B+/-
00212       ForceParticleDecay(  531,443,1); // B_s
00213       ForceParticleDecay( 5122,443,1); // Lambda_b
00214       break;
00215    case kBPsiPrimeDiElectron:
00216       ForceParticleDecay(  511,100443,1); // B0
00217       ForceParticleDecay(  521,100443,1); // B+/-
00218       ForceParticleDecay(  531,100443,1); // B_s
00219       ForceParticleDecay( 5122,100443,1); // Lambda_b
00220       ForceParticleDecay(100443,11,2);   // Psi'
00221       break;
00222    case kPiToMu:
00223       ForceParticleDecay(211,13,1); // pi->mu
00224       break;
00225    case kKaToMu:
00226       ForceParticleDecay(321,13,1); // K->mu
00227       break;
00228    case kWToMuon:
00229       ForceParticleDecay(  24, 13,1); // W -> mu
00230       break;
00231    case kWToCharm:
00232       ForceParticleDecay(   24, 4,1); // W -> c
00233       break;
00234    case kWToCharmToMuon:
00235       ForceParticleDecay(   24, 4,1); // W -> c
00236       ForceParticleDecay(  411,13,1); // D+/- -> mu
00237       ForceParticleDecay(  421,13,1); // D0  -> mu
00238       ForceParticleDecay(  431,13,1); // D_s  -> mu
00239       ForceParticleDecay( 4122,13,1); // Lambda_c
00240       ForceParticleDecay( 4132,13,1); // Xsi_c
00241       ForceParticleDecay( 4232,13,1); // Sigma_c
00242       ForceParticleDecay( 4332,13,1); // Omega_c
00243       break;
00244    case kZDiMuon:
00245       ForceParticleDecay(  23, 13,2); // Z -> mu+ mu-
00246       break;
00247    case kHadronicD:
00248       ForceHadronicD();
00249       break;
00250    case kPhiKK:
00251       ForceParticleDecay(333,321,2); // Phi->K+K-
00252       break;
00253    case kOmega:
00254       ForceOmega();
00255    case kAll:
00256       break;
00257    case kNoDecay:
00258       TPythia6::Instance()->SetMSTJ(21,0);
00259       break;
00260    case kNoDecayHeavy: break;
00261    case kMaxDecay: break;
00262    }
00263 }
00264 
00265 //______________________________________________________________________________
00266 Float_t TPythia6Decayer::GetPartialBranchingRatio(Int_t ipart)
00267 {
00268    // Get the partial branching ratio for a particle of type IPART (a
00269    // PDG code).
00270    Int_t kc = TPythia6::Instance()->Pycomp(TMath::Abs(ipart));
00271    // return TPythia6::Instance()->GetBRAT(kc);
00272    return fBraPart[kc];
00273 }
00274 
00275 //______________________________________________________________________________
00276 Float_t TPythia6Decayer::GetLifetime(Int_t kf)
00277 {
00278    // Get the life-time of a particle of type KF (a PDG code).
00279    Int_t kc=TPythia6::Instance()->Pycomp(TMath::Abs(kf));
00280    return TPythia6::Instance()->GetPMAS(kc,4) * 3.3333e-12;
00281 }
00282 
00283 //______________________________________________________________________________
00284 void TPythia6Decayer::ReadDecayTable()
00285 {
00286    // Read in particle data from an ASCII file.   The file name must
00287    // previously have been set using the member function
00288    // SetDecayTableFile.
00289    if (fDecayTableFile.IsNull()) {
00290       Warning("ReadDecayTable", "No file set");
00291       return;
00292    }
00293    Int_t lun = 15;
00294    TPythia6::Instance()->OpenFortranFile(lun,
00295                                          const_cast<char*>(fDecayTableFile.Data()));
00296    TPythia6::Instance()->Pyupda(3,lun);
00297    TPythia6::Instance()->CloseFortranFile(lun);
00298 }
00299 
00300 // ===================================================================
00301 // BEGIN COMMENT
00302 //
00303 // It would be better if the particle and decay information could be
00304 // read from the current TDatabasePDG instance.
00305 //
00306 // However, it seems to me that some information is missing.  In
00307 // particular
00308 //
00309 //   - The broadning cut-off,
00310 //   - Resonance width
00311 //   - Color charge
00312 //   - MWID (?)
00313 //
00314 // Further more, it's not clear to me at least, what all the
00315 // parameters Pythia needs are.
00316 //
00317 // Code like the below could be used to make a temporary file that
00318 // Pythia could then read in.   Ofcourse, one could also manipulate
00319 // the data structures directly, but that's propably more dangerous.
00320 //
00321 #if 0
00322 void PrintPDG(TParticlePDG* pdg)
00323 {
00324    TParticlePDG* anti = pdg->AntiParticle();
00325    const char* antiName = (anti ? anti->GetName() : "");
00326    Int_t color = 0;
00327    switch (TMath::Abs(pdg->PdgCode())) {
00328       case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: // Quarks
00329       color = 1; break;
00330       case 21: // Gluon
00331       color = 2; break;
00332       case 1103:
00333       case 2101: case 2103: case 2203:
00334       case 3101: case 3103: case 3201: case 3203: case 3303:
00335       case 4101: case 4103: case 4201: case 4203: case 4301: case 4303: case 4403:
00336       case 5101: case 5103: case 5201: case 5203: case 5301: case 5303: case 5401:
00337       case 5403: case 5503:
00338       // Quark combinations
00339       color = -1; break;
00340       case 1000001: case 1000002: case 1000003: case 1000004: case 1000005:
00341       case 1000006: // super symmetric partners to quars
00342       color = 1; break;
00343       case 1000021: // ~g
00344       color = 2; break;
00345       case 2000001: case 2000002: case 2000003: case 2000004: case 2000005:
00346       case 2000006: // R hadrons
00347       color = 1; break;
00348       case 3000331: case 3100021: case 3200111: case 3100113: case 3200113:
00349       case 3300113: case 3400113:
00350       // Technicolor
00351       color = 2; break;
00352       case 4000001: case 4000002:
00353       color = 1; break;
00354       case 9900443: case 9900441: case 9910441: case 9900553: case 9900551:
00355       case 9910551:
00356       color = 2; break;
00357    }
00358    std::cout << std::right
00359              << " " << std::setw(9) << pdg->PdgCode()
00360              << "  " << std::left   << std::setw(16) << pdg->GetName()
00361              << "  " << std::setw(16) << antiName
00362              << std::right
00363              << std::setw(3) << Int_t(pdg->Charge())
00364              << std::setw(3) << color
00365              << std::setw(3) << (anti ? 1 : 0)
00366              << std::fixed   << std::setprecision(5)
00367              << std::setw(12) << pdg->Mass()
00368              << std::setw(12) << pdg->Width()
00369              << std::setw(12) << 0 // Broad
00370              << std::scientific
00371              << " " << std::setw(13) << pdg->Lifetime()
00372              << std::setw(3) << 0 // MWID
00373              << std::setw(3) << pdg->Stable()
00374              << std::endl;
00375 }
00376 
00377 void MakeDecayList()
00378 {
00379    TDatabasePDG* pdgDB = TDatabasePDG::Instance();
00380    pdgDB->ReadPDGTable();
00381    const THashList*    pdgs  = pdgDB->ParticleList();
00382    TParticlePDG*       pdg   = 0;
00383    TIter               nextPDG(pdgs);
00384    while ((pdg = static_cast<TParticlePDG*>(nextPDG()))) {
00385       // std::cout << "Processing " << pdg->GetName() << std::endl;
00386       PrintPDG(pdg);
00387 
00388       TObjArray*     decays = pdg->DecayList();
00389       TDecayChannel* decay  = 0;
00390       TIter          nextDecay(decays);
00391       while ((decay = static_cast<TDecayChannel*>(nextDecay()))) {
00392         // std::cout << "Processing decay number " << decay->Number() << std::endl;
00393       }
00394    }
00395 }
00396 #endif
00397 // END COMMENT
00398 // ===================================================================
00399 
00400 //______________________________________________________________________________
00401 void TPythia6Decayer::WriteDecayTable()
00402 {
00403    // write particle data to an ASCII file.   The file name must
00404    // previously have been set using the member function
00405    // SetDecayTableFile.
00406    //
00407    // Users can use this function to make an initial decay list file,
00408    // which then can be edited by hand, and re-loaded into the decayer
00409    // using ReadDecayTable.
00410    //
00411    // The file syntax is
00412    //
00413    //    particle_list : partcle_data
00414    //                  | particle_list particle_data
00415    //                  ;
00416    //    particle_data : particle_info
00417    //                  | particle_info '\n' decay_list
00418    //                  ;
00419    //    particle_info : See below
00420    //                  ;
00421    //    decay_list    : decay_entry
00422    //                  | decay_list decay_entry
00423    //                  ;
00424    //    decay_entry   : See below
00425    //
00426    // The particle_info consists of 13 fields:
00427    //
00428    //     PDG code             int
00429    //     Name                 string
00430    //     Anti-particle name   string  if there's no anti-particle,
00431    //                                  then this field must be the
00432    //                                  empty string
00433    //     Electic charge       int     in units of |e|/3
00434    //     Color charge         int     in units of quark color charges
00435    //     Have anti-particle   int     1 of there's an anti-particle
00436    //                                  to this particle, or 0
00437    //                                  otherwise
00438    //     Mass                 float   in units of GeV
00439    //     Resonance width      float
00440    //     Max broadning        float
00441    //     Lifetime             float
00442    //     MWID                 int     ??? (some sort of flag)
00443    //     Decay                int     1 if it decays. 0 otherwise
00444    //
00445    // The format to write these entries in are
00446    //
00447    //    " %9  %-16s  %-16s%3d%3d%3d%12.5f%12.5f%12.5f%13.gf%3d%d\n"
00448    //
00449    // The decay_entry consists of 8 fields:
00450    //
00451    //     On/Off               int     1 for on, -1 for off
00452    //     Matrix element type  int
00453    //     Branching ratio      float
00454    //     Product 1            int     PDG code of decay product 1
00455    //     Product 2            int     PDG code of decay product 2
00456    //     Product 3            int     PDG code of decay product 3
00457    //     Product 4            int     PDG code of decay product 4
00458    //     Product 5            int     PDG code of decay product 5
00459    //
00460    // The format for these lines are
00461    //
00462    //    "          %5d%5d%12.5f%10d%10d%10d%10d%10d\n"
00463    //
00464    if (fDecayTableFile.IsNull()) {
00465       Warning("ReadDecayTable", "No file set");
00466       return;
00467    }
00468    Int_t lun = 15;
00469    TPythia6::Instance()->OpenFortranFile(lun,
00470                                          const_cast<char*>(fDecayTableFile.Data()));
00471    TPythia6::Instance()->Pyupda(1,lun);
00472    TPythia6::Instance()->CloseFortranFile(lun);
00473 }
00474 
00475 //______________________________________________________________________________
00476 Int_t TPythia6Decayer::CountProducts(Int_t channel, Int_t particle)
00477 {
00478    // Count number of decay products
00479    Int_t np = 0;
00480    for (Int_t i = 1; i <= 5; i++)
00481       if (TMath::Abs(TPythia6::Instance()->GetKFDP(channel,i)) == particle) np++;
00482    return np;
00483 }
00484 
00485 //______________________________________________________________________________
00486 void TPythia6Decayer::ForceHadronicD()
00487 {
00488    // Force golden D decay modes
00489    const Int_t kNHadrons = 4;
00490    Int_t channel;
00491    Int_t hadron[kNHadrons] = {411,  421, 431, 4112};
00492 
00493    // for D+ -> K0* (-> K- pi+) pi+
00494    Int_t iKstar0     =  313;
00495    Int_t iKstarbar0  = -313;
00496    Int_t products[2] = {kKPlus, kPiMinus}, mult[2] = {1, 1};
00497    ForceParticleDecay(iKstar0, products, mult, 2);
00498 
00499    // for Ds -> Phi pi+
00500    Int_t iPhi = 333;
00501    ForceParticleDecay(iPhi,kKPlus,2); // Phi->K+K-
00502 
00503    Int_t decayP1[kNHadrons][3] = {
00504       {kKMinus, kPiPlus,    kPiPlus},
00505       {kKMinus, kPiPlus,    0      },
00506       {kKPlus , iKstarbar0, 0     },
00507       {-1     , -1        , -1        }
00508    };
00509    Int_t decayP2[kNHadrons][3] = {
00510       {iKstarbar0, kPiPlus, 0   },
00511       {-1        , -1     , -1  },
00512       {iPhi      , kPiPlus, 0  },
00513       {-1        , -1     , -1  }
00514    };
00515 
00516    TPythia6* pyth = TPythia6::Instance();
00517    for (Int_t ihadron = 0; ihadron < kNHadrons; ihadron++) {
00518       Int_t kc = pyth->Pycomp(hadron[ihadron]);
00519       pyth->SetMDCY(kc,1,1);
00520       Int_t ifirst = pyth->GetMDCY(kc,2);
00521       Int_t ilast  = ifirst + pyth->GetMDCY(kc,3)-1;
00522 
00523       for (channel = ifirst; channel <= ilast; channel++) {
00524          if ((pyth->GetKFDP(channel,1) == decayP1[ihadron][0] &&
00525             pyth->GetKFDP(channel,2) == decayP1[ihadron][1] &&
00526             pyth->GetKFDP(channel,3) == decayP1[ihadron][2] &&
00527             pyth->GetKFDP(channel,4) == 0) ||
00528            (pyth->GetKFDP(channel,1) == decayP2[ihadron][0] &&
00529             pyth->GetKFDP(channel,2) == decayP2[ihadron][1] &&
00530             pyth->GetKFDP(channel,3) == decayP2[ihadron][2] &&
00531             pyth->GetKFDP(channel,4) == 0)) {
00532             pyth->SetMDME(channel,1,1);
00533          } else {
00534             pyth->SetMDME(channel,1,0);
00535             fBraPart[kc] -= pyth->GetBRAT(channel);
00536          } // selected channel ?
00537       } // decay channels
00538    } // hadrons
00539 }
00540 
00541 //______________________________________________________________________________
00542 void TPythia6Decayer::ForceParticleDecay(Int_t particle, Int_t product, Int_t mult)
00543 {
00544    //
00545    //  Force decay of particle into products with multiplicity mult
00546    TPythia6* pyth = TPythia6::Instance();
00547 
00548    Int_t kc =  pyth->Pycomp(particle);
00549    pyth->SetMDCY(kc,1,1);
00550 
00551    Int_t ifirst = pyth->GetMDCY(kc,2);
00552    Int_t ilast  = ifirst + pyth->GetMDCY(kc,3)-1;
00553    fBraPart[kc] = 1;
00554 
00555    //
00556    //  Loop over decay channels
00557    for (Int_t channel= ifirst; channel <= ilast; channel++) {
00558       if (CountProducts(channel,product) >= mult) {
00559          pyth->SetMDME(channel,1,1);
00560       } else {
00561          pyth->SetMDME(channel,1,0);
00562          fBraPart[kc]-=pyth->GetBRAT(channel);
00563       }
00564    }
00565 }
00566 
00567 //______________________________________________________________________________
00568 void TPythia6Decayer::ForceParticleDecay(Int_t particle, Int_t* products,
00569                                          Int_t* mult, Int_t npart)
00570 {
00571    //
00572    //  Force decay of particle into products with multiplicity mult
00573    TPythia6* pyth = TPythia6::Instance();
00574 
00575    Int_t kc     = pyth->Pycomp(particle);
00576    pyth->SetMDCY(kc,1,1);
00577    Int_t ifirst = pyth->GetMDCY(kc,2);
00578    Int_t ilast  = ifirst+pyth->GetMDCY(kc,3)-1;
00579    fBraPart[kc] = 1;
00580    //
00581    //  Loop over decay channels
00582    for (Int_t channel = ifirst; channel <= ilast; channel++) {
00583       Int_t nprod = 0;
00584       for (Int_t i = 0; i < npart; i++)
00585          nprod += (CountProducts(channel, products[i]) >= mult[i]);
00586       if (nprod)
00587          pyth->SetMDME(channel,1,1);
00588       else {
00589          pyth->SetMDME(channel,1,0);
00590          fBraPart[kc] -= pyth->GetBRAT(channel);
00591       }
00592    }
00593 }
00594 
00595 //______________________________________________________________________________
00596 void TPythia6Decayer::ForceOmega()
00597 {
00598    // Force Omega -> Lambda K- Decay
00599    TPythia6* pyth = TPythia6::Instance();
00600 
00601    Int_t kc     = pyth->Pycomp(3334);
00602    pyth->SetMDCY(kc,1,1);
00603    Int_t ifirst = pyth->GetMDCY(kc,2);
00604    Int_t ilast  = ifirst + pyth->GetMDCY(kc,3)-1;
00605    for (Int_t channel = ifirst; channel <= ilast; channel++) {
00606       if (pyth->GetKFDP(channel,1) == kLambda0 &&
00607          pyth->GetKFDP(channel,2) == kKMinus  &&
00608          pyth->GetKFDP(channel,3) == 0)
00609          pyth->SetMDME(channel,1,1);
00610       else
00611          pyth->SetMDME(channel,1,0);
00612       // selected channel ?
00613    } // decay channels
00614 }

Generated on Tue Jul 5 14:45:16 2011 for ROOT_528-00b_version by  doxygen 1.5.1