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 (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 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.

22 : theChi2(0.) {}

Referenced by clone().

◆ 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.

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 }

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

◆ 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.

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 }

References mps_fire::i, theDeltaPhi, and theGEMRecHits.

◆ 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.

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 }

References mps_fire::i, and theGEMRecHits.

◆ ~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.

85 { return theBX; }

References theBX.

Referenced by operator<<().

◆ chi2()

double GEMSegment::chi2 ( ) const
inlineoverridevirtual

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 71 of file GEMSegment.h.

71 { return theChi2; };

References theChi2.

Referenced by operator<<().

◆ clone()

GEMSegment* GEMSegment::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 50 of file GEMSegment.h.

50 { return new GEMSegment(*this); }

References GEMSegment().

◆ degreesOfFreedom()

int GEMSegment::degreesOfFreedom ( ) const
inlineoverridevirtual

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 75 of file GEMSegment.h.

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

References nRecHits().

Referenced by operator<<().

◆ deltaPhi()

float GEMSegment::deltaPhi ( ) const
inline

Definition at line 87 of file GEMSegment.h.

87 { return theDeltaPhi; }

References theDeltaPhi.

Referenced by operator<<().

◆ 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

Definition at line 83 of file GEMSegment.h.

83 { return geographicalId(); }

References TrackingRecHit::geographicalId().

Referenced by FWGEMSegmentProxyBuilder::buildViewType().

◆ localDirection()

LocalVector GEMSegment::localDirection ( ) const
inlineoverridevirtual

Local direction.

Implements RecSegment.

Definition at line 55 of file GEMSegment.h.

55 { return theLocalDirection; }

References theLocalDirection.

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

◆ localDirectionError()

LocalError GEMSegment::localDirectionError ( ) const
overridevirtual

Error on the local direction.

Implements RecSegment.

Definition at line 102 of file GEMSegment.cc.

102  {
103  return LocalError(theCovMatrix[0][0], theCovMatrix[0][1], theCovMatrix[1][1]);
104 }

References theCovMatrix.

Referenced by operator<<().

◆ localPosition()

LocalPoint GEMSegment::localPosition ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 52 of file GEMSegment.h.

52 { return theOrigin; }

References theOrigin.

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

◆ localPositionError()

LocalError GEMSegment::localPositionError ( ) const
overridevirtual

Implements TrackingRecHit.

Definition at line 98 of file GEMSegment.cc.

98  {
99  return LocalError(theCovMatrix[2][2], theCovMatrix[2][3], theCovMatrix[3][3]);
100 }

References theCovMatrix.

Referenced by operator<<().

◆ nRecHits()

int GEMSegment::nRecHits ( ) const
inline

Definition at line 81 of file GEMSegment.h.

81 { return theGEMRecHits.size(); }

References theGEMRecHits.

Referenced by degreesOfFreedom().

◆ 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.

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 }

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

◆ parametersError()

AlgebraicSymMatrix GEMSegment::parametersError ( ) const
inlineoverridevirtual

Covariance matrix of parameters()

Implements TrackingRecHit.

Definition at line 62 of file GEMSegment.h.

62 { return theCovMatrix; }

References theCovMatrix.

◆ print()

void GEMSegment::print ( void  ) const

Definition at line 128 of file GEMSegment.cc.

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

References LogDebug.

◆ 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.

122  {
124  return (theProjectionMatrix.getMatrix());
125 }

References theProjectionMatrix.

◆ 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.

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 }

References theGEMRecHits.

Referenced by MuonAssociatorByHitsHelper::getMatchedIds().

◆ 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.

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 }

References theGEMRecHits.

◆ specificRecHits()

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

Definition at line 79 of file GEMSegment.h.

79 { return theGEMRecHits; }

References theGEMRecHits.

Referenced by operator<<().

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().

RecSegment::RecSegment
RecSegment(DetId id)
Definition: RecSegment.h:29
mps_fire.i
i
Definition: mps_fire.py:428
GEMSegment::theCovMatrix
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:95
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
GEMSegment::deltaPhi
float deltaPhi() const
Definition: GEMSegment.h:87
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
GEMSegment::theBX
float theBX
Definition: GEMSegment.h:97
ProjectionMatrixDiag
Definition: GEMCSCSegment.cc:15
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
GEMSegment::nRecHits
int nRecHits() const
Definition: GEMSegment.h:81
errors
Definition: errors.py:1
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
GEMSegment::theLocalDirection
LocalVector theLocalDirection
Definition: GEMSegment.h:94
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
LocalError
Definition: LocalError.h:12
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
GEMSegment::chi2
double chi2() const override
Chi2 of the segment fit.
Definition: GEMSegment.h:71
GEMSegment::GEMSegment
GEMSegment()
Default constructor.
Definition: GEMSegment.h:22
GEMSegment::theChi2
double theChi2
Definition: GEMSegment.h:96
theProjectionMatrix
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
GEMSegment::theOrigin
LocalPoint theOrigin
Definition: GEMSegment.h:93
mps_fire.result
result
Definition: mps_fire.py:311
GEMSegment::theGEMRecHits
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:92
GEMSegment::theDeltaPhi
float theDeltaPhi
Definition: GEMSegment.h:98