CMS 3D CMS Logo

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

#include <GEMSegment.h>

Inheritance diagram for GEMSegment:
RecSegment TrackingRecHit

Public Member Functions

float bunchX () const
 
double chi2 () const
 Chi2 of the segment fit. More...
 
GEMSegmentclone () const
 
virtual int degreesOfFreedom () const
 Degrees of freedom of the segment fit. More...
 
virtual int dimension () const
 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, double time, double timeErr)
 
LocalVector localDirection () const
 Local direction. More...
 
LocalError localDirectionError () const
 Error on the local direction. More...
 
LocalPoint localPosition () const
 
LocalError localPositionError () const
 
int nRecHits () const
 
AlgebraicVector parameters () const
 Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y ) More...
 
AlgebraicSymMatrix parametersError () const
 Covariance matrix of parameters() More...
 
void print () const
 
virtual AlgebraicMatrix projectionMatrix () const
 The projection matrix relates the trajectory state parameters to the segment parameters(). More...
 
virtual std::vector< const TrackingRecHit * > recHits () const
 Access to component RecHits (if any) More...
 
virtual std::vector< TrackingRecHit * > recHits ()
 Non-const access to component RecHits (if any) More...
 
const std::vector< GEMRecHit > & specificRecHits () const
 
float time () const
 
float timeErr () const
 
virtual ~GEMSegment ()
 Destructor. More...
 
- Public Member Functions inherited from RecSegment
 RecSegment (DetId id)
 
 RecSegment (TrackingRecHit::id_type id=0)
 
virtual ~RecSegment ()
 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
 
std::vector< GEMRecHittheGEMRecHits
 
LocalVector theLocalDirection
 
LocalPoint theOrigin
 
double theTimeUncrt
 
double 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
}
 
- 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::GEMSegment ( )
inline

Default constructor.

Definition at line 24 of file GEMSegment.h.

References chi2(), time(), timeErr(), and ~GEMSegment().

Referenced by clone().

24 : theChi2(0.){}
double theChi2
Definition: GEMSegment.h:86
GEMSegment::GEMSegment ( const std::vector< const GEMRecHit * > &  proto_segment,
const LocalPoint origin,
const LocalVector direction,
const AlgebraicSymMatrix errors,
double  chi2 
)

Constructor.

Definition at line 34 of file GEMSegment.cc.

References mps_fire::i, theBX, theGEMRecHits, theTimeUncrt, and theTimeValue.

35  :
36  RecSegment(buildDetId(proto_segment.front()->gemId())),
37  theOrigin(origin),
39  theTimeValue = 0.0;
40  theTimeUncrt = 0.0;
41  theBX = -10.0;
42  for(unsigned int i=0; i<proto_segment.size(); ++i)
43  theGEMRecHits.push_back(*proto_segment[i]);
44 }
double chi2() const
Chi2 of the segment fit.
Definition: GEMSegment.h:61
float theBX
Definition: GEMSegment.h:89
double theTimeValue
Definition: GEMSegment.h:87
double theTimeUncrt
Definition: GEMSegment.h:88
LocalVector theLocalDirection
Definition: GEMSegment.h:84
LocalPoint theOrigin
Definition: GEMSegment.h:83
double theChi2
Definition: GEMSegment.h:86
Definition: errors.py:1
RecSegment(DetId id)
Definition: RecSegment.h:30
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:85
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:82
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 46 of file GEMSegment.cc.

References mps_fire::i, theBX, theGEMRecHits, theTimeUncrt, and theTimeValue.

47  :
48  RecSegment(buildDetId(proto_segment.front()->gemId())),
49  theOrigin(origin),
51  theTimeValue = 0.0;
52  theTimeUncrt = 0.0;
53  theBX = bx;
54  for(unsigned int i=0; i<proto_segment.size(); ++i)
55  theGEMRecHits.push_back(*proto_segment[i]);
56 }
double chi2() const
Chi2 of the segment fit.
Definition: GEMSegment.h:61
float theBX
Definition: GEMSegment.h:89
double theTimeValue
Definition: GEMSegment.h:87
double theTimeUncrt
Definition: GEMSegment.h:88
LocalVector theLocalDirection
Definition: GEMSegment.h:84
LocalPoint theOrigin
Definition: GEMSegment.h:83
double theChi2
Definition: GEMSegment.h:86
Definition: errors.py:1
RecSegment(DetId id)
Definition: RecSegment.h:30
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:85
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:82
GEMSegment::GEMSegment ( const std::vector< const GEMRecHit * > &  proto_segment,
const LocalPoint origin,
const LocalVector direction,
const AlgebraicSymMatrix errors,
double  chi2,
double  time,
double  timeErr 
)

