CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
CTPPSTimingLocalTrack Class Reference

#include <CTPPSTimingLocalTrack.h>

Inheritance diagram for CTPPSTimingLocalTrack:
CTPPSDiamondLocalTrack TotemTimingLocalTrack

Public Types

enum  CheckDimension { CheckDimension::x, CheckDimension::y, CheckDimension::all }
 

Public Member Functions

bool containsHit (const CTPPSTimingRecHit &recHit, float tolerance=0.1f, CheckDimension check=CheckDimension::all) const
 
 CTPPSTimingLocalTrack ()
 
 CTPPSTimingLocalTrack (const math::XYZPoint &pos0, const math::XYZPoint &pos0_sigma, float t, float t_sigma)
 
int getNumOfHits () const
 
int getNumOfPlanes () const
 
float getT () const
 
float getTSigma () const
 
float getX0 () const
 
float getX0Sigma () const
 
float getY0 () const
 
float getY0Sigma () const
 
float getZ0 () const
 
float getZ0Sigma () const
 
bool isValid () const
 
void setNumOfHits (int num_hits)
 
void setNumOfPlanes (int num_planes)
 
void setPosition (const math::XYZPoint &pos0)
 
void setPositionSigma (const math::XYZPoint &pos0_sigma)
 
void setT (float t)
 
void setTSigma (float t_sigma)
 
void setValid (bool valid)
 

Private Attributes

int num_hits_
 number of hits participating in the track More...
 
int num_planes_
 number of planes participating in the track More...
 
math::XYZPoint pos0_
 initial track position More...
 
math::XYZPoint pos0_sigma_
 error on the initial track position More...
 
float t_
 
float t_sigma_
 
bool valid_
 fit valid? More...
 

Detailed Description

Definition at line 20 of file CTPPSTimingLocalTrack.h.

Member Enumeration Documentation

Enumerator
all 

Definition at line 27 of file CTPPSTimingLocalTrack.h.

Constructor & Destructor Documentation

CTPPSTimingLocalTrack::CTPPSTimingLocalTrack ( )

Definition at line 18 of file CTPPSTimingLocalTrack.cc.

18  :
19  num_hits_( 0 ), num_planes_( 0 ), valid_( true ),
20  t_( 0. ), t_sigma_( 0. )
21 {}
int num_hits_
number of hits participating in the track
int num_planes_
number of planes participating in the track
CTPPSTimingLocalTrack::CTPPSTimingLocalTrack ( const math::XYZPoint pos0,
const math::XYZPoint pos0_sigma,
float  t,
float  t_sigma 
)

Definition at line 23 of file CTPPSTimingLocalTrack.cc.

24  :
25  pos0_( pos0 ), pos0_sigma_( pos0_sigma ), num_hits_( 0 ), num_planes_( 0 ), valid_( false ),
26  t_( t ), t_sigma_( t_sigma )
27 {}
math::XYZPoint pos0_sigma_
error on the initial track position
int num_hits_
number of hits participating in the track
math::XYZPoint pos0_
initial track position
int num_planes_
number of planes participating in the track

Member Function Documentation

bool CTPPSTimingLocalTrack::containsHit ( const CTPPSTimingRecHit recHit,
float  tolerance = 0.1f,
CheckDimension  check = CheckDimension::all 
) const

Definition at line 32 of file CTPPSTimingLocalTrack.cc.

References funct::abs(), all, CTPPSTimingRecHit::getX(), CTPPSTimingRecHit::getXWidth(), CTPPSTimingRecHit::getY(), CTPPSTimingRecHit::getYWidth(), CTPPSTimingRecHit::getZ(), CTPPSTimingRecHit::getZWidth(), pos0_, pos0_sigma_, x, and y.

Referenced by CTPPSDiamondLocalTrack::containsHit(), and TotemTimingTrackRecognition::produceTracks().

33 {
34  float xTolerance = pos0_sigma_.x() + ( 0.5 * recHit.getXWidth() ) + tolerance;
35  float yTolerance = pos0_sigma_.y() + ( 0.5 * recHit.getYWidth() ) + tolerance;
36  float zTolerance = pos0_sigma_.z() + ( 0.5 * recHit.getZWidth() ) + tolerance;
37 
38  float xDiff = std::abs( pos0_.x() - recHit.getX() );
39  float yDiff = std::abs( pos0_.y() - recHit.getY() );
40  float zDiff = std::abs( pos0_.z() - recHit.getZ() );
41 
42  switch ( check ) {
43  case CheckDimension::x:
44  return xDiff < xTolerance;
45  case CheckDimension::y:
46  return yDiff < yTolerance;
48  return xDiff < xTolerance && yDiff < yTolerance && zDiff < zTolerance;
49  }
50  return false;
51 }
float getX() const
float getYWidth() const
const double tolerance
math::XYZPoint pos0_sigma_
error on the initial track position
float getZWidth() const
float getY() const
float getZ() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float getXWidth() const
math::XYZPoint pos0_
initial track position
def check(config)
Definition: trackerTree.py:14
int CTPPSTimingLocalTrack::getNumOfHits ( ) const
inline

Definition at line 41 of file CTPPSTimingLocalTrack.h.

References num_hits_.

41 { return num_hits_; }
int num_hits_
number of hits participating in the track
int CTPPSTimingLocalTrack::getNumOfPlanes ( ) const
inline

Definition at line 42 of file CTPPSTimingLocalTrack.h.

References num_planes_.

