CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes
mkfit::Hit Class Reference

#include <Hit.h>

Classes

struct  PackedData
 

Public Member Functions

unsigned int chargePerCM () const
 
unsigned int detIDinLayer () const
 
float eeta () const
 
float ephi () const
 
const float * errArray () const
 
const SMatrixSym33 error () const
 
SVector6error_nc ()
 
float eta () const
 
float exx () const
 
float eyy () const
 
float ezz () const
 
 Hit ()
 
 Hit (const SVector3 &position, const SMatrixSym33 &error, int mcHitID=-1)
 
int layer (const MCHitInfoVec &globalMCHitInfo) const
 
int mcHitID () const
 
int mcTrackID (const MCHitInfoVec &globalMCHitInfo) const
 
const MeasurementStatemeasurementState () const
 
const SVector3parameters () const
 
SVector3parameters_nc ()
 
float phi () const
 
const float * posArray () const
 
const SVector3position () const
 
float r () const
 
void setupAsPixel (unsigned int id, int rows, int cols)
 
void setupAsStrip (unsigned int id, int cpcm, int rows)
 
unsigned int spanCols () const
 
unsigned int spanRows () const
 
float x () const
 
float y () const
 
float z () const
 

Static Public Member Functions

static unsigned int maxChargePerCM ()
 
static unsigned int maxSpan ()
 
static unsigned int minChargePerCM ()
 

Static Public Attributes

static constexpr int kMinChargePerCM = 1620
 

Private Attributes

int mcHitID_
 
PackedData pdata_
 
MeasurementState state_
 

Detailed Description

Definition at line 139 of file Hit.h.

Constructor & Destructor Documentation

mkfit::Hit::Hit ( )
inline

Definition at line 141 of file Hit.h.

141 : mcHitID_(-1) {}
int mcHitID_
Definition: Hit.h:238
mkfit::Hit::Hit ( const SVector3 position,
const SMatrixSym33 error,
int  mcHitID = -1 
)
inline

Definition at line 143 of file Hit.h.

int mcHitID_
Definition: Hit.h:238
int mcHitID() const
Definition: Hit.h:186
const SMatrixSym33 error() const
Definition: Hit.h:148
const SVector3 & position() const
Definition: Hit.h:146
MeasurementState state_
Definition: Hit.h:237

Member Function Documentation

unsigned int mkfit::Hit::chargePerCM ( ) const
inline

Definition at line 215 of file Hit.h.

References mkfit::Hit::PackedData::get_charge_pcm(), and pdata_.

215 { return pdata_.get_charge_pcm(); }
unsigned int get_charge_pcm() const
Definition: Hit.h:206
PackedData pdata_
Definition: Hit.h:239
unsigned int mkfit::Hit::detIDinLayer ( ) const
inline

Definition at line 214 of file Hit.h.

References mkfit::Hit::PackedData::detid_in_layer, and pdata_.

Referenced by mkfit::MkFinder::findCandidates(), and mkfit::MkFinder::findCandidatesCloneEngine().

214 { return pdata_.detid_in_layer; }
unsigned int detid_in_layer
Definition: Hit.h:193
PackedData pdata_
Definition: Hit.h:239
float mkfit::Hit::eeta ( ) const
inline

Definition at line 172 of file Hit.h.

References mkfit::MeasurementState::errors(), exx(), eyy(), ezz(), mkfit::getEtaErr2(), state_, x(), y(), and z().

172  {
173  return getEtaErr2(x(),
174  y(),
175  z(),
176  exx(),
177  eyy(),
178  ezz(),
179  state_.errors().At(0, 1),
180  state_.errors().At(0, 2),
181  state_.errors().At(1, 2));
182  }
float eyy() const
Definition: Hit.h:165
float y() const
Definition: Hit.h:162
float exx() const
Definition: Hit.h:164
float z() const
Definition: Hit.h:163
float getEtaErr2(float x, float y, float z, float exx, float eyy, float ezz, float exy, float exz, float eyz)
Definition: Hit.h:73
float x() const
Definition: Hit.h:161
SMatrixSym33 errors() const
Definition: Hit.h:129
MeasurementState state_
Definition: Hit.h:237
float ezz() const
Definition: Hit.h:166
float mkfit::Hit::ephi ( ) const
inline

Definition at line 171 of file Hit.h.

References mkfit::MeasurementState::errors(), exx(), eyy(), mkfit::getPhiErr2(), state_, x(), and y().

Referenced by mkfit::MkFinder::selectHitIndices().

171 { return getPhiErr2(x(), y(), exx(), eyy(), state_.errors().At(0, 1)); }
float eyy() const
Definition: Hit.h:165
float y() const
Definition: Hit.h:162
float exx() const
Definition: Hit.h:164
float x() const
Definition: Hit.h:161
SMatrixSym33 errors() const
Definition: Hit.h:129
MeasurementState state_
Definition: Hit.h:237
float getPhiErr2(float x, float y, float exx, float eyy, float exy)
Definition: Hit.h:56
const float* mkfit::Hit::errArray ( ) const
inline
const SMatrixSym33 mkfit::Hit::error ( ) const
inline

