BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcSeg Class Reference

#include <MdcSeg.h>

+ Inheritance diagram for MdcSeg:

Public Member Functions

 MdcSeg (double bunchT)
 
virtual ~MdcSeg ()
 
double phi () const
 
double slope () const
 
double chisq () const
 
unsigned int quality () const
 
const double * errmat () const
 
const MdcSuperLayersuperlayer () const
 
MdcSegInfoinfo () const
 
void setInfo (MdcSegInfo *ptr)
 
void setAmbig ()
 
void setUsed ()
 
void setFull ()
 
void setPattern (unsigned thePatt)
 
int segAmbig ()
 
int segUsed ()
 
int segFull ()
 
unsigned segPattern () const
 
double bunchTime ()
 
void plotSeg () const
 
void plotSegAll () const
 
void setValues (int nInPatt, int nhit, MdcHit *hits[], MdcLine *span, const MdcSuperLayer *slay, int ambig[])
 
void setValues (int nInPatt, double inPhi, double inSlope, double chi2, double inError[3], const MdcSuperLayer *slay)
 
int addHits (MdcLine *span, MdcHit *hits[], const MdcHitMap *, double corr)
 
void markHits (const MdcMap< const MdcHit *, MdcSegUsage * > &usedHits) const
 
void append (MdcHitUse *)
 
void remove (MdcHitUse *)
 
int nHit () const
 
MdcHitUsehit (int i) const
 
double testCombSeg (const MdcSeg *) const
 
double testCombSegPt () const
 
double testCombSegTheta () const
 
double testCombSegPhi () const
 
double testCombSegAmbig () const
 
MdcSegoperator= (const MdcSeg &)
 
 MdcSeg (const MdcSeg &)
 

Static Public Member Functions

static MdcSegParamssegPar ()
 
static void setParam (MdcSegParams *segpar)
 

Additional Inherited Members

Detailed Description

Definition at line 41 of file MdcSeg.h.

Constructor & Destructor Documentation

◆ MdcSeg() [1/2]

MdcSeg::MdcSeg ( double  bunchT)

Definition at line 35 of file MdcSeg.cxx.

35 {
36//------------------------------------------------------------------------
37 _info = 0;
38 _bunchTime = bt;
39}

◆ ~MdcSeg()

MdcSeg::~MdcSeg ( )
virtual

Definition at line 42 of file MdcSeg.cxx.

42 {
43//------------------------------------------------------------------------
44 if (_info != 0) delete _info;
45 reset(); // delete Hots
46}

◆ MdcSeg() [2/2]

MdcSeg::MdcSeg ( const MdcSeg other)

Definition at line 49 of file MdcSeg.cxx.

49 :
50 GmsListLink(), _slayer(other._slayer), _phi(other._phi), _slope(other._slope), _chisq(other._chisq), _qual(other._qual), _pattern(other._pattern), _info(other._info), _bunchTime(other._bunchTime)
51 //------------------------------------------------------------------------
52{
53 HepAListDeleteAll(_theList);
54 for(int i=0; i<other.nHit(); i++){
55 _theList.append(other.hit(i));
56 }
57 for(int j=0; j<3; j++){
58 _errmat[0] = other._errmat[0];
59 _errmat[1] = other._errmat[1];
60 _errmat[2] = other._errmat[2];
61 }
62 segParam = other.segParam;
63}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

Member Function Documentation

◆ addHits()

int MdcSeg::addHits ( MdcLine span,
MdcHit hits[],
const MdcHitMap ,
double  corr 
)

Definition at line 230 of file MdcSeg.cxx.

