source: trunk/KtJet/KtEvent.h@ 23

Last change on this file since 23 was 2, checked in by Pavel Demin, 17 years ago

first commit

File size: 6.0 KB
Line 
1#ifndef KTJET_KTEVENT_H
2#define KTJET_KTEVENT_H
3
4#include "KtJet/KtUtil.h"
5#include "KtJet/KtDistanceInterface.h"
6#include "KtJet/KtJetTable.h"
7#include "KtJet/KtRecomInterface.h"
8#include <vector>
9#include <string>
10#include "CLHEP/Vector/LorentzVector.h"
11
12
13namespace KtJet {
14
15 class KtLorentzVector;
16
17 /**
18 * The KtEvent class represents a whole system
19 * of KtLorentzVectors constructed using
20 * the defined KT clustering algorithm.
21
22 @author J.Butterworth J.Couchman B.Cox B.Waugh
23 */
24
25 class KtEvent {
26 public:
27 /** Inclusive method constructors */
28 KtEvent(const std::vector<KtLorentzVector> &, int type, int angle, int recom,
29 KtFloat rparameter);
30 KtEvent(const std::vector<KtLorentzVector> &, int type, KtDistance *, KtRecom *,
31 KtFloat rparameter);
32 KtEvent(const std::vector<KtLorentzVector> &, int type, KtDistance *, int recom,
33 KtFloat rparameter);
34 KtEvent(const std::vector<KtLorentzVector> &, int type, int angle, KtRecom *,
35 KtFloat rparameter);
36 KtEvent(const std::vector<CLHEP::HepLorentzVector> &, int type, int angle, int recom,
37 KtFloat rparameter);
38 /** Exclusive method constructors */
39 KtEvent(const std::vector<KtLorentzVector> &, int type, int angle, int recom);
40 KtEvent(const std::vector<KtLorentzVector> &, int type, KtDistance *, KtRecom *);
41 KtEvent(const std::vector<KtLorentzVector> &, int type, KtDistance *, int recom);
42 KtEvent(const std::vector<KtLorentzVector> &, int type, int angle, KtRecom *);
43 KtEvent(const std::vector<CLHEP::HepLorentzVector> &, int type, int angle, int recom);
44 /** Subjets method constructors */
45 KtEvent(const KtLorentzVector & jet, int angle, int recom);
46 KtEvent(const KtLorentzVector & jet, KtDistance *, KtRecom *);
47 KtEvent(const KtLorentzVector & jet, KtDistance *, int recom);
48 KtEvent(const KtLorentzVector & jet, int angle, KtRecom *);
49 /** Destructor */
50 ~KtEvent();
51
52 /** Do exclusive jet-finding for nJets jets */
53 void findJetsN(int nJets);
54 /** Do exclusive jet-finding up to scale dCut */
55 void findJetsD(KtFloat dCut);
56 /** Do exclusive jet-finding up to parameter yCut */
57 void findJetsY(KtFloat yCut);
58
59 /** Returns the number of final state jets */
60 inline int getNJets() const;
61 /** Return final state jets without sorting */
62 std::vector<KtLorentzVector> getJets();
63 /** Return jets in order of decreasing E */
64 std::vector<KtLorentzVector> getJetsE();
65 /** Return final state jets in order of decreasing Et */
66 std::vector<KtLorentzVector> getJetsEt();
67 /** Return final state jets in order of decreasing Pt */
68 std::vector<KtLorentzVector> getJetsPt();
69 /** Return final state jets in order of decreasing rapidity */
70 std::vector<KtLorentzVector> getJetsRapidity();
71 /** Return final state jets in order of decreasing pseudorapidity (eta) */
72 std::vector<KtLorentzVector> getJetsEta();
73
74 /** d-cut where n+1 jets merged to n */
75 inline KtFloat getDMerge(int nJets) const;
76 /** y-cut where n+1 jets merged to n */
77 inline KtFloat getYMerge(int nJets) const;
78
79 /** Get number of objects input to KtEvent */
80 inline int getNConstituents() const;
81 /** Get pointers to input particles */
82 std::vector<const KtLorentzVector *> getConstituents() const;
83 /** Get copies of input particles */
84 std::vector<KtLorentzVector> copyConstituents() const;
85
86 /** Jet containing given particle
87 * If passed jet in this event, return same jet. If passed particle or jet not in this
88 * event, error. */
89 KtLorentzVector getJet(const KtLorentzVector &) const;
90
91 /** Set ECut value used in calculating YCut. Default is total transverse energy of the event */
92 inline void setECut(KtFloat eCut);
93 /** Get ECut value used in calculating YCut */
94 inline KtFloat getECut() const;
95 /** Get total energy in event */
96 inline KtFloat getETot() const;
97 /** Get collision type */
98 inline int getType() const;
99 /** Get distance ("angle") scheme */
100 inline int getAngle() const;
101 /** Get recombination scheme */
102 inline int getRecom() const;
103 /** Get inclusive flag: true if inclusive method constructor was used */
104 inline bool isInclusive() const;
105
106 private:
107
108 /** Copy of original input particles */
109 std::vector<KtLorentzVector> m_constituents;
110 /** Collision type */
111 int m_type;
112 /** Kt distance scheme */
113 int m_angle;
114 /** Recombination scheme */
115 int m_recom;
116 KtRecom *m_ktRecom;
117 /** R parameter squared */
118 KtFloat m_rParameterSq;
119 /** Flag for inclusive jets (false = exclusive) */
120 bool m_inclusive;
121 /** Energy scale for calculating y */
122 KtFloat m_eCut;
123 /** 1 / (eCut^2) */
124 KtFloat m_etsq;
125 /** Total energy in event */
126 KtFloat m_eTot;
127 /** d at each merge */
128 std::vector<KtFloat> m_dMerge;
129 /** Jets found */
130 std::vector<KtLorentzVector> m_jets;
131 /** merging history - jet/pair merged at each step */
132 std::vector<int> m_hist;
133 /** Function object to calculate jet resolution parameters */
134 KtDistance *m_ktDist;
135
136 /** Initialize event jet analysis */
137 void init(const std::vector<KtLorentzVector> &, KtDistance* dist, int idist, KtRecom* recom, int irecom);
138 /** Initialize subjet analysis */
139 void init(const KtLorentzVector & jet, KtDistance* dist, int idist, KtRecom* recom, int irecom);
140 /** Add up E and Et in event */
141 void addEnergy();
142 /** Make jets */
143 void makeJets();
144 /** Make KtLorentzVectors from CLHEP HepLorentzVectors */
145 void makeKtFromHepLV(std::vector<KtLorentzVector> &, const std::vector<CLHEP::HepLorentzVector> &);
146 /** Get right distance and recombinatoin schemes based on integer flags as necessary */
147 void setSchemes(KtDistance* dist, int idist, KtRecom* recom, int irecom);
148 /** Print steering parameters to stdout */
149 void printSteering(std::string mode="") const;
150 /** Print list of authors, URL of documentation etc. */
151 void listAuthors() const;
152 };
153
154#include "KtJet/KtEvent.icc"
155
156}//end of namespace
157
158#endif
Note: See TracBrowser for help on using the repository browser.