FTSuperLayer Class Reference

#include <FTSuperLayer.h>

List of all members.

Public Member Functions

 FTSuperLayer (const int firstWireID, const int NWire, const int firstLayerID, const int NLayer, const int superLayerID)
 Constructors and destructor.
 ~FTSuperLayer ()
void clear (void)
 clear object
void mkSegmentList (void)
 create segment lists
void appendHit (FTWire *)
 append wireHit to the list of hits
void reAppendSalvage (void)
 append segments which are not used for tracks to the list for salvage
void reduce_noise (FTList< float >(&Estime)[10])
 calculate t0 and Chi2 from segment-fit in every superlayer
FTList< FTWire * > & wireHits (void) const
 returns wirehit list
FTList< FTSegment * > & segments (void) const
 returns segement list
const int nWire (void) const
 returns number of wires
const int nLayer (void) const
 returns number of layers
const int layerMaxId (void) const
 returns layer max ID
const int localMaxId (void) const
 returns local max ID
const int superLayerId (void) const
 returns super-layer ID
FTList< FTSegment * > & complecated_segments (void)
 returns complecated segments

Static Public Attributes

static MdcParameterparam = MdcParameter::instance()
static const float _maxDphi [11]

Private Member Functions

void clustering (void)
 clustering of wire-hits
void connect_short_segments (FTList< FTSegment * > &inner_short, FTList< FTSegment * > &outer_short)
 conect short clusters to make segments
void connect_singleHit (FTList< FTSegment * > &)
 connect single wireHit to make segments

Private Attributes

const int _superLayerId
const int _firstLayerId
const int _firstWireId
const int _Nlayer
const int _Nwire
FTList< FTSegment * > *const _complecated_segments
FTList< FTWire * > & _wireHits
FTList< FTWire * > & _singleHits
FTList< FTSegment * > & _segments


Detailed Description

Definition at line 65 of file FTSuperLayer.h.


Constructor & Destructor Documentation

FTSuperLayer::FTSuperLayer ( const int  firstWireID,
const int  NWire,
const int  firstLayerID,
const int  NLayer,
const int  superLayerID 
) [inline]

Constructors and destructor.

Definition at line 157 of file FTSuperLayer.h.

00160   : _superLayerId(superLayerID),
00161     _firstLayerId(firstLayerID),
00162     _firstWireId(firstWireID),
00163     _Nlayer(NLayer),
00164     _Nwire(NWire),
00165     //_complecated_segments((superLayerID) ? NULL: new FTList<FTSegment *>(20)),
00166     _complecated_segments(new FTList<FTSegment *>(20)),
00167     _wireHits(*(new FTList<FTWire *>(500))),
00168     _singleHits(*(new FTList<FTWire *>(100))),
00169     _segments(*(new FTList<FTSegment *>(20)))
00170 {
00171 }

FTSuperLayer::~FTSuperLayer (  )  [inline]

Definition at line 174 of file FTSuperLayer.h.

References _complecated_segments, _segments, _singleHits, _wireHits, and clear().

00175 {
00176   clear();
00177   delete &_wireHits;
00178   delete &_singleHits;
00179   delete &_segments;
00180   if (_complecated_segments) delete _complecated_segments;
00181 }


Member Function Documentation

void FTSuperLayer::appendHit ( FTWire  )  [inline]

append wireHit to the list of hits

Definition at line 233 of file FTSuperLayer.h.

References _wireHits, and FTList< T >::append().

Referenced by FTFinder::updateMdc().

00233                                  {
00234   _wireHits.append(h);
00235 }

void FTSuperLayer::clear ( void   ) 

clear object

Definition at line 37 of file FTSuperLayer.cxx.

References _complecated_segments, _segments, _singleHits, _wireHits, FTList< T >::clear(), FTList< T >::deleteAll(), FTList< T >::firstPtr(), FTWireHitInvalid, FTList< T >::lastPtr(), FTList< T >::length(), and FTWire::state().

