#include <cfloat>
#include "CLHEP/Matrix/DiagMatrix.h"
#include "CLHEP/Matrix/Matrix.h"
#include "CLHEP/Matrix/SymMatrix.h"
#include "CLHEP/Matrix/Vector.h"
#include "TrkReco/TCircle.h"
#include "TrkReco/TMDCUtil.h"
#include "TrkReco/TMDCWire.h"
#include "TrkReco/TMDCWireHit.h"
#include "TrkReco/TMDCWireHitMC.h"
#include "TrkReco/TMLine.h"
#include "TrkReco/TMLink.h"
#include "TrkReco/TSegment.h"
#include "TrkReco/TTrack.h"
#include "MdcTables/HepevtTables.h"
#include "MdcTables/MdcTables.h"
#include "MdcTables/MdstTables.h"
#include "MdcTables/TrkTables.h"
#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/IDataProviderSvc.h"
#include "GaudiKernel/IInterface.h"
#include "GaudiKernel/IMessageSvc.h"
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/Kernel.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/Service.h"
#include "GaudiKernel/SmartDataPtr.h"
#include "GaudiKernel/StatusCode.h"
Go to the source code of this file.
◆ JJJTEST
◆ JJTEST
◆ NEW_FIT2D
◆ OPTNK
◆ t_dot
Value:( a[0] * b[0] + a[1] * b[1] + a[2] * b[2] )
Definition at line 3068 of file TTrack.cxx.
◆ t_dot2
Value:( a[0] * b[0] + a[1] * b[1] )
Definition at line 3069 of file TTrack.cxx.
◆ t_print
Value:std::cout << b << " = " << a[0] << " " << a[1] << " " << a[2] << std::endl;
Definition at line 3070 of file TTrack.cxx.
3070# define t_print( a, b ) \
3071 std::cout << b << " = " << a[0] << " " << a[1] << " " << a[2] << std::endl;
◆ HelixHasNan()
| bool HelixHasNan |
( |
const Helix & | h | ) |
|
Helix parameter validity.
Definition at line 3939 of file TTrack.cxx.
3939 {
3941 for ( unsigned i = 0; i < 5; i++ )
3942
3943 if ( std::isnan( a[i] ) ) return true;
3945 for ( unsigned i = 0; i < 5; i++ )
3946 for ( unsigned j = 0; j <= i; j++ )
3947
3948 if ( std::isnan( Ea[i][j] ) ) return true;
3949 return false;
3950}
CLHEP::HepSymMatrix SymMatrix
const HepSymMatrix & Ea(void) const
returns error matrix.
const HepVector & a(void) const
returns helix parameters.
Referenced by TTrackManager::goodTrack(), TrackInformation(), and TrackInformation().
◆ PositiveDefinite()
| bool PositiveDefinite |
( |
const Helix & | h | ) |
|
Error matrix validity.
Definition at line 3924 of file TTrack.cxx.
3924 {
3929
3930 bool positive = true;
3931 if ( e[0][0] <= 0. ) positive = false;
3932 else if (
e2.determinant() <= 0. ) positive =
false;
3933 else if ( e3.determinant() <= 0. ) positive = false;
3934 else if ( e4.determinant() <= 0. ) positive = false;
3935 else if ( e.determinant() <= 0. ) positive = false;
3936 return positive;
3937}
Referenced by TrackInformation(), and TrackInformation().
◆ SortByPt()
| int SortByPt |
( |
const void * | av, |
|
|
const void * | bv ) |
Utility functions.
Definition at line 2514 of file TTrack.cxx.
2514 {
2517 if ( ( *a )->pt() < ( *b )->pt() ) return 1;
2518 else if ( ( *a )->pt() == ( *b )->pt() ) return 0;
2519 else return -1;
2520}
A class to represent a track in tracking.
Referenced by TTrackManager::append2D().
◆ Track2Helix() [1/4]
Definition at line 3952 of file TTrack.cxx.
3952 {
3953 float charge = 1;
3954 if (
t.idhep == 11 ) charge = -1;
3955 else if (
t.idhep == -11 ) charge = 1;
3956 else if (
t.idhep == 13 ) charge = -1;
3957 else if (
t.idhep == -13 ) charge = 1;
3958 else if (
t.idhep == 211 ) charge = 1;
3959 else if (
t.idhep == -211 ) charge = -1;
3960 else if (
t.idhep == 321 ) charge = 1;
3961 else if (
t.idhep == -321 ) charge = -1;
3962 else if (
t.idhep == 2212 ) charge = 1;
3963 else if (
t.idhep == -2212 ) charge = -1;
3964 else
3965 {
3966 std::cout << "Track2Helix(gen_hepevt) !!! charge of id=";
3967 std::cout <<
t.idhep <<
" is unknown" << std::endl;
3968 }
3969
3970 Hep3Vector mom(
t.P[0],
t.P[1],
t.P[2] );
3971 Hep3Vector pos(
t.V[0] / 10.,
t.V[1] / 10.,
t.V[2] / 10. );
3972 return Helix( pos, mom, charge );
3973}
◆ Track2Helix() [2/4]
returns helix.
Definition at line 3707 of file TTrack.cxx.
3707 {
3708 HepVector a( 5 );
3709 Hep3Vector p(
t.pivot[0],
t.pivot[1],
t.pivot[2] );
3710 HepSymMatrix er( 5, 0 );
3711 a( 1 ) =
t.helix[0];
3712 a( 2 ) =
t.helix[1];
3713 a( 3 ) =
t.helix[2];
3714 a( 4 ) =
t.helix[3];
3715 a( 5 ) =
t.helix[4];
3716 er( 1, 1 ) =
t.error[0];
3717 er( 2, 1 ) =
t.error[1];
3718 er( 2, 2 ) =
t.error[2];
3719 er( 3, 1 ) =
t.error[3];
3720 er( 3, 2 ) =
t.error[4];
3721 er( 3, 3 ) =
t.error[5];
3722 er( 4, 1 ) =
t.error[6];
3723 er( 4, 2 ) =
t.error[7];
3724 er( 4, 3 ) =
t.error[8];
3725 er( 4, 4 ) =
t.error[9];
3726 er( 5, 1 ) =
t.error[10];
3727 er( 5, 2 ) =
t.error[11];
3728 er( 5, 3 ) =
t.error[12];
3729 er( 5, 4 ) =
t.error[13];
3730 er( 5, 5 ) =
t.error[14];
3731 return Helix( p, a, er );
3732}
◆ Track2Helix() [3/4]
Definition at line 3680 of file TTrack.cxx.
3680 {
3681 HepVector a( 5 );
3682 Hep3Vector p(
t.pivot[0],
t.pivot[1],
t.pivot[2] );
3683 HepSymMatrix er( 5, 0 );
3684 a( 1 ) =
t.helix[0];
3685 a( 2 ) =
t.helix[1];
3686 a( 3 ) =
t.helix[2];
3687 a( 4 ) =
t.helix[3];
3688 a( 5 ) =
t.helix[4];
3689 er( 1, 1 ) =
t.error[0];
3690 er( 2, 1 ) =
t.error[1];
3691 er( 2, 2 ) =
t.error[2];
3692 er( 3, 1 ) =
t.error[3];
3693 er( 3, 2 ) =
t.error[4];
3694 er( 3, 3 ) =
t.error[5];
3695 er( 4, 1 ) =
t.error[6];
3696 er( 4, 2 ) =
t.error[7];
3697 er( 4, 3 ) =
t.error[8];
3698 er( 4, 4 ) =
t.error[9];
3699 er( 5, 1 ) =
t.error[10];
3700 er( 5, 2 ) =
t.error[11];
3701 er( 5, 3 ) =
t.error[12];
3702 er( 5, 4 ) =
t.error[13];
3703 er( 5, 5 ) =
t.error[14];
3704 return Helix( p, a, er );
3705}
Referenced by TrackInformation().
◆ Track2Helix() [4/4]
Definition at line 3734 of file TTrack.cxx.
3734 {
3735 HepVector a( 5 );
3736 Hep3Vector p(
t.pivot_x,
t.pivot_y,
t.pivot_z );
3737 HepSymMatrix er( 5, 0 );
3738 a( 1 ) =
t.helix[0];
3739 a( 2 ) =
t.helix[1];
3740 a( 3 ) =
t.helix[2];
3741 a( 4 ) =
t.helix[3];
3742 a( 5 ) =
t.helix[4];
3743 er( 1, 1 ) =
t.error[0];
3744 er( 2, 1 ) =
t.error[1];
3745 er( 2, 2 ) =
t.error[2];
3746 er( 3, 1 ) =
t.error[3];
3747 er( 3, 2 ) =
t.error[4];
3748 er( 3, 3 ) =
t.error[5];
3749 er( 4, 1 ) =
t.error[6];
3750 er( 4, 2 ) =
t.error[7];
3751 er( 4, 3 ) =
t.error[8];
3752 er( 4, 4 ) =
t.error[9];
3753 er( 5, 1 ) =
t.error[10];
3754 er( 5, 2 ) =
t.error[11];
3755 er( 5, 3 ) =
t.error[12];
3756 er( 5, 4 ) =
t.error[13];
3757 er( 5, 5 ) =
t.error[14];
3758 return Helix( p, a, er );
3759}
◆ TrackInformation() [1/3]
| std::string TrackInformation |
( |
const MdcRec_trk & | r | ) |
|
Definition at line 3878 of file TTrack.cxx.
3878 {
3879 std::string p;
3881 else p = " nega";
3884}
Helix Track2Helix(const MdcTrk_localz &t)
std::string TrackInformation(const TTrack &t)
bool PositiveDefinite(const Helix &h)
Error matrix validity.
bool HelixHasNan(const Helix &h)
Helix parameter validity.
◆ TrackInformation() [2/3]
| std::string TrackInformation |
( |
const TTrack & | t | ) |
|
◆ TrackInformation() [3/3]
| std::string TrackInformation |
( |
unsigned | nA, |
|
|
unsigned | nS, |
|
|
unsigned | n, |
|
|
float | chisq ) |
Definition at line 3886 of file TTrack.cxx.
3886 {
3888
3889 s +=
"a" + std::to_string(
int( nA ) );
3890 s +=
" s" + std::to_string(
int( nS ) );
3891 s +=
" n" + std::to_string(
int(
n ) );
3892
3893 float x = chisq;
3894
3895 if ( x < 0. )
s +=
" -";
3897
3898 int y = int( fabs( x ) );
3899 s += std::to_string( y ) +
".";
3900 float z = fabs( x );
3901 for ( unsigned j = 0; j < 1; j++ )
3902 {
3903 z *= 10.;
3904 y = ( int( z ) % 10 );
3905 s += std::to_string( y );
3906 }
3907
3909}
◆ TrackKinematics()
| std::string TrackKinematics |
( |
const Helix & | h | ) |
|
Definition at line 3761 of file TTrack.cxx.
3761 {
3765
3766 float chrg = hIp.
a()[2] / fabs( hIp.
a()[2] );
3768 if ( chrg > 0. )
s =
"+";
3770
3771 float x[4];
3772 x[0] = fabs( hIp.
a()[0] );
3774 x[2] = 1. / fabs( hIp.
a()[2] );
3775 x[3] = ( 1. / fabs( hIp.
a()[2] ) ) * hIp.
a()[4];
3776
3777 if ( ( x[0] < 2. ) && ( fabs( x[1] ) < 4. ) )
s +=
"i ";
3779
3780 for ( unsigned i = 0; i < 4; i++ )
3781 {
3783
3784 if ( x[i] < 0. )
s +=
"-";
3786
3787 int y = int( fabs( x[i] ) );
3788 s += std::to_string( y ) +
".";
3789 float z = fabs( x[i] );
3790 for ( unsigned j = 0; j < 3; j++ )
3791 {
3792 z *= 10.;
3793 y = ( int( z ) % 10 );
3794 s += std::to_string( y );
3795 }
3796 }
3797
3799}
HepGeom::Point3D< double > HepPoint3D
const HepPoint3D & pivot(void) const
returns pivot position.
◆ TrackLayerUsage()
| std::string TrackLayerUsage |
( |
const TTrack & | t | ) |
|
Definition at line 3911 of file TTrack.cxx.
3911 {
3914 std::string nh;
3915 for ( unsigned i = 0; i < 11; i++ )
3916 {
3917 nh += std::to_string(
n[i] );
3918 if ( i % 2 ) nh += "-";
3919 else if ( i < 10 ) nh += ",";
3920 }
3921 return nh;
3922}
void NHitsSuperLayer(const AList< TMLink > &links, unsigned nHits[11])
returns # of hits per super layer.
◆ TrackStatus() [1/4]
Definition at line 3805 of file TTrack.cxx.
3805 {
3806
3807
3808
3809 return std::string( "" );
3810}
◆ TrackStatus() [2/4]
Definition at line 3812 of file TTrack.cxx.
3812 {
3813
3814
3815
3816
3817
3818
3819 return std::string( "" );
3820}
◆ TrackStatus() [3/4]
| std::string TrackStatus |
( |
const TTrack & | t | ) |
|
returns string of track status.
Definition at line 3801 of file TTrack.cxx.
3801 {
3802 return TrackStatus(
t.finder(),
t.type(),
t.quality(),
t.fitting(), 0, 0 );
3803}
std::string TrackStatus(const TTrack &t)
returns string of track status.
Referenced by TrackDump(), and TrackStatus().
◆ TrackStatus() [4/4]
| std::string TrackStatus |
( |
unsigned | md, |
|
|
unsigned | mk, |
|
|
unsigned | mq, |
|
|
unsigned | ms, |
|
|
unsigned | mm, |
|
|
unsigned | ma ) |
Definition at line 3822 of file TTrack.cxx.
3823 {
3824
3831 if (
f ==
"" )
f =
"?";
3832
3833 std::string k;
3841 if ( k == "" ) k = "?";
3842
3843 std::string b;
3848 if ( b == "" ) b = "ok";
3849
3855 if (
s ==
"" )
s =
"?";
3856
3857 int m = mm;
3858 if ( m ) --m;
3859
3860 int d = ma;
3861 if ( d ) --d;
3862
3863 std::string p = " ";
3864 return f + p + k + p + b + p +
s + p + std::to_string( m ) + p + std::to_string( d );
3865}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
#define TrackFitCdcKalman
#define TrackFitSvdCdcKalman
#define TrackQualityAfterKink
#define TrackQualityCosmic
#define TrackTrackManager
#define TrackTypeIncomingCosmic
#define TrackOldConformalFinder
#define TrackQualityOutsideCurler
#define TrackTypeOutgoingCosmic
◆ TrackType()
Definition at line 3055 of file TTrack.cxx.
3055 {
3057 {
3063 }
3064 return std::string( "unknown " );
3065}
#define TrackTypeUndefined