Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TMDCWire Class Reference

A class to represent a wire in MDC. More...

#include <TMDCWire.h>

List of all members.

Public Member Functions

bool adjacent (const TMDCWire &) const
 returns true if a given wire is adjacent.
bool adjacent (const TMDCWire &) const
 returns true if a given wire is adjacent.
bool axial (void) const
 returns true if this wire is in an axial layer.
bool axial (void) const
 returns true if this wire is in an axial layer.
unsigned axialStereoLayerId (void) const
 returns id of axial or stereo id.
unsigned axialStereoLayerId (void) const
 returns id of axial or stereo id.
double * backwardPosition (double p[3]) const
const HepPoint3DbackwardPosition (void) const
 returns position in backward endplate.
double * backwardPosition (double p[3]) const
const HepPoint3DbackwardPosition (void) const
 returns position in backward endplate.
float cellSize (void) const
 returns cell size in phi.
float cellSize (void) const
 returns cell size in phi.
void clear (void)
 clears information.
void clear (void)
 clears information.
bool consective (const TMDCWire &) const
 returns true if a given wire is consective in a layer.
bool consective (const TMDCWire &) const
 returns true if a given wire is consective in a layer.
const HepVector3Ddirection (void) const
 returns direction vector of the wire.
const HepVector3Ddirection (void) const
 returns direction vector of the wire.
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
const HepPoint3DforwardPosition (void) const
 returns position in forward endplate.
const HepPoint3DforwardPosition (void) const
 returns position in forward endplate.
const MdcGeoWiregeocdc (void) const
 returns a pointer to GEOMDC_WIR.
const MdcGeoWiregeocdc (void) const
 returns a pointer to GEOMDC_WIR.
const TMDCWireHitMC *const hit (TMDCWireHitMC *const)
 appends a pointer to TMDCWireHitMC.
const TMDCWireHit *const hit (const TMDCWireHit *const)
 sets a pointer to TMDCWireHit.
const TMDCWireHit *const hit (void) const
 returns a pointer to a TMDCWireHit.
const TMDCWireHitMC *const hit (TMDCWireHitMC *const)
 appends a pointer to TMDCWireHitMC.
const TMDCWireHit *const hit (const TMDCWireHit *const)
 sets a pointer to TMDCWireHit.
const TMDCWireHit *const hit (void) const
 returns a pointer to a TMDCWireHit.
unsigned id (void) const
 returns id.
unsigned id (void) const
 returns id.
bool innerPart (void) const
 returns true if this wire is in the inner part.
bool innerPart (void) const
 returns true if this wire is in the inner part.
const TMDCLayer *const layer (void) const
 returns a pointer to a layer.
const TMDCLayer *const layer (void) const
 returns a pointer to a layer.
unsigned layerId (void) const
 returns layer id.
unsigned layerId (void) const
 returns layer id.
unsigned localId (void) const
 returns local id in a wire layer.
unsigned localId (void) const
 returns local id in a wire layer.
int localIdDifference (const TMDCWire &) const
 returns local id difference.
int localIdDifference (const TMDCWire &) const
 returns local id difference.
int localIdForMinus (void) const
 returns localId but if 0, return maxLocalId + 1.
int localIdForMinus (void) const
 returns localId but if 0, return maxLocalId + 1.
int localIdForPlus (void) const
 returns localId but if maxLocalId, return -1.
int localIdForPlus (void) const
 returns localId but if maxLocalId, return -1.
unsigned localLayerId (void) const
 returns local layer id in a super layer.
unsigned localLayerId (void) const
 returns local layer id in a super layer.
bool mainPart (void) const
 returns true if this wire is in the main part.
bool mainPart (void) const
 returns true if this wire is in the main part.
std::string name (void) const
 returns name.
std::string name (void) const
 returns name.
const TMDCWire *const neighbor (unsigned) const
 returns a pointer to a neighbor wire.
const TMDCWire *const neighbor (unsigned) const
 returns a pointer to a neighbor wire.
unsigned state (unsigned newState)
 sets state.
unsigned state (void) const
 returns state.
unsigned state (unsigned newState)
 sets state.
unsigned state (void) const
 returns state.
bool stereo (void) const
 returns true if this wire is in a stereo layer.
bool stereo (void) const
 returns true if this wire is in a stereo layer.
unsigned superLayerId (void) const
 returns super layer id.
unsigned superLayerId (void) const
 returns super layer id.
 TMDCWire (const MdcGeoWire *, TMDCLayer *)
 Constructor.
 TMDCWire (const MdcGeoWire *, TMDCLayer *)
 Constructor.
