CMS 3D CMS Logo

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

#include <GEMCSCSegment.h>

Inheritance diagram for GEMCSCSegment:
RecSegment TrackingRecHit

Public Member Functions

double chi2 () const override
 Chi2 of the segment fit. More...
 
GEMCSCSegmentclone () const override
 
CSCDetId cscDetId () const
 
const std::vector< CSCRecHit2D > & cscRecHits () const
 
const CSCSegment cscSegment () const
 
int degreesOfFreedom () const override
 Degrees of freedom of the segment fit. More...
 
int dimension () const override
 Dimension (in parameter space) More...
 
 GEMCSCSegment ()
 Default constructor. More...
 
 GEMCSCSegment (const CSCSegment *csc_segment, const std::vector< const GEMRecHit * > gem_rhs, LocalPoint origin, LocalVector direction, AlgebraicSymMatrix errors, double chi2)
 Constructor. More...
 
const std::vector< GEMRecHit > & gemRecHits () const
 
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...
 
 ~GEMCSCSegment () 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

double theChi2
 
AlgebraicSymMatrix theCovMatrix
 
CSCSegment theCSCSegment
 
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

Based on CSCSegment class Describes a reconstructed track segment in the GEM + CSC chambers. This is 4-dimensional since it has an origin (x,y) and a direction (x,y) in the local coordinate system of the (csc) chamber.

Author
R. Radogna

Definition at line 24 of file GEMCSCSegment.h.

Constructor & Destructor Documentation

◆ GEMCSCSegment() [1/2]

GEMCSCSegment::GEMCSCSegment ( )
inline

Default constructor.

Definition at line 27 of file GEMCSCSegment.h.

27 : theChi2(0.) {}

Referenced by clone().

◆ GEMCSCSegment() [2/2]

GEMCSCSegment::GEMCSCSegment ( const CSCSegment csc_segment,
const std::vector< const GEMRecHit * >  gem_rhs,
LocalPoint  origin,
LocalVector  direction,
AlgebraicSymMatrix  errors,
double  chi2 
)

Constructor.

Definition at line 31 of file GEMCSCSegment.cc.

37  :
38 
39  RecSegment(buildDetId(csc_segment->cscDetId())),
40  theOrigin(origin),
41  theLocalDirection(direction),
43  theChi2(chi2) {
44  for (unsigned int i = 0; i < gem_rhs.size(); ++i) {
45  theGEMRecHits.push_back((*gem_rhs[i]));
46  }
47  theCSCSegment = *csc_segment;
48  // LogDebug
49  edm::LogVerbatim("GEMCSCSegment")
50  << "[GEMCSCSegment :: ctor] CSCDetId: " << csc_segment->cscDetId()
51  << " CSC RecHits: " << csc_segment->specificRecHits().size() << " GEM RecHits: " << gem_rhs.size()
52  << "\n" // << " Fit chi2: "<<chi2<<" Position: "<<origin<<" Direction: "<<direction
53  << " CSC Segment Details: \n"
54  << *csc_segment << "\n"
55  << " GEMCSC Segment Details: \n"
56  << *this << "\n"
57  << "[GEMCSCSegment :: ctor] ------------------------------------------------------------";
58 }

References CSCSegment::cscDetId(), mps_fire::i, CSCSegment::specificRecHits(), theCSCSegment, and theGEMRecHits.

◆ ~GEMCSCSegment()

GEMCSCSegment::~GEMCSCSegment ( )
override

Destructor.

Definition at line 60 of file GEMCSCSegment.cc.

60 {}

Member Function Documentation

◆ chi2()

double GEMCSCSegment::chi2 ( ) const
inlineoverridevirtual

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 58 of file GEMCSCSegment.h.

58 { return theChi2; };

References theChi2.

Referenced by operator<<().

◆ clone()

GEMCSCSegment* GEMCSCSegment::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 41 of file GEMCSCSegment.h.

41 { return new GEMCSCSegment(*this); }

