1 |
/* File TopTopologicalVariables.hpp
|
2 |
*
|
3 |
* Created : Tue Oct 4 16:58:28 CDT 2005
|
4 |
* Author : Supriya JAIN, sjain@fnal.gov
|
5 |
*
|
6 |
* Purpose : Class containing generic methods for
|
7 |
* calculating topological variables
|
8 |
* (Instantiate using as argument: vector<TMBLorentzVector>
|
9 |
* of all objects for which you want any variable
|
10 |
* to be calculated)
|
11 |
*
|
12 |
* Last modified : Amnon Harel, 06 Mar 2006 (const correctness, cache eigenvalues)
|
13 |
* Comments :
|
14 |
*/
|
15 |
|
16 |
|
17 |
|
18 |
#ifndef TopTopologicalVariables_HPP_
|
19 |
#define TopTopologicalVariables_HPP_
|
20 |
|
21 |
#include <vector>
|
22 |
#include "LJMet/MultivariateAnalysis/interface/TMBLorentzVector.h"
|
23 |
|
24 |
namespace top_cafe {
|
25 |
|
26 |
class TopTopologicalVariables {
|
27 |
/**
|
28 |
Contains generic methods for calculating topological variables
|
29 |
Constructor takes most containers (vector, list, Collection, etc.)
|
30 |
of any object derived from TMBLorentzVector
|
31 |
*/
|
32 |
public:
|
33 |
|
34 |
// Constructor, destructor:
|
35 |
template<class Container>
|
36 |
TopTopologicalVariables(const Container& objects)
|
37 |
: _pv (0)
|
38 |
{
|
39 |
copy(objects.begin(), objects.end(), back_inserter(_myobjects));
|
40 |
}
|
41 |
~TopTopologicalVariables();
|
42 |
TopTopologicalVariables& operator= (const TopTopologicalVariables& that);
|
43 |
TopTopologicalVariables(const TopTopologicalVariables& that);
|
44 |
|
45 |
// Lambdas (eigen vectors of momentum tensor) and their combinations:
|
46 |
TVectorD GetMomentumTensorEigenvalues() const;
|
47 |
double Aplanarity() const;
|
48 |
double Sphericity() const;
|
49 |
double C() const;
|
50 |
double D() const;
|
51 |
|
52 |
double Centrality() const;
|
53 |
double Pt() const;
|
54 |
double Ht() const;
|
55 |
double H() const;
|
56 |
double TransverseMass() const;
|
57 |
double M() const;
|
58 |
double Mt() const;
|
59 |
double GeometricMeanPt() const;
|
60 |
double WeightedEtaRMS() const;
|
61 |
double MinimumPairMass() const;
|
62 |
double CosThetaStar() const;
|
63 |
double CosThetaStarJustZ() const;
|
64 |
|
65 |
double SoftestPt() const;
|
66 |
double MinDR() const;
|
67 |
double MaxDR() const;
|
68 |
|
69 |
// Note: this is the minimal relative momentum between two objects,
|
70 |
// a clean variation of KtMin. As for Ktmin, the user is
|
71 |
// encouraged to divide by an energy and get PtrelMinPrime
|
72 |
double PtrelMin() const;
|
73 |
|
74 |
// Note: this is KtMin, **NOT** KtMinPrime
|
75 |
// User needs to divide by his/her favorite energy variable to get
|
76 |
// KtMinPrime
|
77 |
double KtMin() const;
|
78 |
|
79 |
private:
|
80 |
|
81 |
typedef std::vector<TMBLorentzVector>::const_iterator Iterator;
|
82 |
std::vector<TMBLorentzVector> _myobjects;
|
83 |
|
84 |
mutable TVectorD *_pv; // internal representation: can change even for a const object
|
85 |
void ensurePV() const; // will calculate the eigen values (_pv) if it hasn't been done yet
|
86 |
};
|
87 |
|
88 |
} // namespace top_cafe
|
89 |
|
90 |
#endif
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|