CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ME0Segment Class Referencefinal

#include <ME0Segment.h>

Inheritance diagram for ME0Segment:
RecSegment TrackingRecHit

Public Member Functions

double chi2 () const override
 Chi2 of the segment fit. More...
 
ME0Segmentclone () const override
 
int degreesOfFreedom () const override
 Degrees of freedom of the segment fit. More...
 
float deltaPhi () const
 
int dimension () const override
 Dimension (in parameter space) More...
 
LocalVector localDirection () const override
 Local direction. More...
 
LocalError localDirectionError () const override
 Error on the local direction. More...
 
LocalPoint localPosition () const override
 
LocalError localPositionError () const override
 
ME0DetId me0DetId () const
 
 ME0Segment ()
 Default constructor. More...
 
 ME0Segment (const std::vector< const ME0RecHit * > &proto_segment, const LocalPoint &origin, const LocalVector &direction, const AlgebraicSymMatrix &errors, float chi2)
 Constructor. More...
 
 ME0Segment (const std::vector< const ME0RecHit * > &proto_segment, const LocalPoint &origin, const LocalVector &direction, const AlgebraicSymMatrix &errors, float chi2, float time, float timeErr, float deltaPhi)
 
int nRecHits () const
 
AlgebraicVector parameters () const override
 Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y ) More...
 
AlgebraicSymMatrix parametersError () const override
 Covariance matrix of parameters() More...
 
void print () const
 
AlgebraicMatrix projectionMatrix () const override
 The projection matrix relates the trajectory state parameters to the segment parameters(). More...
 
std::vector< const TrackingRecHit * > recHits () const override
 Access to component RecHits (if any) More...
 
std::vector< TrackingRecHit * > recHits () override
 Non-const access to component RecHits (if any) More...
 
const std::vector< ME0RecHit > & specificRecHits () const
 
float time () const
 
float timeErr () const
 
 ~ME0Segment () override
 Destructor. More...
 
- Public Member Functions inherited from RecSegment
 RecSegment (DetId id)
 
 RecSegment (TrackingRecHit::id_type id=0)
 
 ~RecSegment () override
 Destructor. More...
 
- Public Member Functions inherited from TrackingRecHit
virtual bool canImproveWithTrack () const
 
RecHitPointer cloneForFit (const GeomDet &idet) const
 
virtual TrackingRecHitcloneHit () const
 
virtual RecHitPointer cloneSH () const
 
const GeomDetdet () const
 
virtual const GeomDetUnitdetUnit () const
 
virtual float errorGlobalR () const
 
virtual float errorGlobalRPhi () const
 
virtual float errorGlobalZ () const
 
DetId geographicalId () const
 
virtual void getKfComponents (KfComponentsHolder &holder) const
 
unsigned int getRTTI () const
 
Type getType () const
 
virtual GlobalPoint globalPosition () const
 
virtual GlobalError globalPositionError () const
 
virtual bool hasPositionAndError () const
 to be redefined by daughter class More...
 
virtual TrackingRecHit const * hit () const
 
bool isValid () const
 
id_type rawId () const
 
virtual void recHitsV (std::vector< const TrackingRecHit * > &) const
 
virtual void recHitsV (std::vector< TrackingRecHit * > &)
 
virtual void setDet (const GeomDet &idet)
 
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const
 
virtual const Surfacesurface () const
 
 TrackingRecHit (const GeomDet &idet, TrackingRecHit const &rh)
 
 TrackingRecHit (const GeomDet &idet, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, unsigned int rt, Type type=valid)
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
virtual ConstRecHitContainer transientHits () const
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 

Private Attributes

float theChi2
 
AlgebraicSymMatrix theCovMatrix
 
float theDeltaPhi
 
LocalVector theLocalDirection
 
std::vector< ME0RecHittheME0RecHits
 
LocalPoint theOrigin
 
float theTimeUncrt
 
float theTimeValue
 

Additional Inherited Members

- Public Types inherited from TrackingRecHit
typedef std::vector< ConstRecHitPointerConstRecHitContainer
 
