#include <TSegmentCurl.h>
Public Member Functions | |
void | append (AList< TMLink > &) |
void | append (TMLink *) |
void | append (TMLink &) |
void | append (AList< TMLink > &) |
void | append (TMLink *) |
void | append (TMLink &) |
void | dump (void) |
void | dump (void) |
const unsigned | layerIdOfMaxSeq (void) |
const unsigned | layerIdOfMaxSeq (void) |
const AList< TMLink > & | list (unsigned i) |
const AList< TMLink > & | list (void) |
const AList< TMLink > & | list (unsigned i) |
const AList< TMLink > & | list (void) |
const unsigned | maxLocalLayerId (const unsigned) |
const unsigned | maxLocalLayerId (void) const |
const unsigned | maxLocalLayerId (const unsigned) |
const unsigned | maxLocalLayerId (void) const |
const unsigned | maxSeq (void) const |
const unsigned | maxSeq (void) const |
const unsigned | numOfLargeSeqLayer (void) |
const unsigned | numOfLargeSeqLayer (void) |
const unsigned | numOfSeqOneLayer (void) |
const unsigned | numOfSeqOneLayer (void) |
TSegmentCurl & | operator= (const TSegmentCurl &) |
TSegmentCurl & | operator= (const TSegmentCurl &) |
void | releaseMaxSeq (void) |
void | releaseMaxSeq (void) |
void | remove (AList< TMLink > &) |
void | remove (TMLink *) |
void | remove (TMLink &) |
void | remove (AList< TMLink > &) |
void | remove (TMLink *) |
void | remove (TMLink &) |
void | removeAll (void) |
void | removeAll (void) |
const unsigned | seqOfLayer (const unsigned) |
const unsigned | seqOfLayer (const unsigned) |
void | setMaxSeq (const unsigned) |
void | setMaxSeq (const unsigned) |
const unsigned | size (void) |
const unsigned | size (void) |
const unsigned | sizeOfLayer (const unsigned) |
const unsigned | sizeOfLayer (const unsigned) |
const unsigned | superLayerId (const unsigned) |
const unsigned | superLayerId (void) const |
const unsigned | superLayerId (const unsigned) |
const unsigned | superLayerId (void) const |
TSegmentCurl (TSegmentCurl *) | |
TSegmentCurl (TSegmentCurl &) | |
TSegmentCurl (const unsigned superLayerId=9999, const unsigned max=9999) | |
TSegmentCurl (TSegmentCurl *) | |
TSegmentCurl (TSegmentCurl &) | |
TSegmentCurl (const unsigned superLayerId=9999, const unsigned max=9999) | |
void | update (void) |
void | update (void) |
unsigned | wires (const unsigned) const |
unsigned | wires (const unsigned) const |
~TSegmentCurl (void) | |
~TSegmentCurl (void) | |
Private Member Functions | |
void | calcuSeq (unsigned) |
void | calcuSeq (unsigned) |
Private Attributes | |
bool | m_flagOfUpdate |
AList< TMLink > | m_layer [4] |
AList< TMLink > | m_layer [4] |
unsigned | m_layerIdOfMaxSeq |
AList< TMLink > | m_list |
AList< TMLink > | m_list |
unsigned | m_MaxLocalLayerId |
unsigned | m_maxSeq |
unsigned | m_numOfLargeSeqLayer |
unsigned | m_numOfSeqOneLayer |
unsigned | m_seqOfLayer [4] |
unsigned | m_sizeOfLayer [4] |
unsigned | m_superLayerId |
|
00008 : m_MaxLocalLayerId(max), m_superLayerId(superLayerId), m_flagOfUpdate(true) 00009 { 00010 m_list.removeAll(); 00011 for(unsigned i=0;i<6;++i){ 00012 m_seqOfLayer[i] = m_sizeOfLayer[i] = 0; 00013 m_layer[i].removeAll(); 00014 } 00015 }
|
|
00019 : m_flagOfUpdate(s.m_flagOfUpdate), m_list(s.m_list), m_MaxLocalLayerId(s.m_MaxLocalLayerId), m_superLayerId(s.m_superLayerId), 00020 m_maxSeq(s.m_maxSeq), m_layerIdOfMaxSeq(s.m_layerIdOfMaxSeq), m_numOfSeqOneLayer(s.m_numOfSeqOneLayer), 00021 m_numOfLargeSeqLayer(s.m_numOfLargeSeqLayer) 00022 { 00023 for(unsigned i=0;i<6;++i){ 00024 m_seqOfLayer[i] = s.m_seqOfLayer[i]; 00025 m_sizeOfLayer[i] = s.m_sizeOfLayer[i]; 00026 m_layer[i] = s.m_layer[i]; 00027 } 00028 }
|
|
00032 : m_flagOfUpdate(s->m_flagOfUpdate), m_list(s->m_list), m_MaxLocalLayerId(s->m_MaxLocalLayerId), m_superLayerId(s->m_superLayerId), 00033 m_maxSeq(s->m_maxSeq), m_layerIdOfMaxSeq(s->m_layerIdOfMaxSeq), m_numOfSeqOneLayer(s->m_numOfSeqOneLayer), 00034 m_numOfLargeSeqLayer(s->m_numOfLargeSeqLayer) 00035 { 00036 for(unsigned i=0;i<6;++i){ 00037 m_seqOfLayer[i] = s->m_seqOfLayer[i]; 00038 m_sizeOfLayer[i] = s->m_sizeOfLayer[i]; 00039 m_layer[i] = s->m_layer[i]; 00040 } 00041 }
|
|
00045 { 00046 m_list.removeAll(); 00047 for(unsigned i=0;i<6;++i){ 00048 m_layer[i].removeAll(); 00049 } 00050 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00128 { 00129 m_flagOfUpdate = true; 00130 for(unsigned i = 0; i < e.length(); ++i) 00131 m_layer[e[i]->hit()->wire()->localLayerId()].append(e[i]); 00132 m_list.append(e); 00133 }
|
|
00118 { 00119 m_flagOfUpdate = true; 00120 m_layer[e->hit()->wire()->localLayerId()].append(e); 00121 m_list.append(e); 00122 }
|
|
00108 { 00109 m_flagOfUpdate = true; 00110 m_layer[e.hit()->wire()->localLayerId()].append(e); 00111 m_list.append(e); 00112 }
|
|
|
|
00296 { 00297 //...exception 00298 if(i > m_MaxLocalLayerId){ 00299 m_seqOfLayer[i] = 0; 00300 return; 00301 } 00302 unsigned size = m_layer[i].length(); 00303 if(size < 1){ 00304 m_seqOfLayer[i] = 0; 00305 return; 00306 } 00307 if(size == 1){ 00308 m_seqOfLayer[i] = 1; 00309 return; 00310 } 00311 00312 //...initialize 00313 m_layer[i].sort(sortByWireSerialNumber); 00314 unsigned seq = 1; 00315 unsigned maxSeq = 0; 00316 unsigned layerIdForWires = m_layer[i][0]->hit()->wire()->layerId(); 00317 00318 //...calculation 00319 // if(m_layer[i][0]->hit()->wire()->localId() == static_cast<unsigned>(wires(m_superLayerId)-1) && 00320 if(m_layer[i][0]->hit()->wire()->localId() == static_cast<unsigned>(wires(layerIdForWires)-1) && 00321 m_layer[i][size-1]->hit()->wire()->localId() == 0){ 00322 for(unsigned j=0;j<size-1;++j){ 00323 if(m_layer[i][j]->hit()->wire()->localIdForMinus()-1 == 00324 m_layer[i][j+1]->hit()->wire()->localId()){ 00325 ++seq; 00326 }else{ 00327 break; 00328 } 00329 if(j == size-2)goto loop; 00330 } 00331 ++seq; 00332 for(unsigned j=size-1;j>0;--j){ 00333 if(m_layer[i][j]->hit()->wire()->localIdForPlus()+1 == 00334 m_layer[i][j-1]->hit()->wire()->localId()){ 00335 ++seq; 00336 }else{ 00337 break; 00338 } 00339 } 00340 loop: 00341 if(seq > maxSeq)maxSeq = seq; 00342 } 00343 seq = 1; 00344 for(unsigned j=0;j<size-1;++j){ 00345 if(m_layer[i][j]->hit()->wire()->localIdForMinus()-1 == 00346 m_layer[i][j+1]->hit()->wire()->localId()){ 00347 ++seq; 00348 }else{ 00349 if(seq > maxSeq)maxSeq = seq; 00350 seq = 1; 00351 } 00352 } 00353 if(seq > maxSeq)maxSeq = seq; 00354 00355 //...set and return 00356 m_seqOfLayer[i] = maxSeq; 00357 return; 00358 }
|
|
|
|
00412 { 00413 //std::cout.form(" Hep idhep mother mcPX mcPY mcPZ mcE mcMass\n"); 00414 //std::cout.form(" %3d % 4d % 4d % 2.2f % 2.2f % 2.2f % 2.2f % 2.3f\n", 00415 //hepID, partID, mothID, mcpx, mcpy, mcpz, mce, mcmass); 00416 00417 std::cout << "=====Segment for Curling Track Finder=====" << std::endl; 00418 std::cout << "List Size = " << m_list.length() << std::endl; 00419 std::cout << "Flag of Update = " << m_flagOfUpdate 00420 << ", Max Local Layer ID = " << m_MaxLocalLayerId 00421 << ", Super Layer ID = " << m_superLayerId << std::endl; 00422 std::cout << "Max Seq. = " << m_maxSeq << ", Its Layer ID = " << m_layerIdOfMaxSeq << std::endl; 00423 std::cout << "# of Seq = 1 Layer = " << m_numOfSeqOneLayer 00424 << ", # of Large Seq. Layer = " << m_numOfLargeSeqLayer << std::endl; 00425 //std::cout.form(" ID | Seq. of Layer | Size of Layer | Local ID List\n"); 00426 std::cout << "ID | Seq. of Layer | Size of Layer | Local ID List" << std::endl; 00427 for(unsigned i=0;i<6;++i){ 00428 //std::cout.form(" %1d | %2d | %2d |", i, m_seqOfLayer[i], m_sizeOfLayer[i]); 00429 std::cout << i << " | " << m_seqOfLayer[i] << " | " << m_sizeOfLayer[i] << " | "; 00430 for(unsigned j = 0, size = m_layer[i].length(); j < size; ++j) 00431 std::cout << m_layer[i][j]->hit()->wire()->localId() << ", "; 00432 std::cout << std::endl; 00433 } 00434 }
|
|
|
|
00194 { 00195 if(m_flagOfUpdate)update(); 00196 return m_layerIdOfMaxSeq; 00197 }
|
|
00052 { return m_layer[i]; }
|
|
00051 { return m_list; }
|
|
00052 { return m_layer[i]; }
|
|
00051 { return m_list; }
|
|
|
|
|
|
00090 { 00091 m_MaxLocalLayerId = i; 00092 return m_MaxLocalLayerId; 00093 }
|
|
00056 {
00057 return m_MaxLocalLayerId;
00058 }
|
|
|
|
00182 { 00183 // I try to use non-const member. 00184 // If this method is bad, other methods are necessary. 00185 TSegmentCurl * const localThis = const_cast<TSegmentCurl * const>(this); 00186 if(m_flagOfUpdate)localThis->update(); 00187 return m_maxSeq; 00188 }
|
|
|
|
00212 { 00213 if(m_flagOfUpdate)update(); 00214 return m_numOfLargeSeqLayer; 00215 }
|
|
|
|
00203 { 00204 if(m_flagOfUpdate)update(); 00205 return m_numOfSeqOneLayer; 00206 }
|
|
|
|
00244 { 00245 if(this == &s)return *this; 00246 00247 m_flagOfUpdate = s.m_flagOfUpdate; 00248 m_list = s.m_list; 00249 m_MaxLocalLayerId = s.m_MaxLocalLayerId; 00250 m_superLayerId = s.m_superLayerId; 00251 00252 m_maxSeq = s.m_maxSeq; 00253 m_layerIdOfMaxSeq = s.m_layerIdOfMaxSeq; 00254 m_numOfSeqOneLayer = s.m_numOfSeqOneLayer; 00255 m_numOfLargeSeqLayer = s.m_numOfLargeSeqLayer; 00256 00257 for(unsigned i=0;i<6;++i){ 00258 m_seqOfLayer[i] = s.m_seqOfLayer[i]; 00259 m_sizeOfLayer[i] = s.m_sizeOfLayer[i]; 00260 m_layer[i] = s.m_layer[i]; 00261 } 00262 00263 return *this; 00264 }
|
|
|
|
|
|
|
|
|
|
|
|
00159 { 00160 m_flagOfUpdate = true; 00161 for(unsigned i = 0; i < e.length(); ++i) 00162 m_layer[e[i]->hit()->wire()->localLayerId()].remove(e[i]); 00163 m_list.remove(e); 00164 }
|
|
00149 { 00150 m_flagOfUpdate = true; 00151 m_layer[e->hit()->wire()->localLayerId()].remove(e); 00152 m_list.remove(e); 00153 }
|
|
00139 { 00140 m_flagOfUpdate = true; 00141 m_layer[e.hit()->wire()->localLayerId()].remove(e); 00142 m_list.remove(e); 00143 }
|
|
|
|
00170 { 00171 m_flagOfUpdate = true; 00172 m_list.removeAll(); 00173 for(unsigned i=0;i<6;++i){ 00174 m_layer[i].removeAll(); 00175 } 00176 }
|
|
|
|
00072 { 00073 if(m_flagOfUpdate)update(); 00074 return m_seqOfLayer[i]; 00075 }
|
|
|
|
|
|
00036 { return m_list.length(); }
|
|
00036 { return m_list.length(); }
|
|
|
|
00081 { 00082 if(m_flagOfUpdate)update(); 00083 return m_sizeOfLayer[i]; 00084 }
|
|
|
|
|
|
00099 { 00100 m_superLayerId = i; 00101 return m_superLayerId; 00102 }
|
|
00064 {
00065 return m_superLayerId;
00066 }
|
|
|
|
00220 { 00221 if(m_list.length() == 0){ 00222 m_flagOfUpdate = false; 00223 return; 00224 } 00225 m_maxSeq = m_layerIdOfMaxSeq = 0; 00226 m_numOfSeqOneLayer = m_numOfLargeSeqLayer = 0; 00227 for(unsigned i = 0; i <= m_MaxLocalLayerId; ++i){ 00228 m_sizeOfLayer[i] = m_layer[i].length(); 00229 calcuSeq(i); 00230 if(m_seqOfLayer[i] >= m_maxSeq){ 00231 m_maxSeq = m_seqOfLayer[i]; 00232 m_layerIdOfMaxSeq = i; 00233 } 00234 if(m_seqOfLayer[i] == 1)++m_numOfSeqOneLayer; 00235 if(m_seqOfLayer[i] >= TCURL_LARGE_SEQUENCE)++m_numOfLargeSeqLayer; 00236 } 00237 00238 m_flagOfUpdate = false; 00239 }
|
|
|
|
00383 { 00384 // input - layer id#(0-422) 00385 // output - # of its layer 00386 if(LayerId == 0)return 40; 00387 if(LayerId == 1)return 44; 00388 if(LayerId == 2)return 48; 00389 if(LayerId == 3)return 56; 00390 if(LayerId == 4)return 64; 00391 if(LayerId == 5)return 72; 00392 if(LayerId == 6 || LayerId == 7) return 80; 00393 if(LayerId == 8 || LayerId == 9) return 76; 00394 if(LayerId == 10|| LayerId == 11)return 88; 00395 if(LayerId == 12|| LayerId == 13)return 100; 00396 if(LayerId == 14|| LayerId == 15)return 112; 00397 if(LayerId == 16|| LayerId == 17)return 128; 00398 if(LayerId == 18|| LayerId == 19)return 140; 00399 if(LayerId < 24)return 160; 00400 if(LayerId < 28)return 176; 00401 if(LayerId < 32)return 208; 00402 if(LayerId < 36)return 240; 00403 if(LayerId < 40)return 256; 00404 if(LayerId < 43)return 288; 00405 00406 std::cerr << "Error in the SegmentCurl(wires)." << std::endl; 00407 return 0; 00408 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|