CMS 3D CMS Logo

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

#include <SiTrackerMultiRecHit.h>

Inheritance diagram for SiTrackerMultiRecHit:
BaseTrackerRecHit TrackingRecHit

Public Types

typedef BaseTrackerRecHit Base
 
- 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
}
 

Public Member Functions

SiTrackerMultiRecHitclone () const override
 
int dimension () const override
 
OmniClusterRef const & firstClusterRef () const override
 
virtual double getAnnealingFactor () const
 
void getKfComponents (KfComponentsHolder &holder) const override
 
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...
 
bool sharesInput (const TrackingRecHit *other, SharedInputType what) const override
 
 SiTrackerMultiRecHit ()
 
 SiTrackerMultiRecHit (const LocalPoint &, const LocalError &, GeomDet const &idet, const std::vector< std::pair< const TrackingRecHit *, float > > &, double)
 
virtual float weight () const
 
float & weight (unsigned int i)
 
float weight (unsigned int i) const
 
std::vector< float > & weights ()
 
std::vector< float > const & weights () const
 
 ~SiTrackerMultiRecHit () override
 
- Public Member Functions inherited from BaseTrackerRecHit
 BaseTrackerRecHit ()
 
 BaseTrackerRecHit (const GeomDet &idet, trackerHitRTTI::RTTI rt)
 
 BaseTrackerRecHit (const LocalPoint &p, const LocalError &e, GeomDet const &idet, trackerHitRTTI::RTTI rt)
 
 BaseTrackerRecHit (DetId id, trackerHitRTTI::RTTI rt)
 
virtual float clusterProbability () const
 cluster probability, overloaded by pixel rechits. More...
 
float errorGlobalR () const final
 
float errorGlobalRPhi () const final
 
float errorGlobalZ () const final
 
void getKfComponents1D (KfComponentsHolder &holder) const
 
void getKfComponents2D (KfComponentsHolder &holder) const
 
GlobalPoint globalPosition () const final
 
GlobalError globalPositionError () const final
 
TrackingRecHitGlobalState globalState () const
 
bool hasPositionAndError () const override
 to be redefined by daughter class More...
 
BaseTrackerRecHit const * hit () const final
 
bool isMatched () const
 
bool isMulti () const
 
virtual bool isPhase2 () const
 
virtual bool isPixel () const
 
bool isProjected () const
 
bool isProjMono () const
 
bool isProjStereo () const
 
bool isSingle () const
 
LocalPoint localPosition () const override
 
LocalError localPositionError () const override
 
const LocalErrorlocalPositionErrorFast () const
 
const LocalPointlocalPositionFast () const
 
AlgebraicVector parameters () const override
 
AlgebraicSymMatrix parametersError () const override
 
AlgebraicMatrix projectionMatrix () const override
 
trackerHitRTTI::RTTI rtti () const
 
bool sameDetModule (TrackingRecHit const &hit) const
 
const Surfacesurface () const final
 
 ~BaseTrackerRecHit () override
 
- 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
 
DetId geographicalId () const
 
unsigned int getRTTI () const
 
Type getType () 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)
 
 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 annealing_
 
edm::OwnVector< TrackingRecHittheHits
 
std::vector< float > theWeights
 

Additional Inherited Members

- 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)
 
- Protected Attributes inherited from BaseTrackerRecHit
LocalError err_
 
LocalPoint pos_
 
unsigned int qualWord_
 

Detailed Description

Definition at line 13 of file SiTrackerMultiRecHit.h.

Member Typedef Documentation

◆ Base

Definition at line 15 of file SiTrackerMultiRecHit.h.

Constructor & Destructor Documentation

◆ SiTrackerMultiRecHit() [1/2]

SiTrackerMultiRecHit::SiTrackerMultiRecHit ( )
inline

Definition at line 16 of file SiTrackerMultiRecHit.h.

16 : theHits(), theWeights(), annealing_(0) {}

Referenced by clone().

◆ ~SiTrackerMultiRecHit()

SiTrackerMultiRecHit::~SiTrackerMultiRecHit ( )
inlineoverride

Definition at line 17 of file SiTrackerMultiRecHit.h.

17 {}

◆ SiTrackerMultiRecHit() [2/2]

SiTrackerMultiRecHit::SiTrackerMultiRecHit ( const LocalPoint pos,
const LocalError err,
GeomDet const &  idet,
const std::vector< std::pair< const TrackingRecHit *, float > > &  aHitMap,
double  annealing 
)

Definition at line 6 of file SiTrackerMultiRecHit.cc.