Referenced by ~FTSuperLayer().

00038 {
00039   if (_wireHits.length()){
00040     register FTWire ** hptr = _wireHits.firstPtr();
00041     FTWire ** const last = _wireHits.lastPtr();
00042     do{(**hptr).state(FTWireHitInvalid);}while((hptr++)!=last);
00043     _wireHits.clear();
00044   }
00045   _singleHits.clear();
00046   if (_segments.length()) _segments.deleteAll();
00047   if (_complecated_segments) _complecated_segments->deleteAll();
00048 }

void FTSuperLayer::clustering ( void   )  [private]

clustering of wire-hits

Definition at line 249 of file FTSuperLayer.cxx.

References _segments, _singleHits, _wireHits, FTList< T >::append(), FTWire::chk_left_and_right(), FTList< T >::clear(), FTList< T >::firstPtr(), FTWireHitAppended, FTWireHitAppendedOrInvalid, FTWireNeighbor0, ganga-rec::j, FTList< T >::lastPtr(), and FTList< T >::length().

Referenced by mkSegmentList().

00250 {
00251   //                  +---+---+
00252   //                  | 4 | 5 |
00253   //                +-+-+---+-+-+    r
00254   //  Neighbor ID   | 2 | * | 3 |    ^
00255   //                +-+-+---+-+-+    |
00256   //                  | 0 | 1 |      +--> -phi
00257   //                  +---+---+
00258   //
00259   if (!_wireHits.length()) return;
00260   register FTWire ** hptr = _wireHits.firstPtr();
00261   FTWire ** const last = _wireHits.lastPtr(); 
00262   // discard continuous hits
00263   do{(**hptr).chk_left_and_right();
00264     }while((hptr++)!=last);
00265 
00266   // clustering
00267   hptr = _wireHits.firstPtr();
00268   //FTList<FTWire *> * hits = new FTList<FTWire *>(10); zhangxm:because of 345 link
00269   FTList<FTWire *> * hits = new FTList<FTWire *>(16);
00270   do{                           // loop over clusters
00271     if ((**hptr).stateAND(FTWireHitAppendedOrInvalid)) continue;
00272     int n = hits->append(*hptr);
00273     (**hptr).stateOR(FTWireHitAppended);
00274     for (int j = 0; j^n; j++){  // loop over hits in a cluster
00275       const unsigned int checked = (*hits)[j]->state();
00276       //const unsigned int * mptr = _neighborsMask;
00277       FTWire** nptr = (*hits)[j]->neighborPtr();
00278       // check 6 neighbors
00279       for (unsigned Mask=FTWireNeighbor0; Mask^512; Mask<<=1, /*mptr++,*/ nptr++){
00280         if ((**nptr).stateAND(FTWireHitAppendedOrInvalid)) continue;
00281         n = hits->append(*nptr);
00282         (**nptr).stateOR(FTWireHitAppended);
00283       }
00284     }
00285 
00286     if (n^1){
00287       _segments.append(new FTSegment(this, *hits));
00288       //hits = new FTList<FTWire *>(10); because of 345 link
00289       hits = new FTList<FTWire *>(16);
00290     }else{
00291       _singleHits.append(*hptr);
00292       hits->clear();
00293     }
00294   }while((hptr++)!=last);
00295   delete hits;
00296 }

FTList< FTSegment * > & FTSuperLayer::complecated_segments ( void   )  [inline]

returns complecated segments

Definition at line 227 of file FTSuperLayer.h.

References _complecated_segments.

Referenced by FTTrack::r_phiFit().

00227                                       {
00228   return *_complecated_segments;
00229 }

void FTSuperLayer::connect_short_segments ( FTList< FTSegment * > &  inner_short,
FTList< FTSegment * > &  outer_short 
) [private]

conect short clusters to make segments

Definition at line 300 of file FTSuperLayer.cxx.

