ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/interface/TopTopologicalVariables.h
Revision: 1.1
Committed: Tue Nov 11 23:01:21 2008 UTC (16 years, 5 months ago) by kukartse
Content type: text/plain
Branch: MAIN
CVS Tags: V00-03-01, ZMorph_BASE_20100408, gak040610_morphing, V00-02-02, gak011410, gak010310, ejterm2010_25nov2009, V00-02-01, V00-02-00, gak112409, CMSSW_22X_branch_base, segala101609, V00-01-15, V00-01-14, V00-01-13, V00-01-12, V00-01-11, V00-01-10, gak031009, gak030509, gak022309, gak021209, gak040209, gak012809, V00-01-09, V00-01-08, V00-01-07, V00-01-06, V00-01-05, V00-01-04, V00-00-07, V00-00-06, V00-00-05, V00-00-04, V00-01-03, V00-00-02, V00-00-01, HEAD
Branch point for: ZMorph-V00-03-01, CMSSW_22X_branch
Log Message:
initial creation of a package for LJMET multivariate analysis

File Contents

# User Rev Content
1 kukartse 1.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