231 {
232 //------------------------------------------------------------------------
233
234 /* Pick up hits adjacent to an existing segment. Output final number of
235 hits. Note: input hits are not refound. It picks up hits
236 in cells that the segment should pass through, checking that they
237 have a plausible drift distance. In event of a wraparound (i.e. track that
238 passes through 2pi), all angles are relative to phiseg (i.e. if phiseg is
239 just above 0, some phi's may be negative). */
240 //****
241
242 int cell[2], ambig[2]; //wire # and ambig for cells in current layer
243 double phiwire[2];
244 int cellused[4] = {0}; // list of wire #'s of existing hits in span
245 int lAdded = 0;
246 int nhits = nHit();
247 int m_debug = 0;
248
249 // Note the hits already in the fit, so we don't pick them up again.
250 int firstnum = superlayer()->firstLayer()->layNum();
251 for (int i = 0; i < nHit(); i++) {
252 const MdcHit* dHit = hit(i)->mdcHit();
253 int laynum = dHit->layernumber();
254 cellused[laynum - firstnum ] = dHit->wirenumber();
255 }
256
257 // Loop through the layers, predicting cells that could be hit.
258 // for (int layIndex = 0; layIndex < 4; layIndex++) {
259 for (int layIndex = 0; layIndex < superlayer()->nLayers(); layIndex++) {
260 const MdcLayer *layer = superlayer()->layer(layIndex);
261 int laynum = layer->layNum();
262
263 // Calc. projected phi of hit
264 double rinv = 1. / layer->rMid();
265 double ncellinv = 1. / (double) layer->nWires();
266 double phiproj = phi() + (layer->rMid() - superlayer()->rad0()) * slope();
267 // Calc. nearest wire.
268 BesAngle tmp(phiproj - layer->phiOffset());
269 cell[0] = (int) floor(layer->nWires() *
270 tmp.rad() / twoPi + 0.5);
271 cell[0] = mdcWrapWire( cell[0], layer->nWires() );
272 phiwire[0] = mdcWrapAng( phi(), cell[0] * twoPi * ncellinv +
273 layer->phiOffset() );
274 // Which ambiguity? +1 if phi(wire) < phi(projected).
275 ambig[0] = (phiwire[0] < phiproj) ? 1 : -1;
276
277 // Now next nearest wire.
278 ambig[1] = -ambig[0];
279 cell[1] = mdcWrapWire( cell[0] + ambig[0], layer->nWires() );
280 phiwire[1] = mdcWrapAng( phi(), cell[1] * twoPi * ncellinv +
281 layer->phiOffset() );
282
283 if(m_debug) std::cout<< " loop over the two possible wires " << std::endl;
284 //*** Loop over the two possible wires.
285 for (int iroad = 0; iroad < 2; iroad++) {
286 if (cellused[laynum - firstnum] == cell[iroad]) continue;
287 if(m_debug) std::cout<< "possible wires "<<laynum<<" "<<cell[iroad]<<std::endl;
288 if (map->hitWire(laynum, cell[iroad]) != 0) {
289 MdcHit *ahit = map->hitWire(laynum, cell[iroad]);
290 // if hit is already used, skip it!
291 if (ahit->usedHit()) {
292 if(m_debug) std::cout<< "hit used continue " <<std::endl;
293 continue;
294 }
295 // drift as delphi
296 // FIXME: flip ambiguity for incoming tracks
297 double phidrift = ahit->driftDist(bunchTime(), ambig[iroad]) * corr * rinv;
298 double phihit = mdcWrapAng( phi(), phidrift * ambig[iroad] + ahit->phi());
299
300 // Check the drift distance.
301 double sigphi = corr * ahit->sigma(bunchTime(), 0) * rinv;
302 // Skip hit if more than n sigma away from track.
303 if ( g_nSigAdd && fabs(sigphi)>0.0001 ) { g_nSigAdd->fill(fabs(phihit - phiproj) / sigphi); }//yzhang hist cut
304 if ( fabs(phihit - phiproj) > sigphi * segParam->nsigAddHit ) {
305 if(m_debug) std::cout<< fabs(phihit-phiproj) <<"> add hit sigma "
306 << sigphi<< "*"<< segParam->nsigAddHit <<"="<<sigphi*segParam->nsigAddHit<<std::endl;
307 continue;
308 }
309
310 // Load hit for refitting
311 lAdded = 1;
312 span->sigma[nhits] = sigphi;
313 span->x[nhits] = layer->rMid() - superlayer()->rad0();
314 span->y[nhits] = mdcWrapAng(span->y[0], phihit);
315
316 // Add this hit to segment
317 MdcHitUse *alink = new MdcHitUse(*ahit, superlayer()->rad0(),
318 ambig[iroad]);
319 append(alink);
320 //std::cout<< __FILE__ << " " << __LINE__ << " addhit "<<std::endl;
321
322 nhits++;
323 } // end if hit wire
324
325 } // end loop over 2 cells
326
327 } // end layer loop
328
329 if (lAdded) {
330 span->fit(nhits);
331 BesAngle tmpAngle(span->intercept);
332 span->intercept = tmpAngle;
333 _phi = span->intercept;
334 _slope = span->slope;
335 _chisq = span->chisq;
336 _errmat[0] = span->errmat[0];
337 _errmat[1] = span->errmat[1];
338 _errmat[2] = span->errmat[2];
339 }
340
341 return nhits;
342}
AIDA::IHistogram1D * g_nSigAdd
Definition: MdcHistItem.h:27
const double twoPi
Definition: MdcSeg.cxx:33
const MdcHit * mdcHit() const
Definition: MdcHitUse.cxx:69
Definition: MdcHit.h:44
unsigned layernumber() const
Definition: MdcHit.h:61
unsigned wirenumber() const
Definition: MdcHit.h:62
double phi() const
Definition: MdcHit.h:75
double sigma(double, int, double, double, double) const
Definition: MdcHit.cxx:184
double driftDist(double, int, double, double, double) const
Definition: MdcHit.cxx:156
double rMid(void) const
Definition: MdcLayer.h:36
double phiOffset(void) const
Definition: MdcLayer.h:47
int nWires(void) const
Definition: MdcLayer.h:30
int layNum(void) const
Definition: MdcLayer.h:29
double * x
Definition: MdcLine.h:15
double intercept
Definition: MdcLine.h:21
double * y
Definition: MdcLine.h:16
double slope
Definition: MdcLine.h:20
double chisq
Definition: MdcLine.h:22
double errmat[3]
Definition: MdcLine.h:23
int fit(int nUse)
Definition: MdcLine.cxx:10
double * sigma
Definition: MdcLine.h:17
double nsigAddHit
Definition: MdcSegParams.h:22
double bunchTime()
Definition: MdcSeg.h:62
const MdcSuperLayer * superlayer() const
Definition: MdcSeg.h:51
int nHit() const
Definition: MdcSeg.cxx:368
void append(MdcHitUse *)
Definition: MdcSeg.cxx:353
double phi() const
Definition: MdcSeg.h:46
double slope() const
Definition: MdcSeg.h:47
MdcHitUse * hit(int i) const
Definition: MdcSeg.h:77
double rad0(void) const
Definition: MdcSuperLayer.h:24
int nLayers(void) const
Definition: MdcSuperLayer.h:44
const MdcLayer * layer(int i) const
Definition: MdcSuperLayer.h:45
const MdcLayer * firstLayer(void) const
Definition: MdcSuperLayer.h:37
bool usedHit(void) const
Definition: TrkFundHit.h:57
double mdcWrapAng(double phi1, double phi2)
Definition: mdcWrapAng.h:12
int mdcWrapWire(int wireIn, int nCell)
Definition: mdcWrapWire.h:6
int nhits