TMDCTsftsf (TMDCTsf *)
 sets a pointer of TMDCTsf.
const TMDCTsf *const tsf (void) const
 returns a pointer to a TMDCTsf.
TMDCTsftsf (TMDCTsf *)
 sets a pointer of TMDCTsf.
const TMDCTsf *const tsf (void) const
 returns a pointer to a TMDCTsf.
void wirePosition (float zPosition, HepPoint3D &xyPosition, HepPoint3D &backwardPosition, HepVector3D &direction) const
 calculates position and direction vector with sag correction.
void wirePosition (float zPosition, HepPoint3D &xyPosition, HepPoint3D &backwardPosition, HepVector3D &direction) const
 calculates position and direction vector with sag correction.
double * xyPosition (double p[3]) const
const HepPoint3DxyPosition (void) const
 returns middle position of a wire. z componet is 0.
double * xyPosition (double p[3]) const
const HepPoint3DxyPosition (void) const
 returns middle position of a wire. z componet is 0.
virtual ~TMDCWire ()
 Destructor.
virtual ~TMDCWire ()
 Destructor.

Private Attributes

HepPoint3D _backwardPosition
HepVector3D _direction
HepPoint3D _forwardPosition
const MdcGeoWire_geo
const MdcGeoWire_geo
const TMDCWireHit_hit
const TMDCWireHit_hit
unsigned _id
const TMDCLayer_layer
const TMDCLayer_layer
unsigned _layerId
unsigned _localId
AList< TMDCWireHitMC_mcHits
AList< TMDCWireHitMC_mcHits
unsigned _state
TMDCTsf_tsf
TMDCTsf_tsf
HepPoint3D _xyPosition

Static Private Attributes

TMDC_cdc
TMDC_cdc = 0


Detailed Description

A class to represent a wire in MDC.


Constructor & Destructor Documentation

TMDCWire::TMDCWire const MdcGeoWire ,
TMDCLayer
 

Constructor.

00033 : _forwardPosition(w->Backward()*0.1), 
00034   _backwardPosition(w->Forward()*0.1), 
00035   _direction(w->Backward() - w->Forward()) { 
00036 //: _forwardPosition(w->Forward()*0.1),
00037 //  _backwardPosition(w->Backward()*0.1),
00038 //  _direction(w->Forward() - w->Backward()) {
00039     _state = 0;
00040     _geo = w;
00041     _id = w->Id();
00042     _localId = w->Cell();
00043     _layerId = w->Layer();
00044     _layer = l;
00045     _tsf = 0;
00046     _hit = 0;
00047     _xyPosition = 0.5 * (_forwardPosition + _backwardPosition);
00048     _xyPosition.setZ(0.);
00049     _direction = _direction.unit();
00050 }

TMDCWire::~TMDCWire  )  [virtual]
 

Destructor.

00052                     {
00053 }

TMDCWire::TMDCWire const MdcGeoWire ,
TMDCLayer
 

Constructor.

virtual TMDCWire::~TMDCWire  )  [virtual]
 

Destructor.


Member Function Documentation

bool TMDCWire::adjacent const TMDCWire  )  const
 

returns true if a given wire is adjacent.

bool TMDCWire::adjacent const TMDCWire  )  const [inline]
 

returns true if a given wire is adjacent.

00396                                            {
00397     for (unsigned i = 0; i < 6; i++)
00398         if (neighbor(i) == & w)
00399             return true;
00400     return false;
00401 }

bool TMDCWire::axial void   )  const
 

returns true if this wire is in an axial layer.

bool TMDCWire::axial void   )  const [inline]
 

returns true if this wire is in an axial layer.

00341                           {
00342     return _layer->axial();
00343 }

unsigned TMDCWire::axialStereoLayerId void   )  const
 

returns id of axial or stereo id.

unsigned TMDCWire::axialStereoLayerId void   )  const [inline]
 

returns id of axial or stereo id.

00353                                        {
00354     return _layer->axialStereoLayerId();
00355 }

double* TMDCWire::backwardPosition double  p[3]  )  const
 

const HepPoint3D& TMDCWire::backwardPosition void   )  const
 

returns position in backward endplate.

double * TMDCWire::backwardPosition double  p[3]  )  const [inline]
 

00311                                             {
00312     p[0] = _backwardPosition.x();
00313     p[1] = _backwardPosition.y();
00314     p[2] = _backwardPosition.z();
00315     return p;
00316 }