References GEMCSCSegment().

◆ cscDetId()

CSCDetId GEMCSCSegment::cscDetId ( ) const
inline

Definition at line 73 of file GEMCSCSegment.h.

73 { return geographicalId(); }

References TrackingRecHit::geographicalId().

◆ cscRecHits()

const std::vector<CSCRecHit2D>& GEMCSCSegment::cscRecHits ( ) const
inline

Definition at line 69 of file GEMCSCSegment.h.

69 { return theCSCSegment.specificRecHits(); }

References CSCSegment::specificRecHits(), and theCSCSegment.

◆ cscSegment()

const CSCSegment GEMCSCSegment::cscSegment ( ) const
inline

Definition at line 67 of file GEMCSCSegment.h.

67 { return theCSCSegment; }

References theCSCSegment.

◆ degreesOfFreedom()

int GEMCSCSegment::degreesOfFreedom ( ) const
inlineoverridevirtual

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 62 of file GEMCSCSegment.h.

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

References nRecHits().

Referenced by operator<<().

◆ dimension()

int GEMCSCSegment::dimension ( ) const
inlineoverridevirtual

Dimension (in parameter space)

Implements RecSegment.

Definition at line 60 of file GEMCSCSegment.h.

60 { return 4; }

◆ gemRecHits()

const std::vector<GEMRecHit>& GEMCSCSegment::gemRecHits ( ) const
inline

Definition at line 68 of file GEMCSCSegment.h.

68 { return theGEMRecHits; }

References theGEMRecHits.

◆ localDirection()

LocalVector GEMCSCSegment::localDirection ( ) const
inlineoverridevirtual

Local direction.

Implements RecSegment.

Definition at line 46 of file GEMCSCSegment.h.

46 { return theLocalDirection; }

References theLocalDirection.

Referenced by operator<<().

◆ localDirectionError()

LocalError GEMCSCSegment::localDirectionError ( ) const
overridevirtual

Error on the local direction.

Implements RecSegment.

Definition at line 87 of file GEMCSCSegment.cc.

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

References theCovMatrix.

Referenced by operator<<().

◆ localPosition()

LocalPoint GEMCSCSegment::localPosition ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 43 of file GEMCSCSegment.h.

43 { return theOrigin; }

References theOrigin.

Referenced by operator<<().

◆ localPositionError()

LocalError GEMCSCSegment::localPositionError ( ) const
overridevirtual

Implements TrackingRecHit.

Definition at line 83 of file GEMCSCSegment.cc.

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

References theCovMatrix.

Referenced by operator<<().

◆ nRecHits()

int GEMCSCSegment::nRecHits ( ) const
inline

Definition at line 64 of file GEMCSCSegment.h.

64 { return (theGEMRecHits.size() + theCSCSegment.specificRecHits().size()); }

References CSCSegment::specificRecHits(), theCSCSegment, and theGEMRecHits.

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

◆ parameters()

AlgebraicVector GEMCSCSegment::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 GEMCSCSegment.cc.

91  {
92  // For consistency with DT, 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  if (theLocalDirection.z() != 0) {
99  }
100  result[2] = theOrigin.x();
101  result[3] = theOrigin.y();
102  return result;
103 }

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

◆ parametersError()

AlgebraicSymMatrix GEMCSCSegment::parametersError ( ) const
inlineoverridevirtual

Covariance matrix of parameters()

Implements TrackingRecHit.

Definition at line 53 of file GEMCSCSegment.h.

53 { return theCovMatrix; }

References theCovMatrix.

◆ print()

void GEMCSCSegment::print ( ) const

◆ projectionMatrix()

AlgebraicMatrix GEMCSCSegment::projectionMatrix ( ) const
overridevirtual

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

Implements TrackingRecHit.

Definition at line 105 of file GEMCSCSegment.cc.

105  {
107  return (theProjectionMatrix.getMatrix());
108 }

References theProjectionMatrix.

