18#include "CLHEP/Alist/AList.h"
37#include "GaudiKernel/NTuple.h"
67 for (
int j = 0; j <
nPly(); j++) {
75 if(3==
_debug) std::cout<<std::endl<<
"=====MdcSegGrouperAx::fillWithSegs====="<<std::endl;
78 for (
int isuper = 0; isuper <
_gm->
nSuper(); isuper++) {
80 if (inList->
count() == 0)
continue;
94 for (
int iseg = 0; iseg < (int)
segList[isuper].length(); iseg++) {
98 segList[isuper].insert(inSeg, iseg);
102 if (isInserted == 0)
segList[isuper].append(inSeg);
128 if (testSeg == 0)
return 0;
140 double refPhi0 = refInfo->
phi0();
141 double testPhi0 = testInfo->
phi0();
142 double corrPhi0 =
mdcWrapAng(refPhi0, testPhi0);
146 double refCurv = refInfo->
curv();
147 double testCurv = testInfo->
curv();
194 std::cout<< endl<<
" test " << std::endl;
195 std::cout<<
"seed seg: "; refSeg->
plotSegAll(); std::cout<< std::endl;
196 std::cout<<
"test seg: "; testSeg->
plotSegAll(); std::cout<< std::endl;
197 std::cout<<
" dPhi0 abnormal "<<corrPhi0 - refPhi0<<std::endl;
201 std::cout<< endl<<
" test " << std::endl;
202 std::cout<<
"seed seg: "; refSeg->
plotSegAll(); std::cout<< std::endl;
203 std::cout<<
"test seg: "; testSeg->
plotSegAll(); std::cout<< std::endl;
204 std::cout<<
" dPhi0 ok " <<setprecision(3)<< corrPhi0 - refPhi0<<std::endl;
210 cout<<setiosflags(ios::fixed);
212 if (fabs(corrPhi0 - refPhi0) > phi0Cut) {
213 if(3 ==
_debug) std::cout <<
" SKIP by dPhi0 "
214 <<fabs(corrPhi0-refPhi0)<<
">"<<phi0Cut<<std::endl;
220 if(3 ==
_debug)std::cout<<
" dphi " <<setprecision(3)<< fabs(corrPhi0 - refPhi0);
226 if (fabs(refCurv - testCurv) > curvCut){
227 if(3 ==
_debug) std::cout <<
" SKIP by dCurv"
228 <<fabs(refCurv-testCurv)<<
">"<<curvCut<<std::endl;
231 if(3 ==
_debug)std::cout<<
" dCurv " <<setprecision(3)<< fabs(refCurv - testCurv);
233 if(3 ==
_debug) std::cout <<
" KEEP "<<std::endl;
235 cout<<setprecision(6);
236 cout<<setiosflags(ios::scientific);
256 for (i = 0; i <
nDeep; i++) {
274 thisSlay = thisSlay->
next()) {
275 bool noGoodYet =
true;
278 if (thisSlay == seedSlay)
continue;
279 if (thisSlay->whichView() != 0)
continue;
289 std::cout<<std::endl<<
"--match axial seg by phi in slayer "
290 <<thisSlay->slayNum()<<
"--"<<std::endl;
295 for (
int i = 0; i < (int)
segList[islay-1].length(); i++) {
303 }
else if (invalid > 0) {
306 for (
int j = i; j < (int)
segList[islay-1].length(); j++)
NTuple::Item< double > g_combAxMcPt
NTuple::Item< double > g_combAxQualitySeed
NTuple::Item< double > g_combAxMcAmbigTest
NTuple::Item< double > g_combAxMcTheta
NTuple::Item< double > g_combAxQualityTest
NTuple::Item< double > g_combAxdCurv
NTuple::Item< double > g_combAxdPhi0
NTuple::Item< double > g_combAxMc
NTuple::Tuple * g_tupleCombAx
NTuple::Item< double > g_combAxMcAmbigSeed
NTuple::Item< double > g_combAxMcPt
double MdcTrkReconCut_combAxCurv
NTuple::Item< double > g_combAxSlTest
NTuple::Item< double > g_combAxQualitySeed
NTuple::Item< double > g_combAxPatSeed
double MdcTrkReconCut_combAxPhi0
NTuple::Item< double > g_combAxMcAmbigTest
double MdcTrkReconCut_combAxPhi0Cut
NTuple::Item< double > g_combAxMcTheta
NTuple::Item< double > g_combAxQualityTest
NTuple::Item< double > g_combAxNhitTest
NTuple::Item< double > g_combAxSigPhi0
NTuple::Item< double > g_combAxdCurv
NTuple::Item< double > g_combAxSigCurv
NTuple::Item< double > g_combAxdPhi0
double MdcTrkReconCut_combAxCurvCut
NTuple::Item< double > g_combAxPatTest
NTuple::Item< double > g_combAxNhitSeed
NTuple::Item< double > g_combAxMc
NTuple::Item< double > g_combAxSlSeed
NTuple::Tuple * g_tupleCombAx
NTuple::Item< double > g_combAxMcAmbigSeed
NTuple::Item< double > g_combAxMcPhi
double MdcTrkReconCut_combAxPhi0Cut
double MdcTrkReconCut_combAxCurvCut
GmsListLink * next() const
GmsListLink * first() const
unsigned int count() const
const MdcSuperLayer * firstSlay(void) const
virtual MdcTrack * storePar(MdcTrack *, double parms[2], double chisq, TrkContext &, double trackT0)
void resetComb(const MdcSeg *seed)
virtual int incompWithSeg(const MdcSeg *refSeg, const MdcSeg *testSeg)
void fillWithSegs(const MdcSegList *inSegs)
virtual int incompWithGroup(MdcSeg **segGroup, const MdcSeg *testSeg, int iply)
MdcSegGrouperAx(const MdcDetector *gm, int debug)
HepAList< MdcSeg > * segList
HepAList< MdcSeg > ** combList
void calcFromOrigin(const MdcSeg *parentSeg)
const GmsList * oneList(int slayIndex) const
const MdcSuperLayer * superlayer() const
double testCombSegTheta() const
double testCombSegAmbig() const
double testCombSeg(const MdcSeg *) const
MdcSegInfo * info() const
unsigned int quality() const
double testCombSegPt() const
void setInfo(MdcSegInfo *ptr)
const MdcSuperLayer * next(void) const
int whichView(void) const
double mdcWrapAng(double phi1, double phi2)