test
CMS 3D CMS Logo

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

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 13 of file DeDxHitInfo.h.

Member Typedef Documentation

Definition at line 36 of file DeDxHitInfo.h.

Constructor & Destructor Documentation

reco::DeDxHitInfo::DeDxHitInfo ( )
inline

Definition at line 39 of file DeDxHitInfo.h.

39 {}

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 82 of file DeDxHitInfo.h.

References infos_, and stripClusters_.

Referenced by DeDxHitInfoProducer::processHit().

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

Definition at line 86 of file DeDxHitInfo.h.

References infos_, and pixelClusters_.

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

Definition at line 41 of file DeDxHitInfo.h.

References i, and infos_.

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

41 {return infos_[i].charge();}
int i
Definition: DBlmapReader.cc:9
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:92
DetId reco::DeDxHitInfo::detId ( size_t  i) const
inline

Definition at line 43 of file DeDxHitInfo.h.

References i, and infos_.

Referenced by dEdxHitAnalyzer::analyze(), dEdxHitAnalyzer::harmonic2(), pixelCluster(), and stripCluster().

43 {return infos_[i].detId();}
int i
Definition: DBlmapReader.cc:9
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:92
float reco::DeDxHitInfo::pathlength ( size_t  i) const
inline

Definition at line 42 of file DeDxHitInfo.h.

References i, and infos_.

Referenced by dEdxHitAnalyzer::harmonic2().

42 {return infos_[i].pathlength();}
int i
Definition: DBlmapReader.cc:9
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:92
const SiPixelCluster* reco::DeDxHitInfo::pixelCluster ( size_t  i) const
inline

Definition at line 45 of file DeDxHitInfo.h.

References detId(), infos_, cuy::isFirst, fastTrackerRecHitType::isPixel(), j, P, pixelClusters_, DetId::subdetId(), and SiStripDetId::TIB.

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

Definition at line 80 of file DeDxHitInfo.h.

References pixelClusters_.

80 {return pixelClusters_;}
std::vector< SiPixelCluster > pixelClusters_
Definition: DeDxHitInfo.h:94
const LocalPoint reco::DeDxHitInfo::pos ( size_t  i) const
inline

Definition at line 44 of file DeDxHitInfo.h.

References i, and infos_.

Referenced by Vispa.Gui.PortWidget.PortWidget::connectionPoint(), Vispa.Gui.VispaWidget.VispaWidget::dragWidget(), and Vispa.Gui.VispaWidget.VispaWidget::paintEvent().

44 {return infos_[i].pos();}
int i
Definition: DBlmapReader.cc:9
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:92
size_t reco::DeDxHitInfo::size ( void  ) const
inline

Definition at line 40 of file DeDxHitInfo.h.

References infos_.

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

40 {return infos_.size();}
std::vector< DeDxHitInfoContainer > infos_
Definition: DeDxHitInfo.h:92
const SiStripCluster* reco::DeDxHitInfo::stripCluster ( size_t  i) const
inline

Definition at line 62 of file DeDxHitInfo.h.

References detId(), infos_, cuy::isFirst, j, NULL, S(), stripClusters_, DetId::subdetId(), and SiStripDetId::TIB.

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

Definition at line 79 of file DeDxHitInfo.h.

References stripClusters_.

79 {return stripClusters_;}
std::vector< SiStripCluster > stripClusters_
Definition: DeDxHitInfo.h:93

Member Data Documentation

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

Definition at line 92 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 94 of file DeDxHitInfo.h.

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

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

Definition at line 93 of file DeDxHitInfo.h.

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