Definition at line 58 of file GEMSegment.cc.

References mps_fire::i, theBX, theGEMRecHits, theTimeUncrt, theTimeValue, time(), and timeErr().

59  :
60  RecSegment(buildDetId(proto_segment.front()->gemId())),
61  theOrigin(origin),
65  theBX = -10.0;
66  for(unsigned int i=0; i<proto_segment.size(); ++i)
67  theGEMRecHits.push_back(*proto_segment[i]);
68 }
double chi2() const
Chi2 of the segment fit.
Definition: GEMSegment.h:61
float theBX
Definition: GEMSegment.h:89
double theTimeValue
Definition: GEMSegment.h:87
double theTimeUncrt
Definition: GEMSegment.h:88
LocalVector theLocalDirection
Definition: GEMSegment.h:84
float time() const
Definition: GEMSegment.h:75
LocalPoint theOrigin
Definition: GEMSegment.h:83
double theChi2
Definition: GEMSegment.h:86
float timeErr() const
Definition: GEMSegment.h:76
Definition: errors.py:1
RecSegment(DetId id)
Definition: RecSegment.h:30
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:85
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:82
GEMSegment::~GEMSegment ( )
virtual

Destructor.

Definition at line 70 of file GEMSegment.cc.

Referenced by GEMSegment().

70 {}

Member Function Documentation

float GEMSegment::bunchX ( ) const
inline

Definition at line 77 of file GEMSegment.h.

References print(), and theBX.

Referenced by operator<<().

77 { return theBX; }
float theBX
Definition: GEMSegment.h:89
double GEMSegment::chi2 ( ) const
inlinevirtual

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 61 of file GEMSegment.h.

References theChi2.

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

