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

#include <Hough3D.h>

Public Member Functions

 Hough3D ()
 
 Hough3D (const Hough3D &other)
 
 Hough3D (const Hough2D &hough2D, recHitCol hitCol, double bunchtime, double tanl, double z0)
 
 Hough3D (const Hough2D &hough2D, recHitCol hitCol, double bunchtime, double tanl, double z0, const vector< MdcHit * > *mdchit)
 
TrkRecoTrkgetTrk () const
 
double getCirX () const
 
double getCirY () const
 
double getCirR () const
 
double getD0 () const
 
double getPhi0 () const
 
double getOmega () const
 
double getZ0 () const
 
double getTanl () const
 
int getCharge () const
 
int getNfit () const
 
vector< MdcHit * > & getVecForClean ()
 
void setD0 (double d0)
 
void setPhi0 (double phi0)
 
void setOmega (double omega)
 
void setZ0 (double z0)
 
void setTanl (double tanl)
 
void setBunchT0 (double bunchT0)
 
void setRecHit (const recHitCol &rechit)
 
void setCharge (int charge)
 
int fit ()
 
void outerHit ()
 
void printRecHit () const
 
double getPt () const
 
double getPz () const
 
double getP () const
 
double getChi2 () const
 
void print ()
 
 Hough3D ()
 
 Hough3D (const Hough3D &other)
 
 Hough3D (const Hough2D &hough2D, recHitCol hitCol, double bunchtime, double tanl, double z0)
 
 Hough3D (const Hough2D &hough2D, recHitCol hitCol, double bunchtime, double tanl, double z0, const vector< MdcHit * > *mdchit)
 
TrkRecoTrkgetTrk () const
 
double getCirX () const
 
double getCirY () const
 
double getCirR () const
 
double getD0 () const
 
double getPhi0 () const
 
double getOmega () const
 
double getZ0 () const
 
double getTanl () const
 
int getCharge () const
 
int getNfit () const
 
vector< MdcHit * > & getVecForClean ()
 
void setD0 (double d0)
 
void setPhi0 (double phi0)
 
void setOmega (double omega)
 
void setZ0 (double z0)
 
void setTanl (double tanl)
 
void setBunchT0 (double bunchT0)
 
void setRecHit (const recHitCol &rechit)
 
void setCharge (int charge)
 
int fit ()
 
void outerHit ()
 
void printRecHit () const
 
double getPt () const
 
double getPz () const
 
double getP () const
 
double getChi2 () const
 
void print ()
 

Static Public Member Functions

static void setContext (TrkContextEv *context)
 
static void setCalib (const MdcCalibFunSvc *mdcCalibFunSvc)
 
static void setCalib (const CgemCalibFunSvc *cgemCalibFunSvc)
 
static void setGeomSvc (const CgemGeomSvc *cgemGeomSvc)
 
static void setContext (TrkContextEv *context)
 
static void setCalib (const MdcCalibFunSvc *mdcCalibFunSvc)
 
static void setCalib (const CgemCalibFunSvc *cgemCalibFunSvc)
 
static void setGeomSvc (const CgemGeomSvc *cgemGeomSvc)
 

Static Public Attributes

static int m_debug =0
 
static TrkContextEv_context =NULL
 
static const MdcCalibFunSvc_mdcCalibFunSvc =NULL
 
static const CgemCalibFunSvc_cgemCalibFunSvc =NULL
 
static const CgemGeomSvc_cgemGeomSvc =NULL
 
static int m_qualityFactor =3
 
static double m_dropTrkChi2Cut =99999
 
static double m_dropTrkDrCut =1
 
static double m_dropTrkDzCut =10
 
static double m_dropTrkNhitCut =9
 
static double m_dropTrkChi2NdfCut =99999
 

Detailed Description

Constructor & Destructor Documentation

◆ Hough3D() [1/8]

Hough3D::Hough3D ( )

Definition at line 20 of file Hough3D.cxx.

20 {
21 //_m_gm = MdcDetector::instance(0);
22}

◆ Hough3D() [2/8]

Hough3D::Hough3D ( const Hough3D other)

Definition at line 23 of file Hough3D.cxx.

