-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEventShape.h
60 lines (42 loc) · 1.34 KB
/
EventShape.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/////////
/// code below based on
/// http://cmslxr.fnal.gov/lxr/source/PhysicsTools/CandUtils/interface/EventShapeVariables.h
/// still need to add the
/// http://cmslxr.fnal.gov/lxr/source/PhysicsTools/CandUtils/interface/Thrust.h
////////
#ifndef EventShape_h
#define EventShape_h
//ROOT
#include "TMath.h"
#include "Math/LorentzVector.h"
#include "Math/VectorUtil.h"
#include "Math/Vector3D.h"
#include "Math/Point3D.h"
#include "TMatrixDSym.h"
#include "TVectorD.h"
// CMS2
#include "./CMS2.h"
//#include "Utils.h"
#include "./utilities.h"
#include <vector>
using namespace std;
//using namespace tas;
typedef ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<double> > XYZPoint;
typedef ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double> > XYZVector;
class EventShape {
public:
// explicit EventShape(const std::vector<XYZVector>& inputVectors);
EventShape(const std::vector<LorentzVector> & inputVectors);
// EventShape();
// default destructor
~EventShape();
double sphericity(double = 2.) const;
double aplanarity(double = 2.) const;
double circularity(const unsigned int& numberOfSteps = 1000) const;
private:
TMatrixDSym compMomentumTensor(double = 2.) const;
TVectorD compEigenValues(double = 2.) const;
/// cashing of input vectors
std::vector<XYZVector> inputVectors_;
};
#endif