Definition at line 148 of file Hit.h.

References mkfit::MeasurementState::errors(), and state_.

148 { return state_.errors(); }
SMatrixSym33 errors() const
Definition: Hit.h:129
MeasurementState state_
Definition: Hit.h:237
SVector6& mkfit::Hit::error_nc ( )
inline

Definition at line 155 of file Hit.h.

References mkfit::MeasurementState::err_, and state_.

155 { return state_.err_; }
MeasurementState state_
Definition: Hit.h:237
float mkfit::Hit::eta ( void  ) const
inline

Definition at line 168 of file Hit.h.

References mkfit::getEta(), mkfit::MeasurementState::parameters(), and state_.

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), Jet.Jet::puJetId(), and mkfit::sortByEta().

168  {
169  return getEta(state_.parameters().At(0), state_.parameters().At(1), state_.parameters().At(2));
170  }
float getEta(float r, float z)
Definition: Hit.h:37
const SVector3 & parameters() const
Definition: Hit.h:128
MeasurementState state_
Definition: Hit.h:237
float mkfit::Hit::exx ( ) const
inline

Definition at line 164 of file Hit.h.

References mkfit::MeasurementState::errors(), and state_.

Referenced by eeta(), ephi(), mkfit::Event::read_in(), and mkfit::MkFinder::selectHitIndices().

164 { return state_.errors().At(0, 0); }
SMatrixSym33 errors() const
Definition: Hit.h:129
MeasurementState state_
Definition: Hit.h:237
float mkfit::Hit::eyy ( ) const
inline

Definition at line 165 of file Hit.h.

References mkfit::MeasurementState::errors(), and state_.

Referenced by eeta(), ephi(), mkfit::Event::read_in(), and mkfit::MkFinder::selectHitIndices().

165 { return state_.errors().At(1, 1); }
SMatrixSym33 errors() const
Definition: Hit.h:129
MeasurementState state_
Definition: Hit.h:237
float mkfit::Hit::ezz ( ) const
inline

Definition at line 166 of file Hit.h.

References mkfit::MeasurementState::errors(), and state_.

Referenced by eeta(), mkfit::Event::read_in(), and mkfit::MkFinder::selectHitIndices().

166 { return state_.errors().At(2, 2); }
SMatrixSym33 errors() const
Definition: Hit.h:129
MeasurementState state_
Definition: Hit.h:237
int mkfit::Hit::layer ( const MCHitInfoVec globalMCHitInfo) const
inline

Definition at line 187 of file Hit.h.

References mcHitID_.

Referenced by geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

187 { return globalMCHitInfo[mcHitID_].layer(); }
int mcHitID_
Definition: Hit.h:238
static unsigned int mkfit::Hit::maxChargePerCM ( )
inlinestatic

Definition at line 220 of file Hit.h.

References kMinChargePerCM.

Referenced by mkfit::passStripChargePCMfromTrack().

220 { return kMinChargePerCM + (0xfe << 3); }
static constexpr int kMinChargePerCM
Definition: Hit.h:190
static unsigned int mkfit::Hit::maxSpan ( )
inlinestatic

Definition at line 221 of file Hit.h.

221 { return 8; }
int mkfit::Hit::mcHitID ( ) const
inline
int mkfit::Hit::mcTrackID ( const MCHitInfoVec globalMCHitInfo) const
inline

Definition at line 188 of file Hit.h.

References mcHitID_.

Referenced by mkfit::findSeedsByRoadSearch(), mkfit::Event::print_tracks(), mkfit::Event::read_in(), and mkfit::StdSeq::track_print().

188 { return globalMCHitInfo[mcHitID_].mcTrackID(); }
int mcHitID_
Definition: Hit.h:238
const MeasurementState& mkfit::Hit::measurementState ( ) const
inline

Definition at line 184 of file Hit.h.

References state_.

184 { return state_; }
MeasurementState state_
Definition: Hit.h:237
static unsigned int mkfit::Hit::minChargePerCM ( )
inlinestatic

Definition at line 219 of file Hit.h.

References kMinChargePerCM.

Referenced by mkfit::MkFinder::findCandidates(), and mkfit::MkFinder::findCandidatesCloneEngine().

219 { return kMinChargePerCM; }
static constexpr int kMinChargePerCM
Definition: Hit.h:190
const SVector3& mkfit::Hit::parameters ( void  ) const
inline

Definition at line 147 of file Hit.h.

References mkfit::MeasurementState::parameters(), and state_.

147 { return state_.parameters(); }
const SVector3 & parameters() const
Definition: Hit.h:128
MeasurementState state_
Definition: Hit.h:237
SVector3& mkfit::Hit::parameters_nc ( )
inline

Definition at line 154 of file Hit.h.

References mkfit::MeasurementState::pos_, and state_.