using ConstRecHitPointer = std::shared_ptr< TrackingRecHit const >
 
typedef unsigned int id_type
 
typedef std::vector< ConstRecHitPointerRecHitContainer
 
using RecHitPointer = std::shared_ptr< TrackingRecHit const >
 
enum  SharedInputType { all, some }
 definition of equality via shared input More...
 
enum  Type {
  valid = 0, missing = 1, inactive = 2, bad = 3,
  missing_inner = 4, missing_outer = 5, inactive_inner = 6, inactive_outer = 7
}
 
- Static Public Attributes inherited from TrackingRecHit
static const int rttiShift = 24
 
static const int typeMask = 0xf
 
- Protected Member Functions inherited from TrackingRecHit
void setId (id_type iid)
 
void setRTTI (unsigned int rt)
 
void setType (Type ttype)
 

Detailed Description

the CSC segment Describes a reconstructed track segment in the 6 layers of the ME0 system. This is 4-dimensional since it has an origin (x,y) and a direction (x,y) in the local coordinate system of the chamber.

Date
2014/02/04 12:41:32
Author
Marcello Maggi

Definition at line 20 of file ME0Segment.h.

Constructor & Destructor Documentation

◆ ME0Segment() [1/3]

ME0Segment::ME0Segment ( )
inline

Default constructor.

Definition at line 23 of file ME0Segment.h.

23 : theChi2(0.), theTimeValue(0.), theTimeUncrt(0.), theDeltaPhi(0.) {}

Referenced by clone().

◆ ME0Segment() [2/3]

ME0Segment::ME0Segment ( const std::vector< const ME0RecHit * > &  proto_segment,
const LocalPoint origin,
const LocalVector direction,
const AlgebraicSymMatrix errors,
float  chi2 
)

Constructor.

Definition at line 30 of file ME0Segment.cc.

35  : RecSegment(buildDetId(proto_segment.front()->me0Id())),
36  theOrigin(origin),
37  theLocalDirection(direction),
39  theChi2(chi2),
40  theTimeValue(0.),
41  theTimeUncrt(0.),
42  theDeltaPhi(0.) {
43  for (const auto* rh : proto_segment)
44  theME0RecHits.push_back(*rh);
45 }

References theME0RecHits.

◆ ME0Segment() [3/3]

ME0Segment::ME0Segment ( const std::vector< const ME0RecHit * > &  proto_segment,
const LocalPoint origin,
const LocalVector direction,
const AlgebraicSymMatrix errors,
float  chi2,
float  time,
float  timeErr,
float  deltaPhi 
)

Definition at line 47 of file ME0Segment.cc.

55  : RecSegment(buildDetId(proto_segment.front()->me0Id())),
56  theOrigin(origin),
57  theLocalDirection(direction),
59  theChi2(chi2),
63  for (const auto* rh : proto_segment)
64  theME0RecHits.push_back(*rh);
65 }

References theME0RecHits.

◆ ~ME0Segment()

ME0Segment::~ME0Segment ( )
override

Destructor.

Definition at line 67 of file ME0Segment.cc.

67 {}

Member Function Documentation

◆ chi2()

double ME0Segment::chi2 ( ) const
inlineoverridevirtual

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 66 of file ME0Segment.h.

66 { return theChi2; };

References theChi2.

Referenced by operator<<().

◆ clone()

ME0Segment* ME0Segment::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 45 of file ME0Segment.h.

45 { return new ME0Segment(*this); }

References ME0Segment().

◆ degreesOfFreedom()

int ME0Segment::degreesOfFreedom ( ) const
inlineoverridevirtual

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 70 of file ME0Segment.h.

70 { return 2 * nRecHits() - 4; }

References nRecHits().

Referenced by operator<<().

◆ deltaPhi()

float ME0Segment::deltaPhi ( ) const
inline

Definition at line 83 of file ME0Segment.h.

83 { return theDeltaPhi; }

References theDeltaPhi.

◆ dimension()

int ME0Segment::dimension ( ) const
inlineoverridevirtual

Dimension (in parameter space)

