LCFIPlus  0.6.5
JetFinder.h
Go to the documentation of this file.
1 #ifndef JetFinder_h
2 #define JetFinder_h 1
3 
4 #include "lcfiplus.h"
5 #include "TObject.h"
6 
7 using namespace std;
8 using namespace lcfiplus;
9 
10 namespace lcfiplus {
11 
15 struct JetConfig {
16  string algo;
17  //string algoY;
18  int nJet;
19  double Ycut;
21  double rParameter; // for Kt
22  double alphaParameter; // for Durham
23  double betaParameter; // for Valencia
24  double coneR;
25  double epsCut;
26  string coreAlgo;
27  double coreThreshold;
28  double distCut;
30  double YaddVV;
31  double YaddVL;
32  double YaddLL;
33  int useMuonID;
38  double muonIDMaxDist;
39  double muonIDMinProb;
40 
41  JetConfig() :
42  algo("DurhamVertex"),
43  nJet(0),
44  Ycut(1),
45  useBeamJets(0),
46  rParameter(1.0),
47  alphaParameter(1.0),
48  betaParameter(1.0),
49  coneR(0),
50  epsCut(0),
51  coreThreshold(0),
52  distCut(0),
53  nIteration(5),
54  YaddVV(100),
55  YaddVL(100),
56  YaddLL(100),
57  useMuonID(1),
58  muonIDExternal(1),
59  muonIDMinEnergy(5.),
60  muonIDMinD0Sig(5.),
61  muonIDMinZ0Sig(5.),
62  muonIDMaxDist(5.),
63  muonIDMinProb(.5)
64  {}
65 };
66 
73 Jet* convertJetVertex(const Jet* jet);
74 
82 class JetFinder {
83  public:
84  static double funcDurham(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg);
85  static double funcJade(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg);
86  static double funcJadeE(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg);
87  static double funcDurhamCheat(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg);
88 
89  static double funcKt(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg);
90  static double funcValencia(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg);
91 
92  static double funcVertex(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg, double(*func)(Jet&, Jet&,double,JetConfig&));
93 
94  // Vertex functions using above funcVertex()
95  // using template functions are more smart, but we maintain this for readability of non-experts
96  static double funcDurhamVertex(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg);
97  static double funcKtVertex(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg);
98  static double funcValenciaVertex(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg);
99 
100  static double funcDurhamBeamDistance(Jet& jet, double Evis2, JetConfig& cfg);
101  static double funcKtBeamDistance(Jet& jet, double Evis2, JetConfig& cfg);
102  static double funcValenciaBeamDistance(Jet& jet, double Evis2, JetConfig& cfg);
103 
107  JetFinder(const JetConfig& cfg);
113  void Configure(const JetConfig& cfg);
116  vector<Jet*> run(TrackVec& tracks);
119  vector<Jet*> run(TrackVec& tracks, NeutralVec& neutrals, double* pymin = 0, int ynjetmax = 10);
124  vector<Jet*> run(TrackVec& tracks, NeutralVec& neutrals, VertexVec& vertices, double* pymin = 0, int ynjetmax = 10);
128  vector<Jet*> prerun(TrackVec& tracks, NeutralVec& neutrals, VertexVec& vertices, int* pnVertexJets = 0);
132  vector<Jet*> run(vector<Jet*> input, double* pymin = 0, int ynjetmax = 10);
133 
134  private:
135  double (*_Yfunc)(Jet& jet1, Jet& jet2, double Evis2, JetConfig& cfg);
136  double (*_YfuncBeam)(Jet& jet1, double Evis2, JetConfig& cfg);
137  JetConfig _cfg;
138 };
139 
140 /*
141 class CheatedJetFinder {
142  public:
143  CheatedJetFinder(const JetConfig& cfg);
144  ~CheatedJetFinder() {};
145  vector<Jet*> run(Event* event);
146  vector<MCParticle*> originalPartons( MCParticleVec & mcps );
147 
148  private:
149  double (*_Yfunc)(Jet& jet1, Jet& jet2, double Evis2);
150  JetConfig _cfg;
151 };
152 */
153 }
154 
155 #endif
string algo
Definition: JetFinder.h:16
Jet * convertJetVertex(const Jet *jet)
Converts a jet containing vertices in a tree structure into a jet containing all particles at the top...
Definition: JetFinder.cc:817
Finds jets using various jet clustering algorithms.
Definition: JetFinder.h:82
double rParameter
Definition: JetFinder.h:21
const vector< const Neutral * > NeutralVec
Definition: lcfiplus.h:76
Holds parameters for jet clustering algorithms.
Definition: JetFinder.h:15
int nIteration
Definition: JetFinder.h:29
double YaddVL
Definition: JetFinder.h:31
int useBeamJets
Definition: JetFinder.h:20
double alphaParameter
Definition: JetFinder.h:22
int muonIDExternal
Definition: JetFinder.h:34
double YaddLL
Definition: JetFinder.h:32
double Ycut
Definition: JetFinder.h:19
double muonIDMinD0Sig
Definition: JetFinder.h:36
double epsCut
Definition: JetFinder.h:25
double coreThreshold
Definition: JetFinder.h:27
double muonIDMinEnergy
Definition: JetFinder.h:35
string coreAlgo
Definition: JetFinder.h:26
Definition: lcfiplus.h:980
int nJet
Definition: JetFinder.h:18
double YaddVV
Definition: JetFinder.h:30
const vector< const Track * > TrackVec
Definition: lcfiplus.h:72
~JetFinder()
Destructor.
Definition: JetFinder.h:109
int useMuonID
Definition: JetFinder.h:33
double muonIDMinProb
Definition: JetFinder.h:39
double betaParameter
Definition: JetFinder.h:23
double muonIDMaxDist
Definition: JetFinder.h:38
JetConfig()
Definition: JetFinder.h:41
double muonIDMinZ0Sig
Definition: JetFinder.h:37
double coneR
Definition: JetFinder.h:24
const vector< const Vertex * > VertexVec
Definition: lcfiplus.h:79
double distCut
Definition: JetFinder.h:28