CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcHoughFinder Class Reference

#include <Hough.h>

+ Inheritance diagram for MdcHoughFinder:

Public Member Functions

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

Detailed Description

Constructor & Destructor Documentation

◆ MdcHoughFinder() [1/2]

MdcHoughFinder::MdcHoughFinder ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 76 of file MdcHoughFinder/MdcHoughFinder-00-00-12/src/Hough.cxx.

76 :
77 Algorithm(name, pSvcLocator)
78{
79 // Declare the properties
80 declareProperty("debug", m_debug = 0);
81 declareProperty("debugMap", m_debugMap = 0);
82 declareProperty("debug2D", m_debug2D = 0);
83 declareProperty("debugTrack", m_debugTrack = 0);
84 declareProperty("debugPeak", m_debugPeak = 0);
85 declareProperty("debugStereo", m_debugStereo= 0);
86 declareProperty("debugZs", m_debugZs= 0);
87 declareProperty("debug3D", m_debug3D= 0);
88 declareProperty("debugArbHit", m_debugArbHit= 0);
89 declareProperty("hist", m_hist = 0);
90 declareProperty("filter", m_filter= 0);
91 //read raw data setup
92 declareProperty("keepBadTdc", m_keepBadTdc = 0);
93 declareProperty("dropHot", m_dropHot= 0);
94 declareProperty("keepUnmatch", m_keepUnmatch = 0);
95 // combine pattsf
96 declareProperty("combineTracking",m_combineTracking = false);
97 declareProperty("removeBadTrack", m_removeBadTrack = 0);
98 declareProperty("dropTrkDrCut", m_dropTrkDrCut= 1.);
99 declareProperty("dropTrkDzCut", m_dropTrkDzCut= 10.);
100 declareProperty("dropTrkPtCut", m_dropTrkPtCut= 0.12);
101 declareProperty("dropTrkChi2Cut", m_dropTrkChi2Cut = 10000.);
102 //input setup
103 declareProperty("inputType", m_inputType = 0);
104 //set MdcHoughFinder map
105 declareProperty("mapCharge", m_mapCharge= -1); //0 use whole ; 1 only half
106 declareProperty("useHalf", m_useHalf= 0); //0 use whole ; 1 only half
107 declareProperty("mapHitStyle", m_mapHit= 0); //0 : all ; 1 :axial
108 declareProperty("nbinTheta", m_nBinTheta = 100);
109 declareProperty("nbinRho", m_nBinRho = 100);
110 declareProperty("rhoRange", m_rhoRange = 0.1);
111 declareProperty("peakWidth", m_peakWidth= 3);
112 declareProperty("peakHigh", m_peakHigh= 1);
113 declareProperty("hitPro", m_hitPro= 0.4);
114
115 declareProperty("recpos", m_recpos= 1);
116 declareProperty("recneg", m_recneg= 1);
117 declareProperty("combineSelf", m_combine= 1);
118 declareProperty("z0CutCompareHough", m_z0Cut_compareHough= 10);
119
120 //split drift circle
121 declareProperty("n1", m_npart= 100);
122 declareProperty("n2", m_n2= 30);
123
124 declareProperty("d1", m_d1= 0.2);
125 declareProperty("d2", m_d2= 0.2);
126
127 declareProperty("pdtFile", m_pdtFile = "pdt.table");
128 declareProperty("eventFile", m_evtFile= "EventList");
129
130 declareProperty("cgem", m_cgem=true);
131 declareProperty("skipMDCIT", m_skipMDCIT=true);
132 declareProperty("globalfit", m_globalfit=true);
133 declareProperty("zsRecMethod", m_recMethod=1);
134 declareProperty("factor2D", m_factor2D=5.0);
135 declareProperty("factor3D", m_factor3D=5.0);
136 declareProperty("cut2D", m_cut_2D);
137 declareProperty("cut3D", m_cut_3D);
138 declareProperty("maxGapLength", m_maxGapLength=99);
139 declareProperty("nHitDeleted", m_nHitDeleted=99);
140 declareProperty("nPoint3D", m_nPoint3D=5);
141 declareProperty("nPoint2D", m_nPoint2D=5);
142 declareProperty("nRMS", m_nRMS=3);
143 declareProperty("fillMap", m_fillMap=1);
144 declareProperty("printflag", m_printflag=0);
145 //declareProperty("cgemfit", m_cgemfit=1); //0:not fit, 1:fit both 2D and 3D , 2:fit 2D only , 3:fit 3D only
146
147}

◆ MdcHoughFinder() [2/2]

MdcHoughFinder::MdcHoughFinder ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Member Function Documentation

◆ beginRun() [1/2]

StatusCode MdcHoughFinder::beginRun ( )

Definition at line 149 of file MdcHoughFinder/MdcHoughFinder-00-00-12/src/Hough.cxx.

149 {
150 //Initailize MdcDetector
152 if(NULL == Global::m_gm) return StatusCode::FAILURE;
153
154 return StatusCode::SUCCESS;
155}
static MdcDetector * instance()
Definition: MdcDetector.cxx:21

◆ beginRun() [2/2]

StatusCode MdcHoughFinder::beginRun ( )

◆ bookTuple() [1/2]

StatusCode MdcHoughFinder::bookTuple ( )

Definition at line 1727 of file MdcHoughFinder/MdcHoughFinder-00-00-12/src/Hough.cxx.