◆ recHits() [1/2]

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

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 62 of file GEMCSCSegment.cc.

62  {
63  std::vector<const TrackingRecHit*> pointersOfRecHits;
64  for (std::vector<GEMRecHit>::const_iterator irh = theGEMRecHits.begin(); irh != theGEMRecHits.end(); ++irh) {
65  pointersOfRecHits.push_back(&(*irh));
66  }
67  for (std::vector<CSCRecHit2D>::const_iterator irh = theCSCSegment.specificRecHits().begin();
68  irh != theCSCSegment.specificRecHits().end();
69  ++irh) {
70  pointersOfRecHits.push_back(&(*irh));
71  }
72  return pointersOfRecHits;
73 }

References CSCSegment::specificRecHits(), theCSCSegment, and theGEMRecHits.

◆ recHits() [2/2]

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

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 75 of file GEMCSCSegment.cc.

75  {
76  std::vector<TrackingRecHit*> pointersOfRecHits;
77  for (std::vector<GEMRecHit>::iterator irh = theGEMRecHits.begin(); irh != theGEMRecHits.end(); ++irh) {
78  pointersOfRecHits.push_back(&(*irh));
79  }
80  return pointersOfRecHits;
81 }

References theGEMRecHits.

Member Data Documentation

◆ theChi2

double GEMCSCSegment::theChi2
private

Definition at line 87 of file GEMCSCSegment.h.

Referenced by chi2().

◆ theCovMatrix

AlgebraicSymMatrix GEMCSCSegment::theCovMatrix
private

Definition at line 86 of file GEMCSCSegment.h.

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

◆ theCSCSegment

CSCSegment GEMCSCSegment::theCSCSegment
private

Definition at line 79 of file GEMCSCSegment.h.

Referenced by cscRecHits(), cscSegment(), GEMCSCSegment(), nRecHits(), and recHits().

◆ theGEMRecHits

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

Definition at line 78 of file GEMCSCSegment.h.

Referenced by GEMCSCSegment(), gemRecHits(), nRecHits(), and recHits().

◆ theLocalDirection

LocalVector GEMCSCSegment::theLocalDirection
private

Definition at line 85 of file GEMCSCSegment.h.

Referenced by localDirection(), and parameters().

◆ theOrigin

LocalPoint GEMCSCSegment::theOrigin
private

Definition at line 84 of file GEMCSCSegment.h.

Referenced by localPosition(), and parameters().

CSCSegment::specificRecHits
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:66
RecSegment::RecSegment
RecSegment(DetId id)
Definition: RecSegment.h:29
mps_fire.i
i
Definition: mps_fire.py:428
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
GEMCSCSegment::chi2
double chi2() const override
Chi2 of the segment fit.
Definition: GEMCSCSegment.h:58
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
ProjectionMatrixDiag
Definition: GEMCSCSegment.cc:16
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
errors
Definition: errors.py:1
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
GEMCSCSegment::nRecHits
int nRecHits() const
Definition: GEMCSCSegment.h:64
GEMCSCSegment::theLocalDirection
LocalVector theLocalDirection
Definition: GEMCSCSegment.h:85
LocalError
Definition: LocalError.h:12
GEMCSCSegment::theGEMRecHits
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:78
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
GEMCSCSegment::theOrigin
LocalPoint theOrigin
Definition: GEMCSCSegment.h:84
GEMCSCSegment::theCSCSegment
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:79
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
theProjectionMatrix
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
CSCSegment::cscDetId
CSCDetId cscDetId() const
Definition: CSCSegment.h:70
mps_fire.result
result
Definition: mps_fire.py:311
GEMCSCSegment::GEMCSCSegment
GEMCSCSegment()
Default constructor.
Definition: GEMCSCSegment.h:27
GEMCSCSegment::theChi2
double theChi2
Definition: GEMCSCSegment.h:87
GEMCSCSegment::theCovMatrix
AlgebraicSymMatrix theCovMatrix
Definition: GEMCSCSegment.h:86