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
SiStripRecHit2D Class Reference

#include <SiStripRecHit2D.h>

Inheritance diagram for SiStripRecHit2D:
BaseSiTrackerRecHit2DLocalPos RecHit2DLocalPos TrackingRecHit

Public Types

typedef edm::Ref
< edmNew::DetSetVector
< SiStripCluster >
, SiStripCluster
ClusterRef
 
typedef edm::Ref
< edm::LazyGetter
< SiStripCluster >
, SiStripCluster,
edm::FindValue< SiStripCluster > > 
ClusterRegionalRef
 
- Public Types inherited from RecHit2DLocalPos
typedef Surface::LocalPoint LocalPoint
 
- Public Types inherited from TrackingRecHit
typedef unsigned int id_type
 
enum  SharedInputType { all, some }
 definition of equality via shared input More...
 
enum  Type { valid = 0, missing = 1, inactive = 2, bad = 3 }
 

Public Member Functions

virtual SiStripRecHit2Dclone () const
 
ClusterRef const & cluster () const
 
ClusterRegionalRef const & cluster_regional () const
 
void setClusterRef (ClusterRef const &ref)
 
void setClusterRegionalRef (ClusterRegionalRef const &ref)
 
void setSigmaPitch (double sigmap) const
 
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const
 
double sigmaPitch () const
 
 SiStripRecHit2D ()
 
 SiStripRecHit2D (const LocalPoint &, const LocalError &, const DetId &, ClusterRef const &cluster)
 
 SiStripRecHit2D (const LocalPoint &, const LocalError &, const DetId &, ClusterRegionalRef const &cluster)
 
 ~SiStripRecHit2D ()
 
- Public Member Functions inherited from BaseSiTrackerRecHit2DLocalPos
 BaseSiTrackerRecHit2DLocalPos ()
 
 BaseSiTrackerRecHit2DLocalPos (const LocalPoint &p, const LocalError &e, DetId id)
 
virtual void getKfComponents (KfComponentsHolder &holder) const
 
bool hasPositionAndError () const
 
virtual LocalPoint localPosition () const
 
virtual LocalError localPositionError () const
 
const LocalErrorlocalPositionErrorFast () const
 
const LocalPointlocalPositionFast () const
 
 ~BaseSiTrackerRecHit2DLocalPos ()
 
- Public Member Functions inherited from RecHit2DLocalPos
virtual int dimension () const
 
virtual AlgebraicVector parameters () const
 
virtual AlgebraicSymMatrix parametersError () const
 
virtual AlgebraicMatrix projectionMatrix () const
 
 RecHit2DLocalPos (DetId id)
 
 RecHit2DLocalPos (TrackingRecHit::id_type id=0)
 
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 ~RecHit2DLocalPos ()
 
- Public Member Functions inherited from TrackingRecHit
DetId geographicalId () const
 
Type getType () const
 
bool isValid () const
 
virtual void recHitsV (std::vector< const TrackingRecHit * > &) const
 
virtual void recHitsV (std::vector< TrackingRecHit * > &)
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 

Private Attributes

ClusterRef cluster_
 
ClusterRegionalRef clusterRegional_
 
double sigmaPitch_
 cache for the matcher.... More...
 

Additional Inherited Members

- Protected Member Functions inherited from TrackingRecHit
void setId (id_type iid)
 
void setType (Type ttype)
 

Detailed Description

Definition at line 10 of file SiStripRecHit2D.h.

Member Typedef Documentation

Definition at line 18 of file SiStripRecHit2D.h.

Definition at line 23 of file SiStripRecHit2D.h.

Constructor & Destructor Documentation

SiStripRecHit2D::SiStripRecHit2D ( )
inline

Definition at line 13 of file SiStripRecHit2D.h.

Referenced by clone().

14  sigmaPitch_(-1.){}
ClusterRegionalRef clusterRegional_
ClusterRef cluster_
double sigmaPitch_
cache for the matcher....
SiStripRecHit2D::~SiStripRecHit2D ( )
inline

Definition at line 16 of file SiStripRecHit2D.h.

16 {}
SiStripRecHit2D::SiStripRecHit2D ( const LocalPoint pos,
const LocalError err,
const DetId id,
ClusterRef const &  cluster 
)

Definition at line 7 of file SiStripRecHit2D.cc.

