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 26 of file GEMCSCSegment.h.

Constructor & Destructor Documentation

◆ GEMCSCSegment() [1/2]

GEMCSCSegment::GEMCSCSegment ( )
inline

Default constructor.

Definition at line 29 of file GEMCSCSegment.h.

29 : 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 30 of file GEMCSCSegment.cc.

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

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

◆ ~GEMCSCSegment()

GEMCSCSegment::~GEMCSCSegment ( )
override

Destructor.

Definition at line 59 of file GEMCSCSegment.cc.

59 {}

Member Function Documentation

◆ chi2()

double GEMCSCSegment::chi2 ( ) const
inlineoverridevirtual

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 60 of file GEMCSCSegment.h.

60 { return theChi2; };

References theChi2.

Referenced by operator<<().

◆ clone()

GEMCSCSegment* GEMCSCSegment::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 43 of file GEMCSCSegment.h.

43 { return new GEMCSCSegment(*this); }

References GEMCSCSegment().

◆ cscDetId()

CSCDetId GEMCSCSegment::cscDetId ( ) const
inline

Definition at line 81 of file GEMCSCSegment.h.

81 { return geographicalId(); }

References TrackingRecHit::geographicalId().

◆ cscRecHits()

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

Definition at line 77 of file GEMCSCSegment.h.

77 { return theCSCSegment.specificRecHits(); }

References CSCSegment::specificRecHits(), and theCSCSegment.

◆ cscSegment()

const CSCSegment GEMCSCSegment::cscSegment ( ) const
inline

Definition at line 75 of file GEMCSCSegment.h.

75 { return theCSCSegment; }

References theCSCSegment.

◆ degreesOfFreedom()

int GEMCSCSegment::degreesOfFreedom ( ) const
inlineoverridevirtual

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 64 of file GEMCSCSegment.h.

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

References nRecHits().

Referenced by operator<<().

◆ dimension()

int GEMCSCSegment::dimension ( ) const
inlineoverridevirtual

Dimension (in parameter space)

Implements RecSegment.

Definition at line 62 of file GEMCSCSegment.h.

62 { return 4; }

◆ gemRecHits()

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

Definition at line 76 of file GEMCSCSegment.h.

76 { return theGEMRecHits; }

References theGEMRecHits.

◆ localDirection()

LocalVector GEMCSCSegment::localDirection ( ) const
inlineoverridevirtual

Local direction.

Implements RecSegment.

Definition at line 48 of file GEMCSCSegment.h.

48 { return theLocalDirection; }

References theLocalDirection.

Referenced by operator<<().

◆ localDirectionError()

LocalError GEMCSCSegment::localDirectionError ( ) const
overridevirtual

Error on the local direction.

Implements RecSegment.

Definition at line 86 of file GEMCSCSegment.cc.

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

References theCovMatrix.

Referenced by operator<<().

◆ localPosition()

LocalPoint GEMCSCSegment::localPosition ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 45 of file GEMCSCSegment.h.

45 { return theOrigin; }

References theOrigin.

Referenced by operator<<().

◆ localPositionError()

LocalError GEMCSCSegment::localPositionError ( ) const
overridevirtual

Implements TrackingRecHit.

Definition at line 82 of file GEMCSCSegment.cc.

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

References theCovMatrix.

Referenced by operator<<().

◆ nRecHits()

int GEMCSCSegment::nRecHits ( ) const
inline

Definition at line 66 of file GEMCSCSegment.h.

66  {
67  return (theGEMRecHits.size() + theCSCSegment.specificRecHits().size());
68  edm::LogVerbatim("GEMCSCSegment") << "[GEMCSCSegment :: nRecHits] CSC RecHits: "
69  << theCSCSegment.specificRecHits().size()
70  << " + GEM RecHits: " << theGEMRecHits.size() << " = "
71  << (theGEMRecHits.size() + theCSCSegment.specificRecHits().size());
72  }

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 90 of file GEMCSCSegment.cc.

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

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 55 of file GEMCSCSegment.h.

55 { 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 104 of file GEMCSCSegment.cc.

104  {
106  return (theProjectionMatrix.getMatrix());
107 }

References theProjectionMatrix.

◆ recHits() [1/2]

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

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 61 of file GEMCSCSegment.cc.

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

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 74 of file GEMCSCSegment.cc.

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

References theGEMRecHits.

Member Data Documentation

◆ theChi2

double GEMCSCSegment::theChi2
private

Definition at line 95 of file GEMCSCSegment.h.

Referenced by chi2().

◆ theCovMatrix

AlgebraicSymMatrix GEMCSCSegment::theCovMatrix
private

Definition at line 94 of file GEMCSCSegment.h.

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

◆ theCSCSegment

CSCSegment GEMCSCSegment::theCSCSegment
private

Definition at line 87 of file GEMCSCSegment.h.

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

◆ theGEMRecHits

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

Definition at line 86 of file GEMCSCSegment.h.

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

◆ theLocalDirection

LocalVector GEMCSCSegment::theLocalDirection
private

Definition at line 93 of file GEMCSCSegment.h.

Referenced by localDirection(), and parameters().

◆ theOrigin

LocalPoint GEMCSCSegment::theOrigin
private

Definition at line 92 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:355
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
GEMCSCSegment::chi2
double chi2() const override
Chi2 of the segment fit.
Definition: GEMCSCSegment.h:60
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
ProjectionMatrixDiag
Definition: GEMCSCSegment.cc:15
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:66
GEMCSCSegment::theLocalDirection
LocalVector theLocalDirection
Definition: GEMCSCSegment.h:93
LocalError
Definition: LocalError.h:12
GEMCSCSegment::theGEMRecHits
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:86
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
edm::LogVerbatim
Definition: MessageLogger.h:297
GEMCSCSegment::theOrigin
LocalPoint theOrigin
Definition: GEMCSCSegment.h:92
GEMCSCSegment::theCSCSegment
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:87
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:303
GEMCSCSegment::GEMCSCSegment
GEMCSCSegment()
Default constructor.
Definition: GEMCSCSegment.h:29
GEMCSCSegment::theChi2
double theChi2
Definition: GEMCSCSegment.h:95
GEMCSCSegment::theCovMatrix
AlgebraicSymMatrix theCovMatrix
Definition: GEMCSCSegment.h:94