CMS 3D CMS Logo

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

Public Member Functions

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

Definition at line 16 of file SiTrackerMultiRecHit.h.

Constructor & Destructor Documentation

SiTrackerMultiRecHit::SiTrackerMultiRecHit ( )
inline

Definition at line 17 of file SiTrackerMultiRecHit.h.

Referenced by clone().

17  :
18  theHits(),
19  theWeights(),
20  annealing_(0){}
edm::OwnVector< TrackingRecHit > theHits
std::vector< float > theWeights
virtual SiTrackerMultiRecHit::~SiTrackerMultiRecHit ( )
inlinevirtual

Definition at line 21 of file SiTrackerMultiRecHit.h.

21 {}
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 7 of file SiTrackerMultiRecHit.cc.

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

8  :
10 {
11  for(std::vector<std::pair<const TrackingRecHit*, float> >::const_iterator ihit = aHitMap.begin(); ihit != aHitMap.end(); ihit++){
12  theHits.push_back(ihit->first->clone());
13  theWeights.push_back(ihit->second);
14  }
15  annealing_ = annealing;
16 }
edm::OwnVector< TrackingRecHit > theHits
void push_back(D *&d)
Definition: OwnVector.h:290
std::vector< float > theWeights

Member Function Documentation

virtual SiTrackerMultiRecHit* SiTrackerMultiRecHit::clone ( void  ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 27 of file SiTrackerMultiRecHit.h.

References SiTrackerMultiRecHit().

27 {return new SiTrackerMultiRecHit(*this);}
int SiTrackerMultiRecHit::dimension ( ) const
virtual

Implements BaseTrackerRecHit.

Definition at line 69 of file SiTrackerMultiRecHit.cc.

References theHits.

Referenced by getKfComponents().

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 ){ return 1; }
73  else if(theHits[randomComponent].dimension() == 2 ){ return 2; }
74  else { return 0; }
75 }
edm::OwnVector< TrackingRecHit > theHits
virtual int dimension() const
virtual OmniClusterRef const& SiTrackerMultiRecHit::firstClusterRef ( ) const
inlinevirtual

Implements BaseTrackerRecHit.

Definition at line 38 of file SiTrackerMultiRecHit.h.

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

Referenced by firstClusterRef().

38 { return static_cast<BaseTrackerRecHit const *>(&theHits.front())->firstClusterRef();}
edm::OwnVector< TrackingRecHit > theHits
virtual OmniClusterRef const & firstClusterRef() const
reference front()
Definition: OwnVector.h:429
virtual double SiTrackerMultiRecHit::getAnnealingFactor ( ) const
inlinevirtual

Definition at line 55 of file SiTrackerMultiRecHit.h.

References annealing_.

Referenced by TrajAnnealing::getAnnealingWeight().

55 { return annealing_; }
void SiTrackerMultiRecHit::getKfComponents ( KfComponentsHolder holder) const
virtual

Implements BaseTrackerRecHit.

Definition at line 77 of file SiTrackerMultiRecHit.cc.

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

77  {
78  if (dimension() == 1) getKfComponents1D(holder);
79  if (dimension() == 2) getKfComponents2D(holder);
80 }
virtual int dimension() const
void getKfComponents2D(KfComponentsHolder &holder) const
void getKfComponents1D(KfComponentsHolder &holder) const
vector< const TrackingRecHit * > SiTrackerMultiRecHit::recHits ( void  ) const
virtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 56 of file SiTrackerMultiRecHit.cc.

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

Referenced by TrajAnnealing::TrajAnnealing().

56  {
57  vector<const TrackingRecHit*> myhits;
59  myhits.push_back(&*ihit);
60  }
61  return myhits;
62 }
edm::OwnVector< TrackingRecHit > theHits
iterator begin()
Definition: OwnVector.h:244
iterator end()
Definition: OwnVector.h:249
vector< TrackingRecHit * > SiTrackerMultiRecHit::recHits ( void  )
virtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 64 of file SiTrackerMultiRecHit.cc.

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

64  {
65  return theHits.data();
66 }
edm::OwnVector< TrackingRecHit > theHits
base const & data() const
Definition: OwnVector.h:446
bool SiTrackerMultiRecHit::sharesInput ( const TrackingRecHit other,
SharedInputType  what 
) const
virtual

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 19 of file SiTrackerMultiRecHit.cc.

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

21 {
22  if(geographicalId() != other->geographicalId()&& what==all ) return false;
23  vector<const TrackingRecHit*> otherhits=other->recHits();
24  if(what==all){
25  if(theHits.size()!=other->recHits().size())return false;
26  for(vector<const TrackingRecHit*>::iterator otherhit=otherhits.begin();otherhit!=otherhits.end();++otherhit){
27  bool found=false;
29  if((hit)->sharesInput(*otherhit,all)){
30  found=true;
31  break;
32  }
33  }
34  if(found==false){
35  return false;
36  }
37  }
38  return true;
39  }
40  else{
42  if(otherhits.size()!=0){
43  for(vector<const TrackingRecHit*>::iterator otherhit=otherhits.begin();otherhit!=otherhits.end();++otherhit){
44  if((hit)->sharesInput(*otherhit,some))return true;
45  }
46  }
47  else{//otherwise it should be a single rechit
48  if((hit)->sharesInput(other,some))return true;
49  }
50  }
51  return false;
52  }
53 }
size_type size() const
Definition: OwnVector.h:264
BaseTrackerRecHit const * hit() const final
edm::OwnVector< TrackingRecHit > theHits
iterator begin()
Definition: OwnVector.h:244
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
iterator end()
Definition: OwnVector.h:249
DetId geographicalId() const
float SiTrackerMultiRecHit::weight ( unsigned int  i) const
inline

Definition at line 51 of file SiTrackerMultiRecHit.h.

References i, and theWeights.

Referenced by TrajAnnealing::TrajAnnealing().

51 {return theWeights[i];}
int i
Definition: DBlmapReader.cc:9
std::vector< float > theWeights
float& SiTrackerMultiRecHit::weight ( unsigned int  i)
inline

Definition at line 52 of file SiTrackerMultiRecHit.h.

References i, and theWeights.

52 {return theWeights[i];}
int i
Definition: DBlmapReader.cc:9
std::vector< float > theWeights
std::vector<float> const& SiTrackerMultiRecHit::weights ( ) const
inline

Definition at line 47 of file SiTrackerMultiRecHit.h.

References theWeights.

Referenced by TrajAnnealing::getAnnealingWeight().

47 {return theWeights;}
std::vector< float > theWeights
std::vector<float>& SiTrackerMultiRecHit::weights ( )
inline

Definition at line 48 of file SiTrackerMultiRecHit.h.

References theWeights.

48 {return theWeights;}
std::vector< float > theWeights

Member Data Documentation

double SiTrackerMultiRecHit::annealing_
private

Definition at line 64 of file SiTrackerMultiRecHit.h.

Referenced by getAnnealingFactor(), and SiTrackerMultiRecHit().

edm::OwnVector<TrackingRecHit> SiTrackerMultiRecHit::theHits
private
std::vector<float> SiTrackerMultiRecHit::theWeights
private

Definition at line 63 of file SiTrackerMultiRecHit.h.

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