61 { return theChi2; };
double theChi2
Definition: GEMSegment.h:86
GEMSegment* GEMSegment::clone ( void  ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 40 of file GEMSegment.h.

References GEMSegment().

40 { return new GEMSegment(*this); }
GEMSegment()
Default constructor.
Definition: GEMSegment.h:24
virtual int GEMSegment::degreesOfFreedom ( ) const
inlinevirtual

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 65 of file GEMSegment.h.

References nRecHits().

Referenced by operator<<().

65 { return 2*nRecHits() - 4;}
int nRecHits() const
Definition: GEMSegment.h:71
virtual int GEMSegment::dimension ( ) const
inlinevirtual

Dimension (in parameter space)

Implements RecSegment.

Definition at line 63 of file GEMSegment.h.

63 { return 4; }
GEMDetId GEMSegment::gemDetId ( ) const
inline

Definition at line 73 of file GEMSegment.h.

References TrackingRecHit::geographicalId().

Referenced by GEMSegmentAlgorithm::buildSegments(), and FWGEMSegmentProxyBuilder::buildViewType().

73 { return geographicalId(); }
DetId geographicalId() const
LocalVector GEMSegment::localDirection ( ) const
inlinevirtual

Local direction.

Implements RecSegment.

Definition at line 45 of file GEMSegment.h.

References localDirectionError(), parameters(), and theLocalDirection.

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

45 { return theLocalDirection; }
LocalVector theLocalDirection
Definition: GEMSegment.h:84
LocalError GEMSegment::localDirectionError ( ) const
virtual

Error on the local direction.

Implements RecSegment.

Definition at line 93 of file GEMSegment.cc.

References theCovMatrix.

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

93  {
94  return LocalError(theCovMatrix[0][0], theCovMatrix[0][1], theCovMatrix[1][1]);
95 }
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:85
LocalPoint GEMSegment::localPosition ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 42 of file GEMSegment.h.

References localPositionError(), and theOrigin.

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

42 { return theOrigin; }
LocalPoint theOrigin
Definition: GEMSegment.h:83
LocalError GEMSegment::localPositionError ( ) const
virtual

Implements TrackingRecHit.

Definition at line 89 of file GEMSegment.cc.

References theCovMatrix.

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

89  {
90  return LocalError(theCovMatrix[2][2], theCovMatrix[2][3], theCovMatrix[3][3]);
91 }
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:85
int GEMSegment::nRecHits ( ) const
inline

Definition at line 71 of file GEMSegment.h.

References theGEMRecHits.

Referenced by degreesOfFreedom().

71 { return theGEMRecHits.size(); }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:82
AlgebraicVector GEMSegment::parameters ( void  ) const
virtual

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

Implements TrackingRecHit.

Definition at line 98 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().

Referenced by Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputTags(), localDirection(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::recursePSetProperties().

98  {
99  // For consistency with DT and CSC and what we require for the TrackingRecHit interface,
100  // the order of the parameters in the returned vector should be (dx/dz, dy/dz, x, z)
101 
103 
104  if(theLocalDirection.z() != 0)
105  {
108  }
109  result[2] = theOrigin.x();
110  result[3] = theOrigin.y();
111 
112  return result;
113 }
T y() const
Definition: PV3DBase.h:63
LocalVector theLocalDirection
Definition: GEMSegment.h:84
T z() const
Definition: PV3DBase.h:64
LocalPoint theOrigin
Definition: GEMSegment.h:83
CLHEP::HepVector AlgebraicVector
T x() const
Definition: PV3DBase.h:62
AlgebraicSymMatrix GEMSegment::parametersError ( ) const
inlinevirtual

Covariance matrix of parameters()

Implements TrackingRecHit.

Definition at line 52 of file GEMSegment.h.

References projectionMatrix(), recHits(), and theCovMatrix.

52 { return theCovMatrix; }
AlgebraicSymMatrix theCovMatrix
Definition: GEMSegment.h:85
void GEMSegment::print ( void  ) const

Definition at line 121 of file GEMSegment.cc.

References LogDebug.

Referenced by bunchX().

121  {
122  LogDebug("GEMSegment") << *this;
123 
124 }
#define LogDebug(id)
AlgebraicMatrix GEMSegment::projectionMatrix ( ) const
virtual

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

Implements TrackingRecHit.

Definition at line 115 of file GEMSegment.cc.

References ProjectionMatrixDiag::getMatrix(), and theProjectionMatrix.

Referenced by parametersError().

115  {
117  return (theProjectionMatrix.getMatrix());
118 }
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:80
const AlgebraicMatrix & getMatrix() const
std::vector< const TrackingRecHit * > GEMSegment::recHits ( ) const
virtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 72 of file GEMSegment.cc.

References theGEMRecHits.

Referenced by MuonAssociatorByHitsHelper::getMatchedIds(), and parametersError().

72  {
73  std::vector<const TrackingRecHit*> pointersOfRecHits;
74  for (std::vector<GEMRecHit>::const_iterator irh = theGEMRecHits.begin(); irh!=theGEMRecHits.end(); ++irh) {
75  pointersOfRecHits.push_back(&(*irh));
76  }
77  return pointersOfRecHits;
78 }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:82
std::vector< TrackingRecHit * > GEMSegment::recHits ( )
virtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 80 of file GEMSegment.cc.

References theGEMRecHits.

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

Definition at line 69 of file GEMSegment.h.

References theGEMRecHits.

Referenced by operator<<().

69 { return theGEMRecHits; }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMSegment.h:82
float GEMSegment::time ( ) const
inline

Definition at line 75 of file GEMSegment.h.

References theTimeValue.

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

75 { return theTimeValue; }
double theTimeValue
Definition: GEMSegment.h:87
float GEMSegment::timeErr ( ) const
inline

Definition at line 76 of file GEMSegment.h.

References theTimeUncrt.

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

76 { return theTimeUncrt; }
double theTimeUncrt
Definition: GEMSegment.h:88

Member Data Documentation

float GEMSegment::theBX
private

Definition at line 89 of file GEMSegment.h.

Referenced by bunchX(), and GEMSegment().

double GEMSegment::theChi2
private

Definition at line 86 of file GEMSegment.h.

Referenced by chi2().

AlgebraicSymMatrix GEMSegment::theCovMatrix
private

Definition at line 85 of file GEMSegment.h.

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

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

Definition at line 82 of file GEMSegment.h.

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

LocalVector GEMSegment::theLocalDirection
private

Definition at line 84 of file GEMSegment.h.

Referenced by localDirection(), and parameters().

LocalPoint GEMSegment::theOrigin
private

Definition at line 83 of file GEMSegment.h.

Referenced by localPosition(), and parameters().

double GEMSegment::theTimeUncrt
private

Definition at line 88 of file GEMSegment.h.

Referenced by GEMSegment(), and timeErr().

double GEMSegment::theTimeValue
private

Definition at line 87 of file GEMSegment.h.

Referenced by GEMSegment(), and time().