Tauola.h

00001 #ifndef _Tauola_h_included_
00002 #define _Tauola_h_included_
00003 
00004 /** 
00005  * @class Tauola
00006  *
00007  * @brief Controls the configuration, initialization of Tauola.
00008  *
00009  * The Tauola class provides a wrapper to the TAUOLA common block
00010  * responsible for setting up TAUOLA. They should then configure Tauola
00011  * via the set method and then call initialize(). This is a static class.
00012  *
00013  * @author Nadia Davidson
00014  * @date 16th June 2008
00015  */
00016 
00017 #include <iostream>
00018 #include "TauolaParticle.h"
00019 #include "f_Init.h"
00020 #include "f_Variables.h"
00021 
00022 namespace Tauolapp
00023 {
00024 
00025 class TauolaEvent;
00026 class TauolaParticle;
00027 
00028 class Tauola{
00029 
00030  public:
00031 
00032   static const int NS1=100,NS2=100,NS3=100,NCOS=21;
00033 
00034   /** Units */
00035   static enum MomentumUnits { DEFAULT_MOMENTUM=-1, MEV, GEV } momentumUnit;
00036   static enum LengthUnits   { DEFAULT_LENGTH  =-1, MM , CM  } lengthUnit;
00037 
00038   /** Set output units (default Tauola::GEV and Tauola::MM). */
00039   static void   setUnits(MomentumUnits m,LengthUnits l);
00040 
00041   /** Set tau lifetime (in mm). */
00042   static void   setTauLifetime(double t);
00043 
00044   /** Decay Modes */
00045   enum { All=0, ElectronMode, MuonMode, PionMode,
00046          RhoMode, A1Mode, KMode, KStarMode };
00047 
00048   /** Structure for switching the computation of spin correlation.
00049       By default all spin correlations are turned on. */
00050   struct Particles
00051   {
00052      bool GAMMA,
00053           Z0,
00054           HIGGS,
00055           HIGGS_H,
00056           HIGGS_A,
00057           HIGGS_PLUS,
00058           HIGGS_MINUS,
00059           W_PLUS,
00060           W_MINUS;
00061      void setAll(bool flag) { GAMMA=Z0=HIGGS=HIGGS_H=HIGGS_A=HIGGS_PLUS=HIGGS_MINUS=W_PLUS=W_MINUS=flag; }
00062   } static spin_correlation;
00063 
00064    /** Initalize Tauola with the parameters previously set via the
00065        setter methods */
00066    static void initialize();
00067 
00068    /** DEPRECATED: Use 'initialize' instead. */
00069    static void initialise();
00070 
00071    /** Substitute build-in generator with external one */
00072    static void setRandomGenerator( double (*gen)() );
00073 
00074    static void setRedefineTauMinus( void (*fun)(TauolaParticle *) );
00075    static void setRedefineTauPlus ( void (*fun)(TauolaParticle *) );
00076 
00077    /** Tau gun. Takes one particle that's already inside an event record and produces it's decay.
00078        The tau provided may be undecayed first, or left intact if it already has daughters.
00079        If the polarization three-vector is provided it will be used to construct m_R matrix. */
00080    static void decayOne(TauolaParticle *tau, bool undecay=false, double polx=0,double poly=0, double polz=0);
00081 
00082    /** Checks if we are using decayOne() */
00083    static bool isUsingDecayOne();
00084 
00085    /** Checks if we are using boost routine for decayOne */
00086    static bool isUsingDecayOneBoost();
00087 
00088    /** Set boost routine for decayOne(). Refer to documentation for more details. */
00089    static void setBoostRoutine( void (*boost)(TauolaParticle*, TauolaParticle *) );
00090 
00091    /** Execute boost routine for decayOne() */
00092    static void decayOneBoost(TauolaParticle *mother, TauolaParticle *target);
00093 
00094    /** Return polarization vector used by decayOne() */
00095    static const double* getDecayOnePolarization();
00096 
00097    /** Set the pdg id of the particle to decay (should be 15 or -15) */
00098    static void setDecayingParticle(int pdg_id);
00099 
00100    /** Return the pdg id of the particle to decay */
00101    static int getDecayingParticle();
00102    
00103    /** Set the decay mode of all particle with pdg id the same
00104        as the one given in setDecayingParticle(). firstDecayMode=0 
00105        is default and allows all decay modes. */
00106    static void setSameParticleDecayMode(int firstDecayMode);
00107    
00108    /** Set the decay mode of all particle with opposite charge
00109        to the one given in setDecayingParticle(). secondDecayMode=0 
00110        is default and allows all decay modes. */
00111    static void setOppositeParticleDecayMode(int secondDecayMode);
00112 
00113    /** Switch for bremssthahlung in leptonic tau decays */
00114    static void setRadiation(bool rad);
00115 
00116    /** Cut-Off parameter of radition. Above that value photon is explicitly generated */
00117    static void setRadiationCutOff(double rad_cut_off);
00118 
00119    /** Initialization of some constants related to QED corrections.
00120        Variable iniphy_param is at present dummy. It is prepared to be transmitted
00121        to some old style production code and is kept for backward compatibility */
00122    static void setInitializePhy(double iniphy);
00123 
00124    /** DEPRECATED: Use 'setInitializePhy' instead. */
00125    static void setInitialisePhy(double iniphy);
00126 
00127    /** Set branching fraction for i-th channel. Can be reused several times during the run. */
00128    static void setTauBr(int i, double value);
00129 
00130    static void setTaukle(double bra1, double brk0, double brk0b, double brks);
00131 
00132    static double getHiggsScalarPseudoscalarMixingAngle();
00133 
00134    /** set the mixing angle. coupling: tau~(cos(phi)+isin(phi)gamma5)tau */
00135    static void setHiggsScalarPseudoscalarMixingAngle(double angle); 
00136 
00137    /** Get mass of the tau used by interface. */
00138    static double getTauMass();
00139 
00140    /** Modify Higgs Scalar-Pseudoscalar PDG id (default is 35). */
00141    static void setHiggsScalarPseudoscalarPDG(int pdg_id);
00142 
00143    /** Get Higgs Scalar-Pseudoscalar PDG id. */
00144    static int getHiggsScalarPseudoscalarPDG();
00145 
00146    static int getHelPlus();
00147 
00148    static int getHelMinus();
00149 
00150    static double getEWwt();
00151 
00152    static double getEWwt0();
00153 
00154    static void setEWwt(double wt, double wt0);
00155 
00156    static void setHelicities(int Minus, int Plus);
00157 
00158    static void setEtaK0sPi(int eta, int k, int pi);
00159 
00160    static void getBornKinematics(int *incoming_pdg_id, int *outgoing_pdg_id, double *invariant_mass_squared,double *cosTheta);
00161 
00162    static void summary();
00163 
00164 public:
00165 
00166    static double table11A[NS1][NCOS][4][4],table1A[NS1][NCOS][4][4],table2A[NS1][NCOS][4][4];
00167    static double wtable11A[NS1][NCOS],wtable1A[NS1][NCOS],wtable2A[NS1][NCOS];
00168    static double w0table11A[NS1][NCOS],w0table1A[NS1][NCOS],w0table2A[NS1][NCOS];
00169 
00170    static double table11B[NS2][NCOS][4][4],table1B[NS2][NCOS][4][4],table2B[NS2][NCOS][4][4];
00171    static double wtable11B[NS2][NCOS],wtable1B[NS2][NCOS],wtable2B[NS2][NCOS];
00172    static double w0table11B[NS2][NCOS],w0table1B[NS2][NCOS],w0table2B[NS2][NCOS];
00173 
00174    static double table11C[NS3][NCOS][4][4],table1C[NS3][NCOS][4][4],table2C[NS3][NCOS][4][4];
00175    static double wtable11C[NS3][NCOS],wtable1C[NS3][NCOS],wtable2C[NS3][NCOS];
00176    static double w0table11C[NS3][NCOS],w0table1C[NS3][NCOS],w0table2C[NS3][NCOS];
00177    static double sminA,smaxA,sminB,smaxB,sminC,smaxC;
00178 
00179    static int ion[3];
00180 
00181    // c*tau in milimeters, survival probablility  P(t)=exp(-t/lifetime) 
00182    static double tau_lifetime;
00183    static double momentum_conservation_threshold;
00184 
00185    //born kinematic variables
00186    static int buf_incoming_pdg_id,  buf_outgoing_pdg_id;
00187    static double  buf_invariant_mass_squared,  buf_cosTheta;
00188    static double  buf_R[4][4]; //density matrix
00189 
00190    //pointer to random generator function
00191    static double (*randomDouble)();
00192 
00193    static void (*redefineTauPlusProperties)(TauolaParticle *);
00194    static void (*redefineTauMinusProperties)(TauolaParticle *);
00195 
00196  private:
00197 
00198   /** Default generator used in Tauola */
00199   static double defaultRandomGenerator();
00200   static void   defaultRedPlus(TauolaParticle *);
00201   static void   defaultRedMinus(TauolaParticle *);
00202 
00203   /** Are we using decayOne() ? */
00204   static bool   m_is_using_decay_one;
00205   /** decayOne() polarization vector */
00206   static double m_decay_one_polarization[3];
00207   /** Boost routine used by decayOne() */
00208   static void (*m_decay_one_boost_routine)(TauolaParticle*,TauolaParticle*);
00209 
00210   static int m_pdg_id;
00211   static int m_firstDecayMode; 
00212   static int m_secondDecayMode;
00213   static bool m_rad;
00214   static double m_rad_cut_off;
00215   static double m_iniphy;
00216   static double m_higgs_scalar_pseudoscalar_mix;
00217   static int m_higgs_scalar_pseudoscalar_pdg;
00218   static double m_wtEW;
00219   static double m_wtEW0;
00220   static int m_helPlus;
00221   static int m_helMinus;
00222 };
00223 
00224 } // namespace Tauolapp
00225 #endif  
00226 
Generated on Sun Oct 20 20:24:11 2013 for C++InterfacetoTauola by  doxygen 1.6.3