BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcxReco/MdcxReco-00-01-60/MdcxReco/MdcxTrackFinder.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: MdcxTrackFinder.h,v 1.28 2017/08/18 06:51:52 zhangy Exp $
4//
5// Description:
6// Class MdcxTrackFinder. This is a simple example of a user module. It
7// just prints out each entrypoint (operation) as it is accessed.
8//
9// Environment:
10// Software developed for the BaBar Detector at the SLAC B-Factory.
11//
12// Author List:
13// David R. Quarrie Original Author
14// Zhang Yao([email protected])
15//
16// Copyright Information:
17// Copyright (C) 1994 Lawrence Berkeley Laboratory
18//
19// History:
20// Migration for BESIII MDC
21//
22//------------------------------------------------------------------------
23
24#ifndef MDCXTRACKFINDER_H
25#define MDCXTRACKFINDER_H
26
27//----------------------
28// Base Class Headers --
29//----------------------
30#include "GaudiKernel/Algorithm.h"
31#include "CLHEP/Alist/AList.h"
32#include "GaudiKernel/NTuple.h"
33#include "MdcData/MdcHit.h"
34#include "MdcxReco/MdcxHits.h"
35#include "GaudiKernel/SmartDataPtr.h"
36#include "MdcRecEvent/RecMdcTrack.h"
37#include "MdcRecEvent/RecMdcHit.h"
38#include "MdcCalibFunSvc/MdcCalibFunSvc.h"
39#include "RawDataProviderSvc/RawDataProviderSvc.h"
40#include "MdcTrkRecon/MdcFlagHold.h"
41#include "MagneticField/IMagneticFieldSvc.h"
42#include "TrkFitter/TrkContextEv.h"
43#include "MdcData/MdcRecoHitOnTrack.h"
44#ifdef MDCXTIMEDEBUG
45#include "BesTimerSvc/IBesTimerSvc.h"
46#include "BesTimerSvc/BesTimerSvc.h"
47#endif
48
49class MdcxHel;
50class TrkHitList;
51class BField;
52class TrkRecoTrk;
53class MdcxSeg;
54class MdcxFittedHel;
55
56//---------------------
57//-- Class Interface --
58//---------------------
59
60class MdcxTrackFinder : public Algorithm {
61
62//--------------------
63// Instance Members --
64//--------------------
65
66public:
67 // Constructors
68 MdcxTrackFinder(const std::string& name, ISvcLocator* pSvcLocator);
69
70 // Destructor
72
73 // Operations
74 StatusCode initialize();
75 StatusCode execute();
76 StatusCode finalize();
77 StatusCode beginRun();
78
79private:
80 // temp var
81 int haveDigi[43][288];
82 int nTk;
83 bool b_saveEvent;
84 int t_nTdsTk;
85 int t_nDigi;
86 int t_nSeg;
87 int t_nTkTot;
88 int t_nTkNum[20];
89
90 double m_bunchT0;
91 double m_timing;
92 int m_t0Stat;
93 double m_t0Truth;
94 int m_eventNo;
95
96 // debug and hist flag
97 int m_debug;
98 int m_hist;
99 bool m_mcHist;
100
101 //for raw data input
102 bool m_dropUnmatch;
103 bool m_keepBadTdc;
104 bool m_dropHot;
105 bool m_keepUnmatch;
106 uint32_t m_getDigiFlag;
107 int m_maxMdcDigi;
108 int m_minMdcDigi;
109 bool m_dropMultiHotInLayer;
110
111 // fit type control
112 bool m_salvageTrk;
113 bool m_lineFit;
114 //bool m_cosmicFit;
115
116 // fix of Hit
117 bool m_countPropTime;
118 bool m_doSag;
119
120 // fit cuts
121 double m_cresol;
122 std::vector<float> m_dropHitsSigma;
123 std::vector<float> m_helixFitCut;
124 double m_dropTrkPt;
125 double m_addHitCut;
126 double m_minTrkProb;
127 double m_csmax4;
128 double m_csmax3;
129 double m_helixFitSigma;
130 double m_maxRcsInAddSeg;
131 double m_nSigAddHitTrk;
132 double m_maxProca;
133 double m_d0Cut;
134 double m_z0Cut;
135
136
137 BField* m_bfield;
138 IMagneticFieldSvc* m_pIMF;
139 const MdcCalibFunSvc* m_mdcCalibFunSvc;
140 RawDataProviderSvc* m_rawDataProviderSvc;
141 std::string m_pdtFile;
142 HepAList<MdcHit>* m_junkHitList;
143 MdcxHits m_mdcxHits;
144
145 TrkContextEv* m_context;
146 const MdcDetector* m_gm;
147 MdcDigiVec mdcDigiVec;
148
149 StatusCode FitMdcxTrack(HepAList<MdcxFittedHel>& trkList,
150 const HepAList<MdcxHit>& dchitlist, MdcHitCol* hitCol,
151 RecMdcTrackCol* trackList, RecMdcHitCol* hitList);
152 void MdcxHitsToHots(MdcxHel& mdcxHelix, const HepAList<MdcxHit>& mdcxHits,
153 TrkHitList* m_trkHitList, MdcHitCol* hitCol);
154 void MdcxHitsToHots(TrkHitList* m_trkHitList, HitRefVec& recMdcHits, HitRefVec& skipedHits);
155
156 void store(TrkRecoTrk* aTrack, RecMdcTrackCol*, RecMdcHitCol* );
157 void printTrack(RecMdcTrack* tk);
158 void dumpTrackList(const HepAList<MdcxFittedHel>& trackList) const;
159 void dumpTrack(RecMdcTrackCol* trackList);
160 void dumpMdcxSegs(const HepAList<MdcxSeg>& segList)const;
161 void bookNTuple();
162 void fillMdcxSegs(const HepAList<MdcxSeg>& segList)const;
163 void fillTrkl(const HepAList<MdcxFittedHel>& firsttrkl) const;
164 void fillMcTruth();
165 void fillTrack(TrkRecoTrk* aTrack);
166 void fillEvent();
167 void dropMultiHotInLayer(TrkHitList* list);
168 void dumpTdsTrack(RecMdcTrackCol* trackList);
169 void dumpTdsHits(RecMdcHitCol* hitList);
170 const MdcDigi* m_digiMap[43][288];
171
172
173#ifdef MDCXTIMEDEBUG
174 IBesTimerSvc* m_timersvc;
175 static const int NTIMERS = 5;
176 BesTimer* m_timer[NTIMERS];
177#endif
178
179};
180
181#endif
ObjectVector< MdcHit > MdcHitCol
ObjectVector< RecMdcHit > RecMdcHitCol
ObjectVector< RecMdcTrack > RecMdcTrackCol
SmartRefVector< RecMdcHit > HitRefVec
MdcxTrackFinder(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode finalize()
StatusCode beginRun()
StatusCode execute()
virtual ~MdcxTrackFinder()
StatusCode initialize()