BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcxTrackFinder.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: MdcxTrackFinder.h,v 1.27 2012/07/20 05:48:16 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"
44#ifdef MDCXTIMEDEBUG
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
71 virtual ~MdcxTrackFinder();
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_nTkTot;
87 int t_nTkNum[20];
88
89 double m_bunchT0;
90 double m_timing;
91 int m_t0Stat;
92 double m_t0Truth;
93 int m_eventNo;
94
95 // debug and hist flag
96 int m_debug;
97 int m_hist;
98 bool m_mcHist;
99
100 //for raw data input
101 bool m_dropUnmatch;
102 bool m_keepBadTdc;
103 bool m_dropHot;
104 bool m_keepUnmatch;
105 uint32_t m_getDigiFlag;
106 int m_maxMdcDigi;
107 int m_minMdcDigi;
108 bool m_dropMultiHotInLayer;
109
110 // fit type control
111 bool m_salvageTrk;
112 bool m_lineFit;
113 //bool m_cosmicFit;
114
115 // fix of Hit
116 bool m_countPropTime;
117 bool m_doSag;
118
119 // fit cuts
120 double m_cresol;
121 std::vector<float> m_dropHitsSigma;
122 std::vector<float> m_helixFitCut;
123 double m_dropTrkPt;
124 double m_addHitCut;
125 double m_minTrkProb;
126 double m_csmax4;
127 double m_csmax3;
128 double m_helixFitSigma;
129 double m_maxRcsInAddSeg;
130 double m_nSigAddHitTrk;
131 double m_maxProca;
132 double m_d0Cut;
133 double m_z0Cut;
134
135
136 BField* m_bfield;
137 IMagneticFieldSvc* m_pIMF;
138 const MdcCalibFunSvc* m_mdcCalibFunSvc;
139 RawDataProviderSvc* m_rawDataProviderSvc;
140 std::string m_pdtFile;
141 HepAList<MdcHit>* m_junkHitList;
142 MdcxHits m_mdcxHits;
143
144 TrkContextEv* m_context;
145 const MdcDetector* m_gm;
146 MdcDigiVec mdcDigiVec;
147
148 StatusCode FitMdcxTrack(HepAList<MdcxFittedHel>& trkList,
149 const HepAList<MdcxHit>& dchitlist, MdcHitCol* hitCol,
150 RecMdcTrackCol* trackList, RecMdcHitCol* hitList);
151 void MdcxHitsToHots(MdcxHel& mdcxHelix, const HepAList<MdcxHit>& mdcxHits,
152 TrkHitList* m_trkHitList, MdcHitCol* hitCol);
153 void MdcxHitsToHots(TrkHitList* m_trkHitList, HitRefVec& recMdcHits, HitRefVec& skipedHits);
154
155 void store(TrkRecoTrk* aTrack, RecMdcTrackCol*, RecMdcHitCol* );
156 void printTrack(RecMdcTrack* tk);
157 void dumpTrackList(const HepAList<MdcxFittedHel>& trackList) const;
158 void dumpTrack(RecMdcTrackCol* trackList);
159 void dumpMdcxSegs(const HepAList<MdcxSeg>& segList)const;
160 void bookNTuple();
161 void fillMdcxSegs(const HepAList<MdcxSeg>& segList)const;
162 void fillTrkl(const HepAList<MdcxFittedHel>& firsttrkl) const;
163 void fillMcTruth();
164 void fillTrack(TrkRecoTrk* aTrack);
165 void fillEvent();
166 void dropMultiHotInLayer(TrkHitList* list);
167 void dumpTdsTrack(RecMdcTrackCol* trackList);
168 void dumpTdsHits(RecMdcHitCol* hitList);
169 const MdcDigi* m_digiMap[43][288];
170
171
172#ifdef MDCXTIMEDEBUG
173 IBesTimerSvc* m_timersvc;
174 static const int NTIMERS = 5;
175 BesTimer* m_timer[NTIMERS];
176#endif
177
178};
179
180#endif
#define NTIMERS
Definition: MdcFastTrkAlg.h:35
ObjectVector< MdcHit > MdcHitCol
Definition: MdcHit.h:129
std::vector< MdcDigi * > MdcDigiVec
ObjectVector< RecMdcHit > RecMdcHitCol
Definition: RecMdcHit.h:99
ObjectVector< RecMdcTrack > RecMdcTrackCol
Definition: RecMdcTrack.h:79
SmartRefVector< RecMdcHit > HitRefVec
Definition: RecMdcTrack.h:22
Definition: MdcxSeg.h:9
virtual ~MdcxTrackFinder()
StatusCode finalize()
StatusCode beginRun()
StatusCode execute()
StatusCode initialize()