1 | #ifndef KTJET_KTLORENTZVECTOR_H
|
---|
2 | #define KTJET_KTLORENTZVECTOR_H
|
---|
3 |
|
---|
4 | #include <vector>
|
---|
5 | #include <cmath>
|
---|
6 | #include "KtJet/KtUtil.h"
|
---|
7 |
|
---|
8 |
|
---|
9 | namespace KtJet {
|
---|
10 | /**
|
---|
11 | * This Class represents a KtCluster Object.
|
---|
12 | * It is just a CLHEP HepLorentzVector and also contains
|
---|
13 | * a std::vector of all its constituent KtLorentzVectors
|
---|
14 | * and an id number
|
---|
15 |
|
---|
16 | @author J.Butterworth J.Couchman B.Cox B.Waugh
|
---|
17 | */
|
---|
18 | class KtRecom;
|
---|
19 |
|
---|
20 | class KtLorentzVector : public CLHEP::HepLorentzVector {
|
---|
21 | public:
|
---|
22 | /** Default Constructor: create jet with no constituents */
|
---|
23 | KtLorentzVector();
|
---|
24 | /** Constructor: create particle with given 4-momentum */
|
---|
25 | KtLorentzVector(const CLHEP::HepLorentzVector &);
|
---|
26 | /** Constructor: create particle with given 4-momentum */
|
---|
27 | KtLorentzVector(KtFloat px, KtFloat py, KtFloat pz, KtFloat e);
|
---|
28 |
|
---|
29 | /** Destructor */
|
---|
30 | ~KtLorentzVector();
|
---|
31 |
|
---|
32 | /** return a reference to the vector of pointers of the KtLorentzVectors constituents */
|
---|
33 | inline const std::vector<const KtLorentzVector*> & getConstituents() const;
|
---|
34 | /** copy constituents */
|
---|
35 | std::vector<KtLorentzVector> copyConstituents() const;
|
---|
36 | /** returns the number of constituents KtLorentzVector is made up of */
|
---|
37 | inline int getNConstituents() const;
|
---|
38 | /** Check if a KtLorentzVector is a constituent */
|
---|
39 | bool contains(const KtLorentzVector &) const;
|
---|
40 | /** Add particle to jet using required recombination scheme to merge 4-momenta */
|
---|
41 | void add(const KtLorentzVector &, KtRecom *recom);
|
---|
42 | /** Add particle to jet using E scheme (4-vector addition) to merge 4-momenta */
|
---|
43 | void add(const KtLorentzVector &);
|
---|
44 | inline unsigned int getID() const {return m_id;} // ??? Temporary, for debugging only
|
---|
45 | /** is it a Jet, not single particle */
|
---|
46 | inline bool isJet() const;
|
---|
47 | /** Add particle to jet using E scheme (4-vector addition) to merge 4-momenta */
|
---|
48 | KtLorentzVector & operator+= (const KtLorentzVector &);
|
---|
49 | /** Compare IDs of objects */
|
---|
50 | inline bool operator== (const KtLorentzVector &) const;
|
---|
51 | inline bool operator!= (const KtLorentzVector &) const;
|
---|
52 | inline bool operator< (const KtLorentzVector &) const;
|
---|
53 | inline bool operator> (const KtLorentzVector &) const;
|
---|
54 | private:
|
---|
55 | /** rapidity, only valid if haven't called other methods since last call to add() */
|
---|
56 | inline KtFloat crapidity() const;
|
---|
57 | /** rapidity, only valid if haven't called other methods since last call to add() */
|
---|
58 | KtFloat m_crapidity;
|
---|
59 | /** calculate rapidity */
|
---|
60 | inline void calcRapidity();
|
---|
61 | /** private method to help add constituents to vector */
|
---|
62 | void addConstituents(const KtLorentzVector*) ;
|
---|
63 | /** KtLorentzVectors id number */
|
---|
64 | unsigned int m_id;
|
---|
65 | /** Pointers to constituents */
|
---|
66 | std::vector<const KtLorentzVector*> m_constituents;
|
---|
67 | /** Particle rather than jet */
|
---|
68 | bool m_isAtomic;
|
---|
69 | /** Number of instances so far */
|
---|
70 | static unsigned int m_num;
|
---|
71 | /** Some classes need access to crapidity for efficiency reasons */
|
---|
72 | friend class KtDistanceDeltaR;
|
---|
73 | friend class KtDistanceQCD;
|
---|
74 | };
|
---|
75 |
|
---|
76 | bool greaterE(const CLHEP::HepLorentzVector &, const CLHEP::HepLorentzVector &);
|
---|
77 | bool greaterEt(const CLHEP::HepLorentzVector &, const CLHEP::HepLorentzVector &);
|
---|
78 | bool greaterPt(const CLHEP::HepLorentzVector &, const CLHEP::HepLorentzVector &);
|
---|
79 | bool greaterRapidity(const CLHEP::HepLorentzVector &, const CLHEP::HepLorentzVector &);
|
---|
80 | bool greaterEta(const CLHEP::HepLorentzVector &, const CLHEP::HepLorentzVector &);
|
---|
81 |
|
---|
82 | #include "KtJet/KtLorentzVector.icc"
|
---|
83 |
|
---|
84 | }//end of namespace
|
---|
85 | #endif
|
---|