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)
 
bool isValid () const
 
int numberOfHits () const
 
int numberOfPlanes () 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 setTime (float t)
 
void setTimeSigma (float t_sigma)
 
void setValid (bool valid)
 
float time () const
 
float timeSigma () const
 
float x0 () const
 
float x0Sigma () const
 
float y0 () const
 
float y0Sigma () const
 
float z0 () const
 
float z0Sigma () const
 

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 19 of file CTPPSTimingLocalTrack.h.

Member Enumeration Documentation

◆ CheckDimension

Enumerator
all 

Definition at line 24 of file CTPPSTimingLocalTrack.h.

24 { x, y, all };
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
float x

Constructor & Destructor Documentation

◆ CTPPSTimingLocalTrack() [1/2]

CTPPSTimingLocalTrack::CTPPSTimingLocalTrack ( )

Definition at line 18 of file CTPPSTimingLocalTrack.cc.

18 : num_hits_(0), num_planes_(0), valid_(true), t_(0.), t_sigma_(0.) {}
int num_hits_
number of hits participating in the track
int num_planes_
number of planes participating in the track

◆ CTPPSTimingLocalTrack() [2/2]

CTPPSTimingLocalTrack::CTPPSTimingLocalTrack ( const math::XYZPoint pos0,
const math::XYZPoint pos0_sigma,
float  t,
float  t_sigma 
)

Definition at line 20 of file CTPPSTimingLocalTrack.cc.

24  : pos0_(pos0), pos0_sigma_(pos0_sigma), num_hits_(0), num_planes_(0), valid_(false), t_(t), t_sigma_(t_sigma) {}
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

◆ containsHit()

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

Definition at line 28 of file CTPPSTimingLocalTrack.cc.

References funct::abs(), all, RPCNoise_example::check, pos0_, pos0_sigma_, rpcPointValidation_cfi::recHit, tolerance, x, and y.

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

28  {
29  float xTolerance = pos0_sigma_.x() + (0.5 * recHit.xWidth()) + tolerance;
30  float yTolerance = pos0_sigma_.y() + (0.5 * recHit.yWidth()) + tolerance;
31  float zTolerance = pos0_sigma_.z() + (0.5 * recHit.zWidth()) + tolerance;
32 
33  float xDiff = std::abs(pos0_.x() - recHit.x());
34  float yDiff = std::abs(pos0_.y() - recHit.y());
35  float zDiff = std::abs(pos0_.z() - recHit.z());
36 
37  switch (check) {
38  case CheckDimension::x:
39  return xDiff < xTolerance;
40  case CheckDimension::y:
41  return yDiff < yTolerance;
43  return xDiff < xTolerance && yDiff < yTolerance && zDiff < zTolerance;
44  }
45  return false;
46 }
const double tolerance
math::XYZPoint pos0_sigma_
error on the initial track position
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
math::XYZPoint pos0_
initial track position

◆ isValid()

bool CTPPSTimingLocalTrack::isValid ( void  ) const
inline

Definition at line 53 of file CTPPSTimingLocalTrack.h.

References valid_.

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

53 { return valid_; }

◆ numberOfHits()

int CTPPSTimingLocalTrack::numberOfHits ( ) const
inline

Definition at line 40 of file CTPPSTimingLocalTrack.h.

References num_hits_.

40 { return num_hits_; }
int num_hits_
number of hits participating in the track

◆ numberOfPlanes()

int CTPPSTimingLocalTrack::numberOfPlanes ( ) const
inline

Definition at line 41 of file CTPPSTimingLocalTrack.h.

References num_planes_.

41 { return num_planes_; }
int num_planes_
number of planes participating in the track

◆ setNumOfHits()

void CTPPSTimingLocalTrack::setNumOfHits ( int  num_hits)
inline

Definition at line 48 of file CTPPSTimingLocalTrack.h.

References num_hits_.

48 { num_hits_ = num_hits; }
int num_hits_
number of hits participating in the track

◆ setNumOfPlanes()

void CTPPSTimingLocalTrack::setNumOfPlanes ( int  num_planes)
inline

Definition at line 49 of file CTPPSTimingLocalTrack.h.

References num_planes_.

49 { num_planes_ = num_planes; }
int num_planes_
number of planes participating in the track

◆ setPosition()

void CTPPSTimingLocalTrack::setPosition ( const math::XYZPoint pos0)
inline

Definition at line 45 of file CTPPSTimingLocalTrack.h.

References pos0_.

45 { pos0_ = pos0; }
math::XYZPoint pos0_
initial track position

◆ setPositionSigma()