References _maxDphi, _segments, _superLayerId, FTList< T >::append(), first, genRecEmupikp::i, ganga-rec::j, FTWire::layer(), FTList< T >::length(), FTLayer::localLayerId(), M_PI, FTSegment::outerBoundHits(), FTList< T >::remove(), and FTSegment::wireHits().

Referenced by mkSegmentList().

00302 {
00303   int n = inner_short.length();
00304   int m = outer_short.length();
00305   for (int i = 0; i^n; i++){
00306     FTSegment * inner = inner_short[i];
00307     const FTWire & in_outerBoundHit = * inner->outerBoundHits().first();
00308     const FTLayer & in_outerBound = in_outerBoundHit.layer();
00309     float in_outerPhi = inner->outgoingPhi();
00310 
00311     int   min_dphi_index = -1;
00312     float min_dphi = 2*M_PI;
00313     int   dLayer_cache = -1;
00314     float out_innerPhi, D_phi;
00315     for (int j = 0; j^m; j++) {
00316       const int out_innerLayerId
00317              = (outer_short[j]->innerBoundHits().first())->layer().localLayerId();
00318       int dLayer_cache_tmp = out_innerLayerId - in_outerBound.localLayerId();
00319       if (dLayer_cache_tmp < 1) continue;
00320       out_innerPhi = outer_short[j]->incomingPhi();
00321       D_phi= fabs(in_outerPhi - out_innerPhi);
00322       if (D_phi > M_PI) D_phi = 2*M_PI - D_phi;
00323       if (D_phi < min_dphi) {
00324         min_dphi = D_phi;
00325         min_dphi_index = j;
00326         dLayer_cache = dLayer_cache_tmp;
00327       }
00328     }
00329     if (min_dphi_index < 0) continue;
00330 
00331     switch (dLayer_cache) {
00332       case 1:
00333         if (min_dphi > _maxDphi[_superLayerId]*M_PI/180.) continue;
00334         break;
00335       case 2:
00336         if (min_dphi > _maxDphi[_superLayerId]*M_PI/120.) continue;
00337         break;
00338       case 3:
00339         if (min_dphi > _maxDphi[_superLayerId]*M_PI/80.) continue;
00340         break;
00341       default:
00342         continue;
00343     }
00344 
00345     FTSegment * outer = outer_short[min_dphi_index];
00346     n = inner_short.remove(i);
00347     m = outer_short.remove(min_dphi_index);
00348     inner->connect_outer(outer->wireHits(), outer->outerBoundHits());
00349     _segments.append(inner);
00350     delete outer;
00351   }
00352 }

void FTSuperLayer::connect_singleHit ( FTList< FTSegment * > &   )  [private]

connect single wireHit to make segments

Definition at line 356 of file FTSuperLayer.cxx.

References _complecated_segments, _maxDphi, _segments, _singleHits, _superLayerId, FTList< T >::append(), genRecEmupikp::i, ganga-rec::j, FTWire::layer(), FTList< T >::length(), FTLayer::localLayerId(), M_PI, FTList< T >::remove(), s, and superLayerId().

Referenced by mkSegmentList().