Implements RecSegment.

Definition at line 68 of file ME0Segment.h.

68 { return 4; }

◆ localDirection()

LocalVector ME0Segment::localDirection ( ) const
inlineoverridevirtual

Local direction.

Implements RecSegment.

Definition at line 50 of file ME0Segment.h.

50 { return theLocalDirection; }

References theLocalDirection.

Referenced by FWME0SegmentProxyBuilder::build(), operator<<(), and ME0TriggerPseudoBuilder::segmentConversion().

◆ localDirectionError()

LocalError ME0Segment::localDirectionError ( ) const
overridevirtual

Error on the local direction.

Implements RecSegment.

Definition at line 87 of file ME0Segment.cc.

87  {
88  return LocalError(theCovMatrix[0][0], theCovMatrix[0][1], theCovMatrix[1][1]);
89 }

References theCovMatrix.

Referenced by operator<<().

◆ localPosition()

LocalPoint ME0Segment::localPosition ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 47 of file ME0Segment.h.

47 { return theOrigin; }

References theOrigin.

Referenced by FWME0SegmentProxyBuilder::build(), operator<<(), and ME0TriggerPseudoBuilder::segmentConversion().

◆ localPositionError()

LocalError ME0Segment::localPositionError ( ) const
overridevirtual

Implements TrackingRecHit.

Definition at line 83 of file ME0Segment.cc.

83  {
84  return LocalError(theCovMatrix[2][2], theCovMatrix[2][3], theCovMatrix[3][3]);
85 }

References theCovMatrix.

Referenced by operator<<().

◆ me0DetId()

ME0DetId ME0Segment::me0DetId ( ) const
inline

◆ nRecHits()

int ME0Segment::nRecHits ( ) const
inline

Definition at line 76 of file ME0Segment.h.

76 { return theME0RecHits.size(); }

References theME0RecHits.

Referenced by degreesOfFreedom(), and ME0TriggerPseudoBuilder::segmentConversion().

◆ parameters()

AlgebraicVector ME0Segment::parameters ( void  ) const
overridevirtual

Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )

Implements TrackingRecHit.

Definition at line 91 of file ME0Segment.cc.

91  {
92  // For consistency with DT and CSC and what we require for the TrackingRecHit interface,
93  // the order of the parameters in the returned vector should be (dx/dz, dy/dz, x, z)
94 
96 
97  if (theLocalDirection.z() != 0) {
100  }
101  result[2] = theOrigin.x();
102  result[3] = theOrigin.y();
103 
104  return result;
105 }

References mps_fire::result, theLocalDirection, theOrigin, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

◆ parametersError()

AlgebraicSymMatrix ME0Segment::parametersError ( ) const
inlineoverridevirtual

Covariance matrix of parameters()

Implements TrackingRecHit.

Definition at line 57 of file ME0Segment.h.

57 { return theCovMatrix; }

References theCovMatrix.

◆ print()

void ME0Segment::print ( void  ) const

Definition at line 113 of file ME0Segment.cc.

113 { LogDebug("ME0Segment") << *this; }

References LogDebug.

◆ projectionMatrix()

AlgebraicMatrix ME0Segment::projectionMatrix ( ) const
overridevirtual

The projection matrix relates the trajectory state parameters to the segment parameters().

Implements TrackingRecHit.

Definition at line 107 of file ME0Segment.cc.

107  {
109  return (theProjectionMatrix.getMatrix());
110 }

References theProjectionMatrix.

◆ recHits() [1/2]

std::vector< const TrackingRecHit * > ME0Segment::recHits ( ) const
overridevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 69 of file ME0Segment.cc.

69  {
70  std::vector<const TrackingRecHit*> pointersOfRecHits;
71  for (const auto& rh : theME0RecHits)
72  pointersOfRecHits.push_back(&rh);
73  return pointersOfRecHits;
74 }

References theME0RecHits.

◆ recHits() [2/2]

std::vector< TrackingRecHit * > ME0Segment::recHits ( )
overridevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 76 of file ME0Segment.cc.

