Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MdcFastTrkAlg Class Reference

#include <MdcFastTrkAlg.h>

List of all members.

Public Member Functions

StatusCode beginRun ()
StatusCode beginRun ()
StatusCode execute ()
StatusCode execute ()
StatusCode finalize ()
StatusCode finalize ()
StatusCode initialize ()
StatusCode initialize ()
 MdcFastTrkAlg (const std::string &name, ISvcLocator *pSvcLocator)
 MdcFastTrkAlg (const std::string &name, ISvcLocator *pSvcLocator)

Private Attributes

FTFinderm_ftFinder
FTFinderm_ftFinder
BesTimerm_timer [NTIMERS]
BesTimerm_timer [NTIMERS]
IBesTimerSvcm_timersvc
IBesTimerSvcm_timersvc
NTuple::Tuple * m_tuple
NTuple::Tuple * m_tuple


Constructor & Destructor Documentation

MdcFastTrkAlg::MdcFastTrkAlg const std::string &  name,
ISvcLocator *  pSvcLocator
 

00064                                                                             :
00065   Algorithm(name, pSvcLocator)
00066 {
00067   // Declare the properties  
00068   m_ftFinder = 0;
00069   
00070 }

MdcFastTrkAlg::MdcFastTrkAlg const std::string &  name,
ISvcLocator *  pSvcLocator
 


Member Function Documentation

StatusCode MdcFastTrkAlg::beginRun  ) 
 

StatusCode MdcFastTrkAlg::beginRun  ) 
 

00232                                    {
00233  
00234   MsgStream log(msgSvc(), name());
00235   log << MSG::INFO << "in beginRun()" << endreq;
00236 
00237   m_ftFinder->begin_run();
00238  
00239   return StatusCode::SUCCESS;
00240 }

StatusCode MdcFastTrkAlg::execute  ) 
 

StatusCode MdcFastTrkAlg::execute  ) 
 

00184                                   {
00185 
00186   MsgStream log(msgSvc(), name());
00187   log << MSG::DEBUG << "in execute()" << endreq;
00188 
00189 #ifndef OnlineMode
00190   m_timer[1]->start();
00191 #endif
00192 
00193   m_ftFinder->event();
00194 
00195 #ifndef OnlineMode
00196   m_timer[1]->stop();
00197 
00198   //cout << "m_timer[1]->elapsed()::" << m_timer[1]->elapsed() << endl;
00199   //cout << "m_timer[1]->mean()::" << m_timer[1]->mean() << endl;
00200   g_eventtime = m_timer[1]->elapsed();
00201 
00202   if(m_tuple){     
00203     StatusCode status = m_tuple->write();
00204     if (!status.isSuccess()) {
00205       log << MSG::ERROR << "Can't fill ntuple!" << endreq;
00206     }
00207   }
00208 #endif
00209 
00210   return StatusCode::SUCCESS;
00211 }

StatusCode MdcFastTrkAlg::finalize  ) 
 

StatusCode MdcFastTrkAlg::finalize  ) 
 

00214                                    {
00215 
00216   MsgStream log(msgSvc(), name());
00217   log << MSG::INFO << "in finalize()" << endreq;
00218 
00219   m_ftFinder->term();
00220 #ifndef OnlineMode
00221   log << MSG::DEBUG <<"num_2Dtrk: " << num_2Dtrk 
00222       <<" num_3Dtrk: " << num_3Dtrk 
00223       <<" num_finaltrk: " << num_finaltrk 
00224       << endmsg;
00225   m_timersvc->print();
00226 #endif
00227 
00228   return StatusCode::SUCCESS;
00229 }

StatusCode MdcFastTrkAlg::initialize  ) 
 

StatusCode MdcFastTrkAlg::initialize  ) 
 

