23 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
33 std::vector<SingleGaussianState1D> pxStates; pxStates.reserve(numb);
34 std::vector<SingleGaussianState1D> pyStates; pyStates.reserve(numb);
35 std::vector<SingleGaussianState1D> pzStates; pzStates.reserve(numb);
37 for ( std::vector<TrajectoryStateOnSurface>::const_iterator ic=
components.begin();
71 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
82 std::vector<SingleGaussianState1D> xStates; xStates.reserve(numb);
83 std::vector<SingleGaussianState1D> yStates; yStates.reserve(numb);
84 std::vector<SingleGaussianState1D> zStates; zStates.reserve(numb);
86 for ( std::vector<TrajectoryStateOnSurface>::const_iterator ic=
components.begin();
120 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
132 for (
unsigned int iv=0; iv<3; ++iv ) {
139 if ( iv==0 ) qpMode =
result;
140 else if ( iv==1 ) dxdzMode =
result;
146 /
sqrt(dxdzMode*dxdzMode+dydzMode*dydzMode+1.);
154 double& momentum)
const 161 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
178 momentum = 1./fabs(qpMode);
184 double& momentum)
const 191 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
199 std::vector<SingleGaussianState1D> states(qpMultiState.
components());
201 for (
unsigned int i=0;
i<states.size(); ++
i ) {
203 double wgt = qpState.
weight();
204 double qp = qpState.
mean();
206 double p = 1./fabs(qp);
207 double varP = p*p*p*p*varQp;
228 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
239 for (
unsigned int iv=3; iv<5; ++iv ) {
246 if ( iv==3 ) xMode =
result;
265 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
275 std::vector<SingleGaussianState1D> pStates; pStates.reserve(numb);
276 std::vector<SingleGaussianState1D> phiStates; phiStates.reserve(numb);
277 std::vector<SingleGaussianState1D> etaStates; etaStates.reserve(numb);
283 for ( std::vector<TrajectoryStateOnSurface>::const_iterator ic=
components.begin();
290 auto op = 1./mom.mag();
291 auto opt2 = 1./mom.perp2();
292 auto phi = mom.phi();
293 auto eta = mom.eta();
295 jacobian(0,0) = px*op;
296 jacobian(0,1) = py*op;
297 jacobian(0,2) = pz*op;
298 jacobian(1,0) = py*opt2;
299 jacobian(1,1) = -px*opt2;
301 jacobian(2,0) = px*pz*opt2*op;
302 jacobian(2,1) = py*pz*opt2*op;
307 covPPhiEta = ROOT::Math::Similarity(jacobian,covCart);
329 auto pt =
p*2*tanth2/(1+tanth2*tanth2);
330 auto pz =
p*(1-tanth2*tanth2)/(1+tanth2*tanth2);
343 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
355 return result>0. ? 1 : -1;
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
bool positionFromModeCartesian(const TrajectoryStateOnSurface tsos, GlobalPoint &position) const
const LocalTrajectoryParameters & localParameters() const
Sin< T >::type sin(const T &t)
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Global3DPoint GlobalPoint
bool momentumFromModeCartesian(const TrajectoryStateOnSurface tsos, GlobalVector &momentum) const
bool momentumFromModeP(const TrajectoryStateOnSurface tsos, double &momentum) const
const SurfaceType & surface() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
double mean() const
parameter vector
double variance() const
variance
Cos< T >::type cos(const T &t)
const SingleGaussianState1D & mode() const
bool positionFromModeLocal(const TrajectoryStateOnSurface tsos, GlobalPoint &position) const
bool momentumFromModeLocal(const TrajectoryStateOnSurface tsos, GlobalVector &momentum) const
double weight() const
weight
double mean(unsigned int i) const
mean value of a component
bool momentumFromModeQP(const TrajectoryStateOnSurface tsos, double &momentum) const
const SingleState1dContainer & components() const
access to components
static int position[264][3]
float pzSign() const
Sign of the z-component of the momentum in the local frame.
int chargeFromMode(const TrajectoryStateOnSurface tsos) const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
bool modeIsValid() const
mode status
Global3DVector GlobalVector
bool momentumFromModePPhiEta(const TrajectoryStateOnSurface tsos, GlobalVector &momentum) const