00356                                                                  {
00357   int minLength = 0;
00358   if (superLayerId() == 2 || superLayerId() == 3 || superLayerId() == 4
00359      || superLayerId() == 9 || superLayerId() == 10 )
00360      minLength = 1;
00361   int n = short_sgmnts.length();
00362   int m = _singleHits.length();
00363   for (int i = 0; i^n; i++){
00364     FTSegment & s = * short_sgmnts[i];
00365     const FTWire & outerBoundHit = * s.outerBoundHits().first();
00366     const FTWire & innerBoundHit = * s.innerBoundHits().first();
00367     const FTLayer & outerBound = outerBoundHit.layer();
00368     const FTLayer & innerBound = innerBoundHit.layer();
00369     float outerPhi = s.outgoingPhi();
00370     float innerPhi = s.incomingPhi();
00371 
00372     int   min_dphi_index = -1;
00373     float min_dphi = 2*M_PI;
00374     int   dLayer_cache = -1;
00375     bool  inner_flag_cache;
00376     for (int j = 0; j^m; j++) {
00377       const FTWire * h = _singleHits[j];
00378       const int hLocalLayerId = h->layer().localLayerId();
00379       int dLayer_cache_tmp = -1;
00380       bool inner_flag_cache_tmp;
00381       float D_phi;
00382 
00383       if ((dLayer_cache_tmp=innerBound.localLayerId()-hLocalLayerId) > 0) {
00384         D_phi = fabs(innerPhi - h->phi());
00385         inner_flag_cache_tmp = true;
00386       } else if ((dLayer_cache_tmp=hLocalLayerId-outerBound.localLayerId()) > 0) {
00387         D_phi = fabs(outerPhi - h->phi());
00388         inner_flag_cache_tmp = false;
00389       } else {
00390         continue;
00391       }
00392       if (D_phi > M_PI) D_phi = 2*M_PI - D_phi;
00393 
00394       if (D_phi < min_dphi) {
00395         min_dphi = D_phi;
00396         min_dphi_index = j;
00397         dLayer_cache = dLayer_cache_tmp;
00398         inner_flag_cache = inner_flag_cache_tmp;
00399       }
00400     }
00401 
00402     int   not_append = 1;
00403     if (min_dphi_index >= 0) {
00404       switch (dLayer_cache) {
00405         case 1:
00406           if (min_dphi < _maxDphi[_superLayerId]*M_PI/180.) not_append = 0;
00407           break; 
00408         case 2:
00409           if (min_dphi < _maxDphi[_superLayerId]*M_PI/120.) not_append = 0;
00410           break;
00411         case 3:
00412           if (min_dphi < _maxDphi[_superLayerId]*M_PI/80.) not_append = 0;
00413           break;
00414         default:
00415           break;
00416       }
00417     }
00418 
00419     if (!not_append) {
00420       if (inner_flag_cache) {
00421         s.connect_inner(_singleHits[min_dphi_index]);
00422       } else {
00423         s.connect_outer(_singleHits[min_dphi_index]);
00424       }
00425       _segments.append(&s);
00426       m = _singleHits.remove(min_dphi_index);
00427     } else {
00428       if (outerBound.localLayerId()-innerBound.localLayerId()>minLength){
00429         _segments.append(&s);
00430       }else{
00431         if (!_superLayerId) _complecated_segments->append(&s);
00432         else delete &s;
00433       }
00434     }
00435   }
00436 }

const int FTSuperLayer::layerMaxId ( void   )  const [inline]

returns layer max ID

Definition at line 209 of file FTSuperLayer.h.

References _Nlayer.

Referenced by FTWire::getOuterNeighbor().

00209                                   {
00210   return (_Nlayer - 1);
00211 }

const int FTSuperLayer::localMaxId ( void   )  const [inline]

returns local max ID

Definition at line 203 of file FTSuperLayer.h.

References _Nwire.

00203                                   {
00204   return (_Nwire - 1);
00205 }

void FTSuperLayer::mkSegmentList ( void   ) 

create segment lists

Definition at line 52 of file FTSuperLayer.cxx.

References _complecated_segments, _segments, FTList< T >::append(), clustering(), connect_short_segments(), connect_singleHit(), genRecEmupikp::i, FTList< T >::length(), FTList< T >::remove(), s, and update().

