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 // File and Version Information:
003 //      QQModule.cc
004 //
005 // Description:
006 //      Class QQModule
007 //
008 //      C++ interface for CDF QQ Module
009 //
010 // Environment:
011 //      Software developed for the CDFII Detector
012 //
013 // Author List:
014 //      Marjorie Shapiro                Original Author
015 //
016 //  Revision history:
017 //  -----------------
018 // *0001 Sep 10 1998 P.Murat: remove obsolete copies between YBOS and TRYBOS
019 //                            records
020 //       Aug 29 2001 lena: remove unnesessary include;
021 //       Aug 30 2001 lena: make include in standard way; added genId and ct
022 //       oct 02 2001 lena: moved actual qq from FrameMods/GeneratorModule here.
023 //       Dec 07 2001 lena: inherited AbsDecpackModule
024 //------------------------------------------------------------------------
025 
026 //-----------------------
027 // This Class's Header --
028 //-----------------------
029 #include "generatorMods/QQModule.hh"
030 
031 //---------------
032 // C++ Headers --
033 //---------------
034 #include <iostream>
035 #include <sstream>
036 
037 //-------------------------------
038 // Collaborating Class Headers --
039 //------------------------------- 
040 #include "BaBar/Cdf.hh"
041 #include "inc/bcs.h"
042 #include "evt/evt.h"
043 #include "evt/Event.hh"
044 #include "stdhep_i/CdfHepevt.hh"
045 #include "qq_i/QQInterface.hh"
046 #include "stdhep_i/Heplun.hh"
047 #include "r_n/CdfRn.hh"
048 
049 //-----------------------------------------------------------------------
050 // Local Macros, Typedefs, Structures, Unions and Forward Declarations --
051 //-----------------------------------------------------------------------
052 
053 const char* QQModule::genId = "QQModule";
054 const long QQModule::_defaultRandomSeed1 = 9223591;
055 const long QQModule::_defaultRandomSeed2 = 109736;
056 
057 //----------------
058 // Constructors --
059 //----------------
060 
061 QQModule::QQModule()
062   : AbsDecpackModule( QQModule::genId, "AC++ QQ Module" ), 
063   _decbud("Decay_B+_and_B0", this, 1), 
064   _decbs ("Decay_Bs", this, 1),
065   _decbc ("Decay_Bc", this, 0),
066   _decbb ("Decay_Upsilon", this, 0),
067   _decbyn("Decay_B_Baryons", this,0),
068   _dechrm("Decay_prompt_charm", this,0),
069   _lowest("Decay_only_lowest", this, 0), 
070   _lnglif("Decay_K_s_Lambda", this, 0), 
071   _nolife("No_lifetime_for_input", this, 0),
072   _forceCP("force_CP"             , this, false),
073   _qqI( 0 ),
074   _randomSeed1("RandomSeed1",this,QQModule::_defaultRandomSeed1),
075   _randomSeed2("RandomSeed2",this,QQModule::_defaultRandomSeed2)
076 {
077                                         // Add parameters to list of command 
078                                         // handlers
079   commands( )->append( &_decbud );
080   commands( )->append( &_decbs  );
081   commands( )->append( &_decbc  );
082   commands( )->append( &_decbb  );
083   commands( )->append( &_decbyn );
084   commands( )->append( &_dechrm );
085   commands( )->append( &_lowest );
086   commands( )->append( &_lnglif );
087   commands( )->append( &_nolife );
088   commands( )->append( &_forceCP );
089 
090  // Initialize the relevant submenu
091   _randomNumberMenu.initialize("RandomNumberMenu",this);
092   _randomNumberMenu.initTitle("Random number menu");
093   commands()->append(&_randomNumberMenu);
094 
095   // Add the commands to the menu
096   _randomNumberMenu.commands()->append(&_randomSeed1);
097   _randomNumberMenu.commands()->append(&_randomSeed2);
098 
099   ostringstream tmpSstream1;
100   ostringstream tmpSstream2;
101 
102   // Describe them
103   tmpSstream1 << "      \t\t\tSeed #1 for the random number generator"
104               << "\n\t\t\t(default " << _randomSeed1.value() << ").";
105   _randomSeed1.addDescription(tmpSstream1.str());
106   tmpSstream2 << "      \t\t\tSeed #2 for the random number generator"
107               << "\n\t\t\t(default " << _randomSeed2.value() << ").";  
108   _randomSeed2.addDescription(tmpSstream2.str());
109 
110   
111 }
112 
113 //--------------
114 // Destructor --
115 //--------------
116 
117 QQModule::~QQModule() {
118   if (_qqI) delete _qqI;
119 }
120 
121 //--------------
122 // Operations --
123 //--------------
124 
125 AppResult QQModule::genBeginJob()
126 {
127    _qqI = new QQInterface();   
128 
129   CdfRn* rn = CdfRn::Instance();
130   if ( !rn->isReadingFromFile() ) {
131     rn->SetEngineSeeds(_randomSeed1.value(), _randomSeed2.value(),"QQModule");
132   }
133   
134   Heplun heplun;
135   if (!heplun.lnhout()) heplun.lnhout()=6; 
136 
137   // initialize QQ
138   _qqI->setDecayBud(_decbud.value());
139   _qqI->setDecayBs( _decbs.value());
140   _qqI->setDecayBc( _decbc.value());
141   _qqI->setDecayUpsilon(_decbb.value());
142   _qqI->setDecayBBaryon(_decbyn.value());
143   _qqI->setDecayPromptCharm(_dechrm.value());
144   _qqI->setDecayOnlyLowest(_lowest.value());
145   _qqI->setDecayKsLambda(_lnglif.value());
146   _qqI->setNoLifeInput(_nolife.value());
147   _qqI->setForceCP(_forceCP.value());
148   _qqI->grandInit();
149   _qqI->dumpParameters();
150   return AppResult::OK;
151 }
152 
153 AppResult QQModule::genEndJob()
154 {
155   return AppResult::OK;
156 }
157 
158 AppResult QQModule::genBeginRun( AbsEvent* anEvent )
159 {
160   return AppResult::OK;
161 }
162 
163 AppResult QQModule::genEndRun( AbsEvent* anEvent )
164 {
165   return AppResult::OK;
166 }
167 
168 int QQModule::callGenerator( AbsEvent* anEvent ) 
169 {
170   _qqI->event();
171   return 1;
172 }
173 
174 
175 
176 

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