◆ append()

void MdcSeg::append ( MdcHitUse theHitUse)

Definition at line 353 of file MdcSeg.cxx.

353 {
354 //------------------------------------------------------------------------
355 _theList.append(theHitUse);
356}

Referenced by addHits(), and setValues().

◆ bunchTime()

double MdcSeg::bunchTime ( )
inline

Definition at line 62 of file MdcSeg.h.

62{return _bunchTime;}

Referenced by addHits(), MdcSegGrouper::calcParByHits(), and MdcSegInfoSterO::calcStereo().

◆ chisq()

double MdcSeg::chisq ( ) const
inline

Definition at line 48 of file MdcSeg.h.

48{return _chisq;}

Referenced by plotSegAll().

◆ errmat()

const double * MdcSeg::errmat ( ) const
inline

Definition at line 50 of file MdcSeg.h.

50{return _errmat;}

Referenced by MdcSegInfoAxialO::calcFromOrigin(), MdcSegInfoSterO::calcStereo(), and MdcSegInfoCsmc::calcStraight().

◆ hit()

◆ info()

◆ markHits()

void MdcSeg::markHits ( const MdcMap< const MdcHit *, MdcSegUsage * > &  usedHits) const

Definition at line 148 of file MdcSeg.cxx.

148 {
149 //------------------------------------------------------------------------
150 for (int i = 0; i < nHit(); i++) {
151 MdcHitUse *alink = _theList[i];
152 MdcSegUsage *x ;
153 if ( usedHits.get( alink->mdcHit() , x) ) x->setUsedAmbig( alink->ambig() );
154 }
155}
Double_t x[10]
int ambig() const
Definition: MdcHitUse.h:32
bool get(const K &theKey, V &theAnswer) const

