LogLH function for 3D beam spot fit from primary vertex data. Assumes a Gaussian resolution function for the vertices provided in the form of a vector of BeamSpotFitPVData and a Gaussian beam profile in 3D: based on a covariance without xz and yz correlations + linearized rotations in the xz and yz planes. Parameters: x, y, z, ex, corrxy, ey, dxdz, dydz, ez, scale x, y, z ...... beamspot position ex, ey, ez ... beamspot width corrxy ....... xy correlation in the system of the beam line dxdz, dydz ... rotations in xz and yz scale ........ scaling factor for vertex errors
- Author
- WA, 9/3/2010
Definition at line 22 of file FcnBeamSpotFitPV.h.
double FcnBeamSpotFitPV::operator() |
( |
const std::vector< double > & |
pars | ) |
const |
|
override |
Definition at line 54 of file FcnBeamSpotFitPV.cc.
61 double sigb1 = pars[3];
62 double corrb12 = pars[4];
63 double sigb2 = pars[5];
64 double dxdz = pars[6];
65 double dydz = pars[7];
66 double sigb3 = pars[8];
67 double escale = pars[9];
71 typedef ROOT::Math::SVector<double, 3> Vector3D;
72 typedef ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3> > Matrix3D;
74 double varb1 = sigb1 * sigb1;
75 double varb2 = sigb2 * sigb2;
76 double varb3 = sigb3 * sigb3;
79 covb(1, 0) = covb(0, 1) = corrb12 * sigb1 * sigb2;
81 covb(2, 0) = covb(0, 2) =
dxdz * (varb3 - varb1) -
dydz * covb(1, 0);
82 covb(2, 1) = covb(1, 2) =
dydz * (varb3 - varb2) -
dxdz * covb(1, 0);
107 for (vector<BeamSpotFitPVData>::const_iterator ipv =
data_.begin(); ipv !=
data_.end(); ++ipv) {
111 v1 = (*ipv).position[0];
114 v2 = (*ipv).position[1];
117 v3 = (*ipv).position[2];
123 ev1 = (*ipv).posError[0];
124 corr12 = (*ipv).posCorr[0];
125 ev2 = (*ipv).posError[1];
126 corr13 = (*ipv).posCorr[1];
127 corr23 = (*ipv).posCorr[2];
128 ev3 = (*ipv).posError[2];
136 cov(1, 0) = cov(0, 1) =
ev1 *
ev2 * corr12;
138 cov(2, 0) = cov(0, 2) =
ev1 * ev3 * corr13;
139 cov(2, 1) = cov(1, 2) =
ev2 * ev3 * corr23;
140 cov(2, 2) = ev3 * ev3;
146 wgt = cov.Inverse(ifail);
149 cout <<
"Inversion failed" << endl;
162 sumLL += ROOT::Math::Similarity(dv, wgt);
References gather_cfg::cout, data_, BeamSpotFakeParameters_cfi::dxdz, BeamSpotFakeParameters_cfi::dydz, simpleEdmComparison::ev1, simpleEdmComparison::ev2, dqm-mbProfile::log, lowerLimits_, and upperLimits_.