00053 {
00054   clustering();
00055   FTList<FTSegment *> inner_short(10);
00056   FTList<FTSegment *> outer_short(10);
00057   FTList<FTSegment *> mid_short(10);
00058   int n = _segments.length();
00059   for (int i = 0; i^n; i++){
00060     FTSegment * s = _segments[i];
00061 #ifndef OnlineMode    
00062     //    s->printout();
00063 #endif
00064     int stat = s->examine();
00065     switch(stat){
00066     case 0:
00067       // simple
00068       break;
00069     case 1:
00070       // inner short simple
00071       inner_short.append(s);
00072       n = _segments.remove(i);
00073       break;
00074     case 2:
00075       // outer short simple
00076       outer_short.append(s);
00077       n = _segments.remove(i);
00078       break;
00079     case 3:
00080       // to be divided
00081       //if (!_superLayerId) _complecated_segments->append(s);
00082       //else delete s;
00083        _complecated_segments->append(s);    
00084        n = _segments.remove(i);
00085        break;
00086     default:
00087       mid_short.append(s);
00088       n = _segments.remove(i);
00089       break;
00090     }
00091   }
00092   connect_short_segments(inner_short,outer_short);
00093   connect_singleHit(inner_short);
00094   connect_singleHit(outer_short);
00095   connect_singleHit(mid_short);
00096   //if (!(_superLayerId&1)){  
00097   n = _segments.length();
00098   for (int i = 0; i^n; i++){
00099     _segments[i]->update();
00100 #ifndef OnlineMode
00101     _segments[i]->printout();
00102 #endif
00103   }
00104 }

const int FTSuperLayer::nLayer ( void   )  const [inline]

returns number of layers

Definition at line 197 of file FTSuperLayer.h.

References _Nlayer.

Referenced by FTSegment::examine().

00197                               {
00198   return _Nlayer;
00199 }

const int FTSuperLayer::nWire ( void   )  const [inline]

returns number of wires

Definition at line 191 of file FTSuperLayer.h.

References _Nwire.

00191                              {
00192   return _Nwire;
00193 }

void FTSuperLayer::reAppendSalvage ( void   ) 

append segments which are not used for tracks to the list for salvage

Definition at line 440 of file FTSuperLayer.cxx.

References _complecated_segments, _segments, FTList< T >::append(), genRecEmupikp::i, FTList< T >::length(), and FTList< T >::remove().

00441 {
00442   int n = _segments.length();
00443   for (int i = 0; i^n; i++){
00444     if (_segments[i]->track()) continue;
00445     _complecated_segments->append(_segments[i]);
00446     n = _segments.remove(i);
00447   }
00448 }

void FTSuperLayer::reduce_noise ( FTList< float > &  Estime[10]  ) 

calculate t0 and Chi2 from segment-fit in every superlayer

Definition at line 107 of file FTSuperLayer.cxx.

References MdcParameter::_chi2_segfit, _complecated_segments, _segments, _superLayerId, FTList< T >::append(), EvtCyclic3::append(), genRecEmupikp::i, ganga-rec::j, IMdcGeomSvc::Layer(), FTList< T >::length(), param, MdcGeoLayer::PCSiz(), and FTList< T >::remove().

