CMS 3D CMS Logo

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
EventShapeVariables
Class for the calculation of several event shape variables.
Definition: EventShapeVariables.h:32
EventShapeVariables::isotropy
double isotropy(const unsigned int &numberOfSteps=1000) const
Definition: EventShapeVariables.cc:49
EventShapeVariables::eigenValues_
std::vector< double > eigenValues_
Definition: EventShapeVariables.h:112
EventShapeVariables::fwmom_
std::vector< double > fwmom_
Definition: EventShapeVariables.h:116
EventShapeVariables::circularity
double circularity(const unsigned int &numberOfSteps=1000) const
Definition: EventShapeVariables.cc:71
EventShapeVariables::getEigenValues
const std::vector< double > & getEigenValues()
Definition: EventShapeVariables.h:77
EventShapeVariables::fwmom_computed_
bool fwmom_computed_
Definition: EventShapeVariables.h:117
EventShapeVariables::getEigenVectors
const TMatrixD & getEigenVectors()
Definition: EventShapeVariables.h:87
CandidateFwd.h
EventShapeVariables::C
double C()
Definition: EventShapeVariables.cc:175
EventShapeVariables::set_r
void set_r(double r)
set exponent for computation of momentum tensor and related products
Definition: EventShapeVariables.cc:94
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
EventShapeVariables::eigenValuesNoNormTmp_
TVectorD eigenValuesNoNormTmp_
Definition: EventShapeVariables.h:111
edm::View
Definition: CaloClusterFwd.h:14
EventShapeVariables::getEigenValuesNoNorm
const std::vector< double > & getEigenValuesNoNorm()
Definition: EventShapeVariables.h:82
EventShapeVariables::aplanarity
double aplanarity()
Definition: EventShapeVariables.cc:166
EventShapeVariables::compTensorsAndVectors
void compTensorsAndVectors()
Definition: EventShapeVariables.cc:105
EventShapeVariables::setFWmax
void setFWmax(unsigned m)
set number of Fox-Wolfram moments to compute
Definition: EventShapeVariables.cc:194
EventShapeVariables::eigenValuesTmp_
TVectorD eigenValuesTmp_
Definition: EventShapeVariables.h:111
EventShapeVariables::D
double D()
Definition: EventShapeVariables.cc:185
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
EventShapeVariables::getFWmoments
const std::vector< double > & getFWmoments()
Definition: EventShapeVariables.cc:211
EventShapeVariables::eigenValuesNoNorm_
std::vector< double > eigenValuesNoNorm_
Definition: EventShapeVariables.h:112
alignCSCRings.r
r
Definition: alignCSCRings.py:93
EventShapeVariables::tensors_computed_
bool tensors_computed_
Definition: EventShapeVariables.h:109
photonAnalyzer_cfi.numberOfSteps
numberOfSteps
Definition: photonAnalyzer_cfi.py:28
EventShapeVariables::inputVectors_
std::vector< math::XYZVector > inputVectors_
caching of input vectors
Definition: EventShapeVariables.h:105
EventShapeVariables::eigenVectors_
TMatrixD eigenVectors_
Definition: EventShapeVariables.h:110
EventShapeVariables::computeFWmoments
void computeFWmoments()
Definition: EventShapeVariables.cc:218
EventShapeVariables::sphericity
double sphericity()
Definition: EventShapeVariables.cc:158
EventShapeVariables::~EventShapeVariables
~EventShapeVariables()
default destructor
Definition: EventShapeVariables.h:43
Candidate.h
EventShapeVariables::r_
double r_
caching of output
Definition: EventShapeVariables.h:108
EventShapeVariables::getFWmoment
double getFWmoment(unsigned l)
Definition: EventShapeVariables.cc:200
Vector3D.h
EventShapeVariables::fwmom_maxl_
unsigned fwmom_maxl_
Owen ; save computed Fox-Wolfram moments.
Definition: EventShapeVariables.h:115
EventShapeVariables::EventShapeVariables
EventShapeVariables(const edm::View< reco::Candidate > &inputVectors)
constructor from reco::Candidates
Definition: EventShapeVariables.cc:6