00073                                     {
00074 
00075   MsgStream log(msgSvc(), name());
00076   log << MSG::INFO << "in initialize()" << endreq;
00077 
00078 #ifndef OnlineMode
00079   NTuplePtr nt(ntupleSvc(),"FILE102/n1");
00080   if ( nt ) m_tuple = nt;
00081   else {
00082       m_tuple=ntupleSvc()->book("FILE102/n1",CLID_ColumnWiseTuple,"MdcRecEvent");
00083       if( m_tuple ) {
00084          m_tuple->addItem ("eventNo",  g_eventNo);
00085          m_tuple->addItem ("NtrackMC", g_ntrkMC,0,50);
00086          m_tuple->addItem ("MCtheta0", g_ntrkMC,  g_theta0MC);
00087          m_tuple->addItem ("MCphi0",   g_ntrkMC, g_phi0MC);
00088          m_tuple->addItem ("pxMC",  g_ntrkMC, g_pxMC);
00089          m_tuple->addItem ("pyMC",  g_ntrkMC, g_pyMC);
00090          m_tuple->addItem ("pzMC",  g_ntrkMC, g_pzMC);
00091          m_tuple->addItem ("ptMC",  g_ntrkMC, g_ptMC);
00092          m_tuple->addItem ("Ntrack",g_ntrk, 0, 50);
00093          m_tuple->addItem ("px",    g_ntrk, g_px);
00094          m_tuple->addItem ("py",    g_ntrk, g_py);
00095          m_tuple->addItem ("pz",    g_ntrk, g_pz);
00096          m_tuple->addItem ("pt",    g_ntrk, g_pt);
00097          m_tuple->addItem ("p",     g_ntrk, g_p);
00098          m_tuple->addItem ("phi",   g_ntrk, g_phi);
00099          m_tuple->addItem ("theta", g_ntrk, g_theta);
00100          m_tuple->addItem ("vx",    g_ntrk, g_vx);
00101          m_tuple->addItem ("vy",    g_ntrk, g_vy);
00102          m_tuple->addItem ("vz",    g_ntrk, g_vz); 
00103          m_tuple->addItem ("dr",    g_ntrk, g_dr);
00104          m_tuple->addItem ("phi0",  g_ntrk, g_phi0);
00105          m_tuple->addItem ("kappa", g_ntrk, g_kappa);
00106          m_tuple->addItem ("dz",    g_ntrk, g_dz);
00107          m_tuple->addItem ("tanl",  g_ntrk, g_tanl);
00108          m_tuple->addItem ("eventtime", g_eventtime);
00109          m_tuple->addItem ("Testime", g_estime);
00110       }
00111       else    {   // did not manage to book the N tuple....
00112          log << MSG::ERROR <<"Cannot book N-tuple:" << long(m_tuple) << endmsg;
00113          //return StatusCode::FAILURE;
00114       }
00115    }
00116 
00117    g_sigmaxy   = histoSvc()->book( "sigmaxy", "1D sigmaxy", 100, -0.2, 0.2 );
00118    g_sigmaz = histoSvc()->book( "sigmaz", "1D sigmaz", 100, -3.5, 3.5);
00119    g_chi2xy = histoSvc()->book( "chi2xy", "1D chi2xy", 100, -0.01, 0.01 );
00120    g_chi2sz = histoSvc()->book( "chi2sz", "1D chi2sz", 100, -8.0, 8. );
00121    g_ncellMC = histoSvc()->book( "ncellmc", "1D ncellMC", 100, 0.0, 7000. );
00122    g_ncell = histoSvc()->book( "ncell", "1D ncell", 100, 0.0, 7000. );
00123    g_naxialhit = histoSvc()->book( "naxialhit", "2D axial hit", 30, 0.0, 30. );
00124    g_nstereohit = histoSvc()->book( "nstereohit", "2D stereo hit", 30, 0.0, 30. );
00125    g_nhit = histoSvc()->book( "nhit", "2D hit", 50, 0.0, 50. );
00126    g_hitmap[0] = histoSvc()->book( "hm0", "2d hitmap1", 80, -80., 80., 80, -80., 80. );
00127    g_hitmap[1] = histoSvc()->book( "hm1", "2d hitmap2", 80, -80., 80., 80, -80., 80. );
00128    g_hitmap[2] = histoSvc()->book( "hm2", "2d hitmap3", 80, -80., 80., 80, -80., 80. );
00129    g_hitmap[3] = histoSvc()->book( "hm3", "2d hitmap4", 80, -80., 80., 80, -80., 80. );
00130    g_hitmap[4] = histoSvc()->book( "hm4", "2d hitmap5", 80, -80., 80., 80, -80., 80. );
00131    g_hitmap[5] = histoSvc()->book( "hm5", "2d hitmap6", 80, -80., 80., 80, -80., 80. );
00132    g_hitmap[6] = histoSvc()->book( "hm6", "2d hitmap7", 80, -80., 80., 80, -80., 80. );
00133    g_hitmap[7] = histoSvc()->book( "hm7", "2d hitmap8", 80, -80., 80., 80, -80., 80. );
00134    g_hitmap[8] = histoSvc()->book( "hm8", "2d hitmap9", 80, -80., 80., 80, -80., 80. );
00135    g_hitmap[9] = histoSvc()->book( "hm9", "2d hitmap10", 80, -80., 80., 80, -80., 80. );
00136    g_hitmap[10] = histoSvc()->book( "hm10", "2d hitmap11", 80, -80., 80., 80, -80., 80. );
00137 
00138 #endif
00139 
00140   /*NTuplePtr nth(ntupleSvc(),"FILE1/Hit/2");
00141   if ( nth ) m_htuple = nth;
00142   else {
00143       m_htuple=ntupleSvc()->book("FILE1/Hit/2",CLID_ColumnWiseTuple,"MdcRecHit");
00144       if( m_htuple ) {
00145          m_htuple->addItem ("sigmaxy", g_sigmaxy);
00146          m_htuple->addItem ("sigmaz", g_sigmaz);
00147          m_htuple->addItem ("chi2xy", g_chi2xy);
00148          m_htuple->addItem ("chi2sz", g_chi2sz);
00149          m_htuple->addItem ("ncellMC", g_ncellMC);
00150          m_htuple->addItem ("ncell", g_ncell);
00151       }
00152       else    {   // did not manage to book the N tuple....
00153          log << MSG::ERROR <<"Cannot book N-tuple:" << long(m_tuple) << endmsg;
00154          return StatusCode::FAILURE;
00155       }
00156    }*/
00157 #ifndef OnlineMode   
00158    num_2Dtrk=0;
00159    num_3Dtrk=0; 
00160    num_finaltrk=0;
00161 #endif
00162 
00163    //m_ftFinder->init();
00164    m_ftFinder = new FTFinder();
00165    m_ftFinder->init(); 
00166    m_ftFinder->setAlgorithmPointer(this);
00167 
00168 
00169 #ifndef OnlineMode
00170   StatusCode sc = service( "BesTimerSvc", m_timersvc);
00171   if( sc.isFailure() ) {
00172      log << MSG::WARNING << name() << ": Unable to locate BesTimer Service" << endreq;
00173      return StatusCode::FAILURE;
00174   }
00175 
00176   m_timer[1] = m_timersvc->addItem("Execution");
00177   m_timer[1]->propName("nExecution");
00178 #endif
00179  
00180   return StatusCode::SUCCESS;
00181 }


Member Data Documentation

FTFinder* MdcFastTrkAlg::m_ftFinder [private]
 

FTFinder* MdcFastTrkAlg::m_ftFinder [private]
 

BesTimer* MdcFastTrkAlg::m_timer[NTIMERS] [private]
 

BesTimer* MdcFastTrkAlg::m_timer[NTIMERS] [private]
 

IBesTimerSvc* MdcFastTrkAlg::m_timersvc [private]
 

IBesTimerSvc* MdcFastTrkAlg::m_timersvc [private]
 

NTuple::Tuple* MdcFastTrkAlg::m_tuple [private]
 

NTuple::Tuple* MdcFastTrkAlg::m_tuple [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:25:25 2011 for BOSS6.5.5 by  doxygen 1.3.9.1