Tauola.cxx

00001 #include <fstream>
00002 #include <cstring>
00003 #include <vector>
00004 #include "Log.h"
00005 #include "Tauola.h"
00006 #include "TauolaEvent.h"
00007 
00008 namespace Tauolapp
00009 {
00010 
00011 int    Tauola::m_pdg_id          = 15;
00012 int    Tauola::m_firstDecayMode  = 0; 
00013 int    Tauola::m_secondDecayMode = 0;
00014 bool   Tauola::m_rad             = true;
00015 double Tauola::m_rad_cut_off     = 0.001;
00016 double Tauola::m_iniphy          = 0.1;
00017 double Tauola::m_higgs_scalar_pseudoscalar_mix = M_PI/4;
00018 int    Tauola::m_higgs_scalar_pseudoscalar_pdg = 35;
00019 int    Tauola::m_helPlus  = 0;
00020 int    Tauola::m_helMinus = 0;
00021 double Tauola::m_wtEW     = 0.0;
00022 double Tauola::m_wtEW0    = 0.0;
00023 double Tauola::table11A[NS1][NCOS][4][4] = {{{{0.0}}}};
00024 double Tauola::table1A [NS1][NCOS][4][4] = {{{{0.0}}}};
00025 double Tauola::table2A [NS1][NCOS][4][4] = {{{{0.0}}}};
00026 double Tauola::wtable11A[NS1][NCOS]      = {{0.0}};
00027 double Tauola::wtable1A [NS1][NCOS]      = {{0.0}};
00028 double Tauola::wtable2A [NS1][NCOS]      = {{0.0}};
00029 double Tauola::w0table11A[NS1][NCOS]     = {{0.0}};
00030 double Tauola::w0table1A [NS1][NCOS]     = {{0.0}};
00031 double Tauola::w0table2A [NS1][NCOS]     = {{0.0}};
00032 
00033 double Tauola::table11B[NS2][NCOS][4][4] = {{{{0.0}}}};
00034 double Tauola::table1B [NS2][NCOS][4][4] = {{{{0.0}}}};
00035 double Tauola::table2B [NS2][NCOS][4][4] = {{{{0.0}}}};
00036 double Tauola::wtable11B[NS2][NCOS]      = {{0.0}};
00037 double Tauola::wtable1B [NS2][NCOS]      = {{0.0}};
00038 double Tauola::wtable2B [NS2][NCOS]      = {{0.0}};
00039 double Tauola::w0table11B[NS2][NCOS]     = {{0.0}};
00040 double Tauola::w0table1B [NS2][NCOS]     = {{0.0}};
00041 double Tauola::w0table2B [NS2][NCOS]     = {{0.0}};
00042 
00043 double Tauola::table11C[NS3][NCOS][4][4] = {{{{0.0}}}};
00044 double Tauola::table1C [NS3][NCOS][4][4] = {{{{0.0}}}};
00045 double Tauola::table2C [NS3][NCOS][4][4] = {{{{0.0}}}};
00046 double Tauola::wtable11C[NS3][NCOS]      = {{0.0}};
00047 double Tauola::wtable1C [NS3][NCOS]      = {{0.0}};
00048 double Tauola::wtable2C [NS3][NCOS]      = {{0.0}};
00049 double Tauola::w0table11C[NS3][NCOS]     = {{0.0}};
00050 double Tauola::w0table1C [NS3][NCOS]     = {{0.0}};
00051 double Tauola::w0table2C [NS3][NCOS]     = {{0.0}};
00052 
00053 double Tauola::sminA = 0;
00054 double Tauola::smaxA = 0;
00055 
00056 double Tauola::sminB = 0;
00057 double Tauola::smaxB = 0;
00058 
00059 double Tauola::sminC = 0;
00060 double Tauola::smaxC = 0;
00061 
00062 int    Tauola::ion[3] = {0};
00063 double Tauola::tau_lifetime = .08711;
00064 double Tauola::momentum_conservation_threshold   = 0.1;
00065 
00066 Tauola::Particles Tauola::spin_correlation;
00067 
00068 Tauola::MomentumUnits Tauola::momentumUnit = Tauola::DEFAULT_MOMENTUM;
00069 Tauola::LengthUnits   Tauola::lengthUnit   = Tauola::DEFAULT_LENGTH;
00070 
00071 bool   Tauola::m_is_using_decay_one        = false;
00072 double Tauola::m_decay_one_polarization[3] = {0};
00073 void (*Tauola::m_decay_one_boost_routine)(TauolaParticle*,TauolaParticle*) = NULL;
00074 
00075 int     Tauola::buf_incoming_pdg_id = 0;
00076 int     Tauola::buf_outgoing_pdg_id = 0;
00077 double  Tauola::buf_invariant_mass_squared = -1.;
00078 double  Tauola::buf_cosTheta               = 0.;
00079 
00080 double  Tauola::buf_R[4][4] = {{0.0}}; //density matrix
00081 
00082 double (*Tauola::randomDouble)()                               = Tauola::defaultRandomGenerator;
00083 void   (*Tauola::redefineTauPlusProperties)(TauolaParticle *)  = defaultRedPlus;
00084 void   (*Tauola::redefineTauMinusProperties)(TauolaParticle *) = defaultRedMinus;
00085 
00086 /**************************************************************/
00087 double Tauola::defaultRandomGenerator(){
00088   return rand()*1./RAND_MAX;
00089 }
00090 
00091 void Tauola::setRandomGenerator(double (*gen)()){
00092   if(gen==NULL) randomDouble = defaultRandomGenerator;
00093   else          randomDouble = gen;
00094 }
00095 
00096 void Tauola::defaultRedPlus(TauolaParticle *tau)  {}
00097 void Tauola::defaultRedMinus(TauolaParticle *tau) {}
00098 
00099 void Tauola::setRedefineTauMinus( void (*fun)(TauolaParticle *) ){
00100   redefineTauMinusProperties=fun;
00101 }
00102 
00103 void Tauola::setRedefineTauPlus ( void (*fun)(TauolaParticle *) ){
00104   redefineTauPlusProperties=fun;
00105 }
00106 
00107 void Tauola::getBornKinematics(int *incoming_pdg_id, int *outgoing_pdg_id, double *invariant_mass_squared,double *cosTheta){
00108   *incoming_pdg_id = buf_incoming_pdg_id;
00109   *outgoing_pdg_id = buf_outgoing_pdg_id;
00110   *invariant_mass_squared = buf_invariant_mass_squared;
00111   *cosTheta               = buf_cosTheta;
00112   //  m_R[0][0] to be added in next step;
00113 }
00114 
00115 void Tauola::setUnits(MomentumUnits m, LengthUnits l){
00116   Tauola::momentumUnit = m;
00117   Tauola::lengthUnit   = l;
00118 }
00119 
00120 void Tauola::setTauLifetime(double t){
00121   tau_lifetime = t;
00122 }
00123 
00124 void Tauola::initialize(){
00125   printf("\n");
00126   printf(" *************************************\n");
00127   printf(" *     TAUOLA C++ Interface v1.1.2   *\n");
00128   printf(" *-----------------------------------*\n");
00129   printf(" *                                   *\n");
00130   printf(" *   (c) Nadia    Davidson,   (1,2)  *\n");
00131   printf(" *       Gizo     Nanava,     (3)    *\n");
00132   printf(" *       Tomasz   Przedzinski,(4)    *\n");
00133   printf(" *       Elzbieta Richter-Was,(2,4)  *\n");
00134   printf(" *       Zbigniew Was         (2,5)  *\n");
00135   printf(" *                                   *\n");
00136   printf(" *  1) Unimelb, Melbourne, Australia *\n");
00137   printf(" *  2)     INP, Krakow, Poland       *\n");
00138   printf(" *  3) University Bonn, Germany      *\n");
00139   printf(" *  4)      UJ, Krakow, Poland       *\n");
00140   printf(" *  5)    CERN, Geneva, Switzerland  *\n");
00141   printf(" *************************************\n");
00142 
00143   // Turn on all spin correlations
00144   spin_correlation.setAll(true);
00145 
00146   // Ininitalize tauola-fortran
00147   f_interface_tauolaInitialize(m_pdg_id,m_firstDecayMode,
00148                                m_secondDecayMode,m_rad, 
00149                                m_rad_cut_off, m_iniphy);
00150 
00151   //---------------------------------------------------------------------------
00152   // Initialize SANC tables
00153   //---------------------------------------------------------------------------
00154   cout<<"Reading SANC input files."<<endl;
00155 
00156   ifstream f("table1-1.txt");
00157 
00158   if(!f.is_open()){
00159     cout<<"File 'table1-1.txt'  missing... skipped."<<endl;
00160   }
00161   else{
00162     string buf;
00163 
00164     cout<<"Reading file 'table1-1.txt'..."<<endl;
00165 
00166     int dbuf1,dbuf2,dbuf3,dbufcos;
00167     f>>buf>>dbuf1>>dbuf2>>dbuf3>>dbufcos;
00168 
00169     // Check table sizes
00170     if(dbuf1!=NS1 || dbuf2!=NS2 || dbuf3!=NS3 || dbufcos!=NCOS)  {
00171       cout<<"mismatched NS1=   "<<dbuf1  <<" <--> "<<NS1<<endl; 
00172       cout<<"           NS2=   "<<dbuf2  <<" <--> "<<NS2<<endl; 
00173       cout<<"           NS3=   "<<dbuf3  <<" <--> "<<NS3<<endl; 
00174       cout<<"           NCOS=  "<<dbufcos<<" <--> "<<NCOS<<endl; 
00175       return; 
00176     }
00177 
00178     double buf1,buf2,buf3,buf4,buf5,buf6;
00179     f>>buf>>buf1>>buf2>>buf3>>buf4>>buf5>>buf6;
00180 
00181     // Set ranges
00182     if(sminA==0.0){
00183       sminA=buf1;
00184       smaxA=buf2;
00185       sminB=buf3;
00186       smaxB=buf4;
00187       sminC=buf5;
00188       smaxC=buf6;
00189     }
00190 
00191     // Check ranges
00192     if(buf1!=sminA || buf2!=smaxA || buf3!=sminB || buf4!=smaxB || buf5!=sminC || buf6!=smaxC) {
00193       cout<<"mismatched sminA=   "<<buf1<<" <--> "<<sminA<<endl; 
00194       cout<<"           smaxA=   "<<buf2<<" <--> "<<smaxA<<endl; 
00195       cout<<"           sminB=   "<<buf3<<" <--> "<<sminB<<endl; 
00196       cout<<"           smaxB=   "<<buf4<<" <--> "<<smaxB<<endl; 
00197       cout<<"           sminC=   "<<buf5<<" <--> "<<sminC<<endl; 
00198       cout<<"           smaxC=   "<<buf6<<" <--> "<<smaxC<<endl; 
00199       return; 
00200     }
00201 
00202     // Print out header
00203     while(!f.eof()){
00204       char head[255];
00205       f.getline(head,255);
00206       if(strcmp(head,"BeginRange1")==0) break;
00207       cout<<head<<endl;
00208     }
00209 
00210     // Read table
00211     for (int i=0;i<NS1;i++){
00212       for (int j=0;j<NCOS;j++){
00213         for (int k=0;k<4;k++){
00214           for (int l=0;l<4;l++){
00215             f>>table1A[i][j][k][l];
00216           } // for(l)
00217         } // for(k)
00218         f>>wtable1A[i][j];
00219         f>>w0table1A[i][j];
00220       } // for(j)
00221     } // for(i)
00222 
00223     // Find 2nd range
00224     while(!f.eof()){
00225       f>>buf;
00226       if(strcmp(buf.c_str(),"BeginRange2")==0) break;
00227     }
00228 
00229     // Read table
00230     for (int i=0;i<NS2;i++){
00231       for (int j=0;j<NCOS;j++){
00232         for (int k=0;k<4;k++){
00233           for (int l=0;l<4;l++){
00234             f>>table1B[i][j][k][l];
00235           } // for(l)
00236         } // for(k)
00237         f>>wtable1B[i][j];
00238         f>>w0table1B[i][j];
00239       } // for(j)
00240     } // for(i)
00241 
00242     // Find 3rd range
00243     while(!f.eof()){
00244       f>>buf;
00245       if(strcmp(buf.c_str(),"BeginRange3")==0) break;
00246     }
00247 
00248     // Read table
00249     for (int i=0;i<NS3;i++){
00250       for (int j=0;j<NCOS;j++){
00251         for (int k=0;k<4;k++){
00252           for (int l=0;l<4;l++){
00253             f>>table1C[i][j][k][l];
00254           } // for(l)
00255         } // for(k)
00256         f>>wtable1C[i][j];
00257         f>>w0table1C[i][j];
00258       } // for(j)
00259     } // for(i)
00260 
00261     // Check for proper file end
00262     f>>buf;
00263     if(buf.size() == 0 || strcmp(buf.c_str(),"End") != 0){
00264       cout<<"...incorrect file version or file incomplete/damaged!"<<endl;
00265 
00266       // In case of the error - do not use tables
00267       table1A[0][0][0][0] = table1B[0][0][0][0] = table1C[0][0][0][0] = 0.0;
00268     }
00269   }  // if (file is open)
00270 
00271   f.close();
00272   f.open("table2-2.txt");
00273 
00274   if(!f.is_open()){
00275     cout<<"File 'table2-2.txt'  missing... skipped."<<endl;
00276   }
00277   else{
00278     string buf;
00279 
00280     cout<<"Reading file 'table2-2.txt'..."<<endl;
00281 
00282     int dbuf1,dbuf2,dbuf3,dbufcos;
00283     f>>buf>>dbuf1>>dbuf2>>dbuf3>>dbufcos;
00284 
00285     // Check table sizes
00286     if(dbuf1!=NS1 || dbuf2!=NS2 || dbuf3!=NS3 || dbufcos!=NCOS)  {
00287       cout<<"mismatched NS1=   "<<dbuf1<<" <--> "<<NS1<<endl; 
00288       cout<<"           NS2=   "<<dbuf2<<" <--> "<<NS2<<endl; 
00289       cout<<"           NS3=   "<<dbuf3<<" <--> "<<NS3<<endl; 
00290       cout<<"           NCOS=  "<<dbufcos<<" <--> "<<NCOS<<endl; 
00291       return; 
00292     }
00293 
00294     double buf1,buf2,buf3,buf4,buf5,buf6;
00295     f>>buf>>buf1>>buf2>>buf3>>buf4>>buf5>>buf6;
00296 
00297     // Set ranges
00298     if(sminA==0.0)
00299     {
00300       sminA=buf1;
00301       smaxA=buf2;
00302       sminB=buf3;
00303       smaxB=buf4;
00304       sminC=buf5;
00305       smaxC=buf6;
00306     }
00307 
00308     // Check ranges
00309     if(buf1!=sminA || buf2!=smaxA || buf3!=sminB || buf4!=smaxB || buf5!=sminC || buf6!=smaxC) {
00310       cout<<"mismatched sminA=   "<<buf1<<" <--> "<<sminA<<endl; 
00311       cout<<"           smaxA=   "<<buf2<<" <--> "<<smaxA<<endl; 
00312       cout<<"           sminB=   "<<buf3<<" <--> "<<sminB<<endl; 
00313       cout<<"           smaxB=   "<<buf4<<" <--> "<<smaxB<<endl; 
00314       cout<<"           sminC=   "<<buf5<<" <--> "<<sminC<<endl; 
00315       cout<<"           smaxC=   "<<buf6<<" <--> "<<smaxC<<endl; 
00316       return; 
00317     }
00318 
00319     // Print out header
00320     while(!f.eof()){
00321       char head[255];
00322       f.getline(head,255);
00323       if(strcmp(head,"BeginRange1")==0) break;
00324       cout<<head<<endl;
00325     }
00326 
00327     // Read table
00328     for (int i=0;i<NS1;i++){
00329       for (int j=0;j<NCOS;j++){
00330         for (int k=0;k<4;k++){
00331           for (int l=0;l<4;l++){
00332             f>>table2A[i][j][k][l];
00333           } // for(l)
00334         } // for(k)
00335         f>>wtable2A[i][j];
00336         f>>w0table2A[i][j];
00337       } // for(j)
00338     } // for(i)
00339 
00340     // Find 2nd range
00341     while(!f.eof()){
00342       f>>buf;
00343       if(strcmp(buf.c_str(),"BeginRange2")==0) break;
00344     }
00345 
00346     // Read table
00347     for (int i=0;i<NS2;i++){
00348       for (int j=0;j<NCOS;j++){
00349         for (int k=0;k<4;k++){
00350           for (int l=0;l<4;l++){
00351             f>>table2B[i][j][k][l];
00352           } // for(l)
00353         } // for(k)
00354         f>>wtable2B[i][j];
00355         f>>w0table2B[i][j];
00356       } // for(j)
00357     } // for(i)
00358 
00359     // Find 3rd range
00360     while(!f.eof()){
00361       f>>buf;
00362       if(strcmp(buf.c_str(),"BeginRange3")==0) break;
00363     }
00364 
00365     // Read table
00366     for (int i=0;i<NS3;i++){
00367       for (int j=0;j<NCOS;j++){
00368         for (int k=0;k<4;k++){
00369           for (int l=0;l<4;l++){
00370             f>>table2C[i][j][k][l];
00371           } // for(l)
00372         } // for(k)
00373         f>>wtable2C[i][j];
00374         f>>w0table2C[i][j];
00375       } // for(j)
00376     } // for(i)
00377 
00378     // Check for proper file end
00379     f>>buf;
00380     if(buf.size()==0 || strcmp(buf.c_str(),"End")!=0){
00381       cout<<"...incorrect file version or file incomplete/damaged!"<<endl;
00382 
00383       // In case of the error - do not use tables
00384       table2A[0][0][0][0] = table2B[0][0][0][0] = table2C[0][0][0][0] = 0.0;
00385     }
00386   } // if (file is open)
00387 
00388   f.close();
00389   f.open("table11-11.txt");
00390 
00391   if(!f.is_open()){
00392     cout<<"File 'table11-11.txt' missing... skipped."<<endl;
00393   }
00394   else{
00395     string buf;
00396 
00397     cout<<"Reading file 'table11-11.txt'..."<<endl;
00398 
00399     int dbuf1,dbuf2,dbuf3,dbufcos;
00400     f>>buf>>dbuf1>>dbuf2>>dbuf3>>dbufcos;
00401 
00402     // Check table sizes
00403     if(dbuf1!=NS1 || dbuf2!=NS2 || dbuf3!=NS3 || dbufcos!=NCOS)  {
00404       cout<<"mismatched NS1=   "<<dbuf1<<" <--> "<<NS1<<endl; 
00405       cout<<"           NS2=   "<<dbuf2<<" <--> "<<NS2<<endl; 
00406       cout<<"           NS3=   "<<dbuf3<<" <--> "<<NS3<<endl; 
00407       cout<<"           NCOS=  "<<dbufcos<<" <--> "<<NCOS<<endl; 
00408       return; 
00409     }
00410 
00411     double buf1,buf2,buf3,buf4,buf5,buf6;
00412     f>>buf>>buf1>>buf2>>buf3>>buf4>>buf5>>buf6;
00413 
00414     // Set ranges
00415     if(sminA==0.0)
00416     {
00417       sminA=buf1;
00418       smaxA=buf2;
00419       sminB=buf3;
00420       smaxB=buf4;
00421       sminC=buf5;
00422       smaxC=buf6;
00423     }
00424 
00425     // Check ranges
00426     if(buf1!=sminA || buf2!=smaxA || buf3!=sminB || buf4!=smaxB || buf5!=sminC || buf6!=smaxC) {
00427       cout<<"mismatched sminA=   "<<buf1<<" <--> "<<sminA<<endl; 
00428       cout<<"           smaxA=   "<<buf2<<" <--> "<<smaxA<<endl; 
00429       cout<<"           sminB=   "<<buf3<<" <--> "<<sminB<<endl; 
00430       cout<<"           smaxB=   "<<buf4<<" <--> "<<smaxB<<endl; 
00431       cout<<"           sminC=   "<<buf5<<" <--> "<<sminC<<endl; 
00432       cout<<"           smaxC=   "<<buf6<<" <--> "<<smaxC<<endl; 
00433       return; 
00434     }
00435 
00436     // Print out header
00437     while(!f.eof()){
00438       char head[255];
00439       f.getline(head,255);
00440       if(strcmp(head,"BeginRange1")==0) break;
00441       cout<<head<<endl;
00442     }
00443 
00444     // Read table
00445     for (int i=0;i<NS1;i++){
00446       for (int j=0;j<NCOS;j++){
00447         for (int k=0;k<4;k++){
00448           for (int l=0;l<4;l++){
00449             f>>table11A[i][j][k][l];
00450           } // for(l)
00451         } // for(k)
00452         f>>wtable11A[i][j];
00453         f>>w0table11A[i][j];
00454       } // for(j)
00455     } // for(i)
00456 
00457     // Find 2nd range
00458     while(!f.eof()){
00459       f>>buf;
00460       if(strcmp(buf.c_str(),"BeginRange2")==0) break;
00461     }
00462 
00463     // Read table
00464     for (int i=0;i<NS2;i++){
00465       for (int j=0;j<NCOS;j++){
00466         for (int k=0;k<4;k++){
00467           for (int l=0;l<4;l++){
00468             f>>table11B[i][j][k][l];
00469           } // for(l)
00470         } // for(k)
00471         f>>wtable11B[i][j];
00472         f>>w0table11B[i][j];
00473       } // for(j)
00474     } // for(i)
00475 
00476     // Find 3rd range
00477     while(!f.eof()){
00478       f>>buf;
00479       if(strcmp(buf.c_str(),"BeginRange3")==0) break;
00480     }
00481 
00482     // Read table
00483     for (int i=0;i<NS3;i++){
00484       for (int j=0;j<NCOS;j++){
00485         for (int k=0;k<4;k++){
00486           for (int l=0;l<4;l++){
00487             f>>table11C[i][j][k][l];
00488           } // for(l)
00489         } // for(k)
00490         f>>wtable11C[i][j];
00491         f>>w0table11C[i][j];
00492       } // for(j)
00493     } // for(i)
00494 
00495     f>>buf;
00496     if(buf.size()==0 || strcmp(buf.c_str(),"End")!=0){
00497       cout<<"...incorrect file version or file incomplete/damaged!"<<endl;
00498 
00499       // In case of the error - do not use tables
00500       table11A[0][0][0][0] = table11B[0][0][0][0] = table11C[0][0][0][0] = 0.0;
00501     }
00502   } // if (file is open)
00503 
00504   f.close();
00505   cout<<endl;
00506 }
00507 
00508 void Tauola::decayOne(TauolaParticle *tau, bool undecay, double polx, double poly, double polz)
00509 {
00510   if(!tau) return;
00511 
00512   if(polx*polx+poly*poly+polz*polz>1)
00513   {
00514     Log::Warning()<<"decayOne(): ignoring wrong polarization vector: "<<polx<<" "<<poly<<" "<<polz<<endl;
00515     polx=poly=polz=0;
00516   }
00517 
00518   // Let the interface know that we work in the decayOne mode
00519   m_is_using_decay_one = true;
00520 
00521   m_decay_one_polarization[0] = polx;
00522   m_decay_one_polarization[1] = poly;
00523   m_decay_one_polarization[2] = polz;
00524 
00525   // Undecay if needed
00526   if(tau->hasDaughters())
00527   {
00528     if(undecay) tau->undecay();
00529     else
00530     {
00531       m_is_using_decay_one = false;
00532       return;
00533     }
00534   }
00535 
00536   std::vector<TauolaParticle *> list;
00537   list.push_back(tau);
00538 
00539   // Decay single tau
00540   TauolaParticlePair t_pair(list);
00541   t_pair.decayTauPair();
00542   t_pair.checkMomentumConservation();
00543 
00544   // Revert to normal mode
00545   m_is_using_decay_one = false;
00546 }
00547 
00548 void Tauola::initialise(){
00549 
00550   Log::Warning() <<"Deprecated routine 'Tauola::initialise'"<<endl;
00551   Log::Warning(0)<<"Use 'Tauola::initialize' instead."<<endl;
00552 
00553   initialize();
00554   
00555   // Deprecated routines:  initialise, setInitialisePhy,
00556   //                       f_interface_tauolaInitialise
00557 }
00558 
00559 bool Tauola::isUsingDecayOne()
00560 {
00561   return m_is_using_decay_one;
00562 }
00563 
00564 bool Tauola::isUsingDecayOneBoost()
00565 {
00566   return (bool) m_decay_one_boost_routine;
00567 }
00568 
00569 void Tauola::setBoostRoutine(void (*boost)(TauolaParticle *, TauolaParticle *))
00570 {
00571   m_decay_one_boost_routine=boost;
00572 }
00573 
00574 void Tauola::decayOneBoost(TauolaParticle *mother, TauolaParticle *target)
00575 {
00576   m_decay_one_boost_routine(mother,target);
00577 }
00578 
00579 const double* Tauola::getDecayOnePolarization()
00580 {
00581   return m_decay_one_polarization;
00582 }
00583 
00584 void Tauola::setDecayingParticle(int pdg_id){
00585   m_pdg_id=pdg_id; 
00586 }
00587 
00588 int Tauola::getDecayingParticle(){
00589   return abs(m_pdg_id);
00590 }
00591 
00592 void Tauola::setSameParticleDecayMode(int firstDecayMode){
00593   m_firstDecayMode=firstDecayMode;
00594 }
00595 
00596 void Tauola::setOppositeParticleDecayMode(int secondDecayMode){
00597   m_secondDecayMode=secondDecayMode;
00598 }
00599 
00600 void Tauola::setRadiation(bool rad){
00601   m_rad=rad;
00602 }
00603 
00604 void Tauola::setRadiationCutOff(double rad_cut_off){
00605   m_rad_cut_off=rad_cut_off;
00606 }
00607 
00608 
00609 void Tauola::setInitializePhy(double iniphy){
00610   m_iniphy=iniphy;
00611 }
00612 
00613 void Tauola::setInitialisePhy(double iniphy){
00614 
00615   Log::Warning() <<"Deprecated routine 'Tauola::setInitialisePhy'"<<endl;
00616   Log::Warning(0)<<"Use 'Tauola::setInitializePhy' instead."<<endl;
00617 
00618   setInitializePhy(iniphy);
00619   
00620   // Deprecated routines:  initialise, setInitialisePhy,
00621   //                       f_interface_tauolaInitialise
00622 }
00623 
00624 void Tauola::setTauBr(int i, double value)
00625 {
00626   if(taubra_.nchan==0)
00627     Log::Warning()<<"setTauBr(): run Tauola::initialize() first."<<endl;
00628   else if(i<1 || i>taubra_.nchan || value<0.)
00629     Log::Warning()<<"setTauBr(): Invalid input. Value must be >= 0 and 0 < i <= "<<taubra_.nchan<<endl;
00630   else taubra_.gamprt[i-1]=(float)value;
00631 }
00632 
00633 void Tauola::setTaukle(double bra1,double brk0, double brk0b, double brks)
00634 {
00635   if(bra1<0 || bra1>1 || brk0<0 ||brk0>1 || brk0b<0 || brk0b>1 || brks<0 ||brks>1)
00636   {
00637     Log::Warning()<<"setTaukle(): variables must be in range [0,1]. Ignored."<<endl;
00638     return;
00639   }
00640   taukle_.bra1 =(float)bra1;
00641   taukle_.brk0 =(float)brk0;
00642   taukle_.brk0b=(float)brk0b;
00643   taukle_.brks =(float)brks;
00644 }
00645 
00646 double Tauola::getTauMass(){
00647   return f_getTauMass();
00648 }
00649 
00650 double Tauola::getHiggsScalarPseudoscalarMixingAngle(){
00651   return m_higgs_scalar_pseudoscalar_mix;
00652 }
00653 
00654 int Tauola::getHiggsScalarPseudoscalarPDG(){
00655   return m_higgs_scalar_pseudoscalar_pdg;
00656 }
00657 
00658 /** set the mixing angle. coupling: tau~(cos(phi)+isin(phi)gamma5)tau */
00659 void Tauola::setHiggsScalarPseudoscalarMixingAngle(double angle){
00660   m_higgs_scalar_pseudoscalar_mix=angle;
00661 } 
00662 
00663 /** set the pdg code of the higgs particle which tauola should 
00664     treat as a scalar-pseudoscalar mix  */
00665 void Tauola::setHiggsScalarPseudoscalarPDG(int pdg_code){
00666   m_higgs_scalar_pseudoscalar_pdg=pdg_code;
00667 } 
00668 
00669 int Tauola::getHelPlus(){
00670   return m_helPlus;
00671 }
00672 int Tauola::getHelMinus(){
00673   return m_helMinus;
00674 }
00675 double Tauola::getEWwt(){
00676   return m_wtEW;
00677 }
00678 double Tauola::getEWwt0(){
00679   return m_wtEW0;
00680 }
00681 void Tauola::setEWwt(double wt, double wt0)
00682 { 
00683   m_wtEW  = wt;
00684   m_wtEW0 = wt0;
00685 }
00686 void Tauola::setHelicities(int minus, int plus)
00687 { 
00688   m_helMinus = minus;
00689   m_helPlus  = plus;
00690 }
00691 void Tauola::setEtaK0sPi(int eta, int k, int pi)
00692 {  
00693   ion[0] = pi;
00694   ion[1] = k;
00695   ion[2] = eta;
00696 }
00697 
00698 void Tauola::summary()
00699 {
00700   int sign_type=100;
00701   double pol[4] = {0};
00702 
00703   Log::Info()     <<"Tauola::summary(): We use old TAUOLA FORTRAN printout."<<endl;
00704   Log::Info(false)<<"As a consequence, there is a mismatch in printed TAUOLA version number."<<endl<<endl;
00705 
00706   // Print summary taken from FORTRAN TAUOLA
00707   dekay_(&sign_type,pol);
00708 }
00709 
00710 } // namespace Tauolapp
Generated on Sun Oct 20 20:24:10 2013 for C++InterfacetoTauola by  doxygen 1.6.3