const HepPoint3D & TMDCWire::backwardPosition void   )  const [inline]
 

returns position in backward endplate.

00305                                      {
00306     return _backwardPosition;
00307 }

float TMDCWire::cellSize void   )  const
 

returns cell size in phi.

float TMDCWire::cellSize void   )  const [inline]
 

returns cell size in phi.

00373                              {
00374     if (_layer) {
00375         return _layer->cellSize();
00376     }
00377     else {
00378 #ifdef TRKRECO_DEBUG
00379         std::cout << "TMDCWire::cellSize !!! can't return cell size";
00380         std::cout << " because no pointer to a layer" << std::endl;
00381 #endif
00382         return 0.;
00383     }
00384 }

void TMDCWire::clear void   ) 
 

clears information.

void TMDCWire::clear void   )  [inline]
 

clears information.

00272                     {
00273     _state = 0;
00274     _hit = 0;
00275     _mcHits.removeAll();
00276 }

bool TMDCWire::consective const TMDCWire  )  const
 

returns true if a given wire is consective in a layer.

bool TMDCWire::consective const TMDCWire  )  const [inline]
 

returns true if a given wire is consective in a layer.

00388                                              {
00389     if (neighbor(2) == & w) return true;
00390     else if (neighbor(3) == & w) return true;
00391     return false;
00392 }

const HepVector3D& TMDCWire::direction void   )  const
 

returns direction vector of the wire.

const HepVector3D & TMDCWire::direction void   )  const [inline]
 

returns direction vector of the wire.

00335                               {
00336     return _direction;
00337 }

void TMDCWire::dump const std::string &  message = std::string(""),
const std::string &  prefix = std::string("")
const
 

dumps debug information.

void TMDCWire::dump const std::string &  message = std::string(""),
const std::string &  prefix = std::string("")
const
 

dumps debug information.

00056                                                                  {
00057     std::cout << pre;
00058     std::cout << "w " << _id;
00059     std::cout << ",local " << _localId;
00060     std::cout << ",layer " << _layerId;
00061     std::cout << ",super layer " << superLayerId();
00062     std::cout << ",local layer " << localLayerId();
00063     std::cout << std::endl;
00064     if (msg.find("neighbor") != std::string::npos || msg.find("detail") != std::string::npos) {
00065         for (unsigned i = 0; i < 6; i++)
00066             if (neighbor(i))
00067                 neighbor(i)->dump("", pre + itostring(i) + "   ");
00068     }    
00069     if (msg.find("tsf") != std::string::npos || msg.find("detail") != std::string::npos) {
00070         if (_tsf) _tsf->dump("", pre + "    ");
00071     }
00072 }

const HepPoint3D& TMDCWire::forwardPosition void   )  const
 

returns position in forward endplate.

const HepPoint3D & TMDCWire::forwardPosition void   )  const [inline]
 

returns position in forward endplate.

00299                                     {
00300     return _forwardPosition;
00301 }

const MdcGeoWire* TMDCWire::geocdc void   )  const
 

returns a pointer to GEOMDC_WIR.

const MdcGeoWire * TMDCWire::geocdc void   )  const [inline]
 

returns a pointer to GEOMDC_WIR.

00236                            {
00237     return _geo;
00238 }

const TMDCWireHitMC* const TMDCWire::hit TMDCWireHitMC const  ) 
 

appends a pointer to TMDCWireHitMC.

const TMDCWireHit* const TMDCWire::hit const TMDCWireHit const  ) 
 

sets a pointer to TMDCWireHit.

const TMDCWireHit* const TMDCWire::hit void   )  const
 

returns a pointer to a TMDCWireHit.

const TMDCWireHitMC *const TMDCWire::hit TMDCWireHitMC const  )  [inline]
 

appends a pointer to TMDCWireHitMC.

00292                                      {
00293     _mcHits.append(a);
00294     return a;
00295 }

const TMDCWireHit *const TMDCWire::hit const TMDCWireHit const  )  [inline]
 

sets a pointer to TMDCWireHit.

00280                                          {
00281     return _hit = h;
00282 }

const TMDCWireHit *const TMDCWire::hit void   )  const [inline]
 

returns a pointer to a TMDCWireHit.

00286                         {
00287     return _hit;
00288 }

unsigned TMDCWire::id void   )  const
 

returns id.

unsigned TMDCWire::id void   )  const [inline]
 

returns id.