00108 {
00109   // if(_superLayerId<5 || _superLayerId>9 ) return;
00110   if( _superLayerId>9 )  return; // no need for the most outer SL
00111  
00112   int n = _segments.length();
00113   if(n>30) return;
00114 
00115   float tdc[30][4]={0.},r[4]={0.},phi[4]={0.};
00116   int wireId[4]={0};
00117 
00118   IMdcGeomSvc* mdcGeomSvc;
00119   StatusCode sc = Gaudi::svcLocator()->service("MdcGeomSvc", mdcGeomSvc);
00120   // float size = mdcGeomSvc->Layer(0)->PCSiz();
00121   float T1=0.5*0.1*(mdcGeomSvc->Layer(4*_superLayerId+0)->PCSiz())/0.004;
00122   float T2=0.5*0.1*(mdcGeomSvc->Layer(4*_superLayerId+1)->PCSiz())/0.004;
00123   float T3=0.5*0.1*(mdcGeomSvc->Layer(4*_superLayerId+2)->PCSiz())/0.004;
00124   float T4=0.5*0.1*(mdcGeomSvc->Layer(4*_superLayerId+3)->PCSiz())/0.004;
00125               
00126   for (int i = 0; i^n; i++){
00127 
00128     float chi2=-99;
00129     float t0c=0;
00130 
00131     //float in_layerId=_segments[i]->innerBoundHits().first()->layer().layerId();
00132     // float out_layerId=_segments[i]->outerBoundHits().first()->layer().layerId();
00133     FTList<FTWire *>& hits=_segments[i]->wireHits();
00134     // if(hits.length()>4) continue;
00135 
00136     for(int j=0;j<hits.length();j++){
00137       FTWire & h = *hits[j];
00138       
00139       int layerId=h.layer().layerId();
00140       
00141       /* if(wireId[layerId%4] == (h.localId()-1)||wireId[layerId%4]==(h.localId()+1)) {
00142          tdc[i][layerId%4]=0;
00143          break;
00144          }*/
00145       
00146       wireId[layerId%4]=h.localId();
00147       phi[layerId%4]=h.phi();
00148       
00149       // if(tdc[i][layerId%4] != (h.time())) continue;
00150       
00151       tdc[i][layerId%4]=h.time();
00152       r[layerId%4]=h.layer().r();
00153     }
00155     
00156     if(tdc[i][0]!=0 && tdc[i][1]!=0 && tdc[i][2]!=0 && tdc[i][3]!=0 && (wireId[0]==wireId[1]&& wireId[0]==wireId[2] && wireId[0]==wireId[3] || wireId[0]==wireId[1]-1 && wireId[0]==wireId[2]&& wireId[1]==wireId[3])){
00157       //  if(tdc[i][0]!=0 && tdc[i][1]!=0 && tdc[i][2]!=0 && tdc[i][3]!=0 &&( phi[0]<phi[1]&&phi[1]>phi[2]&&phi[2]<phi[3]||phi[0]>phi[1] && phi[1]<phi[2] && phi[2]>phi[3])){
00158       
00159      float  r0=r[0]-r[1]-(r[2]-r[1])/2;
00160      float  r1=-(r[2]-r[1])/2;
00161      float  r2=(r[2]-r[1])/2;
00162      float  r3=r[3]-r[2]+(r[2]-r[1])/2;
00163 
00164      float  t_i = tdc[i][0]+tdc[i][2];
00165      float  t_j = tdc[i][1]+tdc[i][3];
00166      float  l_j = T2+T4;
00167      float  r_i = r0+r2;
00168      float  r_j = r1+r3;
00169      float  r_2k= r0*r0+r1*r1+r2*r2+r3*r3;
00170      float  rt_i = r0*tdc[i][0]+r2*tdc[i][2];
00171      float  rt_j = r1*tdc[i][1]+r3*tdc[i][3];
00172      float  rl_j = r1*T2+r3*T4;
00173 
00174      float  deno= 4*r_2k-2*(r_i*r_i+r_j*r_j);
00175     
00176      if (deno!=0){
00177        float  Pa=(4*(rt_i-rt_j+rl_j)-(t_i+t_j-l_j)*(r_i-r_j)-(t_i-t_j+l_j)*(r_i+r_j))/deno;
00178        float  Pb= 0.25*(t_i-t_j+l_j-(r_i+r_j) * Pa);
00179        float  Ang=fabs(90.-fabs(atan(Pa)*180./3.141593));
00180 
00181        t0c = -0.25*((r_i-r_j)*Pa-t_i-t_j+l_j);
00182 
00183        float pa1=(tdc[i][0]-tdc[i][2])/(r0-r2);
00184        float pa2=(T4-T2-tdc[i][3]+tdc[i][1])/(r3-r1);
00185   
00190      
00192 
00193       chi2=(tdc[i][0]-t0c-r0 * Pa-Pb)*(tdc[i][0]-t0c-r0 * Pa-Pb)+(T2-tdc[i][1]+t0c-r1 * Pa-Pb)*(T2-tdc[i][1]+t0c-r1 * Pa-Pb)+(tdc[i][2]-t0c-r2 * Pa-Pb)*(tdc[i][2]-t0c-r2 * Pa-Pb) + (T4-tdc[i][3]+t0c-r3 * Pa-Pb)*(T4-tdc[i][3]+t0c-r3 * Pa-Pb);
00194 
00195        }
00196    }
00198       
00199     /*   else if(tdc[i][0]!=0 && tdc[i][1]!=0 && tdc[i][2]!=0 && (wireId[0]==wireId[1]-1||wireId[0]==wireId[1]) &&  wireId[2]==wireId[0]) {
00200           
00202 
00203     float pa=-((r[0]+r[2]-2*r[1])*(tdc[i][0]+tdc[i][2])-2*(r[0]-r[1])*tdc[i][0]-2*(r[2]-r[1])*tdc[i][2])/((r[0]-r[2])*(r[0]-r[2]));
00204      //float pa=(tdc[i][2]-tdc[i][0])/(r[2]-r[0]);
00205      float pb=0.25*(tdc[i][0]-2*tdc[i][1]+tdc[i][2]+2.*T2-(r[0]+r[2]-2*r[1])*pa);
00206      float Ang=fabs(90.-fabs(atan(pa)*180./3.141593));
00207     
00208      t0c=-((r[0]+r[2]-2*r[1])*pa + 3.*pb - tdc[i][0]+tdc[i][1]-tdc[i][2]-T2);
00209      //t0c=0.5*(tdc[i][1]+tdc[i][2]-(r[1]-r[2])*pa-T2);
00210      chi2=(tdc[i][0]-t0c-pa*(r[0]-r[1])-pb)*(tdc[i][0]-t0c-pa*(r[0]-r[1])-pb)+(T2-tdc[i][1]+t0c-pb)*(T2-tdc[i][1]+t0c-pb)+(tdc[i][2]-t0c-pa*(r[2]-r[1])-pb)*(tdc[i][2]-t0c-pa*(r[2]-r[1])-pb);
00211   }
00212 
00213      else if(tdc[i][1]!=0 && tdc[i][2]!=0 && tdc[i][3]!=0 && (wireId[1]==wireId[2]||wireId[1]==wireId[2]+1) && wireId[3]==wireId[1]){
00215 
00216        float pa=-((r[1]+r[3]-2*r[2])*(tdc[i][1]+tdc[i][3])-2*(r[1]-r[2])*tdc[i][1]-2*(r[3]-r[2])*tdc[i][3])/((r[1]-r[3])*(r[1]-r[3]));
00217        float pb=0.25*(tdc[i][1]-2*tdc[i][2]+tdc[i][3]+2.*T3-(r[1]+r[3]-2*r[2])*pa);
00218 
00219       t0c=-((r[1]+r[3]-2*r[2])*pa + 3.*pb - tdc[i][1]+tdc[i][2]-tdc[i][3]-T3);
00220       chi2=(tdc[i][1]-t0c-pa*(r[1]-r[2])-pb)*(tdc[i][1]-t0c-pa*(r[1]-r[2])-pb)+(T3-tdc[i][2]+t0c-pb)*(T3-tdc[i][2]+t0c-pb)+(tdc[i][3]-t0c-pa*(r[3]-r[2])-pb)*(tdc[i][3]-t0c-pa*(r[3]-r[2])-pb);
00221 
00222    }
00223    */     
00224    
00225     //    g_segmentchi2[_superLayerId][i]=chi2;
00226     //    g_t0c[_superLayerId][i]=t0c;
00227 
00228     //    if(_superLayerId>4 && chi2>0){  
00229     //cout<<"superLayer,t0c,chi2: "<<_superLayerId<<"["<<i<<"] : "<<t0c<<" , "<<chi2<<endl; 
00230       //    }
00231     //   if(chi2<700 && _superLayerId>4 && chi2>-1){
00232     if(chi2<(param->_chi2_segfit) && _superLayerId>4 && chi2>-1){
00233        Estime[_superLayerId].append(t0c);
00234     }
00235     //  if(chi2>0 && chi2<2000) continue;
00236     // if (chi2<1000) continue;
00237     continue;
00238 
00239     _complecated_segments->append(_segments[i]);
00240     for(int k=0;k<4;k++){
00241       tdc[i][k]=0;
00242     }
00243     n = _segments.remove(i);
00244   }
00245 }

