CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
TrackResiduals.cc File Reference
#include <math.h>
#include "DataFormats/TrackReco/interface/HitPattern.h"
#include "DataFormats/TrackReco/interface/TrackResiduals.h"
#include <cstdio>
#include <cstring>
#include "FWCore/MessageLogger/interface/MessageLogger.h"

Go to the source code of this file.

Functions

static int index_to_hitpattern (int i_hitpattern, const HitPattern &h)
 

Variables

static const double pull_char_to_double [8][2]
 

Function Documentation

static int index_to_hitpattern ( int  i_hitpattern,
const HitPattern h 
)
static

Definition at line 61 of file TrackResiduals.cc.

References reco::HitPattern::getHitPattern(), i, reco::HitPattern::numberOfHits(), and reco::HitPattern::validHitFilter().

Referenced by reco::TrackResiduals::residualX(), and reco::TrackResiduals::residualY().

62 {
63  int i_residuals = 0;
64  assert(i_hitpattern < h.numberOfHits());
65  if (!h.validHitFilter(h.getHitPattern(i_hitpattern)))
66  // asking for residual of invalid hit...
67  return -999;
68  for (int i = 0; i <= i_hitpattern; i++) {
69  if (h.validHitFilter(h.getHitPattern(i)))
70  i_residuals++;
71  }
72  assert(i_residuals > 0);
73  return i_residuals - 1;
74 }
int i
Definition: DBlmapReader.cc:9
int numberOfHits() const
Definition: HitPattern.cc:211
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:142

Variable Documentation

const double pull_char_to_double[8][2]
static
Initial value:
= {
{ 0, 0.5 },
{ 0.5, 1 },
{ 1, 1.5 },
{ 1.5, 2 },
{ 2, 2.5 },
{ 2.5, 3.5 },
{ 3.5, 4.5 },
{ 4.5, 5.5 },
}

Definition at line 102 of file TrackResiduals.cc.

Referenced by reco::TrackResiduals::pack_pull(), reco::TrackResiduals::pack_residual(), reco::TrackResiduals::unpack_pull(), and reco::TrackResiduals::unpack_residual().