1727 {
1728 MsgStream log(msgSvc(), name());
1729
1730 NTuplePtr nt1(ntupleSvc(), "mdcHoughFinder/hit");
1731 if ( nt1 ){
1732 ntuple_hit= nt1;
1733 } else {
1734 ntuple_hit= ntupleSvc()->book("mdcHoughFinder/hit", CLID_ColumnWiseTuple, "hit");
1735 if(ntuple_hit){
1736 ntuple_hit->addItem("hit_run", m_hit_run);
1737 ntuple_hit->addItem("hit_evt", m_hit_evt);
1738 ntuple_hit->addItem("hit_nhit", m_hit_nhit, 0, 10000);
1739 ntuple_hit->addItem("hit_hitid", m_hit_nhit, m_hit_hitid);
1740 ntuple_hit->addItem("hit_layer", m_hit_nhit, m_hit_layer);
1741 ntuple_hit->addItem("hit_wire", m_hit_nhit, m_hit_wire);
1742 ntuple_hit->addItem("hit_x", m_hit_nhit, m_hit_x);
1743 ntuple_hit->addItem("hit_y", m_hit_nhit, m_hit_y);
1744 ntuple_hit->addItem("hit_z", m_hit_nhit, m_hit_z);
1745 ntuple_hit->addItem("hit_driftdist", m_hit_nhit, m_hit_driftdist);
1746 ntuple_hit->addItem("hit_drifttime", m_hit_nhit, m_hit_drifttime);
1747 ntuple_hit->addItem("hit_flag", m_hit_nhit, m_hit_flag);
1748 ntuple_hit->addItem("hit_truth_x", m_hit_nhit, m_hit_truth_x);
1749 ntuple_hit->addItem("hit_truth_y", m_hit_nhit, m_hit_truth_y);
1750 ntuple_hit->addItem("hit_truth_z", m_hit_nhit, m_hit_truth_z);
1751 ntuple_hit->addItem("hit_truth_drift", m_hit_nhit, m_hit_truth_drift);
1752 ntuple_hit->addItem("hit_truth_ambig", m_hit_nhit, m_hit_truth_ambig);
1753 } else { log << MSG::ERROR << "Cannot book tuple mdcHoughFinder/hit" <<endmsg;
1754 return StatusCode::FAILURE;
1755 }
1756 }
1757
1758 NTuplePtr nt2(ntupleSvc(), "mdcHoughFinder/hot");
1759 if ( nt2 ){
1760 ntuple_hot = nt2;
1761 } else {
1762 ntuple_hot = ntupleSvc()->book("mdcHoughFinder/hot", CLID_ColumnWiseTuple, "hot");
1763 if(ntuple_hot){
1764 ntuple_hot->addItem("hot_run", m_hot_run);
1765 ntuple_hot->addItem("hot_evt", m_hot_evt);
1766 ntuple_hot->addItem("hot_trk", m_hot_trk);
1767 ntuple_hot->addItem("hot_nhot", m_hot_nhot, 0, 1000 );
1768 ntuple_hot->addItem("hot_hitid", m_hot_nhot, m_hot_hitid);
1769 ntuple_hot->addItem("hot_layer", m_hot_nhot, m_hot_layer);
1770 ntuple_hot->addItem("hot_wire", m_hot_nhot, m_hot_wire);
1771 ntuple_hot->addItem("hot_x", m_hot_nhot, m_hot_x);
1772 ntuple_hot->addItem("hot_y", m_hot_nhot, m_hot_y);
1773 ntuple_hot->addItem("hot_z", m_hot_nhot, m_hot_z);
1774 ntuple_hot->addItem("hot_x0", m_hot_nhot, m_hot_x0);
1775 ntuple_hot->addItem("hot_y0", m_hot_nhot, m_hot_y0);
1776 ntuple_hot->addItem("hot_z0", m_hot_nhot, m_hot_z0);
1777 ntuple_hot->addItem("hot_s0", m_hot_nhot, m_hot_s0);
1778 ntuple_hot->addItem("hot_x1", m_hot_nhot, m_hot_x1);
1779 ntuple_hot->addItem("hot_y1", m_hot_nhot, m_hot_y1);
1780 ntuple_hot->addItem("hot_z1", m_hot_nhot, m_hot_z1);
1781 ntuple_hot->addItem("hot_s1", m_hot_nhot, m_hot_s1);
1782 ntuple_hot->addItem("hot_drift", m_hot_nhot, m_hot_drift);
1783 ntuple_hot->addItem("hot_flag", m_hot_nhot, m_hot_flag);
1784 ntuple_hot->addItem("hot_deltaD", m_hot_nhot, m_hot_deltaD);
1785 ntuple_hot->addItem("hot_truth_x", m_hot_nhot, m_hot_truth_x);
1786 ntuple_hot->addItem("hot_truth_y", m_hot_nhot, m_hot_truth_y);
1787 ntuple_hot->addItem("hot_truth_z", m_hot_nhot, m_hot_truth_z);
1788 ntuple_hot->addItem("hot_truth_drift", m_hot_nhot, m_hot_truth_drift);
1789 ntuple_hot->addItem("hot_truth_ambig", m_hot_nhot, m_hot_truth_ambig);
1790
1791 } else { log << MSG::ERROR << "Cannot book tuple mdcHoughFinder/hot" <<endmsg;
1792 return StatusCode::FAILURE;
1793 }
1794 }
1795
1796 NTuplePtr nt3(ntupleSvc(), "mdcHoughFinder/trk");
1797 if ( nt3 ){
1798 ntuple_trk = nt3;
1799 } else {
1800 ntuple_trk = ntupleSvc()->book("mdcHoughFinder/trk", CLID_ColumnWiseTuple, "trk");
1801 if(ntuple_trk){
1802 ntuple_trk->addItem("trk_run", m_trk_run);
1803 ntuple_trk->addItem("trk_evt", m_trk_evt);
1804 ntuple_trk->addItem("trk_ntrk", m_trk_ntrk);
1805 ntuple_trk->addItem("trk_size", m_trk_size, 0, 100);
1806 ntuple_trk->addItem("trk_trackId", m_trk_size, m_trk_trackId);
1807 ntuple_trk->addItem("trk_charge", m_trk_size, m_trk_charge);
1808 ntuple_trk->addItem("trk_dr", m_trk_size, m_trk_dr);
1809 ntuple_trk->addItem("trk_phi0", m_trk_size, m_trk_phi0);
1810 ntuple_trk->addItem("trk_kappa", m_trk_size, m_trk_kappa);
1811 ntuple_trk->addItem("trk_dz", m_trk_size, m_trk_dz);
1812 ntuple_trk->addItem("trk_tanl", m_trk_size, m_trk_tanl);
1813 ntuple_trk->addItem("trk_pxy", m_trk_size, m_trk_pxy);
1814 ntuple_trk->addItem("trk_px", m_trk_size, m_trk_px);
1815 ntuple_trk->addItem("trk_py", m_trk_size, m_trk_py);
1816 ntuple_trk->addItem("trk_pz", m_trk_size, m_trk_pz);
1817 ntuple_trk->addItem("trk_p", m_trk_size, m_trk_p);
1818 ntuple_trk->addItem("trk_theta", m_trk_size, m_trk_theta);
1819 ntuple_trk->addItem("trk_phi", m_trk_size, m_trk_phi);
1820 ntuple_trk->addItem("trk_x", m_trk_size, m_trk_x);
1821 ntuple_trk->addItem("trk_y", m_trk_size, m_trk_y);
1822 ntuple_trk->addItem("trk_z", m_trk_size, m_trk_z);
1823 ntuple_trk->addItem("trk_r", m_trk_size, m_trk_r);
1824 ntuple_trk->addItem("trk_chi2", m_trk_size, m_trk_chi2);
1825 ntuple_trk->addItem("trk_fiTerm", m_trk_size, m_trk_fiTerm);
1826 ntuple_trk->addItem("trk_matchChi2", m_trk_size, m_trk_matchChi2);
1827 ntuple_trk->addItem("trk_nhit", m_trk_size, m_trk_nhit);
1828 ntuple_trk->addItem("trk_ncluster", m_trk_size, m_trk_ncluster);
1829 ntuple_trk->addItem("trk_stat", m_trk_size, m_trk_stat);
1830 ntuple_trk->addItem("trk_ndof", m_trk_size, m_trk_ndof);
1831 ntuple_trk->addItem("trk_nster", m_trk_size, m_trk_nster);
1832 ntuple_trk->addItem("trk_nlayer", m_trk_size, m_trk_nlayer);
1833 ntuple_trk->addItem("trk_firstLayer", m_trk_size, m_trk_firstLayer);
1834 ntuple_trk->addItem("trk_lastLayer", m_trk_size, m_trk_lastLayer);
1835 ntuple_trk->addItem("trk_nCgemXClusters", m_trk_size, m_trk_nCgemXClusters);
1836 ntuple_trk->addItem("trk_nCgemVClusters", m_trk_size, m_trk_nCgemVClusters);
1837 ntuple_trk->addItem("trk_nhop", m_trk_size, m_trk_nhop);
1838 ntuple_trk->addItem("trk_nhot", m_trk_size, m_trk_nhot);
1839 ntuple_trk->addItem("trk_Xc", m_trk_size, m_trk_Xc);
1840 ntuple_trk->addItem("trk_Yc", m_trk_size, m_trk_Yc);
1841 ntuple_trk->addItem("trk_R", m_trk_size, m_trk_R);
1842
1843 ntuple_trk->addItem("trk_truth_charge", m_trk_size, m_trk_truth_charge);
1844 ntuple_trk->addItem("trk_truth_dr", m_trk_size, m_trk_truth_dr);
1845 ntuple_trk->addItem("trk_truth_phi0", m_trk_size, m_trk_truth_phi0);
1846 ntuple_trk->addItem("trk_truth_kappa", m_trk_size, m_trk_truth_kappa);
1847 ntuple_trk->addItem("trk_truth_dz", m_trk_size, m_trk_truth_dz);
1848 ntuple_trk->addItem("trk_truth_tanl", m_trk_size, m_trk_truth_tanl);
1849 ntuple_trk->addItem("trk_truth_pxy", m_trk_size, m_trk_truth_pxy);
1850 ntuple_trk->addItem("trk_truth_px", m_trk_size, m_trk_truth_px);
1851 ntuple_trk->addItem("trk_truth_py", m_trk_size, m_trk_truth_py);
1852 ntuple_trk->addItem("trk_truth_pz", m_trk_size, m_trk_truth_pz);
1853 ntuple_trk->addItem("trk_truth_p", m_trk_size, m_trk_truth_p);
1854 ntuple_trk->addItem("trk_truth_theta", m_trk_size, m_trk_truth_theta);
1855 ntuple_trk->addItem("trk_truth_phi", m_trk_size, m_trk_truth_phi);
1856 ntuple_trk->addItem("trk_truth_x", m_trk_size, m_trk_truth_x);
1857 ntuple_trk->addItem("trk_truth_y", m_trk_size, m_trk_truth_y);
1858 ntuple_trk->addItem("trk_truth_z", m_trk_size, m_trk_truth_z);
1859 ntuple_trk->addItem("trk_truth_r", m_trk_size, m_trk_truth_r);
1860 ntuple_trk->addItem("trk_truth_cosTheta", m_trk_size, m_trk_truth_cosTheta);
1861 ntuple_trk->addItem("trk_truth_Xc", m_trk_size, m_trk_truth_Xc);
1862 ntuple_trk->addItem("trk_truth_Yc", m_trk_size, m_trk_truth_Yc);
1863 ntuple_trk->addItem("trk_truth_R", m_trk_size, m_trk_truth_R);
1864
1865 } else { log << MSG::ERROR << "Cannot book tuple mdcHoughFinder/trk" <<endmsg;
1866 return StatusCode::FAILURE;
1867 }
1868 }
1869 return StatusCode::SUCCESS;
1870}