00206                        {
00207     return _id;
00208 }

bool TMDCWire::innerPart void   )  const
 

returns true if this wire is in the inner part.

bool TMDCWire::innerPart void   )  const [inline]
 

returns true if this wire is in the inner part.

00359                               {
00360     if (_layerId < 14) return true;
00361     return false;
00362 }

const TMDCLayer* const TMDCWire::layer void   )  const
 

returns a pointer to a layer.

const TMDCLayer *const TMDCWire::layer void   )  const [inline]
 

returns a pointer to a layer.

00242                           {
00243     return _layer;
00244 }

unsigned TMDCWire::layerId void   )  const
 

returns layer id.

unsigned TMDCWire::layerId void   )  const [inline]
 

returns layer id.

00218                             {
00219     return _layerId;
00220 }

unsigned TMDCWire::localId void   )  const
 

returns local id in a wire layer.

unsigned TMDCWire::localId void   )  const [inline]
 

returns local id in a wire layer.

00212                             {
00213     return _localId;
00214 }

int TMDCWire::localIdDifference const TMDCWire  )  const
 

returns local id difference.

int TMDCWire::localIdDifference const TMDCWire  )  const
 

returns local id difference.

00557                                                     {
00558 
00559 #ifdef TRKRECO_DEBUG_DETAIL
00560     if (superLayerId() != a.superLayerId()) {
00561         std::cout << "TMDCWire::localIdDifference !!!";
00562         std::cout << "super layer assumption violation" << std::endl;
00563     }
00564 #endif
00565 
00566     int diff = int(a.localId()) - int(localId());
00567     unsigned nWires = layer()->nWires();
00568     if (diff > 0) {
00569         int difR = nWires - diff;
00570         if (diff < difR) return diff;
00571         else return - difR;
00572     }
00573     else {
00574         int difR = nWires + diff;
00575         if (- diff < difR) return diff;
00576         else return difR;
00577     }
00578 }

int TMDCWire::localIdForMinus void   )  const
 

returns localId but if 0, return maxLocalId + 1.

int TMDCWire::localIdForMinus void   )  const
 

returns localId but if 0, return maxLocalId + 1.

