CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
FastTrackerRecHit Class Reference

#include <FastTrackerRecHit.h>

Inheritance diagram for FastTrackerRecHit:
BaseTrackerRecHit TrackingRecHit FastMatchedTrackerRecHit FastProjectedTrackerRecHit FastSingleTrackerRecHit

Public Member Functions

bool canImproveWithTrack () const override
 
FastTrackerRecHitclone () const override
 
int dimension () const override
 get the dimensions right More...
 
float energyLoss () const
 
virtual int32_t eventId (size_t i=0) const
 
 FastTrackerRecHit ()
 
 FastTrackerRecHit (const LocalPoint &p, const LocalError &e, GeomDet const &idet, fastTrackerRecHitType::HitType hitType)
 
OmniClusterRef const & firstClusterRef () const override
 
void getKfComponents (KfComponentsHolder &holder) const override
 
virtual int32_t id (size_t i=0) const
 
bool isPixel () const override
 pixel or strip? More...
 
virtual size_t nIds () const
 
virtual size_t nSimTrackIds () const
 
virtual int32_t recHitCombinationIndex () const
 
std::vector< const TrackingRecHit * > recHits () const override
 
std::vector< TrackingRecHit * > recHits () override
 
bool sameId (const FastTrackerRecHit *other, size_t i=0, size_t j=0) const
 
void set2D (bool is2D=true)
 
void setEnergyLoss (float e)
 
virtual void setEventId (int32_t eventId)
 
virtual void setRecHitCombinationIndex (int32_t recHitCombinationIndex)
 
bool sharesInput (const TrackingRecHit *other, SharedInputType what) const override
 
virtual int32_t simTrackEventId (size_t i) const
 
virtual int32_t simTrackId (size_t i) const
 
 ~FastTrackerRecHit () override
 
- 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
 
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 isPhase2 () const
 
bool isProjected () const
 
bool isProjMono () const
 
bool isProjStereo () const
 
bool isSingle () const
 
LocalPoint localPosition () const final
 
LocalError localPositionError () const final
 
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
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 ()
 

Protected Member Functions