Referenced by initialize().

◆ bookTuple() [2/2]

StatusCode MdcHoughFinder::bookTuple ( )

◆ execute() [1/2]

StatusCode MdcHoughFinder::execute ( )

Definition at line 307 of file MdcHoughFinder/MdcHoughFinder-00-00-12/src/Hough.cxx.

307 {
308
309 MsgStream log(msgSvc(), name());
310 log << MSG::INFO << "in execute()" << endreq;
311 cout.precision(6);
312
313
314 m_timer_all->start();
315
316 //event start time
317 SmartDataPtr<RecEsTimeCol> evTimeCol(eventSvc(),"/Event/Recon/RecEsTimeCol");
318 if (!evTimeCol) {
319 //log << MSG::WARNING<< "Could not retrieve RecEsTimeCol , use t0=0" << endreq;
320 //m_bunchT0=0.;
321 log << MSG::WARNING<< "Could not retrieve RecEsTimeCol" << endreq;
322 return StatusCode::SUCCESS;
323 }else{
324 RecEsTimeCol::iterator iter_evt = evTimeCol->begin();
325 if (iter_evt != evTimeCol->end()){
326 m_bunchT0 = (*iter_evt)->getTest()*1.e-9;//m_bunchT0-s, getTest-ns
327 }
328 }
329 HoughHit::setBunchTime(m_bunchT0);
330
331 //-- Get the event header, print out event and run number
332 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
333 if (!eventHeader) {
334 log << MSG::FATAL << "Could not find Event Header" << endreq;
335 return StatusCode::FAILURE;
336 }
337
338 //-- Get CGEM cluster
339 SmartDataPtr<RecCgemClusterCol> recCgemClusterCol(eventSvc(), "/Event/Recon/RecCgemClusterCol");
340 if(m_cgem){
341 if (!recCgemClusterCol){
342 log << MSG::WARNING << "Could not retrieve Cgem cluster list" << endreq;
343 return StatusCode::FAILURE;
344 }
345 }
346
347 m_event=eventHeader->eventNumber();
348 m_run=eventHeader->runNumber();
349 if(m_debug>0) cout<<"begin evt "<<eventHeader->eventNumber()<<endl;
350 if(m_event%1000==0) cout << " run No: "<< m_run << " event No: " << m_event << endl;
351
352 //prepare tds
353 RecMdcTrackCol* trackList_tds;
354 RecMdcHitCol* hitList_tds;
355 vector<RecMdcTrack*> vec_trackPatTds;
356 int nTdsTk = storeTracks(trackList_tds,hitList_tds,vec_trackPatTds);
357 //print track in pattsf with bad vertex
358 if(m_debug>0){
359 RecMdcTrackCol::iterator iteritrk_pattsf = vec_trackPatTds.begin();
360 for(;iteritrk_pattsf!=vec_trackPatTds.end();iteritrk_pattsf++){
361 cout<<"in PATTSF LOST: "<<(*iteritrk_pattsf)->helix(0)<<" "<<(*iteritrk_pattsf)->helix(1)<<" "<<(*iteritrk_pattsf)->helix(2)<<" "<<(*iteritrk_pattsf)->helix(3)<<" "<<(*iteritrk_pattsf)->helix(4)<<" chi2 "<<(*iteritrk_pattsf)->chi2()<<endl;
362 }
363 }
364
365 //for arbi hits
366 MdcTrackParams m_par;
367 if(m_debugArbHit>0 ) m_par.lPrint=8;
368 m_par.lRemoveInActive=1;
369 //m_par.lUseQualCuts=0;
370 m_par.maxGapLength=m_maxGapLength;
371 m_par.nHitDeleted=m_nHitDeleted;
372 //m_par.maxChisq=99;
373 //m_par.minHits=99;
374
375 // if filter read eventNum in file
376 if(m_filter){
377 ifstream lowPt_Evt;
378 lowPt_Evt.open(m_evtFile.c_str());
379 vector<int> evtlist;
380 int evtNum;
381 while( lowPt_Evt >> evtNum) {
382 evtlist.push_back(evtNum);
383 }
384 vector<int>::iterator iter_evt = find(evtlist.begin(),evtlist.end(),m_event);
385 if( iter_evt == evtlist.end() ) { setFilterPassed(false); return StatusCode::SUCCESS; }
386 else setFilterPassed(true);
387 }
388 //m_printflag = 0;
389 if(m_printflag==1)cout<<"Begin Event ============================================================================================================== "<<eventHeader->eventNumber()<<endl;
390
391 if(m_inputType == -1) GetMcInfo();
392
393 //-- Get MDC digi vector
394 if(m_debug>0) cout<<"step1 : prepare digi "<<endl;
395 MdcDigiVec mdcDigiVec = prepareDigi();
396
397 //-- Create MdcHoughFinder hit list
398 bool debugTruth = false;
399 if(m_inputType == -1) debugTruth= true;
400 if(m_debug>0) cout<<"step2 : hits-> hough hit list "<<endl;
401 HoughHitList houghHitList(mdcDigiVec);
402 if(m_cgem) houghHitList.addCgemClusterList(recCgemClusterCol); // add CGEM cluster
403 //houghHitList.print();
404 //if(m_cgem) houghHitList.addCgemClusterList(); // add CGEM cluster
405 // if( mdcDigiVec.size() < 10 ) return StatusCode::SUCCESS;
406 if( houghHitList.nHit() < 10 || houghHitList.nHit()>500 ) return StatusCode::SUCCESS;
407 if(debugTruth) houghHitList.addTruthInfo(g_tkParTruth);
408 if(m_hist) dumpHoughHitList(houghHitList);
409 if(m_debug>0) houghHitList.printAll();
410
411 vector<MdcHit*> mdcHitCol_neg;
412 vector<MdcHit*> mdcHitCol_pos;
413 MdcDigiVec::iterator iter = mdcDigiVec.begin();
414 for (;iter != mdcDigiVec.end(); iter++) {
415 const MdcDigi* digi = (*iter);
416 if( HoughHit(digi).driftTime()>1000 || HoughHit(digi).driftTime()<=0 ) continue;
417 MdcHit *mdcHit= new MdcHit(digi, Global::m_gm);
418 MdcHit *mdcHit_pos= new MdcHit(digi, Global::m_gm);
419 mdcHitCol_neg.push_back(mdcHit);
420 mdcHitCol_pos.push_back(mdcHit_pos);
421 }
422
423 HoughMap *m_map = new HoughMap(-1,houghHitList,m_mapHit,m_nBinTheta,m_nBinRho,-1.*m_rhoRange,m_rhoRange,m_peakWidth,m_peakHigh,m_hitPro);//, 2dOr3d);
424
425 //m_map->printPeak();
426 //m_map->printTrack();
427 //if(m_hist) m_nHit = houghHitList.nHit();
428 //if(m_hist) dumpHoughMap(*m_map);
429
430 //track
431 if(m_debug>0) cout<<"step3 : neg track list "<<endl;
432 vector<HoughTrack*> vec_track_neg;
433 vector<HoughTrack*> vec_track2D_neg;
434 MdcTrackList mdcTrackList_neg(m_par) ;
435 if(m_recneg){
436 HoughTrackList trackList_neg(*m_map);
437 int trackList_size = trackList_neg.getTrackNum();
438 vector< vector<int> > stat_2d(2,vector<int>(trackList_size,0) );
439 vector< vector<int> > stat_3d(2,vector<int>(trackList_size,0) );
440 //int ifit=0;
441 //int ifit3D=0;
442 if(m_printflag==1)cout<<"----------------------------------------------------------------------------------------------------"<<endl;
443 if(m_printflag==1)cout<<" suppose charge negetive,ntracks: "<<trackList_size<<endl;
444 for(int itrack=0;itrack<trackList_size;itrack++){
445 if(m_debug>0) cout<<"begin track: "<<itrack<<endl;
446 if(m_printflag==1)cout<<endl;
447 if(m_printflag==1)cout<<"begin track: "<<itrack<<endl;
448 //suppose charge -
449 if(m_debug>0) cout<<" suppose charge -1 "<<endl;
450 HoughTrack &track_neg = trackList_neg.getTrack(itrack);
451 track_neg.setMdcHit( &mdcHitCol_neg);
452 track_neg.setHoughHitList(houghHitList.getList());
453 track_neg.setCharge(-1);
454 track_neg.setMcPar(g_tkParTruth);
455 track_neg.setbunchTime(m_bunchT0);
456 track_neg.fitLeast();
457 if(m_printflag==1)cout<<"---before 2D fitting---"<<endl;
458 if(m_printflag==1)track_neg.printHoughTrack();
459 stat_2d[0][itrack] = track_neg.fit2D(m_bunchT0);
460 int track_charge_2d = track_neg.trackCharge2D();
461 if(m_debug>0) cout<<" charge -1 stat2d "<<stat_2d[0][itrack]<<" "<<track_charge_2d<<endl;
462 //cout<<" charge stat2d "<<stat_2d[0][itrack]<<" "<<track_charge_2d<<endl;
463 if( stat_2d[0][itrack] == 0 || track_charge_2d ==0 ){
464 if( stat_2d[0][itrack] == 0 && m_printflag==1)cout<<"==============================> 2D fit fail"<<endl;
465 if(track_charge_2d ==0 && m_printflag==1)cout<<"==============================> 2D charge wrong"<<endl;
466 continue;
467 }
468
469 if(m_hist==2)dumpHoughTrack(track_neg,itrack,trackList_size);
470 if(m_hist==2)dumpHitOnTrack(track_neg);
471 //vec_track2D_neg.push_back( &track_neg );
472 //fill 2D inf
473 //ifit++;
474 //3D fit
475 int nHit3d = track_neg.find_stereo_hit();
476 int npair= track_neg.find_pair_hit();
477 //cout<<"npair "<<npair<<endl;
478
479 int track_charge_3d = track_neg.trackCharge3D();
480 if(m_debug>0) cout<<" nhitstereo -1 "<<nHit3d<<" "<<track_charge_3d<<endl;
481 //cout<<" nhitstereo "<<nHit3d<<" "<<track_charge_3d<<endl;
482 if( nHit3d <3 || track_charge_3d==0 ){
483 if(nHit3d <3 && m_printflag==1)cout<<"==============================> stereo hit <3"<<endl;
484 if(track_charge_3d==0 && m_printflag==1)cout<<"==============================> 3D charge wrong"<<endl;
485 continue;
486 }
487
488 //choose fit method
489 if( npair==0 ) stat_3d[0][itrack] = track_neg.fit3D();
490 else stat_3d[0][itrack] = track_neg.fit3D_inner();
491 //else stat_3d[0][itrack] = track_neg.fit3D();
492
493 if(m_debug>0) cout<<" charge -1 stat3d "<<stat_3d[0][itrack]<<" "<<endl;
494 //cout<<" charge stat3d "<<stat_3d[0][itrack]<<" "<<endl;
495 if( stat_3d[0][itrack]==0 ){
496 if(m_printflag==1)cout<<"==============================> 3D fit fail"<<endl;
497 continue;
498 }
499 vec_track_neg.push_back( &track_neg );
500 //fill 3D inf
501 if(m_hist==3)dumpHoughTrack(track_neg,itrack,trackList_size);
502 if(m_hist==3)dumpHitOnTrack(track_neg);
503 //track_neg.printRecHit();
504
505 }
506
507 std::sort ( vec_track_neg.begin(),vec_track_neg.end(),more_pt);
508 if(m_globalfit){
509 if(m_printflag==1)cout<<"tracks before fitting: "<<trackList_neg.getTrackNum()<<endl<<"tracks after fittng: "<<vec_track_neg.size()<<endl;
510 //track for clear
511 vector<MdcTrack*> vec_MdcTrack_neg;
512 for( unsigned int i =0;i<vec_track_neg.size();i++){
513 MdcTrack *mdcTrack = new MdcTrack(vec_track_neg[i]->getTrk());
514 vec_MdcTrack_neg.push_back(mdcTrack);
515 if(m_debug>0) cout<<"trackneg: "<<i<<" pt "<<vec_track_neg[i]->getPt3D()<<endl;
516 if(m_debug>0) vec_track_neg[i]->print();
517 if(m_printflag==1)vec_track_neg[i]->getTrk()->printAll(std::cout);
518 }
519 if(m_debug>0) cout<<"step4 : judge neg track list "<<endl;
520 int nDeleted = judgeHit(mdcTrackList_neg,vec_MdcTrack_neg);
521 if(m_printflag==1)cout<<"tracks before judge hits: "<<vec_MdcTrack_neg.size()<<endl;
522 //printTrack(vec_MdcTrack_neg);
523 if(m_printflag==1)cout<<"tracks after judge hits: "<<mdcTrackList_neg.length()<<endl;
524 if(m_printflag==1)printTrack(mdcTrackList_neg);
525 //if(nDeleted>0)cout<<nDeleted<<" tracks have been deleted by MdcTrackList.arbitrateHits()"<<endl;
526 if(m_debug>0 && nDeleted>0)cout<<nDeleted<<" tracks have been deleted by MdcTrackList.arbitrateHits()"<<endl;
527 if(m_debug>0) cout<<"finish - charge "<<endl;
528 }else{
529 storeTracks(trackList_tds, hitList_tds, trackList_neg);
530 }
531 }
532
533 //do rec pos charge
534
535 HoughMap *m_map2 = new HoughMap(1,houghHitList,m_mapHit,m_nBinTheta,m_nBinRho,-1.*m_rhoRange,m_rhoRange,m_peakWidth,m_peakHigh,m_hitPro);//, 2dOr3d);
536 if(m_debug>0) cout<<"step5 : pos track list "<<endl;
537 vector<HoughTrack*> vec_track_pos;
538 MdcTrackList mdcTrackList_pos(m_par) ;
539 if(m_recpos){
540 HoughTrackList tracklist_pos(*m_map2);
541 int tracklist_size2 = tracklist_pos.getTrackNum();
542 vector< vector<int> > stat_2d2(2,vector<int>(tracklist_size2,0) );
543 vector< vector<int> > stat_3d2(2,vector<int>(tracklist_size2,0) );
544 //int ifit=0;
545 //int ifit3D=0;
546 if(m_printflag==1)cout<<endl<<"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
547 if(m_printflag==1)cout<<" suppose charge positive,ntracks: "<<tracklist_size2<<endl;
548 for(int itrack=0;itrack<tracklist_size2;itrack++){
549 if(m_printflag==1)cout<<endl;
550 if(m_printflag==1)cout<<"begin track: "<<itrack<<endl;
551 //suppose charge +
552 if(m_debug>0) cout<<" suppose charge +1 "<<endl;
553 HoughTrack &track_pos = tracklist_pos.getTrack(itrack);
554 //track_pos.setMdcHit( &mdcHitCol_pos);
555 track_pos.setMdcHit( &mdcHitCol_neg);
556 track_pos.setHoughHitList(houghHitList.getList());
557 track_pos.setCharge(1);
558 track_pos.setMcPar(g_tkParTruth);
559 track_pos.setbunchTime(m_bunchT0);
560 track_pos.fitLeast();
561 if(m_printflag==1)cout<<"---before 2D fitting---"<<endl;
562 if(m_printflag==1)track_pos.printHoughTrack();
563 stat_2d2[0][itrack] = track_pos.fit2D(m_bunchT0);
564 int track_charge_2d = track_pos.trackCharge2D();
565 if(m_debug>0) cout<<" charge +1 stat2d "<<stat_2d2[0][itrack]<<" "<<track_charge_2d<<endl;
566 if( stat_2d2[0][itrack] == 0 || track_charge_2d==0 ){
567 if( stat_2d2[0][itrack] == 0 && m_printflag==1)cout<<"==============================> 2D fit fail"<<endl;
568 if(track_charge_2d ==0 && m_printflag==1)cout<<"==============================> 2D charge wrong"<<endl;
569 continue;
570 }
571 //fill 2d inf
572 //ifit++;
573 //3d fit
574 int nHit3d = track_pos.find_stereo_hit();
575 int npair= track_pos.find_pair_hit();
576 //cout<<"npair "<<npair<<endl;
577
578 int track_charge_3d = track_pos.trackCharge3D();
579 if(m_debug>0) cout<<" nhitstereo +1 "<<nHit3d<<" "<<track_charge_3d<<endl;
580 if( nHit3d <3 || track_pos.trackCharge3D()==0 ){
581 if(nHit3d <3 && m_printflag==1)cout<<"==============================> stereo hit <3"<<endl;
582 if(track_charge_3d==0 && m_printflag==1)cout<<"==============================> 3D charge wrong"<<endl;
583 continue;
584 }
585 //choose fit method
586 if( npair==0 ) stat_3d2[0][itrack] = track_pos.fit3D();
587 else stat_3d2[0][itrack] = track_pos.fit3D_inner();
588 //else stat_3d2[0][itrack] = track_neg.fit3D();
589 //dumpHitOnTrack(track_pos);
590
591 if(m_debug>0) cout<<" charge +1 stat3d "<<stat_3d2[0][itrack]<<" "<<endl;
592 if( stat_3d2[0][itrack]==0 ){
593 if(m_printflag==1)cout<<"==============================> 3D fit fail"<<endl;
594 continue;
595 }
596 vec_track_pos.push_back( &track_pos );
597 //track_pos.printRecHit();
598 //fill 3d inf
599 //ifit3D++;
600 //dumpHoughTrack(track_pos,itrack,tracklist_size2);
601 }
602
603 //sort pos tracklist
604 std::sort ( vec_track_pos.begin(),vec_track_pos.end(),more_pt);
605
606 // clear pos track
607 if(m_globalfit){
608 if(m_printflag==1)cout<<"tracks before fitting: "<<tracklist_pos.getTrackNum()<<endl<<"tracks after fittng: "<<vec_track_pos.size()<<endl;
609 vector<MdcTrack*> vec_MdcTrack_pos;
610 for( unsigned int i =0;i<vec_track_pos.size();i++){
611 MdcTrack *mdcTrack = new MdcTrack(vec_track_pos[i]->getTrk());
612 vec_MdcTrack_pos.push_back(mdcTrack);
613 if(m_debug>0) cout<<"trackpos : "<<i<<" pt "<<vec_track_pos[i]->getPt3D()<<endl;
614 if(m_debug>0) vec_track_pos[i]->print();
615 if(m_printflag==1)vec_track_pos[i]->getTrk()->printAll(std::cout);
616 }
617 if(m_debug>0) cout<<"step6 : judge pos track list "<<endl;
618 int nDeleted = judgeHit(mdcTrackList_pos,vec_MdcTrack_pos);
619 if(m_printflag==1)cout<<"tracks before judge hits: "<<vec_MdcTrack_pos.size()<<endl;
620 //printTrack(vec_MdcTrack_pos);
621 if(m_printflag==1)cout<<"tracks after judge hits: "<<mdcTrackList_pos.length()<<endl;
622 if(m_printflag==1)printTrack(mdcTrackList_pos);
623 //if(nDeleted>0)cout<<nDeleted<<" tracks have been deleted by MdcTrackList.arbitrateHits()"<<endl;
624 if(m_debug>0 && nDeleted>0)cout<<nDeleted<<" tracks have been deleted by MdcTrackList.arbitrateHits()"<<endl;
625
626 }else{
627 storeTracks(trackList_tds, hitList_tds, tracklist_pos);
628 }
629 }
630
631 if(m_globalfit){
632 //combine hough itself
633 // if(m_debug>0) cout<<"step7 : combine neg&pos track list "<<endl;
634 if(m_printflag==1)cout<<endl<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
635 if(m_printflag==1)cout<<endl<<"-/+tracks before merge: "<<mdcTrackList_neg.length()<<" "<<mdcTrackList_pos.length()<<endl;
636 if(m_printflag==1)printTrack(mdcTrackList_neg);
637 if(m_printflag==1)printTrack(mdcTrackList_pos);
638 if(m_combine){
639 compareHough(mdcTrackList_neg);
640 compareHough(mdcTrackList_pos);
641 }
642 if(m_printflag==1)cout<<endl<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
643 if(m_printflag==1)cout<<"-/+tracks after merge: "<<mdcTrackList_neg.length()<<" "<<mdcTrackList_pos.length()<<endl;
644 if(m_printflag==1)printTrack(mdcTrackList_neg);
645 if(m_printflag==1)printTrack(mdcTrackList_pos);
646 if( mdcTrackList_neg.length()!=0 && mdcTrackList_pos.length()!=0 ) judgeChargeTrack(mdcTrackList_neg,mdcTrackList_pos);
647 if(m_printflag==1)cout<<endl<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
648 if(m_printflag==1)cout<<"tracks after -/+ judge: "<<mdcTrackList_neg.length()<<" "<<mdcTrackList_pos.length()<<endl;
649 if(m_printflag==1)printTrack(mdcTrackList_neg);
650 if(m_printflag==1)printTrack(mdcTrackList_pos);
651 //cout<<"pos "<<mdcTrackList_pos.length()<<endl;
652 //cout<<"neg "<<mdcTrackList_neg.length()<<endl;
653 //add tracklist
654 mdcTrackList_neg+=mdcTrackList_pos; //neg -> all charge
655 //if(m_cgem || m_skipMDCIT)mdcTrackList_neg.setNoInner(true);
656 //MdcTrackParams new_par;
657 //new_par.lPrint=8;
658 //mdcTrackList_neg.newParams(new_par);
659 int nDeleted = mdcTrackList_neg.arbitrateHits();
660 if(m_printflag==1)cout<<endl<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
661 if(m_printflag==1 && nDeleted>0)cout<<nDeleted<<" tracks have been deleted by MdcTrackList.arbitrateHits()"<<endl;
662 if(m_printflag==1)cout<<"event:"<<eventHeader->eventNumber()<<" "<<"total tracks: "<<mdcTrackList_neg.length()<<endl<<endl;
663 if(m_printflag==1)printTrack(mdcTrackList_neg);
664
665 //compare pattsf&hough self
666 if(m_combineTracking) nTdsTk = comparePatTsf(mdcTrackList_neg,trackList_tds);
667
668 // store tds
669 if(m_debug>0) cout<<"step8 : store tds "<<endl;
670 if(m_debug>0) cout<<"store tds "<<endl;
671 int tkId = nTdsTk ; //trkid
672 for( unsigned int i =0;i<mdcTrackList_neg.length();i++){
673 if(m_debug>0) cout<<"- charge size i : "<<i<<" "<<mdcTrackList_neg.length()<<endl;
674 int tkStat = 4;//track find by houghspace set stat=4
675 mdcTrackList_neg[i]->storeTrack(tkId, trackList_tds, hitList_tds, tkStat);
676 tkId++;
677 delete mdcTrackList_neg[i];
678 }
679 }
680 if(m_debug>0) m_mdcPrintSvc->printRecMdcTrackCol();
681
682 m_timer_all->stop();
683 double t_teventTime = m_timer_all->elapsed();
684 //RecMdcTrackCol::iterator iteritrk = trackList_tds->begin();
685 //for(;iteritrk!=trackList_tds->end();iteritrk++){
686 //cout<<"nlayer:"<<(*iteritrk)->nlayer()<<endl;
687 //}
688 if(m_hist==1)dumpHoughTrack(trackList_tds);
689 if(m_hist==1)dumpHitOnTrack(trackList_tds);
690
691 if(m_hist)ntuple_hit->write();
692 if(m_hist)ntuple_trk->write();
693 delete m_map;
694 delete m_map2;
695 if(m_debug>0) cout<<"after delete map "<<endl;
696 for(int ihit=0;ihit<mdcHitCol_neg.size();ihit++){
697 delete mdcHitCol_neg[ihit];
698 delete mdcHitCol_pos[ihit];
699 }
700
701 if(m_debug>0) cout<<"after delete hit"<<endl;
702 //clearMem(mdcTrackList_neg,mdcTrackList_pos);
703 if(m_debug>0) cout<<"end event "<<endl;
704
705 return StatusCode::SUCCESS;
706}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
ObjectVector< RecMdcHit > RecMdcHitCol
ObjectVector< RecMdcTrack > RecMdcTrackCol
bool more_pt(const HoughTrack *tracka, const HoughTrack *trackb)
void start(void)
Definition: BesTimer.cxx:27
void stop(void)
Definition: BesTimer.cxx:39
void setMcPar(std::map< int, const HepVector > mcTkPars)
void setMdcHit(const vector< MdcHit * > *mdchit)
void printRecMdcTrackCol() const

