CMS 3D CMS Logo

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

#include <GEMSegment.h>

Inheritance diagram for GEMSegment:
RecSegment TrackingRecHit

Public Member Functions

float bunchX () const
 
double chi2 () const override
 Chi2 of the segment fit. More...
 
GEMSegmentclone () 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...
 
GEMDetId gemDetId () const
 
 GEMSegment ()
 Default constructor. More...
 
 GEMSegment (const std::vector< const GEMRecHit *> &proto_segment, const LocalPoint &origin, const LocalVector &direction, const AlgebraicSymMatrix &errors, double chi2)
 Constructor. More...
 
 GEMSegment (const std::vector< const GEMRecHit *> &proto_segment, const LocalPoint &origin, const LocalVector &direction, const AlgebraicSymMatrix &errors, double chi2, float bx)
 
 GEMSegment (const std::vector< const GEMRecHit *> &proto_segment, const LocalPoint &origin, const LocalVector &direction, const AlgebraicSymMatrix &errors, double chi2, float bx, float deltaPhi)
 
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
 
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< GEMRecHit > & specificRecHits () const
 
 ~GEMSegment () 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 (DetId id, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, unsigned int rt, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, TrackingRecHit const &rh)
 
virtual ConstRecHitContainer transientHits () const
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 

Private Attributes

float theBX
 
double theChi2
 
AlgebraicSymMatrix theCovMatrix
 
float theDeltaPhi
 
std::vector< GEMRecHittheGEMRecHits
 
LocalVector theLocalDirection
 
LocalPoint theOrigin
 

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 2+ layers of a GEM chamber. This is 4-dimensional since it has an origin (x,y) and a direction (x,y) in the local coordinate system of the chamber.

Author
Piet Verwilligen

Definition at line 19 of file GEMSegment.h.

Constructor & Destructor Documentation

◆ GEMSegment() [1/4]

GEMSegment::GEMSegment ( )
inline

Default constructor.

Definition at line 22 of file GEMSegment.h.

Referenced by clone().

22 : theChi2(0.) {}
double theChi2
Definition: GEMSegment.h:96

◆ GEMSegment() [2/4]

GEMSegment::GEMSegment ( const std::vector< const GEMRecHit *> &  proto_segment,
const LocalPoint origin,
const LocalVector direction,
const AlgebraicSymMatrix errors,
double  chi2 
)

Constructor.

Definition at line 29 of file GEMSegment.cc.

References mps_fire::i, theBX, theDeltaPhi, and theGEMRecHits.

34  : RecSegment(buildDetId(proto_segment.front()->gemId())),
35  theOrigin(origin),
36  theLocalDirection(direction),
38  theChi2(chi2) {
39  theBX = -10.0;
40  theDeltaPhi = -10.0;
41  for (unsigned int i = 0; i < proto_segment.size(); ++i)
42  theGEMRecHits.push_back(*proto_segment[i]);
43 }
float theBX
Definition: GEMSegment.h:97
float theDeltaPhi
Definition: GEMSegment.h:98
LocalVector theLocalDirection
Definition: GEMSegment.h:94
LocalPoint theOrigin
Definition: GEMSegment.h:93
double theChi2
Definition: GEMSegment.h:96
Definition: errors.py:1
RecSegment(DetId id)
Definition: RecSegment.h:29
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:95
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:92
double chi2() const override
Chi2 of the segment fit.
Definition: GEMSegment.h:71

◆ GEMSegment() [3/4]

GEMSegment::GEMSegment ( const std::vector< const GEMRecHit *> &  proto_segment,
const LocalPoint origin,
const LocalVector direction,
const AlgebraicSymMatrix errors,
double  chi2,
float  bx 
)

Definition at line 45 of file GEMSegment.cc.

References mps_fire::i, theDeltaPhi, and theGEMRecHits.

51  : RecSegment(buildDetId(proto_segment.front()->gemId())),
52  theOrigin(origin),
53  theLocalDirection(direction),
55  theChi2(chi2),
56  theBX(bx) {
57  theDeltaPhi = -10.0;
58  for (unsigned int i = 0; i < proto_segment.size(); ++i)
59  theGEMRecHits.push_back(*proto_segment[i]);
60 }
float theBX
Definition: GEMSegment.h:97
float theDeltaPhi
Definition: GEMSegment.h:98
LocalVector theLocalDirection
Definition: GEMSegment.h:94
LocalPoint theOrigin
Definition: GEMSegment.h:93
double theChi2
Definition: GEMSegment.h:96
Definition: errors.py:1
RecSegment(DetId id)
Definition: RecSegment.h:29
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:95
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:92
double chi2() const override
Chi2 of the segment fit.
Definition: GEMSegment.h:71

