#include <TrackSegmentAtNu.h>
Inheritance diagram for TrackSegmentAtNu:

Definition at line 7 of file TrackSegmentAtNu.h.
| TrackSegmentAtNu::TrackSegmentAtNu | ( | ) |
| TrackSegmentAtNu::TrackSegmentAtNu | ( | ClusterAtNu * | clrm, | |
| ClusterAtNu * | clr0, | |||
| ClusterAtNu * | clrp | |||
| ) |
Definition at line 14 of file TrackSegmentAtNu.cxx.
References AddCluster().
00014 : 00015 fClrList(0), 00016 fBegTriList(0), fEndTriList(0), 00017 fBegAssocTriList(0), fEndAssocTriList(0), 00018 fBegSegList(0), fEndSegList(0), 00019 fSegment(0), 00020 fTrkFlag(0),fTmpTrkFlag(0),fNPlanes(0) 00021 { 00022 00023 this->AddCluster(clrm); this->AddCluster(clr0); this->AddCluster(clrp); 00024 }
| TrackSegmentAtNu::TrackSegmentAtNu | ( | const TrackSegmentAtNu & | rhs | ) |
Definition at line 26 of file TrackSegmentAtNu.cxx.
00026 : 00027 ObjTrackAtNu(rhs), 00028 fClrList(rhs.fClrList), 00029 fBegTriList(rhs.fBegTriList), 00030 fEndTriList(rhs.fEndTriList), 00031 fBegAssocTriList(rhs.fBegAssocTriList), 00032 fEndAssocTriList(rhs.fEndAssocTriList), 00033 fBegSegList(rhs.fBegSegList), 00034 fEndSegList(rhs.fEndSegList), 00035 fSegment(rhs.fSegment), 00036 fTrkFlag(rhs.fTrkFlag), 00037 fTmpTrkFlag(rhs.fTmpTrkFlag), 00038 fNPlanes(rhs.fNPlanes) 00039 { 00040 00041 }
| TrackSegmentAtNu::~TrackSegmentAtNu | ( | ) |
Definition at line 43 of file TrackSegmentAtNu.cxx.
References fBegAssocTriList, fBegSegList, fBegTriList, fClrList, fEndAssocTriList, fEndSegList, and fEndTriList.
00044 { 00045 if(fClrList) delete fClrList; 00046 if(fBegTriList) delete fBegTriList; 00047 if(fEndTriList) delete fEndTriList; 00048 if(fBegAssocTriList) delete fBegAssocTriList; 00049 if(fEndAssocTriList) delete fEndAssocTriList; 00050 if(fBegSegList) delete fBegSegList; 00051 if(fEndSegList) delete fEndSegList; 00052 }
| void TrackSegmentAtNu::AddAssocTriToBeg | ( | TrackSegmentAtNu * | segment | ) |
Definition at line 127 of file TrackSegmentAtNu.cxx.
References fBegAssocTriList.
00128 { 00129 if(!fBegAssocTriList) fBegAssocTriList = new TObjArray(); 00130 fBegAssocTriList->Add(segment); 00131 return; 00132 }
| void TrackSegmentAtNu::AddAssocTriToEnd | ( | TrackSegmentAtNu * | segment | ) |
Definition at line 144 of file TrackSegmentAtNu.cxx.
References fEndAssocTriList.
00145 { 00146 if(!fEndAssocTriList) fEndAssocTriList = new TObjArray(); 00147 fEndAssocTriList->Add(segment); 00148 return; 00149 }
| void TrackSegmentAtNu::AddCluster | ( | ClusterAtNu * | cluster | ) |
Definition at line 62 of file TrackSegmentAtNu.cxx.
References ObjTrackAtNu::AddHitToTrack(), and fClrList.
Referenced by AddSegment(), and TrackSegmentAtNu().
00063 { 00064 if(!fClrList) fClrList = new TObjArray(); 00065 if(!this->ContainsClr(cluster)){ 00066 fClrList->Add(cluster); 00067 for(Int_t i=0;i<1+cluster->GetHitLast();i++){ 00068 HitAtNu* hit = (HitAtNu*)(cluster->GetHitAt(i)); 00069 this->AddHitToTrack(hit); 00070 } 00071 } 00072 return; 00073 }
| void TrackSegmentAtNu::AddSegment | ( | TrackSegmentAtNu * | segment | ) |
Definition at line 54 of file TrackSegmentAtNu.cxx.
References AddCluster(), GetClrAt(), and GetClrLast().
Referenced by AlgAtNuReco::RunAlg().
00055 { 00056 for(Int_t i=0;i<1+segment->GetClrLast();i++){ 00057 ClusterAtNu* clr = (ClusterAtNu*)(segment->GetClrAt(i)); 00058 this->AddCluster(clr); 00059 } 00060 }
| void TrackSegmentAtNu::AddSegToBeg | ( | TrackSegmentAtNu * | segment | ) |
Definition at line 287 of file TrackSegmentAtNu.cxx.
References fBegSegList.
00288 { 00289 if(!fBegSegList) fBegSegList = new TObjArray(); 00290 fBegSegList->Add(segment); 00291 return; 00292 }
| void TrackSegmentAtNu::AddSegToEnd | ( | TrackSegmentAtNu * | segment | ) |
Definition at line 304 of file TrackSegmentAtNu.cxx.
References fEndSegList.
Referenced by AlgAtNuReco::RunAlg().
00305 { 00306 if(!fEndSegList) fEndSegList = new TObjArray(); 00307 fEndSegList->Add(segment); 00308 return; 00309 }
| void TrackSegmentAtNu::AddTriToBeg | ( | TrackSegmentAtNu * | segment | ) |
Definition at line 93 of file TrackSegmentAtNu.cxx.
References fBegTriList.
00094 { 00095 if(!fBegTriList) fBegTriList = new TObjArray(); 00096 fBegTriList->Add(segment); 00097 return; 00098 }
| void TrackSegmentAtNu::AddTriToEnd | ( | TrackSegmentAtNu * | segment | ) |
Definition at line 110 of file TrackSegmentAtNu.cxx.
References fEndTriList.
00111 { 00112 if(!fEndTriList) fEndTriList = new TObjArray(); 00113 fEndTriList->Add(segment); 00114 return; 00115 }
| Bool_t TrackSegmentAtNu::ContainsClr | ( | ClusterAtNu * | cluster | ) |
Definition at line 75 of file TrackSegmentAtNu.cxx.
References fClrList.
Referenced by IsBegAssoc(), and IsEndAssoc().
00076 { 00077 for(Int_t i=0;i<1+fClrList->GetLast();i++){ 00078 if(cluster==(ClusterAtNu*)(fClrList->At(i))) return 1; 00079 } 00080 return 0; 00081 }
| TrackSegmentAtNu * TrackSegmentAtNu::GetAssocTriBegAt | ( | Int_t | i | ) |
Definition at line 134 of file TrackSegmentAtNu.cxx.
References fBegAssocTriList.
00135 { 00136 if(fBegAssocTriList) return (TrackSegmentAtNu*)(fBegAssocTriList->At(i)); else return 0; 00137 }
| Int_t TrackSegmentAtNu::GetAssocTriBegLast | ( | ) |
Definition at line 139 of file TrackSegmentAtNu.cxx.
References fBegAssocTriList.
00140 { 00141 if(fBegAssocTriList) return fBegAssocTriList->GetLast(); else return -1; 00142 }
| TrackSegmentAtNu * TrackSegmentAtNu::GetAssocTriEndAt | ( | Int_t | i | ) |
Definition at line 151 of file TrackSegmentAtNu.cxx.
References fEndAssocTriList.
00152 { 00153 if(fEndAssocTriList) return (TrackSegmentAtNu*)(fEndAssocTriList->At(i)); else return 0; 00154 }
| Int_t TrackSegmentAtNu::GetAssocTriEndLast | ( | ) |
Definition at line 156 of file TrackSegmentAtNu.cxx.
References fEndAssocTriList.
00157 { 00158 if(fEndAssocTriList) return fEndAssocTriList->GetLast(); else return -1; 00159 }
| ClusterAtNu * TrackSegmentAtNu::GetClrAt | ( | Int_t | i | ) |
Definition at line 83 of file TrackSegmentAtNu.cxx.
References fClrList.
Referenced by AddSegment(), IsBegAssoc(), IsEndAssoc(), and AlgAtNuReco::RunAlg().
00084 { 00085 if(fClrList) return (ClusterAtNu*)(fClrList->At(i)); else return 0; 00086 }
| Int_t TrackSegmentAtNu::GetClrLast | ( | ) |
Definition at line 88 of file TrackSegmentAtNu.cxx.
References fClrList.
Referenced by AddSegment(), IsBegAssoc(), IsEndAssoc(), and AlgAtNuReco::RunAlg().
| Int_t TrackSegmentAtNu::GetNPlanes | ( | ) |
Definition at line 356 of file TrackSegmentAtNu.cxx.
References fNPlanes.
00357 { 00358 return fNPlanes; 00359 }
| Double_t TrackSegmentAtNu::GetScore | ( | TObjArray * | objbeg, | |
| TObjArray * | objend | |||
| ) |
Definition at line 362 of file TrackSegmentAtNu.cxx.
References fClrList, ObjTrackAtNu::GetBegPlane(), ObjTrackAtNu::GetEndPlane(), Munits::km, Munits::m, and MinosMaterial::Z().
Referenced by AlgAtNuReco::RunAlg().
00363 { 00364 00365 Int_t k,k1; 00366 Int_t bpln2,bpln1,epln1,epln2; 00367 Int_t pln,npln; 00368 TObjArray tmparr; 00369 00370 bpln1=this->GetBegPlane(); 00371 if(objbeg){ 00372 TrackSegmentAtNu* segb = (TrackSegmentAtNu*)(objbeg->Last()); 00373 bpln2=segb->GetBegPlane(); 00374 } 00375 else{ 00376 bpln2=this->GetBegPlane(); 00377 } 00378 00379 epln1=this->GetEndPlane(); 00380 if(objend){ 00381 TrackSegmentAtNu* sege = (TrackSegmentAtNu*)(objend->Last()); 00382 epln2=sege->GetEndPlane(); 00383 } 00384 else{ 00385 epln2=this->GetEndPlane(); 00386 } 00387 00388 00389 for(k=0;k<1+fClrList->GetLast();k++){ 00390 ClusterAtNu* clr = (ClusterAtNu*)(fClrList->At(k)); 00391 tmparr.Add(clr); 00392 } 00393 00394 if(objbeg){ 00395 for(k=0;k<1+objbeg->GetLast();k++){ 00396 TrackSegmentAtNu* segb = (TrackSegmentAtNu*)(objbeg->At(k)); 00397 for(k1=0;k1<1+segb->GetClrLast();k1++){ 00398 ClusterAtNu* clr = (ClusterAtNu*)(segb->GetClrAt(k1)); 00399 if(!tmparr.Contains(clr)) tmparr.Add(clr); 00400 } 00401 } 00402 } 00403 00404 if(objend){ 00405 for(k=0;k<1+objend->GetLast();k++){ 00406 TrackSegmentAtNu* sege = (TrackSegmentAtNu*)(objend->At(k)); 00407 for(k1=0;k1<1+sege->GetClrLast();k1++){ 00408 ClusterAtNu* clr = (ClusterAtNu*)(sege->GetClrAt(k1)); 00409 if(!tmparr.Contains(clr)) tmparr.Add(clr); 00410 } 00411 } 00412 } 00413 00414 npln=1+(epln2-bpln2)/2; 00415 00416 Double_t* T = new Double_t[npln]; 00417 Double_t* Z = new Double_t[npln]; 00418 Double_t* W = new Double_t[npln]; 00419 00420 for(k=0;k<npln;k++){ 00421 T[k]=0.0; Z[k]=0.0; W[k]=0.0; 00422 } 00423 00424 Int_t km,kp; 00425 Double_t m,c; 00426 Double_t dt2,sn; 00427 Double_t dscr,scr,dtot,tot,dplnscr,plnscr; 00428 Double_t sw,swz,swt,swzt,swzz; 00429 for(k=0;k<1+tmparr.GetLast();k++){ 00430 ClusterAtNu* clr = (ClusterAtNu*)(tmparr.At(k)); 00431 pln=(clr->GetPlane()-bpln2)/2; 00432 sw=0.0; swz=0.0; swt=0.0; 00433 for(k1=0;k1<1+clr->GetHitLast();k1++){ 00434 HitAtNu* hit = (HitAtNu*)(clr->GetHitAt(k1)); 00435 swz+=hit->GetCharge()*hit->GetZPos(); 00436 swt+=hit->GetCharge()*hit->GetTPos(); 00437 sw+=hit->GetCharge(); 00438 } 00439 if(sw>0.0){ 00440 Z[pln]=swz/sw; T[pln]=swt/sw; W[pln]=1.0; 00441 if( pln+1>(bpln1-bpln2)/2 00442 && pln-1<(epln1-bpln2)/2 ) W[pln]=5.0*W[pln]; else W[pln]=0.5*W[pln]; 00443 } 00444 } 00445 00446 scr=0.0; tot=0.0; plnscr=0.0; 00447 for(k=0;k<npln;k++){ 00448 dscr=0.01; dtot=0.01; dplnscr=0.01; 00449 if(W[k]>0.0){ 00450 swz=0.0; swt=0.0; swzz=0.0; swzt=0.0; sw=0.0; sn=0.0; 00451 km=k-4; kp=k+4; 00452 if(W[k]>1.0){ 00453 if( km<(bpln1-bpln2)/2 ) km=(bpln1-bpln2)/2; 00454 if( kp>(epln1-bpln2)/2 ) kp=(epln1-bpln2)/2; 00455 } 00456 if(W[k]<1.0){ 00457 if( km>(epln1-bpln2)/2 ) km=-4+(epln1-bpln2)/2; 00458 if( kp<(bpln1-bpln2)/2 ) kp=+4+(bpln1-bpln2)/2; 00459 } 00460 if(km<0) km=0; if(kp>npln-1) kp=npln-1; 00461 for(k1=km;k1<kp+1;k1++){ 00462 if(W[k1]>0.0){ 00463 swz+=W[k1]*Z[k1]; swt+=W[k1]*T[k1]; 00464 swzz+=W[k1]*Z[k1]*Z[k1]; swzt+=W[k1]*Z[k1]*T[k1]; 00465 sw+=W[k1]; sn+=1.0; 00466 } 00467 } 00468 if(sn>2.0){ 00469 m=(sw*swzt-swz*swt)/(sw*swzz-swz*swz); 00470 c=(swt*swzz-swz*swzt)/(sw*swzz-swz*swz); 00471 dt2=(T[k]-(m*Z[k]+c))*(T[k]-(m*Z[k]+c)); 00472 if(dt2<dscr) dscr=dt2; else dscr+=0.01*(1.0-dscr/dt2); 00473 } 00474 } 00475 scr+=dscr; tot+=dtot; plnscr+=dplnscr; 00476 } 00477 00478 scr = 1.0 + 4.0*plnscr - sqrt(scr/tot); 00479 if(scr<0.0) scr=0.0; 00480 00481 delete [] T; 00482 delete [] Z; 00483 delete [] W; 00484 00485 return scr; 00486 00487 }
| TrackSegmentAtNu * TrackSegmentAtNu::GetSegBegAt | ( | Int_t | i | ) |
Definition at line 294 of file TrackSegmentAtNu.cxx.
References fBegSegList.
Referenced by AlgAtNuReco::RunAlg().
00295 { 00296 if(fBegSegList) return (TrackSegmentAtNu*)(fBegSegList->At(i)); else return 0; 00297 }
| Int_t TrackSegmentAtNu::GetSegBegLast | ( | ) |
Definition at line 299 of file TrackSegmentAtNu.cxx.
References fBegSegList.
Referenced by AlgAtNuReco::RunAlg().
00300 { 00301 if(fBegSegList) return fBegSegList->GetLast(); else return -1; 00302 }
| TrackSegmentAtNu * TrackSegmentAtNu::GetSegEndAt | ( | Int_t | i | ) |
Definition at line 311 of file TrackSegmentAtNu.cxx.
References fEndSegList.
Referenced by AlgAtNuReco::RunAlg().
00312 { 00313 if(fEndSegList) return (TrackSegmentAtNu*)(fEndSegList->At(i)); else return 0; 00314 }
| Int_t TrackSegmentAtNu::GetSegEndLast | ( | ) |
Definition at line 316 of file TrackSegmentAtNu.cxx.
References fEndSegList.
Referenced by AlgAtNuReco::RunAlg().
00317 { 00318 if(fEndSegList) return fEndSegList->GetLast(); else return -1; 00319 }
| TrackSegmentAtNu * TrackSegmentAtNu::GetSegment | ( | ) |
Definition at line 326 of file TrackSegmentAtNu.cxx.
References fSegment.
00327 { 00328 return (TrackSegmentAtNu*)(fSegment); 00329 }
| Int_t TrackSegmentAtNu::GetTmpTrkFlag | ( | ) |
Definition at line 346 of file TrackSegmentAtNu.cxx.
References fTmpTrkFlag.
00347 { 00348 return fTmpTrkFlag; 00349 }
| TrackSegmentAtNu * TrackSegmentAtNu::GetTriBegAt | ( | Int_t | i | ) |
Definition at line 100 of file TrackSegmentAtNu.cxx.
References fBegTriList.
00101 { 00102 if(fBegTriList) return (TrackSegmentAtNu*)(fBegTriList->At(i)); else return 0; 00103 }
| Int_t TrackSegmentAtNu::GetTriBegLast | ( | ) |
Definition at line 105 of file TrackSegmentAtNu.cxx.
References fBegTriList.
00106 { 00107 if(fBegTriList) return fBegTriList->GetLast(); else return -1; 00108 }
| TrackSegmentAtNu * TrackSegmentAtNu::GetTriEndAt | ( | Int_t | i | ) |
Definition at line 117 of file TrackSegmentAtNu.cxx.
References fEndTriList.
00118 { 00119 if(fEndTriList) return (TrackSegmentAtNu*)(fEndTriList->At(i)); else return 0; 00120 }
| Int_t TrackSegmentAtNu::GetTriEndLast | ( | ) |
Definition at line 122 of file TrackSegmentAtNu.cxx.
References fEndTriList.
00123 { 00124 if(fEndTriList) return fEndTriList->GetLast(); else return -1; 00125 }
| Int_t TrackSegmentAtNu::GetTrkFlag | ( | ) |
Definition at line 336 of file TrackSegmentAtNu.cxx.
References fTrkFlag.
00337 { 00338 return fTrkFlag; 00339 }
| Int_t TrackSegmentAtNu::IsBegAssoc | ( | TrackSegmentAtNu * | segment | ) |
Definition at line 161 of file TrackSegmentAtNu.cxx.
References ContainsClr(), ObjTrackAtNu::GetBegDir(), ObjTrackAtNu::GetBegPlane(), ClusterAtNu::GetBegStrip(), ObjTrackAtNu::GetBegVtxT(), ObjTrackAtNu::GetBegVtxZ(), GetClrAt(), GetClrLast(), ObjTrackAtNu::GetEndDir(), ObjTrackAtNu::GetEndPlane(), ClusterAtNu::GetEndStrip(), ObjTrackAtNu::GetEndVtxT(), ObjTrackAtNu::GetEndVtxZ(), and win.
00162 { 00163 Int_t i,assoc=0; 00164 Int_t begflag=0,endflag=0; 00165 if(segment->GetEndPlane()>=this->GetBegPlane()){ 00166 begflag=1; endflag=1; 00167 for(i=0;i<1+segment->GetClrLast();i++){ 00168 ClusterAtNu* clr = (ClusterAtNu*)(segment->GetClrAt(i)); 00169 if(clr->GetPlane()>=this->GetBegPlane()){ if(!(this->ContainsClr(clr))) endflag=0; } 00170 } 00171 for(i=0;i<1+this->GetClrLast();i++){ 00172 ClusterAtNu* clr = (ClusterAtNu*)(this->GetClrAt(i)); 00173 if(clr->GetPlane()<=segment->GetEndPlane()){ if(!(segment->ContainsClr(clr))) begflag=0; } 00174 } 00175 if(segment->GetEndPlane()>this->GetBegPlane()){ if(begflag && endflag) assoc=1; } 00176 } 00177 00178 if(segment->GetEndPlane()<=this->GetBegPlane()){ 00179 Int_t idb=0,idb0=0; 00180 Int_t bpln=this->GetEndPlane()+1; 00181 for(i=0;i<1+this->GetClrLast();i++){ 00182 ClusterAtNu* clr = (ClusterAtNu*)(this->GetClrAt(i)); 00183 if(clr->GetPlane()<bpln && clr->GetPlane()>this->GetBegPlane()+2){ 00184 bpln=clr->GetPlane(); idb=i; 00185 } 00186 else{ if(clr->GetPlane()==this->GetBegPlane()) idb0=i; } 00187 } 00188 ClusterAtNu* clrb = (ClusterAtNu*)(this->GetClrAt(idb)); 00189 ClusterAtNu* clrb0 = (ClusterAtNu*)(this->GetClrAt(idb0)); 00190 00191 Int_t ide=0,ide0=0; 00192 Int_t epln=segment->GetBegPlane()-1; 00193 for(i=0;i<1+segment->GetClrLast();i++){ 00194 ClusterAtNu* clr = (ClusterAtNu*)(segment->GetClrAt(i)); 00195 if(clr->GetPlane()>epln && clr->GetPlane()<segment->GetEndPlane()-2){ 00196 epln=clr->GetPlane(); ide=i; 00197 } 00198 else{ if(clr->GetPlane()==segment->GetEndPlane()) ide0=i; } 00199 } 00200 ClusterAtNu* clre = (ClusterAtNu*)(segment->GetClrAt(ide)); 00201 ClusterAtNu* clre0 = (ClusterAtNu*)(segment->GetClrAt(ide0)); 00202 00203 if( ( clrb->GetEndStrip()-clrb0->GetBegStrip()>-2 && clrb0->GetEndStrip()-clrb->GetBegStrip()>-2 00204 && clre->GetEndStrip()-clre0->GetBegStrip()>-2 && clre0->GetEndStrip()-clre->GetBegStrip()>-2 ) 00205 || ( ( clrb->GetBegStrip()-clrb0->GetBegStrip()>-2 && clre0->GetBegStrip()-clre->GetBegStrip()>-2 ) 00206 || ( clrb->GetEndStrip()-clrb0->GetEndStrip()>-2 && clre0->GetEndStrip()-clre->GetEndStrip()>-2 ) ) 00207 || ( ( clrb->GetBegStrip()-clrb0->GetBegStrip()<2 && clre0->GetBegStrip()-clre->GetBegStrip()<2 ) 00208 || ( clrb->GetEndStrip()-clrb0->GetEndStrip()<2 && clre0->GetEndStrip()-clre->GetEndStrip()<2 ) ) ){ 00209 if(this->GetBegPlane()==segment->GetEndPlane()){ if(begflag && endflag) assoc=1; } 00210 else{ 00211 Double_t z1,z2,t1,t2,dt1,dt2,dir1,dir2,dirtmp,win; 00212 z1=segment->GetEndVtxZ(); z2=this->GetBegVtxZ(); 00213 t1=segment->GetEndVtxT(); t2=this->GetBegVtxT(); 00214 dir1=segment->GetEndDir(); dir2=this->GetBegDir(); 00215 dt1=t2-t1-dir1*(z2-z1); dt2=t2-t1-dir2*(z2-z1); win=0.1+0.35*(z2-z1); 00216 dirtmp=(1+dir1*dir2)/(sqrt(1+dir1*dir1)*sqrt(1+dir2*dir2)); 00217 if( ( (dt1>-win&&dt1<win)||(dt2>-win&&dt2<win) ) && ( dirtmp>0.65 ) ) assoc=1; 00218 } 00219 } 00220 } 00221 return assoc; 00222 }
| Int_t TrackSegmentAtNu::IsEndAssoc | ( | TrackSegmentAtNu * | segment | ) |
Definition at line 224 of file TrackSegmentAtNu.cxx.
References ContainsClr(), ObjTrackAtNu::GetBegDir(), ObjTrackAtNu::GetBegPlane(), ClusterAtNu::GetBegStrip(), ObjTrackAtNu::GetBegVtxT(), ObjTrackAtNu::GetBegVtxZ(), GetClrAt(), GetClrLast(), ObjTrackAtNu::GetEndDir(), ObjTrackAtNu::GetEndPlane(), ClusterAtNu::GetEndStrip(), ObjTrackAtNu::GetEndVtxT(), ObjTrackAtNu::GetEndVtxZ(), and win.
Referenced by AlgAtNuReco::RunAlg().
00225 { 00226 Int_t i,assoc=0; 00227 Int_t begflag=0,endflag=0; 00228 if(segment->GetBegPlane()<=this->GetEndPlane()){ 00229 begflag=1; endflag=1; 00230 for(i=0;i<1+segment->GetClrLast();i++){ 00231 ClusterAtNu* clr = (ClusterAtNu*)(segment->GetClrAt(i)); 00232 if(clr->GetPlane()<=this->GetEndPlane()){ if(!(this->ContainsClr(clr))) begflag=0; } 00233 } 00234 for(i=0;i<1+this->GetClrLast();i++){ 00235 ClusterAtNu* clr = (ClusterAtNu*)(this->GetClrAt(i)); 00236 if(clr->GetPlane()>=segment->GetBegPlane()){ if(!(segment->ContainsClr(clr))) endflag=0; } 00237 } 00238 if(segment->GetBegPlane()<this->GetEndPlane()){ if(begflag && endflag) assoc=1; } 00239 } 00240 00241 if(segment->GetBegPlane()>=this->GetEndPlane()){ 00242 Int_t idb=0,idb0=0; 00243 Int_t bpln=segment->GetEndPlane()+1; 00244 for(i=0;i<1+segment->GetClrLast();i++){ 00245 ClusterAtNu* clr = (ClusterAtNu*)(segment->GetClrAt(i)); 00246 if(clr->GetPlane()<bpln && clr->GetPlane()>segment->GetBegPlane()+2){ 00247 bpln=clr->GetPlane(); idb=i; 00248 } 00249 else{ if(clr->GetPlane()==segment->GetBegPlane()) idb0=i; } 00250 } 00251 ClusterAtNu* clrb = (ClusterAtNu*)(segment->GetClrAt(idb)); 00252 ClusterAtNu* clrb0 = (ClusterAtNu*)(segment->GetClrAt(idb0)); 00253 00254 Int_t ide=0,ide0=0; 00255 Int_t epln=this->GetBegPlane()-1; 00256 for(i=0;i<1+this->GetClrLast();i++){ 00257 ClusterAtNu* clr = (ClusterAtNu*)(this->GetClrAt(i)); 00258 if(clr->GetPlane()>epln && clr->GetPlane()<this->GetEndPlane()-2){ 00259 epln=clr->GetPlane(); ide=i; 00260 } 00261 else{ if(clr->GetPlane()==this->GetEndPlane()) ide0=i; } 00262 } 00263 ClusterAtNu* clre = (ClusterAtNu*)(this->GetClrAt(ide)); 00264 ClusterAtNu* clre0 = (ClusterAtNu*)(this->GetClrAt(ide0)); 00265 00266 if( ( clrb->GetEndStrip()-clrb0->GetBegStrip()>-2 && clrb0->GetEndStrip()-clrb->GetBegStrip()>-2 00267 && clre->GetEndStrip()-clre0->GetBegStrip()>-2 && clre0->GetEndStrip()-clre->GetBegStrip()>-2 ) 00268 || ( ( clrb->GetBegStrip()-clrb0->GetBegStrip()>-2 && clre0->GetBegStrip()-clre->GetBegStrip()>-2 ) 00269 || ( clrb->GetEndStrip()-clrb0->GetEndStrip()>-2 && clre0->GetEndStrip()-clre->GetEndStrip()>-2 ) ) 00270 || ( ( clrb->GetBegStrip()-clrb0->GetBegStrip()<2 && clre0->GetBegStrip()-clre->GetBegStrip()<2 ) 00271 || ( clrb->GetEndStrip()-clrb0->GetEndStrip()<2 && clre0->GetEndStrip()-clre->GetEndStrip()<2 ) ) ){ 00272 if(segment->GetBegPlane()==this->GetEndPlane()){ if(begflag && endflag) assoc=1; } 00273 else{ 00274 Double_t z1,z2,t1,t2,dt1,dt2,dir1,dir2,dirtmp,win; 00275 z1=this->GetEndVtxZ(); z2=segment->GetBegVtxZ(); 00276 t1=this->GetEndVtxT(); t2=segment->GetBegVtxT(); 00277 dir1=this->GetEndDir(); dir2=segment->GetBegDir(); 00278 dt1=t2-t1-dir1*(z2-z1); dt2=t2-t1-dir2*(z2-z1); win=0.1+0.35*(z2-z1); 00279 dirtmp=(1+dir1*dir2)/(sqrt(1+dir1*dir1)*sqrt(1+dir2*dir2)); 00280 if( ( (dt1>-win&&dt1<win)||(dt2>-win&&dt2<win) ) && ( dirtmp>0.65 ) ) assoc=1; 00281 } 00282 } 00283 } 00284 return assoc; 00285 }
| void TrackSegmentAtNu::SetNPlanes | ( | Int_t | plns | ) |
Definition at line 351 of file TrackSegmentAtNu.cxx.
References fNPlanes.
00352 { 00353 fNPlanes=plns; 00354 }
| void TrackSegmentAtNu::SetSegment | ( | TrackSegmentAtNu * | segment | ) |
Definition at line 321 of file TrackSegmentAtNu.cxx.
References fSegment.
Referenced by AlgAtNuReco::RunAlg().
00322 { 00323 fSegment = segment; 00324 }
| void TrackSegmentAtNu::SetTmpTrkFlag | ( | Int_t | flag | ) |
Definition at line 341 of file TrackSegmentAtNu.cxx.
References fTmpTrkFlag.
00342 { 00343 fTmpTrkFlag=flag; 00344 }
| void TrackSegmentAtNu::SetTrkFlag | ( | Int_t | flag | ) |
Definition at line 331 of file TrackSegmentAtNu.cxx.
References fTrkFlag.
00332 { 00333 fTrkFlag=flag; 00334 }
TObjArray* TrackSegmentAtNu::fBegAssocTriList [private] |
Definition at line 72 of file TrackSegmentAtNu.h.
Referenced by AddAssocTriToBeg(), GetAssocTriBegAt(), GetAssocTriBegLast(), and ~TrackSegmentAtNu().
TObjArray* TrackSegmentAtNu::fBegSegList [private] |
Definition at line 75 of file TrackSegmentAtNu.h.
Referenced by AddSegToBeg(), GetSegBegAt(), GetSegBegLast(), and ~TrackSegmentAtNu().
TObjArray* TrackSegmentAtNu::fBegTriList [private] |
Definition at line 69 of file TrackSegmentAtNu.h.
Referenced by AddTriToBeg(), GetTriBegAt(), GetTriBegLast(), and ~TrackSegmentAtNu().
TObjArray* TrackSegmentAtNu::fClrList [private] |
Definition at line 67 of file TrackSegmentAtNu.h.
Referenced by AddCluster(), ContainsClr(), GetClrAt(), GetClrLast(), GetScore(), and ~TrackSegmentAtNu().
TObjArray* TrackSegmentAtNu::fEndAssocTriList [private] |
Definition at line 73 of file TrackSegmentAtNu.h.
Referenced by AddAssocTriToEnd(), GetAssocTriEndAt(), GetAssocTriEndLast(), and ~TrackSegmentAtNu().
TObjArray* TrackSegmentAtNu::fEndSegList [private] |
Definition at line 76 of file TrackSegmentAtNu.h.
Referenced by AddSegToEnd(), GetSegEndAt(), GetSegEndLast(), and ~TrackSegmentAtNu().
TObjArray* TrackSegmentAtNu::fEndTriList [private] |
Definition at line 70 of file TrackSegmentAtNu.h.
Referenced by AddTriToEnd(), GetTriEndAt(), GetTriEndLast(), and ~TrackSegmentAtNu().
Int_t TrackSegmentAtNu::fNPlanes [private] |
TrackSegmentAtNu* TrackSegmentAtNu::fSegment [private] |
Int_t TrackSegmentAtNu::fTmpTrkFlag [private] |
Definition at line 81 of file TrackSegmentAtNu.h.
Referenced by GetTmpTrkFlag(), and SetTmpTrkFlag().
Int_t TrackSegmentAtNu::fTrkFlag [private] |
1.4.7