CMS 3D CMS Logo

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

Class to hold one picture of the BPix survey and the local fit. More...

#include <SurveyPxbImageLocalFit.h>

Inheritance diagram for SurveyPxbImageLocalFit:
SurveyPxbImage

Public Types

typedef unsigned int count_t
 
typedef std::vector< coord_tfidpoint_t
 
typedef std::vector< value_tlocalpars_t
 
typedef float pede_deriv_t
 
typedef int pede_label_t
 
- Public Types inherited from SurveyPxbImage
typedef Point3DBase< value_t,
LocalTag
coord_t
 
typedef unsigned int count_t
 
typedef unsigned int id_t
 
typedef std::pair< id_t, id_tidPair_t
 
enum  location { ll, ul, lr, ur }
 enum to help access specific locations on a picture More...
 
typedef double value_t
 

Public Member Functions

void doFit (const fidpoint_t &fidpointvec)
 Invoke the fit. More...
 
void doFit (const fidpoint_t &fidpointvec, const pede_label_t &label1, const pede_label_t &label2)
 
void doFit (value_t x1, value_t y1, value_t g1, value_t x2, value_t y2, value_t g2)
 
value_t getChi2 ()
 returns the chi^2 of the fit More...
 
const pede_label_tgetGlobalDerivsLabelPtr (count_t i)
 
const pede_deriv_tgetGlobalDerivsPtr (count_t i)
 
pede_label_t getGlobalDerivsSize ()
 
const pede_deriv_tgetLocalDerivsPtr (count_t i)
 
pede_label_t getLocalDerivsSize ()
 
localpars_t getLocalParameters ()
 returns local parameters after fit More...
 
pede_deriv_t getResiduum (count_t i)
 
pede_deriv_t getSigma (count_t i)
 
bool isFitValid ()
 returns validity flag More...
 
void setGlobalDerivsToZero (count_t i)
 
void setLocalDerivsToZero (count_t i)
 
 SurveyPxbImageLocalFit ()
 
 SurveyPxbImageLocalFit (std::istringstream &iss)
 Constructor from istringstream. More...
 
- Public Member Functions inherited from SurveyPxbImage
void fill (std::istringstream &iss)
 
const coord_t getCoord (count_t m)
 
id_t getIdFirst ()
 Get Id of first module. More...
 
const idPair_t getIdPair ()
 Get Id pair. More...
 
id_t getIdSecond ()
 Get Id of second module. More...
 
value_t getSigmaX ()
 Get Gaussian error in u direction. More...
 
value_t getSigmaY ()
 Get Gaussian error in u direction. More...
 
bool isValid ()
 returns validity flag More...
 
 SurveyPxbImage ()
 
 SurveyPxbImage (std::istringstream &iss)
 

Static Public Attributes

static const count_t nFidpoints = 4
 
static const count_t nGlD = 3
 
static const count_t nLcD = 4
 
static const count_t nLcPars = 4
 
static const count_t nMsrmts = 8
 

Private Member Functions

value_t dist (const coord_t &p1, const coord_t &p2)
 Distance. More...
 
void initFidPoints ()
 Initialise the fiducial points. More...
 

Private Attributes

localpars_t a_
 Local parameters. More...
 
value_t chi2_
 chi2 of the local fit More...
 
bool derivsValidFlag_
 
std::vector< coord_tfidpoints_
 True position of the fiducial points on a sensor wrt. local frame (u,v) More...
 
bool fitValidFlag_
 Validity Flag. More...
 
ROOT::Math::SMatrix
< pede_deriv_t, nMsrmts, nGlD
globalDerivsMatrix_
 Matrix with global derivs. More...
 
std::vector< pede_label_tlabelVec1_
 Vector with labels to global derivs. More...
 
std::vector< pede_label_tlabelVec2_
 
ROOT::Math::SMatrix
< pede_deriv_t, nMsrmts, nLcD
localDerivsMatrix_
 Matrix with local derivs. More...
 
ROOT::Math::SVector< value_t,
nMsrmts
r
 Vector of residuals. More...
 

Additional Inherited Members

- Protected Attributes inherited from SurveyPxbImage
idPair_t idPair_
 
bool isRotated_
 Flag if the image was rotated or not. More...
 
bool isValidFlag_
 Validity Flag. More...
 
std::vector< coord_tmeasurementVec_
 Vector to hold four measurements. More...
 
value_t sigma_x_
 Gaussian errors. More...
 
value_t sigma_y_
 

Detailed Description

Class to hold one picture of the BPix survey and the local fit.

Definition at line 14 of file SurveyPxbImageLocalFit.h.

Member Typedef Documentation

typedef unsigned int SurveyPxbImageLocalFit::count_t

Definition at line 19 of file SurveyPxbImageLocalFit.h.

Definition at line 18 of file SurveyPxbImageLocalFit.h.

Definition at line 17 of file SurveyPxbImageLocalFit.h.

Definition at line 27 of file SurveyPxbImageLocalFit.h.