FastTrackerRecHitclone_ (TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
 
void load ()
 helps making the hit postion and error persistent More...
 
void store ()
 helps making the hit postion and error persistent More...
 
- Protected Member Functions inherited from TrackingRecHit
void setId (id_type iid)
 
void setRTTI (unsigned int rt)
 
void setType (Type ttype)
 

Protected Attributes

float energyLoss_
 
bool is2D_
 hit is either one dimensional (is2D_ = false) or two dimensions (is2D_ = true) More...
 
const bool isPixel_
 hit is either on pixel modul (isPixel_ = true) or strip module (isPixel_ = false) More...
 
LocalError myErr_
 helps making the hit postion and error persistent More...
 
LocalPoint myPos_
 helps making the hit postion and error persistent More...
 
uint32_t recHitCombinationIndex_
 
- Protected Attributes inherited from BaseTrackerRecHit
LocalError err_
 
LocalPoint pos_
 
unsigned int qualWord_
 

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
 

Detailed Description

Definition at line 36 of file FastTrackerRecHit.h.

Constructor & Destructor Documentation

FastTrackerRecHit::FastTrackerRecHit ( )
inline

default constructor

Definition at line 42 of file FastTrackerRecHit.h.

44  , isPixel_(false)
45  , is2D_(true)
47  {}
const bool isPixel_
hit is either on pixel modul (isPixel_ = true) or strip module (isPixel_ = false) ...
uint32_t recHitCombinationIndex_
bool is2D_
hit is either one dimensional (is2D_ = false) or two dimensions (is2D_ = true)
FastTrackerRecHit::~FastTrackerRecHit ( )
inlineoverride

destructor

Definition at line 51 of file FastTrackerRecHit.h.

51 {}
FastTrackerRecHit::FastTrackerRecHit ( const LocalPoint p,
const LocalError e,
GeomDet const &  idet,
fastTrackerRecHitType::HitType  hitType 
)
inline

constructor requires a position with error in local detector coordinates, the detector id, and type information (rt)

Definition at line 56 of file FastTrackerRecHit.h.

61  , energyLoss_(0.0) //holy golden seal
62  {store();}
trackerHitRTTI::RTTI rtti(HitType hitType)
const bool isPixel_
hit is either on pixel modul (isPixel_ = true) or strip module (isPixel_ = false) ...
uint32_t recHitCombinationIndex_
void store()
helps making the hit postion and error persistent
bool is2D(HitType hitType)
bool isPixel(HitType hitType)
bool is2D_
hit is either one dimensional (is2D_ = false) or two dimensions (is2D_ = true)

Member Function Documentation

bool FastTrackerRecHit::canImproveWithTrack ( ) const
inlineoverridevirtual

Steers behaviour of hit in track fit. FastSim hit smearing assumes

Reimplemented from TrackingRecHit.

Definition at line 79 of file FastTrackerRecHit.h.

79 {return false;}
FastTrackerRecHit* FastTrackerRecHit::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 64 of file FastTrackerRecHit.h.

References load(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by FastTrackerRecHitSplitter::split(), and FastTSGFromPropagation::trackerSeeds().

64 {FastTrackerRecHit * p = new FastTrackerRecHit( * this); p->load(); return p;}
void load()
helps making the hit postion and error persistent
FastTrackerRecHit* FastTrackerRecHit::clone_ ( TkCloner const &  cloner,
TrajectoryStateOnSurface const &  tsos 
) const
inlineoverrideprotectedvirtual

Reimplemented from TrackingRecHit.

Definition at line 181 of file FastTrackerRecHit.h.

References clone().

181  {
182  return this->clone();
183  }
FastTrackerRecHit * clone() const override
int FastTrackerRecHit::dimension ( ) const
inlineoverridevirtual

get the dimensions right

Steers behaviour of hit in track fit. Hit is interpreted as 1D or 2D depending on value of is2D_

Implements BaseTrackerRecHit.

Definition at line 75 of file FastTrackerRecHit.h.

Referenced by FastTrackerRecHitSplitter::split().

float FastTrackerRecHit::energyLoss ( ) const
inline

Steers behaviour of hit in track fit. Hit is interpreted as 1D or 2D depending on value of is2D_

Definition at line 69 of file FastTrackerRecHit.h.

Referenced by FastTrackDeDxProducer::processHit().

69 { return energyLoss_;}// holy golden seal
virtual int32_t FastTrackerRecHit::eventId ( size_t  i = 0) const
inlinevirtual

Reimplemented in FastMatchedTrackerRecHit, FastProjectedTrackerRecHit, and FastSingleTrackerRecHit.

Definition at line 85 of file FastTrackerRecHit.h.

Referenced by ntupleDataFormat.Event::eventIdStr(), and sameId().

85 { return -1;}
OmniClusterRef const & FastTrackerRecHit::firstClusterRef ( ) const
overridevirtual

bogus function : implement purely virutal function of BaseTrackerRecHit

Implements BaseTrackerRecHit.

Definition at line 8 of file FastTrackerRecHit.cc.

8 { return nullRef;}
void FastTrackerRecHit::getKfComponents ( KfComponentsHolder holder) const
inlineoverridevirtual

Implements BaseTrackerRecHit.

Definition at line 71 of file FastTrackerRecHit.h.

71 { if(is2D_) getKfComponents2D(holder); else getKfComponents1D(holder);}
void getKfComponents2D(KfComponentsHolder &holder) const
void getKfComponents1D(KfComponentsHolder &holder) const
bool is2D_
hit is either one dimensional (is2D_ = false) or two dimensions (is2D_ = true)
virtual int32_t FastTrackerRecHit::id ( size_t  i = 0) const
inlinevirtual
bool FastTrackerRecHit::isPixel ( ) const
inlineoverridevirtual

pixel or strip?

Reimplemented from BaseTrackerRecHit.

Definition at line 93 of file FastTrackerRecHit.h.

Referenced by FastTrackDeDxProducer::processHit(), and FastTrackerRecHitSplitter::split().

void FastTrackerRecHit::load ( )
inlineprotected

helps making the hit postion and error persistent

Definition at line 174 of file FastTrackerRecHit.h.

Referenced by FastSingleTrackerRecHit::clone(), FastProjectedTrackerRecHit::clone(), FastMatchedTrackerRecHit::clone(), and clone().

virtual size_t FastTrackerRecHit::nIds ( ) const
inlinevirtual
virtual size_t FastTrackerRecHit::nSimTrackIds ( ) const
inlinevirtual
virtual int32_t FastTrackerRecHit::recHitCombinationIndex ( ) const
inlinevirtual

Definition at line 91 of file FastTrackerRecHit.h.

91 { return recHitCombinationIndex_;}
uint32_t recHitCombinationIndex_
std::vector<const TrackingRecHit*> FastTrackerRecHit::recHits ( void  ) const
inlineoverridevirtual

bogus function : implement purely virtual function of TrackingRecHit

Implements TrackingRecHit.

Definition at line 105 of file FastTrackerRecHit.h.

105 { return std::vector<TrackingRecHit const*>();}
std::vector<TrackingRecHit*> FastTrackerRecHit::recHits ( void  )
inlineoverridevirtual

bogus function : implement purely virtual function of TrackingRecHit

Implements TrackingRecHit.

Definition at line 109 of file FastTrackerRecHit.h.

109 { return std::vector<TrackingRecHit*>();}
bool FastTrackerRecHit::sameId ( const FastTrackerRecHit other,
size_t  i = 0,
size_t  j = 0 
) const
inline

fastsim's way to check whether 2 single hits share sim-information or not hits are considered to share sim-information if

  • they have the same hit id number
  • they have the same event id number

Definition at line 123 of file FastTrackerRecHit.h.

References eventId(), mps_fire::i, triggerObjects_cff::id, and id().

Referenced by TrackCandidateProducer::produce().

123 {return id(i) == other->id(j) && eventId(i) == other->eventId(j);}
virtual int32_t eventId(size_t i=0) const
virtual int32_t id(size_t i=0) const
void FastTrackerRecHit::set2D ( bool  is2D = true)
inline

Definition at line 99 of file FastTrackerRecHit.h.

References fastTrackerRecHitType::is2D().

Referenced by FastTrackerRecHitSplitter::buildSplitStripHit().

99 {is2D_ = is2D;}
bool is2D(HitType hitType)
bool is2D_
hit is either one dimensional (is2D_ = false) or two dimensions (is2D_ = true)
void FastTrackerRecHit::setEnergyLoss ( float  e)
inline

Definition at line 70 of file FastTrackerRecHit.h.

References MillePedeFileConverter_cfg::e.

70 { energyLoss_=e;}// holy golden seal was a virtual void...
virtual void FastTrackerRecHit::setEventId ( int32_t  eventId)
inlinevirtual

Reimplemented in FastMatchedTrackerRecHit, FastSingleTrackerRecHit, and FastProjectedTrackerRecHit.

Definition at line 97 of file FastTrackerRecHit.h.

Referenced by edm::detail::doTheOffset().

97 {};
virtual void FastTrackerRecHit::setRecHitCombinationIndex ( int32_t  recHitCombinationIndex)
inlinevirtual
bool FastTrackerRecHit::sharesInput ( const TrackingRecHit other,
SharedInputType  what 
) const
inlineoverridevirtual

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 124 of file FastTrackerRecHit.h.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), trackerHitRTTI::isFast(), nIds(), and trackingPlots::other.

124  {
125 
126  // cast other hit
127  if(!trackerHitRTTI::isFast(*other) )
128  return false;
129  const FastTrackerRecHit * otherCast = static_cast<const FastTrackerRecHit *>(other);
130 
131  // checks
132  if(this->nIds() == 1){ // this hit is single/projected
133  if(otherCast->nIds() == 1){ // other hit is single/projected
134  return this->sameId(otherCast,0,0);
135  }
136  else { // other hit is matched
137  if(what == all){
138  return false;
139  }
140  else {
141  return(this->sameId(otherCast,0,0) || this->sameId(otherCast,0,1));
142  }
143  }
144  }
145  else{ // this hit is matched
146  if(otherCast->nIds() == 1){ // other hit is single/projected
147  if (what == all){
148  return false;
149  }
150  else{
151  return(this->sameId(otherCast,0,0) || this->sameId(otherCast,1,0));
152  }
153  }
154  else{ // other hit is matched
155  if(what == all){
156  return(this->sameId(otherCast,0,0) && this->sameId(otherCast,1,1));
157  }
158  else {
159  return(this->sameId(otherCast,0,0) || this->sameId(otherCast,1,1));
160  }
161  }
162  }
163  }
virtual size_t nIds() const
bool sameId(const FastTrackerRecHit *other, size_t i=0, size_t j=0) const
bool isFast(TrackingRecHit const &hit)
virtual int32_t FastTrackerRecHit::simTrackEventId ( size_t  i) const
inlinevirtual

Reimplemented in FastMatchedTrackerRecHit, FastProjectedTrackerRecHit, and FastSingleTrackerRecHit.

Definition at line 89 of file FastTrackerRecHit.h.

Referenced by TrackerHitAssociator::associateFastRecHit().

89 { return -1;}
virtual int32_t FastTrackerRecHit::simTrackId ( size_t  i) const
inlinevirtual
void FastTrackerRecHit::store ( )
inlineprotected

helps making the hit postion and error persistent

Definition at line 173 of file FastTrackerRecHit.h.

Member Data Documentation

float FastTrackerRecHit::energyLoss_
protected

Definition at line 177 of file FastTrackerRecHit.h.

bool FastTrackerRecHit::is2D_
protected

hit is either one dimensional (is2D_ = false) or two dimensions (is2D_ = true)

Definition at line 168 of file FastTrackerRecHit.h.

const bool FastTrackerRecHit::isPixel_
protected

hit is either on pixel modul (isPixel_ = true) or strip module (isPixel_ = false)

Definition at line 167 of file FastTrackerRecHit.h.

LocalError FastTrackerRecHit::myErr_
protected

helps making the hit postion and error persistent

Definition at line 171 of file FastTrackerRecHit.h.

LocalPoint FastTrackerRecHit::myPos_
protected

helps making the hit postion and error persistent

Definition at line 170 of file FastTrackerRecHit.h.

uint32_t FastTrackerRecHit::recHitCombinationIndex_
protected

Definition at line 176 of file FastTrackerRecHit.h.