154 { return state_.pos_; }
MeasurementState state_
Definition: Hit.h:237
float mkfit::Hit::phi ( void  ) const
inline

Definition at line 167 of file Hit.h.

References mkfit::getPhi(), mkfit::MeasurementState::parameters(), and state_.

Referenced by Particle.Particle::__str__(), mkfit::findSeedsByRoadSearch(), ntupleDataFormat.Track::phiPull(), mkfit::LayerOfHits::registerHit(), and mkfit::LayerOfHits::suckInHits().

167 { return getPhi(state_.parameters().At(0), state_.parameters().At(1)); }
float getPhi(float x, float y)
Definition: Hit.h:33
const SVector3 & parameters() const
Definition: Hit.h:128
MeasurementState state_
Definition: Hit.h:237
const float* mkfit::Hit::posArray ( ) const
inline
const SVector3& mkfit::Hit::position ( ) const
inline

Definition at line 146 of file Hit.h.

References mkfit::MeasurementState::parameters(), and state_.

Referenced by mkfit::MkFinder::addBestHit(), and mkfit::sortHitsByPhiMT().

146 { return state_.parameters(); }
const SVector3 & parameters() const
Definition: Hit.h:128
MeasurementState state_
Definition: Hit.h:237
float mkfit::Hit::r ( ) const
inline

Definition at line 157 of file Hit.h.

References mkfit::MeasurementState::parameters(), and state_.

Referenced by mkfit::Event::read_in(), mkfit::LayerOfHits::registerHit(), mkfit::LayerOfHits::suckInHits(), and mkfit::StdSeq::track_print().

157  {
158  return sqrtf(state_.parameters().At(0) * state_.parameters().At(0) +
159  state_.parameters().At(1) * state_.parameters().At(1));
160  }
const SVector3 & parameters() const
Definition: Hit.h:128
MeasurementState state_
Definition: Hit.h:237
void mkfit::Hit::setupAsPixel ( unsigned int  id,
int  rows,
int  cols 
)
inline

Definition at line 223 of file Hit.h.

References mkfit::Hit::PackedData::charge_pcm, mkfit::Hit::PackedData::detid_in_layer, gpuClustering::id, SiStripPI::min, pdata_, mkfit::Hit::PackedData::span_cols, and mkfit::Hit::PackedData::span_rows.

Referenced by main().

223  {
225  pdata_.charge_pcm = 0xff;
226  pdata_.span_rows = std::min(0x7, rows - 1);
227  pdata_.span_cols = std::min(0x7, cols - 1);
228  }
uint16_t *__restrict__ id
unsigned int detid_in_layer
Definition: Hit.h:193
unsigned int span_cols
Definition: Hit.h:196
PackedData pdata_
Definition: Hit.h:239
unsigned int span_rows
Definition: Hit.h:195
unsigned int charge_pcm
Definition: Hit.h:194
void mkfit::Hit::setupAsStrip ( unsigned int  id,
int  cpcm,
int  rows 
)
inline

Definition at line 230 of file Hit.h.

References mkfit::Hit::PackedData::detid_in_layer, gpuClustering::id, SiStripPI::min, pdata_, mkfit::Hit::PackedData::set_charge_pcm(), and mkfit::Hit::PackedData::span_rows.

Referenced by main().

230  {
232  pdata_.set_charge_pcm(cpcm);
233  pdata_.span_rows = std::min(0x7, rows - 1);
234  }
uint16_t *__restrict__ id
unsigned int detid_in_layer
Definition: Hit.h:193
void set_charge_pcm(int cpcm)
Definition: Hit.h:200
PackedData pdata_
Definition: Hit.h:239
unsigned int span_rows
Definition: Hit.h:195
unsigned int mkfit::Hit::spanCols ( ) const
inline

Definition at line 217 of file Hit.h.

References pdata_, and mkfit::Hit::PackedData::span_cols.

217 { return pdata_.span_cols + 1; }
unsigned int span_cols
Definition: Hit.h:196
PackedData pdata_
Definition: Hit.h:239
unsigned int mkfit::Hit::spanRows ( ) const
inline

Definition at line 216 of file Hit.h.

References pdata_, and mkfit::Hit::PackedData::span_rows.

216 { return pdata_.span_rows + 1; }
PackedData pdata_
Definition: Hit.h:239
unsigned int span_rows
Definition: Hit.h:195
float mkfit::Hit::x ( ) const
inline
float mkfit::Hit::y ( ) const
inline
float mkfit::Hit::z ( ) const
inline

Member Data Documentation

constexpr int mkfit::Hit::kMinChargePerCM = 1620
static
int mkfit::Hit::mcHitID_
private

Definition at line 238 of file Hit.h.

Referenced by layer(), mcHitID(), and mcTrackID().

PackedData mkfit::Hit::pdata_
private

Definition at line 239 of file Hit.h.

Referenced by chargePerCM(), detIDinLayer(), setupAsPixel(), setupAsStrip(), spanCols(), and spanRows().

MeasurementState mkfit::Hit::state_
private