test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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
 Chi2 of the segment fit. More...
 
GEMCSCSegmentclone () const
 
CSCDetId cscDetId () const
 
const std::vector< CSCRecHit2D > & cscRecHits () const
 
const CSCSegment cscSegment () const
 
virtual int degreesOfFreedom () const
 Degrees of freedom of the segment fit. More...
 
virtual int dimension () const
 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
 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...
 
virtual ~GEMCSCSegment ()
 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

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
}
 
- 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::GEMCSCSegment ( )
inline

Default constructor.

Definition at line 31 of file GEMCSCSegment.h.

Referenced by clone().

31 : 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 39 of file GEMCSCSegment.cc.

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

39  :
40 
41  RecSegment(buildDetId(csc_segment->cscDetId())),
42  theOrigin(origin),
44 
45  for(unsigned int i=0; i<gem_rhs.size(); ++i) {
46  theGEMRecHits.push_back((*gem_rhs[i]));
47  }
48  theCSCSegment = *csc_segment;
49  // LogDebug
50  edm::LogVerbatim("GEMCSCSegment")<< "[GEMCSCSegment :: ctor] CSCDetId: " << csc_segment->cscDetId() << " CSC RecHits: " <<csc_segment->specificRecHits().size()
51  << " GEM RecHits: " << gem_rhs.size()<<"\n" // << " Fit chi2: "<<chi2<<" Position: "<<origin<<" Direction: "<<direction
52  << " CSC Segment Details: \n"<<*csc_segment<<"\n"
53  << " GEMCSC Segment Details: \n"<<*this<<"\n"
54  << "[GEMCSCSegment :: ctor] ------------------------------------------------------------";
55 }
int i
Definition: DBlmapReader.cc:9
LocalPoint theOrigin
Definition: GEMCSCSegment.h:89
CSCDetId cscDetId() const
Definition: CSCSegment.h:69
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:83
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:84
AlgebraicSymMatrix theCovMatrix
Definition: GEMCSCSegment.h:91
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:65
LocalVector theLocalDirection
Definition: GEMCSCSegment.h:90
RecSegment(DetId id)
Definition: RecSegment.h:30
double chi2() const
Chi2 of the segment fit.
Definition: GEMCSCSegment.h:57
GEMCSCSegment::~GEMCSCSegment ( )
virtual

Destructor.

Definition at line 58 of file GEMCSCSegment.cc.

58 {}

Member Function Documentation

double GEMCSCSegment::chi2 ( ) const
inlinevirtual

Chi2 of the segment fit.

Implements RecSegment.

Definition at line 57 of file GEMCSCSegment.h.

References theChi2.

Referenced by operator<<().