◆ nHit()

int MdcSeg::nHit ( ) const

◆ operator=()

MdcSeg & MdcSeg::operator= ( const MdcSeg other)

Definition at line 67 of file MdcSeg.cxx.

67 {
68 //------------------------------------------------------------------------
69 if(&other != this){
70
71 HepAListDeleteAll(_theList);
72 for(int i=0; i<other.nHit(); i++){
73 _theList.append(other.hit(i));
74 }
75 _slayer = other._slayer;
76 _phi = other._phi;
77 _slope= other._slope;
78 _errmat[0] = other._errmat[0];
79 _errmat[1] = other._errmat[1];
80 _errmat[2] = other._errmat[2];
81 _chisq = other._chisq;
82 _qual = other._qual;
83 _pattern = other._pattern;
84 _info = other._info;
85 _bunchTime = other._bunchTime;
86 segParam = other.segParam;
87 }
88
89 return *this;
90}

◆ phi()

double MdcSeg::phi ( ) const
inline

◆ plotSeg()

void MdcSeg::plotSeg ( ) const

Definition at line 194 of file MdcSeg.cxx.

194 {
195 //------------------------------------------------------------------------
196 std::cout<<superlayer()->slayNum()<<" pat"<<segPattern()<<" ";
197 for (int ihit=0 ; ihit< nHit() ; ihit++){
198 hit(ihit)->mdcHit()->print(std::cout);//print hit
199 std::cout <<hit(ihit)->ambig()<<" ";
200 }
201 if (info()!=NULL){
202 cout<< " . ";
203 }
204 //std::cout << std::endl;
205}
#define NULL
void print(std::ostream &o) const
Definition: MdcHit.cxx:121
MdcSegInfo * info() const
Definition: MdcSeg.h:52
unsigned segPattern() const
Definition: MdcSeg.h:61
int slayNum(void) const
Definition: MdcSuperLayer.h:43

Referenced by MdcSegInfoSterO::calcStereo(), MdcSegGrouperSt::fillWithSegs(), and MdcSegGrouperSt::incompWithGroup().

◆ plotSegAll()

void MdcSeg::plotSegAll ( ) const

Definition at line 159 of file MdcSeg.cxx.

