18#ifdef TRKRECO_DEBUG_DETAIL
25#ifndef CLHEP_POINT3D_H
26# include "CLHEP/Geometry/Point3D.h"
28#ifndef ENABLE_BACKWARDS_COMPATIBILITY
32#include "CLHEP/Alist/AList.h"
33#include "CLHEP/Alist/ConstAList.h"
34#include "TrkReco/TMDCWire.h"
35#include "TrkReco/TMDCWireHit.h"
63 void dump(
const std::string& message = std::string(
"" ),
64 const std::string& prefix = std::string(
"" ) )
const;
190 const unsigned fit2D(
const unsigned& );
321template <
class T>
class CAList;
330void Dump(
const CAList<TMLink>& links,
const std::string& message = std::string(
"" ),
331 const std::string& prefix = std::string(
"" ) );
332void Dump(
const TMLink& link,
const std::string& message = std::string(
"" ),
333 const std::string& prefix = std::string(
"" ) );
336#if defined( __GNUG__ )
340extern "C" int SortByWireId(
const void* a,
const void* b );
341extern "C" int SortByX(
const void* a,
const void* b );
346#ifdef TMLink_NO_INLINE
350# define TMLink_INLINE_DEFINE_HERE
353#ifdef TMLink_INLINE_DEFINE_HERE
364 unsigned leftRight,
double pull ) {
371inline double TMLink::pull(
void )
const {
return _pull; }
373inline double TMLink::pull(
double a ) {
return _pull = a; }
382 _onWire.setX( p[0] );
383 _onWire.setY( p[1] );
384 _onWire.setZ( p[2] );
393 _onTrack.setX( p[0] );
394 _onTrack.setY( p[1] );
395 _onTrack.setZ( p[2] );
403inline double TMLink::dPhi(
void )
const {
return _dPhi; }
405inline double TMLink::dPhi(
double a ) {
return _dPhi = a; }
428 if (
n <= 6 )
return _neighbor[
n];
436inline double TMLink::distance(
void )
const {
return ( _onTrack - _onWire ).mag(); }
501 if ( i < 4 )
return _arcZ[i];
502 std::cerr <<
"Error!! Please stop!!.....arcZ of TMLink!!! in TrkReco." << std::endl;
507 if ( i < 4 )
return _arcZ[i] = az;
508 std::cerr <<
"Error!! Please stop!!.....arcZ of TMLink!!! in TrkReco." << std::endl;
518inline const unsigned TMLink::fit2D(
const unsigned&
f ) {
return _fit2D =
f; }
522inline float TMLink::drift(
unsigned a )
const {
return _drift[a]; }
524inline float TMLink::drift(
float b,
unsigned a ) {
return _drift[a] = b; }
526inline double TMLink::cDrift(
unsigned a )
const {
return _cDrift[a]; }
528inline double TMLink::cDrift(
double b,
unsigned a ) {
return _cDrift[a] = b; }
530inline float TMLink::dDrift(
unsigned a )
const {
return _dDrift[a]; }
532inline float TMLink::dDrift(
float b,
unsigned a ) {
return _dDrift[a] = b; }
534inline float TMLink::drift(
void )
const {
return ( _drift[0] + _drift[1] ) / 2.; }
536inline double TMLink::cDrift(
void )
const {
return ( _cDrift[0] + _cDrift[1] ) / 2.; }
538inline float TMLink::dDrift(
void )
const {
return ( _dDrift[0] + _dDrift[1] ) / 2.; }
542inline unsigned TMLink::tsfTag(
unsigned a ) {
return _tsfTag = a; }
544inline double TMLink::tof(
void )
const {
return _tof; }
546inline double TMLink::tof(
double a ) {
return _tof = a; }
HepGeom::Point3D< double > HepPoint3D
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
AList< TMLink > StereoHits(const AList< TMLink > &links)
returns stereo hits.
HepGeom::Point3D< double > HepPoint3D
void Dump(const CAList< TMLink > &links, const std::string &message=std::string(""), const std::string &prefix=std::string(""))
dumps TMLinks.
AList< TMLink > SameSuperLayer(const AList< TMLink > &list, const TMLink &a)
returns links which are in the same super layer as 'a' or 'id'.
unsigned NAxialHits(const AList< TMLink > &links)
returns # of axial hits.
AList< TMLink > Edges(const AList< TMLink > &)
unsigned SuperLayer(const AList< TMLink > &list)
returns super layer pattern.
unsigned Width(const AList< TMLink > &)
void NHits(const AList< TMLink > &links, unsigned nHits[50])
returns # of hits per layer.
const TTrackHEP & Links2HEP(const AList< TMLink > &links)
returns TTrackHEP
AList< TMLink > AxialHits(const AList< TMLink > &links)
returns axial hits.
AList< TMLink > InOut(const AList< TMLink > &)
TMLink * OuterMost(const AList< TMLink > &links)
void NHitsSuperLayer(const AList< TMLink > &links, unsigned nHits[11])
returns # of hits per super layer.
unsigned NLayers(const AList< TMLink > &links)
returns # of layers.
TMLink * InnerMost(const AList< TMLink > &links)
returns the inner(outer)-most link.
unsigned NSuperLayers(const AList< TMLink > &links)
returns # of layers.
int SortByX(const void *a, const void *b)
AList< TMLink > Cores(const AList< TMLink > &input)
unsigned NStereoHits(const AList< TMLink > &links)
returns # of stereo hits.
AList< TMLink > SameLayer(const AList< TMLink > &list, const TMLink &a)
returns links which are in the same layer as 'a' or 'id'.
unsigned NMissingAxialSuperLayers(const AList< TMLink > &links)
void SeparateCores(const AList< TMLink > &input, AList< TMLink > &cores, AList< TMLink > &nonCores)
separate cores and non-cores.
int SortByWireId(const void *a, const void *b)
Sorter.
A class to represent a wire in MDC.
A class to relate TMDCWireHit and TTrack objects.
void setDriftTime(double)
add by jialk returns timeDrift after prop correction
double distance(void) const
returns distance between point on wire and on track.
const HepPoint3D & positionOnWire(void) const
returns the closest point on wire to a track.
float drift(unsigned) const
double distancenew(void) const
float dDrift(float, unsigned)
const HepPoint3D & positionOnTrack(double p[3])
const HepPoint3D & positionOnWire(double p[3])
TMLink * link(void) const
returns a pointer to a TMLink.
TMLink * neighbor(unsigned int) const
returns neighbor TMLink.
virtual ~TMLink()
Destructor.
double DriftTime(double, double) const
returs drift time
double cDrift(double, unsigned)
float drift(float, unsigned)
float dDrift(unsigned) const
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
double cDrift(unsigned) const
const HepPoint3D & conf(const HepPoint3D &conf)
const HepPoint3D & xyPosition(void) const
returns middle position of a wire. z componet is 0.
double pull(double)
sets pull.
const TMDCWireHit * hit(const TMDCWireHit *)
sets a pointer to a hit.
const HepPoint3D & positionD(const HepPoint3D &)
const HepPoint3D & positionOnTrack(void) const
returns the closest point on track to wire.
int zPair(void) const
returns id# of the pair, if zStatus == 20 (2 consective hits).
double getDriftTime(void)
unsigned tsfTag(void) const
return tsfTag of links
unsigned leftRight(void) const
returns left-right. 0:left, 1:right, 2:wire
int zStatus(int)
sets stereo Hit status
const HepPoint3D & arcZ(const unsigned=0) const
returns UseCathode flag
int zPair(int)
sets id# of the pair
int zStatus(void) const
returns stauts of stereo hit
TTrack * track(TTrack *)
sets a pointer to a track.
const HepPoint3D & arcZ(const HepPoint3D &, const unsigned=0)
sets usecathode flag
TTrack * track(void) const
returns a pointer to a track.
const TMDCWireHit * hit(void) const
returns a pointer to a hit.
const unsigned fit2D(const unsigned &)
void update(const HepPoint3D &onTrack, const HepPoint3D &onWire, unsigned leftRight, double pull)
sets results of fitting.
double tof(void) const
return time of flight
double dPhi(double)
sets and returns dPhi to the closest point.
const HepPoint3D & position(const HepPoint3D &)
sets and returns position.
const HepPoint3D & positionD(void) const
float dDrift(void) const
returns/sets drift distance error.
double dPhi(void) const
returns dPhi to the closest point.
double pull(void) const
returns pull.
unsigned tsfTag(unsigned)
TMLink * link(TMLink *)
sets a pointer to a TMLink.
TMLink(const TMLink &)
Copy constructor.
void neighbor(unsigned int, TMLink *)
sets neighbor TMLink.
const HepPoint3D & positionOnWire(const HepPoint3D &)
sets and returns the closest point on wire to a track.
double cDrift(void) const
float drift(void) const
returns/sets drift distance.
unsigned leftRight(unsigned)
sets left-right. 0:left, 1:right, 2:wire
const HepPoint3D & position(void) const
returns position.
const TMDCWire *const wire(void) const
returns a pointer to a wire.
const HepPoint3D & positionOnTrack(const HepPoint3D &)
sets and returns the closest point on track to wire.
TMLink(TTrack *track=0, const TMDCWireHit *hit=0, const HepPoint3D &position=HepPoint3D(), const HepPoint3D &positionD=HepPoint3D(), const double=0.0)
Constructor.
A class to represent a GEN_HEPEVT particle in tracking.
A class to represent a track in tracking.