Definition at line 26 of file SurveyPxbImageLocalFit.h.

Constructor & Destructor Documentation

SurveyPxbImageLocalFit::SurveyPxbImageLocalFit ( )
inline

Definition at line 30 of file SurveyPxbImageLocalFit.h.

References initFidPoints().

30  :
32  {
33  initFidPoints();
34  };
static const count_t nLcPars
bool fitValidFlag_
Validity Flag.
localpars_t a_
Local parameters.
static const count_t nFidpoints
std::vector< coord_t > fidpoints_
True position of the fiducial points on a sensor wrt. local frame (u,v)
void initFidPoints()
Initialise the fiducial points.
SurveyPxbImageLocalFit::SurveyPxbImageLocalFit ( std::istringstream &  iss)
inline

Constructor from istringstream.

Definition at line 37 of file SurveyPxbImageLocalFit.h.

References initFidPoints().

37  :
39  {
40  initFidPoints();
41  };
static const count_t nLcPars
bool fitValidFlag_
Validity Flag.
localpars_t a_
Local parameters.
static const count_t nFidpoints
std::vector< coord_t > fidpoints_
True position of the fiducial points on a sensor wrt. local frame (u,v)
void initFidPoints()
Initialise the fiducial points.

Member Function Documentation

value_t SurveyPxbImageLocalFit::dist ( const coord_t p1,
const coord_t p2 
)
inlineprivate

Distance.

Definition at line 108 of file SurveyPxbImageLocalFit.h.

References mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

109  {
110  value_t dx = p1.x()-p2.x();
111  value_t dy = p1.y()-p2.y();
112  return sqrt(dx*dx+dy*dy);
113  }
T sqrt(T t)
Definition: SSEVec.h:18
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89
void SurveyPxbImageLocalFit::doFit ( const fidpoint_t fidpointvec)

Invoke the fit.

Definition at line 28 of file SurveyPxbImageLocalFit.cc.

void SurveyPxbImageLocalFit::doFit ( const fidpoint_t fidpointvec,
const pede_label_t label1,
const pede_label_t label2 
)

Definition at line 15 of file SurveyPxbImageLocalFit.cc.

void SurveyPxbImageLocalFit::doFit ( value_t  x1,
value_t  y1,
value_t  g1,
value_t  x2,
value_t  y2,
value_t  g2 
)

Definition at line 204 of file SurveyPxbImageLocalFit.cc.

SurveyPxbImageLocalFit::value_t SurveyPxbImageLocalFit::getChi2 ( )

returns the chi^2 of the fit

Definition at line 254 of file SurveyPxbImageLocalFit.cc.

const pede_label_t* SurveyPxbImageLocalFit::getGlobalDerivsLabelPtr ( count_t  i)
inline

Definition at line 61 of file SurveyPxbImageLocalFit.h.

References labelVec1_, and labelVec2_.

61 {return i<4 ? &labelVec1_[0] : &labelVec2_[0];};
std::vector< pede_label_t > labelVec2_
std::vector< pede_label_t > labelVec1_
Vector with labels to global derivs.
const pede_deriv_t* SurveyPxbImageLocalFit::getGlobalDerivsPtr ( count_t  i)
inline

Definition at line 60 of file SurveyPxbImageLocalFit.h.

References globalDerivsMatrix_, and nGlD.

60 {return globalDerivsMatrix_.Array()+i*nGlD;};
static const count_t nGlD
ROOT::Math::SMatrix< pede_deriv_t, nMsrmts, nGlD > globalDerivsMatrix_
Matrix with global derivs.
pede_label_t SurveyPxbImageLocalFit::getGlobalDerivsSize ( )
inline

Definition at line 58 of file SurveyPxbImageLocalFit.h.

References nGlD.

58 {return nGlD; };
static const count_t nGlD
const pede_deriv_t* SurveyPxbImageLocalFit::getLocalDerivsPtr ( count_t  i)
inline

Definition at line 59 of file SurveyPxbImageLocalFit.h.

References localDerivsMatrix_, and nLcD.

59 {return localDerivsMatrix_.Array()+i*nLcD; };
ROOT::Math::SMatrix< pede_deriv_t, nMsrmts, nLcD > localDerivsMatrix_
Matrix with local derivs.
static const count_t nLcD
pede_label_t SurveyPxbImageLocalFit::getLocalDerivsSize ( )
inline

Definition at line 57 of file SurveyPxbImageLocalFit.h.

References nLcD.

57 {return nLcD; };
static const count_t nLcD
SurveyPxbImageLocalFit::localpars_t SurveyPxbImageLocalFit::getLocalParameters ( )

returns local parameters after fit

Definition at line 248 of file SurveyPxbImageLocalFit.cc.

pede_deriv_t SurveyPxbImageLocalFit::getResiduum ( count_t  i)
inline

Definition at line 62 of file SurveyPxbImageLocalFit.h.

References r.