159 {
160 //------------------------------------------------------------------------
161 //print hit
162 //if(superlayer()!=NULL) std::cout<<"sl"<<superlayer()->slayNum()<<" p"<<segPattern()<<" st"<<quality();
163 for (int ihit=0 ; ihit< nHit() ; ihit++){
164 hit(ihit)->mdcHit()->print(std::cout);
165 std::cout << setw(2)<<hit(ihit)->ambig()<<" ";
166 }
167
168 cout<<setiosflags(ios::fixed);
169 if (info()!=NULL){
170 std::cout<< " phi " << setprecision(2) << phi()
171 << " slope " <<std::setw(2)<< setprecision(2) <<slope()<<" ";
172 if(superlayer()->whichView()==0){
173 std::cout <<setprecision (2) <<"phi0="<<info()->par(0);
174 cout<<setprecision(5)<<" cpa="<<info()->par(1);
175 }else{
176 std::cout <<setprecision(2)<<"z0="<<info()->par(0)
177 <<setprecision(2)<<" ct="<<info()->par(1);
178 }
179 if(fabs(info()->arc())>0.0001){
180 std::cout<<setprecision(2)<<" arc="<<info()->arc();
181 }
182 std::cout<<setprecision(3)<<" chi2="<<_chisq;
183 }else{
184 std::cout<< " phi " << setprecision(2) << phi()
185 << " slope " <<std::setw(2)<< setprecision(2) <<slope()
186 << " chi2 "<<setprecision(3) <<chisq();
187 }
188
189 cout<<setprecision(6);
190 cout<<setiosflags(ios::scientific);
191}
double arc() const
Definition: MdcSegInfo.h:44
double par(int i) const
Definition: MdcSegInfo.h:43
double chisq() const
Definition: MdcSeg.h:48

Referenced by MdcSegGrouper::combineSegs(), MdcTrackList::dumpSeed(), MdcSegGrouperAx::incompWithSeg(), MdcSegList::plot(), and MdcSegGrouper::transferHits().

◆ quality()

unsigned int MdcSeg::quality ( ) const
inline

Definition at line 49 of file MdcSeg.h.

49{return _qual;}

Referenced by MdcSegGrouperAx::incompWithSeg().

◆ remove()

void MdcSeg::remove ( MdcHitUse theHitUse)

Definition at line 360 of file MdcSeg.cxx.

360 {
361 //------------------------------------------------------------------------
362 _theList.remove(theHitUse);
363 delete theHitUse;
364}

◆ segAmbig()

int MdcSeg::segAmbig ( )
inline

Definition at line 58 of file MdcSeg.h.

58{return (_qual & segAmbigFlag);}
const unsigned segAmbigFlag
Definition: MdcSeg.h:37

◆ segFull()

int MdcSeg::segFull ( )
inline

Definition at line 60 of file MdcSeg.h.

60{return (_qual & segFullFlag);}
const unsigned segFullFlag
Definition: MdcSeg.h:36

◆ segPar()

static MdcSegParams * MdcSeg::segPar ( )
inlinestatic

Definition at line 79 of file MdcSeg.h.

79{return segParam;}

Referenced by MdcSegGrouperSt::fillWithSegs(), MdcSegGrouperSt::incompWithGroup(), and MdcSegList::setPlot().

◆ segPattern()

unsigned MdcSeg::segPattern ( ) const
inline

Definition at line 61 of file MdcSeg.h.

61{return _pattern;}

Referenced by plotSeg().

◆ segUsed()

int MdcSeg::segUsed ( )
inline

Definition at line 59 of file MdcSeg.h.

59{return (_qual & segUsedFlag);}
const unsigned segUsedFlag
Definition: MdcSeg.h:38

◆ setAmbig()

void MdcSeg::setAmbig ( )
inline

Definition at line 54 of file MdcSeg.h.

54{_qual |= segAmbigFlag;}

◆ setFull()

void MdcSeg::setFull ( )
inline

Definition at line 56 of file MdcSeg.h.

56{_qual |= segFullFlag;}

◆ setInfo()

void MdcSeg::setInfo ( MdcSegInfo ptr)

