CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
reco::DeDxHitInfo Class Reference

#include <DeDxHitInfo.h>

Classes

class  DeDxHitInfoContainer
 

Public Types

typedef std::vector< DeDxHitInfo::DeDxHitInfoContainerDeDxHitInfoContainerCollection
 

Public Member Functions

void addHit (const float charge, const float pathlength, const DetId &detId, const LocalPoint &pos, const SiStripCluster &stripCluster)
 
void addHit (const float charge, const float pathlength, const DetId &detId, const LocalPoint &pos, const SiPixelCluster &pixelCluster)
 
float charge (size_t i) const
 
 DeDxHitInfo ()
 
DetId detId (size_t i) const
 
float pathlength (size_t i) const
 
const SiPixelClusterpixelCluster (size_t i) const
 
const std::vector< SiPixelCluster > & pixelClusters () const
 
const LocalPoint pos (size_t i) const
 
size_t size () const
 
const SiStripClusterstripCluster (size_t i) const
 
const std::vector< SiStripCluster > & stripClusters () const
 

Private Attributes

std::vector< DeDxHitInfoContainerinfos_
 
std::vector< SiPixelClusterpixelClusters_
 
std::vector< SiStripClusterstripClusters_
 

Detailed Description

Definition at line 14 of file DeDxHitInfo.h.

Member Typedef Documentation

Definition at line 37 of file DeDxHitInfo.h.

Constructor & Destructor Documentation

reco::DeDxHitInfo::DeDxHitInfo ( )
inline

Definition at line 40 of file DeDxHitInfo.h.

40 {}

Member Function Documentation

void reco::DeDxHitInfo::addHit ( const float  charge,
const float  pathlength,
const DetId detId,
const LocalPoint pos,
const SiStripCluster stripCluster 
)
inline

Definition at line 83 of file DeDxHitInfo.h.

References reco::DeDxHitInfo::DeDxHitInfoContainer::DeDxHitInfoContainer(), infos_, and stripClusters_.

Referenced by DeDxHitInfoProducer::processHit().

83  {
84  infos_.push_back(DeDxHitInfoContainer(charge, pathlength, detId, pos));
85  stripClusters_.push_back(stripCluster);
86  }
float charge(size_t i) const
Definition: DeDxHitInfo.h:42
std::vector< SiStripCluster > stripClusters_
Definition: DeDxHitInfo.h:94
float pathlength(size_t i) const
Definition: DeDxHitInfo.h:43
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:93
void reco::DeDxHitInfo::addHit ( const float  charge,
const float  pathlength,
const DetId detId,
const LocalPoint pos,
const SiPixelCluster pixelCluster 
)
inline

Definition at line 87 of file DeDxHitInfo.h.

References reco::DeDxHitInfo::DeDxHitInfoContainer::DeDxHitInfoContainer(), infos_, and pixelClusters_.

87  {
88  infos_.push_back(DeDxHitInfoContainer(charge, pathlength, detId, pos));
89  pixelClusters_.push_back(pixelCluster);
90  }
float charge(size_t i) const
Definition: DeDxHitInfo.h:42
std::vector< SiPixelCluster > pixelClusters_
Definition: DeDxHitInfo.h:95
float pathlength(size_t i) const
Definition: DeDxHitInfo.h:43
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:93
float reco::DeDxHitInfo::charge ( size_t  i) const
inline

Definition at line 42 of file DeDxHitInfo.h.

References mps_fire::i, and infos_.

Referenced by dEdxHitAnalyzer::analyze(), pat::PATIsolatedTrackProducer::getDeDx(), dEdxHitAnalyzer::harmonic2(), and DeDxHitInfoProducer::produce().

42 {return infos_[i].charge();}
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:93
DetId reco::DeDxHitInfo::detId ( size_t  i) const
inline

Definition at line 44 of file DeDxHitInfo.h.

References mps_fire::i, and infos_.

Referenced by dEdxHitAnalyzer::analyze(), dEdxHitAnalyzer::harmonic2(), and DeDxHitInfoProducer::produce().

44 {return infos_[i].detId();}
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:93
float reco::DeDxHitInfo::pathlength ( size_t  i) const
inline

Definition at line 43 of file DeDxHitInfo.h.