FTList< FTSegment * > & FTSuperLayer::segments ( void   )  const [inline]

returns segement list

Definition at line 215 of file FTSuperLayer.h.

References _segments.

Referenced by FTFinder::linkAxialSuperLayer234(), FTFinder::linkAxialSuperLayer910(), and FTFinder::mkTrack3D().

00215                                 {
00216   return _segments;
00217 }

const int FTSuperLayer::superLayerId ( void   )  const [inline]

returns super-layer ID

Definition at line 221 of file FTSuperLayer.h.

References _superLayerId.

Referenced by connect_singleHit(), and FTSegment::examine().

00221                                     {
00222   return _superLayerId;
00223 }

FTList< FTWire * > & FTSuperLayer::wireHits ( void   )  const [inline]

returns wirehit list

Definition at line 185 of file FTSuperLayer.h.

References _wireHits.

00185                                 {
00186   return _wireHits;
00187 }


Member Data Documentation

FTList<FTSegment *>* const FTSuperLayer::_complecated_segments [private]

Definition at line 139 of file FTSuperLayer.h.

Referenced by clear(), complecated_segments(), connect_singleHit(), mkSegmentList(), reAppendSalvage(), reduce_noise(), and ~FTSuperLayer().

const int FTSuperLayer::_firstLayerId [private]