23 {
24 _circleR=other._circleR;
25 _circleX=other._circleX;
26 _circleY=other._circleY;
27 _charge=other._charge;
28 _d0=other._d0;
29 _phi0=other._phi0;
30 _omega=other._omega;
31 _tanl=other._tanl;
32 _z0=other._z0;
33
34 _pt=other._pt;
35 _pz=other._pz;
36 _p=other._p;
37 _nfit=other._nfit;
38 _bunchT0=other._bunchT0;
39 _chi2_aver=other._chi2_aver;
40 _m_gm = other._m_gm;
41 _recHitVec=other._recHitVec;
42 vec_mdcHit=other.vec_mdcHit;
43}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ Hough3D() [3/8]

Hough3D::Hough3D ( const Hough2D hough2D,
recHitCol  hitCol,
double  bunchtime,
double  tanl,
double  z0 
)

Definition at line 45 of file Hough3D.cxx.

45 :_tanl(tanl),_z0(z0){
46 //_m_gm = MdcDetector::instance(0);
47 _circleR=hough2D.getCirR();
48 _circleX=hough2D.getCirX();
49 _circleY=hough2D.getCirY();
50 _d0 = hough2D.getD0();
51 _phi0 = hough2D.getPhi0();
52 _omega= hough2D.getOmega();
53 _charge=hough2D.getCharge();
54 _bunchT0=bunchtime;
55 _recHitVec=hitCol;
56 _pt = 0;
57 _p = 0;
58 _pz = 0;
59 _nfit=0;
60 newTrack=NULL;
61}

◆ Hough3D() [4/8]

Hough3D::Hough3D ( const Hough2D hough2D,
recHitCol  hitCol,
double  bunchtime,
double  tanl,
double  z0,
const vector< MdcHit * > *  mdchit 
)

Definition at line 62 of file Hough3D.cxx.

62 :_tanl(tanl),_z0(z0),vec_mdcHit(mdchit){
63 //_m_gm = MdcDetector::instance(0);
64 _circleR=hough2D.getCirR();
65 _circleX=hough2D.getCirX();
66 _circleY=hough2D.getCirY();
67 _d0 = hough2D.getD0();
68 _phi0 = hough2D.getPhi0();
69 _omega= hough2D.getOmega();
70 _charge=hough2D.getCharge();
71 _bunchT0=bunchtime;
72 _recHitVec=hitCol;
73 _pt = 0;
74 _p = 0;
75 _pz = 0;
76 _nfit=0;
77 newTrack=NULL;
78}

◆ Hough3D() [5/8]

Hough3D::Hough3D ( )

◆ Hough3D() [6/8]

Hough3D::Hough3D ( const Hough3D other)

◆ Hough3D() [7/8]

Hough3D::Hough3D ( const Hough2D hough2D,
recHitCol  hitCol,
double  bunchtime,
double  tanl,
double  z0 
)

◆ Hough3D() [8/8]

Hough3D::Hough3D ( const Hough2D hough2D,
recHitCol  hitCol,
double  bunchtime,
double  tanl,
double  z0,
const vector< MdcHit * > *  mdchit 
)

Member Function Documentation

◆ fit() [1/2]

int Hough3D::fit ( )

Definition at line 80 of file Hough3D.cxx.

