CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CTPPSDiamondLocalTrack.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * This is a part of CTPPS offline software.
4  * Authors:
5  * Laurent Forthomme (laurent.forthomme@cern.ch)
6  * Nicola Minafra nicola.minafra@cern.ch)
7  *
8  ****************************************************************************/
9 
10 #ifndef DataFormats_CTPPSReco_CTPPSDiamondLocalTrack
11 #define DataFormats_CTPPSReco_CTPPSDiamondLocalTrack
12 
15 
16 //----------------------------------------------------------------------------------------------------
17 
19 {
20  public:
22  chi_squared_( 0. ), valid_( true ), t_( 0. ), t_sigma_( 0. ), ts_index_( 0 ), mh_( 0 ) {}
23  CTPPSDiamondLocalTrack( const math::XYZPoint& pos0, const math::XYZPoint& pos0_sigma, float chisq, float t, float t_sigma, int oot_idx, int mult_hits ) :
24  pos0_( pos0 ), pos0_sigma_( pos0_sigma ),
25  chi_squared_( chisq ), valid_( false ),
26  t_( t ), t_sigma_( t_sigma ), ts_index_( oot_idx ), mh_( mult_hits ) {}
28 
29  //--- spatial get'ters
30 
31  inline float getX0() const { return pos0_.x(); }
32  inline float getX0Sigma() const { return pos0_sigma_.x(); }
33 
34  inline float getY0() const { return pos0_.y(); }
35  inline float getY0Sigma() const { return pos0_sigma_.y(); }
36 
37  inline float getZ0() const { return pos0_.z(); }
38 
39  inline float getChiSquared() const { return chi_squared_; }
40 
41  //--- spatial set'ters
42 
43  inline void setPosition( const math::XYZPoint& pos0 ) { pos0_ = pos0; }
44  inline void setPositionSigma( const math::XYZPoint& pos0_sigma ) { pos0_sigma_ = pos0_sigma; }
45 
46  inline void setChiSquared( const float chisq ) { chi_squared_ = chisq; }
47 
48  inline bool isValid() const { return valid_; }
49  inline void setValid( bool valid ) { valid_ = valid; }
50 
51  //--- temporal get'ters
52 
53  inline float getT() const { return t_; }
54  inline float getTSigma() const { return t_sigma_; }
55 
56  //--- temporal set'ters
57 
58  inline void setT( const float t ) { t_ = t; }
59  inline void setTSigma( const float t_sigma ) { t_sigma_ = t_sigma; }
60 
61  inline void setOOTIndex( const int i ) { ts_index_ = i; }
62  inline int getOOTIndex() const { return ts_index_; }
63 
64  inline void setMultipleHits( const int i ) { mh_ = i; }
65  inline int getMultipleHits() const { return mh_; }
66 
67  private:
68  //--- spatial information
69 
74 
76  float chi_squared_;
77 
79  bool valid_;
80 
81  //--- timing information
82 
83  float t_;
84  float t_sigma_;
86  int ts_index_;
88  int mh_;
89 
90 };
91 
92 inline bool operator<( const CTPPSDiamondLocalTrack& lhs, const CTPPSDiamondLocalTrack& rhs )
93 {
94  // start to sort by temporal coordinate
95  if ( lhs.getT() < rhs.getT() ) return true;
96  if ( lhs.getT() > rhs.getT() ) return false;
97  // then sort by x-position
98  return ( lhs.getX0() < rhs.getX0() );
99 }
100 
101 #endif
int i
Definition: DBlmapReader.cc:9
int ts_index_
Time slice index.
int mh_
Multiple hits counter.
void setMultipleHits(const int i)
bool operator<(const FedChannelConnection &, const FedChannelConnection &)
void setPositionSigma(const math::XYZPoint &pos0_sigma)
void setChiSquared(const float chisq)
void setPosition(const math::XYZPoint &pos0)
CTPPSDiamondLocalTrack(const math::XYZPoint &pos0, const math::XYZPoint &pos0_sigma, float chisq, float t, float t_sigma, int oot_idx, int mult_hits)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
math::XYZPoint pos0_
initial track position
void setTSigma(const float t_sigma)
volatile std::atomic< bool > shutdown_flag false
math::XYZPoint pos0_sigma_
error on the initial track position