Definition at line 135 of file FTSuperLayer.h.

const int FTSuperLayer::_firstWireId [private]

Definition at line 136 of file FTSuperLayer.h.

const float FTSuperLayer::_maxDphi [static]

Initial value:

  {11.9, 9.72, 6.26, 4.86, 3.81, 2.37, 2.08, 1.76, 1.53, 2.33, 1.88}

Definition at line 116 of file FTSuperLayer.h.

Referenced by connect_short_segments(), connect_singleHit(), and FTSegment::examine().

const int FTSuperLayer::_Nlayer [private]

Definition at line 137 of file FTSuperLayer.h.

Referenced by layerMaxId(), and nLayer().

const int FTSuperLayer::_Nwire [private]

Definition at line 138 of file FTSuperLayer.h.

Referenced by localMaxId(), and nWire().

FTList<FTSegment *>& FTSuperLayer::_segments [private]

Definition at line 142 of file FTSuperLayer.h.

Referenced by clear(), clustering(), connect_short_segments(), connect_singleHit(), mkSegmentList(), reAppendSalvage(), reduce_noise(), segments(), and ~FTSuperLayer().

FTList<FTWire *>& FTSuperLayer::_singleHits [private]

Definition at line 141 of file FTSuperLayer.h.

Referenced by clear(), clustering(), connect_singleHit(), and ~FTSuperLayer().

const int FTSuperLayer::_superLayerId [private]

Definition at line 134 of file FTSuperLayer.h.

Referenced by connect_short_segments(), connect_singleHit(), reduce_noise(), and superLayerId().

FTList<FTWire *>& FTSuperLayer::_wireHits [private]

Definition at line 140 of file FTSuperLayer.h.

Referenced by appendHit(), clear(), clustering(), wireHits(), and ~FTSuperLayer().

MdcParameter * FTSuperLayer::param = MdcParameter::instance() [static]

Definition at line 114 of file FTSuperLayer.h.

Referenced by reduce_noise().


Generated on Tue Nov 29 23:19:36 2016 for BOSS_7.0.2 by  doxygen 1.4.7