CMS 3D CMS Logo

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 kChargePerCMBits = 8
 
static constexpr int kClusterSizeBits = 5
 
static constexpr int kDetIdInLayerBits = 14
 
static constexpr int kHitCCCFilterIdx = -9
 
static constexpr int kHitEdgeIdx = -3
 
static constexpr int kHitInGapIdx = -7
 
static constexpr int kHitMaxClusterIdx = -5
 
static constexpr int kHitMissIdx = -1
 
static constexpr int kHitStopIdx = -2
 
static constexpr int kMaxClusterSize = (1 << kClusterSizeBits) - 1
 
static constexpr int kMinChargePerCM = 1620
 

Private Attributes

int mcHitID_
 
PackedData pdata_
 
MeasurementState state_
 

Detailed Description

Definition at line 140 of file Hit.h.

Constructor & Destructor Documentation

◆ Hit() [1/2]

mkfit::Hit::Hit ( )
inline

Definition at line 142 of file Hit.h.

142 : mcHitID_(-1) {}
int mcHitID_
Definition: Hit.h:252

◆ Hit() [2/2]

mkfit::Hit::Hit ( const SVector3 position,
const SMatrixSym33 error,
int  mcHitID = -1 
)
inline

Definition at line 144 of file Hit.h.

const SMatrixSym33 error() const
Definition: Hit.h:149
int mcHitID_
Definition: Hit.h:252
const SVector3 & position() const
Definition: Hit.h:147
MeasurementState state_
Definition: Hit.h:251
int mcHitID() const
Definition: Hit.h:187

Member Function Documentation

◆ chargePerCM()

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

Definition at line 229 of file Hit.h.

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

229 { return pdata_.get_charge_pcm(); }
unsigned int get_charge_pcm() const
Definition: Hit.h:220
PackedData pdata_
Definition: Hit.h:253

◆ detIDinLayer()

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

Definition at line 228 of file Hit.h.

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

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

228 { return pdata_.detid_in_layer; }
unsigned int detid_in_layer
Definition: Hit.h:207
PackedData pdata_
Definition: Hit.h:253

◆ eeta()

float mkfit::Hit::eeta ( ) const
inline

Definition at line 173 of file Hit.h.

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

173  {
174  return getEtaErr2(x(),
175  y(),
176  z(),
177  exx(),
178  eyy(),
179  ezz(),
180  state_.errors().At(0, 1),
181  state_.errors().At(0, 2),
182  state_.errors().At(1, 2));
183  }
float x() const
Definition: Hit.h:162
float exx() const
Definition: Hit.h:165
float ezz() const
Definition: Hit.h:167
float getEtaErr2(float x, float y, float z, float exx, float eyy, float ezz, float exy, float exz, float eyz)
Definition: Hit.h:74
float eyy() const
Definition: Hit.h:166
float y() const
Definition: Hit.h:163
SMatrixSym33 errors() const
Definition: Hit.h:130
float z() const
Definition: Hit.h:164
MeasurementState state_
Definition: Hit.h:251

◆ ephi()

float mkfit::Hit::ephi ( ) const
inline

Definition at line 172 of file Hit.h.

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

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

172 { return getPhiErr2(x(), y(), exx(), eyy(), state_.errors().At(0, 1)); }
float x() const
Definition: Hit.h:162
float exx() const
Definition: Hit.h:165
float eyy() const
Definition: Hit.h:166
float y() const
Definition: Hit.h:163
SMatrixSym33 errors() const
Definition: Hit.h:130
MeasurementState state_
Definition: Hit.h:251
float getPhiErr2(float x, float y, float exx, float eyy, float exy)
Definition: Hit.h:57

◆ errArray()

const float* mkfit::Hit::errArray ( ) const
inline

Definition at line 152 of file Hit.h.

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

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

152 { return state_.err_.Array(); }
MeasurementState state_
Definition: Hit.h:251

◆ error()

const SMatrixSym33 mkfit::Hit::error ( ) const
inline

Definition at line 149 of file Hit.h.

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

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag().

149 { return state_.errors(); }
SMatrixSym33 errors() const
Definition: Hit.h:130
MeasurementState state_
Definition: Hit.h:251

◆ error_nc()