00335                                     {
00336 /*
00337   if(_layerId >= 0 && _layerId <= 5){
00338     if(_localId == 0)
00339       return 64;
00340     else return _localId;
00341   }
00342 
00343   if(_layerId >= 6 && _layerId <= 8){
00344     if(_localId == 0)
00345       return 80;
00346     else return _localId;
00347   }
00348 
00349   if(_layerId >= 9 && _layerId <= 14){
00350     if(_localId == 0)
00351       return 96;
00352     else return _localId;
00353   }
00354   
00355   if(_layerId >= 15 && _layerId <= 17){
00356     if(_localId == 0)
00357       return 128;
00358     else return _localId;
00359   }
00360 
00361   if(_layerId >= 18 && _layerId <= 22){
00362     if(_localId == 0)
00363       return 144;
00364     else return _localId;
00365   }
00366 
00367   if(_layerId >= 23 && _layerId <= 26){
00368     if(_localId == 0)
00369       return 160;
00370     else return _localId;
00371   }
00372   
00373   if(_layerId >= 27 && _layerId <= 31){
00374     if(_localId == 0)
00375       return 192;
00376     else return _localId;
00377   }
00378   
00379   if(_layerId >= 32 && _layerId <= 35){
00380     if(_localId == 0)
00381       return 208;
00382     else return _localId;
00383   }
00384 
00385   if(_layerId >= 36 && _layerId <= 40){
00386     if(_localId == 0)
00387       return 240;
00388     else return _localId;
00389   }
00390 
00391   if(_layerId >= 41 && _layerId <= 44){
00392     if(_localId == 0)
00393       return 256;
00394     else return _localId;
00395   }
00396 
00397   if(_layerId >= 45){
00398     if(_localId == 0)
00399       return 288;
00400     else return _localId;
00401   }
00402 */
00403 //Liuqg 060915
00404   if(_layerId == 0){
00405     if(_localId == 0)
00406       return 40;
00407     else return _localId;
00408   }
00409 
00410   if(_layerId == 1){
00411     if(_localId == 0)
00412       return 44;
00413     else return _localId;
00414   }
00415 
00416   if(_layerId == 2){
00417     if(_localId == 0)
00418       return 48;
00419     else return _localId;
00420   }
00421 
00422   if(_layerId == 3){
00423     if(_localId == 0)
00424       return 56;
00425     else return _localId;
00426   }
00427 
00428   if(_layerId == 4){
00429     if(_localId == 0)
00430       return 64;
00431     else return _localId;
00432   }
00433 
00434   if(_layerId == 5){
00435     if(_localId == 0)
00436       return 72;
00437     else return _localId;
00438   }
00439 
00440   if(_layerId == 6 || _layerId == 7){
00441     if(_localId == 0)
00442       return 80;
00443     else return _localId;
00444   }
00445 
00446   if(_layerId == 8 || _layerId == 9){
00447     if(_localId == 0)
00448       return 76;
00449     else return _localId;
00450   }
00451 
00452   if(_layerId == 10 || _layerId == 11){
00453     if(_localId == 0)
00454       return 88;
00455     else return _localId;
00456   }
00457 
00458   if(_layerId == 12 || _layerId == 13){
00459     if(_localId == 0)
00460       return 100;
00461     else return _localId;
00462   }
00463 
00464   if(_layerId == 14 || _layerId == 15){
00465     if(_localId == 0)
00466       return 112;
00467     else return _localId;
00468   }
00469 
00470   if(_layerId == 16 || _layerId == 17){
00471     if(_localId == 0)
00472       return 128;
00473     else return _localId;
00474   }
00475 
00476   if(_layerId == 18 || _layerId == 19){
00477     if(_localId == 0)
00478       return 140;
00479     else return _localId;
00480   }
00481 
00482   if(_layerId >= 20 && _layerId <= 23){
00483     if(_localId == 0)
00484       return 160;
00485     else return _localId;
00486   }
00487 
00488   if(_layerId >= 24 && _layerId <= 27){
00489     if(_localId == 0)
00490       return 176;
00491     else return _localId;
00492   }
00493 
00494   if(_layerId >= 28 && _layerId <= 31){
00495     if(_localId == 0)
00496       return 208;
00497     else return _localId;
00498   }
00499 
00500   if(_layerId >= 32 && _layerId <= 35){
00501     if(_localId == 0)
00502       return 240;
00503     else return _localId;
00504   }
00505 
00506   if(_layerId >= 36 && _layerId <= 39){
00507     if(_localId == 0)
00508       return 256;
00509     else return _localId;
00510   }
00511 
00512   if(_layerId >= 40 && _layerId <= 42){
00513     if(_localId == 0)
00514       return 288;
00515     else return _localId;
00516   }
00517   return -1;
00518 }

int TMDCWire::localIdForPlus void   )  const
 

returns localId but if maxLocalId, return -1.

int TMDCWire::localIdForPlus void   )  const
 

returns localId but if maxLocalId, return -1.

