#include <TMDCWire.h>
Public Member Functions | |
TMDCWire (const MdcGeoWire *, TMDCLayer *) | |
Constructor. | |
virtual | ~TMDCWire () |
Destructor. | |
unsigned | id (void) const |
returns id. | |
unsigned | localId (void) const |
returns local id in a wire layer. | |
unsigned | layerId (void) const |
returns layer id. | |
unsigned | localLayerId (void) const |
returns local layer id in a super layer. | |
unsigned | superLayerId (void) const |
returns super layer id. | |
unsigned | axialStereoLayerId (void) const |
returns id of axial or stereo id. | |
const MdcGeoWire * | geocdc (void) const |
returns a pointer to GEOMDC_WIR. | |
const TMDCLayer *const | layer (void) const |
returns a pointer to a layer. | |
const TMDCWireHit *const | hit (void) const |
returns a pointer to a TMDCWireHit. | |
const TMDCTsf *const | tsf (void) const |
returns a pointer to a TMDCTsf. | |
unsigned | state (void) const |
returns state. | |
bool | axial (void) const |
returns true if this wire is in an axial layer. | |
bool | stereo (void) const |
returns true if this wire is in a stereo layer. | |
bool | innerPart (void) const |
returns true if this wire is in the inner part. | |
bool | mainPart (void) const |
returns true if this wire is in the main part. | |
const TMDCWire *const | neighbor (unsigned) const |
returns a pointer to a neighbor wire. | |
bool | consective (const TMDCWire &) const |
returns true if a given wire is consective in a layer. | |
bool | adjacent (const TMDCWire &) const |
returns true if a given wire is adjacent. | |
int | localIdForPlus (void) const |
returns localId but if maxLocalId, return -1. | |
int | localIdForMinus (void) const |
returns localId but if 0, return maxLocalId + 1. | |
const HepPoint3D & | forwardPosition (void) const |
returns position in forward endplate. | |
const HepPoint3D & | backwardPosition (void) const |
returns position in backward endplate. | |
double * | backwardPosition (double p[3]) const |
const double & | tension (void) const |
const HepPoint3D & | xyPosition (void) const |
returns middle position of a wire. z componet is 0. | |
double * | xyPosition (double p[3]) const |
const HepPoint3D | xyPosition (double z) const |
const HepVector3D & | direction (void) const |
returns direction vector of the wire. | |
void | wirePosition (float zPosition, HepPoint3D &xyPosition, HepPoint3D &backwardPosition, HepVector3D &direction) const |
calculates position and direction vector with sag correction. | |
float | cellSize (void) const |
returns cell size in phi. | |
int | localIdDifference (const TMDCWire &) const |
returns local id difference. | |
std::string | name (void) const |
returns name. | |
void | dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const |
dumps debug information. | |
const TMDCWireHit *const | hit (const TMDCWireHit *const) |
sets a pointer to TMDCWireHit. | |
const TMDCWireHitMC *const | hit (TMDCWireHitMC *const) |
appends a pointer to TMDCWireHitMC. | |
TMDCTsf * | tsf (TMDCTsf *) |
sets a pointer of TMDCTsf. | |
unsigned | state (unsigned newState) |
sets state. | |
void | clear (void) |
clears information. | |
Private Attributes | |
unsigned | _state |
const TMDCWireHit * | _hit |
AList< TMDCWireHitMC > | _mcHits |
unsigned | _id |
unsigned | _localId |
unsigned | _layerId |
const TMDCLayer * | _layer |
TMDCTsf * | _tsf |
HepPoint3D | _xyPosition |
HepPoint3D | _forwardPosition |
HepPoint3D | _backwardPosition |
double | _tension |
HepVector3D | _direction |
const MdcGeoWire * | _geo |
Static Private Attributes | |
static TMDC * | _cdc = 0 |
Definition at line 55 of file TMDCWire.h.
TMDCWire::TMDCWire | ( | const MdcGeoWire * | , | |
TMDCLayer * | ||||
) |
Constructor.
Definition at line 32 of file TMDCWire.cxx.
References _backwardPosition, _direction, _forwardPosition, _geo, _hit, _id, _layer, _layerId, _localId, _state, _tsf, _xyPosition, and w.
00033 : _forwardPosition(w->Backward()*0.1), 00034 _backwardPosition(w->Forward()*0.1), 00035 _tension(w->Tension()), 00036 _direction(w->Backward() -w->Forward()) { 00037 //: _forwardPosition(w->Forward()*0.1), 00038 // _backwardPosition(w->Backward()*0.1), 00039 // _direction(w->Forward() - w->Backward()) { 00040 _state = 0; 00041 _geo = w; 00042 _id = w->Id(); 00043 _localId = w->Cell(); 00044 _layerId = w->Layer(); 00045 _layer = l; 00046 _tsf = 0; 00047 _hit = 0; 00048 _xyPosition = 0.5 * (_forwardPosition + _backwardPosition); 00049 _xyPosition.setZ(0.); 00050 _direction = _direction.unit(); 00051 }
TMDCWire::~TMDCWire | ( | ) | [virtual] |
returns true if a given wire is adjacent.
Definition at line 403 of file TMDCWire.h.
References genRecEmupikp::i, neighbor(), and w.
00403 { 00404 for (unsigned i = 0; i < 6; i++) 00405 if (neighbor(i) == & w) 00406 return true; 00407 return false; 00408 }
bool TMDCWire::axial | ( | void | ) | const [inline] |
returns true if this wire is in an axial layer.
Definition at line 348 of file TMDCWire.h.
References _layer, and TMDCLayer::axial().
Referenced by name().
unsigned TMDCWire::axialStereoLayerId | ( | void | ) | const [inline] |
returns id of axial or stereo id.
Definition at line 360 of file TMDCWire.h.
References _layer, and TMDCLayer::axialStereoLayerId().
00360 { 00361 return _layer->axialStereoLayerId(); 00362 }
double * TMDCWire::backwardPosition | ( | double | p[3] | ) | const [inline] |
Definition at line 318 of file TMDCWire.h.
References _backwardPosition.
00318 { 00319 p[0] = _backwardPosition.x(); 00320 p[1] = _backwardPosition.y(); 00321 p[2] = _backwardPosition.z(); 00322 return p; 00323 }
const HepPoint3D & TMDCWire::backwardPosition | ( | void | ) | const [inline] |
returns position in backward endplate.
Definition at line 306 of file TMDCWire.h.
References _backwardPosition.
Referenced by TCurlFinder::distance(), THelixFitter::drift(), TTrack::stereoHitForCurl(), and TTrack::szPosition().
00306 { 00307 return _backwardPosition; 00308 }
float TMDCWire::cellSize | ( | void | ) | const [inline] |
returns cell size in phi.
Definition at line 380 of file TMDCWire.h.
References _layer, and TMDCLayer::cellSize().
00380 { 00381 if (_layer) { 00382 return _layer->cellSize(); 00383 } 00384 else { 00385 #ifdef TRKRECO_DEBUG 00386 std::cout << "TMDCWire::cellSize !!! can't return cell size"; 00387 std::cout << " because no pointer to a layer" << std::endl; 00388 #endif 00389 return 0.; 00390 } 00391 }
void TMDCWire::clear | ( | void | ) | [inline] |
returns true if a given wire is consective in a layer.
Definition at line 395 of file TMDCWire.h.
References neighbor(), and w.
Referenced by TBuilder0::consectiveHits().
00395 { 00396 if (neighbor(2) == & w) return true; 00397 else if (neighbor(3) == & w) return true; 00398 return false; 00399 }
const HepVector3D & TMDCWire::direction | ( | void | ) | const [inline] |
returns direction vector of the wire.
Definition at line 342 of file TMDCWire.h.
References _direction.
Referenced by TCurlFinder::distance(), THelixFitter::main(), TTrack::stereoHitForCurl(), and TTrack::szPosition().
00342 { 00343 return _direction; 00344 }
void TMDCWire::dump | ( | const std::string & | message = std::string("") , |
|
const std::string & | prefix = std::string("") | |||
) | const |
dumps debug information.
Definition at line 57 of file TMDCWire.cxx.
References _id, _layerId, _localId, _tsf, genRecEmupikp::i, localLayerId(), neighbor(), RealDBUtil::npos, and superLayerId().
00057 { 00058 std::cout << pre; 00059 std::cout << "w " << _id; 00060 std::cout << ",local " << _localId; 00061 std::cout << ",layer " << _layerId; 00062 std::cout << ",super layer " << superLayerId(); 00063 std::cout << ",local layer " << localLayerId(); 00064 std::cout << std::endl; 00065 if (msg.find("neighbor") != std::string::npos || msg.find("detail") != std::string::npos) { 00066 for (unsigned i = 0; i < 6; i++) 00067 if (neighbor(i)) 00068 neighbor(i)->dump("", pre + itostring(i) + " "); 00069 } 00070 if (msg.find("tsf") != std::string::npos || msg.find("detail") != std::string::npos) { 00071 if (_tsf) _tsf->dump("", pre + " "); 00072 } 00073 }
const HepPoint3D & TMDCWire::forwardPosition | ( | void | ) | const [inline] |
returns position in forward endplate.
Definition at line 300 of file TMDCWire.h.
References _forwardPosition.
Referenced by THelixFitter::drift(), TTrack::stereoHitForCurl(), and TTrack::szPosition().
00300 { 00301 return _forwardPosition; 00302 }
const MdcGeoWire * TMDCWire::geocdc | ( | void | ) | const [inline] |
returns a pointer to GEOMDC_WIR.
Definition at line 237 of file TMDCWire.h.
References _geo.
00237 { 00238 return _geo; 00239 }
const TMDCWireHitMC *const TMDCWire::hit | ( | TMDCWireHitMC * | const | ) | [inline] |
appends a pointer to TMDCWireHitMC.
Definition at line 293 of file TMDCWire.h.
References _mcHits.
00293 { 00294 _mcHits.append(a); 00295 return a; 00296 }
const TMDCWireHit *const TMDCWire::hit | ( | const TMDCWireHit * | const | ) | [inline] |
sets a pointer to TMDCWireHit.
Definition at line 281 of file TMDCWire.h.
References _hit.
00281 { 00282 return _hit = h; 00283 }
const TMDCWireHit *const TMDCWire::hit | ( | void | ) | const [inline] |
returns a pointer to a TMDCWireHit.
Definition at line 287 of file TMDCWire.h.
References _hit.
Referenced by TMDC::classification().
00287 { 00288 return _hit; 00289 }
unsigned TMDCWire::id | ( | void | ) | const [inline] |
returns id.
Definition at line 207 of file TMDCWire.h.
References _id.
Referenced by TSegment::appendByLine(), TMDC::driftDistance(), TRungeFitter::fit(), TCurlFinder::searchAxialCand(), TCurlFinder::searchHits(), TMDC::updateMC(), and wirePosition().
00207 { 00208 return _id; 00209 }
bool TMDCWire::innerPart | ( | void | ) | const [inline] |
returns true if this wire is in the inner part.
Definition at line 366 of file TMDCWire.h.
References _layerId.
00366 { 00367 if (_layerId < 14) return true; 00368 return false; 00369 }
const TMDCLayer *const TMDCWire::layer | ( | void | ) | const [inline] |
returns a pointer to a layer.
Definition at line 243 of file TMDCWire.h.
References _layer.
Referenced by TBuilder0::consectiveHits(), and localIdDifference().
00243 { 00244 return _layer; 00245 }
unsigned TMDCWire::layerId | ( | void | ) | const [inline] |
returns layer id.
Definition at line 219 of file TMDCWire.h.
References _layerId.
Referenced by TBuilder0::check2CnHits(), TBuilder0::consectiveHits(), TMDCTsf::createTsf(), THelixFitter::drift(), T3DLineFitter::drift(), TMDCWireHit::dump(), findIsolatedCloseHits(), TRungeFitter::fit(), TMLine::fit2(), TLine0::fit2(), TMLine::fit2p(), TLine0::fit2p(), TTrackManager::maskNormal(), TSegment::maxdDistance(), TrkReco::maxdDistance(), TTrackManager::merge(), neighbor(), offsetBorder(), SameLayer(), TCurlFinder::searchAxialCand(), and TCircle::weight().
00219 { 00220 return _layerId; 00221 }
unsigned TMDCWire::localId | ( | void | ) | const [inline] |
returns local id in a wire layer.
Definition at line 213 of file TMDCWire.h.
References _localId.
Referenced by TBuilder0::buildStereo(), TBuilder0::check2CnHits(), TMDCTsf::createTsf(), THelixFitter::drift(), T3DLineFitter::drift(), TMDCWireHit::dump(), findIsolatedCloseHits(), TRungeFitter::fit(), localIdDifference(), neighbor(), TCurlFinder::searchAxialCand(), TSegment0::splitComplicated(), TSegment::splitComplicated(), and TCircle::weight().
00213 { 00214 return _localId; 00215 }
int TMDCWire::localIdDifference | ( | const TMDCWire & | ) | const |
returns local id difference.
Definition at line 577 of file TMDCWire.cxx.
References layer(), localId(), TMDCLayer::nWires(), and superLayerId().
Referenced by TSegment0::splitParallel(), and TSegment::splitParallel().
00577 { 00578 00579 #ifdef TRKRECO_DEBUG_DETAIL 00580 if (superLayerId() != a.superLayerId()) { 00581 std::cout << "TMDCWire::localIdDifference !!!"; 00582 std::cout << "super layer assumption violation" << std::endl; 00583 } 00584 #endif 00585 00586 int diff = int(a.localId()) - int(localId()); 00587 unsigned nWires = layer()->nWires(); 00588 if (diff > 0) { 00589 int difR = nWires - diff; 00590 if (diff < difR) return diff; 00591 else return - difR; 00592 } 00593 else { 00594 int difR = nWires + diff; 00595 if (- diff < difR) return diff; 00596 else return difR; 00597 } 00598 }
int TMDCWire::localIdForMinus | ( | void | ) | const |
returns localId but if 0, return maxLocalId + 1.
Definition at line 355 of file TMDCWire.cxx.
References _layerId, and _localId.
00355 { 00356 /* 00357 if(_layerId >= 0 && _layerId <= 5){ 00358 if(_localId == 0) 00359 return 64; 00360 else return _localId; 00361 } 00362 00363 if(_layerId >= 6 && _layerId <= 8){ 00364 if(_localId == 0) 00365 return 80; 00366 else return _localId; 00367 } 00368 00369 if(_layerId >= 9 && _layerId <= 14){ 00370 if(_localId == 0) 00371 return 96; 00372 else return _localId; 00373 } 00374 00375 if(_layerId >= 15 && _layerId <= 17){ 00376 if(_localId == 0) 00377 return 128; 00378 else return _localId; 00379 } 00380 00381 if(_layerId >= 18 && _layerId <= 22){ 00382 if(_localId == 0) 00383 return 144; 00384 else return _localId; 00385 } 00386 00387 if(_layerId >= 23 && _layerId <= 26){ 00388 if(_localId == 0) 00389 return 160; 00390 else return _localId; 00391 } 00392 00393 if(_layerId >= 27 && _layerId <= 31){ 00394 if(_localId == 0) 00395 return 192; 00396 else return _localId; 00397 } 00398 00399 if(_layerId >= 32 && _layerId <= 35){ 00400 if(_localId == 0) 00401 return 208; 00402 else return _localId; 00403 } 00404 00405 if(_layerId >= 36 && _layerId <= 40){ 00406 if(_localId == 0) 00407 return 240; 00408 else return _localId; 00409 } 00410 00411 if(_layerId >= 41 && _layerId <= 44){ 00412 if(_localId == 0) 00413 return 256; 00414 else return _localId; 00415 } 00416 00417 if(_layerId >= 45){ 00418 if(_localId == 0) 00419 return 288; 00420 else return _localId; 00421 } 00422 */ 00423 //Liuqg 060915 00424 if(_layerId == 0){ 00425 if(_localId == 0) 00426 return 40; 00427 else return _localId; 00428 } 00429 00430 if(_layerId == 1){ 00431 if(_localId == 0) 00432 return 44; 00433 else return _localId; 00434 } 00435 00436 if(_layerId == 2){ 00437 if(_localId == 0) 00438 return 48; 00439 else return _localId; 00440 } 00441 00442 if(_layerId == 3){ 00443 if(_localId == 0) 00444 return 56; 00445 else return _localId; 00446 } 00447 00448 if(_layerId == 4){ 00449 if(_localId == 0) 00450 return 64; 00451 else return _localId; 00452 } 00453 00454 if(_layerId == 5){ 00455 if(_localId == 0) 00456 return 72; 00457 else return _localId; 00458 } 00459 00460 if(_layerId == 6 || _layerId == 7){ 00461 if(_localId == 0) 00462 return 80; 00463 else return _localId; 00464 } 00465 00466 if(_layerId == 8 || _layerId == 9){ 00467 if(_localId == 0) 00468 return 76; 00469 else return _localId; 00470 } 00471 00472 if(_layerId == 10 || _layerId == 11){ 00473 if(_localId == 0) 00474 return 88; 00475 else return _localId; 00476 } 00477 00478 if(_layerId == 12 || _layerId == 13){ 00479 if(_localId == 0) 00480 return 100; 00481 else return _localId; 00482 } 00483 00484 if(_layerId == 14 || _layerId == 15){ 00485 if(_localId == 0) 00486 return 112; 00487 else return _localId; 00488 } 00489 00490 if(_layerId == 16 || _layerId == 17){ 00491 if(_localId == 0) 00492 return 128; 00493 else return _localId; 00494 } 00495 00496 if(_layerId == 18 || _layerId == 19){ 00497 if(_localId == 0) 00498 return 140; 00499 else return _localId; 00500 } 00501 00502 if(_layerId >= 20 && _layerId <= 23){ 00503 if(_localId == 0) 00504 return 160; 00505 else return _localId; 00506 } 00507 00508 if(_layerId >= 24 && _layerId <= 27){ 00509 if(_localId == 0) 00510 return 176; 00511 else return _localId; 00512 } 00513 00514 if(_layerId >= 28 && _layerId <= 31){ 00515 if(_localId == 0) 00516 return 208; 00517 else return _localId; 00518 } 00519 00520 if(_layerId >= 32 && _layerId <= 35){ 00521 if(_localId == 0) 00522 return 240; 00523 else return _localId; 00524 } 00525 00526 if(_layerId >= 36 && _layerId <= 39){ 00527 if(_localId == 0) 00528 return 256; 00529 else return _localId; 00530 } 00531 00532 if(_layerId >= 40 && _layerId <= 42){ 00533 if(_localId == 0) 00534 return 288; 00535 else return _localId; 00536 } 00537 return -1; 00538 }
int TMDCWire::localIdForPlus | ( | void | ) | const |
returns localId but if maxLocalId, return -1.
Definition at line 166 of file TMDCWire.cxx.
References _layerId, and _localId.
00166 { 00167 /* 00168 if(_layerId >= 0 && _layerId <= 5){ 00169 if(_localId == 63) 00170 return -1; 00171 else return _localId; 00172 } 00173 00174 if(_layerId >= 6 && _layerId <= 8){ 00175 if(_localId == 79) 00176 return -1; 00177 else return _localId; 00178 } 00179 00180 if(_layerId >= 9 && _layerId <= 14){ 00181 if(_localId == 95) 00182 return -1; 00183 else return _localId; 00184 } 00185 00186 if(_layerId >= 15 && _layerId <= 17){ 00187 if(_localId == 127) 00188 return -1; 00189 else return _localId; 00190 } 00191 00192 if(_layerId >= 18 && _layerId <= 22){ 00193 if(_localId == 143) 00194 return -1; 00195 else return _localId; 00196 } 00197 00198 if(_layerId >= 23 && _layerId <= 26){ 00199 if(_localId == 159) 00200 return -1; 00201 else return _localId; 00202 } 00203 00204 if(_layerId >= 27 && _layerId <= 31){ 00205 if(_localId == 175) 00206 return -1; 00207 else return _localId; 00208 } 00209 00210 if(_layerId >= 32 && _layerId <= 35){ 00211 if(_localId == 207) 00212 return -1; 00213 else return _localId; 00214 } 00215 00216 if(_layerId >= 36 && _layerId <= 40){ 00217 if(_localId == 239) 00218 return -1; 00219 else return _localId; 00220 } 00221 00222 if(_layerId >= 41 && _layerId <= 44){ 00223 if(_localId == 255) 00224 return -1; 00225 else return _localId; 00226 } 00227 00228 if(_layerId >= 45){ 00229 if(_localId == 287) 00230 return -1; 00231 else return _localId; 00232 } 00233 00234 return -1; 00235 */ 00236 //Liuqg 060915 00237 if(_layerId == 0){ 00238 if(_localId == 39) 00239 return -1; 00240 else return _localId; 00241 } 00242 00243 if(_layerId == 1){ 00244 if(_localId == 43) 00245 return -1; 00246 else return _localId; 00247 } 00248 00249 if(_layerId == 2){ 00250 if(_localId == 47) 00251 return -1; 00252 else return _localId; 00253 } 00254 00255 if(_layerId == 3){ 00256 if(_localId == 55) 00257 return -1; 00258 else return _localId; 00259 } 00260 00261 if(_layerId == 4){ 00262 if(_localId == 63) 00263 return -1; 00264 else return _localId; 00265 } 00266 00267 if(_layerId == 5){ 00268 if(_localId == 71) 00269 return -1; 00270 else return _localId; 00271 } 00272 00273 if(_layerId == 6 || _layerId == 7){ 00274 if(_localId == 79) 00275 return -1; 00276 else return _localId; 00277 } 00278 00279 if(_layerId == 8 || _layerId == 9){ 00280 if(_localId == 75) 00281 return -1; 00282 else return _localId; 00283 } 00284 00285 if(_layerId == 10 || _layerId == 11){ 00286 if(_localId == 87) 00287 return -1; 00288 else return _localId; 00289 } 00290 00291 if(_layerId == 12 || _layerId == 13){ 00292 if(_localId == 99) 00293 return -1; 00294 else return _localId; 00295 } 00296 00297 if(_layerId == 14 || _layerId == 15){ 00298 if(_localId == 111) 00299 return -1; 00300 else return _localId; 00301 } 00302 00303 if(_layerId == 16 || _layerId == 17){ 00304 if(_localId == 127) 00305 return -1; 00306 else return _localId; 00307 } 00308 00309 if(_layerId == 18 || _layerId == 19){ 00310 if(_localId == 139) 00311 return -1; 00312 else return _localId; 00313 } 00314 00315 if(_layerId >= 20 && _layerId <= 23){ 00316 if(_localId == 159) 00317 return -1; 00318 else return _localId; 00319 } 00320 00321 if(_layerId >= 24 && _layerId <= 27){ 00322 if(_localId == 175) 00323 return -1; 00324 else return _localId; 00325 } 00326 00327 if(_layerId >= 28 && _layerId <= 31){ 00328 if(_localId == 207) 00329 return -1; 00330 else return _localId; 00331 } 00332 00333 if(_layerId >= 32 && _layerId <= 35){ 00334 if(_localId == 239) 00335 return -1; 00336 else return _localId; 00337 } 00338 00339 if(_layerId >= 36 && _layerId <= 39){ 00340 if(_localId == 255) 00341 return -1; 00342 else return _localId; 00343 } 00344 00345 if(_layerId >= 40 && _layerId <= 42){ 00346 if(_localId == 287) 00347 return -1; 00348 else return _localId; 00349 } 00350 00351 return -1; 00352 }
unsigned TMDCWire::localLayerId | ( | void | ) | const [inline] |
returns local layer id in a super layer.
Definition at line 231 of file TMDCWire.h.
References _layer, and TMDCLayer::localLayerId().
Referenced by TSegmentCurl::append(), dump(), TSegmentCurl::remove(), and TSegment::splitTsf().
00231 { 00232 return _layer->localLayerId(); 00233 }
bool TMDCWire::mainPart | ( | void | ) | const [inline] |
returns true if this wire is in the main part.
Definition at line 373 of file TMDCWire.h.
References _layerId.
00373 { 00374 if (_layerId > 13) return true; 00375 return false; 00376 }
std::string TMDCWire::name | ( | void | ) | const [inline] |
returns name.
Definition at line 412 of file TMDCWire.h.
References _layerId, _localId, axial(), and deljobs::string.
Referenced by TTrackBase::append(), TTrack::assign(), TMDCWireHit::dump(), TSegment0::splitComplicated(), and TSegment::splitComplicated().
00412 { 00413 if (axial()) 00414 return itostring(_layerId) + std::string("-") + itostring(_localId); 00415 return itostring(_layerId) + std::string("=") + itostring(_localId); 00416 }
const TMDCWire *const TMDCWire::neighbor | ( | unsigned | ) | const |
returns a pointer to a neighbor wire.
Definition at line 95 of file TMDCWire.cxx.
References _cdc, TMDC::getTMDC(), TMDC::layer(), layerId(), localId(), TMDC::nLayers(), TMDCLayer::nWires(), TMDCLayer::offset(), phi0, pi, s, TMDCLayer::superLayerId(), superLayerId(), TMDC::wire(), WireInnerLeft, WireInnerRight, WireLeft, WireOuterLeft, WireOuterRight, and WireRight.
Referenced by adjacent(), TMDC::classification(), consective(), and dump().
00095 { 00096 if (_cdc == 0) _cdc = TMDC::getTMDC(); 00097 static const unsigned nLayers = _cdc->nLayers(); 00098 00099 //...Expensive... 00100 unsigned l = layerId(); 00101 int local = (int) localId(); 00102 float phi0 = _cdc->layer(l)->offset(); 00103 int nWir = (int) _cdc->layer(l)->nWires(); 00104 float phi = phi0 + local*2*pi/nWir; 00105 unsigned s = superLayerId(); 00106 // cout<<"i:"<<i<<" layerId:"<<l<<" local:"<<local<<" nWire:"<<nWir<<" superLyrId:"<<s<<endl; 00107 00108 if (i == WireInnerLeft || i == WireInnerRight) { 00109 if (l == 0) return 0; 00110 --l; 00111 if (_cdc->layer(l)->superLayerId() != s) return 0; 00112 phi0 = _cdc->layer(l)->offset(); 00113 nWir = _cdc->layer(l)->nWires(); 00114 local = (int)((phi-phi0)/(2*pi/nWir)); 00115 00116 // cout<<"inner local"<<local<<", "<<local+1<<endl; 00117 00118 // cout<<(phi-phi0)/(2*pi/nWir)<<" local:"<<local<<endl; 00119 // cout<<"InnerLeft phi:"<<phi0 + local*2*pi/nWir 00120 // <<" InnerRight phi:"<<phi0 + (local+1)*2*pi/nWir 00121 // <<" phi:"<<phi<<endl; 00122 // if(local<0 || local+1>nWir-1) 00123 // cout<<"TMDCWire::neighbor()---Pay attation the cellNo !!!"<<endl 00124 // <<l+1<<"th layer: InnerLeftRight, local:"<<local<<" local+1:"<<local+1<<endl; 00125 // LR changed to bes3 00126 if (i == WireInnerLeft) return _cdc->wire(l, local); 00127 else return _cdc->wire(l, local + 1); 00128 // if (i == WireInnerRight) return _cdc->wire(l, local); 00129 // else return _cdc->wire(l, local + 1); 00130 00131 } 00132 else if (i == WireLeft || i == WireRight) { 00133 // cout<<"Left phi:"<<phi0 + (local-1)*2*pi/nWir 00134 // <<" Right phi:"<<phi0 + (local+1)*2*pi/nWir 00135 // <<" phi:"<<phi<<endl; 00136 // if(local-1<0 || local+1>nWir-1) 00137 // cout<<"TMDCWire::neighbor()---Pay attation the Cell No !!!"<<endl 00138 // <<l<<"th layer: LeftRight, local-1:"<<local-1<<" local+1:"<<local+1<<endl; 00139 if (i == WireLeft) return _cdc->wire(l, local - 1); 00140 else return _cdc->wire(l, local + 1); 00141 } 00142 else if (i == WireOuterLeft || i == WireOuterRight) { 00143 if (l == nLayers - 1) return 0; 00144 ++l; 00145 if (_cdc->layer(l)->superLayerId() != s) return 0; 00146 phi0 = _cdc->layer(l)->offset(); 00147 nWir = _cdc->layer(l)->nWires(); 00148 local = (int)((phi-phi0)/(2*pi/nWir)); 00149 00150 // cout<<"outer local"<<local<<", "<<local+1<<endl; 00151 00152 // cout<<(phi-phi0)/(2*pi/nWir)<<" local:"<<local<<endl; 00153 // cout<<"OuterLeft phi:"<<phi0 + local*2*pi/nWir 00154 // <<" OuterRight phi:"<<phi0 + (local+1)*2*pi/nWir 00155 // <<" phi:"<<phi<<endl; 00156 // if(local<0 || local+1>nWir-1) 00157 // cout<<"TMDCWire::neighbor()---Pay attation the Cell No !!!"<<endl 00158 // <<l-1<<"th layer: OuterLeftRight, local:"<<local<<" local+1:"<<local+1<<endl; 00159 if (i == WireOuterLeft) return _cdc->wire(l, local); 00160 else return _cdc->wire(l, local + 1); 00161 } 00162 return 0; 00163 }
unsigned TMDCWire::state | ( | unsigned | newState | ) | [inline] |
sets state.
Definition at line 267 of file TMDCWire.h.
References _state.
00267 { 00268 return _state = a; 00269 }
unsigned TMDCWire::state | ( | void | ) | const [inline] |
returns state.
Definition at line 261 of file TMDCWire.h.
References _state.
00261 { 00262 return _state; 00263 }
bool TMDCWire::stereo | ( | void | ) | const [inline] |
returns true if this wire is in a stereo layer.
Definition at line 354 of file TMDCWire.h.
References _layer, and TMDCLayer::stereo().
unsigned TMDCWire::superLayerId | ( | void | ) | const [inline] |
returns super layer id.
Definition at line 225 of file TMDCWire.h.
References _layer, and TMDCLayer::superLayerId().
Referenced by TSegment::appendByLine(), TBuilder0::check2CnHits(), TCurlFinder::distance(), dump(), localIdDifference(), TSegment::maxdDistance(), TrkReco::maxdDistance(), neighbor(), and SameSuperLayer().
00225 { 00226 return _layer->superLayerId(); 00227 }
const double & TMDCWire::tension | ( | void | ) | const [inline] |
Definition at line 312 of file TMDCWire.h.
References _tension.
00312 { 00313 return _tension; 00314 }
const TMDCTsf *const TMDCWire::tsf | ( | void | ) | const [inline] |
returns a pointer to a TMDCTsf.
Definition at line 249 of file TMDCWire.h.
References _tsf.
00249 { 00250 return _tsf; 00251 }
void TMDCWire::wirePosition | ( | float | zPosition, | |
HepPoint3D & | xyPosition, | |||
HepPoint3D & | backwardPosition, | |||
HepVector3D & | direction | |||
) | const |
calculates position and direction vector with sag correction.
Definition at line 541 of file TMDCWire.cxx.
References _backwardPosition, _direction, _forwardPosition, _xyPosition, and id().
Referenced by TRunge::SetFlightLength().
00544 { 00545 back = _backwardPosition; 00546 00547 //...Check z position... 00548 if (! (z > _backwardPosition.z() && z < _forwardPosition.z())) { 00549 xy = _xyPosition; 00550 dir = _direction; 00551 } 00552 00553 //...Setup... 00554 int wireID = id(); 00555 float wirePosition[3] = {0., 0., 0.}; 00556 float dydz = 0; 00557 float ybSag = 0; 00558 float yfSag = 0; 00559 00560 //...Get corrections... 00561 //zsl calcdc_sag3_(& wireID, & z, wirePosition, & dydz, & ybSag, & yfSag); 00562 00563 //...Wire position... 00564 xy.setX((double) wirePosition[0]); 00565 xy.setY((double) wirePosition[1]); 00566 xy.setZ((double) wirePosition[2]); 00567 back.setY((double) ybSag); 00568 HepVector3D v_aux(_forwardPosition.x() - _backwardPosition.x(), 00569 yfSag - ybSag, 00570 _forwardPosition.z() - _backwardPosition.z()); 00571 dir = v_aux.unit(); 00572 00573 return; 00574 }
const HepPoint3D TMDCWire::xyPosition | ( | double | z | ) | const |
Definition at line 76 of file TMDCWire.cxx.
References _backwardPosition, _direction, _forwardPosition, _tension, EvtCyclic3::A, and x.
00076 { 00077 double A=47.35E-6/_tension; 00078 HepPoint3D x0 =(z - _backwardPosition.z()) /_direction.z() * _direction + _backwardPosition; 00079 00080 double zinit = x0.z(); 00081 HepVector3D wire; 00082 wire.setX(_forwardPosition.x()-_backwardPosition.x()); 00083 wire.setY(_forwardPosition.y()-_backwardPosition.y()); 00084 wire.setZ(_forwardPosition.z()-_backwardPosition.z()); 00085 double lxz=sqrt(wire.z()*wire.z()+wire.x()*wire.x()); 00086 double Zp = (zinit - _backwardPosition.z())*lxz/wire.z(); 00087 double x=_direction.x()*(zinit-_backwardPosition.z())/_direction.z() + _backwardPosition.x(); 00088 double y=(A*(Zp-lxz)+wire.y()/lxz)*Zp+_backwardPosition.y(); 00089 x0.setX(x); 00090 x0.setY(y); 00091 return x0; 00092 }
double * TMDCWire::xyPosition | ( | double | p[3] | ) | const [inline] |
Definition at line 333 of file TMDCWire.h.
References _xyPosition.
00333 { 00334 a[0] = _xyPosition.x(); 00335 a[1] = _xyPosition.y(); 00336 a[2] = 0.; 00337 return a; 00338 }
const HepPoint3D & TMDCWire::xyPosition | ( | void | ) | const [inline] |
returns middle position of a wire. z componet is 0.
Definition at line 327 of file TMDCWire.h.
References _xyPosition.
Referenced by calVirtualCircle(), TPerfectFinder::doit(), TTrack::fit2D(), TCurlFinder::searchHits(), and TMLink::xyPosition().
00327 { 00328 return _xyPosition; 00329 }
HepPoint3D TMDCWire::_backwardPosition [private] |
Definition at line 186 of file TMDCWire.h.
Referenced by backwardPosition(), TMDCWire(), wirePosition(), and xyPosition().
TMDC * TMDCWire::_cdc = 0 [static, private] |
HepVector3D TMDCWire::_direction [private] |
Definition at line 188 of file TMDCWire.h.
Referenced by direction(), TMDCWire(), wirePosition(), and xyPosition().
HepPoint3D TMDCWire::_forwardPosition [private] |
Definition at line 185 of file TMDCWire.h.
Referenced by forwardPosition(), TMDCWire(), wirePosition(), and xyPosition().
const MdcGeoWire* TMDCWire::_geo [private] |
const TMDCWireHit* TMDCWire::_hit [private] |
unsigned TMDCWire::_id [private] |
const TMDCLayer* TMDCWire::_layer [private] |
Definition at line 182 of file TMDCWire.h.
Referenced by axial(), axialStereoLayerId(), cellSize(), layer(), localLayerId(), stereo(), superLayerId(), and TMDCWire().
unsigned TMDCWire::_layerId [private] |
Definition at line 181 of file TMDCWire.h.
Referenced by dump(), innerPart(), layerId(), localIdForMinus(), localIdForPlus(), mainPart(), name(), and TMDCWire().
unsigned TMDCWire::_localId [private] |
Definition at line 180 of file TMDCWire.h.
Referenced by dump(), localId(), localIdForMinus(), localIdForPlus(), name(), and TMDCWire().
AList<TMDCWireHitMC> TMDCWire::_mcHits [private] |
unsigned TMDCWire::_state [private] |
double TMDCWire::_tension [private] |
TMDCTsf* TMDCWire::_tsf [private] |
HepPoint3D TMDCWire::_xyPosition [private] |
Definition at line 184 of file TMDCWire.h.
Referenced by TMDCWire(), wirePosition(), and xyPosition().