Definition at line 96 of file MdcSeg.cxx.

96 {
97 //------------------------------------------------------------------------
98 delete _info; // if any
99 _info = newInfo;
100}

Referenced by MdcSegGrouperAx::fillWithSegs(), MdcSegGrouperCsmc::fillWithSegs(), and MdcSegGrouperSt::fillWithSegs().

◆ setParam()

static void MdcSeg::setParam ( MdcSegParams segpar)
inlinestatic

Definition at line 80 of file MdcSeg.h.

80{segParam = segpar;}

Referenced by MdcSegList::MdcSegList().

◆ setPattern()

void MdcSeg::setPattern ( unsigned  thePatt)
inline

Definition at line 57 of file MdcSeg.h.

57{_pattern = thePatt;}

◆ setUsed()

void MdcSeg::setUsed ( )
inline

Definition at line 55 of file MdcSeg.h.

55{_qual |= segUsedFlag;}

Referenced by MdcSegGrouper::transferHits().

◆ setValues() [1/2]

void MdcSeg::setValues ( int  nInPatt,
double  inPhi,
double  inSlope,
double  chi2,
double  inError[3],
const MdcSuperLayer slay 
)

Definition at line 128 of file MdcSeg.cxx.

129 {
130 //------------------------------------------------------------------------
131 // Sets segment values with no associated hits
132 _qual = 0;
133 if (nInPatt == 4) _qual |= segFullFlag;
134 _phi = inPhi;
135 _slope = inSlope;
136 _chisq = chi2;
137 _errmat[0] = inError[0];
138 _errmat[1] = inError[1];
139 _errmat[2] = inError[2];
140 _slayer = slay;
141 reset(); // clears hit list
142
143 return;
144}

◆ setValues() [2/2]

void MdcSeg::setValues ( int  nInPatt,
int  nhit,
MdcHit hits[],
MdcLine span,
const MdcSuperLayer slay,
int  ambig[] 
)

Definition at line 104 of file MdcSeg.cxx.

105 {
106 //------------------------------------------------------------------------
107 _qual = 0;
108 if (nInPatt == 4) _qual |= segFullFlag;
109 _phi = BesAngle(span->intercept);
110 _slope = span->slope;
111 _chisq = span->chisq;
112 _errmat[0] = span->errmat[0];
113 _errmat[1] = span->errmat[1];
114 _errmat[2] = span->errmat[2];
115 reset();
116 _slayer = slay;
117 for (int i = 0; i < nhit; i++) {
118 MdcHitUse *alink = new MdcHitUse(*(hits[i]), superlayer()->rad0(),
119 ambig[i]);
120 append(alink);
121 }
122
123 return;
124}

◆ slope()

double MdcSeg::slope ( ) const
inline

◆ superlayer()

◆ testCombSeg()

double MdcSeg::testCombSeg ( const MdcSeg testSeg) const

Definition at line 376 of file MdcSeg.cxx.

376 {
377 //------------------------------------------------------------------------
378 int tkId= -1;
379 for (int i=0; i<nHit(); i++){
380 const MdcHit* h = hit(i)->mdcHit();
381 unsigned int l = h->layernumber();
382 unsigned int w = h->wirenumber();
383 //std::cout<< __FILE__ << " ref " << i << " haveDigiTk("<<l<<","<<w<<")"<<haveDigiTk[l][w]<<std::endl;
384 if ( haveDigiTk[l][w]<0 || haveDigiTk[l][w]>100 ) continue;
385 if (tkId<0){
386 tkId = haveDigiTk[l][w];
387 }else if (haveDigiTk[l][w] != tkId){
388 return -1;//hits in this seg not in same mc track
389 }
390 }//end for
391
392 double nSame = 0.;
393 for (int i=0; i<testSeg->nHit(); i++){
394 const MdcHit* h = testSeg->hit(i)->mdcHit();
395 unsigned int l = h->layernumber();
396 unsigned int w = h->wirenumber();
397 if (haveDigiTk[l][w] == tkId){
398 ++nSame;
399 }
400 }
401
402 return nSame/testSeg->nHit();
403}
double w
int haveDigiTk[43][288]
Definition: MdcHistItem.h:254

