CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 (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

double theChi2
 
AlgebraicSymMatrix theCovMatrix
 
CSCSegment theCSCSegment
 
std::vector< GEMRecHittheGEMRecHits
 
LocalVector theLocalDirection
 
LocalPoint theOrigin
 

Additional Inherited Members

- Public Types inherited from TrackingRecHit
typedef std::vector
< ConstRecHitPointer
ConstRecHitContainer
 
using ConstRecHitPointer = std::shared_ptr< TrackingRecHit const >
 
typedef unsigned int id_type
 
typedef std::vector
< ConstRecHitPointer
RecHitContainer
 
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::GEMCSCSegment ( )
inline

Default constructor.

Definition at line 27 of file GEMCSCSegment.h.

Referenced by clone().

27 : theChi2(0.) {}
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.

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

37  :
38 
39  RecSegment(buildDetId(csc_segment->cscDetId())),
40  theOrigin(origin),
41  theLocalDirection(direction),
42  theCovMatrix(errors),
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 }
Log< level::Info, true > LogVerbatim
LocalPoint theOrigin
Definition: GEMCSCSegment.h:84
CSCDetId cscDetId() const
Definition: CSCSegment.h:70
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:78
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:79
double chi2() const override
Chi2 of the segment fit.
Definition: GEMCSCSegment.h:58
AlgebraicSymMatrix theCovMatrix
Definition: GEMCSCSegment.h:86
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:66
LocalVector theLocalDirection
Definition: GEMCSCSegment.h:85
RecSegment(DetId id)
Definition: RecSegment.h:29
GEMCSCSegment::~GEMCSCSegment ( )
override

Destructor.

Definition at line 60 of file GEMCSCSegment.cc.

60 {}

Member Function Documentation

double GEMCSCSegment::chi2 ( ) const
inlineoverridevirtual

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 58 of file GEMCSCSegment.h.

References theChi2.

Referenced by GEMEffByGEMCSCSegmentSource::checkCoincidenceGE11(), and operator<<().

58 { return theChi2; };
GEMCSCSegment* GEMCSCSegment::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 41 of file GEMCSCSegment.h.

References GEMCSCSegment().

41 { return new GEMCSCSegment(*this); }
GEMCSCSegment()
Default constructor.
Definition: GEMCSCSegment.h:27
CSCDetId GEMCSCSegment::cscDetId ( ) const
inline
const std::vector<CSCRecHit2D>& GEMCSCSegment::cscRecHits ( ) const
inline

Definition at line 69 of file GEMCSCSegment.h.

References CSCSegment::specificRecHits(), and theCSCSegment.

Referenced by GEMEffByGEMCSCSegmentSource::checkCoincidenceGE11().

69 { return theCSCSegment.specificRecHits(); }
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:79
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:66
const CSCSegment GEMCSCSegment::cscSegment ( ) const
inline

Definition at line 67 of file GEMCSCSegment.h.

References theCSCSegment.

Referenced by GEMEffByGEMCSCSegmentSource::checkCoincidenceGE11().

67 { return theCSCSegment; }
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:79
int GEMCSCSegment::degreesOfFreedom ( ) const
inlineoverridevirtual

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 62 of file GEMCSCSegment.h.

References nRecHits().

Referenced by GEMEffByGEMCSCSegmentSource::checkCoincidenceGE11(), and operator<<().

62 { return 2 * nRecHits() - 4; }
int nRecHits() const
Definition: GEMCSCSegment.h:64
int GEMCSCSegment::dimension ( ) const
inlineoverridevirtual

Dimension (in parameter space)

Implements RecSegment.

Definition at line 60 of file GEMCSCSegment.h.

60 { return 4; }
const std::vector<GEMRecHit>& GEMCSCSegment::gemRecHits ( ) const
inline

Definition at line 68 of file GEMCSCSegment.h.

References theGEMRecHits.

Referenced by GEMEffByGEMCSCSegmentSource::analyzeME11GE11Segment().

68 { return theGEMRecHits; }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:78
LocalVector GEMCSCSegment::localDirection ( ) const
inlineoverridevirtual

