Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FastJetOptions.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FastJetOptions.h
1 #ifndef JETBASE_FASTJETOPTIONS
2 #define JETBASE_FASTJETOPTIONS
3 
4 #include "Jet.h"
5 
6 #include <ostream>
7 #include <vector>
8 
9 // This is a structure that the FastJetAlgo class uses for its optoins. The users
10 // can initialize it as a double-brace enclosed list which is a mix of
11 // Something like this:
12 //
13 // FastJetOptions fj_opt {{ Jet::ALGO::ANTIKT, DO_SOFTDROP, SD_BETA, 0.0, SD_ZCUT 0.1, JET_R, 0.4 }};
14 // jet_reco_obj->add_algo(new FastJetAlgo(fj_opt), "AntiKt_Tower_r04");
15 // /* can also update it */
16 // jet_reco_obj->add_algo(new FastJetAlgo(fj_opt({{JET_R,0.5}}), "AntiKt_Tower_r05");
17 
19 {
20  JET_R // required
21  , JET_MIN_PT // optional, not set
22  , JET_MAX_ETA // optional, not set
23 
24  , CONSTITUENT_MIN_PT // optional, not set
25 
26  , DO_SOFTDROP // optional; off
27  , SD_BETA // defaults to 0
28  , SD_ZCUT // defaults to 0
29  , SD_JET_MIN_PT // defaults to 5.
30 
31  , CALC_AREA // optional, is off
32  , GHOST_AREA // defaults to 0.01
33  , GHOST_MAX_RAP // defaults to 5 or JET_MAX_ETA+JET_R
34 
35  , CALC_RhoMedDens // optional; default off
36  , CUT_RhoMedNHardest // optional; default 2
37  , NONE
38 
39  , FJCS_doConstSub // FastJet Constituent Subtraction. Optional. Default: false
40  , FJCS_max_eta // defaults to 1.1
41  , FJCS_GridMedBkgEst_Size // defaults to 0.5, may want smaller value, see http://fastjet.fr/repo/fastjet-doc-3.4.2.pdf
42  , FJCS_max_dist // add to vector of max dist; can add multiple times. If not added at all, defualts to { .1, 0.15}
43  , FJCS_alpha // same as above, but for alpha. Defaults to {{0., 0.}} if no entries
44  , FJCS_max_pt // max pt for constituents to be adjusted -- defaults to -1. (i.e. doesn't use selector)
45  , FJCS_ghost_area // max pt for constituents to be adjusted -- defaults to -1. (i.e. doesn't use selector)
46 
47  , SAVE_JET_COMPONENTS // optional; default true (I think this is what is hitting the e- spectra)
48  , DONT_SAVE_JET_COMPONENTS // set save_jet_components to false
49 
50  , VERBOSITY // optional
51 };
52 
54 { // All the things you can feed into FastJetAlgo
56  bool is_opt{false};
57 
58  float val{0.};
59  bool is_val{false};
60 
62  bool is_algo{false};
63 
64  FastJetOptItem(float _val)
65  : val{_val}
66  , is_val{true} {};
68  : algo{_algo}
69  , is_algo{true} {};
71  : opt{_opt}
72  , is_opt{true} {};
73 };
74 
76 {
78  FastJetOptions(const std::vector<FastJetOptItem>& _vitem) { update(_vitem); };
79  FastJetOptions& update(std::vector<FastJetOptItem>);
80  FastJetOptions& operator()(const std::vector<FastJetOptItem>& _vitem) { return update(_vitem); };
81 
82  void print(std::ostream& os = std::cout);
83 
84  float next_val(int& i, std::vector<FastJetOptItem>&);
85  float jet_R = 0.4;
86  Jet::ALGO algo = Jet::ALGO::ANTIKT;
87 
88  bool use_jet_max_eta = false;
89  float jet_max_eta = 0;
90  /* bool handset_maxeta = false; // If user uses jet_max_eta, then cut_edge_eta won't reset eta at all */
91  /* bool cut_edge_eta = false; */
92 
93  bool use_jet_min_pt = false;
94  float jet_min_pt = 0;
95 
96  bool use_constituent_min_pt = false;
97  float constituent_min_pt = 0.;
98 
99  bool save_jet_components = true;
100 
101  // softdrop
102  bool doSoftDrop = false;
103  float SD_beta = 0;
104  float SD_zcut = 0;
105  float SD_jet_min_pt = 5.;
106 
107  // calculate area
108  bool calc_area = false;
109  float ghost_area = 0.01;
110  float ghost_max_rap = 0; // will default to min(jet_max_eta+Jet_R., 5)
111 
112  // calculate jet median background density
113  bool calc_jetmedbkgdens = false;
115  float etahardestcut_jetmedbkgdens = 0.; // will default to jet_max_eta or ghost_max_rap
116 
117  // calculate constituent subtraction
118  bool cs_calc_constsub = false;
119  float cs_max_eta = 1.1;
120  float cs_max_pt = -1.; // max pt of which constituents are corrected
121  float cs_gridmedestsize = 0.5;
122  float cs_max_dist = 0.3;
123  float cs_alpha = 1.;
124  float cs_ghost_area = 0.01;
125 
126  int verbosity = 0;
127 
128  // for convenience when running FastJetAlgo
129  bool use_jet_selection = false; // set when initialized
130  void initialize(); // updates run with the first call
131 };
132 
133 #endif