◆ GEMSegment() [4/4]

GEMSegment::GEMSegment ( const std::vector< const GEMRecHit *> &  proto_segment,
const LocalPoint origin,
const LocalVector direction,
const AlgebraicSymMatrix errors,
double  chi2,
float  bx,
float  deltaPhi 
)

Definition at line 62 of file GEMSegment.cc.

References mps_fire::i, and theGEMRecHits.

69  : RecSegment(buildDetId(proto_segment.front()->gemId())),
70  theOrigin(origin),
71  theLocalDirection(direction),
73  theChi2(chi2),
74  theBX(bx),
76  for (unsigned int i = 0; i < proto_segment.size(); ++i)
77  theGEMRecHits.push_back(*proto_segment[i]);
78 }
float theBX
Definition: GEMSegment.h:97
float deltaPhi() const
Definition: GEMSegment.h:87
float theDeltaPhi
Definition: GEMSegment.h:98
LocalVector theLocalDirection
Definition: GEMSegment.h:94
LocalPoint theOrigin
Definition: GEMSegment.h:93
double theChi2
Definition: GEMSegment.h:96
Definition: errors.py:1
RecSegment(DetId id)
Definition: RecSegment.h:29
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:95
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:92
double chi2() const override
Chi2 of the segment fit.
Definition: GEMSegment.h:71

◆ ~GEMSegment()

GEMSegment::~GEMSegment ( )
override

Destructor.

Definition at line 80 of file GEMSegment.cc.

80 {}

Member Function Documentation

◆ bunchX()

float GEMSegment::bunchX ( ) const
inline

Definition at line 85 of file GEMSegment.h.

References theBX.

Referenced by operator<<().

85 { return theBX; }
float theBX
Definition: GEMSegment.h:97

◆ chi2()

double GEMSegment::chi2 ( ) const
inlineoverridevirtual

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 71 of file GEMSegment.h.

References theChi2.

Referenced by operator<<().

71 { return theChi2; };
double theChi2
Definition: GEMSegment.h:96

◆ clone()

GEMSegment* GEMSegment::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 50 of file GEMSegment.h.

References GEMSegment().

50 { return new GEMSegment(*this); }
GEMSegment()
Default constructor.
Definition: GEMSegment.h:22

◆ degreesOfFreedom()

int GEMSegment::degreesOfFreedom ( ) const
inlineoverridevirtual

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 75 of file GEMSegment.h.

References nRecHits().

Referenced by operator<<().

75 { return 2 * nRecHits() - 4; }
int nRecHits() const
Definition: GEMSegment.h:81

◆ deltaPhi()

float GEMSegment::deltaPhi ( ) const
inline

Definition at line 87 of file GEMSegment.h.

References theDeltaPhi.

Referenced by operator<<().

87 { return theDeltaPhi; }
float theDeltaPhi
Definition: GEMSegment.h:98

◆ dimension()

int GEMSegment::dimension ( ) const
inlineoverridevirtual

Dimension (in parameter space)

Implements RecSegment.

Definition at line 73 of file GEMSegment.h.

73 { return 4; }

◆ gemDetId()

GEMDetId GEMSegment::gemDetId ( ) const
inline

◆ localDirection()

LocalVector GEMSegment::localDirection ( ) const
inlineoverridevirtual

Local direction.

Implements RecSegment.

Definition at line 55 of file GEMSegment.h.

References theLocalDirection.

Referenced by FWGEMSegmentProxyBuilder::buildViewType(), operator<<(), and GE0TriggerPseudoBuilder::segmentConversion().

55 { return theLocalDirection; }
LocalVector theLocalDirection
Definition: GEMSegment.h:94

◆ localDirectionError()

LocalError GEMSegment::localDirectionError ( ) const
overridevirtual

Error on the local direction.

Implements RecSegment.

Definition at line 102 of file GEMSegment.cc.

References theCovMatrix.

Referenced by operator<<().

102  {
103  return LocalError(theCovMatrix[0][0], theCovMatrix[0][1], theCovMatrix[1][1]);
104 }
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:95

◆ localPosition()

LocalPoint GEMSegment::localPosition ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 52 of file GEMSegment.h.

References theOrigin.

Referenced by FWGEMSegmentProxyBuilder::buildViewType(), operator<<(), and GE0TriggerPseudoBuilder::segmentConversion().

52 { return theOrigin; }
LocalPoint theOrigin
Definition: GEMSegment.h:93