00146                                    {
00147 /*
00148   if(_layerId >= 0 && _layerId <= 5){
00149     if(_localId == 63)
00150       return -1;
00151     else return _localId;
00152   }
00153 
00154   if(_layerId >= 6 && _layerId <= 8){
00155     if(_localId == 79)
00156       return -1;
00157     else return _localId;
00158   }
00159 
00160   if(_layerId >= 9 && _layerId <= 14){
00161     if(_localId == 95)
00162       return -1;
00163     else return _localId;
00164   }
00165   
00166   if(_layerId >= 15 && _layerId <= 17){
00167     if(_localId == 127)
00168       return -1;
00169     else return _localId;
00170   }
00171 
00172   if(_layerId >= 18 && _layerId <= 22){
00173     if(_localId == 143)
00174       return -1;
00175     else return _localId;
00176   }
00177 
00178   if(_layerId >= 23 && _layerId <= 26){
00179     if(_localId == 159)
00180       return -1;
00181     else return _localId;
00182   }
00183   
00184   if(_layerId >= 27 && _layerId <= 31){
00185     if(_localId == 175)
00186       return -1;
00187     else return _localId;
00188   }
00189   
00190   if(_layerId >= 32 && _layerId <= 35){
00191     if(_localId == 207)
00192       return -1;
00193     else return _localId;
00194   }
00195 
00196   if(_layerId >= 36 && _layerId <= 40){
00197     if(_localId == 239)
00198       return -1;
00199     else return _localId;
00200   }
00201 
00202   if(_layerId >= 41 && _layerId <= 44){
00203     if(_localId == 255)
00204       return -1;
00205     else return _localId;
00206   }
00207 
00208   if(_layerId >= 45){
00209     if(_localId == 287)
00210       return -1;
00211     else return _localId;
00212   }
00213 
00214   return -1;
00215 */
00216 //Liuqg 060915
00217   if(_layerId == 0){
00218     if(_localId == 39)
00219       return -1;
00220     else return _localId;
00221   }
00222 
00223   if(_layerId == 1){
00224     if(_localId == 43)
00225       return -1;
00226     else return _localId;
00227   }
00228 
00229   if(_layerId == 2){
00230     if(_localId == 47)
00231       return -1;
00232     else return _localId;
00233   }
00234 
00235   if(_layerId == 3){
00236     if(_localId == 55)
00237       return -1;
00238     else return _localId;
00239   }
00240 
00241   if(_layerId == 4){
00242     if(_localId == 63)
00243       return -1;
00244     else return _localId;
00245   }
00246 
00247   if(_layerId == 5){
00248     if(_localId == 71)
00249       return -1;
00250     else return _localId;
00251   }
00252 
00253   if(_layerId == 6 || _layerId == 7){
00254     if(_localId == 79)
00255       return -1;
00256     else return _localId;
00257   }
00258 
00259   if(_layerId == 8 || _layerId == 9){
00260     if(_localId == 75)
00261       return -1;
00262     else return _localId;
00263   }
00264 
00265   if(_layerId == 10 || _layerId == 11){
00266     if(_localId == 87)
00267       return -1;
00268     else return _localId;
00269   }
00270 
00271   if(_layerId == 12 || _layerId == 13){
00272     if(_localId == 99)
00273       return -1;
00274     else return _localId;
00275   }
00276 
00277   if(_layerId == 14 || _layerId == 15){
00278     if(_localId == 111)
00279       return -1;
00280     else return _localId;
00281   }
00282 
00283   if(_layerId == 16 || _layerId == 17){
00284     if(_localId == 127)
00285       return -1;
00286     else return _localId;
00287   }
00288 
00289   if(_layerId == 18 || _layerId == 19){
00290     if(_localId == 139)
00291       return -1;
00292     else return _localId;
00293   }
00294 
00295   if(_layerId >= 20 && _layerId <= 23){
00296     if(_localId == 159)
00297       return -1;
00298     else return _localId;
00299   }
00300 
00301   if(_layerId >= 24 && _layerId <= 27){
00302     if(_localId == 175)
00303       return -1;
00304     else return _localId;
00305   }
00306   
00307   if(_layerId >= 28 && _layerId <= 31){
00308     if(_localId == 207)
00309       return -1;
00310     else return _localId;
00311   }
00312 
00313   if(_layerId >= 32 && _layerId <= 35){
00314     if(_localId == 239)
00315       return -1;
00316     else return _localId;
00317   }
00318 
00319   if(_layerId >= 36 && _layerId <= 39){
00320     if(_localId == 255)
00321       return -1;
00322     else return _localId;
00323   }
00324   
00325   if(_layerId >= 40 && _layerId <= 42){
00326     if(_localId == 287)
00327       return -1;
00328     else return _localId;
00329   }
00330 
00331   return -1;
00332 }

unsigned TMDCWire::localLayerId void   )  const
 

returns local layer id in a super layer.

unsigned TMDCWire::localLayerId void   )  const [inline]
 

returns local layer id in a super layer.

00230                                  {
00231     return _layer->localLayerId();
00232 }

bool TMDCWire::mainPart void   )  const
 

returns true if this wire is in the main part.

bool TMDCWire::mainPart void   )  const [inline]
 

returns true if this wire is in the main part.

00366                              {
00367     if (_layerId > 13) return true;
00368     return false;
00369 }

std::string TMDCWire::name void   )  const
 

returns name.

std::string TMDCWire::name void   )  const [inline]
 

returns name.

00405                          {
00406     if (axial())
00407         return itostring(_layerId) + std::string("-") + itostring(_localId);
00408     return itostring(_layerId) + std::string("=") + itostring(_localId);
00409 }

const TMDCWire* const TMDCWire::neighbor unsigned   )  const
 

returns a pointer to a neighbor wire.

const TMDCWire *const TMDCWire::neighbor unsigned   )  const
 

returns a pointer to a neighbor wire.

