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

Member Enumeration Documentation

◆ CheckDimension

Enumerator
all 

Definition at line 30 of file CTPPSTimingLocalTrack.h.

31 { return pos0_.x(); }

Constructor & Destructor Documentation

◆ CTPPSTimingLocalTrack() [1/2]

CTPPSTimingLocalTrack::CTPPSTimingLocalTrack ( )

Definition at line 17 of file CTPPSTimingLocalTrack.cc.

◆ CTPPSTimingLocalTrack() [2/2]

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

Definition at line 19 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) {}

Member Function Documentation

◆ containsHit()

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

Definition at line 27 of file CTPPSTimingLocalTrack.cc.

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;

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

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

◆ isValid()

bool CTPPSTimingLocalTrack::isValid ( void  ) const
inline

Definition at line 59 of file CTPPSTimingLocalTrack.h.

59 { return t_sigma_; }

References t_sigma_.

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

◆ numberOfHits()

int CTPPSTimingLocalTrack::numberOfHits ( ) const
inline

Definition at line 46 of file CTPPSTimingLocalTrack.h.

46 { pos0_sigma_ = pos0_sigma; }

References pos0_sigma_.

◆ numberOfPlanes()

int CTPPSTimingLocalTrack::numberOfPlanes ( ) const
inline

Definition at line 47 of file CTPPSTimingLocalTrack.h.

48 { num_hits_ = num_hits; }

References num_hits_.

◆ setNumOfHits()

void CTPPSTimingLocalTrack::setNumOfHits ( int  num_hits)
inline

Definition at line 54 of file CTPPSTimingLocalTrack.h.

54 { valid_ = valid; }

References RunInfoPI::valid, and valid_.

◆ setNumOfPlanes()

void CTPPSTimingLocalTrack::setNumOfPlanes ( int  num_planes)
inline

Definition at line 55 of file CTPPSTimingLocalTrack.h.

58 { return t_; }

References t_.

◆ setPosition()

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

Definition at line 51 of file CTPPSTimingLocalTrack.h.

53 { return valid_; }

◆ setPositionSigma()

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

Definition at line 52 of file CTPPSTimingLocalTrack.h.

53 { return valid_; }

References valid_.

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

64 { t_sigma_ = t_sigma; }

References t_sigma_.

Referenced by operator<().

◆ timeSigma()

float CTPPSTimingLocalTrack::timeSigma ( ) const
inline

Definition at line 65 of file CTPPSTimingLocalTrack.h.

66 :
67  //--- spatial information

◆ x0()

float CTPPSTimingLocalTrack::x0 ( ) const
inline

Definition at line 37 of file CTPPSTimingLocalTrack.h.

37 { return pos0_.z(); }

References pos0_.

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

◆ x0Sigma()

float CTPPSTimingLocalTrack::x0Sigma ( ) const
inline

Definition at line 38 of file CTPPSTimingLocalTrack.h.

38 { return pos0_sigma_.z(); }

References pos0_sigma_.

Referenced by channelAlignedWithTrack().

◆ y0()

float CTPPSTimingLocalTrack::y0 ( ) const
inline

Definition at line 40 of file CTPPSTimingLocalTrack.h.

40 { return num_hits_; }

References num_hits_.

Referenced by operator<().

◆ y0Sigma()

float CTPPSTimingLocalTrack::y0Sigma ( ) const
inline

Definition at line 41 of file CTPPSTimingLocalTrack.h.

41 { return num_planes_; }

References num_planes_.

◆ z0()

float CTPPSTimingLocalTrack::z0 ( ) const
inline

Definition at line 43 of file CTPPSTimingLocalTrack.h.

Referenced by operator<().

◆ z0Sigma()

float CTPPSTimingLocalTrack::z0Sigma ( ) const
inline

Definition at line 44 of file CTPPSTimingLocalTrack.h.

References pos0_.

Member Data Documentation

◆ num_hits_

int CTPPSTimingLocalTrack::num_hits_
private

number of hits participating in the track

Definition at line 81 of file CTPPSTimingLocalTrack.h.

Referenced by numberOfPlanes(), and y0().

◆ num_planes_

int CTPPSTimingLocalTrack::num_planes_
private

number of planes participating in the track

Definition at line 84 of file CTPPSTimingLocalTrack.h.

Referenced by y0Sigma().

◆ pos0_

math::XYZPoint CTPPSTimingLocalTrack::pos0_
private

initial track position

Definition at line 76 of file CTPPSTimingLocalTrack.h.

Referenced by containsHit(), x0(), and z0Sigma().

◆ pos0_sigma_

math::XYZPoint CTPPSTimingLocalTrack::pos0_sigma_
private

error on the initial track position

Definition at line 78 of file CTPPSTimingLocalTrack.h.

Referenced by containsHit(), numberOfHits(), and x0Sigma().

◆ t_

float CTPPSTimingLocalTrack::t_
private

Definition at line 90 of file CTPPSTimingLocalTrack.h.

Referenced by setNumOfPlanes(), and setValid().

◆ t_sigma_

float CTPPSTimingLocalTrack::t_sigma_
private

Definition at line 91 of file CTPPSTimingLocalTrack.h.

Referenced by isValid(), and time().

◆ valid_

bool CTPPSTimingLocalTrack::valid_
private

fit valid?

Definition at line 87 of file CTPPSTimingLocalTrack.h.

Referenced by setNumOfHits(), and setPositionSigma().

rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
CTPPSTimingLocalTrack::pos0_sigma_
math::XYZPoint pos0_sigma_
error on the initial track position
Definition: CTPPSTimingLocalTrack.h:78
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
CTPPSTimingLocalTrack::num_hits_
int num_hits_
number of hits participating in the track
Definition: CTPPSTimingLocalTrack.h:81
CTPPSTimingLocalTrack::pos0_
math::XYZPoint pos0_
initial track position
Definition: CTPPSTimingLocalTrack.h:76
CTPPSTimingLocalTrack::CheckDimension::all
CTPPSTimingLocalTrack::num_planes_
int num_planes_
number of planes participating in the track
Definition: CTPPSTimingLocalTrack.h:84
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:26
CTPPSTimingLocalTrack::t_sigma_
float t_sigma_
Definition: CTPPSTimingLocalTrack.h:91
CTPPSTimingLocalTrack::t_
float t_
Definition: CTPPSTimingLocalTrack.h:90
CTPPSTimingLocalTrack::CheckDimension::y
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
RunInfoPI::valid
Definition: RunInfoPayloadInspectoHelper.h:16
CTPPSTimingLocalTrack::CheckDimension::x
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
CTPPSTimingLocalTrack::valid_
bool valid_
fit valid?
Definition: CTPPSTimingLocalTrack.h:87