Local direction.

Implements RecSegment.

Definition at line 46 of file GEMCSCSegment.h.

References theLocalDirection.

Referenced by operator<<().

46 { return theLocalDirection; }
LocalVector theLocalDirection
Definition: GEMCSCSegment.h:85
LocalError GEMCSCSegment::localDirectionError ( ) const
overridevirtual

Error on the local direction.

Implements RecSegment.

Definition at line 87 of file GEMCSCSegment.cc.

References theCovMatrix.

Referenced by operator<<().

87  {
88  return LocalError(theCovMatrix[0][0], theCovMatrix[0][1], theCovMatrix[1][1]);
89 }
AlgebraicSymMatrix theCovMatrix
Definition: GEMCSCSegment.h:86
LocalPoint GEMCSCSegment::localPosition ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 43 of file GEMCSCSegment.h.

References theOrigin.

Referenced by operator<<().

43 { return theOrigin; }
LocalPoint theOrigin
Definition: GEMCSCSegment.h:84
LocalError GEMCSCSegment::localPositionError ( ) const
overridevirtual

Implements TrackingRecHit.

Definition at line 83 of file GEMCSCSegment.cc.

References theCovMatrix.

Referenced by operator<<().

83  {
84  return LocalError(theCovMatrix[2][2], theCovMatrix[2][3], theCovMatrix[3][3]);
85 }
AlgebraicSymMatrix theCovMatrix
Definition: GEMCSCSegment.h:86
int GEMCSCSegment::nRecHits ( ) const
inline

Definition at line 64 of file GEMCSCSegment.h.

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

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

64 { return (theGEMRecHits.size() + theCSCSegment.specificRecHits().size()); }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:78
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:79
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:66
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.

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

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 }
LocalPoint theOrigin
Definition: GEMCSCSegment.h:84
T y() const
Definition: PV3DBase.h:60
tuple result
Definition: mps_fire.py:311
T z() const
Definition: PV3DBase.h:61
CLHEP::HepVector AlgebraicVector
LocalVector theLocalDirection
Definition: GEMCSCSegment.h:85
T x() const
Definition: PV3DBase.h:59
AlgebraicSymMatrix GEMCSCSegment::parametersError ( ) const
inlineoverridevirtual

Covariance matrix of parameters()

Implements TrackingRecHit.

Definition at line 53 of file GEMCSCSegment.h.

References theCovMatrix.

53 { return theCovMatrix; }
AlgebraicSymMatrix theCovMatrix
Definition: GEMCSCSegment.h:86
void GEMCSCSegment::print ( ) const
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.

References ProjectionMatrixDiag::getMatrix(), and theProjectionMatrix.

105  {
107  return (theProjectionMatrix.getMatrix());
108 }
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
const AlgebraicMatrix & getMatrix() const
std::vector< const TrackingRecHit * > GEMCSCSegment::recHits ( ) const
overridevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 62 of file GEMCSCSegment.cc.

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

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 }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:78
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:79
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:66
std::vector< TrackingRecHit * > GEMCSCSegment::recHits ( )
overridevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 75 of file GEMCSCSegment.cc.

References theGEMRecHits.

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 }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:78

Member Data Documentation

double GEMCSCSegment::theChi2
private

Definition at line 87 of file GEMCSCSegment.h.

Referenced by chi2().

AlgebraicSymMatrix GEMCSCSegment::theCovMatrix
private

Definition at line 86 of file GEMCSCSegment.h.

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

CSCSegment GEMCSCSegment::theCSCSegment
private

Definition at line 79 of file GEMCSCSegment.h.

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

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

Definition at line 78 of file GEMCSCSegment.h.

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

LocalVector GEMCSCSegment::theLocalDirection
private

Definition at line 85 of file GEMCSCSegment.h.

Referenced by localDirection(), and parameters().

LocalPoint GEMCSCSegment::theOrigin
private

Definition at line 84 of file GEMCSCSegment.h.

Referenced by localPosition(), and parameters().