00075                                    {
00076     if (_cdc == 0) _cdc = TMDC::getTMDC();
00077     static const unsigned nLayers = _cdc->nLayers();
00078 
00079     //...Expensive...
00080     unsigned l = layerId();
00081     int local = (int) localId();
00082     float phi0 = _cdc->layer(l)->offset();
00083     int nWir = (int) _cdc->layer(l)->nWires();
00084     float phi = phi0 + local*2*pi/nWir;
00085     unsigned s = superLayerId();    
00086 //    cout<<"i:"<<i<<"   layerId:"<<l<<"  local:"<<local<<"  nWire:"<<nWir<<"   superLyrId:"<<s<<endl;
00087 
00088     if (i == WireInnerLeft || i == WireInnerRight) {
00089         if (l == 0) return 0;
00090         --l;
00091         if (_cdc->layer(l)->superLayerId() != s) return 0;
00092         phi0 = _cdc->layer(l)->offset();
00093         nWir = _cdc->layer(l)->nWires();
00094         local = (int)((phi-phi0)/(2*pi/nWir)); 
00095 
00096 //      cout<<"inner local"<<local<<", "<<local+1<<endl;
00097         
00098 //      cout<<(phi-phi0)/(2*pi/nWir)<<"  local:"<<local<<endl;
00099 //      cout<<"InnerLeft phi:"<<phi0 + local*2*pi/nWir
00100 //              <<"   InnerRight phi:"<<phi0 + (local+1)*2*pi/nWir 
00101 //              <<"   phi:"<<phi<<endl;
00102 //      if(local<0 || local+1>nWir-1) 
00103 //              cout<<"TMDCWire::neighbor()---Pay attation the cellNo !!!"<<endl
00104 //                  <<l+1<<"th layer: InnerLeftRight,   local:"<<local<<"    local+1:"<<local+1<<endl;  
00105 // LR changed to bes3
00106         if (i == WireInnerLeft) return _cdc->wire(l, local);
00107         else                    return _cdc->wire(l, local + 1);
00108 //      if (i == WireInnerRight) return _cdc->wire(l, local);
00109 //      else                     return _cdc->wire(l, local + 1);
00110         
00111     }
00112     else if (i == WireLeft || i == WireRight) {
00113 //        cout<<"Left phi:"<<phi0 + (local-1)*2*pi/nWir  
00114 //            <<"   Right phi:"<<phi0 + (local+1)*2*pi/nWir 
00115 //            <<"   phi:"<<phi<<endl;
00116 //      if(local-1<0 || local+1>nWir-1) 
00117 //              cout<<"TMDCWire::neighbor()---Pay attation the Cell No !!!"<<endl
00118 //                <<l<<"th layer: LeftRight,   local-1:"<<local-1<<"    local+1:"<<local+1<<endl;       
00119         if (i == WireLeft) return _cdc->wire(l, local - 1);
00120         else                return _cdc->wire(l, local + 1);
00121     }
00122     else if (i == WireOuterLeft || i == WireOuterRight) {
00123         if (l == nLayers - 1) return 0;
00124         ++l;
00125         if (_cdc->layer(l)->superLayerId() != s) return 0;
00126         phi0 = _cdc->layer(l)->offset();
00127         nWir = _cdc->layer(l)->nWires();
00128         local = (int)((phi-phi0)/(2*pi/nWir));
00129  
00130 //      cout<<"outer local"<<local<<", "<<local+1<<endl;
00131                 
00132 //      cout<<(phi-phi0)/(2*pi/nWir)<<"  local:"<<local<<endl;          
00133 //        cout<<"OuterLeft phi:"<<phi0 + local*2*pi/nWir 
00134 //                <<"   OuterRight phi:"<<phi0 + (local+1)*2*pi/nWir 
00135 //              <<"   phi:"<<phi<<endl;
00136 //        if(local<0 || local+1>nWir-1) 
00137 //              cout<<"TMDCWire::neighbor()---Pay attation the Cell No !!!"<<endl
00138 //               <<l-1<<"th layer:  OuterLeftRight,   local:"<<local<<"    local+1:"<<local+1<<endl;    
00139         if (i == WireOuterLeft) return _cdc->wire(l, local);
00140         else                     return _cdc->wire(l, local + 1);
00141     }
00142     return 0;
00143 }

unsigned TMDCWire::state unsigned  newState  ) 
 

sets state.

unsigned TMDCWire::state void   )  const
 

returns state.

unsigned TMDCWire::state unsigned  newState  )  [inline]
 

sets state.

00266                           {
00267     return _state = a;
00268 }

unsigned TMDCWire::state void   )  const [inline]
 

returns state.

00260                           {
00261     return _state;
00262 }

bool TMDCWire::stereo void   )  const
 

returns true if this wire is in a stereo layer.

bool TMDCWire::stereo void   )  const [inline]
 