SVector6& mkfit::Hit::error_nc ( )
inline

Definition at line 156 of file Hit.h.

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

156 { return state_.err_; }
MeasurementState state_
Definition: Hit.h:251

◆ eta()

float mkfit::Hit::eta ( void  ) const
inline

Definition at line 169 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().

169  {
170  return getEta(state_.parameters().At(0), state_.parameters().At(1), state_.parameters().At(2));
171  }
float getEta(float r, float z)
Definition: Hit.h:38
MeasurementState state_
Definition: Hit.h:251
const SVector3 & parameters() const
Definition: Hit.h:129

◆ exx()

float mkfit::Hit::exx ( ) const
inline

Definition at line 165 of file Hit.h.

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

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

165 { return state_.errors().At(0, 0); }
SMatrixSym33 errors() const
Definition: Hit.h:130
MeasurementState state_
Definition: Hit.h:251

◆ eyy()

float mkfit::Hit::eyy ( ) const
inline

Definition at line 166 of file Hit.h.

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

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

166 { return state_.errors().At(1, 1); }
SMatrixSym33 errors() const
Definition: Hit.h:130
MeasurementState state_
Definition: Hit.h:251

◆ ezz()

float mkfit::Hit::ezz ( ) const
inline

Definition at line 167 of file Hit.h.

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

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

167 { return state_.errors().At(2, 2); }
SMatrixSym33 errors() const
Definition: Hit.h:130
MeasurementState state_
Definition: Hit.h:251

◆ layer()

int mkfit::Hit::layer ( const MCHitInfoVec globalMCHitInfo) const
inline

Definition at line 188 of file Hit.h.

References mcHitID_.

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

188 { return globalMCHitInfo[mcHitID_].layer(); }
int mcHitID_
Definition: Hit.h:252

◆ maxChargePerCM()

static unsigned int mkfit::Hit::maxChargePerCM ( )
inlinestatic

Definition at line 234 of file Hit.h.

References kChargePerCMBits, and kMinChargePerCM.

Referenced by mkfit::passStripChargePCMfromTrack().

234 { return kMinChargePerCM + (((1 << kChargePerCMBits) - 2) << 3); }
static constexpr int kChargePerCMBits
Definition: Hit.h:201
static constexpr int kMinChargePerCM
Definition: Hit.h:200

◆ maxSpan()

static unsigned int mkfit::Hit::maxSpan ( )
inlinestatic

Definition at line 235 of file Hit.h.

References kMaxClusterSize.

235 { return kMaxClusterSize; }
static constexpr int kMaxClusterSize
Definition: Hit.h:204

◆ mcHitID()

int mkfit::Hit::mcHitID ( ) const
inline

Definition at line 187 of file Hit.h.

References mcHitID_.

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

187 { return mcHitID_; }
int mcHitID_
Definition: Hit.h:252

◆ mcTrackID()

int mkfit::Hit::mcTrackID ( const MCHitInfoVec globalMCHitInfo) const
inline

Definition at line 189 of file Hit.h.

References mcHitID_.

Referenced by mkfit::findSeedsByRoadSearch().

189 { return globalMCHitInfo[mcHitID_].mcTrackID(); }
int mcHitID_
Definition: Hit.h:252

◆ measurementState()

const MeasurementState& mkfit::Hit::measurementState ( ) const
inline

Definition at line 185 of file Hit.h.

References state_.

185 { return state_; }
MeasurementState state_
Definition: Hit.h:251

◆ minChargePerCM()

static unsigned int mkfit::Hit::minChargePerCM ( )
inlinestatic

Definition at line 233 of file Hit.h.

References kMinChargePerCM.

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

233 { return kMinChargePerCM; }
static constexpr int kMinChargePerCM
Definition: Hit.h:200

◆ parameters()

const SVector3& mkfit::Hit::parameters ( void  ) const
inline

Definition at line 148 of file Hit.h.

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

148 { return state_.parameters(); }
MeasurementState state_
Definition: Hit.h:251
const SVector3 & parameters() const
Definition: Hit.h:129

◆ parameters_nc()

SVector3& mkfit::Hit::parameters_nc ( )
inline

Definition at line 155 of file Hit.h.

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