References mps_fire::i, and infos_.

Referenced by pat::PATIsolatedTrackProducer::getDeDx(), dEdxHitAnalyzer::harmonic2(), and DeDxHitInfoProducer::produce().

43 {return infos_[i].pathlength();}
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:93
const SiPixelCluster* reco::DeDxHitInfo::pixelCluster ( size_t  i) const
inline

Definition at line 46 of file DeDxHitInfo.h.

References reco::DeDxHitInfo::DeDxHitInfoContainer::detId(), infos_, cuy::isFirst, fastTrackerRecHitType::isPixel(), pixelClusters_, DetId::subdetId(), and SiStripDetId::TIB.

Referenced by pat::PATIsolatedTrackProducer::getDeDx().

46  {
47  size_t P=0; bool isPixel=false; bool isFirst = true;
48  for(size_t j=0;j<=i&&j<infos_.size();j++){
50  if (isFirst) isFirst = false;
51  else P++;
52  isPixel=true;
53  }
54  else{
55  isPixel=false;
56  }
57  }
58  if(isPixel && pixelClusters_.size() > P){
59  return &(pixelClusters_[P]);
60  }
61  return nullptr;
62  }
std::vector< SiPixelCluster > pixelClusters_
Definition: DeDxHitInfo.h:95
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:38
isFirst
Definition: cuy.py:417
std::pair< OmniClusterRef, TrackingParticleRef > P
bool isPixel(HitType hitType)
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:93
DetId detId(size_t i) const
Definition: DeDxHitInfo.h:44
const std::vector<SiPixelCluster>& reco::DeDxHitInfo::pixelClusters ( ) const
inline

Definition at line 81 of file DeDxHitInfo.h.

References pixelClusters_.

81 {return pixelClusters_;}
std::vector< SiPixelCluster > pixelClusters_
Definition: DeDxHitInfo.h:95
const LocalPoint reco::DeDxHitInfo::pos ( size_t  i) const
inline
size_t reco::DeDxHitInfo::size ( void  ) const
inline
const SiStripCluster* reco::DeDxHitInfo::stripCluster ( size_t  i) const
inline

Definition at line 63 of file DeDxHitInfo.h.

References reco::DeDxHitInfo::DeDxHitInfoContainer::detId(), infos_, cuy::isFirst, S(), stripClusters_, DetId::subdetId(), and SiStripDetId::TIB.

Referenced by pat::PATIsolatedTrackProducer::getDeDx(), and DeDxHitInfoProducer::produce().

63  {
64  size_t S=0; bool isStrip=false; bool isFirst = true;
65  for(size_t j=0;j<=i&&j<infos_.size();j++){
67  if (isFirst) {isFirst = false;}
68  else S++;
69  isStrip=true;
70  }
71  else{
72  isStrip=false;
73  }
74  }
75  if(isStrip && stripClusters_.size() > S){
76  return &(stripClusters_[S]);
77  }
78  return nullptr;
79  }
std::vector< SiStripCluster > stripClusters_
Definition: DeDxHitInfo.h:94
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:38
isFirst
Definition: cuy.py:417
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:99
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:93
DetId detId(size_t i) const
Definition: DeDxHitInfo.h:44
const std::vector<SiStripCluster>& reco::DeDxHitInfo::stripClusters ( ) const
inline

Definition at line 80 of file DeDxHitInfo.h.

References stripClusters_.

80 {return stripClusters_;}
std::vector< SiStripCluster > stripClusters_
Definition: DeDxHitInfo.h:94

Member Data Documentation

std::vector<DeDxHitInfoContainer> reco::DeDxHitInfo::infos_
private

Definition at line 93 of file DeDxHitInfo.h.

Referenced by addHit(), charge(), detId(), pathlength(), pixelCluster(), pos(), size(), and stripCluster().

std::vector<SiPixelCluster> reco::DeDxHitInfo::pixelClusters_
private

Definition at line 95 of file DeDxHitInfo.h.

Referenced by addHit(), pixelCluster(), and pixelClusters().

std::vector<SiStripCluster> reco::DeDxHitInfo::stripClusters_
private

Definition at line 94 of file DeDxHitInfo.h.

Referenced by addHit(), stripCluster(), and stripClusters().