returns true if this wire is in a stereo layer.

00347                            {
00348     return _layer->stereo();
00349 }

unsigned TMDCWire::superLayerId void   )  const
 

returns super layer id.

unsigned TMDCWire::superLayerId void   )  const [inline]
 

returns super layer id.

00224                                  {
00225     return _layer->superLayerId();
00226 }

TMDCTsf* TMDCWire::tsf TMDCTsf  ) 
 

sets a pointer of TMDCTsf.

const TMDCTsf* const TMDCWire::tsf void   )  const
 

returns a pointer to a TMDCTsf.

TMDCTsf * TMDCWire::tsf TMDCTsf  )  [inline]
 

sets a pointer of TMDCTsf.

00254                          {
00255     return _tsf = t;
00256 }

const TMDCTsf *const TMDCWire::tsf void   )  const [inline]
 

returns a pointer to a TMDCTsf.

00248                         {
00249     return _tsf;
00250 }

void TMDCWire::wirePosition float  zPosition,
HepPoint3D xyPosition,
HepPoint3D backwardPosition,
HepVector3D direction
const
 

calculates position and direction vector with sag correction.

void TMDCWire::wirePosition float  zPosition,
HepPoint3D xyPosition,
HepPoint3D backwardPosition,
HepVector3D direction
const
 

calculates position and direction vector with sag correction.

00524                                                 {
00525     back = _backwardPosition;
00526 
00527     //...Check z position...
00528     if (! (z > _backwardPosition.z() && z < _forwardPosition.z())) {
00529         xy = _xyPosition;
00530         dir = _direction;
00531     }
00532 
00533     //...Setup...
00534     int wireID = id();
00535     float wirePosition[3] = {0., 0., 0.};
00536     float dydz = 0;
00537     float ybSag = 0;
00538     float yfSag = 0;
00539 
00540     //...Get corrections...
00541 //zsl    calcdc_sag3_(& wireID, & z, wirePosition, & dydz, & ybSag, & yfSag);   
00542         
00543     //...Wire position...
00544     xy.setX((double) wirePosition[0]);
00545     xy.setY((double) wirePosition[1]);
00546     xy.setZ((double) wirePosition[2]);
00547     back.setY((double) ybSag);
00548     HepVector3D v_aux(_forwardPosition.x() - _backwardPosition.x(),
00549                    yfSag - ybSag,
00550                    _forwardPosition.z() - _backwardPosition.z());
00551     dir = v_aux.unit();
00552 
00553     return;
00554 }

double* TMDCWire::xyPosition double  p[3]  )  const
 

const HepPoint3D& TMDCWire::xyPosition void   )  const
 

returns middle position of a wire. z componet is 0.

double * TMDCWire::xyPosition double  p[3]  )  const [inline]
 

00326                                       {
00327     a[0] = _xyPosition.x();
00328     a[1] = _xyPosition.y();
00329     a[2] = 0.;
00330     return a;
00331 }

const HepPoint3D & TMDCWire::xyPosition void   )  const [inline]
 

returns middle position of a wire. z componet is 0.

00320                                {
00321     return _xyPosition;
00322 }


Member Data Documentation

HepPoint3D TMDCWire::_backwardPosition [private]
 

TMDC* TMDCWire::_cdc [static, private]
 

TMDC * TMDCWire::_cdc = 0 [static, private]
 

HepVector3D TMDCWire::_direction [private]
 

HepPoint3D TMDCWire::_forwardPosition [private]
 

const MdcGeoWire* TMDCWire::_geo [private]
 

const MdcGeoWire* TMDCWire::_geo [private]
 

const TMDCWireHit* TMDCWire::_hit [private]
 

const TMDCWireHit* TMDCWire::_hit [private]
 

unsigned TMDCWire::_id [private]
 

const TMDCLayer* TMDCWire::_layer [private]
 

const TMDCLayer* TMDCWire::_layer [private]
 

unsigned TMDCWire::_layerId [private]
 

unsigned TMDCWire::_localId [private]
 

AList<TMDCWireHitMC> TMDCWire::_mcHits [private]
 

AList<TMDCWireHitMC> TMDCWire::_mcHits [private]
 

unsigned TMDCWire::_state [private]
 

TMDCTsf* TMDCWire::_tsf [private]
 

TMDCTsf* TMDCWire::_tsf [private]
 

HepPoint3D TMDCWire::_xyPosition [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 18:55:04 2011 for BOSS6.5.5 by  doxygen 1.3.9.1