CDF II
CDF KITS
source navigation ]
diff markup ]
identifier search ]
freetext search ]
file search ]
 
Architecture: i386 ]
Version: 4.10.4 ] [ 4.10.5 ] [ 4.8.4 ] [ 4.8.4l3s ] [ 4.8.5 ] [ 4.9.0 ] [ 4.9.1 ] [ 4.9.1.hpt3 ] [ 4.9.1hpt3 ] [ 4.9.1top1 ] [ 5.0.0 ] [ 5.1.0 ] [ 5.1.0beamonly ] [ 5.1.1 ] [ 5.2.0 ] [ 5.3.0 ] [ 5.3.1 ] [ 5.3.1dsp ] [ 5.3.3 ] [ 5.3.3_nt ] [ 5.3.4 ] [ 6.1.1 ] [ 6.1.1b ] [ 6.1.2 ] [ 6.1.3 ] [ 6.1.4 ] [ 6.1.4int3 ] [ 6.1.4mc ] [ 6.1.4mc_a ] [ 6.1.6 ] [ development ]

001 /*************************************************************************
002 * A module to handle tau decays using TAUOLA package
003 * Created  Jul 05 2001 .. T.Moulik 
004 **************************************************************************/
005 // rev: 29 aug 2001 lena: removed HEPG output - this is done by
006 //                        GenOutputModule
007 //      30 aug 2001 lena: added ct and genId
008 //      07 dec 2001 lena: inherited AbsDeckpackModule to handle /HEPEVT/
009 //                        replaced CdfHepEvt by CdfHepevt
010 
011 #include "generatorMods/TauolaModule.hh"
012 #include "tauola_i/tauola_i.hh"
013 #include "ErrorLogger_i/gERRLOG.hh"
014 #include "ParticleDB/hepevt.hh"
015 
016 #include "stdhep_i/CdfHepevt.hh"
017 #include "SimulationObjects/HEPG_StorableBank.hh"
018 #include "Edm/Handle.hh"
019 #include "Edm/ConstHandle.hh"
020 #include "Edm/EventRecord.hh"
021 #include "r_n/CdfRn.hh"
022 
023 extern "C" {
024   void tauini_();
025   void taumain_();
026   void tauola_disable_leptonic_decays_();
027 }
028 
029 // random engine for TauolaModule is registered as "TAUOLA"
030 // instead of TauolaModule::genId
031 
032 const char* TauolaModule::genId = "TauolaModule";
033 const long TauolaModule::_defaultRandomSeed1 = 883591;
034 const long TauolaModule::_defaultRandomSeed2 = 9735476;
035 
036 TauolaModule::TauolaModule()
037   : AbsDecpackModule( TauolaModule::genId,"AC++ Tauola Interface Module")
038   , _nevprt("Display_max_taudecays",this,0)
039   , _nprt("Display_tauola_output",this,0)
040   , _jak1("decay_mode_tau+",this,0)
041   , _jak2("decay_mode_tau-",this,0)
042   , _xk0dec("infrared_cutoff",this,0.001)
043   , _itdkrc("qedcorr_switch",this,1)
044   , _tauchirality("tau_chirality",this,0,-1,1)
045   , _randomSeed1("RandomSeed1",this,TauolaModule::_defaultRandomSeed1)
046   , _randomSeed2("RandomSeed2",this,TauolaModule::_defaultRandomSeed2)
047   , _disableLeptonicDecays("disable_leptonic_decays",this,false)
048 {
049   _initializeTauolaTalkTo();
050 }
051 
052 TauolaModule::~TauolaModule() 
053 {
054 }
055 
056 AppResult TauolaModule::genBeginJob() {
057   if ( verbose() ) {
058     std::cout << " Initializing TauolaModule and TAUOLA " << std::endl; }
059 
060   InitTDCommonBlocks();
061   tauini_();
062   if (_disableLeptonicDecays.value()) tauola_disable_leptonic_decays_();
063   _absParm2Tauola();
064 
065   CdfRn* rn = CdfRn::Instance();
066   if ( !rn->isReadingFromFile() ) {
067     rn->SetEngineSeeds(_randomSeed1.value(), _randomSeed2.value(),"TAUOLA");
068   }
069 
070   return AppResult::OK;
071 }
072 
073 int TauolaModule::callGenerator(AbsEvent *anEvent) {
074 
075   CdfHepevt* hepevt = CdfHepevt::Instance(); // overkill..
076   taumain_();
077   return 1;
078 }
079 
080 AppResult TauolaModule::genEndJob() {
081   std::cout << "GOODBYE from TauolaModule " << std::endl;
082   return AppResult::OK;
083 }
084 
085 AppResult TauolaModule::genBeginRun( AbsEvent* anEvent ) {
086   return AppResult::OK;
087 }
088 
089 AppResult TauolaModule::genEndRun( AbsEvent* anEvent ) {
090   return AppResult::OK;
091 }
092 
093 
094 
095 void TauolaModule::_tauola2AbsParm() {
096     
097   // Convert Tauola common blocks to the AbsParms of TauolaModule
098     
099   _nevprt.set  (FORTRAN_tauola_i ->NEVPRT);
100   _nprt.set   (FORTRAN_tauola_i ->NPRT);
101   _tauchirality.set(FORTRAN_tauola_i->TAUCHIRALITY);
102   
103   _jak1.set   (FORTRAN_jaki ->JAK1);
104   _jak2.set   (FORTRAN_jaki ->JAK2);
105   
106   _xk0dec.set (FORTRAN_taurad ->XK0DEC);   
107   _itdkrc.set (FORTRAN_taurad ->ITDKRC);
108   
109 }
110 
111 // This routine takes the tauola-specific AbsParm values and transfers
112 // them to the Tauola COMMON blocks
113 
114 void TauolaModule::_absParm2Tauola() {
115 
116   std::cout << FORTRAN_tauola_i->NEVPRT << " - tauola par " << std::endl;
117 
118   FORTRAN_tauola_i->NEVPRT   = _nevprt.value();
119   FORTRAN_tauola_i->NPRT    = _nprt.value();
120   FORTRAN_tauola_i->TAUCHIRALITY = _tauchirality.value();
121 
122   FORTRAN_jaki->JAK1 = _jak1.value();
123   FORTRAN_jaki->JAK2 = _jak2.value();
124 
125   FORTRAN_taurad->XK0DEC = _xk0dec.value();
126   FORTRAN_taurad->ITDKRC = _itdkrc.value();
127 }
128 

source navigation ] diff markup ] identifier search ] freetext search ] file search ]

This page was automatically generated by the LXR engine.
The LXR team
Valid HTML 4.01!

Send problems or questions to cdfcode@fnal.gov