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 366 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::ESpher, pat::CandKinResolution::EtEtaPhi, pat::CandKinResolution::EtThetaPhi, Exception, pat::CandKinResolution::Invalid, M_PI, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MCPInvSpher, pat::CandKinResolution::MCSpher, pat::CandKinResolution::MomDev, LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, parametersFromP4(), stringResolutionProvider_cfi::parametrization, runTheMatrix::ret, and pat::CandKinResolution::Spher.
Referenced by diffToParameters().
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 329 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, diffToParameters(), pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::ESpher, pat::CandKinResolution::EtEtaPhi, pat::CandKinResolution::EtThetaPhi, Exception, pat::CandKinResolution::Invalid, M_PI, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MCPInvSpher, pat::CandKinResolution::MCSpher, pat::CandKinResolution::MomDev, parametersFromP4(), stringResolutionProvider_cfi::parametrization, runTheMatrix::ret, and pat::CandKinResolution::Spher.
|
inline |
Returns the number of free parameters in a parametrization (3 or 4)
Definition at line 12 of file ParametrizationHelper.h.
References stringResolutionProvider_cfi::parametrization.
Referenced by FKDTree< TYPE, numberOfDimensions >::build(), MillePedeAlignmentAlgorithm::callMille2D(), CosmicMuonSeedGenerator::createSeed(), SETSeedFinder::estimateMomentum(), pat::CandKinResolution::fillMatrixFrom(), pat::CandKinResolution::fillVector(), NoisyChannel::getAverage(), FKDTree< TYPE, numberOfDimensions >::intersects(), Trajectory::ndof(), SETSeedFinder::pre_prune(), BaseMVAValueMapProducer< pat::Muon >::produce(), FKDTree< TYPE, numberOfDimensions >::search(), and TMultiDimFet::TMultiDimFet().
pat::CandKinResolution::Parametrization pat::helper::ParametrizationHelper::fromString | ( | const std::string & | name | ) |
Convert a name into a parametrization code.
Definition at line 14 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::ESpher, pat::CandKinResolution::EtEtaPhi, pat::CandKinResolution::EtThetaPhi, Exception, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MCPInvSpher, pat::CandKinResolution::MCSpher, pat::CandKinResolution::MomDev, Skims_PA_cff::name, and pat::CandKinResolution::Spher.
Referenced by StringResolutionProvider::StringResolutionProvider().
bool pat::helper::ParametrizationHelper::isAlwaysMassive | ( | pat::CandKinResolution::Parametrization | parametrization | ) |
Is this parametrization usable only with massive objects?
Definition at line 442 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::ESpher, pat::CandKinResolution::EtEtaPhi, pat::CandKinResolution::EtThetaPhi, Exception, pat::CandKinResolution::Invalid, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MCPInvSpher, pat::CandKinResolution::MCSpher, pat::CandKinResolution::MomDev, stringResolutionProvider_cfi::parametrization, and pat::CandKinResolution::Spher.
bool pat::helper::ParametrizationHelper::isAlwaysMassless | ( | pat::CandKinResolution::Parametrization | parametrization | ) |
Is this parametrization usable only with massless objects?
Definition at line 417 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::ESpher, pat::CandKinResolution::EtEtaPhi, pat::CandKinResolution::EtThetaPhi, Exception, pat::CandKinResolution::Invalid, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MCPInvSpher, pat::CandKinResolution::MCSpher, pat::CandKinResolution::MomDev, stringResolutionProvider_cfi::parametrization, and pat::CandKinResolution::Spher.
bool pat::helper::ParametrizationHelper::isMassConstrained | ( | pat::CandKinResolution::Parametrization | parametrization | ) |
If this parametrization has a mass constraint (including the 'isAlwaysMassless' case)
Definition at line 467 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::ESpher, pat::CandKinResolution::EtEtaPhi, pat::CandKinResolution::EtThetaPhi, Exception, pat::CandKinResolution::Invalid, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MCPInvSpher, pat::CandKinResolution::MCSpher, pat::CandKinResolution::MomDev, stringResolutionProvider_cfi::parametrization, and pat::CandKinResolution::Spher.
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 492 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::ESpher, pat::CandKinResolution::EtEtaPhi, pat::CandKinResolution::EtThetaPhi, Exception, pat::CandKinResolution::Invalid, callgraph::m2, M_PI, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MCPInvSpher, pat::CandKinResolution::MCSpher, pat::CandKinResolution::MomDev, AlCaHLTBitMon_ParallelJobs::p, stringResolutionProvider_cfi::parametrization, pat::CandKinResolution::Spher, and HGCalGeometryMode::Square.
const char * pat::helper::ParametrizationHelper::name | ( | pat::CandKinResolution::Parametrization | param | ) |
Convert a number into a string.
Definition at line 39 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::ESpher, pat::CandKinResolution::EtEtaPhi, pat::CandKinResolution::EtThetaPhi, pat::CandKinResolution::Invalid, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MCPInvSpher, pat::CandKinResolution::MCSpher, pat::CandKinResolution::MomDev, and pat::CandKinResolution::Spher.
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 161 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MomDev, AlCaHLTBitMon_ParallelJobs::p, stringResolutionProvider_cfi::parametrization, polarP4fromParameters(), runTheMatrix::ret, mathSSE::sqrt(), and HGCalGeometryMode::Square.
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 322 of file ParametrizationHelper.cc.
References stringResolutionProvider_cfi::parametrization, runTheMatrix::ret, and setParametersFromP4().
Referenced by diffToParameters().
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 315 of file ParametrizationHelper.cc.
References stringResolutionProvider_cfi::parametrization, runTheMatrix::ret, and setParametersFromP4().
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 74 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::ESpher, pat::CandKinResolution::EtEtaPhi, pat::CandKinResolution::EtThetaPhi, Exception, pat::CandKinResolution::Invalid, callgraph::m2, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MCPInvSpher, pat::CandKinResolution::MCSpher, pat::CandKinResolution::MomDev, AlCaHLTBitMon_ParallelJobs::p, stringResolutionProvider_cfi::parametrization, runTheMatrix::ret, pat::CandKinResolution::Spher, mathSSE::sqrt(), and HGCalGeometryMode::Square.
Referenced by p4fromParameters().
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 214 of file ParametrizationHelper.cc.
References pat::CandKinResolution::Cart, pat::CandKinResolution::ECart, pat::CandKinResolution::EMomDev, pat::CandKinResolution::EScaledMomDev, pat::CandKinResolution::ESpher, pat::CandKinResolution::EtEtaPhi, pat::CandKinResolution::EtThetaPhi, Exception, pat::CandKinResolution::Invalid, pat::CandKinResolution::MCCart, pat::CandKinResolution::MCMomDev, pat::CandKinResolution::MCPInvSpher, pat::CandKinResolution::MCSpher, pat::CandKinResolution::MomDev, stringResolutionProvider_cfi::parametrization, runTheMatrix::ret, and pat::CandKinResolution::Spher.
Referenced by setParametersFromP4().
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 309 of file ParametrizationHelper.cc.
References stringResolutionProvider_cfi::parametrization, setParametersFromAnyVector(), and findQualityFiles::v.
Referenced by parametersFromP4().
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 303 of file ParametrizationHelper.cc.
References stringResolutionProvider_cfi::parametrization, setParametersFromAnyVector(), and findQualityFiles::v.