62 { return (pede_deriv_t) r(i); };
ROOT::Math::SVector< value_t, nMsrmts > r
Vector of residuals.
pede_deriv_t SurveyPxbImageLocalFit::getSigma ( count_t  i)
inline

Definition at line 63 of file SurveyPxbImageLocalFit.h.

References SurveyPxbImage::sigma_x_, and SurveyPxbImage::sigma_y_.

63 { return i%2 ? sigma_x_ : sigma_y_ ; };
value_t sigma_x_
Gaussian errors.
void SurveyPxbImageLocalFit::initFidPoints ( )
inlineprivate

Initialise the fiducial points.

Definition at line 99 of file SurveyPxbImageLocalFit.h.

References fidpoints_.

Referenced by SurveyPxbImageLocalFit().

100  {
101  fidpoints_[0] = coord_t(-0.91,-3.30);
102  fidpoints_[1] = coord_t(+0.91,-3.30);
103  fidpoints_[2] = coord_t(-0.91,+3.30);
104  fidpoints_[3] = coord_t(+0.91,+3.30);
105  }
Point3DBase< value_t, LocalTag > coord_t
std::vector< coord_t > fidpoints_
True position of the fiducial points on a sensor wrt. local frame (u,v)
bool SurveyPxbImageLocalFit::isFitValid ( )
inline

returns validity flag

Definition at line 49 of file SurveyPxbImageLocalFit.h.

References fitValidFlag_.

49 { return fitValidFlag_; };
bool fitValidFlag_
Validity Flag.
void SurveyPxbImageLocalFit::setGlobalDerivsToZero ( count_t  i)

Definition at line 267 of file SurveyPxbImageLocalFit.cc.

void SurveyPxbImageLocalFit::setLocalDerivsToZero ( count_t  i)

Definition at line 260 of file SurveyPxbImageLocalFit.cc.

Member Data Documentation

localpars_t SurveyPxbImageLocalFit::a_
private

Local parameters.

Definition at line 70 of file SurveyPxbImageLocalFit.h.

value_t SurveyPxbImageLocalFit::chi2_
private

chi2 of the local fit

Definition at line 90 of file SurveyPxbImageLocalFit.h.

bool SurveyPxbImageLocalFit::derivsValidFlag_
private

Definition at line 96 of file SurveyPxbImageLocalFit.h.

std::vector<coord_t> SurveyPxbImageLocalFit::fidpoints_
private

True position of the fiducial points on a sensor wrt. local frame (u,v)

Definition at line 87 of file SurveyPxbImageLocalFit.h.

Referenced by initFidPoints().

bool SurveyPxbImageLocalFit::fitValidFlag_
private

Validity Flag.

Definition at line 93 of file SurveyPxbImageLocalFit.h.

Referenced by isFitValid().

ROOT::Math::SMatrix<pede_deriv_t,nMsrmts,nGlD> SurveyPxbImageLocalFit::globalDerivsMatrix_
private

Matrix with global derivs.

Definition at line 77 of file SurveyPxbImageLocalFit.h.

Referenced by getGlobalDerivsPtr().

std::vector<pede_label_t> SurveyPxbImageLocalFit::labelVec1_
private

Vector with labels to global derivs.

Definition at line 84 of file SurveyPxbImageLocalFit.h.

Referenced by getGlobalDerivsLabelPtr().

std::vector<pede_label_t> SurveyPxbImageLocalFit::labelVec2_
private

Definition at line 84 of file SurveyPxbImageLocalFit.h.

Referenced by getGlobalDerivsLabelPtr().

ROOT::Math::SMatrix<pede_deriv_t,nMsrmts,nLcD> SurveyPxbImageLocalFit::localDerivsMatrix_
private

Matrix with local derivs.

Definition at line 81 of file SurveyPxbImageLocalFit.h.

Referenced by getLocalDerivsPtr().

const count_t SurveyPxbImageLocalFit::nFidpoints = 4
static

Definition at line 24 of file SurveyPxbImageLocalFit.h.

const count_t SurveyPxbImageLocalFit::nGlD = 3
static

Definition at line 20 of file SurveyPxbImageLocalFit.h.

Referenced by getGlobalDerivsPtr(), and getGlobalDerivsSize().

const count_t SurveyPxbImageLocalFit::nLcD = 4
static

Definition at line 21 of file SurveyPxbImageLocalFit.h.

Referenced by getLocalDerivsPtr(), and getLocalDerivsSize().

const count_t SurveyPxbImageLocalFit::nLcPars = 4
static

Definition at line 23 of file SurveyPxbImageLocalFit.h.

const count_t SurveyPxbImageLocalFit::nMsrmts = 8
static

Definition at line 22 of file SurveyPxbImageLocalFit.h.

ROOT::Math::SVector<value_t, nMsrmts> SurveyPxbImageLocalFit::r
private

Vector of residuals.

Definition at line 73 of file SurveyPxbImageLocalFit.h.

Referenced by getResiduum().