12  for (std::vector<std::pair<const TrackingRecHit*, float> >::const_iterator ihit = aHitMap.begin();
13  ihit != aHitMap.end();
14  ihit++) {
15  theHits.push_back(ihit->first->clone());
16  theWeights.push_back(ihit->second);
17  }
18  annealing_ = annealing;
19 }

References annealing_, edm::OwnVector< T, P >::push_back(), theHits, theWeights, and trackerHitRTTI::vector.

Member Function Documentation

◆ clone()

SiTrackerMultiRecHit* SiTrackerMultiRecHit::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 25 of file SiTrackerMultiRecHit.h.

25 { return new SiTrackerMultiRecHit(*this); }

References SiTrackerMultiRecHit().

◆ dimension()

int SiTrackerMultiRecHit::dimension ( ) const
overridevirtual

Implements BaseTrackerRecHit.

Definition at line 69 of file SiTrackerMultiRecHit.cc.

69  {
70  //supposing all the hits inside of a MRH have the same id == same type
71  int randomComponent = 0;
72  if (theHits[randomComponent].dimension() == 1) {
73  return 1;
74  } else if (theHits[randomComponent].dimension() == 2) {
75  return 2;
76  } else {
77  return 0;
78  }
79 }

References theHits.

Referenced by getKfComponents().

◆ firstClusterRef()

OmniClusterRef const& SiTrackerMultiRecHit::firstClusterRef ( ) const
inlineoverridevirtual

Implements BaseTrackerRecHit.

Definition at line 36 of file SiTrackerMultiRecHit.h.

36  {
37  return static_cast<BaseTrackerRecHit const&>(theHits.front()).firstClusterRef();
38  }

References edm::OwnVector< T, P >::front(), and theHits.

◆ getAnnealingFactor()

virtual double SiTrackerMultiRecHit::getAnnealingFactor ( ) const
inlinevirtual

Definition at line 56 of file SiTrackerMultiRecHit.h.

56 { return annealing_; }

References annealing_.

Referenced by MRHChi2MeasurementEstimator::estimate(), and TrajAnnealing::getAnnealingWeight().

◆ getKfComponents()

void SiTrackerMultiRecHit::getKfComponents ( KfComponentsHolder holder) const
overridevirtual

Implements BaseTrackerRecHit.

Definition at line 81 of file SiTrackerMultiRecHit.cc.

81  {
82  if (dimension() == 1)
83  getKfComponents1D(holder);
84  if (dimension() == 2)
85  getKfComponents2D(holder);
86 }

References dimension(), BaseTrackerRecHit::getKfComponents1D(), and BaseTrackerRecHit::getKfComponents2D().

◆ recHits() [1/2]

vector< const TrackingRecHit * > SiTrackerMultiRecHit::recHits ( void  ) const
overridevirtual

◆ recHits() [2/2]

vector< TrackingRecHit * > SiTrackerMultiRecHit::recHits ( void  )
overridevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 67 of file SiTrackerMultiRecHit.cc.

67 { return theHits.data(); }

References edm::OwnVector< T, P >::data(), and theHits.

◆ sharesInput()

bool SiTrackerMultiRecHit::sharesInput ( const TrackingRecHit other,
SharedInputType  what 
) const
overridevirtual

Returns true if the two TrackingRecHits are using the same input information (like Digis, Clusters, etc), false otherwise. The second argument specifies how much sharing is needed in order to return true: the value "all" means that all inputs of the two hits must be identical; the value "some" means that at least one of the inputs is in common.

Reimplemented from TrackingRecHit.

Definition at line 21 of file SiTrackerMultiRecHit.cc.

21  {
22  if (geographicalId() != other->geographicalId() && what == all)
23  return false;
24  vector<const TrackingRecHit*> otherhits = other->recHits();
25  if (what == all) {
26  if (theHits.size() != other->recHits().size())
27  return false;
28  for (vector<const TrackingRecHit*>::iterator otherhit = otherhits.begin(); otherhit != otherhits.end();
29  ++otherhit) {
30  bool found = false;
32  if ((hit)->sharesInput(*otherhit, all)) {
33  found = true;
34  break;
35  }
36  }
37  if (found == false) {
38  return false;
39  }
40  }
41  return true;
42  } else {
44  if (!otherhits.empty()) {
45  for (vector<const TrackingRecHit*>::iterator otherhit = otherhits.begin(); otherhit != otherhits.end();
46  ++otherhit) {
47  if ((hit)->sharesInput(*otherhit, some))
48  return true;
49  }
50  } else { //otherwise it should be a single rechit
51  if ((hit)->sharesInput(other, some))
52  return true;
53  }
54  }
55  return false;
56  }
57 }

