21 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
30 std::vector<SingleGaussianState1D> pxStates; pxStates.reserve(numb);
31 std::vector<SingleGaussianState1D> pyStates; pyStates.reserve(numb);
32 std::vector<SingleGaussianState1D> pzStates; pzStates.reserve(numb);
34 for ( std::vector<TrajectoryStateOnSurface>::const_iterator ic=
components.begin();
68 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
77 std::vector<SingleGaussianState1D> xStates; xStates.reserve(numb);
78 std::vector<SingleGaussianState1D> yStates; yStates.reserve(numb);
79 std::vector<SingleGaussianState1D> zStates; zStates.reserve(numb);
81 for ( std::vector<TrajectoryStateOnSurface>::const_iterator ic=
components.begin();
115 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
127 for (
unsigned int iv=0; iv<3; ++iv ) {
134 if ( iv==0 ) qpMode =
result;
135 else if ( iv==1 ) dxdzMode =
result;
141 /
sqrt(dxdzMode*dxdzMode+dydzMode*dydzMode+1.);
149 double& momentum)
const
156 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
173 momentum = 1./fabs(qpMode);
179 double& momentum)
const
186 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
194 std::vector<SingleGaussianState1D> states(qpMultiState.
components());
196 for (
unsigned int i=0;
i<states.size(); ++
i ) {
198 double wgt = qpState.
weight();
199 double qp = qpState.
mean();
201 double p = 1./fabs(qp);
202 double varP = p*p*p*p*varQp;
223 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
234 for (
unsigned int iv=3; iv<5; ++iv ) {
241 if ( iv==3 ) xMode =
result;
260 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
269 std::vector<SingleGaussianState1D> pStates; pStates.reserve(numb);
270 std::vector<SingleGaussianState1D> phiStates; phiStates.reserve(numb);
271 std::vector<SingleGaussianState1D> etaStates; etaStates.reserve(numb);
277 for ( std::vector<TrajectoryStateOnSurface>::const_iterator ic=
components.begin();
284 double p = mom.mag();
285 double pt2 = mom.perp2();
286 double phi = mom.phi();
287 double eta = mom.eta();
289 jacobian(0,0) = px/
p;
290 jacobian(0,1) = py/
p;
291 jacobian(0,2) = pz/
p;
292 jacobian(1,0) = py/pt2;
293 jacobian(1,1) = -px/pt2;
295 jacobian(2,0) = px*pz/(pt2*
p);
296 jacobian(2,1) = py*pz/(pt2*
p);
297 jacobian(2,2) = -1./
p;
301 covPPhiEta = ROOT::Math::Similarity(jacobian,covCart);
322 double tanth2 =
exp(-eta);
323 double pt = p*2*tanth2/(1+tanth2*tanth2);
324 double pz = p*(1-tanth2*tanth2)/(1+tanth2*tanth2);
337 edm::LogInfo(
"MultiTrajectoryStateMode") <<
"Cannot calculate mode from invalid TSOS";
349 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.
std::vector< TrajectoryStateOnSurface > components() const
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