76  {
77  std::vector<TrackingRecHit*> pointersOfRecHits;
78  for (auto& rh : theME0RecHits)
79  pointersOfRecHits.push_back(&rh);
80  return pointersOfRecHits;
81 }

References theME0RecHits.

◆ specificRecHits()

const std::vector<ME0RecHit>& ME0Segment::specificRecHits ( ) const
inline

◆ time()

float ME0Segment::time ( ) const
inline

Definition at line 80 of file ME0Segment.h.

80 { return theTimeValue; }

References theTimeValue.

Referenced by operator<<(), and ME0TriggerPseudoBuilder::segmentConversion().

◆ timeErr()

float ME0Segment::timeErr ( ) const
inline

Definition at line 81 of file ME0Segment.h.

81 { return theTimeUncrt; }

References theTimeUncrt.

Referenced by operator<<().

Member Data Documentation

◆ theChi2

float ME0Segment::theChi2
private

Definition at line 92 of file ME0Segment.h.

Referenced by chi2().

◆ theCovMatrix

AlgebraicSymMatrix ME0Segment::theCovMatrix
private

Definition at line 91 of file ME0Segment.h.

Referenced by localDirectionError(), localPositionError(), and parametersError().

◆ theDeltaPhi

float ME0Segment::theDeltaPhi
private

Definition at line 95 of file ME0Segment.h.

Referenced by deltaPhi().

◆ theLocalDirection

LocalVector ME0Segment::theLocalDirection
private

Definition at line 90 of file ME0Segment.h.

Referenced by localDirection(), and parameters().

◆ theME0RecHits

std::vector<ME0RecHit> ME0Segment::theME0RecHits
private

Definition at line 88 of file ME0Segment.h.

Referenced by ME0Segment(), nRecHits(), recHits(), and specificRecHits().

◆ theOrigin

LocalPoint ME0Segment::theOrigin
private

Definition at line 89 of file ME0Segment.h.

Referenced by localPosition(), and parameters().

◆ theTimeUncrt

float ME0Segment::theTimeUncrt
private

Definition at line 94 of file ME0Segment.h.

Referenced by timeErr().

◆ theTimeValue

float ME0Segment::theTimeValue
private

Definition at line 93 of file ME0Segment.h.

Referenced by time().

RecSegment::RecSegment
RecSegment(DetId id)
Definition: RecSegment.h:29
ME0Segment::theLocalDirection
LocalVector theLocalDirection
Definition: ME0Segment.h:90
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
ME0Segment::theCovMatrix
AlgebraicSymMatrix theCovMatrix
Definition: ME0Segment.h:91
ME0Segment::theTimeValue
float theTimeValue
Definition: ME0Segment.h:93
ME0Segment::nRecHits
int nRecHits() const
Definition: ME0Segment.h:76
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
ME0Segment::theChi2
float theChi2
Definition: ME0Segment.h:92
ProjectionMatrixDiag
Definition: GEMCSCSegment.cc:16
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
ME0Segment::timeErr
float timeErr() const
Definition: ME0Segment.h:81
errors
Definition: errors.py:1
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
ME0Segment::theDeltaPhi
float theDeltaPhi
Definition: ME0Segment.h:95
ME0Segment::theME0RecHits
std::vector< ME0RecHit > theME0RecHits
Definition: ME0Segment.h:88
ME0Segment::theTimeUncrt
float theTimeUncrt
Definition: ME0Segment.h:94
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
ME0Segment::deltaPhi
float deltaPhi() const
Definition: ME0Segment.h:83
LocalError
Definition: LocalError.h:12
ME0Segment::theOrigin
LocalPoint theOrigin
Definition: ME0Segment.h:89
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
ME0Segment::chi2
double chi2() const override
Chi2 of the segment fit.
Definition: ME0Segment.h:66
ME0Segment::time
float time() const
Definition: ME0Segment.h:80
theProjectionMatrix
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
mps_fire.result
result
Definition: mps_fire.py:311
ME0Segment::ME0Segment
ME0Segment()
Default constructor.
Definition: ME0Segment.h:23