CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EventShapeVariables.h
Go to the documentation of this file.
1 #ifndef EventShapeVariables_h
2 #define EventShapeVariables_h
3 
26 
27 #include "TMatrixDSym.h"
28 #include "TVectorD.h"
29 
30 #include <vector>
31 
33 public:
35  explicit EventShapeVariables(const edm::View<reco::Candidate>& inputVectors);
37  explicit EventShapeVariables(const std::vector<math::XYZVector>& inputVectors);
39  explicit EventShapeVariables(const std::vector<math::RhoEtaPhiVector>& inputVectors);
41  explicit EventShapeVariables(const std::vector<math::RThetaPhiVector>& inputVectors);
44 
48  double isotropy(const unsigned int& numberOfSteps = 1000) const;
49 
52  double circularity(const unsigned int& numberOfSteps = 1000) const;
53 
55  void set_r(double r);
56 
58  void setFWmax(unsigned m);
59 
63  double sphericity();
67  double aplanarity();
71  double C();
75  double D();
76 
77  const std::vector<double>& getEigenValues() {
78  if (!tensors_computed_)
80  return eigenValues_;
81  }
82  const std::vector<double>& getEigenValuesNoNorm() {
83  if (!tensors_computed_)
85  return eigenValuesNoNorm_;
86  }
87  const TMatrixD& getEigenVectors() {
88  if (!tensors_computed_)
90  return eigenVectors_;
91  }
92 
93  double getFWmoment(unsigned l);
94  const std::vector<double>& getFWmoments();
95 
96 private:
100  void compTensorsAndVectors();
101 
102  void computeFWmoments();
103 
105  std::vector<math::XYZVector> inputVectors_;
106 
108  double r_;
110  TMatrixD eigenVectors_;
112  std::vector<double> eigenValues_, eigenValuesNoNorm_;
113 
115  unsigned fwmom_maxl_;
116  std::vector<double> fwmom_;
118 };
119 
120 #endif
std::vector< double > eigenValuesNoNorm_
const std::vector< double > & getEigenValues()
double circularity(const unsigned int &numberOfSteps=1000) const
Class for the calculation of several event shape variables.
void setFWmax(unsigned m)
set number of Fox-Wolfram moments to compute
std::vector< double > eigenValues_
double r_
caching of output
const TMatrixD & getEigenVectors()
EventShapeVariables(const edm::View< reco::Candidate > &inputVectors)
constructor from reco::Candidates
~EventShapeVariables()
default destructor
const std::vector< double > & getFWmoments()
double getFWmoment(unsigned l)
std::vector< math::XYZVector > inputVectors_
caching of input vectors
unsigned fwmom_maxl_
Owen ; save computed Fox-Wolfram moments.
void set_r(double r)
set exponent for computation of momentum tensor and related products
double isotropy(const unsigned int &numberOfSteps=1000) const
const std::vector< double > & getEigenValuesNoNorm()
std::vector< double > fwmom_