◆ localPositionError()

LocalError GEMSegment::localPositionError ( ) const
overridevirtual

Implements TrackingRecHit.

Definition at line 98 of file GEMSegment.cc.

References theCovMatrix.

Referenced by operator<<().

98  {
99  return LocalError(theCovMatrix[2][2], theCovMatrix[2][3], theCovMatrix[3][3]);
100 }
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:95

◆ nRecHits()

int GEMSegment::nRecHits ( ) const
inline

Definition at line 81 of file GEMSegment.h.

References theGEMRecHits.

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

81 { return theGEMRecHits.size(); }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:92

◆ parameters()

AlgebraicVector GEMSegment::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 106 of file GEMSegment.cc.

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

106  {
107  // For consistency with DT and CSC and what we require for the TrackingRecHit interface,
108  // the order of the parameters in the returned vector should be (dx/dz, dy/dz, x, z)
109 
111 
112  if (theLocalDirection.z() != 0) {
115  }
116  result[2] = theOrigin.x();
117  result[3] = theOrigin.y();
118 
119  return result;
120 }
T z() const
Definition: PV3DBase.h:61
LocalVector theLocalDirection
Definition: GEMSegment.h:94
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
LocalPoint theOrigin
Definition: GEMSegment.h:93
CLHEP::HepVector AlgebraicVector

◆ parametersError()

AlgebraicSymMatrix GEMSegment::parametersError ( ) const
inlineoverridevirtual

Covariance matrix of parameters()

Implements TrackingRecHit.

Definition at line 62 of file GEMSegment.h.

References theCovMatrix.

62 { return theCovMatrix; }
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:95

◆ print()

void GEMSegment::print ( void  ) const

Definition at line 128 of file GEMSegment.cc.

References LogDebug.

128 { LogDebug("GEMSegment") << *this; }
#define LogDebug(id)

◆ projectionMatrix()

AlgebraicMatrix GEMSegment::projectionMatrix ( ) const
overridevirtual

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

Implements TrackingRecHit.

Definition at line 122 of file GEMSegment.cc.

References theProjectionMatrix.

122  {
124  return (theProjectionMatrix.getMatrix());
125 }
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79

◆ recHits() [1/2]

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

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 82 of file GEMSegment.cc.

References theGEMRecHits.

Referenced by MuonAssociatorByHitsHelper::getMatchedIds().

82  {
83  std::vector<const TrackingRecHit*> pointersOfRecHits;
84  for (std::vector<GEMRecHit>::const_iterator irh = theGEMRecHits.begin(); irh != theGEMRecHits.end(); ++irh) {
85  pointersOfRecHits.push_back(&(*irh));
86  }
87  return pointersOfRecHits;
88 }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:92

◆ recHits() [2/2]

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

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 90 of file GEMSegment.cc.

References theGEMRecHits.

90  {
91  std::vector<TrackingRecHit*> pointersOfRecHits;
92  for (std::vector<GEMRecHit>::iterator irh = theGEMRecHits.begin(); irh != theGEMRecHits.end(); ++irh) {
93  pointersOfRecHits.push_back(&(*irh));
94  }
95  return pointersOfRecHits;
96 }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:92

◆ specificRecHits()

const std::vector<GEMRecHit>& GEMSegment::specificRecHits ( ) const
inline

Definition at line 79 of file GEMSegment.h.

References theGEMRecHits.

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

79 { return theGEMRecHits; }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:92

Member Data Documentation

◆ theBX

float GEMSegment::theBX
private

Definition at line 97 of file GEMSegment.h.

Referenced by bunchX(), and GEMSegment().

◆ theChi2

double GEMSegment::theChi2
private

Definition at line 96 of file GEMSegment.h.

Referenced by chi2().

◆ theCovMatrix

AlgebraicSymMatrix GEMSegment::theCovMatrix
private

Definition at line 95 of file GEMSegment.h.

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

◆ theDeltaPhi

float GEMSegment::theDeltaPhi
private

Definition at line 98 of file GEMSegment.h.

Referenced by deltaPhi(), and GEMSegment().

◆ theGEMRecHits

std::vector<GEMRecHit> GEMSegment::theGEMRecHits
private

Definition at line 92 of file GEMSegment.h.

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

◆ theLocalDirection

LocalVector GEMSegment::theLocalDirection
private

Definition at line 94 of file GEMSegment.h.

Referenced by localDirection(), and parameters().

◆ theOrigin

LocalPoint GEMSegment::theOrigin
private

Definition at line 93 of file GEMSegment.h.

Referenced by localPosition(), and parameters().