BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TMDCWire Class Reference

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

#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 MdcGeoWiregeocdc (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 HepPoint3DforwardPosition (void) const
 returns position in forward endplate.
const HepPoint3DbackwardPosition (void) const
 returns position in backward endplate.
double * backwardPosition (double p[3]) const
const double & tension (void) const
const HepPoint3DxyPosition (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 HepVector3Ddirection (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.
TMDCTsftsf (TMDCTsf *)
 sets a pointer of TMDCTsf.
unsigned state (unsigned newState)
 sets state.
void clear (void)
 clears information.
 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 MdcGeoWiregeocdc (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 HepPoint3DforwardPosition (void) const
 returns position in forward endplate.
const HepPoint3DbackwardPosition (void) const
 returns position in backward endplate.
double * backwardPosition (double p[3]) const
const double & tension (void) const
const HepPoint3DxyPosition (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 HepVector3Ddirection (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.
TMDCTsftsf (TMDCTsf *)
 sets a pointer of TMDCTsf.
unsigned state (unsigned newState)
 sets state.
void clear (void)
 clears information.
 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 MdcGeoWiregeocdc (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 HepPoint3DforwardPosition (void) const
 returns position in forward endplate.
const HepPoint3DbackwardPosition (void) const
 returns position in backward endplate.
double * backwardPosition (double p[3]) const
const double & tension (void) const
const HepPoint3DxyPosition (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 HepVector3Ddirection (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.
TMDCTsftsf (TMDCTsf *)
 sets a pointer of TMDCTsf.
unsigned state (unsigned newState)
 sets state.
void clear (void)
 clears information.

Detailed Description

A class to represent a wire in MDC.

Definition at line 55 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

Constructor & Destructor Documentation

◆ TMDCWire() [1/3]

TMDCWire::TMDCWire ( const MdcGeoWire * w,
TMDCLayer * l )

Constructor.

Definition at line 31 of file TMDCWire.cxx.

32 : _forwardPosition( w->Backward() * 0.1 )
33 , _backwardPosition( w->Forward() * 0.1 )
34 , _tension( w->Tension() )
35 , _direction( w->Backward() - w->Forward() ) {
36 //: _forwardPosition(w->Forward()*0.1),
37 // _backwardPosition(w->Backward()*0.1),
38 // _direction(w->Forward() - w->Backward()) {
39 _state = 0;
40 _geo = w;
41 _id = w->Id();
42 _localId = w->Cell();
43 _layerId = w->Layer();
44 _layer = l;
45 _tsf = 0;
46 _hit = 0;
47 _xyPosition = 0.5 * ( _forwardPosition + _backwardPosition );
48 _xyPosition.setZ( 0. );
49 _direction = _direction.unit();
50}
double w

Referenced by adjacent(), consective(), localIdDifference(), and neighbor().

◆ ~TMDCWire() [1/3]

TMDCWire::~TMDCWire ( )
virtual

Destructor.

Definition at line 52 of file TMDCWire.cxx.

52{}

◆ TMDCWire() [2/3]

TMDCWire::TMDCWire ( const MdcGeoWire * ,
TMDCLayer *  )

Constructor.

◆ ~TMDCWire() [2/3]

virtual TMDCWire::~TMDCWire ( )
virtual

Destructor.

◆ TMDCWire() [3/3]

TMDCWire::TMDCWire ( const MdcGeoWire * ,
TMDCLayer *  )

Constructor.

◆ ~TMDCWire() [3/3]

virtual TMDCWire::~TMDCWire ( )
virtual

Destructor.

Member Function Documentation

◆ adjacent() [1/3]

bool TMDCWire::adjacent ( const TMDCWire & w) const
inline

returns true if a given wire is adjacent.

Definition at line 302 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

302 {
303 for ( unsigned i = 0; i < 6; i++ )
304 if ( neighbor( i ) == &w ) return true;
305 return false;
306}
const TMDCWire *const neighbor(unsigned) const
returns a pointer to a neighbor wire.
Definition TMDCWire.cxx:94

◆ adjacent() [2/3]

bool TMDCWire::adjacent ( const TMDCWire & ) const

returns true if a given wire is adjacent.

◆ adjacent() [3/3]

bool TMDCWire::adjacent ( const TMDCWire & ) const

returns true if a given wire is adjacent.

◆ axial() [1/3]

bool TMDCWire::axial ( void ) const
inline

returns true if this wire is in an axial layer.

Definition at line 266 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

266{ return _layer->axial(); }

Referenced by name().

◆ axial() [2/3]

bool TMDCWire::axial ( void ) const

returns true if this wire is in an axial layer.

◆ axial() [3/3]

bool TMDCWire::axial ( void ) const

returns true if this wire is in an axial layer.

◆ axialStereoLayerId() [1/3]

unsigned TMDCWire::axialStereoLayerId ( void ) const
inline

returns id of axial or stereo id.

Definition at line 270 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

270 {
271 return _layer->axialStereoLayerId();
272}

Referenced by TConformalFinder0::findSegments().

◆ axialStereoLayerId() [2/3]

unsigned TMDCWire::axialStereoLayerId ( void ) const

returns id of axial or stereo id.

◆ axialStereoLayerId() [3/3]

unsigned TMDCWire::axialStereoLayerId ( void ) const

returns id of axial or stereo id.

◆ backwardPosition() [1/6]

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

Definition at line 248 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

248 {
249 p[0] = _backwardPosition.x();
250 p[1] = _backwardPosition.y();
251 p[2] = _backwardPosition.z();
252 return p;
253}

◆ backwardPosition() [2/6]

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

◆ backwardPosition() [3/6]

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

◆ backwardPosition() [4/6]

const HepPoint3D & TMDCWire::backwardPosition ( void ) const
inline

returns position in backward endplate.

Definition at line 244 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

244{ return _backwardPosition; }

Referenced by TBuilder::initialLine(), TBuilder::initialLineOld(), TTrack::stereoHitForCurl(), TTrack::szPosition(), and wirePosition().

◆ backwardPosition() [5/6]

const HepPoint3D & TMDCWire::backwardPosition ( void ) const

returns position in backward endplate.

◆ backwardPosition() [6/6]

const HepPoint3D & TMDCWire::backwardPosition ( void ) const

returns position in backward endplate.

◆ cellSize() [1/3]

float TMDCWire::cellSize ( void ) const
inline

returns cell size in phi.

Definition at line 284 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

284 {
285 if ( _layer ) { return _layer->cellSize(); }
286 else
287 {
288# ifdef TRKRECO_DEBUG
289 std::cout << "TMDCWire::cellSize !!! can't return cell size";
290 std::cout << " because no pointer to a layer" << std::endl;
291# endif
292 return 0.;
293 }
294}

◆ cellSize() [2/3]

float TMDCWire::cellSize ( void ) const

returns cell size in phi.

◆ cellSize() [3/3]

float TMDCWire::cellSize ( void ) const

returns cell size in phi.

◆ clear() [1/3]

void TMDCWire::clear ( void )
inline

clears information.

Definition at line 225 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

225 {
226 _state = 0;
227 _hit = 0;
228 _mcHits.removeAll();
229}

◆ clear() [2/3]

void TMDCWire::clear ( void )

clears information.

◆ clear() [3/3]

void TMDCWire::clear ( void )

clears information.

◆ consective() [1/3]

bool TMDCWire::consective ( const TMDCWire & w) const
inline

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

Definition at line 296 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

296 {
297 if ( neighbor( 2 ) == &w ) return true;
298 else if ( neighbor( 3 ) == &w ) return true;
299 return false;
300}

◆ consective() [2/3]

bool TMDCWire::consective ( const TMDCWire & ) const

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

◆ consective() [3/3]

bool TMDCWire::consective ( const TMDCWire & ) const

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

◆ direction() [1/3]

const HepVector3D & TMDCWire::direction ( void ) const
inline

returns direction vector of the wire.

Definition at line 264 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

264{ return _direction; }

Referenced by TCosmicFitter::fit(), TTrack::stereoHitForCurl(), TTrack::szPosition(), and wirePosition().

◆ direction() [2/3]

const HepVector3D & TMDCWire::direction ( void ) const

returns direction vector of the wire.

◆ direction() [3/3]

const HepVector3D & TMDCWire::direction ( void ) const

returns direction vector of the wire.

◆ dump() [1/3]

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

dumps debug information.

Definition at line 54 of file TMDCWire.cxx.

54 {
55 std::cout << pre;
56 std::cout << "w " << _id;
57 std::cout << ",local " << _localId;
58 std::cout << ",layer " << _layerId;
59 std::cout << ",super layer " << superLayerId();
60 std::cout << ",local layer " << localLayerId();
61 std::cout << std::endl;
62 if ( msg.find( "neighbor" ) != std::string::npos ||
63 msg.find( "detail" ) != std::string::npos )
64 {
65 for ( unsigned i = 0; i < 6; i++ )
66 if ( neighbor( i ) ) neighbor( i )->dump( "", pre + std::to_string( i ) + " " );
67 }
68 if ( msg.find( "tsf" ) != std::string::npos || msg.find( "detail" ) != std::string::npos )
69 {
70 if ( _tsf ) _tsf->dump( "", pre + " " );
71 }
72}
unsigned localLayerId(void) const
returns local layer id in a super layer.
unsigned superLayerId(void) const
returns super layer id.
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition TMDCWire.cxx:54

Referenced by dump().

◆ dump() [2/3]

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

dumps debug information.

◆ dump() [3/3]

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

dumps debug information.

◆ forwardPosition() [1/3]

const HepPoint3D & TMDCWire::forwardPosition ( void ) const
inline

returns position in forward endplate.

Definition at line 242 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

242{ return _forwardPosition; }

Referenced by TBuilder::initialLine(), TBuilder::initialLineOld(), TTrack::stereoHitForCurl(), and TTrack::szPosition().

◆ forwardPosition() [2/3]

const HepPoint3D & TMDCWire::forwardPosition ( void ) const

returns position in forward endplate.

◆ forwardPosition() [3/3]

const HepPoint3D & TMDCWire::forwardPosition ( void ) const

returns position in forward endplate.

◆ geocdc() [1/3]

const MdcGeoWire * TMDCWire::geocdc ( void ) const
inline

returns a pointer to GEOMDC_WIR.

Definition at line 213 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

213{ return _geo; }

◆ geocdc() [2/3]

const MdcGeoWire * TMDCWire::geocdc ( void ) const

returns a pointer to GEOMDC_WIR.

◆ geocdc() [3/3]

const MdcGeoWire * TMDCWire::geocdc ( void ) const

returns a pointer to GEOMDC_WIR.

◆ hit() [1/9]

const TMDCWireHit *const TMDCWire::hit ( const TMDCWireHit * const h)
inline

sets a pointer to TMDCWireHit.

Definition at line 231 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

231 {
232 return _hit = h;
233}

◆ hit() [2/9]

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

sets a pointer to TMDCWireHit.

◆ hit() [3/9]

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

sets a pointer to TMDCWireHit.

◆ hit() [4/9]

const TMDCWireHitMC *const TMDCWire::hit ( TMDCWireHitMC * const a)
inline

appends a pointer to TMDCWireHitMC.

Definition at line 237 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

237 {
238 _mcHits.append( a );
239 return a;
240}

◆ hit() [5/9]

const TMDCWireHitMC *const TMDCWire::hit ( TMDCWireHitMC * const )

appends a pointer to TMDCWireHitMC.

◆ hit() [6/9]

const TMDCWireHitMC *const TMDCWire::hit ( TMDCWireHitMC * const )

appends a pointer to TMDCWireHitMC.

◆ hit() [7/9]

const TMDCWireHit *const TMDCWire::hit ( void ) const
inline

returns a pointer to a TMDCWireHit.

Definition at line 235 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

235{ return _hit; }

Referenced by TMDC::classification().

◆ hit() [8/9]

const TMDCWireHit *const TMDCWire::hit ( void ) const

returns a pointer to a TMDCWireHit.

◆ hit() [9/9]

const TMDCWireHit *const TMDCWire::hit ( void ) const

returns a pointer to a TMDCWireHit.

◆ id() [1/3]

unsigned TMDCWire::id ( void ) const
inline

◆ id() [2/3]

unsigned TMDCWire::id ( void ) const

returns id.

◆ id() [3/3]

unsigned TMDCWire::id ( void ) const

returns id.

◆ innerPart() [1/3]

bool TMDCWire::innerPart ( void ) const
inline

returns true if this wire is in the inner part.

Definition at line 274 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

274 {
275 if ( _layerId < 14 ) return true;
276 return false;
277}

◆ innerPart() [2/3]

bool TMDCWire::innerPart ( void ) const

returns true if this wire is in the inner part.

◆ innerPart() [3/3]

bool TMDCWire::innerPart ( void ) const

returns true if this wire is in the inner part.

◆ layer() [1/3]

const TMDCLayer *const TMDCWire::layer ( void ) const
inline

returns a pointer to a layer.

Definition at line 215 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

215{ return _layer; }

Referenced by TBuilder0::buildStereo(), and localIdDifference().

◆ layer() [2/3]

const TMDCLayer *const TMDCWire::layer ( void ) const

returns a pointer to a layer.

◆ layer() [3/3]

const TMDCLayer *const TMDCWire::layer ( void ) const

returns a pointer to a layer.

◆ layerId() [1/3]

◆ layerId() [2/3]

unsigned TMDCWire::layerId ( void ) const

returns layer id.

◆ layerId() [3/3]

unsigned TMDCWire::layerId ( void ) const

returns layer id.

◆ localId() [1/3]

◆ localId() [2/3]

unsigned TMDCWire::localId ( void ) const

returns local id in a wire layer.

◆ localId() [3/3]

unsigned TMDCWire::localId ( void ) const

returns local id in a wire layer.

◆ localIdDifference() [1/3]

int TMDCWire::localIdDifference ( const TMDCWire & a) const

returns local id difference.

Definition at line 575 of file TMDCWire.cxx.

575 {
576
577#ifdef TRKRECO_DEBUG_DETAIL
578 if ( superLayerId() != a.superLayerId() )
579 {
580 std::cout << "TMDCWire::localIdDifference !!!";
581 std::cout << "super layer assumption violation" << std::endl;
582 }
583#endif
584
585 int diff = int( a.localId() ) - int( localId() );
586 unsigned nWires = layer()->nWires();
587 if ( diff > 0 )
588 {
589 int difR = nWires - diff;
590 if ( diff < difR ) return diff;
591 else return -difR;
592 }
593 else
594 {
595 int difR = nWires + diff;
596 if ( -diff < difR ) return diff;
597 else return difR;
598 }
599}
unsigned nWires(void) const
returns # of wires.
const TMDCLayer *const layer(void) const
returns a pointer to a layer.
unsigned localId(void) const
returns local id in a wire layer.

◆ localIdDifference() [2/3]

int TMDCWire::localIdDifference ( const TMDCWire & ) const

returns local id difference.

◆ localIdDifference() [3/3]

int TMDCWire::localIdDifference ( const TMDCWire & ) const

returns local id difference.

◆ localIdForMinus() [1/3]

int TMDCWire::localIdForMinus ( void ) const

returns localId but if 0, return maxLocalId + 1.

Definition at line 357 of file TMDCWire.cxx.

357 {
358 /*
359 if(_layerId >= 0 && _layerId <= 5){
360 if(_localId == 0)
361 return 64;
362 else return _localId;
363 }
364
365 if(_layerId >= 6 && _layerId <= 8){
366 if(_localId == 0)
367 return 80;
368 else return _localId;
369 }
370
371 if(_layerId >= 9 && _layerId <= 14){
372 if(_localId == 0)
373 return 96;
374 else return _localId;
375 }
376
377 if(_layerId >= 15 && _layerId <= 17){
378 if(_localId == 0)
379 return 128;
380 else return _localId;
381 }
382
383 if(_layerId >= 18 && _layerId <= 22){
384 if(_localId == 0)
385 return 144;
386 else return _localId;
387 }
388
389 if(_layerId >= 23 && _layerId <= 26){
390 if(_localId == 0)
391 return 160;
392 else return _localId;
393 }
394
395 if(_layerId >= 27 && _layerId <= 31){
396 if(_localId == 0)
397 return 192;
398 else return _localId;
399 }
400
401 if(_layerId >= 32 && _layerId <= 35){
402 if(_localId == 0)
403 return 208;
404 else return _localId;
405 }
406
407 if(_layerId >= 36 && _layerId <= 40){
408 if(_localId == 0)
409 return 240;
410 else return _localId;
411 }
412
413 if(_layerId >= 41 && _layerId <= 44){
414 if(_localId == 0)
415 return 256;
416 else return _localId;
417 }
418
419 if(_layerId >= 45){
420 if(_localId == 0)
421 return 288;
422 else return _localId;
423 }
424 */
425 // Liuqg 060915
426 if ( _layerId == 0 )
427 {
428 if ( _localId == 0 ) return 40;
429 else return _localId;
430 }
431
432 if ( _layerId == 1 )
433 {
434 if ( _localId == 0 ) return 44;
435 else return _localId;
436 }
437
438 if ( _layerId == 2 )
439 {
440 if ( _localId == 0 ) return 48;
441 else return _localId;
442 }
443
444 if ( _layerId == 3 )
445 {
446 if ( _localId == 0 ) return 56;
447 else return _localId;
448 }
449
450 if ( _layerId == 4 )
451 {
452 if ( _localId == 0 ) return 64;
453 else return _localId;
454 }
455
456 if ( _layerId == 5 )
457 {
458 if ( _localId == 0 ) return 72;
459 else return _localId;
460 }
461
462 if ( _layerId == 6 || _layerId == 7 )
463 {
464 if ( _localId == 0 ) return 80;
465 else return _localId;
466 }
467
468 if ( _layerId == 8 || _layerId == 9 )
469 {
470 if ( _localId == 0 ) return 76;
471 else return _localId;
472 }
473
474 if ( _layerId == 10 || _layerId == 11 )
475 {
476 if ( _localId == 0 ) return 88;
477 else return _localId;
478 }
479
480 if ( _layerId == 12 || _layerId == 13 )
481 {
482 if ( _localId == 0 ) return 100;
483 else return _localId;
484 }
485
486 if ( _layerId == 14 || _layerId == 15 )
487 {
488 if ( _localId == 0 ) return 112;
489 else return _localId;
490 }
491
492 if ( _layerId == 16 || _layerId == 17 )
493 {
494 if ( _localId == 0 ) return 128;
495 else return _localId;
496 }
497
498 if ( _layerId == 18 || _layerId == 19 )
499 {
500 if ( _localId == 0 ) return 140;
501 else return _localId;
502 }
503
504 if ( _layerId >= 20 && _layerId <= 23 )
505 {
506 if ( _localId == 0 ) return 160;
507 else return _localId;
508 }
509
510 if ( _layerId >= 24 && _layerId <= 27 )
511 {
512 if ( _localId == 0 ) return 176;
513 else return _localId;
514 }
515
516 if ( _layerId >= 28 && _layerId <= 31 )
517 {
518 if ( _localId == 0 ) return 208;
519 else return _localId;
520 }
521
522 if ( _layerId >= 32 && _layerId <= 35 )
523 {
524 if ( _localId == 0 ) return 240;
525 else return _localId;
526 }
527
528 if ( _layerId >= 36 && _layerId <= 39 )
529 {
530 if ( _localId == 0 ) return 256;
531 else return _localId;
532 }
533
534 if ( _layerId >= 40 && _layerId <= 42 )
535 {
536 if ( _localId == 0 ) return 288;
537 else return _localId;
538 }
539 return -1;
540}

◆ localIdForMinus() [2/3]

int TMDCWire::localIdForMinus ( void ) const

returns localId but if 0, return maxLocalId + 1.

◆ localIdForMinus() [3/3]

int TMDCWire::localIdForMinus ( void ) const

returns localId but if 0, return maxLocalId + 1.

◆ localIdForPlus() [1/3]

int TMDCWire::localIdForPlus ( void ) const

returns localId but if maxLocalId, return -1.

Definition at line 169 of file TMDCWire.cxx.

169 {
170 /*
171 if(_layerId >= 0 && _layerId <= 5){
172 if(_localId == 63)
173 return -1;
174 else return _localId;
175 }
176
177 if(_layerId >= 6 && _layerId <= 8){
178 if(_localId == 79)
179 return -1;
180 else return _localId;
181 }
182
183 if(_layerId >= 9 && _layerId <= 14){
184 if(_localId == 95)
185 return -1;
186 else return _localId;
187 }
188
189 if(_layerId >= 15 && _layerId <= 17){
190 if(_localId == 127)
191 return -1;
192 else return _localId;
193 }
194
195 if(_layerId >= 18 && _layerId <= 22){
196 if(_localId == 143)
197 return -1;
198 else return _localId;
199 }
200
201 if(_layerId >= 23 && _layerId <= 26){
202 if(_localId == 159)
203 return -1;
204 else return _localId;
205 }
206
207 if(_layerId >= 27 && _layerId <= 31){
208 if(_localId == 175)
209 return -1;
210 else return _localId;
211 }
212
213 if(_layerId >= 32 && _layerId <= 35){
214 if(_localId == 207)
215 return -1;
216 else return _localId;
217 }
218
219 if(_layerId >= 36 && _layerId <= 40){
220 if(_localId == 239)
221 return -1;
222 else return _localId;
223 }
224
225 if(_layerId >= 41 && _layerId <= 44){
226 if(_localId == 255)
227 return -1;
228 else return _localId;
229 }
230
231 if(_layerId >= 45){
232 if(_localId == 287)
233 return -1;
234 else return _localId;
235 }
236
237 return -1;
238 */
239 // Liuqg 060915
240 if ( _layerId == 0 )
241 {
242 if ( _localId == 39 ) return -1;
243 else return _localId;
244 }
245
246 if ( _layerId == 1 )
247 {
248 if ( _localId == 43 ) return -1;
249 else return _localId;
250 }
251
252 if ( _layerId == 2 )
253 {
254 if ( _localId == 47 ) return -1;
255 else return _localId;
256 }
257
258 if ( _layerId == 3 )
259 {
260 if ( _localId == 55 ) return -1;
261 else return _localId;
262 }
263
264 if ( _layerId == 4 )
265 {
266 if ( _localId == 63 ) return -1;
267 else return _localId;
268 }
269
270 if ( _layerId == 5 )
271 {
272 if ( _localId == 71 ) return -1;
273 else return _localId;
274 }
275
276 if ( _layerId == 6 || _layerId == 7 )
277 {
278 if ( _localId == 79 ) return -1;
279 else return _localId;
280 }
281
282 if ( _layerId == 8 || _layerId == 9 )
283 {
284 if ( _localId == 75 ) return -1;
285 else return _localId;
286 }
287
288 if ( _layerId == 10 || _layerId == 11 )
289 {
290 if ( _localId == 87 ) return -1;
291 else return _localId;
292 }
293
294 if ( _layerId == 12 || _layerId == 13 )
295 {
296 if ( _localId == 99 ) return -1;
297 else return _localId;
298 }
299
300 if ( _layerId == 14 || _layerId == 15 )
301 {
302 if ( _localId == 111 ) return -1;
303 else return _localId;
304 }
305
306 if ( _layerId == 16 || _layerId == 17 )
307 {
308 if ( _localId == 127 ) return -1;
309 else return _localId;
310 }
311
312 if ( _layerId == 18 || _layerId == 19 )
313 {
314 if ( _localId == 139 ) return -1;
315 else return _localId;
316 }
317
318 if ( _layerId >= 20 && _layerId <= 23 )
319 {
320 if ( _localId == 159 ) return -1;
321 else return _localId;
322 }
323
324 if ( _layerId >= 24 && _layerId <= 27 )
325 {
326 if ( _localId == 175 ) return -1;
327 else return _localId;
328 }
329
330 if ( _layerId >= 28 && _layerId <= 31 )
331 {
332 if ( _localId == 207 ) return -1;
333 else return _localId;
334 }
335
336 if ( _layerId >= 32 && _layerId <= 35 )
337 {
338 if ( _localId == 239 ) return -1;
339 else return _localId;
340 }
341
342 if ( _layerId >= 36 && _layerId <= 39 )
343 {
344 if ( _localId == 255 ) return -1;
345 else return _localId;
346 }
347
348 if ( _layerId >= 40 && _layerId <= 42 )
349 {
350 if ( _localId == 287 ) return -1;
351 else return _localId;
352 }
353
354 return -1;
355}

◆ localIdForPlus() [2/3]

int TMDCWire::localIdForPlus ( void ) const

returns localId but if maxLocalId, return -1.

◆ localIdForPlus() [3/3]

int TMDCWire::localIdForPlus ( void ) const

returns localId but if maxLocalId, return -1.

◆ localLayerId() [1/3]

unsigned TMDCWire::localLayerId ( void ) const
inline

returns local layer id in a super layer.

Definition at line 211 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

211{ return _layer->localLayerId(); }

Referenced by TSegmentCurl::append(), TSegmentCurl::append(), TMDCTsf::createTsf(), dump(), TSegmentCurl::remove(), TSegmentCurl::remove(), and TSegment::splitTsf().

◆ localLayerId() [2/3]

unsigned TMDCWire::localLayerId ( void ) const

returns local layer id in a super layer.

◆ localLayerId() [3/3]

unsigned TMDCWire::localLayerId ( void ) const

returns local layer id in a super layer.

◆ mainPart() [1/3]

bool TMDCWire::mainPart ( void ) const
inline

returns true if this wire is in the main part.

Definition at line 279 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

279 {
280 if ( _layerId > 13 ) return true;
281 return false;
282}

◆ mainPart() [2/3]

bool TMDCWire::mainPart ( void ) const

returns true if this wire is in the main part.

◆ mainPart() [3/3]

bool TMDCWire::mainPart ( void ) const

returns true if this wire is in the main part.

◆ name() [1/3]

std::string TMDCWire::name ( void ) const
inline

returns name.

Definition at line 308 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

308 {
309 if ( axial() )
310 return std::to_string( _layerId ) + std::string( "-" ) + std::to_string( _localId );
311 return std::to_string( _layerId ) + std::string( "=" ) + std::to_string( _localId );
312}
bool axial(void) const
returns true if this wire is in an axial layer.

Referenced by TTrackBase::append(), TTrack::assign(), TBuilder0::buildRphi(), TBuilder0::buildStereo(), TTrackManager::divide(), Dump(), TTrackManager::salvage(), and TTrackManager::salvageAssociateHits().

◆ name() [2/3]

std::string TMDCWire::name ( void ) const

returns name.

◆ name() [3/3]

std::string TMDCWire::name ( void ) const

returns name.

◆ neighbor() [1/3]

const TMDCWire *const TMDCWire::neighbor ( unsigned i) const

returns a pointer to a neighbor wire.

Definition at line 94 of file TMDCWire.cxx.

94 {
95 if ( _cdc == 0 ) _cdc = TMDC::getTMDC();
96 static const unsigned nLayers = _cdc->nLayers();
97
98 //...Expensive...
99 unsigned l = layerId();
100 int local = (int)localId();
101 float phi0 = _cdc->layer( l )->offset();
102 int nWir = (int)_cdc->layer( l )->nWires();
103 float phi = phi0 + local * 2 * M_PI / nWir;
104 unsigned s = superLayerId();
105 // cout<<"i:"<<i<<" layerId:"<<l<<" local:"<<local<<" nWire:"<<nWir<<"
106 // superLyrId:"<<s<<endl;
107
108 if ( i == WireInnerLeft || i == WireInnerRight )
109 {
110 if ( l == 0 ) return 0;
111 --l;
112 if ( _cdc->layer( l )->superLayerId() != s ) return 0;
113 phi0 = _cdc->layer( l )->offset();
114 nWir = _cdc->layer( l )->nWires();
115 local = (int)( ( phi - phi0 ) / ( 2 * M_PI / nWir ) );
116
117 // cout<<"inner local"<<local<<", "<<local+1<<endl;
118
119 // cout<<(phi-phi0)/(2*pi/nWir)<<" local:"<<local<<endl;
120 // cout<<"InnerLeft phi:"<<phi0 + local*2*pi/nWir
121 // <<" InnerRight phi:"<<phi0 + (local+1)*2*pi/nWir
122 // <<" phi:"<<phi<<endl;
123 // if(local<0 || local+1>nWir-1)
124 // cout<<"TMDCWire::neighbor()---Pay attation the cellNo !!!"<<endl
125 // <<l+1<<"th layer: InnerLeftRight, local:"<<local<<"
126 // local+1:"<<local+1<<endl;
127 // LR changed to bes3
128 if ( i == WireInnerLeft ) return _cdc->wire( l, local );
129 else return _cdc->wire( l, local + 1 );
130 // if (i == WireInnerRight) return _cdc->wire(l, local);
131 // else return _cdc->wire(l, local + 1);
132 }
133 else if ( i == WireLeft || i == WireRight )
134 {
135 // cout<<"Left phi:"<<phi0 + (local-1)*2*pi/nWir
136 // <<" Right phi:"<<phi0 + (local+1)*2*pi/nWir
137 // <<" phi:"<<phi<<endl;
138 // if(local-1<0 || local+1>nWir-1)
139 // cout<<"TMDCWire::neighbor()---Pay attation the Cell No !!!"<<endl
140 // <<l<<"th layer: LeftRight, local-1:"<<local-1<<" local+1:"<<local+1<<endl;
141 if ( i == WireLeft ) return _cdc->wire( l, local - 1 );
142 else return _cdc->wire( l, local + 1 );
143 }
144 else if ( i == WireOuterLeft || i == WireOuterRight )
145 {
146 if ( l == nLayers - 1 ) return 0;
147 ++l;
148 if ( _cdc->layer( l )->superLayerId() != s ) return 0;
149 phi0 = _cdc->layer( l )->offset();
150 nWir = _cdc->layer( l )->nWires();
151 local = (int)( ( phi - phi0 ) / ( 2 * M_PI / nWir ) );
152
153 // cout<<"outer local"<<local<<", "<<local+1<<endl;
154
155 // cout<<(phi-phi0)/(2*pi/nWir)<<" local:"<<local<<endl;
156 // cout<<"OuterLeft phi:"<<phi0 + local*2*pi/nWir
157 // <<" OuterRight phi:"<<phi0 + (local+1)*2*pi/nWir
158 // <<" phi:"<<phi<<endl;
159 // if(local<0 || local+1>nWir-1)
160 // cout<<"TMDCWire::neighbor()---Pay attation the Cell No !!!"<<endl
161 // <<l-1<<"th layer: OuterLeftRight, local:"<<local<<"
162 // local+1:"<<local+1<<endl;
163 if ( i == WireOuterLeft ) return _cdc->wire( l, local );
164 else return _cdc->wire( l, local + 1 );
165 }
166 return 0;
167}
XmlRpcServer s
#define M_PI
Definition TConstant.h:4
unsigned layerId(void) const
returns layer id.
static TMDC * getTMDC(void)
Definition TMDC.cxx:84

Referenced by adjacent(), TMDC::classification(), consective(), and dump().

◆ neighbor() [2/3]

const TMDCWire *const TMDCWire::neighbor ( unsigned ) const

returns a pointer to a neighbor wire.

◆ neighbor() [3/3]

const TMDCWire *const TMDCWire::neighbor ( unsigned ) const

returns a pointer to a neighbor wire.

◆ state() [1/6]

unsigned TMDCWire::state ( unsigned newState)
inline

sets state.

Definition at line 223 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

223{ return _state = a; }

◆ state() [2/6]

unsigned TMDCWire::state ( unsigned newState)

sets state.

◆ state() [3/6]

unsigned TMDCWire::state ( unsigned newState)

sets state.

◆ state() [4/6]

unsigned TMDCWire::state ( void ) const
inline

returns state.

Definition at line 221 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

221{ return _state; }

◆ state() [5/6]

unsigned TMDCWire::state ( void ) const

returns state.

◆ state() [6/6]

unsigned TMDCWire::state ( void ) const

returns state.

◆ stereo() [1/3]

bool TMDCWire::stereo ( void ) const
inline

returns true if this wire is in a stereo layer.

Definition at line 268 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

268{ return _layer->stereo(); }

Referenced by TCosmicFitter::fit(), and TTrackManager::makeTds().

◆ stereo() [2/3]

bool TMDCWire::stereo ( void ) const

returns true if this wire is in a stereo layer.

◆ stereo() [3/3]

bool TMDCWire::stereo ( void ) const

returns true if this wire is in a stereo layer.

◆ superLayerId() [1/3]

unsigned TMDCWire::superLayerId ( void ) const
inline

◆ superLayerId() [2/3]

unsigned TMDCWire::superLayerId ( void ) const

returns super layer id.

◆ superLayerId() [3/3]

unsigned TMDCWire::superLayerId ( void ) const

returns super layer id.

◆ tension() [1/3]

const double & TMDCWire::tension ( void ) const
inline

Definition at line 246 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

246{ return _tension; }

◆ tension() [2/3]

const double & TMDCWire::tension ( void ) const

◆ tension() [3/3]

const double & TMDCWire::tension ( void ) const

◆ tsf() [1/6]

TMDCTsf * TMDCWire::tsf ( TMDCTsf * t)
inline

sets a pointer of TMDCTsf.

Definition at line 219 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

219{ return _tsf = t; }
int t()
Definition t.c:1

◆ tsf() [2/6]

TMDCTsf * TMDCWire::tsf ( TMDCTsf * )

sets a pointer of TMDCTsf.

◆ tsf() [3/6]

TMDCTsf * TMDCWire::tsf ( TMDCTsf * )

sets a pointer of TMDCTsf.

◆ tsf() [4/6]

const TMDCTsf *const TMDCWire::tsf ( void ) const
inline

returns a pointer to a TMDCTsf.

Definition at line 217 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

217{ return _tsf; }

◆ tsf() [5/6]

const TMDCTsf *const TMDCWire::tsf ( void ) const

returns a pointer to a TMDCTsf.

◆ tsf() [6/6]

const TMDCTsf *const TMDCWire::tsf ( void ) const

returns a pointer to a TMDCTsf.

◆ wirePosition() [1/3]

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

calculates position and direction vector with sag correction.

Definition at line 542 of file TMDCWire.cxx.

543 {
544 back = _backwardPosition;
545
546 //...Check z position...
547 if ( !( z > _backwardPosition.z() && z < _forwardPosition.z() ) )
548 {
549 xy = _xyPosition;
550 dir = _direction;
551 }
552
553 //...Setup...
554 int wireID = id();
555 float wirePosition[3] = { 0., 0., 0. };
556 float dydz = 0;
557 float ybSag = 0;
558 float yfSag = 0;
559
560 //...Get corrections...
561 // zsl calcdc_sag3_(& wireID, & z, wirePosition, & dydz, & ybSag, & yfSag);
562
563 //...Wire position...
564 xy.setX( (double)wirePosition[0] );
565 xy.setY( (double)wirePosition[1] );
566 xy.setZ( (double)wirePosition[2] );
567 back.setY( (double)ybSag );
568 HepVector3D v_aux( _forwardPosition.x() - _backwardPosition.x(), yfSag - ybSag,
569 _forwardPosition.z() - _backwardPosition.z() );
570 dir = v_aux.unit();
571
572 return;
573}
HepGeom::Vector3D< double > HepVector3D
void wirePosition(float zPosition, HepPoint3D &xyPosition, HepPoint3D &backwardPosition, HepVector3D &direction) const
calculates position and direction vector with sag correction.
Definition TMDCWire.cxx:542

Referenced by TRunge::SetFlightLength(), and wirePosition().

◆ wirePosition() [2/3]

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

calculates position and direction vector with sag correction.

◆ wirePosition() [3/3]

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

calculates position and direction vector with sag correction.

◆ xyPosition() [1/9]

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

Definition at line 257 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

257 {
258 a[0] = _xyPosition.x();
259 a[1] = _xyPosition.y();
260 a[2] = 0.;
261 return a;
262}

◆ xyPosition() [2/9]

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

◆ xyPosition() [3/9]

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

◆ xyPosition() [4/9]

const HepPoint3D TMDCWire::xyPosition ( double z) const

Definition at line 74 of file TMDCWire.cxx.

74 {
75 double A = 47.35E-6 / _tension;
76 HepPoint3D x0 =
77 ( z - _backwardPosition.z() ) / _direction.z() * _direction + _backwardPosition;
78
79 double zinit = x0.z();
80 HepVector3D wire;
81 wire.setX( _forwardPosition.x() - _backwardPosition.x() );
82 wire.setY( _forwardPosition.y() - _backwardPosition.y() );
83 wire.setZ( _forwardPosition.z() - _backwardPosition.z() );
84 double lxz = sqrt( wire.z() * wire.z() + wire.x() * wire.x() );
85 double Zp = ( zinit - _backwardPosition.z() ) * lxz / wire.z();
86 double x = _direction.x() * ( zinit - _backwardPosition.z() ) / _direction.z() +
87 _backwardPosition.x();
88 double y = ( A * ( Zp - lxz ) + wire.y() / lxz ) * Zp + _backwardPosition.y();
89 x0.setX( x );
90 x0.setY( y );
91 return x0;
92}
Double_t x[10]
HepGeom::Point3D< double > HepPoint3D

◆ xyPosition() [5/9]

const HepPoint3D TMDCWire::xyPosition ( double z) const

◆ xyPosition() [6/9]

const HepPoint3D TMDCWire::xyPosition ( double z) const

◆ xyPosition() [7/9]

const HepPoint3D & TMDCWire::xyPosition ( void ) const
inline

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

Definition at line 255 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/TMDCWire.h.

255{ return _xyPosition; }

Referenced by calVirtualCircle(), TPerfectFinder::doit(), TTrack::fit2D(), TTrackManager::salvageAssociateHits(), and wirePosition().

◆ xyPosition() [8/9]

const HepPoint3D & TMDCWire::xyPosition ( void ) const

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

◆ xyPosition() [9/9]

const HepPoint3D & TMDCWire::xyPosition ( void ) const

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


The documentation for this class was generated from the following files: