24 edm::LogInfo(
"multiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
34 std::vector<SingleGaussianState1D> pxStates; pxStates.reserve(numb);
35 std::vector<SingleGaussianState1D> pyStates; pyStates.reserve(numb);
36 std::vector<SingleGaussianState1D> pzStates; pzStates.reserve(numb);
38 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();
119 edm::LogInfo(
"multiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
131 for (
unsigned int iv=0; iv<3; ++iv ) {
138 if ( iv==0 ) qpMode =
result;
139 else if ( iv==1 ) dxdzMode =
result;
145 /
sqrt(dxdzMode*dxdzMode+dydzMode*dydzMode+1.);
159 edm::LogInfo(
"multiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
176 momentum = 1./fabs(qpMode);
188 edm::LogInfo(
"multiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
196 std::vector<SingleGaussianState1D> states(qpMultiState.
components());
198 for (
unsigned int i=0;
i<states.size(); ++
i ) {
200 double wgt = qpState.
weight();
201 double qp = qpState.
mean();
203 double p = 1./fabs(qp);
204 double varP = p*p*p*p*varQp;
224 edm::LogInfo(
"multiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
235 for (
unsigned int iv=3; iv<5; ++iv ) {
242 if ( iv==3 ) xMode =
result;
260 edm::LogInfo(
"multiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
270 std::vector<SingleGaussianState1D> pStates; pStates.reserve(numb);
271 std::vector<SingleGaussianState1D> phiStates; phiStates.reserve(numb);
272 std::vector<SingleGaussianState1D> etaStates; etaStates.reserve(numb);
278 for ( std::vector<TrajectoryStateOnSurface>::const_iterator ic=
components.begin();
285 auto op = 1./mom.mag();
286 auto opt2 = 1./mom.perp2();
287 auto phi = mom.phi();
288 auto eta = mom.eta();
290 jacobian(0,0) = px*op;
291 jacobian(0,1) = py*op;
292 jacobian(0,2) = pz*op;
293 jacobian(1,0) = py*opt2;
294 jacobian(1,1) = -px*opt2;
296 jacobian(2,0) = px*pz*opt2*op;
297 jacobian(2,1) = py*pz*opt2*op;
302 covPPhiEta = ROOT::Math::Similarity(jacobian,covCart);
324 auto pt =
p*2*tanth2/(1+tanth2*tanth2);
325 auto pz =
p*(1-tanth2*tanth2)/(1+tanth2*tanth2);
338 edm::LogInfo(
"multiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
350 return result>0. ? 1 : -1;
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
const LocalTrajectoryParameters & localParameters() const
bool positionFromModeLocal(TrajectoryStateOnSurface const &tsos, GlobalPoint &position)
Sin< T >::type sin(const T &t)
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Global3DPoint GlobalPoint
int chargeFromMode(TrajectoryStateOnSurface const &tsos)
bool momentumFromModeP(TrajectoryStateOnSurface const &tsos, double &momentum)
const SurfaceType & surface() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
bool positionFromModeCartesian(TrajectoryStateOnSurface const &tsos, GlobalPoint &position)
double mean() const
parameter vector
double variance() const
variance
Cos< T >::type cos(const T &t)
const SingleGaussianState1D & mode() const
double weight() const
weight
double mean(unsigned int i) const
mean value of a component
const SingleState1dContainer & components() const
access to components
bool momentumFromModeLocal(TrajectoryStateOnSurface const &tsos, GlobalVector &momentum)
bool momentumFromModePPhiEta(TrajectoryStateOnSurface const &tsos, GlobalVector &momentum)
static int position[264][3]
bool momentumFromModeQP(TrajectoryStateOnSurface const &tsos, double &momentum)
bool momentumFromModeCartesian(TrajectoryStateOnSurface const &tsos, GlobalVector &momentum)
float pzSign() const
Sign of the z-component of the momentum in the local frame.
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
bool modeIsValid() const
mode status
Global3DVector GlobalVector