Functions | |
AlgebraicVector4 | diffToParameters (pat::CandKinResolution::Parametrization parametrization, const math::XYZTLorentzVector &p4ini, const math::XYZTLorentzVector &p4fin) |
Expresses the difference between two 4-momentum vectors as a shift in coordinates in a given frame. More... | |
AlgebraicVector4 | diffToParameters (pat::CandKinResolution::Parametrization parametrization, const math::PtEtaPhiMLorentzVector &p4ini, const math::PtEtaPhiMLorentzVector &p4fin) |
Expresses the difference between two 4-momentum vectors as a shift in coordinates in a given frame. More... | |
uint32_t | dimension (pat::CandKinResolution::Parametrization parametrization) |
Returns the number of free parameters in a parametrization (3 or 4) More... | |
pat::CandKinResolution::Parametrization | fromString (const std::string &name) |
Convert a name into a parametrization code. More... | |
bool | isAlwaysMassive (pat::CandKinResolution::Parametrization parametrization) |
Is this parametrization usable only with massive objects? More... | |
bool | isAlwaysMassless (pat::CandKinResolution::Parametrization parametrization) |
Is this parametrization usable only with massless objects? More... | |
bool | isMassConstrained (pat::CandKinResolution::Parametrization parametrization) |
If this parametrization has a mass constraint (including the 'isAlwaysMassless' case) More... | |
bool | isPhysical (pat::CandKinResolution::Parametrization parametrization, const AlgebraicVector4 &v4, const math::PtEtaPhiMLorentzVector &initialP4) |
const char * | name (pat::CandKinResolution::Parametrization param) |
Convert a number into a string. More... | |
math::XYZTLorentzVector | p4fromParameters (pat::CandKinResolution::Parametrization parametrization, const AlgebraicVector4 ¶meters, const math::XYZTLorentzVector &initialP4) |
AlgebraicVector4 | parametersFromP4 (pat::CandKinResolution::Parametrization parametrization, const math::XYZTLorentzVector &p4) |
Returns a vector of coordinates values given a coordinate frame and a 4-vector. More... | |
AlgebraicVector4 | parametersFromP4 (pat::CandKinResolution::Parametrization parametrization, const math::PtEtaPhiMLorentzVector &p4) |
Returns a vector of coordinates values given a coordinate frame and a 4-vector. More... | |
math::PtEtaPhiMLorentzVector | polarP4fromParameters (pat::CandKinResolution::Parametrization parametrization, const AlgebraicVector4 ¶meters, const math::PtEtaPhiMLorentzVector &initialP4) |
template<typename T > | |
void | setParametersFromAnyVector (pat::CandKinResolution::Parametrization parametrization, AlgebraicVector4 &pars, const T &p4) |
For internal use only, so we provide only the interface. Use the 'setParametersFromP4'. More... | |
void | setParametersFromP4 (pat::CandKinResolution::Parametrization parametrization, AlgebraicVector4 &pars, const math::XYZTLorentzVector &p4) |
Set the values of the parameters for a given 4-momentum. More... | |
void | setParametersFromP4 (pat::CandKinResolution::Parametrization parametrization, AlgebraicVector4 &pars, const math::PtEtaPhiMLorentzVector &p4) |
Set the values of the parameters for a given 4-momentum. More... | |
AlgebraicVector4 pat::helper::ParametrizationHelper::diffToParameters | ( | pat::CandKinResolution::Parametrization | parametrization, |
const math::XYZTLorentzVector & | p4ini, | ||
const math::XYZTLorentzVector & | p4fin | ||
) |
Expresses the difference between two 4-momentum vectors as a shift in coordinates in a given frame.
Basically, if you do: pars = parametersFromP4(param, simp4); diff = diffToParameters(param, simP4, recP4);
then up to roundoff errors recP4 == p4fromParameters(param, pars+diff, simP4);
Definition at line 322 of file ParametrizationHelper.cc.
AlgebraicVector4 pat::helper::ParametrizationHelper::diffToParameters | ( | pat::CandKinResolution::Parametrization | parametrization, |
const math::PtEtaPhiMLorentzVector & | p4ini, | ||
const math::PtEtaPhiMLorentzVector & | p4fin | ||
) |
Expresses the difference between two 4-momentum vectors as a shift in coordinates in a given frame.
Basically, if you do: pars = parametersFromP4(param, simp4); diff = diffToParameters(param, simP4, recP4);
then up to roundoff errors recP4 == p4fromParameters(param, pars+diff, simP4);
Definition at line 285 of file ParametrizationHelper.cc.
|
inline |
Returns the number of free parameters in a parametrization (3 or 4)
Definition at line 11 of file ParametrizationHelper.h.
Referenced by pat::CandKinResolution::fillMatrixFrom(), and pat::CandKinResolution::fillVector().
pat::CandKinResolution::Parametrization pat::helper::ParametrizationHelper::fromString | ( | const std::string & | name | ) |
Convert a name into a parametrization code.
Definition at line 15 of file ParametrizationHelper.cc.
Referenced by StringResolutionProvider::StringResolutionProvider(), and ora::Version::thisSchemaVersion().
bool pat::helper::ParametrizationHelper::isAlwaysMassive | ( | pat::CandKinResolution::Parametrization | parametrization | ) |
Is this parametrization usable only with massive objects?
Definition at line 398 of file ParametrizationHelper.cc.
bool pat::helper::ParametrizationHelper::isAlwaysMassless | ( | pat::CandKinResolution::Parametrization | parametrization | ) |
Is this parametrization usable only with massless objects?
Definition at line 372 of file ParametrizationHelper.cc.
bool pat::helper::ParametrizationHelper::isMassConstrained | ( | pat::CandKinResolution::Parametrization | parametrization | ) |
If this parametrization has a mass constraint (including the 'isAlwaysMassless' case)
Definition at line 424 of file ParametrizationHelper.cc.
bool pat::helper::ParametrizationHelper::isPhysical | ( | pat::CandKinResolution::Parametrization | parametrization, |
const AlgebraicVector4 & | v4, | ||
const math::PtEtaPhiMLorentzVector & | initialP4 | ||
) |
If this value of the parameters is meaningful in this parametrization. It can be used e.g. when doing random smearing to check you're still within the physical region This DOES check inequalities (e.g. E >= P, M >= 0, theta in [0,PI], ..) This DOES NOT check strict equalities (e.g. M == 0) This DOES NOT check that your parameters comply with your constraints (e.g. fixed mass constraint)
Definition at line 450 of file ParametrizationHelper.cc.
const char * pat::helper::ParametrizationHelper::name | ( | pat::CandKinResolution::Parametrization | param | ) |
Convert a number into a string.
Definition at line 43 of file ParametrizationHelper.cc.
math::XYZTLorentzVector pat::helper::ParametrizationHelper::p4fromParameters | ( | pat::CandKinResolution::Parametrization | parametrization, |
const AlgebraicVector4 & | parameters, | ||
const math::XYZTLorentzVector & | initialP4 | ||
) |
Given a choice of coordinate frame, a vector of coordinates and a reference 4-vector, produce a new 4 vector with the specified parameters. The new 4-vector is not guaranteed to satisfy the constraints of these parametrization if the initial 4-vector does not satisfy them. In the future this method will throw an exception if you go in an unphysical point of the coordinate system (e.g. E^2 < P^2)
Definition at line 151 of file ParametrizationHelper.cc.
AlgebraicVector4 pat::helper::ParametrizationHelper::parametersFromP4 | ( | pat::CandKinResolution::Parametrization | parametrization, |
const math::XYZTLorentzVector & | p4 | ||
) |
Returns a vector of coordinates values given a coordinate frame and a 4-vector.
Definition at line 278 of file ParametrizationHelper.cc.
AlgebraicVector4 pat::helper::ParametrizationHelper::parametersFromP4 | ( | pat::CandKinResolution::Parametrization | parametrization, |
const math::PtEtaPhiMLorentzVector & | p4 | ||
) |
Returns a vector of coordinates values given a coordinate frame and a 4-vector.
Definition at line 271 of file ParametrizationHelper.cc.
math::PtEtaPhiMLorentzVector pat::helper::ParametrizationHelper::polarP4fromParameters | ( | pat::CandKinResolution::Parametrization | parametrization, |
const AlgebraicVector4 & | parameters, | ||
const math::PtEtaPhiMLorentzVector & | initialP4 | ||
) |
Given a choice of coordinate frame, a vector of coordinates and a reference 4-vector, produce a new 4 vector with the specified parameters. The new 4-vector is not guaranteed to satisfy the constraints of these parametrization if the initial 4-vector does not satisfy them. In the future this method will throw an exception if you go in an unphysical point of the coordinate system (e.g. E^2 < P^2)
Definition at line 64 of file ParametrizationHelper.cc.
void pat::helper::ParametrizationHelper::setParametersFromAnyVector | ( | pat::CandKinResolution::Parametrization | parametrization, |
AlgebraicVector4 & | pars, | ||
const T & | p4 | ||
) |
For internal use only, so we provide only the interface. Use the 'setParametersFromP4'.
Definition at line 205 of file ParametrizationHelper.cc.
void pat::helper::ParametrizationHelper::setParametersFromP4 | ( | pat::CandKinResolution::Parametrization | parametrization, |
AlgebraicVector4 & | pars, | ||
const math::XYZTLorentzVector & | p4 | ||
) |
Set the values of the parameters for a given 4-momentum.
Definition at line 265 of file ParametrizationHelper.cc.
void pat::helper::ParametrizationHelper::setParametersFromP4 | ( | pat::CandKinResolution::Parametrization | parametrization, |
AlgebraicVector4 & | pars, | ||
const math::PtEtaPhiMLorentzVector & | p4 | ||
) |
Set the values of the parameters for a given 4-momentum.
Definition at line 259 of file ParametrizationHelper.cc.