void CTPPSTimingLocalTrack::setPositionSigma ( const math::XYZPoint pos0_sigma)
inline

Definition at line 46 of file CTPPSTimingLocalTrack.h.

References pos0_sigma_.

46 { pos0_sigma_ = pos0_sigma; }
math::XYZPoint pos0_sigma_
error on the initial track position

◆ setTime()

void CTPPSTimingLocalTrack::setTime ( float  t)
inline

◆ setTimeSigma()

void CTPPSTimingLocalTrack::setTimeSigma ( float  t_sigma)
inline

◆ setValid()

void CTPPSTimingLocalTrack::setValid ( bool  valid)
inline

◆ time()

float CTPPSTimingLocalTrack::time ( ) const
inline

Definition at line 58 of file CTPPSTimingLocalTrack.h.

References t_.

Referenced by operator<().

58 { return t_; }

◆ timeSigma()

float CTPPSTimingLocalTrack::timeSigma ( ) const
inline

Definition at line 59 of file CTPPSTimingLocalTrack.h.

References t_sigma_.

59 { return t_sigma_; }

◆ x0()

float CTPPSTimingLocalTrack::x0 ( ) const
inline

Definition at line 31 of file CTPPSTimingLocalTrack.h.

References pos0_.

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

31 { return pos0_.x(); }
math::XYZPoint pos0_
initial track position

◆ x0Sigma()

float CTPPSTimingLocalTrack::x0Sigma ( ) const
inline

Definition at line 32 of file CTPPSTimingLocalTrack.h.

References pos0_sigma_.

Referenced by channelAlignedWithTrack().

32 { return pos0_sigma_.x(); }
math::XYZPoint pos0_sigma_
error on the initial track position

◆ y0()

float CTPPSTimingLocalTrack::y0 ( ) const
inline

Definition at line 34 of file CTPPSTimingLocalTrack.h.

References pos0_.

Referenced by operator<().

34 { return pos0_.y(); }
math::XYZPoint pos0_
initial track position

◆ y0Sigma()

float CTPPSTimingLocalTrack::y0Sigma ( ) const
inline

Definition at line 35 of file CTPPSTimingLocalTrack.h.

References pos0_sigma_.

35 { return pos0_sigma_.y(); }
math::XYZPoint pos0_sigma_
error on the initial track position

◆ z0()

float CTPPSTimingLocalTrack::z0 ( ) const
inline

Definition at line 37 of file CTPPSTimingLocalTrack.h.

References pos0_.

Referenced by operator<().

37 { return pos0_.z(); }
math::XYZPoint pos0_
initial track position

◆ z0Sigma()

float CTPPSTimingLocalTrack::z0Sigma ( ) const
inline

Definition at line 38 of file CTPPSTimingLocalTrack.h.

References pos0_sigma_.

38 { return pos0_sigma_.z(); }
math::XYZPoint pos0_sigma_
error on the initial track position

Member Data Documentation

◆ num_hits_

int CTPPSTimingLocalTrack::num_hits_
private

number of hits participating in the track

Definition at line 75 of file CTPPSTimingLocalTrack.h.

Referenced by numberOfHits(), and setNumOfHits().

◆ num_planes_

int CTPPSTimingLocalTrack::num_planes_
private

number of planes participating in the track

Definition at line 78 of file CTPPSTimingLocalTrack.h.

Referenced by numberOfPlanes(), and setNumOfPlanes().

◆ pos0_

math::XYZPoint CTPPSTimingLocalTrack::pos0_
private

initial track position

Definition at line 70 of file CTPPSTimingLocalTrack.h.

Referenced by containsHit(), setPosition(), x0(), y0(), and z0().

◆ pos0_sigma_

math::XYZPoint CTPPSTimingLocalTrack::pos0_sigma_
private

error on the initial track position

Definition at line 72 of file CTPPSTimingLocalTrack.h.

Referenced by containsHit(), setPositionSigma(), x0Sigma(), y0Sigma(), and z0Sigma().

◆ t_

float CTPPSTimingLocalTrack::t_
private

Definition at line 84 of file CTPPSTimingLocalTrack.h.

Referenced by setTime(), and time().

◆ t_sigma_

float CTPPSTimingLocalTrack::t_sigma_
private

Definition at line 85 of file CTPPSTimingLocalTrack.h.

Referenced by setTimeSigma(), and timeSigma().

◆ valid_

bool CTPPSTimingLocalTrack::valid_
private

fit valid?

Definition at line 81 of file CTPPSTimingLocalTrack.h.

Referenced by isValid(), and setValid().