References TrackingRecHit::all, edm::OwnVector< T, P >::begin(), edm::OwnVector< T, P >::end(), newFWLiteAna::found, TrackingRecHit::geographicalId(), BaseTrackerRecHit::hit(), trackingPlots::other, edm::OwnVector< T, P >::size(), TrackingRecHit::some, and theHits.

◆ weight() [1/3]

virtual float TrackingRecHit::weight
inline

Definition at line 137 of file TrackingRecHit.h.

137 { return 1.; }

◆ weight() [2/3]

float& SiTrackerMultiRecHit::weight ( unsigned int  i)
inline

Definition at line 53 of file SiTrackerMultiRecHit.h.

53 { return theWeights[i]; }

References mps_fire::i, and theWeights.

◆ weight() [3/3]

float SiTrackerMultiRecHit::weight ( unsigned int  i) const
inline

◆ weights() [1/2]

std::vector<float>& SiTrackerMultiRecHit::weights ( )
inline

Definition at line 48 of file SiTrackerMultiRecHit.h.

48 { return theWeights; }

References theWeights.

◆ weights() [2/2]

std::vector<float> const& SiTrackerMultiRecHit::weights ( ) const
inline

Member Data Documentation

◆ annealing_

double SiTrackerMultiRecHit::annealing_
private

Definition at line 63 of file SiTrackerMultiRecHit.h.

Referenced by getAnnealingFactor(), and SiTrackerMultiRecHit().

◆ theHits

edm::OwnVector<TrackingRecHit> SiTrackerMultiRecHit::theHits
private

◆ theWeights

std::vector<float> SiTrackerMultiRecHit::theWeights
private

Definition at line 62 of file SiTrackerMultiRecHit.h.

Referenced by SiTrackerMultiRecHit(), weight(), and weights().

mps_fire.i
i
Definition: mps_fire.py:428
SiTrackerMultiRecHit::annealing_
double annealing_
Definition: SiTrackerMultiRecHit.h:63
edm::OwnVector::end
iterator end()
Definition: OwnVector.h:285
BaseTrackerRecHit::hit
BaseTrackerRecHit const * hit() const final
Definition: BaseTrackerRecHit.h:20
pos
Definition: PixelAliasList.h:18
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
trackingPlots.other
other
Definition: trackingPlots.py:1467
TrackingRecHit::some
Definition: TrackingRecHit.h:59
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
edm::OwnVector::front
reference front()
Definition: OwnVector.h:459
TrackingRecHit::all
Definition: TrackingRecHit.h:59
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
trackerHitRTTI::multi
Definition: trackerHitRTTI.h:14
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
SiTrackerMultiRecHit::theHits
edm::OwnVector< TrackingRecHit > theHits
Definition: SiTrackerMultiRecHit.h:61
edm::OwnVector::data
base const & data() const
Definition: OwnVector.h:476
SiTrackerMultiRecHit::SiTrackerMultiRecHit
SiTrackerMultiRecHit()
Definition: SiTrackerMultiRecHit.h:16
edm::OwnVector::push_back
void push_back(D *&d)
Definition: OwnVector.h:326
SiTrackerMultiRecHit::theWeights
std::vector< float > theWeights
Definition: SiTrackerMultiRecHit.h:62
BaseTrackerRecHit::getKfComponents2D
void getKfComponents2D(KfComponentsHolder &holder) const
Definition: BaseTrackerRecHit.cc:53
SiTrackerMultiRecHit::firstClusterRef
OmniClusterRef const & firstClusterRef() const override
Definition: SiTrackerMultiRecHit.h:36
SiTrackerMultiRecHit::dimension
int dimension() const override
Definition: SiTrackerMultiRecHit.cc:69
BaseTrackerRecHit::BaseTrackerRecHit
BaseTrackerRecHit()
Definition: BaseTrackerRecHit.h:17
edm::OwnVector::begin
iterator begin()
Definition: OwnVector.h:280
edm::OwnVector::size
size_type size() const
Definition: OwnVector.h:300
hit
Definition: SiStripHitEffFromCalibTree.cc:88
BaseTrackerRecHit::getKfComponents1D
void getKfComponents1D(KfComponentsHolder &holder) const
Definition: BaseTrackerRecHit.cc:35
edm::OwnVector
Definition: OwnVector.h:24