155 { return state_.pos_; }
MeasurementState state_
Definition: Hit.h:251

◆ phi()

float mkfit::Hit::phi ( void  ) const
inline

Definition at line 168 of file Hit.h.

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

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

168 { return getPhi(state_.parameters().At(0), state_.parameters().At(1)); }
float getPhi(float x, float y)
Definition: Hit.h:34
MeasurementState state_
Definition: Hit.h:251
const SVector3 & parameters() const
Definition: Hit.h:129

◆ posArray()

const float* mkfit::Hit::posArray ( ) const
inline

Definition at line 151 of file Hit.h.

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

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

151 { return state_.pos_.Array(); }
MeasurementState state_
Definition: Hit.h:251

◆ position()

const SVector3& mkfit::Hit::position ( ) const
inline

Definition at line 147 of file Hit.h.

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

147 { return state_.parameters(); }
MeasurementState state_
Definition: Hit.h:251
const SVector3 & parameters() const
Definition: Hit.h:129

◆ r()

float mkfit::Hit::r ( ) const
inline

Definition at line 158 of file Hit.h.

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

158  {
159  return sqrtf(state_.parameters().At(0) * state_.parameters().At(0) +
160  state_.parameters().At(1) * state_.parameters().At(1));
161  }
MeasurementState state_
Definition: Hit.h:251
const SVector3 & parameters() const
Definition: Hit.h:129

◆ setupAsPixel()

void mkfit::Hit::setupAsPixel ( unsigned int  id,
int  rows,
int  cols 
)
inline

◆ setupAsStrip()

void mkfit::Hit::setupAsStrip ( unsigned int  id,
int  cpcm,
int  rows 
)
inline

◆ spanCols()

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

Definition at line 231 of file Hit.h.

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

231 { return pdata_.span_cols + 1; }
unsigned int span_cols
Definition: Hit.h:210
PackedData pdata_
Definition: Hit.h:253

◆ spanRows()

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

Definition at line 230 of file Hit.h.

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

230 { return pdata_.span_rows + 1; }
PackedData pdata_
Definition: Hit.h:253
unsigned int span_rows
Definition: Hit.h:209

◆ x()

float mkfit::Hit::x ( ) const
inline

◆ y()

float mkfit::Hit::y ( ) const
inline

◆ z()

float mkfit::Hit::z ( ) const
inline

Member Data Documentation

◆ kChargePerCMBits

constexpr int mkfit::Hit::kChargePerCMBits = 8
static

Definition at line 201 of file Hit.h.

Referenced by maxChargePerCM(), mkfit::Hit::PackedData::set_charge_pcm(), and setupAsPixel().

◆ kClusterSizeBits

constexpr int mkfit::Hit::kClusterSizeBits = 5
static

Definition at line 203 of file Hit.h.

◆ kDetIdInLayerBits

constexpr int mkfit::Hit::kDetIdInLayerBits = 14
static

Definition at line 202 of file Hit.h.

◆ kHitCCCFilterIdx

constexpr int mkfit::Hit::kHitCCCFilterIdx = -9
static

◆ kHitEdgeIdx

constexpr int mkfit::Hit::kHitEdgeIdx = -3
static

◆ kHitInGapIdx

constexpr int mkfit::Hit::kHitInGapIdx = -7
static

◆ kHitMaxClusterIdx

constexpr int mkfit::Hit::kHitMaxClusterIdx = -5
static

◆ kHitMissIdx

constexpr int mkfit::Hit::kHitMissIdx = -1
static

◆ kHitStopIdx

constexpr int mkfit::Hit::kHitStopIdx = -2
static

◆ kMaxClusterSize

constexpr int mkfit::Hit::kMaxClusterSize = (1 << kClusterSizeBits) - 1
static

Definition at line 204 of file Hit.h.

Referenced by maxSpan(), setupAsPixel(), and setupAsStrip().

◆ kMinChargePerCM

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

◆ mcHitID_

int mkfit::Hit::mcHitID_
private

Definition at line 252 of file Hit.h.

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

◆ pdata_

PackedData mkfit::Hit::pdata_
private

Definition at line 253 of file Hit.h.

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

◆ state_

MeasurementState mkfit::Hit::state_
private