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 19 of file EventShapeVariables.cc.
References set_r(), and setFWmax().
|
explicit |
constructor from rho eta phi coordinates
Definition at line 27 of file EventShapeVariables.cc.
References inputVectors_, set_r(), and setFWmax().
|
explicit |
constructor from r theta phi coordinates
Definition at line 39 of file EventShapeVariables.cc.
References inputVectors_, set_r(), and setFWmax().
|
inline |
default destructor
Definition at line 44 of file EventShapeVariables.h.
References aplanarity(), C(), circularity(), D(), isotropy(), funct::m, alignCSCRings::r, set_r(), setFWmax(), and sphericity().
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 177 of file EventShapeVariables.cc.
References compTensorsAndVectors(), eigenValues_, and tensors_computed_.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel(), and ~EventShapeVariables().
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 187 of file EventShapeVariables.cc.
References compTensorsAndVectors(), eigenValues_, and tensors_computed_.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel(), and ~EventShapeVariables().
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 76 of file EventShapeVariables.cc.
References Abs(), custom_jme_cff::area, hiPixelPairStep_cff::deltaPhi, mps_fire::i, inputVectors_, phi, Pi, and tmp.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel(), and ~EventShapeVariables().
|
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 114 of file EventShapeVariables.cc.
References eigenValues_, eigenValuesNoNorm_, eigenValuesNoNormTmp_, eigenValuesTmp_, eigenVectors_, inputVectors_, 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 230 of file EventShapeVariables.cc.
References fwmom_, fwmom_computed_, fwmom_maxl_, mps_fire::i, inputVectors_, and gen::n.
Referenced by getEigenVectors(), 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 197 of file EventShapeVariables.cc.
References compTensorsAndVectors(), eigenValues_, and tensors_computed_.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel(), and ~EventShapeVariables().
|
inline |
Definition at line 78 of file EventShapeVariables.h.
References compTensorsAndVectors(), eigenValues_, and tensors_computed_.
|
inline |
Definition at line 79 of file EventShapeVariables.h.
References compTensorsAndVectors(), eigenValuesNoNorm_, and tensors_computed_.
|
inline |
Definition at line 80 of file EventShapeVariables.h.
References compTensorsAndVectors(), computeFWmoments(), eigenVectors_, getFWmoment(), getFWmoments(), checklumidiff::l, and tensors_computed_.
double EventShapeVariables::getFWmoment | ( | unsigned | l | ) |
Definition at line 214 of file EventShapeVariables.cc.
References computeFWmoments(), fwmom_, fwmom_computed_, fwmom_maxl_, and checklumidiff::l.
Referenced by getEigenVectors().
const std::vector< double > & EventShapeVariables::getFWmoments | ( | ) |
Definition at line 224 of file EventShapeVariables.cc.
References computeFWmoments(), fwmom_, and fwmom_computed_.
Referenced by getEigenVectors().
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 54 of file EventShapeVariables.cc.
References Abs(), hiPixelPairStep_cff::deltaPhi, mps_fire::i, inputVectors_, phi, and Pi.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel(), and ~EventShapeVariables().
void EventShapeVariables::set_r | ( | double | r | ) |
set exponent for computation of momentum tensor and related products
invalidate previous cached computations
Definition at line 101 of file EventShapeVariables.cc.
References eigenValues_, eigenValuesNoNorm_, alignCSCRings::r, r_, and tensors_computed_.
Referenced by EventShapeVariables(), and ~EventShapeVariables().
void EventShapeVariables::setFWmax | ( | unsigned | m | ) |
set number of Fox-Wolfram moments to compute
Definition at line 207 of file EventShapeVariables.cc.
References fwmom_, fwmom_computed_, fwmom_maxl_, and funct::m.
Referenced by EventShapeVariables(), and ~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 168 of file EventShapeVariables.cc.
References compTensorsAndVectors(), eigenValues_, and tensors_computed_.
Referenced by TtFullHadSignalSel::TtFullHadSignalSel(), and ~EventShapeVariables().
|
private |
Definition at line 101 of file EventShapeVariables.h.
Referenced by aplanarity(), C(), compTensorsAndVectors(), D(), getEigenValues(), set_r(), and sphericity().
|
private |
Definition at line 101 of file EventShapeVariables.h.
Referenced by compTensorsAndVectors(), getEigenValuesNoNorm(), and set_r().
|
private |
Definition at line 100 of file EventShapeVariables.h.
Referenced by compTensorsAndVectors().
|
private |
Definition at line 100 of file EventShapeVariables.h.
Referenced by compTensorsAndVectors().
|
private |
Definition at line 99 of file EventShapeVariables.h.
Referenced by compTensorsAndVectors(), and getEigenVectors().
|
private |
Definition at line 105 of file EventShapeVariables.h.
Referenced by computeFWmoments(), getFWmoment(), getFWmoments(), and setFWmax().
|
private |
Definition at line 106 of file EventShapeVariables.h.
Referenced by computeFWmoments(), getFWmoment(), getFWmoments(), and setFWmax().
|
private |
Owen ; save computed Fox-Wolfram moments.
Definition at line 104 of file EventShapeVariables.h.
Referenced by computeFWmoments(), getFWmoment(), and setFWmax().
|
private |
caching of input vectors
Definition at line 94 of file EventShapeVariables.h.
Referenced by circularity(), compTensorsAndVectors(), computeFWmoments(), EventShapeVariables(), and isotropy().
|
private |
caching of output
Definition at line 97 of file EventShapeVariables.h.
Referenced by compTensorsAndVectors(), and set_r().
|
private |
Definition at line 98 of file EventShapeVariables.h.
Referenced by aplanarity(), C(), compTensorsAndVectors(), D(), getEigenValues(), getEigenValuesNoNorm(), getEigenVectors(), set_r(), and sphericity().