◆ execute() [2/2]

StatusCode MdcHoughFinder::execute ( )

◆ finalize() [1/2]

StatusCode MdcHoughFinder::finalize ( )

Definition at line 709 of file MdcHoughFinder/MdcHoughFinder-00-00-12/src/Hough.cxx.

709 {
710 MsgStream log(msgSvc(), name());
711 delete m_bfield ;
712 log << MSG::INFO<< "in finalize()" << endreq;
713
714 return StatusCode::SUCCESS;
715}

◆ finalize() [2/2]

StatusCode MdcHoughFinder::finalize ( )

◆ initialize() [1/2]

StatusCode MdcHoughFinder::initialize ( )

Definition at line 158 of file MdcHoughFinder/MdcHoughFinder-00-00-12/src/Hough.cxx.

158 {
159
160 MsgStream log(msgSvc(), name());
161 log << MSG::INFO << "in initialize()" << endreq;
162
163 StatusCode sc;
164
165 //particle
166 IPartPropSvc* p_PartPropSvc;
167 static const bool CREATEIFNOTTHERE(true);
168 sc = service("PartPropSvc", p_PartPropSvc, CREATEIFNOTTHERE);
169 if (!sc.isSuccess() || 0 == p_PartPropSvc) {
170 log << MSG::ERROR << " Could not initialize PartPropSvc" << endreq;
171 return sc;
172 }
173 m_particleTable = p_PartPropSvc->PDT();
174
175 // RawData
176 IRawDataProviderSvc* irawDataProviderSvc;
177 sc = service ("RawDataProviderSvc", irawDataProviderSvc);
178 m_rawDataProviderSvc = dynamic_cast<RawDataProviderSvc*> (irawDataProviderSvc);
179 if ( sc.isFailure() ){
180 log << MSG::FATAL << name()<<" Could not load RawDataProviderSvc!" << endreq;
181 return StatusCode::FAILURE;
182 }
183
184 // Geometry
185 IMdcGeomSvc* imdcGeomSvc;
186 sc = service ("MdcGeomSvc", imdcGeomSvc);
187 m_mdcGeomSvc = dynamic_cast<MdcGeomSvc*> (imdcGeomSvc);
188 if ( sc.isFailure() ){
189 log << MSG::FATAL << "Could not load MdcGeoSvc!" << endreq;
190 return StatusCode::FAILURE;
191 }
192
193 //---CGEM geometry
194 if(m_cgem){
195 ICgemGeomSvc* icgemGeomSvc;
196 sc = service ("CgemGeomSvc", icgemGeomSvc);
197 m_cgemGeomSvc = dynamic_cast<CgemGeomSvc*> (icgemGeomSvc);
198 if ( sc.isFailure() ){
199 log << MSG::FATAL << "Could not load CgemGeomSvc!" << endreq;
200 return StatusCode::FAILURE;
201 }
202 HoughHit::setCgemGeomSvc(m_cgemGeomSvc);
203 //CgemHitOnTrack::cgemGeomSvc = m_cgemGeomSvc;
204
205 ICgemCalibFunSvc* icgemCalibSvc;
206 sc = service ("CgemCalibFunSvc", icgemCalibSvc);
207 m_cgemCalibFunSvc = dynamic_cast<CgemCalibFunSvc*>(icgemCalibSvc);
208 if ( sc.isFailure() ){
209 log << MSG::FATAL << "Could not load CgemCalibFunSvc!" << endreq;
210 return StatusCode::FAILURE;
211 }
212
213 }
214
215 // magneticfield
216 sc = service ("MagneticFieldSvc",m_pIMF);
217 if(sc!=StatusCode::SUCCESS) {
218 log << MSG::ERROR << "Unable to open Magnetic field service"<<endreq;
219 }
220 m_bfield = new BField(m_pIMF);
221 log << MSG::INFO << "field z = "<<m_bfield->bFieldNominal()<< endreq;
222 m_context = new TrkContextEv(m_bfield);
223
224 //read pdt
225 Pdt::readMCppTable(m_pdtFile);
226
227 //Get MdcCalibFunSvc
228 IMdcCalibFunSvc* imdcCalibSvc;
229 sc = service ("MdcCalibFunSvc", imdcCalibSvc);
230 m_mdcCalibFunSvc = dynamic_cast<MdcCalibFunSvc*>(imdcCalibSvc);
231 if ( sc.isFailure() ){
232 log << MSG::FATAL << "Could not load MdcCalibFunSvc!" << endreq;
233 return StatusCode::FAILURE;
234 }
235
236 //initialize MdcPrintSvc
237 IMdcPrintSvc* imdcPrintSvc;
238 sc = service ("MdcPrintSvc", imdcPrintSvc);
239 m_mdcPrintSvc = dynamic_cast<MdcPrintSvc*> (imdcPrintSvc);
240 if ( sc.isFailure() ){
241 log << MSG::FATAL << "Could not load MdcPrintSvc!" << endreq;
242 return StatusCode::FAILURE;
243 }
244
245 //time
246 sc = service( "BesTimerSvc", m_timersvc);
247 if( sc.isFailure() ) {
248 log << MSG::WARNING << " Unable to locate BesTimerSvc" << endreq;
249 return StatusCode::FAILURE;
250 }
251 m_timer_all = m_timersvc->addItem("Execution");
252 m_timer_all->propName("nExecution");
253
254 //initialize static
255 HoughHit::setMdcCalibFunSvc(m_mdcCalibFunSvc);
256 HoughHit::setMdcGeomSvc(m_mdcGeomSvc);
257 HoughHit::setBunchTime(m_bunchT0);
258 Hough2D::setContext(m_context);
259 Hough2D::setCalib(m_mdcCalibFunSvc);
260 Hough2D::setCalib(m_cgemCalibFunSvc);
261 Hough2D::setGeomSvc(m_cgemGeomSvc);
262 //Hough2D::setcgemfitflag(m_cgemfit);
263 Hough3D::setContext(m_context);
264 Hough3D::setCalib(m_mdcCalibFunSvc);
265 Hough3D::setCalib(m_cgemCalibFunSvc);
266 Hough3D::setGeomSvc(m_cgemGeomSvc);
267 //Hough3D::setcgemfitflag(m_cgemfit);
268 HoughZsFit::setmethod(m_recMethod);
269
270 HoughHit::_npart=m_npart;
271 HoughMap::m_useHalfCir=m_useHalf;
272 HoughMap::m_N1=m_npart;
273 HoughMap::m_N2=m_n2;
274 HoughMap::m_nPoint2D=m_nPoint2D;
275 HoughMap::m_nRMS=m_nRMS;
276 HoughMap::m_method=m_fillMap;
277
280 HoughPeak::m_factor=m_factor2D;
282 HoughZsFit::m_factor=m_factor3D;
284 HoughZsFit::m_nPoint3D=m_nPoint3D;
285
286 if(m_debugMap> 0) HoughMap::m_debug = 1;
287 if(m_debug2D > 0) Hough2D::m_debug = 1;
288 if(m_debug3D > 0) Hough3D::m_debug = 1;
289 if(m_debugTrack> 0) HoughTrack::m_debug = 1;
290 if(m_globalfit> 0)HoughTrack::m_globalfit = 1;
291 if(m_debugPeak> 0) HoughPeak::m_debug = 1;
292 if(m_debugPeak> 0) HoughPeak::m_debug = 1;
293 if(m_debugStereo> 0)HoughStereo::m_debug = 1;
294 if(m_debugZs> 0) HoughZsFit::m_debug = 1;
295 //if(m_recMethod> 0) HoughZsFit::m_recMethod = 1;
296 if(m_debug3D > 4) TrkHelixFitter::m_debug = 1;
297
298 if(m_hist) sc = bookTuple();
299 if ( sc.isFailure() ){
300 log << MSG::FATAL << "Could not book Tuple !" << endreq;
301 return StatusCode::FAILURE;
302 }
303 return StatusCode::SUCCESS;
304}
static void setContext(TrkContextEv *context)
static void setGeomSvc(const CgemGeomSvc *cgemGeomSvc)
static void setCalib(const MdcCalibFunSvc *mdcCalibFunSvc)
static void setContext(TrkContextEv *context)
static void setCalib(const MdcCalibFunSvc *mdcCalibFunSvc)
static void setGeomSvc(const CgemGeomSvc *cgemGeomSvc)
static void setMdcGeomSvc(MdcGeomSvc *mdcGeomSvc)
static void setMdcCalibFunSvc(MdcCalibFunSvc *mdcCalibFunSvc)
static void setCgemGeomSvc(CgemGeomSvc *cgemGeomSvc)
virtual BesTimer * addItem(const std::string &name)=0
static void readMCppTable(std::string filenm)

◆ initialize() [2/2]

StatusCode MdcHoughFinder::initialize ( )

The documentation for this class was generated from the following files: