TPythia6Decayer.h

Go to the documentation of this file.
00001 // @(#)root/pythia6:$Id: TPythia6Decayer.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Christian Holm Christensen   22/04/06
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TPythia6Decayer
00013 #define ROOT_TPythia6Decayer
00014 
00015 ///////////////////////////////////////////////////////////////////////////////
00016 //                                                                           //
00017 // TPythia6Decayer                                                           //
00018 //                                                                           //
00019 // This implements the TVirtualMCDecayer interface.  The TPythia6            //
00020 // singleton object is used to decay particles.  Note, that since this       //
00021 // class modifies common blocks (global variables) it is defined as a        //
00022 // singleton.                                                                //
00023 //                                                                           //
00024 ///////////////////////////////////////////////////////////////////////////////
00025 
00026 #ifndef ROOT_TVirtualMCDecayer
00027 #include "TVirtualMCDecayer.h"
00028 #endif
00029 #ifndef ROOT_TString
00030 #include "TString.h"
00031 #endif
00032 #ifndef ROOT_TArrayF
00033 #include "TArrayF.h"
00034 #endif
00035 
00036 
00037 class TPythia6Decayer : public TVirtualMCDecayer {
00038 
00039 public:
00040    // enum of decay mode types
00041    enum EDecayType {
00042       kSemiElectronic,
00043       kDiElectron,
00044       kSemiMuonic,
00045       kDiMuon,
00046       kBJpsiDiMuon,
00047       kBJpsiDiElectron,
00048       kBPsiPrimeDiMuon,
00049       kBPsiPrimeDiElectron,
00050       kPiToMu,
00051       kKaToMu,
00052       kNoDecay,
00053       kHadronicD,
00054       kOmega,
00055       kPhiKK,
00056       kAll,
00057       kNoDecayHeavy,
00058       kHardMuons,
00059       kBJpsi,
00060       kWToMuon,
00061       kWToCharm,
00062       kWToCharmToMuon,
00063       kZDiMuon,
00064       kMaxDecay
00065    };
00066 
00067 protected:
00068    TString    fDecayTableFile; // File to read decay table from
00069    EDecayType fDecay;          // Forced decay mode
00070    TArrayF    fBraPart;        //! Branching ratios
00071 
00072    static TPythia6Decayer *fgInstance;
00073 
00074    // Extra functions
00075    void ForceHadronicD();
00076    void ForceOmega();
00077    Int_t CountProducts(Int_t channel, Int_t particle);
00078 
00079 public:
00080    TPythia6Decayer();
00081    virtual ~TPythia6Decayer() { }
00082    virtual void    Init();
00083    virtual void    Decay(Int_t idpart, TLorentzVector* p);
00084    virtual Int_t   ImportParticles(TClonesArray *particles);
00085    virtual void    SetForceDecay(Int_t type);
00086    virtual void    ForceDecay();
00087    void ForceParticleDecay(Int_t particle, Int_t* products,
00088                                        Int_t* mult, Int_t npart);
00089    void ForceParticleDecay(Int_t particle, Int_t product, Int_t mult);
00090    virtual Float_t GetPartialBranchingRatio(Int_t ipart);
00091    virtual Float_t GetLifetime(Int_t kf);
00092    virtual void    ReadDecayTable();
00093    // Extension member functions
00094    virtual void    SetDecayTableFile(const char* name);
00095    virtual void    WriteDecayTable();
00096    virtual void    SetForceDecay(EDecayType type) { fDecay = type; }
00097 
00098    static  TPythia6Decayer *Instance();
00099 
00100    ClassDef(TPythia6Decayer,1) // Particle Decayer Base Class
00101 };
00102 
00103 inline void TPythia6Decayer::SetDecayTableFile(const char *name)
00104 {
00105    fDecayTableFile = name;
00106 }
00107 
00108 #endif

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