9  :
10 
11  BaseSiTrackerRecHit2DLocalPos(pos,err,id),
14  sigmaPitch_(-1.)
15  {}
ClusterRegionalRef clusterRegional_
ClusterRef const & cluster() const
ClusterRef cluster_
double sigmaPitch_
cache for the matcher....
SiStripRecHit2D::SiStripRecHit2D ( const LocalPoint pos,
const LocalError err,
const DetId id,
ClusterRegionalRef const &  cluster 
)

Definition at line 18 of file SiStripRecHit2D.cc.

20  :
21  BaseSiTrackerRecHit2DLocalPos(pos,err,id),
22  cluster_(),
24  sigmaPitch_(-1.) {}
ClusterRegionalRef clusterRegional_
ClusterRef const & cluster() const
ClusterRef cluster_
double sigmaPitch_
cache for the matcher....

Member Function Documentation

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

Implements RecHit2DLocalPos.

Definition at line 28 of file SiStripRecHit2D.h.

References SiStripRecHit2D().

28 {return new SiStripRecHit2D( * this); }
ClusterRef const& SiStripRecHit2D::cluster ( ) const
inline

Definition at line 32 of file SiStripRecHit2D.h.

References cluster_.

Referenced by fireworks::addSiStripClusters(), SiStripGainCosmicCalculator::algoAnalyze(), SiStripQualityHotStripIdentifier::algoAnalyze(), DeDxDiscriminatorLearner::algoAnalyze(), SiStripGainFromData::algoAnalyze(), AlignmentStats::analyze(), SiStripLAProfileBooker::analyze(), SiStripElectronAnalyzer::analyze(), SiStripRecHitsValid::analyze(), SiStripTrackingRecHitsValid::analyze(), TrackerHitAssociator::associateSimpleRecHit(), SimpleCosmicBONSeeder::checkCharge(), AlignmentTrackSelector::checkPrescaledHits(), reco::modules::TrackerTrackHitFilter::checkStoN(), ProjectedRecHit2D::clone(), TSiStripMatchedRecHit::clone(), TSiStripRecHit2DLocalPos::clone(), cms::clusterProduct(), helper::MuonCollectionStoreManager::clusterRefsOK(), helper::ClusterStorer::ClusterHitRecord< SiStripRecHit2D::ClusterRef >rekey(), TSiStripMatchedRecHit::ComputeCoarseLocalPosition(), JPTJetAnalyzer::fillSiStripHitSoNForSingleHit(), GlobalTrajectoryBuilderBase::fixTEC(), ClusterShapeHitFilter::getSizes(), TrackerDpgAnalysis::insertMeasurement(), CalibrationTrackSelector::isOkCharge(), AlignmentTrackSelector::isOkChargeStripHit(), TrackHitFilter::keepThisHit(), HitComparator::less(), DetIdLess::operator()(), EnergyLossPlain::process(), TrackClusterRemover::process(), ShallowRechitClustersProducer::produce(), ShallowTrackClustersProducer::produce(), AlignmentPrescaler::produce(), TkAlCaOverlapTagger::produce(), DeDxEstimatorProducer::produce(), DeDxDiscriminatorProducer::produce(), ShallowGainCalibration::produce(), ProjectedRecHit2D::ProjectedRecHit2D(), ClusterRemovalRefSetter::reKey(), HIPAlignmentAlgorithm::run(), sharesInput(), SiStripRecHit1D::sharesInput(), SiStripRecHit1D::SiStripRecHit1D(), ctfseeding::HitExtractorSTRP::skipThis(), DeDxTools::trajectoryRawHits(), and TSiStripRecHit2DLocalPos::TSiStripRecHit2DLocalPos().

32 { return cluster_;}
ClusterRef cluster_
ClusterRegionalRef const& SiStripRecHit2D::cluster_regional ( ) const
inline
void SiStripRecHit2D::setClusterRef ( ClusterRef const &  ref)
inline
void SiStripRecHit2D::setClusterRegionalRef ( ClusterRegionalRef const &  ref)
inline

Definition at line 35 of file SiStripRecHit2D.h.

References clusterRegional_.

35 { clusterRegional_ = ref; }
ClusterRegionalRef clusterRegional_
void SiStripRecHit2D::setSigmaPitch ( double  sigmap) const
inline

Definition at line 40 of file SiStripRecHit2D.h.

References sigmaPitch_.

Referenced by SiStripRecHitMatcher::match().

40 { sigmaPitch_=sigmap;}
double sigmaPitch_
cache for the matcher....
bool SiStripRecHit2D::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 28 of file SiStripRecHit2D.cc.