42 { return num_planes_; }
int num_planes_
number of planes participating in the track
float CTPPSTimingLocalTrack::getT ( ) const
inline

Definition at line 59 of file CTPPSTimingLocalTrack.h.

References t_.

Referenced by operator<().

59 { return t_; }
float CTPPSTimingLocalTrack::getTSigma ( ) const
inline

Definition at line 60 of file CTPPSTimingLocalTrack.h.

References t_sigma_.

60 { return t_sigma_; }
float CTPPSTimingLocalTrack::getX0 ( ) const
inline

Definition at line 32 of file CTPPSTimingLocalTrack.h.

References pos0_.

Referenced by channelAlignedWithTrack(), and operator<().

32 { return pos0_.x(); }
math::XYZPoint pos0_
initial track position
float CTPPSTimingLocalTrack::getX0Sigma ( ) const
inline

Definition at line 33 of file CTPPSTimingLocalTrack.h.

References pos0_sigma_.

Referenced by channelAlignedWithTrack().

33 { return pos0_sigma_.x(); }
math::XYZPoint pos0_sigma_
error on the initial track position
float CTPPSTimingLocalTrack::getY0 ( ) const
inline

Definition at line 35 of file CTPPSTimingLocalTrack.h.

References pos0_.

Referenced by operator<().

35 { return pos0_.y(); }
math::XYZPoint pos0_
initial track position
float CTPPSTimingLocalTrack::getY0Sigma ( ) const
inline

Definition at line 36 of file CTPPSTimingLocalTrack.h.

References pos0_sigma_.

36 { return pos0_sigma_.y(); }
math::XYZPoint pos0_sigma_
error on the initial track position
float CTPPSTimingLocalTrack::getZ0 ( ) const
inline

Definition at line 38 of file CTPPSTimingLocalTrack.h.

References pos0_.

Referenced by operator<().

38 { return pos0_.z(); }
math::XYZPoint pos0_
initial track position
float CTPPSTimingLocalTrack::getZ0Sigma ( ) const
inline

Definition at line 39 of file CTPPSTimingLocalTrack.h.

References pos0_sigma_.

39 { return pos0_sigma_.z(); }
math::XYZPoint pos0_sigma_
error on the initial track position
bool CTPPSTimingLocalTrack::isValid ( void  ) const
inline

Definition at line 54 of file CTPPSTimingLocalTrack.h.

References valid_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

54 { return valid_; }
void CTPPSTimingLocalTrack::setNumOfHits ( int  num_hits)
inline

Definition at line 49 of file CTPPSTimingLocalTrack.h.

References num_hits_.

49 { num_hits_ = num_hits; }
int num_hits_
number of hits participating in the track
void CTPPSTimingLocalTrack::setNumOfPlanes ( int  num_planes)
inline

Definition at line 50 of file CTPPSTimingLocalTrack.h.

References num_planes_.

50 { num_planes_ = num_planes; }
int num_planes_
number of planes participating in the track
void CTPPSTimingLocalTrack::setPosition ( const math::XYZPoint pos0)
inline

Definition at line 46 of file CTPPSTimingLocalTrack.h.

References pos0_.

Referenced by TotemTimingTrackRecognition::produceTracks(), and CTPPSDiamondTrackRecognition::produceTracks().

46 { pos0_ = pos0; }
math::XYZPoint pos0_
initial track position
void CTPPSTimingLocalTrack::setPositionSigma ( const math::XYZPoint pos0_sigma)
inline

Definition at line 47 of file CTPPSTimingLocalTrack.h.

References pos0_sigma_.

Referenced by TotemTimingTrackRecognition::produceTracks(), and CTPPSDiamondTrackRecognition::produceTracks().

47 { pos0_sigma_ = pos0_sigma; }
math::XYZPoint pos0_sigma_
error on the initial track position
void CTPPSTimingLocalTrack::setT ( float  t)
inline
void CTPPSTimingLocalTrack::setTSigma ( float  t_sigma)
inline
void CTPPSTimingLocalTrack::setValid ( bool  valid)
inline

Member Data Documentation

int CTPPSTimingLocalTrack::num_hits_
private

number of hits participating in the track

Definition at line 76 of file CTPPSTimingLocalTrack.h.

Referenced by getNumOfHits(), and setNumOfHits().

int CTPPSTimingLocalTrack::num_planes_
private

number of planes participating in the track

Definition at line 79 of file CTPPSTimingLocalTrack.h.

Referenced by getNumOfPlanes(), and setNumOfPlanes().

math::XYZPoint CTPPSTimingLocalTrack::pos0_
private

initial track position

Definition at line 71 of file CTPPSTimingLocalTrack.h.

Referenced by containsHit(), getX0(), getY0(), getZ0(), and setPosition().

math::XYZPoint CTPPSTimingLocalTrack::pos0_sigma_
private

error on the initial track position

Definition at line 73 of file CTPPSTimingLocalTrack.h.

Referenced by containsHit(), getX0Sigma(), getY0Sigma(), getZ0Sigma(), and setPositionSigma().

float CTPPSTimingLocalTrack::t_
private

Definition at line 85 of file CTPPSTimingLocalTrack.h.

Referenced by getT(), and setT().

float CTPPSTimingLocalTrack::t_sigma_
private

Definition at line 86 of file CTPPSTimingLocalTrack.h.

Referenced by getTSigma(), and setTSigma().

bool CTPPSTimingLocalTrack::valid_
private

fit valid?

Definition at line 82 of file CTPPSTimingLocalTrack.h.

Referenced by isValid(), and setValid().