Class for the calculation of several event shape variables. More...
#include "PhysicsTools/CandUtils/interface/EventShapeVariables.h"
Public Member Functions | |
double | aplanarity () |
double | C () |
double | circularity (const unsigned int &numberOfSteps=1000) const |
double | D () |
EventShapeVariables (const edm::View< reco::Candidate > &inputVectors) | |
constructor from reco::Candidates More... | |
EventShapeVariables (const std::vector< math::XYZVector > &inputVectors) | |
constructor from XYZ coordinates More... | |
EventShapeVariables (const std::vector< math::RhoEtaPhiVector > &inputVectors) | |
constructor from rho eta phi coordinates More... | |
EventShapeVariables (const std::vector< math::RThetaPhiVector > &inputVectors) | |
constructor from r theta phi coordinates More... | |
const std::vector< double > & | getEigenValues () |
const std::vector< double > & | getEigenValuesNoNorm () |
const TMatrixD & | getEigenVectors () |
double | getFWmoment (unsigned l) |
const std::vector< double > & | getFWmoments () |
double | isotropy (const unsigned int &numberOfSteps=1000) const |
void | set_r (double r) |
set exponent for computation of momentum tensor and related products More... | |
void | setFWmax (unsigned m) |
set number of Fox-Wolfram moments to compute More... | |
double | sphericity () |
~EventShapeVariables () | |
default destructor More... | |
Private Member Functions | |
void | compTensorsAndVectors () |
void | computeFWmoments () |
Private Attributes | |
std::vector< double > | eigenValues_ |
std::vector< double > | eigenValuesNoNorm_ |
TVectorD | eigenValuesNoNormTmp_ |
TVectorD | eigenValuesTmp_ |
TMatrixD | eigenVectors_ |
std::vector< double > | fwmom_ |
bool | fwmom_computed_ |
unsigned | fwmom_maxl_ |
Owen ; save computed Fox-Wolfram moments. More... | |
std::vector< math::XYZVector > | inputVectors_ |
caching of input vectors More... | |
double | r_ |
caching of output More... | |
bool | tensors_computed_ |
Class for the calculation of several event shape variables.
Class for the calculation of several event shape variables. Isotropy, sphericity, aplanarity and circularity are supported. The class supports vectors of 3d vectors and edm::Views of reco::Candidates as input. The 3d vectors can be given in cartesian, cylindrical or polar coordinates. It exploits the ROOT::TMatrixDSym for the calculation of the sphericity and aplanarity.
See https://arxiv.org/pdf/hep-ph/0603175v2.pdf#page=524 for an explanation of sphericity, aplanarity and the quantities C and D.
Author: Sebastian Naumann-Emme, University of Hamburg Roger Wolf, University of Hamburg Christian Veelken, UC Davis
Definition at line 32 of file EventShapeVariables.h.
|
explicit |
constructor from reco::Candidates
Definition at line 6 of file EventShapeVariables.cc.
References inputVectors_, set_r(), setFWmax(), and edm::View< T >::size().
|
explicit |
constructor from XYZ coordinates
Definition at line 17 of file EventShapeVariables.cc.
References set_r(), and setFWmax().
|
explicit |
constructor from rho eta phi coordinates
Definition at line 25 of file EventShapeVariables.cc.
References inputVectors_, set_r(), and setFWmax().
|
explicit |
constructor from r theta phi coordinates
Definition at line 36 of file EventShapeVariables.cc.
References inputVectors_, set_r(), and setFWmax().
|
inline |
double EventShapeVariables::aplanarity | ( | ) |
1.5*q2 where q0>=q1>=q2>=0 are the eigenvalues of the momentum tensor sum{p_j[a]*p_j[b]}/sum{p_j**2} normalized to 1. Return values are 0.5 for spherical and 0 for plane and linear events
Definition at line 166 of file EventShapeVariables.cc.
References compTensorsAndVectors(), eigenValues_, and tensors_computed_.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel().
double EventShapeVariables::C | ( | ) |
3.*(q0*q1+q0*q2+q1*q2) where q0>=q1>=q2>=0 are the eigenvalues of the momentum tensor sum{p_j[a]*p_j[b]}/sum{p_j**2} normalized to 1. Return value is between 0 and 1 and measures the 3-jet structure of the event (C vanishes for a "perfect" 2-jet event)
Definition at line 175 of file EventShapeVariables.cc.
References compTensorsAndVectors(), eigenValues_, and tensors_computed_.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel().
double EventShapeVariables::circularity | ( | const unsigned int & | numberOfSteps = 1000 | ) | const |
the return value is 1 for spherical and 0 linear events in r-phi. This function needs the number of steps to determine how fine the granularity of the algorithm in phi should be
Definition at line 71 of file EventShapeVariables.cc.
References srCondWrite_cfg::deltaPhi, mps_fire::i, inputVectors_, phi, Pi, and createJobs::tmp.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel().
|
private |
helper function to fill the 3 dimensional momentum tensor from the inputVectors where needed also fill the 3 dimensional vectors of eigen-values and eigen-vectors; the largest (smallest) eigen-value is stored at index position 0 (2)
Definition at line 105 of file EventShapeVariables.cc.
References eigenValues_, eigenValuesNoNorm_, eigenValuesNoNormTmp_, eigenValuesTmp_, eigenVectors_, inputVectors_, fireworks::p2, r_, and tensors_computed_.
Referenced by aplanarity(), C(), D(), getEigenValues(), getEigenValuesNoNorm(), getEigenVectors(), and sphericity().
|
private |
reduce computation by exploiting symmetry: all off-diagonal elements appear twice in the sum
compute higher legendre polynomials recursively need to keep track of two previous values
initial cases
store new value
Definition at line 218 of file EventShapeVariables.cc.
References fwmom_, fwmom_computed_, fwmom_maxl_, mps_fire::i, inputVectors_, dqmiolumiharvest::j, and dqmiodumpmetadata::n.
Referenced by getFWmoment(), and getFWmoments().
double EventShapeVariables::D | ( | ) |
27.*(q0*q1*q2) where q0>=q1>=q2>=0 are the eigenvalues of the momentum tensor sum{p_j[a]*p_j[b]}/sum{p_j**2} normalized to 1. Return value is between 0 and 1 and measures the 4-jet structure of the event (D vanishes for a planar event)
27.*(q0*q1*q2) where q0>=q1>=q2>=0 are the eigenvalues of the momemtum tensor sum{p_j[a]*p_j[b]}/sum{p_j**2} normalized to 1. Return value is between 0 and 1 and measures the 4-jet structure of the event (D vanishes for a planar event)
Definition at line 185 of file EventShapeVariables.cc.
References compTensorsAndVectors(), eigenValues_, and tensors_computed_.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel().
|
inline |
Definition at line 77 of file EventShapeVariables.h.
References compTensorsAndVectors(), eigenValues_, and tensors_computed_.
|
inline |
Definition at line 82 of file EventShapeVariables.h.
References compTensorsAndVectors(), eigenValuesNoNorm_, and tensors_computed_.
|
inline |
Definition at line 87 of file EventShapeVariables.h.
References compTensorsAndVectors(), eigenVectors_, and tensors_computed_.
double EventShapeVariables::getFWmoment | ( | unsigned | l | ) |
Definition at line 200 of file EventShapeVariables.cc.
References computeFWmoments(), fwmom_, fwmom_computed_, fwmom_maxl_, and cmsLHEtoEOSManager::l.
const std::vector< double > & EventShapeVariables::getFWmoments | ( | ) |
Definition at line 211 of file EventShapeVariables.cc.
References computeFWmoments(), fwmom_, and fwmom_computed_.
double EventShapeVariables::isotropy | ( | const unsigned int & | numberOfSteps = 1000 | ) | const |
the return value is 1 for spherical events and 0 for events linear in r-phi. This function needs the number of steps to determine how fine the granularity of the algorithm in phi should be
Definition at line 49 of file EventShapeVariables.cc.
References srCondWrite_cfg::deltaPhi, mps_fire::i, inputVectors_, phi, and Pi.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel().
void EventShapeVariables::set_r | ( | double | r | ) |
set exponent for computation of momentum tensor and related products
invalidate previous cached computations
Definition at line 94 of file EventShapeVariables.cc.
References eigenValues_, eigenValuesNoNorm_, alignCSCRings::r, r_, and tensors_computed_.
Referenced by EventShapeVariables().
void EventShapeVariables::setFWmax | ( | unsigned | m | ) |
set number of Fox-Wolfram moments to compute
Definition at line 194 of file EventShapeVariables.cc.
References fwmom_, fwmom_computed_, fwmom_maxl_, and visualization-live-secondInstance_cfg::m.
Referenced by EventShapeVariables().
double EventShapeVariables::sphericity | ( | ) |
1.5*(q1+q2) where q0>=q1>=q2>=0 are the eigenvalues of the momentum tensor sum{p_j[a]*p_j[b]}/sum{p_j**2} normalized to 1. Return values are 1 for spherical, 3/4 for plane and 0 for linear events
Definition at line 158 of file EventShapeVariables.cc.
References compTensorsAndVectors(), eigenValues_, and tensors_computed_.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel().
|
private |
Definition at line 112 of file EventShapeVariables.h.
Referenced by aplanarity(), C(), compTensorsAndVectors(), D(), getEigenValues(), set_r(), and sphericity().
|
private |
Definition at line 112 of file EventShapeVariables.h.
Referenced by compTensorsAndVectors(), getEigenValuesNoNorm(), and set_r().
|
private |
Definition at line 111 of file EventShapeVariables.h.
Referenced by compTensorsAndVectors().
|
private |
Definition at line 111 of file EventShapeVariables.h.
Referenced by compTensorsAndVectors().
|
private |
Definition at line 110 of file EventShapeVariables.h.
Referenced by compTensorsAndVectors(), and getEigenVectors().
|
private |
Definition at line 116 of file EventShapeVariables.h.
Referenced by computeFWmoments(), getFWmoment(), getFWmoments(), and setFWmax().
|
private |
Definition at line 117 of file EventShapeVariables.h.
Referenced by computeFWmoments(), getFWmoment(), getFWmoments(), and setFWmax().
|
private |
Owen ; save computed Fox-Wolfram moments.
Definition at line 115 of file EventShapeVariables.h.
Referenced by computeFWmoments(), getFWmoment(), and setFWmax().
|
private |
caching of input vectors
Definition at line 105 of file EventShapeVariables.h.
Referenced by circularity(), compTensorsAndVectors(), computeFWmoments(), EventShapeVariables(), and isotropy().
|
private |
caching of output
Definition at line 108 of file EventShapeVariables.h.
Referenced by compTensorsAndVectors(), and set_r().
|
private |
Definition at line 109 of file EventShapeVariables.h.
Referenced by aplanarity(), C(), compTensorsAndVectors(), D(), getEigenValues(), getEigenValuesNoNorm(), getEigenVectors(), set_r(), and sphericity().