80 {
81 if(_charge==-1){
82// cout<<" charge -1 "<<endl;
83// _d0=-_d0;
84// _omega=-1.*fabs(_omega);
85 }
86 if(_charge==1){
87// cout<<" charge +1 "<<endl;
88// _d0=_d0;
89// _omega=1.*fabs(_omega);
90 //_phi0=_phi0-M_PI;
91 }
92
93 //outerHit(); // delete 4 hit in a wire for kalman
94
95 TrkExchangePar tt(_d0,_phi0,_omega,_z0,_tanl);
96 //if (m_debug>0) cout<<"q d0 phi0 omega: "<<_charge<<" "<<_d0<<" "<<_phi0<<" "<<_omega<<" "<<_tanl<<" "<<_z0<<endl;
97 double dr = -_d0;
98 double phi0 = _phi0-M_PI/2;
99 double kappa = _omega*333.567;
100 double dz = _z0;
101 double tanl = _tanl;
102 while(phi0>2*M_PI)phi0-=2*M_PI;
103 while(phi0<0)phi0+=2*M_PI;
104 if (m_debug>0)cout<<"rec:"<<setw(12)<<dr<<" "<<setw(12)<<phi0<<" "<<setw(12)<<kappa<<" "<<setw(12)<<dz<<" "<<setw(12)<<tanl<<endl;
105 //cout<<"rec barbar:"<<setw(12)<<_d0<<" "<<setw(12)<<_phi0<<" "<<setw(12)<<_omega<<" "<<setw(12)<<_z0<<" "<<setw(12)<<_tanl<<endl;
106 //cout<<"rec besIII:"<<setw(12)<<dr<<" "<<setw(12)<<phi0<<" "<<setw(12)<<kappa<<" "<<setw(12)<<dz<<" "<<setw(12)<<tanl<<endl;
107 TrkHelixMaker helixfactory;
108 float chisum =0.;
109 newTrack = helixfactory.makeTrack(tt, chisum, *_context, _bunchT0);
110 //vectrk_for_clean.push_back(newTrack);
111 bool permitFlips = true;
112 bool lPickHits = true;
113 helixfactory.setFlipAndDrop(*newTrack, permitFlips, lPickHits);
114 TrkHitList* trkHitList = newTrack->hits();
115 int digiId=0;
116 std::vector<HoughRecHit>::iterator iter = _recHitVec.begin();
117 for (;iter != _recHitVec.end(); iter++, digiId++) {
118//cout<<__FILE__<<" layer: "<<iter->getLayerId()<<" wire: "<<iter->getWireId()<<" flag:"<<iter->getflag()<<endl;
119 if( (*iter).getflag()!=0 ) continue;
120 //if( (*iter)->calDriftDist(_bunchT0,0)>0.8) continue;
121 //if( (*iter)->driftTime(_bunchT0,0)>800) continue;
122 //cout<<"rechit dist time "<<(*iter).calDriftDist(_bunchT0,0)<<" "<<(*iter).driftTime(_bunchT0,0)<<endl;
123 if((*iter).getDetectorType()==MDC) {
124 const MdcDigi* aDigi = (*iter).digi();
125 MdcHit* hit;
126 // compare
127 vector<MdcHit*>::const_iterator iter_digi = (*vec_mdcHit).begin();
128 for (;iter_digi != (*vec_mdcHit).end(); iter_digi++) {
129 if( (*iter_digi)->digi() == (*iter).digi() ) {
130 hit = (*iter_digi);
131 }
132 }
133 Identifier id = aDigi->identify();
134 int layer = MdcID::layer(id);
135 int wire = MdcID::wire(id);
136 if(m_debug>0)cout<<"layer: "<<layer<<" wire: "<<wire<<endl;
137//cout<<"layer: "<<layer<<" wire: "<<wire<<endl;
139 hit->setCountPropTime(true);
140 // new fltLen and ambig
141 int newAmbig = 0;
142 // calc. position of this point
143 MdcRecoHitOnTrack temp( *hit, newAmbig, _bunchT0*1.e9);//m_bunchT0 nano second here
144 MdcHitOnTrack* newhot = &temp;
145 double flight;
146 double z_flight;
147 //if( layer<8 ) flight = sqrt( ((*iter).getsPos())*((*iter).getsPos())+((*iter).getzPos())*((*iter).getzPos())) ;
148 // if( layer<8 ) flight =(*iter).getsPos();
149 flight = (*iter).getRet().second;
150 double distoTrack= (*iter).getDisToTrack();
151 // if( layer<8 ) newhot->setFltLen( (*iter).getsPos()); //caculate by mc
152 // else newhot->setFltLen( (*iter).getRet().second); //caculate by mc
153 newhot->setFltLen( flight );
154 // if(layer==18) continue;
155
156 int use_in3d=1;
157 // if(hit->driftDist(_bunchT0,0)>1.0) use_in3d=0;
158 if(hit->driftTime(_bunchT0,0)>1000) use_in3d=0;
159 //if(m_debug>0) cout<<"flt : "<<(*iter).getsPos()<<endl;
160 //if(m_debug>0) cout<<"flt : "<<flight<<endl;
161 //if(m_debug>0) std::cout<<" ("<<layer<<","<<wire<<",rt "<<hit->rawTime()<<",dt "<<hit->driftTime(_bunchT0,0)<<") T0 " << _mdcCalibFunSvc->getT0(layer,wire) <<" timewalk "<< _mdcCalibFunSvc->getTimeWalk(layer, aDigi->getChargeChannel())<< "dist: "<<hit->driftDist(_bunchT0,0)<<" disToTrk "<< distoTrack<<" use?: "<<use_in3d<<endl;
162 // if(hit->driftTime(_bunchT0,0)>800) continue;
163 if(use_in3d==0) continue;
164 trkHitList->appendHot(newhot);
165 }else if( (*iter).getDetectorType()==CGEM && (*iter).getCluster()->getflag()==2){
166 if(m_debug>0) std::cout<<__FILE__<<" "<<__LINE__<<" add CGEM hit to fit "<<std::endl;
167 CgemHitOnTrack* newhot = new CgemHitOnTrack(*((*iter).getCluster()),_bunchT0*1.e9);
170 trkHitList->appendHot(newhot);
171 //if(m_cgemfit==1 || m_cgemfit==3)trkHitList->appendHot(newhot);
172 }
173 }
174 if( m_debug>0) newTrack->printAll(std::cout);
175 /*
176 TrkHitList* hitList = newTrack->hits();
177 for (TrkHitList::hot_iterator ihit(hitList->begin()); ihit != hitList->end(); ++ihit){
178 if(typeid(*ihit)==typeid(CgemHitOnTrack))continue;
179 int nUsed = ihit->hit()->nUsedHits();
180 std::cout<<"nUsed="<<nUsed<<":"<<endl;
181 //ihit->hit()->printAll(std::cout);
182 ihit->printAll(std::cout);
183 std::pair<TrkFundHit::hot_iterator,TrkFundHit::hot_iterator> q = ihit->hit()->getUsedHits();
184 for (TrkFundHit::hot_iterator i = q.first; i != q.second; ++i) {
185 TrkRecoTrk * recoTrk=i->parentTrack();
186 int id = recoTrk->id();
187 cout<<"trkid:"<<id<<endl;
188 }
189 cout<<endl;
190 }
191 */
192 TrkHitList* qhits = newTrack->hits();
193 TrkErrCode err=qhits->fit();
194 const TrkFit* newFit = newTrack->fitResult();
195 int nActiveHit = newTrack->hots()->nActive();
196 //cout<<err<<endl;
197 //if(newFit) cout <<" nAct "<<newFit->nActive()<<" "<<nActiveHit<<endl;
198 int fit_stat=false;
199 double chi2=-999.;
200 if (!newFit || (newFit->nActive()<5)||err.failure()!=0){
201 //if (!newFit )
202 if(m_debug>0){
203 cout << " global 3d fit failed ";
204 if(newFit) cout <<" nAct "<<newFit->nActive()<<endl;
205 cout<<"ERR1 failure ="<<err.failure()<<endl;
206 fit_stat=0;
207 }
208 }else{
209 TrkExchangePar par = newFit->helix(0.);
210 if( abs( 1/(par.omega()) )>0.03) {
211 fit_stat = 1;
212 chi2=newFit->chisq();
213 }
214 else {
215 fit_stat = 0;
216 chi2=-999;
217 }
218
219 bool badQuality = false;
220 if(fabs(chi2)>m_qualityFactor*m_dropTrkChi2Cut ){
221 if(m_debug>0){
222 std::cout<<__FILE__<<" "<<__LINE__<<" drop track by chi2 "<<chi2<<" > "<<m_qualityFactor<<" * "<<m_dropTrkChi2Cut <<std::endl;
223 }
224 badQuality=1;
225 }
226 if( fabs(par.d0())>m_qualityFactor*m_dropTrkDrCut) {
227 if(m_debug>0){
228 std::cout<<__FILE__<<" "<<__LINE__<<" drop track by d0 "<<par.d0()<<" > "<<m_qualityFactor<<" * "<<m_dropTrkDrCut <<std::endl;
229 }
230 badQuality=1;
231 }
232 if( fabs(par.z0())>m_qualityFactor*m_dropTrkDzCut) {
233 if(m_debug>0){
234 std::cout<<__FILE__<<" "<<__LINE__<<" drop track by z0 "<<par.z0()<<" > "<<m_qualityFactor<<" * "<<m_dropTrkDzCut <<std::endl;
235 }
236 badQuality=1;
237 }
238 if( (fabs(chi2)/qhits->nHit()) > m_qualityFactor*m_dropTrkChi2NdfCut) {
239 if(m_debug>0){
240 std::cout<<__FILE__<<" "<<__LINE__<<" drop track by chi2/ndf"<<(fabs(chi2)/qhits->nHit()) <<" > "<<m_qualityFactor<<" * "<<m_dropTrkChi2NdfCut<<std::endl;
241 }
242 badQuality=1;
243 }
244 if( nActiveHit <= m_dropTrkNhitCut) {
245 if(m_debug>0){
246 std::cout<<__FILE__<<" "<<__LINE__<<" drop track by nhit"<<nActiveHit <<" <= "<<m_dropTrkNhitCut<<std::endl;
247 }
248 badQuality=1;
249 }
250 //badQuality = false; //not delete track in this stage
251 if( badQuality) fit_stat=0;
252 }
253 if( fit_stat!=1 ){
254 delete newTrack;
255 //vectrk_for_clean.pop_back();
256 }
257 if( fit_stat==1 ){
258 if(m_debug>0){
259 cout << " global 3d fit success"<<endl;
260 cout<<__FILE__<<__LINE__<<"AFTER fit 3d "<<endl;
261 newTrack->print(std::cout);
262 }
263 TrkExchangePar par = newFit->helix(0.);
264 _d0=par.d0();
265 _phi0=par.phi0();
266 _omega=par.omega();
267 _tanl=par.tanDip();
268 _z0=par.z0();
269
270 double dr = -par.d0();
271 double phi0 = par.phi0()-M_PI/2;
272 if(phi0<0)phi0+=2*M_PI;
273 double kappa = par.omega()*333.567;
274 double dz=par.z0();
275 double tanl=par.tanDip();
276 if(m_debug>0)cout<<"Fit:"<<setw(12)<<dr<<" "<<setw(12)<<phi0<<" "<<setw(12)<<kappa<<" "<<setw(12)<<dz<<" "<<setw(12)<<tanl<<endl<<endl;
277 _circleR=_charge/par.omega();
278 _circleX= sin(par.phi0()) *(par.d0()+1/par.omega()) * -1.; //z axis verse,x_babar = -x_belle
279 _circleY= -1.*cos(par.phi0()) *(par.d0()+1/par.omega()) * -1;//???
280 double pxy=fabs(_circleR/333.567);
281 double pz=pxy*par.tanDip();
282 double pxyz=_charge*sqrt(pxy*pxy+pz*pz);
283 _pt=pxy;
284 _pz=pz;
285 _p=pxyz;
286 if(m_debug>0){
287 cout<<" circle after globle 3d: "<<"("<<_circleX<<","<<_circleY<<","<<_circleR<<")"<<endl;
288 cout<<"pt_rec: "<<_pt<<endl;
289 cout<<"pz_rec: "<<_pz<<endl;
290 cout<<"p_rec: "<<_p<<endl;
291 }
292
293 int nfit3d=0;
294 if(m_debug>0) cout<<" hot list:"<<endl;
295 TrkHotList::hot_iterator hotIter= qhits->hotList().begin();
296 int lay=((MdcHit*)(hotIter->hit()))->layernumber();
297 int wir=((MdcHit*)(hotIter->hit()))->wirenumber();
298 while (hotIter!=qhits->hotList().end()) {
299 if( typeid(*hotIter)==typeid(MdcRecoHitOnTrack) || typeid(*hotIter)==typeid(MdcHitOnTrack)){
300 if(m_debug>0){
301 cout <<"(" <<((MdcHit*)(hotIter->hit()))->layernumber()
302 <<","<<((MdcHit*)(hotIter->hit()))->wirenumber()
303 <<":"<<hotIter->isActive()<<") ";
304 }
305 }else if(typeid(*hotIter)==typeid(CgemHitOnTrack)){
306 if(m_debug>0){
307 const CgemHitOnTrack* recoHot = dynamic_cast<const CgemHitOnTrack*> (&(*hotIter));
308 const RecCgemCluster* recCgemCluster = recoHot->baseHit();
309 cout<<"(" <<recCgemCluster->getlayerid()
310 <<","<<recCgemCluster->getsheetid()
311 <<":"<<hotIter->isActive()<<") ";
312 //<<"clusterID:"<<recCgemCluster->getclusterid()
313 //<<" flag:"<<recCgemCluster->getflag()<<endl;
314 //hotIter++;
315 //continue;
316 }
317 }
318 // cout << "nuse "<<hotIter->hit()->nUsedHits()<<endl;
319 if (hotIter->isActive()==1) nfit3d++;
320 hotIter++;
321 }
322 _nfit=nfit3d;
323 }
324 _chi2_aver=chi2/_nfit;
325 // for(int i=0;i<t_hitCol.size();i++){
326 // delete t_hitCol[i];
327 // }
328 if(m_debug>0) cout<<" in 3D fit number of Active hits : "<<_nfit<<endl;
329 return fit_stat;
330}
double abs(const EvtComplex &c)
Definition: EvtComplex.hh:212
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
double sin(const BesAngle a)
double cos(const BesAngle a)
#define M_PI
Definition: TConstant.h:4
static const CgemCalibFunSvc * _cgemCalibFunSvc
void setCalibSvc(const MdcCalibFunSvc *calibSvc)
Definition: MdcHit.cxx:136
double driftTime(double tof, double z) const
Definition: MdcHit.cxx:142
void setCountPropTime(const bool count)
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
static int wire(const Identifier &id)
virtual Identifier identify() const
Definition: RawData.cxx:15
virtual double chisq() const =0
virtual int nActive() const =0
virtual TrkExchangePar helix(double fltL) const =0
TrkFundHit::hot_iterator begin() const
TrkErrCode fit()
Definition: TrkHitList.cxx:59
TrkHitOnTrk * appendHot(const TrkHitOnTrk *theHot)
Definition: TrkHitList.cxx:91
const TrkHotList & hotList() const
Definition: TrkHitList.cxx:51
virtual int nActive(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
virtual void print(std::ostream &) const
const TrkFit * fitResult() const
Definition: TrkRecoTrk.cxx:387
virtual void printAll(std::ostream &) const
bool setFlipAndDrop(TrkRecoTrk &, bool allowFlips, bool allowDrops) const
TrkRecoTrk * makeTrack(const TrkExchangePar &helix, const double chi2, const TrkContext &, double trackT0) const

◆ fit() [2/2]

int Hough3D::fit ( )

◆ getCharge() [1/2]

int Hough3D::getCharge ( ) const
inline

Definition at line 44 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

44{return _charge;}

◆ getCharge() [2/2]

int Hough3D::getCharge ( ) const
inline

◆ getChi2() [1/2]

double Hough3D::getChi2 ( ) const
inline

Definition at line 69 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

69{return _chi2_aver;}

◆ getChi2() [2/2]

double Hough3D::getChi2 ( ) const
inline

Definition at line 69 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/Hough3D.h.

69{return _chi2_aver;}

◆ getCirR() [1/2]

double Hough3D::getCirR ( ) const
inline

Definition at line 38 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

38{return _circleR;}

◆ getCirR() [2/2]

double Hough3D::getCirR ( ) const
inline

◆ getCirX() [1/2]

double Hough3D::getCirX ( ) const
inline

Definition at line 36 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

36{return _circleX;}

◆ getCirX() [2/2]

double Hough3D::getCirX ( ) const
inline

◆ getCirY() [1/2]

double Hough3D::getCirY ( ) const
inline

Definition at line 37 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

37{return _circleY;}

◆ getCirY() [2/2]

double Hough3D::getCirY ( ) const
inline

◆ getD0() [1/2]

double Hough3D::getD0 ( ) const
inline

Definition at line 39 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

39{return _d0;}

◆ getD0() [2/2]

double Hough3D::getD0 ( ) const
inline

◆ getNfit() [1/2]

int Hough3D::getNfit ( ) const
inline

Definition at line 45 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

45{return _nfit;}

Referenced by HoughTrack::getNfit3D().

◆ getNfit() [2/2]

int Hough3D::getNfit ( ) const
inline

◆ getOmega() [1/2]

double Hough3D::getOmega ( ) const
inline

Definition at line 41 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

41{return _omega;}

◆ getOmega() [2/2]

double Hough3D::getOmega ( ) const
inline

◆ getP() [1/2]

double Hough3D::getP ( ) const
inline

Definition at line 68 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

68{return _p;}

◆ getP() [2/2]

double Hough3D::getP ( ) const
inline

◆ getPhi0() [1/2]

double Hough3D::getPhi0 ( ) const
inline

Definition at line 40 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

40{return _phi0;}

◆ getPhi0() [2/2]

double Hough3D::getPhi0 ( ) const
inline

◆ getPt() [1/2]

double Hough3D::getPt ( ) const
inline

Definition at line 66 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

66{return _pt;}

◆ getPt() [2/2]

double Hough3D::getPt ( ) const
inline

◆ getPz() [1/2]

double Hough3D::getPz ( ) const
inline

Definition at line 67 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

67{return _pz;}

◆ getPz() [2/2]

double Hough3D::getPz ( ) const
inline

◆ getTanl() [1/2]

double Hough3D::getTanl ( ) const
inline

Definition at line 43 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

43{return _tanl;}

◆ getTanl() [2/2]

double Hough3D::getTanl ( ) const
inline

◆ getTrk() [1/2]

TrkRecoTrk * Hough3D::getTrk ( ) const
inline

Definition at line 34 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

34{return newTrack;}

◆ getTrk() [2/2]

TrkRecoTrk * Hough3D::getTrk ( ) const
inline

◆ getVecForClean() [1/2]

vector< MdcHit * > & Hough3D::getVecForClean ( )
inline

Definition at line 46 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

46{return vec_for_clean;}
vector< MdcHit * > vec_for_clean
Definition: Hough3D.cxx:4

Referenced by HoughTrack::getVecForClean3D().

◆ getVecForClean() [2/2]

vector< MdcHit * > & Hough3D::getVecForClean ( )
inline

◆ getZ0() [1/2]

double Hough3D::getZ0 ( ) const
inline

Definition at line 42 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

42{return _z0;}

◆ getZ0() [2/2]

double Hough3D::getZ0 ( ) const
inline

◆ outerHit() [1/2]

void Hough3D::outerHit ( )

Definition at line 341 of file Hough3D.cxx.

341 {
342 for(int ihit=0;ihit<_recHitVec.size();ihit++){
343 if( _recHitVec[ihit].calDriftDist(_bunchT0,0)>0.8 || _recHitVec[ihit].driftTime(_bunchT0,0)>800 ) _recHitVec[ihit].setflag(-5); //flag -5 time or drift
344 }
345
346 vector<int> vec_layer_num[43];
347 for(int ilay=0;ilay<43;ilay++){
348 for(int ihit=0;ihit<_recHitVec.size();ihit++){
349 if( _recHitVec[ihit].getLayerId()==ilay && _recHitVec[ihit].getflag()==0 ) {
350 vec_layer_num[ilay].push_back( _recHitVec[ihit].getWireId() );
351 }
352 }
353 std::sort( vec_layer_num[ilay].begin(),vec_layer_num[ilay].end(),less_layer_3D);
354 if( vec_layer_num[ilay].size() < 4 ) continue;
355 for(int j=0;j<vec_layer_num[ilay].size();j++) {
356 // if( (vec_layer_num[ilay][j]+1 == vec_layer_num[ilay][j+1]) && (vec_layer_num[ilay][j+1]+1 == vec_layer_num[ilay][j+2]) && (vec_layer_num[ilay][j+2]+1 == vec_layer_num[ilay][j+3]) ) {
357 for(int jhit=0;jhit<_recHitVec.size();jhit++) {
358 if( (ilay==_recHitVec[jhit].getLayerId()) && (vec_layer_num[ilay][j]==_recHitVec[jhit].getWireId() ) ) {_recHitVec[jhit].setflag(-1);}
359 }
360 //}
361 }
362 }
363}
bool less_layer_3D(const int &a, const int &b)
Definition: Hough3D.cxx:337

◆ outerHit() [2/2]

void Hough3D::outerHit ( )

◆ print() [1/2]

void Hough3D::print ( )

Definition at line 332 of file Hough3D.cxx.

332 {
333 cout<<" print hough3d "<<endl;
334 cout<<"par: "<<_d0<<" "<<_phi0<<" "<<_omega<<" "<<_tanl<<" "<<_z0<<endl;
335}

◆ print() [2/2]

void Hough3D::print ( )

◆ printRecHit() [1/2]

void Hough3D::printRecHit ( ) const

◆ printRecHit() [2/2]

void Hough3D::printRecHit ( ) const

◆ setBunchT0() [1/2]

void Hough3D::setBunchT0 ( double  bunchT0)
inline

Definition at line 54 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

54{_bunchT0=bunchT0;}

◆ setBunchT0() [2/2]

void Hough3D::setBunchT0 ( double  bunchT0)
inline

◆ setCalib() [1/4]

static void Hough3D::setCalib ( const CgemCalibFunSvc cgemCalibFunSvc)
inlinestatic

Definition at line 59 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

59{_cgemCalibFunSvc=cgemCalibFunSvc;}

◆ setCalib() [2/4]

static void Hough3D::setCalib ( const CgemCalibFunSvc cgemCalibFunSvc)
inlinestatic

◆ setCalib() [3/4]

static void Hough3D::setCalib ( const MdcCalibFunSvc mdcCalibFunSvc)
inlinestatic

◆ setCalib() [4/4]

static void Hough3D::setCalib ( const MdcCalibFunSvc mdcCalibFunSvc)
inlinestatic

◆ setCharge() [1/2]

void Hough3D::setCharge ( int  charge)
inline

Definition at line 56 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

56{_charge=charge;}

◆ setCharge() [2/2]

void Hough3D::setCharge ( int  charge)
inline

◆ setContext() [1/2]

static void Hough3D::setContext ( TrkContextEv context)
inlinestatic

◆ setContext() [2/2]

static void Hough3D::setContext ( TrkContextEv context)
inlinestatic

◆ setD0() [1/2]

void Hough3D::setD0 ( double  d0)
inline

Definition at line 48 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

48{_d0=d0;}

◆ setD0() [2/2]

void Hough3D::setD0 ( double  d0)
inline

◆ setGeomSvc() [1/2]

static void Hough3D::setGeomSvc ( const CgemGeomSvc cgemGeomSvc)
inlinestatic

◆ setGeomSvc() [2/2]

static void Hough3D::setGeomSvc ( const CgemGeomSvc cgemGeomSvc)
inlinestatic

◆ setOmega() [1/2]

void Hough3D::setOmega ( double  omega)
inline

Definition at line 50 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

50{_omega=omega;}

◆ setOmega() [2/2]

void Hough3D::setOmega ( double  omega)
inline

◆ setPhi0() [1/2]

void Hough3D::setPhi0 ( double  phi0)
inline

Definition at line 49 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

49{_phi0=phi0;}

◆ setPhi0() [2/2]

void Hough3D::setPhi0 ( double  phi0)
inline

◆ setRecHit() [1/2]

void Hough3D::setRecHit ( const recHitCol rechit)
inline

Definition at line 55 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

55{_recHitVec=rechit;}

◆ setRecHit() [2/2]

void Hough3D::setRecHit ( const recHitCol rechit)
inline

Definition at line 55 of file Reconstruction/MdcHoughFinder/MdcHoughFinder-00-00-12/MdcHoughFinder/Hough3D.h.

55{_recHitVec=rechit;}

◆ setTanl() [1/2]

void Hough3D::setTanl ( double  tanl)
inline

Definition at line 52 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

52{_tanl=tanl;}

◆ setTanl() [2/2]

void Hough3D::setTanl ( double  tanl)
inline

◆ setZ0() [1/2]

void Hough3D::setZ0 ( double  z0)
inline

Definition at line 51 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

51{_z0=z0;}

◆ setZ0() [2/2]

void Hough3D::setZ0 ( double  z0)
inline

Member Data Documentation

◆ _cgemCalibFunSvc

const CgemCalibFunSvc * Hough3D::_cgemCalibFunSvc =NULL
static

Definition at line 74 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

Referenced by fit(), and setCalib().

◆ _cgemGeomSvc

const CgemGeomSvc * Hough3D::_cgemGeomSvc =NULL
static

Definition at line 75 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

Referenced by fit(), and setGeomSvc().

◆ _context

TrkContextEv * Hough3D::_context =NULL
static

Definition at line 72 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

Referenced by fit(), and setContext().

◆ _mdcCalibFunSvc

const MdcCalibFunSvc * Hough3D::_mdcCalibFunSvc =NULL
static

Definition at line 73 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

Referenced by fit(), and setCalib().

◆ m_debug

int Hough3D::m_debug =0
static

◆ m_dropTrkChi2Cut

double Hough3D::m_dropTrkChi2Cut =99999
static

Definition at line 78 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

Referenced by fit().

◆ m_dropTrkChi2NdfCut

double Hough3D::m_dropTrkChi2NdfCut =99999
static

Definition at line 82 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

Referenced by fit().

◆ m_dropTrkDrCut

double Hough3D::m_dropTrkDrCut =1
static

Definition at line 79 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

Referenced by fit().

◆ m_dropTrkDzCut

double Hough3D::m_dropTrkDzCut =10
static

Definition at line 80 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

Referenced by fit().

◆ m_dropTrkNhitCut

double Hough3D::m_dropTrkNhitCut =9
static

Definition at line 81 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

Referenced by fit().

◆ m_qualityFactor

int Hough3D::m_qualityFactor =3
static

Definition at line 77 of file InstallArea/include/MdcHoughFinder/MdcHoughFinder/Hough3D.h.

Referenced by fit().


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