References TrackingRecHit::all, cluster(), SiStripRecHit1D::cluster(), cluster_, cluster_regional(), SiStripRecHit1D::cluster_regional(), clusterRegional_, TrackingRecHit::geographicalId(), i, edm::Ref< C, T, F >::isNonnull(), TrackingRecHit::isValid(), DetId::kSubdetOffset, DetId::rawId(), and TrackingRecHit::recHits().

Referenced by ProjectedSiStripRecHit2D::sharesInput(), and SiStripMatchedRecHit2D::sharesInput().

30 {
31  //here we exclude non si-strip subdetectors
32  if( ((geographicalId().rawId()) >> (DetId::kSubdetOffset) ) != ( (other->geographicalId().rawId())>> (DetId::kSubdetOffset)) ) return false;
33 
34  //Protection against invalid hits
35  if(! other->isValid()) return false;
36 
37  const std::type_info & otherType = typeid(*other);
38  if (otherType == typeid(SiStripRecHit2D)) {
39  const SiStripRecHit2D* otherCast = static_cast<const SiStripRecHit2D*>(other);
40  // as 'null == null' is true, we can't just "or" the two equality tests: one of the two refs is always null! (gpetrucc)
41  if (cluster_.isNonnull()) {
42  return (cluster_ == otherCast->cluster());
43  } else {
44  return (clusterRegional_ == otherCast->cluster_regional());
45  }
46  } else if (otherType == typeid(SiStripRecHit1D)) {
47  const SiStripRecHit1D* otherCast = static_cast<const SiStripRecHit1D*>(other);
48  // as 'null == null' is true, we can't just "or" the two equality tests: one of the two refs is always null! (gpetrucc)
49  if (cluster_.isNonnull()) {
50  return (cluster_ == otherCast->cluster());
51  } else {
52  return (clusterRegional_ == otherCast->cluster_regional());
53  }
54  } else if (otherType == typeid(ProjectedSiStripRecHit2D)) {
55  const SiStripRecHit2D* otherCast = & (static_cast<const ProjectedSiStripRecHit2D*>(other)->originalHit());
56  // as 'null == null' is true, we can't just "or" the two equality tests: one of the two refs is always null! (gpetrucc)
57  if (cluster_.isNonnull()) {
58  return (cluster_ == otherCast->cluster());
59  } else {
60  return (clusterRegional_ == otherCast->cluster_regional());
61  }
62  } else if ((otherType == typeid(SiStripMatchedRecHit2D)) && (what == all)) {
63  return false;
64  } else {
65  // last resort, recur to 'recHits()', even if it returns a vector by value
66  std::vector<const TrackingRecHit*> otherHits = other->recHits();
67  int ncomponents=otherHits.size();
68  if(ncomponents==0)return false;
69  else if(ncomponents==1)return sharesInput(otherHits.front(),what);
70  else if (ncomponents>1){
71  if(what == all )return false;
72  else{
73  for(int i=0;i<ncomponents;i++){
74  if(sharesInput(otherHits[i],what))return true;
75  }
76  return false;
77  }
78  }
79  return false;
80  }
81 }
ClusterRegionalRef clusterRegional_
int i
Definition: DBlmapReader.cc:9
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
ClusterRegionalRef const & cluster_regional() const
static const int kSubdetOffset
Definition: DetId.h:23
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:249
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
ClusterRef const & cluster() const
bool isValid() const
ClusterRegionalRef const & cluster_regional() const
ClusterRef cluster_
ClusterRef const & cluster() const
DetId geographicalId() const
double SiStripRecHit2D::sigmaPitch ( ) const
inline

Definition at line 39 of file SiStripRecHit2D.h.

References sigmaPitch_.

Referenced by SiStripRecHitMatcher::match().

39 { return sigmaPitch_;}
double sigmaPitch_
cache for the matcher....

Member Data Documentation

ClusterRef SiStripRecHit2D::cluster_
private

Definition at line 45 of file SiStripRecHit2D.h.

Referenced by cluster(), setClusterRef(), and sharesInput().

ClusterRegionalRef SiStripRecHit2D::clusterRegional_
private

Definition at line 49 of file SiStripRecHit2D.h.

Referenced by cluster_regional(), setClusterRegionalRef(), and sharesInput().

double SiStripRecHit2D::sigmaPitch_
mutableprivate

cache for the matcher....

Definition at line 52 of file SiStripRecHit2D.h.

Referenced by setSigmaPitch(), and sigmaPitch().