Referenced by MdcSegGrouperAx::incompWithSeg().

◆ testCombSegAmbig()

double MdcSeg::testCombSegAmbig ( ) const

Definition at line 458 of file MdcSeg.cxx.

458 {
459 //------------------------------------------------------------------------
460 double ambigOk = 0.;
461 for (int i=0; i<nHit(); i++){
462 const MdcHit* h = hit(i)->mdcHit();
463 unsigned int l = h->layernumber();
464 unsigned int w = h->wirenumber();
465 if( hit(i)->ambig() == haveDigiAmbig[l][w] ) ambigOk++;
466 }//end for
467
468 return ambigOk/nHit();
469}
int haveDigiAmbig[43][288]
Definition: MdcHistItem.h:259

Referenced by MdcSegGrouperAx::incompWithSeg().

◆ testCombSegPhi()

double MdcSeg::testCombSegPhi ( ) const

Definition at line 441 of file MdcSeg.cxx.

441 {
442 //------------------------------------------------------------------------
443 double truthPhi = -999.;
444 for (int i=0; i<nHit(); i++){
445 const MdcHit* h = hit(i)->mdcHit();
446 unsigned int l = h->layernumber();
447 unsigned int w = h->wirenumber();
448 if ( haveDigiPhi[l][w]<-998. ) continue;
449 //std::cout<< __FILE__ << " " << __LINE__ << " haveDigiPhi("<<l<<","<<w<<")"<<haveDigiPhi[l][w]<<std::endl;
450 if (truthPhi<-998.){ truthPhi = haveDigiPhi[l][w]; }
451 }//end for
452
453 return truthPhi;
454}
double haveDigiPhi[43][288]
Definition: MdcHistItem.h:257

◆ testCombSegPt()

double MdcSeg::testCombSegPt ( ) const

Definition at line 407 of file MdcSeg.cxx.

407 {
408 //------------------------------------------------------------------------
409 double truthPt = -1.;
410 for (int i=0; i<nHit(); i++){
411 const MdcHit* h = hit(i)->mdcHit();
412 unsigned int l = h->layernumber();
413 unsigned int w = h->wirenumber();
414 if ( haveDigiPt[l][w]<0 ) continue;
415 //std::cout<< __FILE__ << " " << __LINE__ << " haveDigiPt("<<l<<","<<w<<")"<<haveDigiPt[l][w]<<std::endl;
416 if (truthPt<0){ truthPt = haveDigiPt[l][w]; }
417 }//end for
418
419 return truthPt;
420}
double haveDigiPt[43][288]
Definition: MdcHistItem.h:255

Referenced by MdcSegGrouperAx::incompWithSeg().

◆ testCombSegTheta()

double MdcSeg::testCombSegTheta ( ) const

Definition at line 424 of file MdcSeg.cxx.

424 {
425 //------------------------------------------------------------------------
426 double truthTheta = -999.;
427 for (int i=0; i<nHit(); i++){
428 const MdcHit* h = hit(i)->mdcHit();
429 unsigned int l = h->layernumber();
430 unsigned int w = h->wirenumber();
431 if ( haveDigiTheta[l][w]<-998. ) continue;
432 //std::cout<< __FILE__ << " " << __LINE__ << " haveDigiTheta("<<l<<","<<w<<")"<<haveDigiTheta[l][w]<<std::endl;
433 if (truthTheta<-998.){ truthTheta = haveDigiTheta[l][w]; }
434 }//end for
435
436 return truthTheta;
437}
double haveDigiTheta[43][288]
Definition: MdcHistItem.h:256

Referenced by MdcSegGrouperAx::incompWithSeg().


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