57 { return theChi2; };
GEMCSCSegment* GEMCSCSegment::clone ( void  ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 40 of file GEMCSCSegment.h.

References GEMCSCSegment().

40 { return new GEMCSCSegment(*this); }
GEMCSCSegment()
Default constructor.
Definition: GEMCSCSegment.h:31
CSCDetId GEMCSCSegment::cscDetId ( ) const
inline

Definition at line 78 of file GEMCSCSegment.h.

References TrackingRecHit::geographicalId().

78 { return geographicalId(); }
DetId geographicalId() const
const std::vector<CSCRecHit2D>& GEMCSCSegment::cscRecHits ( ) const
inline

Definition at line 74 of file GEMCSCSegment.h.

References CSCSegment::specificRecHits(), and theCSCSegment.

74 { return theCSCSegment.specificRecHits(); }
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:84
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:65
const CSCSegment GEMCSCSegment::cscSegment ( ) const
inline

Definition at line 72 of file GEMCSCSegment.h.

References theCSCSegment.

72 { return theCSCSegment; }
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:84
virtual int GEMCSCSegment::degreesOfFreedom ( ) const
inlinevirtual

Degrees of freedom of the segment fit.

Implements RecSegment.

Definition at line 61 of file GEMCSCSegment.h.

References nRecHits().

Referenced by operator<<().

61 { return 2*nRecHits() - 4;}
int nRecHits() const
Definition: GEMCSCSegment.h:63
virtual int GEMCSCSegment::dimension ( ) const
inlinevirtual

Dimension (in parameter space)

Implements RecSegment.

Definition at line 59 of file GEMCSCSegment.h.

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

Definition at line 73 of file GEMCSCSegment.h.

References theGEMRecHits.

73 { return theGEMRecHits; }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:83
LocalVector GEMCSCSegment::localDirection ( ) const
inlinevirtual

Local direction.

Implements RecSegment.

Definition at line 45 of file GEMCSCSegment.h.

References theLocalDirection.

Referenced by operator<<().

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

Error on the local direction.

Implements RecSegment.

Definition at line 88 of file GEMCSCSegment.cc.

References theCovMatrix.

Referenced by operator<<().

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

Implements TrackingRecHit.

Definition at line 42 of file GEMCSCSegment.h.

References theOrigin.

Referenced by operator<<().

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

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:91
int GEMCSCSegment::nRecHits ( ) const
inline

Definition at line 63 of file GEMCSCSegment.h.

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

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

64  {
65  return (theGEMRecHits.size() + theCSCSegment.specificRecHits().size());
66  edm::LogVerbatim("GEMCSCSegment")<< "[GEMCSCSegment :: nRecHits] CSC RecHits: " <<theCSCSegment.specificRecHits().size()
67  << " + GEM RecHits: " << theGEMRecHits.size() << " = " <<(theGEMRecHits.size() + theCSCSegment.specificRecHits().size());
68  }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:83
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:84
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:65
AlgebraicVector GEMCSCSegment::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 93 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().

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

93  {
94  // For consistency with DT, CSC and what we require for the TrackingRecHit interface,
95  // the order of the parameters in the returned vector should be (dx/dz, dy/dz, x, z)
96 
98  if(theLocalDirection.z()!=0) {
101  }
102  result[2] = theOrigin.x();
103  result[3] = theOrigin.y();
104  return result;
105 }
LocalPoint theOrigin
Definition: GEMCSCSegment.h:89
T y() const
Definition: PV3DBase.h:63
tuple result
Definition: mps_fire.py:84
T z() const
Definition: PV3DBase.h:64
CLHEP::HepVector AlgebraicVector
LocalVector theLocalDirection
Definition: GEMCSCSegment.h:90
T x() const
Definition: PV3DBase.h:62
AlgebraicSymMatrix GEMCSCSegment::parametersError ( ) const
inlinevirtual

Covariance matrix of parameters()

Implements TrackingRecHit.

Definition at line 52 of file GEMCSCSegment.h.

References theCovMatrix.

52 { return theCovMatrix; }
AlgebraicSymMatrix theCovMatrix
Definition: GEMCSCSegment.h:91
void GEMCSCSegment::print ( ) const
AlgebraicMatrix GEMCSCSegment::projectionMatrix ( ) const
virtual

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

Implements TrackingRecHit.

Definition at line 107 of file GEMCSCSegment.cc.

References ProjectionMatrixDiag::getMatrix(), and theProjectionMatrix.

107  {
109  return (theProjectionMatrix.getMatrix());
110 }
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:80
const AlgebraicMatrix & getMatrix() const
std::vector< const TrackingRecHit * > GEMCSCSegment::recHits ( ) const
virtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 61 of file GEMCSCSegment.cc.

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

61  {
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(); irh!=theCSCSegment.specificRecHits().end(); ++irh) {
68  pointersOfRecHits.push_back(&(*irh));
69  }
70  return pointersOfRecHits;
71 }
std::vector< GEMRecHit > theGEMRecHits
Definition: GEMCSCSegment.h:83
CSCSegment theCSCSegment
Definition: GEMCSCSegment.h:84
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:65
std::vector< TrackingRecHit * > GEMCSCSegment::recHits ( )
virtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 73 of file GEMCSCSegment.cc.

References theGEMRecHits.

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

Member Data Documentation

double GEMCSCSegment::theChi2
private

Definition at line 92 of file GEMCSCSegment.h.

Referenced by chi2().

AlgebraicSymMatrix GEMCSCSegment::theCovMatrix
private

Definition at line 91 of file GEMCSCSegment.h.

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

CSCSegment GEMCSCSegment::theCSCSegment
private

Definition at line 84 of file GEMCSCSegment.h.

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

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

Definition at line 83 of file GEMCSCSegment.h.

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

LocalVector GEMCSCSegment::theLocalDirection
private

Definition at line 90 of file GEMCSCSegment.h.

Referenced by localDirection(), and parameters().

LocalPoint GEMCSCSegment::theOrigin
private

Definition at line 89 of file GEMCSCSegment.h.

Referenced by localPosition(), and parameters().